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
Karol Herbst
d22f936019
nir: remove workgroup_id_zero_base
...
This removes the need for drivers to handle both versions. The base will
get added once in nir_lower_system_values when converting from deref to
intrinsic and will be replaced by a zero for users not supporting it.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26800 >
2024-04-24 20:18:49 +00:00
Karol Herbst
3217838fef
nir: remove global_invocation_id_zero_base
...
This removes the need for drivers to handle both versions. The base will
get added once in nir_lower_system_values when converting from deref to
intrinsic and will be replaced by a zero for users not supporting it.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26800 >
2024-04-24 20:18:49 +00:00
Mike Blumenkrantz
38c5a722c2
microsoft/compiler: set compact_arrays in compiler options
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28554 >
2024-04-05 17:56:28 +00:00
Jesse Natalie
c891a384e7
dzn: Don't copy app indirect args if we don't need to
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
db16dcf0f9
dzn: Add a hash table of command signatures with non-default strides
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
d7bd87aa27
dzn: Rework indirect drawing keys for shaders and command signatures
...
When we don't need emulation of first vertex, base instance, draw ID
sysvals, or triangle fans, we can have very simple command signatures
and indirect arg buffer generation shaders. The next step is to handle
the case where everything can be supported straight from the app's
buffer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
ccf439629f
dzn: Update pipeline cache params to take all options into account
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
4de88025cc
dzn: Understand whether first-vertex and base-instance are needed for a pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
fbd4e5d8aa
dzn: Query options21
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
ed465bf738
dzn: Delete dzn structs for indirect draw args and use D3D ones
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
f6c3d73700
spirv2dxil: Output more specific metadata for whether draw sysvals are needed
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
30b1a6750c
spirv2dxil: Support passing first vertex / base instance to DXIL backend
...
These values now have 3 modes of operation so switch from a bool to an enum:
1. Zero
2. Native DXIL sysvals
3. "Runtime data" via a constant buffer or root constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
607720151f
microsoft/compiler: Handle base vertex/instance sysvals as DXIL intrinsics
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383 >
2024-04-05 00:25:41 +00:00
Jesse Natalie
c21355260b
microsoft/compiler: Add a fractional var mask for variable sorting
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:11 +00:00
Jesse Natalie
33735585a9
d3d12: Lower uniforms to UBO by nir options
...
Ubo0 is tricky. It exists if there were any uniforms when
lower_uniforms_to_ubo was run. If we try to run that ourselves,
it might be too late and DCE/remove_dead_variables might've been run,
which removed the uniforms and their accesses, without decrementing
num_uniforms. So we have no good way of knowing whether to declare
ubos from [0, N] or [1, N]. In practice this probably doesn't make
much of a difference but the logic is there so ¯\_(ツ)_/¯
If we use the nir option, then dead code isn't run, and num_uniforms
is a true indicator of whether ubo0 exists or not.
Note that this means we are no longer running this pass for internal
shaders that don't come from the GLSL compiler, so various places are
updated to query the nir info bit that's set by running this pass.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:11 +00:00
Jesse Natalie
9702ddccc2
microsoft/compiler: Don't duplicate work from gather_info in var sorting
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Jesse Natalie
ed757b010a
microsoft/compiler: Improve linking helpers
...
* Take masks instead of shaders
* Be more aggressive at removing sysvals
* Handle loading from outputs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Jesse Natalie
d4a15a048b
microsoft/compiler: Expect front-facing var as an input
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Jesse Natalie
4180cf39f0
microsoft/compiler: Simplify I/O component type enum handling
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Jesse Natalie
230bed221e
microsoft/compiler: Move kill-unused/undefined varying pass from spirv to common
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Jesse Natalie
b6b5514a5b
microsoft/compiler: When sorting variables, put unused variables last
...
These variables will only be used for xfb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535 >
2024-04-04 20:29:10 +00:00
Sil Vilerino
0dd871442b
d3d12: Fix leak dxil_module::serialized_dependency_table
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28546 >
2024-04-03 14:50:28 +00:00
Eric Engestrom
ff37f68740
meson: add VK_DRIVER_FILES to devenv, alongside the old VK_ICD_FILENAMES
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516 >
2024-04-02 18:08:52 +00:00
Eric Engestrom
4b8735cd4e
ci: raise the log level threshold of spirv logs
...
Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job
log, hiding away useful output:
ERROR - dEQP error: SPIR-V WARNING:
ERROR - dEQP error: In file ../src/compiler/spirv/spirv_to_nir.c:4779
ERROR - dEQP error: Unsupported SPIR-V capability: SpvCapabilityDrawParameters (4427)
ERROR - dEQP error: 28 bytes into the SPIR-V binary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28503 >
2024-04-02 17:25:42 +00:00