platform/upstream/mesa.git
2 years agomeson: check -mtls if has_exe_wrapper
Michel Zou [Mon, 6 Dec 2021 19:16:19 +0000 (20:16 +0100)]
meson: check -mtls if has_exe_wrapper

Fixes: 60d95c5d (Auto-enable TLSDESC support)
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14086>

2 years agopanvk: Add check for null fence
Manas Chaudhary [Tue, 7 Dec 2021 13:46:08 +0000 (19:16 +0530)]
panvk: Add check for null fence

Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14108>

2 years agoir3,turnip: Add support for GL_KHR_shader_subgroup_quad
Danylo Piliaiev [Tue, 16 Nov 2021 14:27:26 +0000 (16:27 +0200)]
ir3,turnip: Add support for GL_KHR_shader_subgroup_quad

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>

2 years agoir3,turnip: Enable subgroup ops support in all stages on gen4
Danylo Piliaiev [Tue, 16 Nov 2021 12:53:32 +0000 (14:53 +0200)]
ir3,turnip: Enable subgroup ops support in all stages on gen4

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>

2 years agoir3: Use getfiberid for SubgroupInvocationID on gen4
Danylo Piliaiev [Mon, 15 Nov 2021 15:14:37 +0000 (17:14 +0200)]
ir3: Use getfiberid for SubgroupInvocationID on gen4

Since it requires (ss) categorize it as is_sfu() and not is_mem().

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>

2 years agoir3: Add gen4 new subgroup instructions
Danylo Piliaiev [Mon, 15 Nov 2021 14:57:38 +0000 (16:57 +0200)]
ir3: Add gen4 new subgroup instructions

* getlast.w8 #4 - Perform jump for the first (CLUSTER_SIZE-1)
   fibers in a subgroup
* brcst.active.w8 - necessary to implement arithmetic subgroup
   operations with prefix sum.
* quad_shuffle.brcst - subgroupQuadBroadcast
* quad_shuffle.horiz - subgroupQuadSwapHorizontal
* quad_shuffle.vert - subgroupQuadSwapVertical
* quad_shuffle.diag - subgroupQuadSwapDiagonal
* getfiberid - gl_SubgroupID

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>

2 years agoradv: avoid prefixing few VkXXX structures by struct
Samuel Pitoiset [Fri, 26 Nov 2021 16:19:51 +0000 (17:19 +0100)]
radv: avoid prefixing few VkXXX structures by struct

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14115>

2 years agoutil/u_vector: prevent C++ warning on cast from void* to something else
Lionel Landwerlin [Sun, 28 Nov 2021 19:33:36 +0000 (21:33 +0200)]
util/u_vector: prevent C++ warning on cast from void* to something else

v2: fix windows build

v3: duplicate foreach macro for C/C++

v4: Extract casting macro

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13997>

2 years agomesa/crocus/iris/blorp: drop minify macro in favour of u_minify
Dave Airlie [Tue, 7 Dec 2021 06:05:56 +0000 (16:05 +1000)]
mesa/crocus/iris/blorp: drop minify macro in favour of u_minify

This macro is duplicated, clean it up.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14103>

