Benjamin Cheng
96a240e176
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: 66f7289d56
("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 >
2022-05-10 23:18:56 +00:00
Mike Blumenkrantz
d4dce29faf
kopper: remove unused zink include
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16441 >
2022-05-10 22:42:19 +00:00
Daniel Schürmann
4875c82d2d
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 >
2022-05-10 22:20:54 +00:00
Daniel Schürmann
f8ee0efd04
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 >
2022-05-10 22:20:54 +00:00
Iván Briano
2e46f38902
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 >
2022-05-10 21:56:49 +00:00
Adam Jackson
2a47c30ef9
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 >
2022-05-10 21:25:57 +00:00
Adam Jackson
5eccb228ba
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 >
2022-05-10 21:25:57 +00:00
Adam Jackson
66d25f96db
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 >
2022-05-10 21:25:57 +00:00
Adam Jackson
4873b13aec
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 >
2022-05-10 21:25:57 +00:00
Adam Jackson
6c546ece69
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 >
2022-05-10 21:25:57 +00:00
Adam Jackson
abb0ea31ca
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 >
2022-05-10 21:25:57 +00:00
Charmaine Lee
742a873209
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 >
2022-05-10 21:17:01 +00:00
Charmaine Lee
6253a23eff
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 >
2022-05-10 21:17:01 +00:00
Charmaine Lee
e73443b7a5
svga: enable PIPE_CAP_TGSI_TEXCOORD for vgpu10 and up
...
Revise commit 0d456315f9 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 >
2022-05-10 21:09:08 +00:00
Mike Blumenkrantz
705af4f95a
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
8b8b580e42
docs: EXT_robustness2 for lavapipe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
5167750d5b
lavapipe: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
0cebb87025
lavapipe: set robustBufferAccess2 and robustImageAccess2
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
f5caaf2d75
gallivm: fix oob txf swizzling
...
this wasn't taking into account the format swizzle, returning broken
alpha values in most cases
Fixes: 0b6554ba6f ("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 >
2022-05-10 20:30:09 +00:00
Erik Faye-Lund
8c8d08a8b8
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
6a219f318a
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
f1d1371e51
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
a51e83b74e
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
49df9eeb9d
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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
aa98a90265
gallivm: fix ssbo oob reads
...
this was checking (offset < size) when really it needs to be
(offset < size && extent < size && offset >= 0)
Fixes: 591899eedd ("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 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
e339f65520
lavapipe: handle null samplerviews
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
8eae343401
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 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
427cc8d55e
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 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
aabf614f9b
lavapipe: tolerate NULL image view descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
bca9020b75
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 >
2022-05-10 20:30:08 +00:00
Georg Lehmann
60c9a45562
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 >
2022-05-10 19:29:31 +00:00
Georg Lehmann
66e917fff6
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: 0e6581b87d ("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 >
2022-05-10 18:47:21 +00:00
Timur Kristóf
81ad8c4979
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 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
03b3344a7c
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 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
da2ab1d8a2
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 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
05c372ca5e
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 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
2226736033
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 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
27c4d8d5fa
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
f553076eaf
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
212f183c1f
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
896a55f47d
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
7f189e3467
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
2755acbdad
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 >
2022-05-10 17:16:03 +00:00
Timur Kristóf
719678f891
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 >
2022-05-10 17:16:03 +00:00
Jason Ekstrand
370f02bf02
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 >
2022-05-10 11:23:19 -05:00
Jason Ekstrand
ed3ed466c4
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 >
2022-05-10 11:23:18 -05:00
Jason Ekstrand
620c5e9dd0
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: e9c41b3214 ("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 >
2022-05-10 11:23:16 -05:00
Jason Ekstrand
aea935264a
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 >
2022-05-10 11:23:15 -05:00
Jason Ekstrand
16ab9343f3
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 >
2022-05-10 11:23:14 -05:00
Jason Ekstrand
b37831c606
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 >
2022-05-10 11:23:12 -05:00