Daniel Schürmann
1e334e9818
radv/rt: store stack_sizes per stage instead of per group
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Daniel Schürmann
f50a5a62bf
radv/rt: use vk_multialloc for radv_ray_tracing_pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Daniel Schürmann
dfa5fd480c
radv/rt: refactor radv_rt_pipeline_compile()
...
This patch moves the NIR shader creation into radv_rt_pipeline_compile()
and simplifies radv_rt_pipeline_create().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Daniel Schürmann
b314c2aae2
radv/rt: unify radv_rt_pipeline_create() and radv_rt_pipeline_library_create()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Daniel Schürmann
1100f7dcd5
radv/rt: unify radv_ray_tracing_lib_pipeline and radv_ray_tracing_pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Daniel Schürmann
97721f32ca
radv/rt: change base of radv_ray_tracing_lib_pipeline to radv_compute_pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22503 >
2023-05-10 07:02:13 +00:00
Samuel Pitoiset
d115228327
radv: advertise VK_EXT_attachment_feedback_loop_dynamic_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22849 >
2023-05-09 13:29:34 +00:00
Samuel Pitoiset
d740e283e1
radv: implement VK_EXT_attachment_feedback_loop_dynamic_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22849 >
2023-05-09 13:29:34 +00:00
Vitaliy Triang3l Kuzmin
4ed2616ac3
radv: Fix vk_instance_init vk_error instance use-after-free
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22887 >
2023-05-08 14:09:49 +00:00
Samuel Pitoiset
ce64300676
radv: remove ac_surf_info from radv_image
...
Introduce a helper to convert vk_image info to ac_surf_info instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
9e846ab1dc
radv: use vk_image::extent instead of radv_image::info::{width,height,depth}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
cb721d5de5
radv: use vk_image::samples instead of radv_image::info::samples
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
d37b020428
radv: use vk_image::samples instead of radv_image::info::storage_samples
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
8e62bb0dfe
radv: use vk_image::array_layers instead of radv_image::info::array_size
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
b7b9657a70
radv: use vk_image::mip_levels instead of radv_image::info::levels
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
87d31cadad
radv: disable RB+ blend optimizations on GFX11 when a2c is enabled
...
Closes : #8222
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21313 >
2023-05-08 07:22:21 +00:00
Timur Kristóf
9b6945bb65
amd: Cleanup old GS intrinsics code.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:59 +00:00
Timur Kristóf
025c1f5174
ac/nir: Emit legacy GS DONE signal in NIR.
...
Legacy GS needs to emit a DONE signal at the end. Do this in NIR
instead of in the backends.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:59 +00:00
Dave Airlie
fa938dd975
vulkan: write beta extensions into generator scripts.
...
Updated by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21806 >
2023-05-04 02:40:06 +00:00
Friedrich Vock
0b251d4362
radv: Add driconf to always drain waves before writing timestamps
...
UE4's Vulkan backend uses vkCmdWriteTimestamp with TOP_OF_PIPE
to measure how long a workload took in the GPU Benchmark. This is wrong
and writes the timestamp before the workload is actually finished,
making it seem like the GPU is much faster than it actually is.
This caused subsequent benchmark passes to contain way too big workloads,
which caused soft hangs on slower GPUs.
Fixes GPU hangs with Splitgate during automatic settings configuration.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22823 >
2023-05-03 15:24:00 +00:00
Friedrich Vock
284e604872
radv: Always call si_emit_cache_flush before writing timestamps
...
In case of barriers with TOP_OF_PIPE as dst stage, writing timestamps
immediately would be invalid.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22823 >
2023-05-03 15:24:00 +00:00
Samuel Pitoiset
b59935e2e7
radv/meta: rename dest to dst
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22794 >
2023-05-03 13:45:38 +00:00
Samuel Pitoiset
63b5b93dd3
radv: replace radv_get_levelCount() by vk_image_subresource_level_count()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22794 >
2023-05-03 13:45:38 +00:00
Samuel Pitoiset
963f51158d
radv: replace radv_get_layerCount by vk_image_subresource_layer_count()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22794 >
2023-05-03 13:45:38 +00:00
Samuel Pitoiset
a77c88f1e8
radv: fix fast-clearing images with VK_REMAINING_{ARRAY_LAYERS,MIP_LEVELS}
...
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22794 >
2023-05-03 13:45:38 +00:00
Samuel Pitoiset
de61eddc02
radv: fix invalid type for usage in radv_get_buffer_memory_requirements()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22794 >
2023-05-03 13:45:38 +00:00
Bas Nieuwenhuizen
df08ed7d1c
radv: Move all the dirty flags from TES binding to TCS binding.
...
With merged shaders we might not have an explicit TES.
Fixes: 879ddf9720 ("radv: rework binding shaders to cmdbuf by introducing new helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8939
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22784 >
2023-05-03 11:24:16 +00:00
Georg Lehmann
f572344901
radv: use lower_ballot_bit_count_to_mbcnt_amd
...
Foz-DB Navi21:
Totals from 62 (0.05% of 134864) affected shaders:
VGPRs: 2464 -> 2440 (-0.97%)
CodeSize: 332408 -> 324276 (-2.45%)
MaxWaves: 1690 -> 1692 (+0.12%)
Instrs: 62356 -> 60828 (-2.45%)
Latency: 595723 -> 592554 (-0.53%)
InvThroughput: 126106 -> 124241 (-1.48%)
SClause: 2163 -> 2162 (-0.05%)
Copies: 6392 -> 6226 (-2.60%); split: -2.94%, +0.34%
Branches: 2295 -> 2298 (+0.13%)
PreSGPRs: 2390 -> 2389 (-0.04%)
PreVGPRs: 2139 -> 2117 (-1.03%); split: -1.08%, +0.05%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22783 >
2023-05-03 10:39:20 +00:00
Constantine Shablya
61413d70a0
vulkan: introduce supported_features parameter to vk_physical_device_init
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22333 >
2023-05-03 03:27:54 +00:00
Daniel Schürmann
cf13a1d791
radv/rt: Fix and improve VkPipelineCreationFeedback
...
Due to a copy-paste error, we asserted pipelineStageCreationFeedbackCount == 1
and wrote the stage feedback of the combined shader into the feedback of the first
stage. This is fixed.
Instead, we now write the precompilation feedback for each stage. This not ideal,
but definitely an improvement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
7070c4e5ff
radv/rt: remove merged VkPipelineShaderStageCreateInfo
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
4408395a30
radv/rt: refactor compute_rt_stack_size() to use radv_ray_tracing_stage information
...
instead of pStages.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
8ec81a43cb
radv/rt: use precompiled stages to create RT shader
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
7836e32778
radv/rt: retain parsed NIR shaders in radv_ray_tracing_lib_pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
284ab601a5
radv/rt: introduce struct radv_ray_tracing_stage
...
The purpose of this struct is to bundle per-stage information
for ray-tracing pipelines.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
a5b0b150df
radv/rt: expose radv_parse_rt_stage()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
8665506cbd
radv/pipeline_cache: add NIR caching capabilities
...
This patch adds functions to radv_pipeline_cache in order to cache
serialized NIR shaders as opaque cache objects.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22100 >
2023-05-02 19:15:10 +00:00
Daniel Schürmann
7fc259e4e7
radv: add padding to radv_shader_binary_legacy
...
This fixes an alignment mismatch in radv_shader_serialize()
Fixes: 577d76f60f ('radv: add radv_shader_serialize() and radv_shader_deserialize() functions')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22735 >
2023-05-02 14:33:56 +00:00
Rhys Perry
7cda715ad6
radv: fix bc optimization with POS_W_FLOAT_ENA(1)
...
0286CC_PERSP_CENTER_ENA is also set if:
- No barycentrics are used
- POS_W_FLOAT is enabled
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: a4b60295a7 ("aco,ac/llvm,radv,radeonsi: handle ps bc optimization in nir for radv")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8928
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22782 >
2023-05-02 12:18:50 +00:00
Samuel Pitoiset
e25e4c81de
radv: fix dynamic depth clamp enable support
...
The Vulkan spec says:
"If the depth clamping state is changed dynamically, and the pipeline
was not created with VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT enabled,
then depth clipping is enabled when depth clamping is disabled and
vice versa"
Fixes: e48c0fbd8f ("radv: add support for dynamic depth clamp enable")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22777 >
2023-05-02 07:00:59 +00:00
Yiwei Zhang
34cc37910f
radv: respect VK_QUERY_RESULT_WAIT_BIT in GetQueryPoolResults
...
The flag was ignored for VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT and
VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22781 >
2023-05-01 18:07:24 +00:00
Samuel Pitoiset
dbab98d9d6
radv: enable RADV_THREAD_TRACE_CACHE_COUNTERS by default
...
It should work but if not enabled by default, I think most people
forget about it.
If you have any issues with it, you can disable by using
RADV_THREAD_TRACE_CACHE_COUNTERS=false and please report!
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22763 >
2023-05-01 13:38:53 +00:00
Bas Nieuwenhuizen
040aeb5a23
radv: Add asserts in radeon_emit{,_array}.
...
Also add an unsafe helper for some winsys stuff that can't really
use the reservation mechanism (e.g. chaining between cmdbuffers).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20152 >
2023-04-30 22:33:52 +02:00
Bas Nieuwenhuizen
7893040f80
radv: Add stricter space checks.
...
The check for max_dw means that none of checks triggered reliably
when we had an issue. Use a stricter reserved dw measure to increase
the probability of catching issues.
Adds a radeon_check_space to some places after cs_create as they
previously relied on the min. cs size, but that would still trigger
the checks.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20152 >
2023-04-30 22:33:52 +02:00
Bas Nieuwenhuizen
4c204db0a7
radv: Reserve space in the ACE pre/postambles.
...
Since we check reservations now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20152 >
2023-04-30 22:33:52 +02:00
Bas Nieuwenhuizen
17a7c55ea7
radv: Reserve space for indirect descriptor set address writes.
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20152 >
2023-04-30 22:33:52 +02:00
Samuel Pitoiset
559d3b0f9a
ac,radv,radeonsi: rename thread_trace to sqtt everywhere
...
SQTT stands for SQ Thread Trace but it's shorter.
Note that environment variables aren't renamed because this might
break external applications.
This renames:
- ac_thread_trace_data to ac_sqtt (this is the main struct)
- ac_thread_trace_info to ac_sqtt_data_info
- ac_thread_trace_se to ac_sqtt_data_se
- ac_thread_trace to ac_sqtt_trace (this contains trace only)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:13 +00:00
Samuel Pitoiset
3a19c36618
radv: do not abort when the SQTT buffer resize failed
...
This seems to much. While we are at it, update the error msg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:12 +00:00
Samuel Pitoiset
1202d8b0f9
ac/sqtt: add ac_sqtt_get_trace() helper
...
It can be shared between RADV and RadeonSI. The only difference is
that RadeonSI can't auto-resize the SQTT BO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:12 +00:00
Samuel Pitoiset
d0a11c5b9e
ac/sqtt: add ac_sqtt_se_is_disabled() helper
...
It can be shared between RADV and RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:12 +00:00