Commit Graph

144598 Commits

Author SHA1 Message Date
Eric Engestrom 996e50a60a docs: add release notes for 21.1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12780>
2021-09-08 22:37:44 +01:00
Jesse Natalie 44b9e11ddb gl.h: Remove dllimport
__declspec(dllimport) isn't needed for linking to functions, extern
is sufficient. The preprocessor define used to determine when to
set it (_DLL) was incorrect, since that preprocessor define is set
anytime you're linking against dynamic CRT as opposed to static CRT.

Reviewed-by: Bill Kristiansen <billkris@Microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12776>
2021-09-08 18:42:57 +00:00
Mike Blumenkrantz 5ab27ad01e aux/trace: dump more pipe_vertex_element members
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12754>
2021-09-08 18:16:22 +00:00
Mike Blumenkrantz b4cbc47b3c mesa/st: use uint for instance_divisor instead of int
this is confusing

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12755>
2021-09-08 17:54:08 +00:00
Chia-I Wu e38c58c808 venus: raise the ring buffer size to 64KB
When the renderer supports largeRing, raise the ring buffer size to 64KB
and raise the direct submit threshold to 4KB.  The numbers are randomly
picked.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 79b8498c05 venus: update venus-protocol headers
There are some decoder changes.  But we mainly want to gain largeRing
support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu c9eedba75d venus: make ring buffer size configurable
Until we can assume large ring support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu eb88c8e1d4 venus: rework vn_instance_submission
The goal is to remove local_cs_data.  To that end, vn_ring_submit is
modified to take a cs than a pointer.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 862244ccc6 venus: add and use VN_CS_ENCODER_INITIALIZER
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 0641a230a0 venus: init experimental features before the ring
We can no longer use
vn_call_vkGetVenusExperimentalFeatureData100000MESA which requires the
ring to be initialized.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu e5a005dd0c venus: support reply shmem without ring
Let vn_instance_get_reply_shmem_locked use the renderer if it is called
before the ring is initialized.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 68eb682a23 venus: add vn_renderer_submit_simple_sync
It submits a command stream to the renderer and waits.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 2996c707cf venus: init roundtrip fields in vn_instance later
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 3bba38ab71 venus: reorder version fields in vn_instance
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Jesse Natalie 076c8f041a docs: Update Windows llvmpipe doc for driver split
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:45 -07:00
Jesse Natalie f36921effe wgl: Refactor drivers to a libgallium_wgl.dll
I'd like to support EGL on Windows, using the same architecture as Linux.
On Linux, libgallium_dri.so is a "megadriver," containing the Mesa Gallium
state tracker, plus the actual driver implementations.

Now, on Windows, libgallium_wgl.dll is a proper OpenGL ICD, and OpenGL32.dll
is just a stub DLL which implements the wgl* APIs in terms of that ICD.

This is the more "architecturally clean" way to share the state tracker
between EGL and WGL.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:39 -07:00
Jesse Natalie e2bb111e02 wgl: Make overridden entrypoints local to stw_ext_context
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:35 -07:00
Jesse Natalie 739fb1057d wgl: Move wgl* non-extension definitions to libgl-gdi
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:24 -07:00
Jesse Natalie a153c78d6e wgl: Move opengl32.def to target instead of frontend
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:13 -07:00
Jesse Natalie 675775b140 wgl: Don't use BUILD_GL32 for wgl frontend
The set of GL exports from OpenGL32.dll is controlled by a .def file,
there's no need to also use __declspec(dllexport) for all of them.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:22:00 -07:00
Jesse Natalie 2a76c976d1 static-glapi: Fix MSVC preprocessor definitions
Previously, any DLL which links any function from libglapi-static would
end up exporting the entire GL API surface area, due to the dllexport
introduced by BUILD_GL32. This fix allows DLLs to internally include
definitions of gl* APIs without having to export the entire surface.

Also, remove unreachable with_shared_glapi branch already in an else block.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:21:53 -07:00
Jesse Natalie 03006926de wgl: Fix unit test when using shared glapi
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:21:48 -07:00
Jesse Natalie 92f515ad6e mapi: Fix shared-glapi build with MSVC
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
2021-09-08 07:21:26 -07:00
Corentin Noël d326d32e24 glx: Prevent crashes when an extension isn't found
Avoid a NULL-pointer dereference.

Fixes: 2c8a85b712 ("glx: Stash a copy of the XExtCodes in the glx_display")
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12751>
2021-09-08 11:46:51 +00:00
Rob Clark 20ec247cb8 freedreno/ir3: Update physical_predecessors for streamout block
Caught by newly added ir3_validate checks.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Rob Clark 137471ca89 freedreno/ir3: Improve error msg for block level validation
Printing whatever happened to be the last instruction is misleading.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Rob Clark ac5df8c5c9 freedreno/ir3: Validate physical successors
Each block's physical successors should be a superset of the logical
successors.