2 years agomesa: Make _mesa_generate_mipmap_level static
Adam Jackson [Tue, 7 Dec 2021 02:49:18 +0000 (21:49 -0500)]
mesa: Make _mesa_generate_mipmap_level static

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused execmem code
Adam Jackson [Tue, 7 Dec 2021 02:45:54 +0000 (21:45 -0500)]
mesa: Remove unused execmem code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa/program: Dead code cleanup
Adam Jackson [Tue, 7 Dec 2021 02:18:45 +0000 (21:18 -0500)]
mesa/program: Dead code cleanup

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa/vbo: Always use buffer objects for storage
Adam Jackson [Wed, 2 Jun 2021 04:07:36 +0000 (00:07 -0400)]
mesa/vbo: Always use buffer objects for storage

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _vbo_current_binding
Adam Jackson [Thu, 20 May 2021 21:14:15 +0000 (17:14 -0400)]
mesa: Remove unused _vbo_current_binding

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _es_{,Get}TexGenfv
Adam Jackson [Thu, 20 May 2021 21:06:38 +0000 (17:06 -0400)]
mesa: Remove unused _es_{,Get}TexGenfv

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _es_RenderbufferStorageEXT
Adam Jackson [Thu, 20 May 2021 21:05:13 +0000 (17:05 -0400)]
mesa: Remove unused _es_RenderbufferStorageEXT

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _es_color4ub
Adam Jackson [Thu, 20 May 2021 21:04:31 +0000 (17:04 -0400)]
mesa: Remove unused _es_color4ub

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _mesa_compressed_image_address
Adam Jackson [Thu, 20 May 2021 21:03:44 +0000 (17:03 -0400)]
mesa: Remove unused _mesa_compressed_image_address

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _mesa_apply_ci_transfer_ops
Adam Jackson [Thu, 20 May 2021 21:01:39 +0000 (17:01 -0400)]
mesa: Remove unused _mesa_apply_ci_transfer_ops

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _check_*TexGen*OES
Adam Jackson [Thu, 20 May 2021 20:51:34 +0000 (16:51 -0400)]
mesa: Remove unused _check_*TexGen*OES

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _mesa_DrawTexx{,v}
Adam Jackson [Thu, 20 May 2021 20:50:21 +0000 (16:50 -0400)]
mesa: Remove unused _mesa_DrawTexx{,v}

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _mesa_get_render_format
Adam Jackson [Thu, 20 May 2021 20:42:03 +0000 (16:42 -0400)]
mesa: Remove unused _mesa_get_render_format

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agomesa: Remove unused _mesa_all_buffers_are_unmapped
Adam Jackson [Thu, 20 May 2021 20:40:38 +0000 (16:40 -0400)]
mesa: Remove unused _mesa_all_buffers_are_unmapped

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>

2 years agoradv: fix dynamic rendering with VRS
Samuel Pitoiset [Tue, 7 Dec 2021 12:30:45 +0000 (13:30 +0100)]
radv: fix dynamic rendering with VRS

The structure type was wrong. This fixes a bunch failures in
dEQP-VK.fragment_shading_rate.dynamic_rendering.*.

