Alyssa Rosenzweig
9a58a8257e
treewide: Switch to nir_progress
...
Via the Coccinelle patch at the end of the commit message, followed by
sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')
ninja -C ~/mesa/build clang-format
cd ~/mesa/src/compiler/nir && clang-format -i *.c
agxfmt
@@
identifier prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
-return prog;
+return nir_progress(prog, impl, metadata);
@@
expression prog_expr, impl, metadata;
@@
-if (prog_expr) {
-nir_metadata_preserve(impl, metadata);
-return true;
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-return false;
-}
+bool progress = prog_expr;
+return nir_progress(progress, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
-return prog;
+return nir_progress(prog, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
+nir_progress(prog, impl, metadata);
@@
expression impl, metadata;
@@
-nir_metadata_preserve(impl, metadata);
-return true;
+return nir_progress(true, impl, metadata);
@@
expression impl;
@@
-nir_metadata_preserve(impl, nir_metadata_all);
-return false;
+return nir_no_progress(impl);
@@
identifier other_prog, prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
-other_prog |= prog;
+other_prog = other_prog | nir_progress(prog, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+nir_progress(prog, impl, metadata);
@@
identifier other_prog, prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-other_prog = true;
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+other_prog = other_prog | nir_progress(prog, impl, metadata);
@@
expression prog_expr, impl, metadata;
identifier prog;
@@
-if (prog_expr) {
-nir_metadata_preserve(impl, metadata);
-prog = true;
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+bool impl_progress = prog_expr;
+prog = prog | nir_progress(impl_progress, impl, metadata);
@@
identifier other_prog, prog;
expression impl, metadata;
@@
-if (prog) {
-other_prog = true;
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+other_prog = other_prog | nir_progress(prog, impl, metadata);
@@
expression prog_expr, impl, metadata;
identifier prog;
@@
-if (prog_expr) {
-prog = true;
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+bool impl_progress = prog_expr;
+prog = prog | nir_progress(impl_progress, impl, metadata);
@@
expression prog_expr, impl, metadata;
@@
-if (prog_expr) {
-nir_metadata_preserve(impl, metadata);
-} else {
-nir_metadata_preserve(impl, nir_metadata_all);
-}
+bool impl_progress = prog_expr;
+nir_progress(impl_progress, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-nir_metadata_preserve(impl, metadata);
-prog = true;
+prog = nir_progress(true, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-}
-return prog;
+return nir_progress(prog, impl, metadata);
@@
identifier prog;
expression impl, metadata;
@@
-if (prog) {
-nir_metadata_preserve(impl, metadata);
-}
+nir_progress(prog, impl, metadata);
@@
expression impl;
@@
-nir_metadata_preserve(impl, nir_metadata_all);
+nir_no_progress(impl);
@@
expression impl, metadata;
@@
-nir_metadata_preserve(impl, metadata);
+nir_progress(true, impl, metadata);
squashme! sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722 >
2025-02-26 15:19:53 +00:00
Georg Lehmann
ca8147edbe
nir/peephole_select: add options struct
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590 >
2025-02-20 21:59:16 +00:00
Valentine Burley
464c97b588
ci: Update expectations from latest nightly
...
Update expectations from https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1364513 .
Created with ci-collate.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33547 >
2025-02-17 06:56:30 +00:00
Timur Kristóf
76061b7fa3
nir: Don't include u_printf.h in nir.h, only where necessary.
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439 >
2025-02-12 23:20:12 +01:00
Martin Roukala (né Peres)
978c0989eb
ci: fix the artifact name
...
This has probably no incidence on anything else but human-visible names
but let's fix it anyway.
Fixes: ef3091736c ("ci: use CI_PROJECT_NAME for artifacts name")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927 >
2025-02-05 04:35:07 +00:00
Rhys Perry
9c159490c3
microsoft/compiler: repair SSA in dxil_nir_split_tess_ctrl
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005 >
2025-01-23 23:35:44 +00:00
Rhys Perry
3850f8b167
microsoft/compiler: invalidate loop analysis in dxil_nir_lower_double_math
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005 >
2025-01-23 23:35:44 +00:00
Vignesh Raman
ef3091736c
ci: use CI_PROJECT_NAME for artifacts name
...
Since mesa is used in drm-ci, the artifacts in drm-ci jobs have
the 'mesa' prefix. This change replaces the hardcoded 'mesa'
prefix in the artifacts name with the CI_PROJECT_NAME variable.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33154 >
2025-01-23 07:18:09 +00:00
Marek Olšák
02516ff0f9
nir: remove dead code due to IO being always lowered in st/mesa
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146 >
2025-01-22 02:15:04 +00:00
Marek Olšák
a7ad1b302b
nir: remove redundant option linker_ignore_precision
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:17 +00:00
Marek Olšák
c21bc65ba7
nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads
...
A negative hole size means the loads overlap. This will be used by drivers
to handle overlapping loads in the callback easily.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32699 >
2025-01-01 00:03:55 +00:00
Jesse Natalie
01e9449be2
microsoft/compiler: Update clip/cull split pass to handle clip/cull getting merged
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942 >
2024-12-24 05:54:07 -05:00
Jesse Natalie
8dd44c7e72
microsoft/compiler: Skip POS for io compaction
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942 >
2024-12-24 05:54:07 -05:00
Erik Faye-Lund
dc5ac13959
dozen: use vk_descriptor_type_is_dynamic
...
No need to open-code this one now that we have a generic helper.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627 >
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
ea88898b04
dozen: use vk_descriptor_type_is_dynamic
...
No need for our own helper now that we have a generic one.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627 >
2024-12-19 15:12:58 +00:00
Valentine Burley
d981f66df8
ci/windows: Always include windows-msvc in scheduled pipelines
...
The windows-msvc job currently runs only when Windows-related
files are modified.
To always run it in scheduled runs, we need to inherit
.scheduled_pipeline-rules.
Fixes: 435017700d ("ci/windows: Add a manual full job")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32717 >
2024-12-19 12:29:39 +00:00
Valentine Burley
2cbc93e4df
ci/windows: Update expectations
...
Decreasing the fraction uncovered some new failures.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704 >
2024-12-18 18:39:24 +00:00
Valentine Burley
435017700d
ci/windows: Add a manual full job
...
Add the test-dozen-deqp-full nightly job, which runs VKCTS
without a fraction.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704 >
2024-12-18 18:39:24 +00:00
Valentine Burley
6076b8a49c
ci/windows: Bump the number of tests per group
...
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.
Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704 >
2024-12-18 18:39:24 +00:00
Jesse Natalie
727c5a531e
microsoft/clc: Initialize printf buffer for tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564 >
2024-12-10 19:13:07 +00:00
Dylan Baker
33a1acb0da
clc: Tell clang to track imported dependencies
...
Clang is capable of tacking what headers it imports, as long as we set
it up to do that. While that isn't important for rusticl, it would be
useful for the various `_clc` tools, as they can then tell Ninja which
headers they read to make rebuilds more reliable.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505 >
2024-12-06 13:48:26 -05:00
Jesse Natalie
128caf94ca
microsoft/compiler: Put holes in driver_location based on I/O variable sizes
...
DXIL requires that each I/O variable has a unique semantic name, but when
dealing with semantics that take up multiple slots, that variable implicitly
takes up multiple names. So when assigning driver_location, we need to do
the same.
That means also updating outputs and patch constants to have a mapping from
driver_location to a compacted index, since the metadata arrays *can't* have
holes.
This would be simpler if we could hang it off the nir_variable but there's
not really any free fields to be able to do that. We only need this compacted
mapping inside the DXIL backend anyway so we can just store the array in the
module.
Tested-by: Benjamin Otte <otte@gnome.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12128
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32047 >
2024-12-02 22:40:39 +00:00
Rhys Perry
45c1280d2c
nir_lower_mem_access_bit_sizes: pass access to callback
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904 >
2024-11-13 12:59:26 +00:00
Rhys Perry
61752152f7
nir_lower_mem_access_bit_sizes: add nir_mem_access_shift_method
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904 >
2024-11-13 12:59:26 +00:00
Jesse Natalie
26fc1ea9e5
dzn: Clean up dri options cache
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32011 >
2024-11-06 20:53:13 +00:00
Georg Lehmann
cba575f4df
nir: always emit ddx intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014 >
2024-10-17 09:50:19 +00:00
Marek Olšák
02923e237d
nir: add hole_size parameter into the vectorize callback
...
It will be used to allow merging loads with a hole between them.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398 >
2024-10-15 05:50:24 +00:00
Daniel Stone
9c7cb49508
ci/windows: Increase dozen-deqp fraction
...
It takes far too long to run: bring it back down to something more
manageable.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111 >
2024-09-12 19:07:45 +00:00
Sil Vilerino
702bd657cc
ci: Bump DirectX-Headers and Agility SDK dependencies to 1.614.1
...
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092 >
2024-09-12 15:01:18 +00:00
Jesse Natalie
44cc67e659
microsoft/compiler: Move nir_lower_undef_to_zero out of the optimization loop
...
Otherwise after https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7710
I'm getting fighting between this pass and nir_opt_if.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31003 >
2024-09-03 21:53:24 +00:00
Daniel Stone
d7680bb284
ci/dozen: Add a couple more skips
...
One takes almost exactly 60 seconds these days, so it sometimes fails.
The other takes 43 seconds, which is too close for comfort; allocating
as much memory as possible is also not a great thing to do on shared
runners.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993 >
2024-09-03 18:41:50 +00:00
Faith Ekstrand
8c60f1461b
vulkan: Take a VkPipelineCreateFlags2KHR in vk_pipeline_*shader_stage*()
...
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876 >
2024-08-29 03:30:31 +00:00
Jesse Natalie
81a00a48bc
microsoft/compiler: Handle subgroup size 4 as a required wave size
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876 >
2024-08-29 03:30:31 +00:00
Jesse Natalie
15f13f3c45
dzn: Drop custom subgroup size handling
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876 >
2024-08-29 03:30:31 +00:00
Faith Ekstrand
faf27a5989
dzn: Use vk_pipeline_shader_stage_to_nir()
...
Dozen is the last user so we can delete it now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876 >
2024-08-29 03:30:31 +00:00
chyyran
8c68eeb890
spirv_to_dxil: add missing SPIR-V capabilities
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30776 >
2024-08-23 16:36:59 +00:00
Alyssa Rosenzweig
50c0dbfd70
dxil: switch to derivative intrinsics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30568 >
2024-08-08 23:06:36 +00:00
Jesse Natalie
f05b7225a3
microsoft/clc: Split struct copies before vars_to_ssa in pre-inline optimizations
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896 >
2024-07-22 21:16:58 +00:00
Daniel Stone
e05415a82e
format: Generate endian-independent format aliases
...
Instead of having a hardcoded list of endian-independent format aliases
in the header, generate them from the format definitions.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649 >
2024-07-19 13:50:42 +00:00
David Heidelberg
68215332a8
build: pass licensing information in SPDX form
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972 >
2024-06-29 12:42:49 -07:00
Alyssa Rosenzweig
dd85b50d18
treewide: use nir_break_if
...
Via Coccinelle patch and some manual hunk editing:
@@
expression b, E;
@@
-nir_push_if(b, E);
-{
-nir_jump(b, nir_jump_break);
-}
-nir_pop_if(b, NULL);
+nir_break_if(b, E);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29877 >
2024-06-26 19:07:35 +00:00
Alyssa Rosenzweig
da752ed7c1
treewide: use nir_def_replace sometimes
...
Two Coccinelle patches here. Didn't catch nearly as much as I would've liked but
it's a start.
Coccinelle patch:
@@
expression intr, repl;
@@
-nir_def_rewrite_uses(&intr->def, repl);
-nir_instr_remove(&intr->instr);
+nir_def_replace(&intr->def, repl);
Coccinelle patch:
@@
identifier intr;
expression instr, repl;
@@
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
...
-nir_def_rewrite_uses(&intr->def, repl);
-nir_instr_remove(instr);
+nir_def_replace(&intr->def, repl);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com> [broadcom]
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> [lima]
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> [etna]
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> [r300]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29817 >
2024-06-21 15:36:56 +00:00
Alyssa Rosenzweig
15257b65c6
treewide: use nir_metadata_control_flow
...
Via Coccinelle patch:
@@
@@
-nir_metadata_block_index | nir_metadata_dominance
+nir_metadata_control_flow
...plus some manual fixups for call sites missed by coccinelle.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Juan A. Suarez Romero <jasuarez@igalia.com> [broadcom]
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com> [lima]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29745 >
2024-06-17 16:28:14 -04:00
Daniel Schürmann
9b1a748b5e
nir: remove nir_intrinsic_discard
...
The semantics of discard differ between GLSL and HLSL and
their various implementations. Subsequently, numerous application
bugs occurred and SPV_EXT_demote_to_helper_invocation was written
in order to clarify the behavior. In NIR, we now have 3 different
intrinsics for 2 things, and while demote and terminate have clear
semantics, discard still doesn't and can mean either of the two.
This patch entirely removes nir_intrinsic_discard and
nir_intrinsic_discard_if and replaces all occurences either with
nir_intrinsic_terminate{_if} or nir_intrinsic_demote{_if} in the
case that the NIR option 'discard_is_demote' is being set.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27617 >
2024-06-17 19:37:16 +00:00
Daniel Schürmann
f3d8bd18dd
nir: introduce discard_is_demote compiler option
...
This new option indicates that the driver emits the same
code for nir_intrinsic_discard and nir_intrinsic_demote.
Otherwise, it is assumed that discard is implemented as
terminate.
spirv_to_nir uses this option in order to directly emit
nir_demote in case of OpKill.
RADV GFX11:
Totals from 3965 (4.99% of 79439) affected shaders:
MaxWaves: 119418 -> 119424 (+0.01%); split: +0.03%, -0.03%
Instrs: 1608753 -> 1620830 (+0.75%); split: -0.18%, +0.93%
CodeSize: 8759152 -> 8785152 (+0.30%); split: -0.18%, +0.48%
VGPRs: 152292 -> 149232 (-2.01%); split: -2.37%, +0.36%
Latency: 9162314 -> 10033923 (+9.51%); split: -0.46%, +9.97%
InvThroughput: 1491656 -> 1493408 (+0.12%); split: -0.10%, +0.22%
VClause: 21424 -> 21452 (+0.13%); split: -0.31%, +0.44%
SClause: 53598 -> 55871 (+4.24%); split: -2.15%, +6.39%
Copies: 90553 -> 90462 (-0.10%); split: -2.91%, +2.81%
Branches: 16283 -> 16311 (+0.17%)
PreSGPRs: 113993 -> 113254 (-0.65%); split: -1.84%, +1.19%
PreVGPRs: 110951 -> 108914 (-1.84%); split: -2.08%, +0.24%
VALU: 963192 -> 963167 (-0.00%); split: -0.01%, +0.01%
SALU: 87926 -> 90795 (+3.26%); split: -2.92%, +6.18%
VMEM: 25937 -> 25936 (-0.00%)
SMEM: 110012 -> 109799 (-0.19%); split: -0.20%, +0.01%
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27617 >
2024-06-17 19:37:15 +00:00
Faith Ekstrand
1604ab0ef7
dozen: Advertise VK_EXT_shader_replicated_composites
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29509 >
2024-06-04 16:34:48 +00:00
Eric Engestrom
860b262f44
microsoft/clc: fix incorrect changes that got through while the Windows CI was down
...
Fixes: e80d52223e ("microsoft: Use spirv_capabilities for spirv_to_dxil")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29137 >
2024-05-10 20:52:21 +00:00
Alyssa Rosenzweig
e0aa70bd55
dzn: use common stype debug
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29009 >
2024-05-10 18:49:38 +00:00
Faith Ekstrand
e80d52223e
microsoft: Use spirv_capabilities for spirv_to_dxil
...
Note: This change doesn't actually affect dozen a it uses
vk_shader_module_to_nir() so caps will be exposed based on Vulkan
features rather than the manual table.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905 >
2024-05-09 01:14:23 +00:00
Faith Ekstrand
4b3561b14d
spirv: Move the printf enable out of capabilities
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905 >
2024-05-09 01:14:22 +00:00