Qiang Yu
c46aacc216
rusticl: replace get_compute_param with pipe_compute_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
e08664cf85
rusticl: replace get_shader_param with pipe_shader_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
0911b13d70
gallium,mesa: replace get_compute_param with pipe_compute_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
961a9c3a43
clover: replace get_compute_param with pipe_compute_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
1cc42f1493
gallium,mesa: replace get_shader_param with pipe_shader_caps access
...
Use command:
find . -type d -path "./.git" -prune -o -type f -exec sed -i -E ':a;N;$!ba;s/->get_shader_param\(([[:space:]]*[^,]*),([[:space:]]*)([^,]*),([[:space:]]*)PIPE_SHADER_CAP_([A-Za-z0-9_]+)\)/->shader_caps[\3].\L\5/g' {} +
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
916bdf0892
lavapipe: change min shader param to use pipe_shader_caps
...
MSVC does not support GCC ({}) macro extension, so have to
use offsetof().
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
12f420ceba
nine: GET_SHADER_CAP use pipe_shader_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:48 +08:00
Qiang Yu
3ffa83cc6a
zink: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:20:46 +08:00
Qiang Yu
a18cf7cac3
virgl: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
c78018c552
vc4: init shader caps
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
0a1d1e47c9
v3d: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
c312ca70bc
tegra: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
69f38859f3
svga: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
bae9812092
softpipe: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
42d6c1245d
radeonsi: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
390854e523
r600: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
61a0a4ee67
r300: init shader caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
5b782f5570
panfrost: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
2d194637c5
nouveau/nvc0: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
b2e1fcbe01
nouveau/nv50: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
a242c6ee3c
nouveau/nv30: init shader caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
a65b74af51
llvmpipe: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
3450274f78
lima: init shader caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
36534ec18d
iris: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
29d0b4ccde
i915: init shader caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
a0a6b70666
freedreno: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
99605fb3a8
etnaviv: init shader caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
332502d9a2
d3d12: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
9a9a61a143
crocus: init shader and compute caps
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
1b348d3a3e
agx: init shader and compute caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
87cc79126d
draw: add draw_init_shader_caps
...
Mapped from draw_get_shader_param.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
02903e150e
gallivm: add gallivm_init_shader_caps
...
Mapped from gallivm_get_shader_param.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
19240e0fea
tgsi: add tgsi_exec_init_shader_caps
...
Mapped from tgsi_exec_get_shader_param.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
379b3a782d
gallium: copy shader and compute caps for ddebug/noop/trace
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
7b838218eb
gallium: add pipe_shader_caps and pipe_compute_caps
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:45 +08:00
Qiang Yu
0a5c8853ab
gallium,mesa: remove ir_type param when get_compute_param
...
We are going to convert compute cap query to struct access,
so remove this param.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Qiang Yu
55be769f6d
radeonsi: init compute caps without ir_type param
...
Only PIPE_COMPUTE_CAP_*_CLOVER are queried with PIPE_SHADER_IR_NATIVE,
other caps will be always queried with PIPE_SHADER_IR_NIR.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Qiang Yu
a1e039dd35
r600: init compute caps without ir_type param
...
Only clover caps use different value.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Qiang Yu
8a6eb7041e
gallium,clover: add compute caps used by clover only
...
To remove ir_type param when get_compute_param. These caps depend
on IR type and used by clover only (only clover query with
PIPE_SHADER_IR_NATIVE, others query with PIPE_SHADER_IR_NIR).
Only r600 and radeonsi support PIPE_SHADER_IR_NATIVE.
These caps can be removed when clover is deprecated.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Qiang Yu
2af8172b62
gallium: fix ddebug and noop screen caps init
...
Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Qiang Yu
0f656756ec
lavapipe: fix min_vertex_pipeline_param
...
Fixes: d91a549b67 ("lavapipe: check all vertex-stages")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176 >
2025-02-05 11:12:44 +08:00
Karol Herbst
bb6d371c0e
rusticl: support SPIR-V 1.5 and 1.6
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327 >
2025-02-04 15:49:58 +00:00
Karol Herbst
2f4931353f
rusticl/kernel: call nir_lower_variable_initializers earlier
...
Fixes spirv_new spirv14_nonwriteable_decoration
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327 >
2025-02-04 15:49:58 +00:00
Hyunjun Ko
bf88b9b324
kopper: implement to get sync values.
...
v1. Makes special_event a member of struct dri_drawable to be re-used.
(Michel Dänzer @daenzer)
v2. Guard with VK_USE_PLATFORM_XCB_KHR and clean-up.
(Mike Blumenkrantz @zmike)
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474 >
2025-02-04 14:36:05 +00:00
Hyunjun Ko
e8d335d496
dri: fix a build error
...
Fixes error:
`struct pipe_context' declared inside parameter list will not be visible outside of this definition or declaration`
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474 >
2025-02-04 14:36:05 +00:00
Samuel Pitoiset
bd8575ebd3
radv: implement derivative group quads on GFX12
...
It's natively supported by the hw.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303 >
2025-02-04 08:11:16 +00:00
Giovanni Mascellani
08777e5ba9
llvmpipe: Remove an outdated comment about subclassing pipe_screen.
...
It seems that llvmpipe_screen very much exists and is indeed a
subclass of pipe_screen.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33343 >
2025-02-04 07:00:08 +00:00
Adam Jackson
25707b57bc
lvp: set subgroupQuadOperationsInAllStages to true
...
This enables them for task and mesh shaders, which for lvp are just
fancy compute shaders, and it's not like gallivm has any real awareness
of the stage it's emitting code for anyway.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32632 >
2025-02-03 22:41:16 +00:00
Pavel Ondračka
c031a53a78
r300: copy propagate constant swizzles
...
For example:
SIN temp[1].x, temp[0].x___;
MOV temp[1].y, none._1__;
ADD temp[2].xyz, temp[1].xy__, const[0].ww__;
could be transformed into
SIN temp[1].x, temp[0].x___;
ADD temp[0].xyz, temp[1].x1__, const[0].ww__;
Shader-db RV410:
total instructions in shared programs: 112613 -> 112451 (-0.14%)
instructions in affected programs: 15613 -> 15451 (-1.04%)
helped: 148
HURT: 1
total temps in shared programs: 18149 -> 18129 (-0.11%)
temps in affected programs: 297 -> 277 (-6.73%)
helped: 21
HURT: 2
total cycles in shared programs: 169432 -> 169273 (-0.09%)
cycles in affected programs: 17779 -> 17620 (-0.89%)
helped: 145
HURT: 4
RV530:
total instructions in shared programs: 128650 -> 128443 (-0.16%)
instructions in affected programs: 21647 -> 21440 (-0.96%)
helped: 206
HURT: 4
total temps in shared programs: 17014 -> 17010 (-0.02%)
temps in affected programs: 216 -> 212 (-1.85%)
helped: 11
HURT: 6
total cycles in shared programs: 190719 -> 190523 (-0.10%)
cycles in affected programs: 28892 -> 28696 (-0.68%)
helped: 203
HURT: 8
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275 >
2025-02-03 22:13:32 +00:00
Pavel Ondračka
9835a2df83
r300: do not limit maximum TEX group for R300/R400
...
We do not have the TEX semaphore there anyway so the benefits are not as
high as with R500 and the chances of running out of TEX indirections are
just too high.
This will increase the register pressure in some shaders, but I believe
the gained shaders are worth it and there is also some cycles reduction
in some cases. I'm not sure how to optimize this further without
actually clonning the shader before the pair shceduling and than doing a
trial and error to see if there is some compromise where we can just hit
the indirection limit to not group it too much...
Shader-db RV410:
total instructions in shared programs: 112800 -> 112825 (0.02%)
instructions in affected programs: 5024 -> 5049 (0.50%)
helped: 23
HURT: 19
total temps in shared programs: 18170 -> 18244 (0.41%)
temps in affected programs: 1365 -> 1439 (5.42%)
helped: 39
HURT: 34
total cycles in shared programs: 169535 -> 166806 (-1.61%)
cycles in affected programs: 14229 -> 11500 (-19.18%)
helped: 84
HURT: 4
LOST: 0
GAINED: 8
GAINED: shaders/godot3.4/34-59.shader_test FS
GAINED: shaders/lightsmark/25.shader_test FS
GAINED: shaders/lightsmark/28.shader_test FS
GAINED: shaders/lightsmark/34.shader_test FS
GAINED: shaders/this-war-of-mine/144.shader_test FS
GAINED: shaders/this-war-of-mine/145.shader_test FS
GAINED: shaders/tropics/432.shader_test FS
GAINED: shaders/tropics/462.shader_test FS
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275 >
2025-02-03 22:13:32 +00:00