Fixes: 7f3aba37d21 ("radv: Support Begin/EndRendering.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14106>

2 years agoradv: constify radv_vs_input_state() in more places
Samuel Pitoiset [Thu, 18 Nov 2021 11:30:46 +0000 (12:30 +0100)]
radv: constify radv_vs_input_state() in more places

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857>

2 years agoradv: constify radv_vertex_binding in CmdSetVertexInputEXT()
Samuel Pitoiset [Thu, 18 Nov 2021 10:19:43 +0000 (11:19 +0100)]
radv: constify radv_vertex_binding in CmdSetVertexInputEXT()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857>

2 years agoradv: move a comment at the right place in CmdBindVertexBuffers2EXT()
Samuel Pitoiset [Thu, 18 Nov 2021 10:18:56 +0000 (11:18 +0100)]
radv: move a comment at the right place in CmdBindVertexBuffers2EXT()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857>

2 years agofreedreno,tu: Limit the amount of instructions preloaded into icache
Danylo Piliaiev [Fri, 3 Dec 2021 11:23:18 +0000 (13:23 +0200)]
freedreno,tu: Limit the amount of instructions preloaded into icache

Inferring from blob's cmdstream the size of shader instruction
cache for:
- a630 is 64
- a650 is 128
- a660 is 128

On a650 and a660 gpu could hang if we exceed the limit. Though
it is not reproducible with computerator or a single amber
test. Also while blob limits the size to 128 - Turnip still
hangs with it but does not hang with the limit of 127.

On a630 there seem to be no hang when limit is exceeded.

Fixes the hang of compute shader in Alien Isolation on a650/a660.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14044>

2 years agomesa/st: move external objects to direct calls
Dave Airlie [Mon, 6 Dec 2021 07:15:25 +0000 (17:15 +1000)]
mesa/st: move external objects to direct calls

This moves the memory and semaphore objects to direct calls

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomesa/st: move transformfeedback to direct calls
Dave Airlie [Mon, 6 Dec 2021 07:10:05 +0000 (17:10 +1000)]
mesa/st: move transformfeedback to direct calls

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomesa/st: move barriers to direct call
Dave Airlie [Mon, 6 Dec 2021 07:04:14 +0000 (17:04 +1000)]
mesa/st: move barriers to direct call

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomesa/st: direct call sync object functions
Dave Airlie [Mon, 6 Dec 2021 06:58:22 +0000 (16:58 +1000)]
mesa/st: direct call sync object functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomesa/dd/st: direct wire queries/timestamp/condrender.
Dave Airlie [Mon, 6 Dec 2021 06:31:59 +0000 (16:31 +1000)]
mesa/dd/st: direct wire queries/timestamp/condrender.

These were all interrelated, avoid the indirect calls here,
and call directly between main and state tracker

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomesa/dd/st: move get strings pointer out of dd.h
Dave Airlie [Mon, 6 Dec 2021 04:25:55 +0000 (14:25 +1000)]
mesa/dd/st: move get strings pointer out of dd.h

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agomeson: make mesa/tests/glx depend on gallium
Dave Airlie [Tue, 7 Dec 2021 04:29:29 +0000 (14:29 +1000)]
meson: make mesa/tests/glx depend on gallium

If I start direct linking the state tracker to mesa, the tests fail
to build because they don't have gallium linked.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>

2 years agointel/compiler: drop glsl options from brw_compiler
Dave Airlie [Tue, 7 Dec 2021 05:53:49 +0000 (15:53 +1000)]
intel/compiler: drop glsl options from brw_compiler

Only the nir options are used now, since i965 was dropped,
the glsl options come from the state tracker

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14102>

2 years agonir/algebraic: Move all the individual transforms to a common table.
Emma Anholt [Wed, 1 Dec 2021 23:45:54 +0000 (15:45 -0800)]
nir/algebraic: Move all the individual transforms to a common table.

Cuts 28% of the remaining relocations in libvulkan_intel.so, shrinks
binary size by 290kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Mark the automaton's filter tables as const.
Emma Anholt [Wed, 1 Dec 2021 22:20:55 +0000 (14:20 -0800)]
nir/algebraic: Mark the automaton's filter tables as const.

Moves it to .rodata instead of .data.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Pack various bitfields in the nir_search_value_union.
Emma Anholt [Tue, 30 Nov 2021 22:34:45 +0000 (14:34 -0800)]
nir/algebraic: Pack various bitfields in the nir_search_value_union.

This gets our union's size down to 22 bytes (now smaller than any of the
union's types were before we made the union!).  Cuts another 48kb off of
the drivers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Move relocations for variable conds to a table.
Emma Anholt [Tue, 30 Nov 2021 22:33:41 +0000 (14:33 -0800)]
nir/algebraic: Move relocations for variable conds to a table.

This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each variable assuming
variables mostly don't have conditions or the conditions are mostly
reused).  Reduces libvulkan_intel.so size by 49kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Move relocations for expression conds to a table.
Emma Anholt [Tue, 30 Nov 2021 22:23:39 +0000 (14:23 -0800)]
nir/algebraic: Move relocations for expression conds to a table.

This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each expression
(assuming expressions mostly don't have conditions or the conditions are
mostly reused).  Reduces libvulkan_intel.so size by 8.7kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Remove array-of-cond code
Emma Anholt [Tue, 30 Nov 2021 22:17:10 +0000 (14:17 -0800)]
nir/algebraic: Remove array-of-cond code

You can't have an array of them after removing many-comm-expr, there's no
space in the struct.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Replace relocations for nir_search values with a table.
Emma Anholt [Mon, 29 Nov 2021 23:24:47 +0000 (15:24 -0800)]
nir/algebraic: Replace relocations for nir_search values with a table.

Even with packing all 3 types into a 40-byte union (nir_search_constant
being 24 bytes and nir_search_expression having formerly been 32), and
having a single array of them, this cuts 1.7MB from each of
libvulkan_intel.so and libgallium_dri.so.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Drop the check for cache == None.
Emma Anholt [Mon, 29 Nov 2021 22:14:35 +0000 (14:14 -0800)]
nir/algebraic: Drop the check for cache == None.

The cache is always set.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonir/algebraic: Move some generated-code algebraic opt args into a struct.
Emma Anholt [Mon, 29 Nov 2021 21:57:19 +0000 (13:57 -0800)]
nir/algebraic: Move some generated-code algebraic opt args into a struct.

