platform/upstream/mesa.git
2 years agozink: introduce copy contexts
Mike Blumenkrantz [Fri, 29 Apr 2022 11:41:32 +0000 (07:41 -0400)]
zink: introduce copy contexts

this is for creating a context which is only used for copying images

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

2 years agozink: break out resource bind-adding into separate function for reuse
Mike Blumenkrantz [Fri, 29 Apr 2022 11:41:02 +0000 (07:41 -0400)]
zink: break out resource bind-adding into separate function for reuse

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

2 years agozink: add a flag to indicate whether a resource is exportable
Mike Blumenkrantz [Fri, 29 Apr 2022 11:40:44 +0000 (07:40 -0400)]
zink: add a flag to indicate whether a resource is exportable

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

2 years agozink: outdent some code
Mike Blumenkrantz [Fri, 29 Apr 2022 11:34:33 +0000 (07:34 -0400)]
zink: outdent some code

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

2 years agozink: remove unused headers/struct members/linkage
Mike Blumenkrantz [Fri, 29 Apr 2022 11:26:09 +0000 (07:26 -0400)]
zink: remove unused headers/struct members/linkage

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

2 years agoglsl: Fix ir_quadop_vector validation
Michael Skorokhodov [Tue, 10 May 2022 07:48:53 +0000 (10:48 +0300)]
glsl: Fix ir_quadop_vector validation

Some glcts tests have failed due to incorrect processing of `ir_quadop_vector` in
`ir_validation`. e.g:
`GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_geometry`

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6461
Fixes: 23cde71b ("glsl: Stop lowering ir_quadop_vector.")

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16420>

2 years agoradv: fix memory leak of descriptor set layout
Benjamin Cheng [Mon, 4 Apr 2022 04:35:19 +0000 (00:35 -0400)]
radv: fix memory leak of descriptor set layout

We need to be able to track the descriptor sets explicity to unref the
descriptor sets, otherwise these descriptor sets will not unref the
descriptor set layout it holds.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6222
Fixes: 66f7289d568
("radv: add reference counting for descriptor set layouts")

Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15741>

2 years agokopper: remove unused zink include
Mike Blumenkrantz [Tue, 10 May 2022 19:32:20 +0000 (15:32 -0400)]
kopper: remove unused zink include

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

2 years agoradv: call nir_lower_vars_to_ssa later
Daniel Schürmann [Tue, 4 Jan 2022 09:59:07 +0000 (09:59 +0000)]
radv: call nir_lower_vars_to_ssa later

Totals from 599 (0.44% of 134913) affected shaders: (GFX10.3)
CodeSize: 1243732 -> 1240512 (-0.26%); split: -0.26%, +0.00%
Instrs: 223370 -> 222702 (-0.30%); split: -0.30%, +0.00%
Latency: 901762 -> 885446 (-1.81%); split: -1.81%, +0.00%
InvThroughput: 305546 -> 305536 (-0.00%)
SClause: 12690 -> 12554 (-1.07%); split: -1.13%, +0.06%
Copies: 23779 -> 23778 (-0.00%)
PreSGPRs: 17781 -> 17829 (+0.27%)

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

2 years agoradv: move two NIR passes out of tight optimization loop
Daniel Schürmann [Wed, 24 Jun 2020 15:22:54 +0000 (16:22 +0100)]
radv: move two NIR passes out of tight optimization loop

nir_remove_dead_variables
nir_opt_shrink_vectors

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

2 years agoanv: re-alloc push constants after secondary command buffers
Iván Briano [Tue, 10 May 2022 01:30:20 +0000 (18:30 -0700)]
anv: re-alloc push constants after secondary command buffers

If the secondary command buffer executed used push constants on a
different set of stages than the primary is using, we may end up not
reallocating them for the primary, getting misrender artifacts at best,
or a nice GPU hang at worst.

Fixes the tests from a CTS from the future:
dEQP-VK.dynamic_rendering.random.*

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16439>

2 years agodri: Remove what's left of utils.[ch]
Adam Jackson [Fri, 6 May 2022 19:31:26 +0000 (15:31 -0400)]
dri: Remove what's left of utils.[ch]

