Samuel Pitoiset
a9c8366261
radv: implement padding cmdbuffer for DGC on GFX6
...
GFX6 only supports PKT2_NOP_PAD.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23689 >
2023-06-21 06:54:03 +00:00
Yonggang Luo
65249c6f0a
util: Fixes prototype of threads_timespec_compare
...
using const struct timespec * is enough
Fixes: 45bd24708a ("c11: Improve mtx_timedlock to use timespec_get instead of time(NULL)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9230
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23753 >
2023-06-21 06:18:40 +00:00
Dave Airlie
146adbd2f4
radv/video: drop incorrect defines for uapi ones.
...
I missed there's an off by one, and found the kernel defined
the correct bits, so just use that.
Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23757 >
2023-06-21 05:28:01 +00:00
Ian Romanick
38f941c8a8
intel/stub_gpu: Don't run program again after using GDB
...
Fixes: c56dd678e4 ("intel/stub_gpu: add an option to launch valgrind")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23736 >
2023-06-21 04:47:48 +00:00
Patrick Lerda
23c003b88c
util/blitter: fix util_blitter_clear_buffer() refcnt imbalance
...
Indeed, the vertex state was restored using a specific
condition at the util_blitter_restore_vertex_states()
level. This change ensures that the condition is the
same when the vertex state is saved.
The function util_blitter_clear_buffer() is only called
by the r600 driver on pre-evergreen gpus.
This issue is triggered on a rv770 gpu with "piglit/bin/fbo-1d -auto -fbo"
or "piglit/bin/draw_buffers_gles2 -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Fixes: 5f566faa46 ("radeonsi: don't save and restore vertex buffers and elements for u_blitter")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23721 >
2023-06-21 03:36:35 +00:00
Mike Blumenkrantz
3d22bcb790
zink: only retry bo allocation after reclaim if reclaims actually happened
...
this should cut down on allocation error spam
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073 >
2023-06-21 01:19:23 +00:00
Mike Blumenkrantz
d4757ea67e
aux/pipebuffer: add a return to pb_cache_release_all_buffers()
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073 >
2023-06-21 01:19:23 +00:00
Mike Blumenkrantz
d065304367
aux/pipebuffer: add a return to pb_slabs_reclaim()
...
this lets drivers determine whether any reclaims have happened
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073 >
2023-06-21 01:19:22 +00:00
Caio Oliveira
fde8bf7b7f
intel/compiler: Respect NIR_DEBUG_PRINT_INTERNAL flag
...
If flag is not set, don't print debugging
information for internal shaders.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23756 >
2023-06-21 00:01:10 +00:00
Caio Oliveira
af9be8c024
nir/print: Print whether the shader is internal or not
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23756 >
2023-06-21 00:01:10 +00:00
norablackcat
880a8bb943
rusticl/memory: fix clippy errors
...
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23755 >
2023-06-20 20:31:06 +00:00
Rhys Perry
f1f01aaef5
aco/gfx11: schedule for VMEM store clauses
...
fossil-db (gfx1100):
Totals from 49486 (37.09% of 133428) affected shaders:
Instrs: 18376819 -> 18480712 (+0.57%); split: -0.00%, +0.57%
CodeSize: 91810836 -> 92227292 (+0.45%); split: -0.00%, +0.45%
VGPRs: 2031824 -> 2047784 (+0.79%); split: -0.02%, +0.81%
Latency: 104259318 -> 103804792 (-0.44%); split: -0.44%, +0.00%
InvThroughput: 16388760 -> 16399819 (+0.07%); split: -0.13%, +0.19%
VClause: 568844 -> 432401 (-23.99%)
Copies: 1197942 -> 1231202 (+2.78%); split: -0.08%, +2.86%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505 >
2023-06-20 18:37:34 +00:00
Rhys Perry
f837fec213
aco/gfx11: use s_clause with stores
...
fossil-db (gfx1100):
Totals from 3535 (2.65% of 133428) affected shaders:
Instrs: 1963996 -> 1968979 (+0.25%)
CodeSize: 10077784 -> 10097716 (+0.20%)
Latency: 13264216 -> 13264741 (+0.00%)
InvThroughput: 2995676 -> 3004083 (+0.28%); split: -0.00%, +0.28%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505 >
2023-06-20 18:37:33 +00:00
Rhys Perry
0c0143a4c0
aco: don't try to form load+store clauses
...
fossil-db (gfx1100):
Totals from 79 (0.06% of 133428) affected shaders:
MaxWaves: 1484 -> 1408 (-5.12%)
Instrs: 216290 -> 216255 (-0.02%); split: -0.04%, +0.03%
CodeSize: 1149288 -> 1149148 (-0.01%); split: -0.03%, +0.02%
VGPRs: 7384 -> 7840 (+6.18%)
Latency: 3303521 -> 3305077 (+0.05%); split: -0.05%, +0.10%
InvThroughput: 2716621 -> 2719973 (+0.12%); split: -0.01%, +0.13%
VClause: 5605 -> 6170 (+10.08%)
SClause: 3005 -> 2983 (-0.73%); split: -0.77%, +0.03%
Copies: 33428 -> 33490 (+0.19%); split: -0.07%, +0.26%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505 >
2023-06-20 18:37:33 +00:00
Mike Blumenkrantz
414576aad5
zink: fix anv ci flake wildcarding
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23751 >
2023-06-20 18:11:04 +00:00
Mike Blumenkrantz
c15b2491ec
zink: ZINK_HEAP_HOST_VISIBLE_CACHED -> ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED
...
all host-visible memory in zink is expected to be coherent, and this makes
that expectation more explicit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23728 >
2023-06-20 16:53:32 +00:00
Mike Blumenkrantz
7a169254c5
zink: add COHERENT requirement for CACHED memory
...
zink doesn't handle non-coherent cached memory correctly, so ensure
that scenario is never hit
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23728 >
2023-06-20 16:53:31 +00:00
Caio Oliveira
59a72570b6
compiler: Move spirv into a module of its own
...
For historical reasons, nir and vtn were compiled together,
and a bunch of vtn specific targets were defined in
src/compiler/meson.build.
Now that we can, make src/compiler/spirv produce an internal
library that depends on NIR, and is used by the drivers/tools.
Also move the vtn specific targets into that directory's
meson.build.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23668 >
2023-06-20 16:18:08 +00:00
Nanley Chery
2af68d157b
isl: Add and use size and alignment calculators
...
Instead of interleaving the code for the size and alignment
calculations, split them out into their own functions.
This should make the code easier to follow and avoid some uninitialized
variable warnings.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23699 >
2023-06-20 15:52:45 +00:00
Georg Lehmann
68f7c53814
aco/gfx10+: use v_cndmask with literal for reduction identity
...
Totals from 10 (0.01% of 132657) affected shaders:
CodeSize: 171576 -> 171288 (-0.17%)
Instrs: 32127 -> 32055 (-0.22%)
Latency: 219145 -> 219027 (-0.05%)
InvThroughput: 130287 -> 130041 (-0.19%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23695 >
2023-06-20 14:48:18 +00:00
Georg Lehmann
71d30bcede
aco: combine scalar mul+pk_add to pk_fma
...
Foz-DB Navi21:
Totals from 12 (0.01% of 134913) affected shaders:
CodeSize: 37860 -> 37668 (-0.51%)
Instrs: 6757 -> 6733 (-0.36%)
Latency: 25632 -> 25589 (-0.17%)
InvThroughput: 2637 -> 2622 (-0.57%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21819 >
2023-06-20 14:29:24 +00:00
Georg Lehmann
6db61d0dc0
aco: use uses helpers for pk_fma opt
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21819 >
2023-06-20 14:29:24 +00:00
Rhys Perry
532407094a
radv: use wave32 for small workgroups
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23555 >
2023-06-20 14:03:52 +00:00
Rhys Perry
b765a27d73
radv: refactor CS subgroup size determination
...
This is less convoluted.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23555 >
2023-06-20 14:03:52 +00:00
SureshGuttula
41d8837e89
radeonsi/vcn: update luma and chroma size
...
This patch will adjust aligned_height to enc_alignment which
is helping to address some corner cases like 4096x64/64x<>.
Actually less dpb size causing PROTECTION_FAULT. This change is
fixing the issue.
Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Boyuan Zhang Boyuan.Zhang@amd.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23448 >
2023-06-20 13:40:16 +00:00
Samuel Pitoiset
1359e806f2
radv: advertise VK_EXT_depth_bias_control
...
Pass new CTS on RDNA2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23696 >
2023-06-20 12:46:28 +00:00
Samuel Pitoiset
266b2cfe5b
radv: implement VK_EXT_depth_bias_control
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23696 >
2023-06-20 12:46:28 +00:00
Samuel Pitoiset
0432a748ee
vulkan/runtime: call CmdSetDepthBias2EXT() from CmdSetDepthBias()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23696 >
2023-06-20 12:46:28 +00:00
Gert Wollny
ae7d904a73
r600/sfn: Implement source mod optimization in backend
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702 >
2023-06-20 12:22:45 +00:00
Gert Wollny
da92733d5a
r600/sfn: add source and dest mod info to opcode table
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702 >
2023-06-20 12:22:45 +00:00
Gert Wollny
2f6ded1098
r600/sfn: allow source mods for per source with multi-slot ops
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702 >
2023-06-20 12:22:45 +00:00
Gert Wollny
0ff3c4bef2
r600/sfn: drop use of nir source mods
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702 >
2023-06-20 12:22:45 +00:00
Gert Wollny
47152b6c09
r600/sfn: Fix typo
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702 >
2023-06-20 12:22:45 +00:00
Gert Wollny
bd93d6b2fb
virgl: don't allow vertex input arrays on GLES hosts
...
v2: - use new HOST_IS_GLES flag (Corentin)
- drop stray fprintf (Emma)
- reorder cases to avoid code replication
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15550 >
2023-06-20 11:50:37 +00:00
Illia Polishchuk
a2d40c09b7
zink, drirc: Add Borderlands 2 workaround to fix spir-v 1.6 translated discard
...
The game expects HLSL discard behavour
But it fails only on Zink because GLSL discard translates to
nir_intrinsic_discard (BRW_PREDICATE_ALIGN1_ANY4H in native Intel asm)
but Zink replaces it with OpTerminateInvocation SPIR-V and it translates to
nir_intrinsic_terminate (BRW_PREDICATE_NORMAL in native Intel asm)
Bisected commit in ZINK: bd816084
On AMD it works because they enabled the
glsl_correct_derivatives_after_discard by default: !10522 (17861aff )
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9205
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23694 >
2023-06-20 08:48:02 +00:00
Christian Gmeiner
1dade03b1f
etnaviv: remove not used tgsi includes
...
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738 >
2023-06-20 08:29:19 +00:00
Christian Gmeiner
c784a3db7f
etnaviv: drop usage of tgsi_swizzle_names
...
Gets rid of extern usage.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738 >
2023-06-20 08:29:19 +00:00
Christian Gmeiner
c9ced5abde
etnaviv: remove tgsi remains
...
tokens member was not used for a long time.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738 >
2023-06-20 08:29:19 +00:00
Juan A. Suarez Romero
ab6aa14f42
v3d: clear alpha-only as red-only
...
When clearing an alpha-only format, set the alpha channel into red
channel.
Fixes `spec@ext_texture_integer@multisample-fast-clear
gl_ext_texture_integer`.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497 >
2023-06-20 07:45:31 +00:00
Juan A. Suarez Romero
91c5602026
gallium/util: fix color clamp for alpha-only formats
...
Alpha format only contains one channel, but it is placed in the 4th
position, not 1st.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497 >
2023-06-20 07:45:31 +00:00
Tapani Pälli
e1d7861dd6
isl: handle DRM_FORMAT_MOD_INVALID in isl_drm_modifier_has_aux
...
This fixes crashes with piglit.spec.ext_external_objects.* tests on TGL
that started to trigger with commit 8bc7bcfa0c .
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23718 >
2023-06-20 06:43:07 +00:00
Yonggang Luo
b8f8146c6e
gallium: Remove unused os_process.h in gallium/auxiliary
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503 >
2023-06-20 05:02:51 +00:00
Yonggang Luo
3851a65579
dd: Replace the usage of os_get_process_name with util_get_process_name in dd_draw.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503 >
2023-06-20 05:02:51 +00:00
Yonggang Luo
e287d39f4d
zink: Replace the usage of os_get_process_name with util_get_process_name
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503 >
2023-06-20 05:02:51 +00:00
Mykola Piatykop
25fcf0adc3
mesa: Fix use after free.
...
Reset the pointer to the earlier free st_context.
Check the st_context pointer before st_glFlush.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8195
Signed-off-by: Mykola Piatykop <mykola.piatykop@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21656 >
2023-06-20 04:13:43 +00:00
Caio Oliveira
cb588d5d6e
compiler/clc: Move related NIR passes to the common mesa clc
...
These were historically in the spirv+nir combo, but the common mesa clc
is a better home for them.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Nora Allen <blackcatgames@protonmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667 >
2023-06-20 03:43:41 +00:00
Caio Oliveira
be3e4c8aaf
compiler/clc: Rename the internal library from libclc to libmesaclc
...
There is an actual external libclc and we do use it, so rename the
internal common library to avoid confusion.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Nora Allen <blackcatgames@protonmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667 >
2023-06-20 03:43:41 +00:00
Caio Oliveira
0c387249e1
intel/compiler: Move brw_kernel.c to the intel_clc target
...
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667 >
2023-06-20 03:43:40 +00:00
Lionel Landwerlin
ba42012857
anv: add VK_EXT_depth_bias_control support
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716 >
2023-06-20 03:05:01 +00:00
Lionel Landwerlin
f39fa39809
vulkan/runtime: add support for EXT_depth_bias_control
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716 >
2023-06-20 03:05:01 +00:00