I'm going to be adding some more tables to reduce relocations in the
generated code, so move the current tables to a struct for arg-passing
sanity.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>

2 years agonouveau/nir: Use the address reg for indirect scratch access.
Emma Anholt [Sun, 5 Dec 2021 19:41:25 +0000 (11:41 -0800)]
nouveau/nir: Use the address reg for indirect scratch access.

Fixes the dEQP regressions in dEQP-GLES2.functional.shaders.indexing.*.
TGSI used the address reg for these offsets too.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14083>

2 years agomesa: make struct in gl_program a union and remove FIXME
Timothy Arceri [Sat, 4 Dec 2021 12:23:07 +0000 (23:23 +1100)]
mesa: make struct in gl_program a union and remove FIXME

Now that the classic drivers that were mixing the use of these asm
and glsl shader fields are gone we can finally use a union here.

This basically reverts commit 9d99dc4bc1fd but also moves a
read of IsPositionInvariant inside an arb asm only code block
for safety.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14059>

2 years agoloader/dri3: support glx pbuffer swap
Qiang Yu [Wed, 10 Nov 2021 10:59:34 +0000 (18:59 +0800)]
loader/dri3: support glx pbuffer swap

Double buffered pbuffer need to update the front buffer,
otherwise we always get wrong value when glReadPixels().

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: stop doing anything in swap buffer for some drawable
Qiang Yu [Wed, 10 Nov 2021 14:02:53 +0000 (22:02 +0800)]
loader/dri3: stop doing anything in swap buffer for some drawable

We are sure to have a back buffer in swap buffer now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Singed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: rename dri3_fake_front_buffer
Qiang Yu [Wed, 10 Nov 2021 11:06:14 +0000 (19:06 +0800)]
loader/dri3: rename dri3_fake_front_buffer

Sometimes this is the real front buffer depends on the place
called. Since it's the same LOADER_DRI3_FRONT_ID slot, just
name it dri3_front_buffer.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: replace is_pixmap with drawable type
Qiang Yu [Wed, 10 Nov 2021 02:00:14 +0000 (10:00 +0800)]
loader/dri3: replace is_pixmap with drawable type

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: setup present event with drawable type info
Qiang Yu [Fri, 12 Nov 2021 02:49:07 +0000 (10:49 +0800)]
loader/dri3: setup present event with drawable type info

If we already know the drawable type, setup event in a simpler way.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: pack window present event setup into a function
Qiang Yu [Thu, 11 Nov 2021 09:21:48 +0000 (17:21 +0800)]
loader/dri3: pack window present event setup into a function

For simplicity and latter commits.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: remove unused present capability query
Qiang Yu [Tue, 9 Nov 2021 13:51:35 +0000 (21:51 +0800)]
loader/dri3: remove unused present capability query

The query result is not used anywhere.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoloader/dri3: add drawable type set by GLX and EGL
Qiang Yu [Fri, 12 Nov 2021 02:25:11 +0000 (10:25 +0800)]
loader/dri3: add drawable type set by GLX and EGL

Drawable type include more information which can be used
to distinguish pixmap and pbuffer which both treated as
pixmap before.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoglx: add drawable type argument when create drawable
Qiang Yu [Tue, 9 Nov 2021 09:19:44 +0000 (17:19 +0800)]
glx: add drawable type argument when create drawable

For distinguish different behavior of pixmap and pbuffer
in latter commits.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoglx: check drawable type before create drawble
Qiang Yu [Tue, 9 Nov 2021 08:52:40 +0000 (16:52 +0800)]
glx: check drawable type before create drawble

If glxDrawable is not a X window ID, we can only support
GLXPbuffer now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoglx: no need to create extra pixmap for pbuffer
Qiang Yu [Tue, 9 Nov 2021 07:41:08 +0000 (15:41 +0800)]
glx: no need to create extra pixmap for pbuffer

XServer already created a pixmap with same id as pbuffer,
so that other client can use the pbuffer id to do
glXMakeCurrent(). But with a hidden pixmap, we can't do
this.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>

2 years agoutil: add workaround for SNK HEROINES Tag Team Frenzy
Timothy Arceri [Fri, 3 Dec 2021 11:22:57 +0000 (22:22 +1100)]
util: add workaround for SNK HEROINES Tag Team Frenzy

