Samuel Pitoiset
790fabd38e
radv: advertise VK_EXT_device_fault
...
This is only exposed if the kernel supports GPUVM fault query.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25875 >
2023-11-06 10:35:05 +00:00
Samuel Pitoiset
8097becc7f
radv: add initial VK_EXT_device_fault support
...
This implementation only returns VM faults information for now, but
vendor crash dumps will be adder later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25875 >
2023-11-06 10:35:05 +00:00
Marek Olšák
ca1d37e1db
radeonsi: adjust setting PA_SC_EDGERULE once more
...
based on PAL.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055 >
2023-11-05 14:06:52 -05:00
Marek Olšák
44eaf50a34
ac/surface/tests: cosmetic changes
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055 >
2023-11-05 12:39:42 -05:00
Marek Olšák
dfcc7f83a4
ac/surface: cosmetic changes
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055 >
2023-11-05 12:39:42 -05:00
Marek Olšák
355242f055
ac/gpu_info: adjust attribute ring size for gfx11
...
these are better numbers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055 >
2023-11-05 12:36:52 -05:00
Marek Olšák
bd57630885
ac: add missing gfx11.5 bits
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055 >
2023-11-05 12:34:55 -05:00
Jesse Natalie
228329f4da
vulkan: Consolidate common ICD methods
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998 >
2023-11-03 20:01:14 +00:00
Chia-I Wu
227300345e
radv: stop using vk_render_pass_state::render_pass
...
vk_render_pass_state::pipeline_flags is derived from
vk_get_pipeline_rendering_flags and has the info we need.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10074
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26000 >
2023-11-03 17:23:30 +00:00
Eric Engestrom
47398c65ee
ci/radeonsi: add another flake
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26020 >
2023-11-03 09:20:32 +00:00
Samuel Pitoiset
fc9bab73a9
radv/ci: document one more flake test
...
This test consistently fails on some GPUs (already documented) but on
some others it's a flake. It's a known issue that should be fixed soon
in RADV.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26019 >
2023-11-03 09:16:54 +01:00
Konstantin Seurer
11282598e6
radv: Add radv_nir_lower_hit_attrib_derefs_tests
...
Tests hit attrib lowering for various variable/type configurations.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271 >
2023-11-02 15:48:36 +00:00
Konstantin Seurer
f51227d253
radv/clang-format: Do not indent C++ modifiers
...
Turns
class asd {
private:
};
into
class asd {
private:
};
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271 >
2023-11-02 15:48:36 +00:00
Konstantin Seurer
ba8d3afa56
radv/nir: Handle boolean hit attribs
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271 >
2023-11-02 15:48:36 +00:00
Konstantin Seurer
3a69424e09
radv/nir: Add radv_nir_lower_hit_attrib_derefs
...
Move out the pass so it can be unit tested.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271 >
2023-11-02 15:48:36 +00:00
Konstantin Seurer
b7c582e5c7
radv: Add RADV_MAX_HIT_ATTRIB_DWORDS
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271 >
2023-11-02 15:48:36 +00:00
Rhys Perry
0a418561da
radv: skip radv_remove_varyings for mesh shaders
...
Fixes compilation of a Talos Principle 2 shader.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: 9fa9782c17 ("radv: stop compiling a noop FS when the application doesn't provide a FS")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659 >
2023-11-02 12:44:43 +00:00
Rhys Perry
ed12be533e
radv: call lower_array_deref_of_vec before lower_io_arrays_to_elements
...
nir_lower_io_arrays_to_elements does not support array derefs of vectors,
even when nir_deref_instr_is_known_out_of_bounds is fixed.
They can occur with mesh shaders.
Found by inspection.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659 >
2023-11-02 12:44:43 +00:00
Chia-I Wu
796cba9bda
radv: fix vkCmdCopyImage2 for emulated etc2/astc
...
When the image copy is between size-compatible formats with different
block sizes, we need to fix up the extent.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25984 >
2023-11-01 20:02:14 +00:00
Rhys Perry
b18f0dec41
aco: collect Pre-Sched SGPRs/VGPRs before spilling
...
The usage after spilling is usually either the same as before or the
maximum.
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/25559 >
2023-11-01 19:41:30 +00:00
Rhys Perry
d200916ca2
aco: add VALU/SALU/VMEM/SMEM statistics
...
This lets us measure optimizations without interference of waitcnt
instructions.
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/25559 >
2023-11-01 19:41:30 +00:00
Rhys Perry
7de34ad3ef
radv: use NIR_LOOP_PASS helpers
...
A somewhat random collection of fossils:
N Min Max Median Avg Stddev
x 6 16.59 16.61 16.605 16.603333 0.0081649658
+ 6 15.99 16 16 15.998333 0.0040824829
Difference at 95.0% confidence
-0.605 +/- 0.00830327
-3.64385% +/- 0.0485573%
(Student's t, pooled s = 0.00645497)
I'm not sure if nir_opt_if and nir_opt_loop_unroll are actually idempotent
or not.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24197 >
2023-11-01 14:16:37 +00:00
Timur Kristóf
a19e46f5d0
radv: Implement workaround for unaligned buffer/image copies.
...
When the pitch or slice pitch isn't properly aligned,
the SDMA HW is unable to copy between tiled images and buffers.
To work around this, we process the image chunk by chunk,
copying the data to a temporary buffer which uses supported
pitches, and then copy it to the intended destination.
The implementation assumes that at least one pixel row of the
image will fit into the temporary buffer, and will try to copy
as many rows at once as possible. Sadly, this still results in
a lot of packets being generated for large images.
A possibe future improvement is to copy the image slice by slice
when only the slice pitch is misaligned. However, that is out
of scope for this commit.
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/25831 >
2023-11-01 13:21:01 +00:00
Timur Kristóf
ec0605ff72
radv: Add temporary BO for transfer queues.
...
Some copy operations are poorly supported by the SDMA hardware,
meaning that the built-in packets don't support them, so we will
need to work around that by copying to and from a temporary BO.
The size of the temporary buffer was chosen so that it can fit
at least one full pixel row of the largest possible image.
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/25831 >
2023-11-01 13:21:01 +00:00
Timur Kristóf
8156c923ee
radv: Implement buffer/image copies on transfer queues.
...
Previously, RADV only had a simple implementation of
image to buffer copies using the SDMA for the PRIME copy.
This commit replaces that with a full-featured implementation
that includes buffer to image and image to buffer copies and
removes the assumptions that the PRIME copy had, as well as
adds new helper functions which will be shared with other copy
functions in upcoming commits.
Unaligned buffer/image copies require a workaround, which
will be implemented by a future commit.
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/25831 >
2023-11-01 13:21:01 +00:00
Timur Kristóf
ed21f1c962
radv: Expose radv_get_dcc_max_uncompressed_block_size function.
...
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/25831 >
2023-11-01 13:21:01 +00:00
Timur Kristóf
848f2f2b99
radv: Remove always false tmz variables from SDMA functions.
...
We can re-add them later as-needed.
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/25831 >
2023-11-01 13:21:00 +00:00
Samuel Pitoiset
17daa08dff
radv: emit COMPUTE_PIPELINESTAT_ENABLE for CS invocations on ACE
...
This register seems needed to enable compute shader shader invocations
on GFX7. On GFX8+ it's working fine without emitting this register but
I think it doesn't hurt.
This fixes dEQP-VK.query_pool.statistics_query.*_cq on GFX7.
Fixes: a9945216ba ("radv: fix COMPUTE_SHADER_INVOCATIONS query on compute queue")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25957 >
2023-11-01 12:46:17 +00:00
Samuel Pitoiset
9a0a77cb53
radv: fix compute shader invocations query on compute queue on GFX6
...
Looks like GFX6 always writes the number of compute shader invocations
at offset 0 when used on compute queue.
This fixes dEQP-VK.query_pool.statistics_query.*_cq on GFX6.
Fixes: a9945216ba ("radv: fix COMPUTE_SHADER_INVOCATIONS query on compute queue")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25957 >
2023-11-01 12:46:17 +00:00
Samuel Pitoiset
46dc02354a
radv: adjust binning settings to improve performance on GFX9
...
This partially reverts 74ab940156 which
was a fix for random GPU hangs with binning on GFX10+. Though,
according to RadeonSI, only GFX10+ is affected and this reduced perf
on GFX9 chips.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25951 >
2023-11-01 12:24:45 +00:00
Samuel Pitoiset
e4a1bc70dd
radv: bind the non-dynamic graphics state from the pipeline unconditionally
...
The following sequence is valid (although weird) but many other drivers
(including RADV) were broken:
- bind pipeline with some static state
- set state command for that static state (to a bad value)
- bind the same pipeline again
- draw
Fixes new dEQP-VK.dynamic_state.*.double_static_bind.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25954 >
2023-11-01 09:44:13 +00:00
Samuel Pitoiset
024dab650e
radv/ci: enable RADV_DEBUG=nomeshshader for vkcts-navi31-valve
...
To make VKCTS on NAVI31 stable until the task shader issue is
resolved.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25969 >
2023-11-01 08:50:06 +01:00
Samuel Pitoiset
a97160cad8
radv: add RADV_DEBUG=nomeshshader
...
This option will be used to disable VK_EXT_mesh_shader in Mesa CI
for GFX11 because running task shader tests in parallel can hang the
GPU.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10051
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25969 >
2023-11-01 08:49:35 +01:00
Samuel Pitoiset
15f92c3b2c
radv/ci: update list of expected failures/flakes for NAVI31
...
Let's clean the flakes list, it might be needed to re-add some of them
but we will track those.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25969 >
2023-11-01 08:49:35 +01:00
Bas Nieuwenhuizen
da7e6f303b
radv: Add some initial graphics DGC preprocessing support.
...
Just the bits that obviously need no adjustment in the DGC
preprocessing code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25835 >
2023-11-01 00:06:10 +00:00
Bas Nieuwenhuizen
c4fb827441
radv: Add compute DGC preprocessing support.
...
This should reduce the overhead due to reduced syncs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25835 >
2023-11-01 00:06:10 +00:00
Bas Nieuwenhuizen
108227a84e
radv: Add DGC preprocessing barrier support.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25835 >
2023-11-01 00:06:09 +00:00
Samuel Pitoiset
0477346c0b
aco: remove dead code in nir_intrinsic_xfb_counter_{add,sub}_amd
...
This code path is only used by GFX11 now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25903 >
2023-10-30 08:51:51 +00:00
Samuel Pitoiset
d390cd7c5d
ac/nir: remove dead code in nir_intrinsic_xfb_counter_{add,sub}_amd
...
This code path is only used by GFX11 now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25903 >
2023-10-30 08:51:51 +00:00
Samuel Pitoiset
5176f75e0d
radv: remove unnecessary VS_PARTIAL_FLUSH for NGG streamout
...
This used to be a PS_PARTIAL_FLUSH to fix synchronization issues with
NGG streamout on RDNA2 but it's no longer needed for RDNA3. It's
already synchronized in CmdEndTransformFeedbackEXT().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25903 >
2023-10-30 08:51:51 +00:00
Samuel Pitoiset
eb47e07782
radv: remove NGG streamout support for RDNA1-2
...
This was useful for experimenting it on RDNA2 and during RNDA3 bringup,
but now the support is rock solid on RDNA3 and it's useless to keep the
RADV_PERFTEST=ngg_streamout option.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25903 >
2023-10-30 08:51:51 +00:00
Samuel Pitoiset
7beddd4f5c
radv: use the GPUVM fault protection status helper
...
To print more useful information when a fault happens.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25855 >
2023-10-30 08:10:23 +00:00
Samuel Pitoiset
e18c4bca31
ac/debug: add a helper to print GPUVM fault protection status
...
This basically prints the same info as dmesg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25855 >
2023-10-30 08:10:22 +00:00
Samuel Pitoiset
bc09932ec3
ac/registers: allow to parse GCVM_L2_PROTECTION_FAULT_STATUS
...
To have defined bitfields for this register.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25855 >
2023-10-30 08:10:22 +00:00
Samuel Pitoiset
7d96fe853e
radv: fix a synchronization issue with primitives generated query on RDNA1-2
...
Only RDNA1-2 are affected because RADV needs to handle the legacy vs
NGG path for this query, and the NGG results are stored with 2 extra
64-bit values.
Fixes flakes with
dEQP-VK.transform_feedback.primitives_generated_query.* since VKCTS
1.3.7.0.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25862 >
2023-10-30 07:33:06 +00:00
Mike Blumenkrantz
c4283e32e3
radv: correctly return oom from the device when failing to create a cs
...
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25927 >
2023-10-27 15:29:32 +00:00
Samuel Pitoiset
7ec2544a9b
radv: dump the pipeline hash to the gpu hang report
...
It can be useful to verify that a specific pipeline causes a hang.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25908 >
2023-10-27 12:10:51 +00:00
Karol Herbst
1c619b668d
radv: fix buffers in vkGetDescriptorEXT with size not aligned to 4
...
The range alignment didn't happen through GetDescriptorEXT as it called
write_buffer_descriptor directly. So simply move the align
from write_buffer_descriptor_impl into write_buffer_descriptor.
Fixes: 46e0c77582 ("radv: implement VK_EXT_descriptor_buffer")
Signed-off-by: Karol Herbst <kherbst@redhat.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/25837 >
2023-10-27 10:52:55 +00:00
Faith Ekstrand
d5c310899a
nir: Split nir_lower_subgroup_options::lower_vote_eq into two bits
...
On NVIDIA, we can do a vote_ieq on bool in one hardware op so we don't
want that lowered. We do want to lower vote_feq and other vote_ieq,
though.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25894 >
2023-10-26 23:05:44 +00:00
Samuel Pitoiset
4f8a225387
ac/gpu_info: remove bogus assertion about number of COMPUTE/SDMA queues
...
For example, my polaris10 GPU now returns 3 compute queues.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25876 >
2023-10-26 13:44:21 +00:00