platform/upstream/mesa.git
3 years agoutil/cache: test simple cache put and get between instances
Timothy Arceri [Fri, 17 Sep 2021 14:51:25 +0000 (00:51 +1000)]
util/cache: test simple cache put and get between instances

To make sure we are not just using the in-memory cache index for
the single file cache, we test adding and retriving cache items
between two different cache instances.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12925>

3 years agov3d: add R10G10B10X2_UNORM to format table
Ella-0 [Sat, 25 Sep 2021 15:51:16 +0000 (15:51 +0000)]
v3d: add R10G10B10X2_UNORM to format table

Fixes following piglit fails:
spec@ext_framebuffer_object@fbo-blending-formats
spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB10

Cc: mesa-stable
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13051>

3 years agolavapipe: Fix crashes with transform feedback when using VK_WHOLE_SIZE
Roland Scheidegger [Fri, 24 Sep 2021 15:57:05 +0000 (17:57 +0200)]
lavapipe: Fix crashes with transform feedback when using VK_WHOLE_SIZE

llvmpipe expects valid size parameter, and when just VK_WHOLE_SIZE is
passed very bad things can happen.
This was handled specially before, but got dropped when lavapipe was
converted to use the generated command queue.

Fixes: eb7eccc76f0a ("lavapipe: Use generated command queue code")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13036>

3 years agoanv: assert that legacy_scanout isn't used with explicit modifiers
Mike Blumenkrantz [Fri, 17 Sep 2021 20:15:00 +0000 (16:15 -0400)]
anv: assert that legacy_scanout isn't used with explicit modifiers

these should be mutually exclusive

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

3 years agoiris: Document push constants allocation
Caio Marcelo de Oliveira Filho [Fri, 24 Sep 2021 05:59:40 +0000 (22:59 -0700)]
iris: Document push constants allocation

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

3 years agointel: Add and use max_constant_urb_size_kb
Caio Marcelo de Oliveira Filho [Fri, 24 Sep 2021 05:59:40 +0000 (22:59 -0700)]
intel: Add and use max_constant_urb_size_kb

This knowledge was repeated in multiple places so move the values to
intel_device_info struct.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014>

3 years agospirv: don't bother initializing variables to Undef
Lionel Landwerlin [Mon, 27 Sep 2021 15:00:03 +0000 (18:00 +0300)]
spirv: don't bother initializing variables to Undef

If an OpVariable's initializer is undef, there is no need to
initialize the variable.