The game makes use of builtin functions that were moved to
compatibility shaders in GLSL 4.20 in its GLSL 4.20 shaders
without declaring the compatibility token.

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

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14040>

2 years agoutil: add dri config option force_compat_shaders
Timothy Arceri [Fri, 3 Dec 2021 09:53:46 +0000 (20:53 +1100)]
util: add dri config option force_compat_shaders

This allows us to force all shaders to offer shader features only
provided to compatibility shaders.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14040>

2 years agoisl: Move some genxml surface state helpers into an include file
Kenneth Graunke [Thu, 11 Nov 2021 08:19:25 +0000 (00:19 -0800)]
isl: Move some genxml surface state helpers into an include file

On XeHP, the XY_BLOCK_COPY_BLT command has a number of fields that
describe the layout of the surface, much like SURFACE_STATE does.

Several of them are encoded in such a similar manner that we really
would like to reuse the isl helpers for emitting those.  This commit
moves them into a new isl_genX_helpers.h file which I can include
from the BLORP code.  (The alternative would be to add XY_BLOCK_COPY_BLT
filling commands to isl, but that...seems more like a BLORP feature.)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14094>

2 years agoiris: Rename is_render_target to is_dest in a few blit functions
Kenneth Graunke [Tue, 16 Nov 2021 00:02:34 +0000 (16:02 -0800)]
iris: Rename is_render_target to is_dest in a few blit functions

When targeting the blitter or compute engines, the destination is not
really a render target.  But it's still useful to know whether we're
talking about the source or destination.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14094>

2 years agor300: Fix mis-optimization turning -1 - x into 1 - x.
Emma Anholt [Mon, 6 Dec 2021 22:03:37 +0000 (14:03 -0800)]
r300: Fix mis-optimization turning -1 - x into 1 - x.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>

2 years agor300: Turn a comment about presub into an assert.
Emma Anholt [Mon, 6 Dec 2021 21:58:25 +0000 (13:58 -0800)]
r300: Turn a comment about presub into an assert.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>

2 years agor300: Add deqp expectations for RV515.
Emma Anholt [Tue, 23 Nov 2021 18:35:57 +0000 (10:35 -0800)]
r300: Add deqp expectations for RV515.

This may not be a complete set, as I haven't been able to run dEQP-GLES2
to completion (GPU hangs at some point, no particular test seems to be
guilty).  But this will help me assess NIR-to-TGSI for the driver.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>

2 years agodoc: update source tree doc to reflect recent classic/swrast deletions
Timothy Arceri [Mon, 6 Dec 2021 11:24:04 +0000 (22:24 +1100)]
doc: update source tree doc to reflect recent classic/swrast deletions

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14078>

2 years agofixup! gallium/swr: Remove driver source
Dylan Baker [Mon, 6 Dec 2021 22:00:42 +0000 (14:00 -0800)]
fixup! gallium/swr: Remove driver source

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agonew_features: Add OpenSWR removal
Dylan Baker [Mon, 6 Dec 2021 17:41:37 +0000 (09:41 -0800)]
new_features: Add OpenSWR removal

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agoCODEOWNERS: remove OpenSWR
Dylan Baker [Mon, 6 Dec 2021 17:40:37 +0000 (09:40 -0800)]
CODEOWNERS: remove OpenSWR

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agogallium/swr: clean up the documentation after SWR removal from main
Jan Zielinski [Thu, 10 Jun 2021 11:16:04 +0000 (13:16 +0200)]
gallium/swr: clean up the documentation after SWR removal from main

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agogallium/swr: Remove common code and build options
Jan Zielinski [Wed, 9 Jun 2021 12:16:23 +0000 (14:16 +0200)]
gallium/swr: Remove common code and build options

This commit removes all OpenSWR references from common Mesa code
and build system.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agogallium/swr: Remove driver source
Jan Zielinski [Wed, 9 Jun 2021 11:19:44 +0000 (13:19 +0200)]
gallium/swr: Remove driver source

The OpenSWR will be maintained on a classic/LTS branch.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>

2 years agonv50/nir: Switch to the common NIR options
Pierre Moreau [Tue, 28 Jul 2020 11:45:26 +0000 (13:45 +0200)]
nv50/nir: Switch to the common NIR options

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14069>