Which is just moving the struct definition for __DRIconfigRec into
dri_util.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agodri: Move dri{Get,Index}ConfigAttrib near their vtable
Adam Jackson [Fri, 6 May 2022 19:21:53 +0000 (15:21 -0400)]
dri: Move dri{Get,Index}ConfigAttrib near their vtable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agodri: Move driC{reate,oncat}Configs near their only caller
Adam Jackson [Fri, 6 May 2022 19:15:58 +0000 (15:15 -0400)]
dri: Move driC{reate,oncat}Configs near their only caller

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agodri: move driQueryRendererIntegerCommon near its one caller
Adam Jackson [Fri, 6 May 2022 18:11:04 +0000 (14:11 -0400)]
dri: move driQueryRendererIntegerCommon near its one caller

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agodri: Move driCopySubBufferExtension into drisw
Adam Jackson [Fri, 6 May 2022 14:49:04 +0000 (10:49 -0400)]
dri: Move driCopySubBufferExtension into drisw

drisw is the only consumer so rename things to make it a bit more
obvious.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agodri: Inline dri2InvalidateDrawable into its one caller
Adam Jackson [Thu, 5 May 2022 20:52:07 +0000 (16:52 -0400)]
dri: Inline dri2InvalidateDrawable into its one caller

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>

2 years agosvga/nir: enable lower double option
Charmaine Lee [Mon, 9 May 2022 06:42:41 +0000 (23:42 -0700)]
svga/nir: enable lower double option

There is no translation support for dfloor, mod, and pow
in svga_tgsi_vgpu10, just enable the lowering passes in the
nir compile option.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16412>

2 years agosvga/tgsi: add translation for DTRUNC
Charmaine Lee [Fri, 6 May 2022 21:45:55 +0000 (14:45 -0700)]
svga/tgsi: add translation for DTRUNC

DTRUNC is not lowered in glsl-nir-tgsi path. Add the translation
in svga_tgsi_vgpu10().

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16412>

2 years agosvga: enable PIPE_CAP_TGSI_TEXCOORD for vgpu10 and up
Charmaine Lee [Tue, 10 May 2022 16:34:57 +0000 (09:34 -0700)]
svga: enable PIPE_CAP_TGSI_TEXCOORD for vgpu10 and up

Revise commit 0d456315f95 to enable PIPE_CAP_TGSI_TEXCOORD for
vgpu10 and up only.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16434>

2 years agozink: ci updates
Mike Blumenkrantz [Tue, 10 May 2022 17:17:59 +0000 (13:17 -0400)]
zink: ci updates

I don't know how !16167 made this pass, but no driver seems to be able to
pass this test, so ignore

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

2 years agodocs: EXT_robustness2 for lavapipe
Mike Blumenkrantz [Tue, 10 May 2022 03:37:34 +0000 (23:37 -0400)]
docs: EXT_robustness2 for lavapipe

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

2 years agolavapipe: ci updates
Mike Blumenkrantz [Tue, 26 Apr 2022 13:48:57 +0000 (09:48 -0400)]
lavapipe: ci updates

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

2 years agolavapipe: set robustBufferAccess2 and robustImageAccess2
Mike Blumenkrantz [Sat, 23 Apr 2022 15:42:34 +0000 (11:42 -0400)]
lavapipe: set robustBufferAccess2 and robustImageAccess2

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

2 years agogallivm: fix oob txf swizzling
Mike Blumenkrantz [Sat, 23 Apr 2022 15:40:48 +0000 (11:40 -0400)]
gallivm: fix oob txf swizzling

this wasn't taking into account the format swizzle, returning broken
alpha values in most cases

Fixes: 0b6554ba6f2 ("gallivm,llvmpipe: handle TXF (texelFetch) instruction, including offsets")

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

2 years agolavapipe: add support for null-descriptors from EXT_robustness2
Erik Faye-Lund [Wed, 21 Apr 2021 09:12:35 +0000 (11:12 +0200)]
lavapipe: add support for null-descriptors from EXT_robustness2

Mike says this should be enough for full support, so let's see ;)

Nope, no robust image or buffer access implemented yet.

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

2 years agollvmpipe: always set ssbo data pointers for draw
Mike Blumenkrantz [Sat, 23 Apr 2022 13:39:06 +0000 (09:39 -0400)]
llvmpipe: always set ssbo data pointers for draw