Also validate that the successors are sane (ie. we shouldn't have the
2nd one if we don't have the first)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Rob Clark d2efcd3f06 freedreno/ir3: Fix double printing of branch suffix
print_instr_name() already prints the suffix.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Rob Clark c343fa9ecd freedreno/ir3: Fix physical successors for break out of loop
We can't just clobber the existing successor[0] which is based on
logical successor[0]

Suggested-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Rob Clark f472949b24 freedreno/ir3: Update physical_successors after retargetting jumps
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>
2021-09-08 08:53:39 +00:00
Marcin Ślusarz 30b2cc423c glsl: break out early if compound assignment's operand errored out
Fixes compiler crashes on:

struct Foo
{
  float does_exist_member;
};

in vec2 tex;
out vec4 color;

void
main(void)
{
  Foo foo;

  foo.does_not_exist_member %= 3; /* or any of: <<=, >>=, &=, |=, ^= */
  color = vec4(tex.xy, tex.xy);
}

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
CC: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717>
2021-09-08 06:59:34 +00:00
Marcin Ślusarz 26302ccdc1 glsl: propagate errors from *=, /=, +=, -= operators
Fixes compiler crash on:

void main()
{
    gl_FragColor = a += 1;
}

(a is not declared anywhere)

Found with AFL++.

Fixes: d1fa69ed61 ("glsl: do not attempt assignment if operand type not parsed correctly")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717>
2021-09-08 06:59:34 +00:00
Mike Blumenkrantz 0edbdc671f zink: fix some pipe caps for max instructions
all shaders are supported now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12760>
2021-09-08 04:45:28 +00:00
Mike Blumenkrantz ad584ed34e zink: use dispatch table for (almost) all vulkan calls
try to avoid hitting the loader when possible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12757>
2021-09-08 04:31:24 +00:00
Icecream95 2777d4f69d lima: Improve error messages for unsupported GP operations
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>
2021-09-08 04:19:56 +00:00
Icecream95 4ad4aa38fa lima: Fix crashes for GPUs with more than four cores
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>
2021-09-08 04:19:56 +00:00
Icecream95 c1f40c762c lima: Enable PIPE_CAP_VERTEX_COLOR_UNCLAMPED
Fixes lighting being too bright in Neverball.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>
2021-09-08 04:19:56 +00:00
Timothy Arceri 52893327fb glsl: fix variable scope for do-while loops
Without this the following code was successfully compiling.

   void main()
   {
      do
         int var_1 = 0;
      while (false);

      var_1++;
   }

Fixes: a87ac255cf ("Initial commit.  lol")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>
2021-09-08 03:56:59 +00:00
Timothy Arceri 174c057926 glsl: handle scope correctly when inlining loop expression
We need to clone the previously evaluated loop expression when
inlining otherwise we will have conflicts with shadow variables
defined in deeper scopes.

Fixes: 5c02e2e2de ("glsl: Generate IR for switch statements")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5255

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>
2021-09-08 03:56:59 +00:00
Timothy Arceri 8bbbbb02cd glsl: fix variable scope for loop-expression
We need to evaluate the loop-expression of a for loop before
we evaluate the loop body otherwise we will find the wrong
variable for the following loop.

   int var_0 = 0;
   for(; var_0 < 10; var_0++) {
      const float var_0 = 1.0;
      gl_FragColor = vec4(0.0, var_0, 0.0, 0.0);
   }

Fixes: a87ac255cf ("Initial commit.  lol")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5262

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>
2021-09-08 03:56:59 +00:00
Timothy Arceri 732cd9db44 mesa: fix mesa_problem() call in _mesa_program_state_flags()
Previously STATE_INTERNAL returned 0 for the unhandled states
but the outer switch throws the error for unhandled states.

Fixes: b4f3497786 ("mesa: remove STATE_INTERNAL")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5316

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12746>
2021-09-08 03:33:59 +00:00
Mike Blumenkrantz c5059915ee zink: use EXT_primitive_topology_list_restart where available
this also fixes an error where PATCHES was reported as supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12626>
2021-09-08 03:08:39 +00:00
Mike Blumenkrantz c96e854db3 zink: hook up VK_EXT_primitive_topology_list_restart
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12626>
2021-09-08 03:08:39 +00:00
Mike Blumenkrantz ff6ccbf5f0 lavapipe: fix primitive restart with indexed indirect draws
restart index needs to be set

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12761>
2021-09-07 22:45:07 -04:00
Mike Blumenkrantz 5bb747abd9 util/primconvert: force restart rewrites if original primtype wasn't supported
if we're doing a primtype change, the restart needs to be eliminated to
avoid losing restart data after the rewrite

Fixes: 583070748c ("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12625>
2021-09-08 01:50:46 +00:00
Michael Tang f7e575ce0d microsoft/spirv_to_dxil: Add `install : true` to spirv_to_dxil library.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12758>
2021-09-08 00:00:42 +00:00
pal1000 90faabc0ee ci: Add osmesa to Windows GitLab CI
osmesa CI coverage on Windows was lost when Windows CI with
Meson build was migrated from AppVeyor to GitLab CI

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8672>
2021-09-07 20:39:02 +00:00
Italo Nicola 5d02cbfcb5 main: don't always clamp pixels read from snorm buffers
From the OpenGL 4.6 spec, section 18.2.8:

"For a signed normalized fixed-point color buffer, each component is
clamped to [0,1] if read color clamping is enabled, or if type
represents un- signed integer components; otherwise type represents
signed integer components, and each component is clamped to [−1,1]."

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12749>
2021-09-07 20:18:33 +00:00
Mike Blumenkrantz dda0bb0b32 zink: clamp query results to 500 per qbo on 32bit
this makes 4000byte qbos instead of 40000, which avoids bypassing slab
allocation and makes the buffers more reusable to avoid exploding 32bit
address space

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12752>
2021-09-07 19:38:35 +00:00
Emma Anholt a2dfb49961 llvmpipe: memcpy user_buffers at set_constant_buffer time.
The data in the user buffer is only valid for a short period of time, and
we could use-after-free it if rendering hadn't been flushed by shader
deletion time.

Fixes: #5254
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724>
2021-09-07 19:16:32 +00:00