2 years agopan/va: Add table parameter to LD_ATTR_IMM
Alyssa Rosenzweig [Sun, 5 Dec 2021 01:28:45 +0000 (20:28 -0500)]
pan/va: Add table parameter to LD_ATTR_IMM

..and test the instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agopan/va: Add sample/update modes to LD_VAR
Alyssa Rosenzweig [Sun, 5 Dec 2021 01:28:10 +0000 (20:28 -0500)]
pan/va: Add sample/update modes to LD_VAR

..and test the new instructions. As usual, the semantics are the same as
bifrost, but the encoding is simpler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agopan/va: Make LD_VAR index more fine-grained
Alyssa Rosenzweig [Sun, 5 Dec 2021 01:26:48 +0000 (20:26 -0500)]
pan/va: Make LD_VAR index more fine-grained

Index in bytes instead of vec4s, since varyings on Valhall are no longer
vec4 based like on previous Malis.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agopan/va: Add more assembler tests
Alyssa Rosenzweig [Mon, 2 Aug 2021 16:31:40 +0000 (12:31 -0400)]
pan/va: Add more assembler tests

For new patterns

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agopan/va: Disambiguate sign of CSEL instructions
Alyssa Rosenzweig [Sat, 20 Nov 2021 20:20:05 +0000 (15:20 -0500)]
pan/va: Disambiguate sign of CSEL instructions

The naming scheme is a bit simpler than Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agopan/va: Improve assembler unit test output
Alyssa Rosenzweig [Sat, 4 Dec 2021 23:40:36 +0000 (18:40 -0500)]
pan/va: Improve assembler unit test output

Instead of using Python hex() to print the result, print the result in
the same format as the disassembler for easy visual comparison. This
means we don't need to reprint the expectation. This gives output like:

   7c 7d 11 33 04 80 66 00    LD_ATTR_IMM.v4.f16.slot0 @r0:r1, `r60, `r61, index:0x1
   7c 7d 10 33 04 80 66 00    Incorrect assembly

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>

2 years agomeson: restore dri.pc file
Dylan Baker [Mon, 6 Dec 2021 21:32:16 +0000 (13:32 -0800)]
meson: restore dri.pc file

Which was accidentally deleted.

Fixes: ea8fa10edd1f8976825c6aad05b904179a2deca3
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5717
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14090>

2 years agomesa/externalobject: delete unused functions
Dave Airlie [Mon, 6 Dec 2021 06:45:30 +0000 (16:45 +1000)]
mesa/externalobject: delete unused functions

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agomesa/barrier: remove unused barrier functions
Dave Airlie [Mon, 6 Dec 2021 06:44:20 +0000 (16:44 +1000)]
mesa/barrier: remove unused barrier functions

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agomesa/transformfeedback: remove unused transform feedback code
Dave Airlie [Mon, 6 Dec 2021 06:43:26 +0000 (16:43 +1000)]
mesa/transformfeedback: remove unused transform feedback code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agomesa: remove unused buffer object code.
Dave Airlie [Mon, 6 Dec 2021 06:41:21 +0000 (16:41 +1000)]
mesa: remove unused buffer object code.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agomesa/syncobj: drop unused syncobj code.
Dave Airlie [Mon, 6 Dec 2021 06:35:54 +0000 (16:35 +1000)]
mesa/syncobj: drop unused syncobj code.

This is all done in the state tracker now

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agomesa/query: remove all the mesa queryobj code.
Dave Airlie [Mon, 6 Dec 2021 06:22:46 +0000 (16:22 +1000)]
mesa/query: remove all the mesa queryobj code.

This is all unused in favour of the state tracker code.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>

2 years agoiris/ci: comment out iris-cml-traces-performance due to hw unavailable
Dave Airlie [Mon, 6 Dec 2021 19:23:32 +0000 (05:23 +1000)]
iris/ci: comment out iris-cml-traces-performance due to hw unavailable

This job seems to be timing out, daniels said hw was having some
availability issues, so turn off for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14088>

2 years agopanfrost: Add Valhall support to pandecode
Alyssa Rosenzweig [Thu, 18 Nov 2021 23:17:01 +0000 (18:17 -0500)]
panfrost: Add Valhall support to pandecode