skipping these would lead to reading the previously-set data if
a null buffer was set after a valid buffer

cc: mesa-stable

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

2 years agogallivm/draw: fix oob ubo reads
Mike Blumenkrantz [Fri, 22 Apr 2022 18:47:38 +0000 (14:47 -0400)]
gallivm/draw: fix oob ubo reads

the first case in gallivm did no checking, so this was always going to be
broken, so instead just copy the now-correct ssbo logic

cc: mesa-stable

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

2 years agost/draw_feedback: set constant buffer stride
Mike Blumenkrantz [Tue, 26 Apr 2022 14:23:36 +0000 (10:23 -0400)]
st/draw_feedback: set constant buffer stride

these shaders all do float-based reads, so using vec4 for robustness
checks breaks gallivm

cc: mesa-stable

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

2 years agolavapipe: fix CmdPushDescriptorSetWithTemplateKHR with refcounting
Mike Blumenkrantz [Fri, 22 Apr 2022 18:16:42 +0000 (14:16 -0400)]
lavapipe: fix CmdPushDescriptorSetWithTemplateKHR with refcounting

this is a cmdbuf function, which means it gets enqueued, which means
the template can't be destroyed until the cmdbuf has finished using it

cc: mesa-stable

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

2 years agogallivm: fix ssbo oob reads
Mike Blumenkrantz [Fri, 22 Apr 2022 17:52:22 +0000 (13:52 -0400)]
gallivm: fix ssbo oob reads

this was checking (offset < size) when really it needs to be
(offset < size && extent < size && offset >= 0)

Fixes: 591899eedd2 ("gallivm/nir: Add a short circuit uniform-offset mode for load_ssbo/load_shared.")

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

2 years agolavapipe: handle null samplerviews
Mike Blumenkrantz [Sat, 23 Apr 2022 15:42:57 +0000 (11:42 -0400)]
lavapipe: handle null samplerviews

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

2 years agolavapipe: tolerate NULL sampler-buffer view descriptors
Erik Faye-Lund [Wed, 14 Jul 2021 08:17:41 +0000 (10:17 +0200)]
lavapipe: tolerate NULL sampler-buffer view descriptors

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

2 years agolavapipe: tolerate NULL image-buffer view descriptors
Erik Faye-Lund [Mon, 26 Apr 2021 15:11:01 +0000 (17:11 +0200)]
lavapipe: tolerate NULL image-buffer view descriptors

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

2 years agolavapipe: tolerate NULL image view descriptors
Erik Faye-Lund [Mon, 26 Apr 2021 15:10:36 +0000 (17:10 +0200)]
lavapipe: tolerate NULL image view descriptors

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

2 years agolavapipe: tolerate NULL UBO and SSBO descriptors
Erik Faye-Lund [Mon, 26 Apr 2021 14:44:27 +0000 (16:44 +0200)]
lavapipe: tolerate NULL UBO and SSBO descriptors

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

2 years agonir/opt_algebraic: Simple xor/ishr optimizations.
Georg Lehmann [Mon, 9 May 2022 09:52:26 +0000 (11:52 +0200)]
nir/opt_algebraic: Simple xor/ishr optimizations.

The first pattern here removes the xor-swap pattern.