v2: Comment the code (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030>

3 years agospirv: workaround LLVM-SPIRV Undef variable initializers
Lionel Landwerlin [Fri, 24 Sep 2021 12:19:50 +0000 (15:19 +0300)]
spirv: workaround LLVM-SPIRV Undef variable initializers

The LLVM-SPIRV translator creates variables with initializers, but
most of those are actually undef initializers. We can just skip
composites that are entirely made of undefs, but for partially undefs,
we will still zero initialize.

v2: Rename wa_llvm_spirv_undef_initializer to wa_llvm_spirv_ignore_workgroup_initializer (Caio)
    Limit workaround to OpenCL (Caio)
    Make workaround clearer (Caio)

v3: Only apply workaround on workgroup storage (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030>

3 years agospirv: avoid shadowing local variable
Lionel Landwerlin [Fri, 24 Sep 2021 12:16:44 +0000 (15:16 +0300)]
spirv: avoid shadowing local variable

v2: rename s/eval/elem_val/ (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030>

3 years agoclover: Rename module -> binary, because C++20 makes module a keyword
Jesse Natalie [Sun, 26 Sep 2021 17:46:04 +0000 (10:46 -0700)]
clover: Rename module -> binary, because C++20 makes module a keyword

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273>

3 years agoclover: Delete unused 'e' exception reference vars
Jesse Natalie [Sun, 8 Aug 2021 15:59:58 +0000 (08:59 -0700)]
clover: Delete unused 'e' exception reference vars

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273>

3 years agoclover: std::result_of is deprecated in c++17 and removed in c++20
Jesse Natalie [Sun, 26 Sep 2021 18:03:56 +0000 (11:03 -0700)]
clover: std::result_of is deprecated in c++17 and removed in c++20

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273>

3 years agoi915g: Use the non-vbuf code path by default to fix index overflows.
Emma Anholt [Sat, 25 Sep 2021 22:42:06 +0000 (15:42 -0700)]
i915g: Use the non-vbuf code path by default to fix index overflows.

We were assertion failing on some large draws due to indices >16bits,
despite asking draw to limit the max indices.  I haven't managed to track
it down, so flip us back to the older, non-index drawing path that doesn't
hit this bug until it can get fixed.  Leave an I915_DEBUG=vbuf flag around
so we can look into this later.

This is a pretty big performance hit for vertex shaders.  Using glmark2 -b
build:use-vbo=true:

i915g-vbuf:     211 fps
i915g-nonvbuf:  185 fps
i915c:          41 fps

Given how massively better i915g still is than i915c (llvmpipe VS instead
of the classic swrast interpreter), I think it's still worth it to get
i915g correct before we fix this perf regression.

Fixes: #4971
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13052>

3 years agoi915g: Unifdef VBUF_MAP_BUFFER.
Emma Anholt [Wed, 16 Jun 2021 04:52:04 +0000 (21:52 -0700)]
i915g: Unifdef VBUF_MAP_BUFFER.

You do want to stream the vertices out to the WC mapping, as the code has
been doing, rather than writing into malloc and doing a memcpy later and
wasting cache space.

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

3 years agoi915g: Remove dead VBUF_USE_POOL code.
Emma Anholt [Wed, 16 Jun 2021 04:49:03 +0000 (21:49 -0700)]
i915g: Remove dead VBUF_USE_POOL code.

Not defined anywhere, and the members it's setting up don't exist.

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

3 years agoi915g: Improve debug output for the fresh-batch overflow case.
Emma Anholt [Wed, 16 Jun 2021 04:45:35 +0000 (21:45 -0700)]
i915g: Improve debug output for the fresh-batch overflow case.

Much more useful info for dEQP-GLES2.functional.buffer.write.random.0 than
"i915_vbuf_render_draw_elements: Assertion `0' failed."

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

3 years agoci/vc4: add piglit timeout
Juan A. Suarez Romero [Mon, 27 Sep 2021 13:22:04 +0000 (15:22 +0200)]
ci/vc4: add piglit timeout

Acked-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13065>

3 years agoturnip: Disable VK_EXT_display_control.
Emma Anholt [Fri, 24 Sep 2021 00:33:31 +0000 (17:33 -0700)]
turnip: Disable VK_EXT_display_control.

The common code fails dEQP-VK.wsi.display_control.register_device_event
due to having a stub NOT_IMPLEMENTED return, and thus fails the CTS.  This
is one of our last failures, so disable the extension until it can get
finished off, so we can unblock passing the CTS.

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

3 years agoaco: try forming clauses even if reg_pressure exceeds
Daniel Schürmann [Wed, 19 May 2021 07:23:20 +0000 (09:23 +0200)]
aco: try forming clauses even if reg_pressure exceeds

This patch allows to form clauses even if the register pressure
is at the limit with the effect that VMEM instructions are less
scattered after the first clause in a Block.
It respects the previous clause size to avoid excessive moving
of VMEM instructions.
VMEM_CLAUSE_MAX_GRAB_DIST is further reduced to compensate
some of the effects.

Totals from 28922 (19.26% of 150170) affected shaders: (GFX10.3)
VGPRs: 1546568 -> 1523072 (-1.52%); split: -1.52%, +0.00%
CodeSize: 117524892 -> 117510288 (-0.01%); split: -0.08%, +0.07%
MaxWaves: 605554 -> 611120 (+0.92%)
Instrs: 22292568 -> 22291927 (-0.00%); split: -0.10%, +0.09%
Latency: 488975399 -> 490230904 (+0.26%); split: -0.06%, +0.32%
InvThroughput: 117842300 -> 116521653 (-1.12%); split: -1.15%, +0.03%
VClause: 541550 -> 522464 (-3.52%); split: -9.73%, +6.20%
SClause: 718185 -> 718298 (+0.02%); split: -0.00%, +0.02%
Copies: 1420603 -> 1386949 (-2.37%); split: -2.64%, +0.27%
Branches: 559559 -> 559278 (-0.05%); split: -0.06%, +0.01%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896>

3 years agoaco: make clause-forming depend on the number of moved instructions
Daniel Schürmann [Wed, 19 May 2021 09:25:18 +0000 (11:25 +0200)]
aco: make clause-forming depend on the number of moved instructions

This allows more aggressive clause-forming in presence of
larger def-use distances. To compensate for the effect,
VMEM_CLAUSE_MAX_GRAB_DIST was decreased.

Totals from 5788 (3.85% of 150170) affected shaders: (GFX10.3)
VGPRs: 483960 -> 475272 (-1.80%); split: -1.82%, +0.02%
CodeSize: 59661240 -> 59669084 (+0.01%); split: -0.01%, +0.02%
MaxWaves: 70408 -> 71450 (+1.48%); split: +1.51%, -0.03%
Instrs: 11222417 -> 11224479 (+0.02%); split: -0.01%, +0.03%
Latency: 349397104 -> 349298602 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 88584832 -> 87762262 (-0.93%); split: -0.93%, +0.00%
VClause: 168905 -> 177089 (+4.85%); split: -0.48%, +5.32%
SClause: 375795 -> 375767 (-0.01%); split: -0.01%, +0.01%
Copies: 840298 -> 840231 (-0.01%); split: -0.04%, +0.03%
Branches: 373265 -> 373278 (+0.00%); split: -0.00%, +0.00%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896>

3 years agoaco: stop scheduling if clause-forming fails
Daniel Schürmann [Tue, 18 May 2021 20:33:30 +0000 (22:33 +0200)]
aco: stop scheduling if clause-forming fails

This avoids unintended reordering of VMEM instructions.
It is also highly unlikely that we find more independent
instructions before previous clause-related instructions.

Totals from 1921 (1.28% of 150170) affected shaders: (GFX10.3)
VGPRs: 103832 -> 103736 (-0.09%); split: -0.10%, +0.01%
CodeSize: 8695560 -> 8706000 (+0.12%); split: -0.03%, +0.15%
Instrs: 1643752 -> 1646349 (+0.16%); split: -0.04%, +0.20%
Latency: 26755527 -> 26614645 (-0.53%); split: -0.67%, +0.14%
InvThroughput: 7226604 -> 7204809 (-0.30%); split: -0.39%, +0.08%
VClause: 46536 -> 46201 (-0.72%); split: -0.81%, +0.09%
SClause: 47910 -> 47769 (-0.29%); split: -0.43%, +0.14%
Copies: 94647 -> 94558 (-0.09%); split: -0.26%, +0.17%
Branches: 36843 -> 36847 (+0.01%); split: -0.00%, +0.01%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896>

3 years agoglx: Don't strip off window/pixmap support from float fbconfigs
Adam Jackson [Wed, 16 Jun 2021 17:52:10 +0000 (13:52 -0400)]
glx: Don't strip off window/pixmap support from float fbconfigs

The X server doesn't get this wrong. It's not the client's job to
correct what the server says here. And if anyone ever implements HDR for
X11, you might in fact want to be able to use floats with a window.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002>

3 years agoglx: Clarify a debug message
Adam Jackson [Wed, 16 Jun 2021 17:51:12 +0000 (13:51 -0400)]
glx: Clarify a debug message

In GLX a "tag" usually means a context tag, "fbconfig attribute" is a
bit more obvious.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002>

3 years agoglx: Move __glFreeAttributeState next to its one caller
Adam Jackson [Mon, 10 May 2021 22:56:01 +0000 (18:56 -0400)]
glx: Move __glFreeAttributeState next to its one caller

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002>

3 years agoglx: Remove some unused declarations from glxclient.h
Adam Jackson [Fri, 28 Aug 2020 21:06:03 +0000 (17:06 -0400)]
glx: Remove some unused declarations from glxclient.h

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002>

3 years agoaco/ra: don't copy linear VGPRs within CF in get_reg_create_vector()
Daniel Schürmann [Mon, 27 Sep 2021 08:49:54 +0000 (09:49 +0100)]
aco/ra: don't copy linear VGPRs within CF in get_reg_create_vector()

Fixes: 6ed18749de52d1f24b23fad266eb3e8b46702752 ('aco: allow live-range splits of linear vgprs in top-level blocks')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13058>

3 years agoradv: pass the pipeline key to the backend compilers
Samuel Pitoiset [Fri, 24 Sep 2021 13:38:56 +0000 (15:38 +0200)]
radv: pass the pipeline key to the backend compilers

It exactly matches the shader keys now. Everything was copied from
the pipeline key to the shader keys.

There is still some work to completely remove radv_shader_variant_key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032>

3 years agoradv: rework layout of radv_pipeline_key
Samuel Pitoiset [Fri, 24 Sep 2021 13:17:03 +0000 (15:17 +0200)]
radv: rework layout of radv_pipeline_key

To match radv_shader_variant_key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032>

3 years agoradv: store the CS subgroup size to radv_shader_info
Samuel Pitoiset [Fri, 24 Sep 2021 13:10:32 +0000 (15:10 +0200)]
radv: store the CS subgroup size to radv_shader_info

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032>

3 years agoradv: store the topology instead of the output primitive type in the key
Samuel Pitoiset [Fri, 24 Sep 2021 12:52:58 +0000 (14:52 +0200)]
radv: store the topology instead of the output primitive type in the key

To match the pipeline key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032>

3 years agopanfrost/ci: Test panvk on Mali G52
Tomeu Vizoso [Mon, 5 Jul 2021 07:39:01 +0000 (09:39 +0200)]
panfrost/ci: Test panvk on Mali G52

Just run some selected tests for now because we miss a lot of
functionality, which would cause so many crashes that the runs
aren't practical.

Once the core functionality is implemented, we can switch to the master
case list with skips.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13016>

3 years agopanfrost/ci: Move CI files to src/panfrost
Tomeu Vizoso [Mon, 5 Jul 2021 07:25:57 +0000 (09:25 +0200)]
panfrost/ci: Move CI files to src/panfrost

In preparation for testing panvk.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13016>

3 years agopanvk: Implement vkCmdBlitImage()
Boris Brezillon [Wed, 8 Sep 2021 07:56:04 +0000 (09:56 +0200)]
panvk: Implement vkCmdBlitImage()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961>

3 years agopan/blit: Fix 3D blittering
Boris Brezillon [Mon, 6 Sep 2021 10:38:22 +0000 (12:38 +0200)]
pan/blit: Fix 3D blittering

Fixes several problems in the pan_blit() logic:

1. We actually need the reciprocal of the depth scaling in z_scale (maybe
   we should rename this field z_scale_rcp to make it clear)

2. When Z end < Z start we should remove one to the cur_layer/layer_offset
   instead of doing it on the last_layer field, otherwise there's an
   off-by-one error

3. The Z src offset should be adjusted to account for scaling. If we don't
   do that we won't sample from the right layer when upscaling.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961>

3 years agopan/blit: Let the caller offset the start/end coords passed to the blitter
Boris Brezillon [Tue, 1 Jun 2021 08:20:28 +0000 (10:20 +0200)]
pan/blit: Let the caller offset the start/end coords passed to the blitter

Since we have no guarantee that start < end, we can't really tell to
which one the offset applies to. Let the caller take care of that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961>

3 years agolima: Fix glFrontFace handling
Andreas Baierl [Thu, 19 Nov 2020 15:38:11 +0000 (16:38 +0100)]
lima: Fix glFrontFace handling

Bit 12 of render->aux1 is GL_CCW/GL_CW. For GL_CCW (default of glFrontFace) we have
to set that bit active.

This is not what the blob does and what the original reverse engineering documentation
says. The blob sets this value inverted and does some bogus negation of the fragment
shaders gl_FrontFacing variable instead.

Anyway, doing it this way does not cause regressions but fixes
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing and 4 piglit tests.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7690>

3 years agolavapipe: move to new shared features/properties
Dave Airlie [Fri, 24 Sep 2021 02:26:25 +0000 (12:26 +1000)]
lavapipe: move to new shared features/properties

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>

3 years agolavapipe: enable vulkan 1.2 support.
Dave Airlie [Fri, 17 Sep 2021 00:30:09 +0000 (10:30 +1000)]
lavapipe: enable vulkan 1.2 support.

The remaining extensions are optional features, just turn on vk 1.2
with them reporting as off.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>

3 years agogallivm/nir: fix subgroup invocation read.
Dave Airlie [Wed, 22 Sep 2021 06:33:08 +0000 (16:33 +1000)]
gallivm/nir: fix subgroup invocation read.

Again if you get passed an invoc but the exec mask has the
active lane somewhere other than at 0, then if we have an
invoc we should find the active lane and extract the value
from invoc rather than using the idx.

This fixes a bunch of VK 1.2 subgroup tests once 1.2 is enabled:
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_nonconst*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>

3 years agolavapipe: move to 1.2 features/properties structs.
Dave Airlie [Thu, 16 Sep 2021 06:24:29 +0000 (16:24 +1000)]
lavapipe: move to 1.2 features/properties structs.

This just adds all the wrappers in the right places hopefully

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>

3 years agolavapipe: add support for KHR_shader_float_controls
Mike Blumenkrantz [Tue, 6 Jul 2021 19:43:54 +0000 (15:43 -0400)]
lavapipe: add support for KHR_shader_float_controls

These pass all the CTS tests, though not sure how useful they are.

[airlied: these may need some work in the future depending on app expectations]

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>

3 years agofeatures: mark off bindless texture for zink
Mike Blumenkrantz [Mon, 27 Sep 2021 01:25:34 +0000 (21:25 -0400)]
features: mark off bindless texture for zink

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

3 years agozink: export PIPE_CAP_BINDLESS_TEXTURE
Mike Blumenkrantz [Tue, 14 Sep 2021 13:51:01 +0000 (09:51 -0400)]
zink: export PIPE_CAP_BINDLESS_TEXTURE

this is the 6th descriptor set being bound, so don't even advertise it
if 6 sets can't be bound

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: implement bindless textures
Mike Blumenkrantz [Tue, 14 Sep 2021 13:42:31 +0000 (09:42 -0400)]
zink: implement bindless textures

this works by tracking 1024-member arrays of images and textures using idalloc
for indexing. each idalloc id is an index into the array that is returned as a handle,
and this handle is used to index into the array in shaders.

in the driver, VK_EXT_descriptor_indexing features are used to enable updates on the live
bindless descriptor set and leave unused members of the arrays unbound, which works as
long as no member is updated while it is in use. to avoid this, idalloc ids must cycle through
a batch once the image/texture handle is destroyed before being returned to the available pool

in shaders, bindless ops come in one of two types:
- i/o variables
- bindless instructions

for i/o, the image/texture variables have to be rewritten back to the integer
handles which represent them so that the successive shader stage utilizing them
can perform the indexing

for instructions, the src representing the image/texture has to be rewritten as a deref
into the bindless image/texture array

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: hook up VK_EXT_descriptor_indexing
Mike Blumenkrantz [Thu, 31 Dec 2020 14:21:39 +0000 (09:21 -0500)]
zink: hook up VK_EXT_descriptor_indexing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: handle bindless images and samplers in ntv
Mike Blumenkrantz [Tue, 14 Sep 2021 13:36:48 +0000 (09:36 -0400)]
zink: handle bindless images and samplers in ntv

these are going to come through as direct variable derefs, so it's simple
to handle the functionality by reusing the same codepath to generate image
types

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: refactor some shader image code to make it reusable
Mike Blumenkrantz [Tue, 14 Sep 2021 13:33:44 +0000 (09:33 -0400)]
zink: refactor some shader image code to make it reusable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: don't add resource to pending barrier set if no barrier will be generated
Mike Blumenkrantz [Tue, 14 Sep 2021 13:33:04 +0000 (09:33 -0400)]
zink: don't add resource to pending barrier set if no barrier will be generated

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: split out bvci creation from object creation
Mike Blumenkrantz [Fri, 10 Sep 2021 20:29:22 +0000 (16:29 -0400)]
zink: split out bvci creation from object creation

make this reusable like the others

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>

3 years agozink: force lazy descriptor set rebinds if pipeline compatibility changes
Mike Blumenkrantz [Fri, 17 Sep 2021 15:54:09 +0000 (11:54 -0400)]
zink: force lazy descriptor set rebinds if pipeline compatibility changes

if the pipeline layout changes, it's technically illegal to not rebind the descriptor
set even if it hasn't changed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931>

3 years agozink: remove duplicated struct member set
Mike Blumenkrantz [Fri, 17 Sep 2021 18:58:05 +0000 (14:58 -0400)]
zink: remove duplicated struct member set

this should only happen in zink_descriptors_update_lazy_masked

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931>

3 years agoac/surface: correct a comment about DCC image stores
Marek Olšák [Mon, 20 Sep 2021 11:38:24 +0000 (07:38 -0400)]
ac/surface: correct a comment about DCC image stores

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

3 years agoac/surface: use DCC compatible with image stores for < 4K resolutions
Marek Olšák [Thu, 16 Sep 2021 00:38:43 +0000 (20:38 -0400)]
ac/surface: use DCC compatible with image stores for < 4K resolutions

We don't have to use the special DCC settings for lower resolutions.

This will cause corruption if X and an windowed app use different Mesa
versions. The fix is to restart the X server. I expect to get false bug
reports due to this.

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

3 years agoradeonsi: remove the unused cs parameter from remaining packet functions
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from remaining packet functions

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

3 years agoradeonsi: remove the unused cs parameter from radeon_set_uconfig_reg
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_uconfig_reg

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

3 years agoradeonsi: remove the unused cs parameter from radeon_set_sh_reg
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_sh_reg

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

3 years agoradeonsi: remove the unused cs parameter from radeon_set_(config|context)_reg
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_(config|context)_reg

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

3 years agoradeonsi: remove the unused cs parameter from radeon_emit_array
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_emit_array

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

3 years agoradeonsi: remove the unused cs parameter from radeon_emit
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_emit

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

3 years agodocs: mark off GL_EXT_multisampled_render_to_texture for zink
Mike Blumenkrantz [Mon, 20 Sep 2021 13:07:32 +0000 (09:07 -0400)]
docs: mark off GL_EXT_multisampled_render_to_texture for zink

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

3 years agozink: implement GL_EXT_multisampled_render_to_texture
Mike Blumenkrantz [Wed, 15 Sep 2021 19:12:09 +0000 (15:12 -0400)]
zink: implement GL_EXT_multisampled_render_to_texture

this requires allocating and using a lazily-allocated msaa surface as a transient
attachment for the base render operation, resolving it

...except vulkan has no "replicate" renderpass attachment mechanism, so for now we're
just gonna allocate a transient surface and hang on to it. sorry tilers!

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

3 years agozink: stop setting nr_samples for shader image surface creation
Mike Blumenkrantz [Fri, 24 Sep 2021 19:53:44 +0000 (15:53 -0400)]
zink: stop setting nr_samples for shader image surface creation

that's not what this should be used for

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

3 years agozink: move fb attachment init to new function
Mike Blumenkrantz [Fri, 17 Sep 2021 13:12:39 +0000 (09:12 -0400)]
zink: move fb attachment init to new function

this is going to get more complicated

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

3 years agozink: remove fbfetch layout thingy from zs renderpass init
Mike Blumenkrantz [Fri, 17 Sep 2021 13:11:35 +0000 (09:11 -0400)]
zink: remove fbfetch layout thingy from zs renderpass init

zs doesn't do fbfetch

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

3 years agozink: reorder draw state updates
Mike Blumenkrantz [Fri, 17 Sep 2021 12:31:55 +0000 (08:31 -0400)]
zink: reorder draw state updates

starting a renderpass can trigger recursion and other draws, so do all
state updates/binds after the renderpass has begun

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

3 years agozink: improve handling of buffer rebinds using tc info
Mike Blumenkrantz [Thu, 16 Sep 2021 00:27:09 +0000 (20:27 -0400)]
zink: improve handling of buffer rebinds using tc info

tc rebind info can't distinguish between buffers bound multiple times
in a given bind point (e.g., for multiple vertex buffers), so ensure all
rebinds are processed and the global rebind isn't triggered if multiple rebinds
are processed for a given buffer

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

3 years agozink: add ZINK_BIND_TRANSIENT
Mike Blumenkrantz [Wed, 15 Sep 2021 19:10:07 +0000 (15:10 -0400)]
zink: add ZINK_BIND_TRANSIENT

this is used to create lazily allocated images for use as transient
renderpass attachments

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

3 years agozink: add ZINK_HEAP_DEVICE_LOCAL_LAZY
Mike Blumenkrantz [Wed, 15 Sep 2021 19:09:48 +0000 (15:09 -0400)]
zink: add ZINK_HEAP_DEVICE_LOCAL_LAZY

this is for lazily allocated resources

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

3 years agozink: repack zink_render_pass_state
Mike Blumenkrantz [Wed, 15 Sep 2021 15:41:58 +0000 (11:41 -0400)]
zink: repack zink_render_pass_state

saves a couple wasted bits

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

3 years agospirv: don't fail on CapabilitySubgroupDispatch if supported
Lionel Landwerlin [Fri, 24 Sep 2021 14:26:23 +0000 (17:26 +0300)]
spirv: don't fail on CapabilitySubgroupDispatch if supported

Since only Anv uses the value, I'm only enabling this on anv.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 518693c3eca195 ("spirv: Handle the SubgroupSize execution mode")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13034>

3 years agozink: split vk debug logging into separate functions
Mike Blumenkrantz [Fri, 24 Sep 2021 19:29:46 +0000 (15:29 -0400)]
zink: split vk debug logging into separate functions

being able to breakpoint these easily is crucial to debugging, and it sucks to
always have to go back and check the line numbers, so now there's easily-rememberable
functions for it

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13042>

3 years agozink/codegen: do not enable extensions based on vulkan version
Hoe Hao Cheng [Thu, 23 Sep 2021 19:02:46 +0000 (03:02 +0800)]
zink/codegen: do not enable extensions based on vulkan version

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13004>

3 years agoturnip: Swizzle in 0, 1 for D24S8 STENCIL_ASPECT sampling.
Emma Anholt [Fri, 24 Sep 2021 00:26:49 +0000 (17:26 -0700)]
turnip: Swizzle in 0, 1 for D24S8 STENCIL_ASPECT sampling.

This seems to be what is expected by the CTS, but I haven't found a
citation.

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

3 years agozink: enable timeline ext features
Mike Blumenkrantz [Fri, 24 Sep 2021 14:56:08 +0000 (10:56 -0400)]
zink: enable timeline ext features

this is required by spec even though nobody cares

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13033>

3 years agonir/opt_if: add opt_if_rewrite_uniform_uses
Rhys Perry [Wed, 18 Aug 2021 18:08:54 +0000 (19:08 +0100)]
nir/opt_if: add opt_if_rewrite_uniform_uses

Turns:
if (a == (b=readfirstlane(a)))
   use(a)
into:
if (a == (b=readfirstlane(a)))
   use(b)

Improves divergence analysis and lets us scalarize use(a). Improves
Cyberpunk 2077 performance.

fossil-db (Sienna Cichlid, Cyberpunk 2077):
Totals from 57 (10.56% of 540) affected shaders:
VGPRs: 4904 -> 4040 (-17.62%)
CodeSize: 624360 -> 626828 (+0.40%); split: -0.06%, +0.46%
MaxWaves: 656 -> 824 (+25.61%)
Instrs: 119770 -> 119447 (-0.27%); split: -0.49%, +0.22%
Latency: 1950256 -> 1633110 (-16.26%); split: -16.26%, +0.00%
InvThroughput: 364852 -> 292089 (-19.94%)
VClause: 1512 -> 1008 (-33.33%)
SClause: 2693 -> 3196 (+18.68%)
Copies: 10050 -> 9955 (-0.95%); split: -3.34%, +2.40%
Branches: 3476 -> 3547 (+2.04%)
PreSGPRs: 4003 -> 5076 (+26.80%)
PreVGPRs: 4709 -> 3810 (-19.09%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12472>

3 years agonir: add nir_src_components_read()
Rhys Perry [Thu, 19 Aug 2021 13:33:02 +0000 (14:33 +0100)]
nir: add nir_src_components_read()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12472>

3 years agoradv: Reduce NGG culling small draw threshold to 128.
Timur Kristóf [Tue, 14 Sep 2021 17:08:33 +0000 (19:08 +0200)]
radv: Reduce NGG culling small draw threshold to 128.

Many modern games use draw calls with only a few vertices.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12859>

3 years agoradv: Select PC oversubscription rate based on number of PS params.
Timur Kristóf [Tue, 14 Sep 2021 17:06:10 +0000 (19:06 +0200)]
radv: Select PC oversubscription rate based on number of PS params.

Decide the oversubscription rate similarly to how RadeonSI does it:
Oversubscribe a smaller amount of PC (parameter cache) when there are
fewer params.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12859>

3 years agoturnip: Set the VK_DRIVER_ID to our new enum.
Emma Anholt [Thu, 23 Sep 2021 22:13:46 +0000 (15:13 -0700)]
turnip: Set the VK_DRIVER_ID to our new enum.

This hasn't been exposed yet, but would be with vulkan 1.2 or
VK_KHR_driver_properties

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

3 years agovulkan: Update the XML and headers to 1.2.193
Emma Anholt [Thu, 23 Sep 2021 22:12:44 +0000 (15:12 -0700)]
vulkan: Update the XML and headers to 1.2.193

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

3 years agoac/nir/nggc: Don't reuse uniform values from divergent control flow.
Timur Kristóf [Fri, 24 Sep 2021 15:37:45 +0000 (17:37 +0200)]
ac/nir/nggc: Don't reuse uniform values from divergent control flow.

With NGG culling, the shaders are split into two parts:
the top part that computes just the position output,
and the bottom part which produces the other outputs.

To reduce redundancy between the two, I added some code
to reuse uniform variables between them. However, there is
an edge case I didn't think about: because of vertex repacking,
it is possible for the bottom part to process a different vertex.
Therefore it can take a different divergent code path
(though it must still take the same uniform code path).
Due to this, when a uniform value comes from divergent control
flow, this may be undefined in the bottom part.

This commit stops reusing uniform variables from
divergent control flow, to fix issues that arise from this.

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 1723 (1.34% of 128647) affected shaders:
VGPRs: 89312 -> 89184 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 4575 -> 120 (-97.38%)
CodeSize: 10846424 -> 10873836 (+0.25%); split: -0.68%, +0.93%
MaxWaves: 34582 -> 34602 (+0.06%); split: +0.06%, -0.01%
Instrs: 2124471 -> 2128835 (+0.21%); split: -0.51%, +0.72%
Latency: 7274569 -> 7293899 (+0.27%); split: -0.22%, +0.48%
InvThroughput: 1637130 -> 1635490 (-0.10%); split: -0.17%, +0.07%
VClause: 25141 -> 25414 (+1.09%); split: -0.02%, +1.10%
SClause: 56367 -> 59503 (+5.56%); split: -1.36%, +6.93%
Copies: 230704 -> 219313 (-4.94%); split: -5.49%, +0.55%
Branches: 72781 -> 72681 (-0.14%); split: -0.21%, +0.07%
PreSGPRs: 118766 -> 100176 (-15.65%); split: -15.70%, +0.05%
PreVGPRs: 76876 -> 76833 (-0.06%)

Fixes: 0bb543bb60f93bea5b1c0ed6382ced49e659273e
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001>

3 years agoac/nir/nggc: Refactor save_reusable_variables.
Timur Kristóf [Fri, 24 Sep 2021 15:23:17 +0000 (17:23 +0200)]
ac/nir/nggc: Refactor save_reusable_variables.

This makes the code more elegant and also fixes the mistake of
skipping the blocks that come before loops.

Fossil DB changes on Sienna Cichlid with NGGC on:

Totals from 1026 (0.80% of 128647) affected shaders:
SpillSGPRs: 3817 -> 4035 (+5.71%)
CodeSize: 5582856 -> 5538732 (-0.79%); split: -0.89%, +0.10%
Instrs: 1106907 -> 1100180 (-0.61%); split: -0.68%, +0.07%
Latency: 10084948 -> 10052197 (-0.32%); split: -0.37%, +0.05%
InvThroughput: 1567012 -> 1564949 (-0.13%); split: -0.16%, +0.03%
SClause: 39789 -> 39075 (-1.79%); split: -2.33%, +0.54%
Copies: 95184 -> 96456 (+1.34%); split: -0.19%, +1.53%
Branches: 44087 -> 44093 (+0.01%); split: -0.01%, +0.02%
PreSGPRs: 47584 -> 51009 (+7.20%); split: -0.61%, +7.80%

Fixes: 0bb543bb60f93bea5b1c0ed6382ced49e659273e
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001>

3 years agoradv/llvm: stop using vs_common_out.export_prim_id
Samuel Pitoiset [Fri, 24 Sep 2021 12:17:49 +0000 (14:17 +0200)]
radv/llvm: stop using vs_common_out.export_prim_id

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028>

3 years agoradv,aco: stop using vs_common_out.export_clip_dists
Samuel Pitoiset [Fri, 24 Sep 2021 12:10:39 +0000 (14:10 +0200)]
radv,aco: stop using vs_common_out.export_clip_dists

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028>

3 years agoradv: add export_clip_dists for VS and TES to radv_shader_info
Samuel Pitoiset [Fri, 24 Sep 2021 11:55:10 +0000 (13:55 +0200)]
radv: add export_clip_dists for VS and TES to radv_shader_info

To be able to remove radv_vs_out_key entirely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028>

3 years agoradv: Fix gs_vgpr_comp_cnt for NGG culling in vertex shaders.
Timur Kristóf [Fri, 24 Sep 2021 13:54:03 +0000 (15:54 +0200)]
radv: Fix gs_vgpr_comp_cnt for NGG culling in vertex shaders.

Previously these shaders always took the path to gs_vgpr_comp_cnt=3,
but now they are 0 when they don't use primitive id.

Fixes: 7ad69e2f7ee10c0e7afc302b9324e7a320424dcb
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13031>

3 years agonir/lower_io_to_vector: Allow Task/Mesh to load from outputs
Caio Marcelo de Oliveira Filho [Fri, 13 Aug 2021 19:22:52 +0000 (12:22 -0700)]
nir/lower_io_to_vector: Allow Task/Mesh to load from outputs

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12951>

3 years agoradv/llvm: stop using vs_common_out.as_ngg_passthrough
Samuel Pitoiset [Fri, 24 Sep 2021 10:06:44 +0000 (12:06 +0200)]
radv/llvm: stop using vs_common_out.as_ngg_passthrough

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13025>

3 years agoradv: remove useless as_ngg_passthrough init when lowering NGG in NIR
Samuel Pitoiset [Fri, 24 Sep 2021 10:04:36 +0000 (12:04 +0200)]
radv: remove useless as_ngg_passthrough init when lowering NGG in NIR

Nothing reads the value after that, except LLVM but we don't lower it
in NIR (yet).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13025>

3 years agoclc: use the defined version for the parser
Lionel Landwerlin [Fri, 24 Sep 2021 07:55:05 +0000 (10:55 +0300)]
clc: use the defined version for the parser

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018>

3 years agomicrosoft/clc: small compile fix on Linux
Lionel Landwerlin [Fri, 24 Sep 2021 08:11:22 +0000 (11:11 +0300)]
microsoft/clc: small compile fix on Linux

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018>

3 years agoradv: stop using the shader keys for as_ls/as_es/as_ngg when possible
Samuel Pitoiset [Fri, 24 Sep 2021 09:17:40 +0000 (11:17 +0200)]
radv: stop using the shader keys for as_ls/as_es/as_ngg when possible

radv_shader_info should be initialized correctly at this point.
There is still few occurences earlier in the pipeline but they aren't
easy to remove right now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13023>

3 years agopanfrost: Fix incorrect test condition
Alyssa Rosenzweig [Thu, 23 Sep 2021 20:53:47 +0000 (16:53 -0400)]
panfrost: Fix incorrect test condition

Oh, the irony. I linked to this file in a software design class as an
example of how unit testing works under the hood, since it's not using
any particular testing framework. In doing so I realized the test is
totally broken. It doesn't matter -- the tests passed before, pass now,
and the code being tested is correct. But let's still fix the
embarassing logic error for future Panfrost hackers.

Fixes: d42e53c77a2 ("panfrost: Unit test clear colour packing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13006>

3 years agoaco/tests: add idep_amdgfxregs_h
Rhys Perry [Thu, 22 Jul 2021 10:13:31 +0000 (11:13 +0100)]
aco/tests: add idep_amdgfxregs_h

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 9bf30c4a5cb ("aco/tests: add tests for form_hard_clauses()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12017>

3 years agoradv: remove unused radv_tcs_variant_key:primitive_mode
Samuel Pitoiset [Fri, 24 Sep 2021 09:19:58 +0000 (11:19 +0200)]
radv: remove unused radv_tcs_variant_key:primitive_mode

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13022>

3 years agobroadcom/compiler: remove qpu_acc helper
Alejandro Piñeiro [Mon, 13 Sep 2021 23:15:58 +0000 (01:15 +0200)]
broadcom/compiler: remove qpu_acc helper

It is really small, and used just twice, so we just call qpu_magic.

We also update how it is used:

  * QFILE_NULL is an undef so we can just load anything. Previously we
    were using accumulator 0, but there isn't any real reason to use
    an accumulator for this. Using reg 0.

  * QFILE_LOAD_IMM: it seems that we don't use at all right now, so
    let's add an assert

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>

3 years agobroadcom/compiler: remove commented out vir_LOAD_IMM methods
Alejandro Piñeiro [Wed, 22 Sep 2021 23:13:13 +0000 (01:13 +0200)]
broadcom/compiler: remove commented out vir_LOAD_IMM methods

It has been commented several years now. Let's remove it to reduce the
noise.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>

3 years agoradv: stop loading invocation ID for NGG vertex shaders
Samuel Pitoiset [Thu, 23 Sep 2021 10:40:57 +0000 (12:40 +0200)]
radv: stop loading invocation ID for NGG vertex shaders

This is unnecessary and was copied from RadeonSI which needs it for
edge flags. RADV should never to read the invocation ID for VS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12997>

3 years agoradv: Remove dead min waves code.
Georg Lehmann [Thu, 23 Sep 2021 20:31:26 +0000 (22:31 +0200)]
radv: Remove dead min waves code.

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

3 years agolavapipe/ci: drop some fails I fixed recently
Dave Airlie [Fri, 24 Sep 2021 02:53:03 +0000 (12:53 +1000)]
lavapipe/ci: drop some fails I fixed recently

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13011>