Valhall v9 introduces a number of new data structures since Bifrost v7,
and removes a number of traditional data structures. Add decode routines
for the new Valhall data structures, and condition the old routines on
(PAN_ARCH <= 7) to remain buildable and warning-free.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopanfrost: Don't shadow Mesa's fui()
Alyssa Rosenzweig [Fri, 19 Nov 2021 03:43:36 +0000 (22:43 -0500)]
panfrost: Don't shadow Mesa's fui()

Will fix a compiler error when we #include the Valhall disassembler
header from pandecode.

Fixes: 688827f3c52 ("pan/va: Add disassembler generator")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopanfrost: Zero initialize disassembler stats
Alyssa Rosenzweig [Fri, 19 Nov 2021 03:45:01 +0000 (22:45 -0500)]
panfrost: Zero initialize disassembler stats

Keep it simple for introducing new support.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopanfrost: Add XML for Valhall data structures
Alyssa Rosenzweig [Mon, 15 Nov 2021 23:53:57 +0000 (18:53 -0500)]
panfrost: Add XML for Valhall data structures

Fork the latest canonical XML (Bifrost v7) and adapt to the data
structures found in the earliest Valhall GPU I could get my hands on
(Valhall v9). This should minimize the churn needed for the port by
keeping the Valhall model close to the Bifrost we already supported.

It is not known what happened to v8. It appears to have been yeeted from
existence.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopanfrost: Add "hex" type to GenXML
Alyssa Rosenzweig [Fri, 19 Nov 2021 03:41:22 +0000 (22:41 -0500)]
panfrost: Add "hex" type to GenXML

Although known fields wouldn't be given the type "hex", it is useful as
the default type for unknown fields while reverse-engineering, and as
such is used in the Valhall XML.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopan/va: Only hex dump when verbosely disassembling
Alyssa Rosenzweig [Mon, 22 Nov 2021 00:03:33 +0000 (19:03 -0500)]
pan/va: Only hex dump when verbosely disassembling

Closer behaviour to Bifrost, making the entrypoints symmetric.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agopan/bi: Link with Valhall disassembler
Alyssa Rosenzweig [Sat, 4 Dec 2021 19:23:43 +0000 (14:23 -0500)]
pan/bi: Link with Valhall disassembler

For pandecode's use.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>

2 years agomesa: use simple_mtx_t for TexMutex (v2)
Marek Olšák [Fri, 1 Oct 2021 19:46:48 +0000 (15:46 -0400)]
mesa: use simple_mtx_t for TexMutex (v2)

change mtx_recursive -> mtx_plain, there's no recursive locking

Let's try this again!  This was originally landed as f6abb3445b7f
("mesa: use simple_mtx_t for TexMutex") and then reverted with
781c0eafcf79 ("Revert "mesa: use simple_mtx_t for TexMutex"") because it
broke i965.  Now that i965 is no longer in the tree, we can restore it.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (v1)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14053>

2 years agonir/constant_folding: Optimize txb with bias of constant zero to tex
Ian Romanick [Tue, 9 Nov 2021 23:51:41 +0000 (15:51 -0800)]
nir/constant_folding: Optimize txb with bias of constant zero to tex

v2: Fail gracefully when bias_idx < 0.  See comment in the code for the
rationale.  See also issue #5722.

All Haswell and newer Intel GPUs had similar results. (Ice Lake shown)
total instructions in shared programs: 19757733 -> 19753431 (-0.02%)
instructions in affected programs: 277248 -> 272946 (-1.55%)
helped: 1644
HURT: 1
helped stats (abs) min: 1 max: 16 x̄: 2.62 x̃: 2
helped stats (rel) min: 0.05% max: 11.11% x̄: 2.11% x̃: 1.61%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.35% max: 0.35% x̄: 0.35% x̃: 0.35%
95% mean confidence interval for instructions value: -2.72 -2.51
95% mean confidence interval for instructions %-change: -2.19% -2.03%
Instructions are helped.