Foz-DB GFX10_3:
Totals from 305 (0.23% of 134913) affected shaders:
CodeSize: 1589040 -> 1585164 (-0.24%)
Instrs: 284344 -> 283375 (-0.34%)
Latency: 4205148 -> 4198472 (-0.16%); split: -0.16%, +0.00%
InvThroughput: 708745 -> 708739 (-0.00%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16411>

2 years agonir/opt_algebraic: Fix mask in shift by constant combining.
Georg Lehmann [Sat, 16 Apr 2022 11:36:17 +0000 (13:36 +0200)]
nir/opt_algebraic: Fix mask in shift by constant combining.

The comment above is correct, but the code to calculate the mask was broken.

No Foz-db changes outside of noise.

Fixes: 0e6581b87dc ("nir/algebraic: Reassociate shift-by-constant of shift-by-constant")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15990>

2 years agoradv/amdgpu: Use scheduled dependency for submitting to multiple queues.
Timur Kristóf [Fri, 1 Apr 2022 15:55:28 +0000 (17:55 +0200)]
radv/amdgpu: Use scheduled dependency for submitting to multiple queues.

This code path will be used on kernels that don't have the
"gang submit" feature in amdgpu yet.

It does each submission separately, and uses scheduled dependencies
to connect them.

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

2 years agoradv/amdgpu: Pass correct struct type instead of repeating the cast.
Timur Kristóf [Tue, 10 May 2022 10:47:46 +0000 (12:47 +0200)]
radv/amdgpu: Pass correct struct type instead of repeating the cast.

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/16361>

2 years agoradv/amdgpu: Pass new queue submit info structure to internal function.
Timur Kristóf [Thu, 5 May 2022 19:51:44 +0000 (21:51 +0200)]
radv/amdgpu: Pass new queue submit info structure to internal function.

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

2 years agoradv/amdgpu: Initialize semaphore info with a designated initializer.
Timur Kristóf [Thu, 5 May 2022 19:50:44 +0000 (21:50 +0200)]
radv/amdgpu: Initialize semaphore info with a designated initializer.

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

2 years agoradv/amdgpu: Group queue submit info into a structure.
Timur Kristóf [Thu, 5 May 2022 19:43:09 +0000 (21:43 +0200)]
radv/amdgpu: Group queue submit info into a structure.

This prepares RADV for submitting to multiple queues at the same time.

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

2 years agoac/llvm: Remove now-superfluous intrinsics and ABI callbacks.
Timur Kristóf [Wed, 23 Mar 2022 18:25:38 +0000 (19:25 +0100)]
ac/llvm: Remove now-superfluous intrinsics and ABI callbacks.

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/13155>

2 years agoaco: Remove now-superfluous intrinsics.
Timur Kristóf [Wed, 23 Mar 2022 18:20:47 +0000 (19:20 +0100)]
aco: Remove now-superfluous intrinsics.

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/13155>

2 years agoac/nir: Remove now-superfluous ac_nir_lower_tess_to_const.
Timur Kristóf [Wed, 23 Mar 2022 18:13:20 +0000 (19:13 +0100)]
ac/nir: Remove now-superfluous ac_nir_lower_tess_to_const.

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/13155>

2 years agoradv: Lower ABI in NIR for tess/ESGS/NGG shader arguments.
Timur Kristóf [Wed, 16 Mar 2022 11:39:47 +0000 (12:39 +0100)]
radv: Lower ABI in NIR for tess/ESGS/NGG shader arguments.

Totals from 58720 (45.64% of 128653) affected shaders:
VGPRs: 2056576 -> 2056568 (-0.00%)
CodeSize: 153906488 -> 154609536 (+0.46%); split: -0.00%, +0.46%
MaxWaves: 1665056 -> 1665058 (+0.00%)
Instrs: 29242117 -> 29417265 (+0.60%); split: -0.00%, +0.60%
Latency: 134149608 -> 134238738 (+0.07%); split: -0.00%, +0.07%
InvThroughput: 20348833 -> 20349641 (+0.00%); split: -0.00%, +0.00%
VClause: 489376 -> 489385 (+0.00%)
SClause: 729383 -> 729382 (-0.00%)
Copies: 2672567 -> 2673132 (+0.02%); split: -0.00%, +0.02%
Branches: 1192117 -> 1192121 (+0.00%); split: -0.00%, +0.00%

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/13155>

2 years agonir: Add upper bound for AMD shader arg intrinsics.
Timur Kristóf [Wed, 23 Mar 2022 17:44:57 +0000 (18:44 +0100)]
nir: Add upper bound for AMD shader arg intrinsics.

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/13155>

2 years agoradv: Move radv_nggc_settings enum out of radv_cmd_buffer.
Timur Kristóf [Fri, 1 Oct 2021 11:19:27 +0000 (13:19 +0200)]
radv: Move radv_nggc_settings enum out of radv_cmd_buffer.

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/13155>

2 years agoac/nir: Add ac_nir_load_arg helper for shader arguments.
Timur Kristóf [Wed, 29 Sep 2021 16:25:03 +0000 (18:25 +0200)]
ac/nir: Add ac_nir_load_arg helper for shader arguments.

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/13155>

2 years agogallium: Bump PIPE_MAX_SHADER_IMAGES to 64
Jason Ekstrand [Fri, 15 Apr 2022 22:14:26 +0000 (17:14 -0500)]
gallium: Bump PIPE_MAX_SHADER_IMAGES to 64

This is required by OpenCL

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

2 years agomesa/st: Clamp MaxImageUniforms to MAX_IMAGE_UNIFORMS
Jason Ekstrand [Mon, 18 Apr 2022 17:26:40 +0000 (12:26 -0500)]
mesa/st: Clamp MaxImageUniforms to MAX_IMAGE_UNIFORMS

We're about to bump PIPE_MAX_SHADER_IMAGES to 64 and don't want to
overflow any state tracker arrays for GL.

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

2 years agogallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers
Jason Ekstrand [Mon, 18 Apr 2022 17:03:35 +0000 (12:03 -0500)]
gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers

Sampler views and samplers may not be the same limit; in fact one is 32
while the other is 128.  The sampler_buffers field is tracking sampler
views (yes, naming is confusing) so we should use the right limit.

Fixes: e9c41b321488 ("gallium/u_threaded: add buffer lists - tracking of buffers referenced by tc")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988>

2 years agoshader_info: Bump the number of images and textures supported
Jason Ekstrand [Fri, 15 Apr 2022 21:35:41 +0000 (16:35 -0500)]
shader_info: Bump the number of images and textures supported

OpenCL requires up to 128 read-only images and up to 64 write images.

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

2 years agoutil/bitset: Support larger ranges in BITSET_TEST/CLEAR_RANGE
Jason Ekstrand [Fri, 15 Apr 2022 21:44:47 +0000 (16:44 -0500)]
util/bitset: Support larger ranges in BITSET_TEST/CLEAR_RANGE

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

2 years agonir: Gather samplers_used separately from textures
Jason Ekstrand [Fri, 15 Apr 2022 21:16:03 +0000 (16:16 -0500)]
nir: Gather samplers_used separately from textures

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

2 years agoshader_info: Make images_used a bitset
Jason Ekstrand [Fri, 15 Apr 2022 20:32:29 +0000 (15:32 -0500)]
shader_info: Make images_used a bitset

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

2 years agonir: Stop assuming shader_info::textures_used is 32-bit
Jason Ekstrand [Fri, 15 Apr 2022 20:52:54 +0000 (15:52 -0500)]
nir: Stop assuming shader_info::textures_used is 32-bit

This isn't a hot path.  We don't need to be manually using the
INSIDE_WORD version which will assert if we ever get a bigger texture
index.

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

2 years agonir: Set image_buffers and msaa_images in lower_samplers_as_deref
Jason Ekstrand [Fri, 15 Apr 2022 20:40:13 +0000 (15:40 -0500)]
nir: Set image_buffers and msaa_images in lower_samplers_as_deref

This is where we set images_used so it's less likely that things will
accidentally get out-of-sync.

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

2 years agopan/mdg: Fix multiple spilt writes in the same bundle
Icecream95 [Fri, 10 Dec 2021 10:51:06 +0000 (23:51 +1300)]
pan/mdg: Fix multiple spilt writes in the same bundle

If two instructions in a single bundle both write to a spilt
destination, then we need to reuse the fill and spill instructions,
otherwise the value will be overwritten.

This and the rest of this set of Midgard bug fixes were found from a
vertex shader in Firefox WebRender that is used when a video is
clipped, for example by setting the border-radius CSS property.

CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16382>

2 years agopan/mdg: Return the instruction from mir_insert_instruction_*_scheduled
Icecream95 [Fri, 10 Dec 2021 10:50:00 +0000 (23:50 +1300)]
pan/mdg: Return the instruction from mir_insert_instruction_*_scheduled

We can't return a pointer to the bundle itself because it might move
about in memory.

CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16382>

2 years agopan/mdg: Fix disassembly of store instructions
Icecream95 [Fri, 10 Dec 2021 10:46:37 +0000 (23:46 +1300)]
pan/mdg: Fix disassembly of store instructions

The mask does apply for store instructions, so pass it onto
print_vec_swizzle after converting it to the right format.

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

2 years agopan/mdg: Fix mask usage when filling before a spill
Icecream95 [Fri, 10 Dec 2021 10:40:01 +0000 (23:40 +1300)]
pan/mdg: Fix mask usage when filling before a spill

Check the bytemask against 0xFFFF rather than 0xF so that the fill is
skipped for a .xyzw write rather than a .x write.

Set the mask on the store to 0xF when doing a read so that all
components are written back.

Fixes: 31d26ebf1b9 ("pan/mdg: Fill from TLS before spilling non-SSA nodes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16382>

2 years agopan/mdg: Use MAX2 to set min_alignment
Icecream95 [Fri, 10 Dec 2021 10:44:25 +0000 (23:44 +1300)]
pan/mdg: Use MAX2 to set min_alignment

If a value is written in a vector CSEL but then written again by other
instructions, it still needs full alignment, so set min_alignment
using MAX2 to avoid ever reducing it.

Fixes: 1798f6bfc33 ("pan/midgard: Fix masks/alignment for 64-bit loads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16382>

2 years agopan/mdg: Keep min_bound at 16 when alignment requires it
Icecream95 [Mon, 9 May 2022 22:40:49 +0000 (10:40 +1200)]
pan/mdg: Keep min_bound at 16 when alignment requires it

Otherwise LCRA will try to divide by zero when calculating m_max.

Fixes: 553c2cf16b7 ("pan/mdg: Set RA bounds for fp16")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16382>

2 years agou_threaded: clear non-async debug callback correctly
Pierre-Eric Pelloux-Prayer [Tue, 3 May 2022 13:34:38 +0000 (15:34 +0200)]
u_threaded: clear non-async debug callback correctly

The following sequence:

   glEnable(GL_DEBUG_OUTPUT_KHR);
   glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR);
   glDebugMessageCallbackKHR(my_callback, NULL);

Will cause the 2nd call to be ignored - but since the callback
function used by _mesa_update_debug_callback is always the
same (_debug_message), this means we'll keep using it, causing
"my_callback" to be called from driver-internal threads.

So instead of skipping the 2nd call, make sure we pass the
information to the driver.

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

2 years agoci: add ACO_DEBUG to the list of variables to pass down for testing
Martin Roukala (né Peres) [Mon, 2 May 2022 13:33:35 +0000 (16:33 +0300)]
ci: add ACO_DEBUG to the list of variables to pass down for testing

This parameter is used by radv-ci to perform extra validation while
running VKCTS.

This change catches more issues, which are will be addressed in !16248:
 - dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_i8vec2,Crash
 - dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_u8vec2,Crash

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16277>

2 years agoradeonsi/tests: reformat with black
Pierre-Eric Pelloux-Prayer [Thu, 5 May 2022 15:02:37 +0000 (17:02 +0200)]
radeonsi/tests: reformat with black

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

2 years agoradeonsi/tests: add a heuristic to pick the baseline
Pierre-Eric Pelloux-Prayer [Thu, 5 May 2022 13:48:29 +0000 (15:48 +0200)]
radeonsi/tests: add a heuristic to pick the baseline

When the baseline for the exact GPU tested isn't available,
try to make a reasonnable guess: look for another baseline
from a GPU in the same class.

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

2 years agoradeonsi/tests: allow empty line and comments in csv files
Pierre-Eric Pelloux-Prayer [Thu, 21 Apr 2022 14:50:39 +0000 (16:50 +0200)]
radeonsi/tests: allow empty line and comments in csv files

This will help describe why tests are failing.

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

2 years agonir/divergence: handle more *_intel intrinsics
Jordan Justen [Thu, 21 Apr 2022 09:48:58 +0000 (02:48 -0700)]
nir/divergence: handle more *_intel intrinsics

v2: fix topo/btd (Lionel)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16421>

2 years agoradv: Only emit what is appropriate to the queue family for preambles.
Timur Kristóf [Thu, 5 May 2022 18:50:11 +0000 (20:50 +0200)]
radv: Only emit what is appropriate to the queue family for preambles.

This makes the function easier to read and follow.
Also prepares for some future changes when we'll want to
submit to multiple queues at once.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Don't use pointers to pointers when updating the preambles.
Timur Kristóf [Thu, 5 May 2022 18:40:13 +0000 (20:40 +0200)]
radv: Don't use pointers to pointers when updating the preambles.

Instead, just use the pointers from the queue structure.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Rename fill_geom_tess_rings to radv_fill_shader_rings.
Timur Kristóf [Thu, 5 May 2022 18:16:30 +0000 (20:16 +0200)]
radv: Rename fill_geom_tess_rings to radv_fill_shader_rings.

This function already handles more than just the geometry and tess
rings, and it will include more things in the future, such as
the task shader rings.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Don't create continue preamble when it's not needed.
Timur Kristóf [Thu, 5 May 2022 18:09:27 +0000 (20:09 +0200)]
radv: Don't create continue preamble when it's not needed.

Previously we would always create it, but would return NULL when
it wasn't needed. Now, don't create it when not needed.

Additionally, don't create the continue preamble when we can use
IB BOs, because then we never use a continue preamble.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Refactor cache flush code for the initial preambles.
Timur Kristóf [Thu, 5 May 2022 18:04:46 +0000 (20:04 +0200)]
radv: Refactor cache flush code for the initial preambles.

The "initial" and "initial full flush" preambles both need a
cache flush with a slight difference. Improve the readability of
this code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Initialize BO pointers when creating preambles.
Timur Kristóf [Thu, 5 May 2022 17:17:42 +0000 (19:17 +0200)]
radv: Initialize BO pointers when creating preambles.

This aims to improve the readability of this function.

Initialize the BO pointers to the queue's current pointers
at the beginning instead of in the else branches later.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Simplify some boolean code in radv_get_preamble_cs.
Timur Kristóf [Thu, 5 May 2022 16:58:34 +0000 (18:58 +0200)]
radv: Simplify some boolean code in radv_get_preamble_cs.

Hopefully this will make it easier to read and understand.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Move up early exit for transfer queues in radv_get_preamble_cs.
Timur Kristóf [Thu, 5 May 2022 16:58:01 +0000 (18:58 +0200)]
radv: Move up early exit for transfer queues in radv_get_preamble_cs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Move normal (non-empty) queue submit to a separate function.
Timur Kristóf [Thu, 5 May 2022 16:37:20 +0000 (18:37 +0200)]
radv: Move normal (non-empty) queue submit to a separate function.

Also move the preamble update into this function, as that is only needed
by this code path and not needed for empty submits.

With this change, the goal is to make radv_queue_submit easier to
read and understand. This prepares it for future work when we'll
add the capability to submit to multiple queues at the same time.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Move empty queue submit code path to a separate function.
Timur Kristóf [Thu, 5 May 2022 14:02:21 +0000 (16:02 +0200)]
radv: Move empty queue submit code path to a separate function.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Move queue submit sparse bindings to a separate function.
Timur Kristóf [Thu, 5 May 2022 13:11:23 +0000 (15:11 +0200)]
radv: Move queue submit sparse bindings to a separate function.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agoradv: Minor formatting fix in radv_device.c file.
Timur Kristóf [Thu, 5 May 2022 17:50:10 +0000 (19:50 +0200)]
radv: Minor formatting fix in radv_device.c file.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16358>

2 years agov3dv: drop unsused struct
Iago Toral Quiroga [Tue, 10 May 2022 06:04:24 +0000 (08:04 +0200)]
v3dv: drop unsused struct

This is no longer needed since we ported to using the common sync
framework.

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

2 years agoac/gpu_info: fix incorrect IP versions reported by the kernel
Marek Olšák [Thu, 5 May 2022 19:56:46 +0000 (15:56 -0400)]
ac/gpu_info: fix incorrect IP versions reported by the kernel

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoac/gpu_info: print all IP versions reported by the kernel
Marek Olšák [Thu, 5 May 2022 19:14:55 +0000 (15:14 -0400)]
ac/gpu_info: print all IP versions reported by the kernel

It's incorrect for GFX. This is what I get on Radeon 6800:

    IP GFX  10.0  queues:1
    IP COMP 10.0  queues:4
    IP SDMA  5.2  queues:2
    IP VCN_DEC  3.0  queues:1
    IP VCN_ENC  3.0  queues:1
    IP VCN_JPG  3.0  queues:1

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoac/gpu_info: remove dead GDS query code
Marek Olšák [Thu, 5 May 2022 18:41:06 +0000 (14:41 -0400)]
ac/gpu_info: remove dead GDS query code

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoac/gpu_info: simplify HW IP querying
Marek Olšák [Thu, 5 May 2022 18:26:05 +0000 (14:26 -0400)]
ac/gpu_info: simplify HW IP querying

Use a loop, don't check the DRM versions, and handle failures as
unsupported.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoamd: replace num_rings[type] with ip[type].num_queues
Marek Olšák [Thu, 5 May 2022 17:57:49 +0000 (13:57 -0400)]
amd: replace num_rings[type] with ip[type].num_queues

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoamd: rename RING_* enums to AMD_IP_*
Marek Olšák [Thu, 5 May 2022 17:49:29 +0000 (13:49 -0400)]
amd: rename RING_* enums to AMD_IP_*

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agoamd: rename ring_type --> amd_ip_type and match the kernel enum values
Marek Olšák [Thu, 5 May 2022 17:41:37 +0000 (13:41 -0400)]
amd: rename ring_type --> amd_ip_type and match the kernel enum values

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16360>

2 years agozink: use descriptor surfaces for notemplates ref updating
Mike Blumenkrantz [Tue, 26 Apr 2022 15:36:23 +0000 (11:36 -0400)]
zink: use descriptor surfaces for notemplates ref updating

basically the same codepath as samplerviews now, and fixes
some issues with invalid mem access

cc: mesa-stable

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

2 years agozink: add more image usage for null surfaces
Mike Blumenkrantz [Tue, 26 Apr 2022 15:09:06 +0000 (11:09 -0400)]
zink: add more image usage for null surfaces

without null descriptor features, these can be used for all sorts of things

cc: mesa-stable

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

2 years agozink: fix null buffer/surface formats
Mike Blumenkrantz [Tue, 26 Apr 2022 15:07:23 +0000 (11:07 -0400)]
zink: fix null buffer/surface formats

4-component formats are needed here in order to return the correct
alpha value in invalid load scenarios

cc: mesa-stable

fixes:
spec@arb_shader_image_load_store@invalid

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

2 years agolavapipe: enqueue pipeline destruction
Mike Blumenkrantz [Wed, 4 May 2022 13:01:56 +0000 (09:01 -0400)]
lavapipe: enqueue pipeline destruction

this avoids races in llvmpipe related to modification of per-context shader
variant lists, which causes massive amounts of flakiness in ci

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

2 years agozink: delete nir_lower_dynamic_bo_access
Mike Blumenkrantz [Tue, 12 Apr 2022 21:42:15 +0000 (17:42 -0400)]
zink: delete nir_lower_dynamic_bo_access

no longer used

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

2 years agozink: implement indirect buffer indexing
Mike Blumenkrantz [Tue, 12 Apr 2022 21:26:53 +0000 (17:26 -0400)]
zink: implement indirect buffer indexing

this compacts all buffers in the shader into an array that can be
used in a single descriptor, thus handling the case of indirect indexing
while also turning constant indexing into indirect (with const offsets)
since there's no sane way to distinguish

a "proper" implementation of this would be to skip gl_nir_lower_buffers
and nir_lower_explicit_io altogether and retain the derefs, but that would
require a ton of legwork of other nir passes which only operate on the
explicit io intrinsics

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

2 years agozink: flatten push descriptor template into normal template array
Mike Blumenkrantz [Wed, 13 Apr 2022 14:21:51 +0000 (10:21 -0400)]
zink: flatten push descriptor template into normal template array

this simplifies some code

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

2 years agozink: decouple descriptor templates from layouts
Mike Blumenkrantz [Wed, 13 Apr 2022 14:20:00 +0000 (10:20 -0400)]
zink: decouple descriptor templates from layouts

the same layout will in the future have multiple templates
depending on which resources are being updated

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

2 years agozink: semi-handle 1D sparse texture rewrites for drivers that don't support them
Mike Blumenkrantz [Thu, 21 Apr 2022 16:24:01 +0000 (12:24 -0400)]
zink: semi-handle 1D sparse texture rewrites for drivers that don't support them

nvidia can't do this, but also nothing uses it, so I've gone ahead and
done the bare minimum here to make cts pass

I think the work to do the shader rewrites should be easy, but without a test
case, I see no point in spending the time for it

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