total cycles in shared programs: 938517439 -> 938384079 (-0.01%)
cycles in affected programs: 19548849 -> 19415489 (-0.68%)
helped: 1358
HURT: 269
helped stats (abs) min: 1 max: 2328 x̄: 133.01 x̃: 16
helped stats (rel) min: <.01% max: 41.12% x̄: 1.40% x̃: 0.48%
HURT stats (abs)   min: 1 max: 1302 x̄: 175.70 x̃: 30
HURT stats (rel)   min: <.01% max: 69.03% x̄: 6.24% x̃: 1.04%
95% mean confidence interval for cycles value: -99.14 -64.79
95% mean confidence interval for cycles %-change: -0.47% 0.19%
Inconclusive result (%-change mean confidence interval includes 0).

LOST:   21
GAINED: 32

All Ivy Bridge and older Intel GPUs had similar results. (Ivy Bridge shown)
total instructions in shared programs: 15302017 -> 15301485 (<.01%)
instructions in affected programs: 22565 -> 22033 (-2.36%)
helped: 168
HURT: 0
helped stats (abs) min: 1 max: 7 x̄: 3.17 x̃: 3
helped stats (rel) min: 0.04% max: 4.39% x̄: 3.05% x̃: 3.27%
95% mean confidence interval for instructions value: -3.45 -2.89
95% mean confidence interval for instructions %-change: -3.19% -2.91%
Instructions are helped.

total cycles in shared programs: 550119761 -> 549989147 (-0.02%)
cycles in affected programs: 12834251 -> 12703637 (-1.02%)
helped: 164
HURT: 0
helped stats (abs) min: 20 max: 4547 x̄: 796.43 x̃: 294
helped stats (rel) min: 0.23% max: 53.84% x̄: 2.05% x̃: 0.37%
95% mean confidence interval for cycles value: -942.62 -650.24
95% mean confidence interval for cycles %-change: -3.17% -0.94%
Cycles are helped.

fossil-db results:

Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown)
Instructions in all programs: 142073649 -> 141307526 (-0.5%)
SENDs in all programs: 6876848 -> 6876778 (-0.0%)
Loops in all programs: 38283 -> 38283 (+0.0%)
Cycles in all programs: 8410049681 -> 8402902960 (-0.1%)
Spills in all programs: 190623 -> 190599 (-0.0%)
Fills in all programs: 297780 -> 297756 (-0.0%)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14025>

2 years agollvmpipe: Fix Wpointer-to-int-cast
Michel Zou [Thu, 2 Dec 2021 19:58:30 +0000 (20:58 +0100)]
llvmpipe: Fix Wpointer-to-int-cast

Fixes: 2771fd4a (gallium, windows: Use HANDLE instead of FD for external objects)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14021>

2 years agomesa/st: Remove GL_ARB_depth_clamp emulation support.
Emma Anholt [Tue, 9 Nov 2021 23:31:10 +0000 (15:31 -0800)]
mesa/st: Remove GL_ARB_depth_clamp emulation support.

This was useful for emulating GL 3.2 in virgl on a GLES3 host renderer,
before GL_EXT_depth_clamp introduced the ability for hardware drivers to
expose the feature on GLES.  Now that we have that, the desktop-GL-capable
HW that virgl cares about can expose desktop GL even on its GLES renderer
on the host without this emulation.  I don't think anyone particularly
cares about hitting higher GL versions on actually-core-GLES hosts with
virgl.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13729>

2 years agowin32: Fixes thread local on win32 with clang/mingw (!14062)
Yonggang Luo [Sat, 4 Dec 2021 09:39:09 +0000 (17:39 +0800)]
win32: Fixes thread local on win32 with clang/mingw (!14062)

The mingw compiling error:
```
../../src/mapi/glapi/glapi.h:86:66: error: '_glapi_tls_Dispatch' cannot be thread local when declared 'dllimport'
_GLAPI_EXPORT extern __THREAD_INITIAL_EXEC struct _glapi_table * _glapi_tls_Dispatch;
                                                                 ^
../../src/mapi/glapi/glapi.h:88:51: error: '_glapi_tls_Context' cannot be thread local when declared 'dllimport'
_GLAPI_EXPORT extern __THREAD_INITIAL_EXEC void * _glapi_tls_Context;
```

Fixes: c47fd3dc ("windows: Use TLS context/dispatch with shared-glapi")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14062>

2 years agonir: Add an 'external' texture type for parity with samplers
Jesse Natalie [Fri, 3 Dec 2021 15:56:42 +0000 (07:56 -0800)]
nir: Add an 'external' texture type for parity with samplers

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14046>