Samuel Pitoiset
c51c68ba4b
radv: implement dynamic sample locations enable
...
VK_EXT_sample_locations is only supported on < GFX10 due to some weird
issues on recent GPUs. extendedDynamicState3SampleLocationsEnable is
only enabled on GFX6-GFX9 for the same reason.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22947 >
2023-05-15 08:14:31 +02:00
Konstantin Seurer
1671b5fd1f
radv: Stop running constant folding during ray query lowering
...
Now that committed is an intrinsic index, there is no need for constant
folding.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22963 >
2023-05-14 17:28:40 +00:00
Konstantin Seurer
0cf22f9af3
nir: Make rq_load committed src an index
...
committed has to be a constant so there is no need to have a src and
depend on constant folding to remove the i2b.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22963 >
2023-05-14 17:28:40 +00:00
Alyssa Rosenzweig
ce638eafe2
aco,radv: Use unified atomics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22914 >
2023-05-12 20:39:46 +00:00
Samuel Pitoiset
088e25216f
radv: configure PA_CL_VRS_CNTL entirely from the cmd buffer
...
We already have all the information needed to configure it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22942 >
2023-05-12 06:39:11 +00:00
Samuel Pitoiset
be0ba9a1c0
radv: re-emit fragment shading rate state when PA_CL_VRS_CNTL changes
...
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/22942 >
2023-05-12 06:39:11 +00:00
Samuel Pitoiset
041cf2d48e
radv: dirty the dynamic vertex input state only when needed
...
This shouldn't be necessary when the VS doesn't have a prolog.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22944 >
2023-05-12 06:20:02 +00:00
Samuel Pitoiset
8688e11013
radv: reset the emitted VS prolog when a new vertex shader is bound
...
When a new vertex shader is bound, the VS prolog needs to be
re-emitted, and this allows us to avoid tracking if the pipeline is
dirty.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22944 >
2023-05-12 06:20:02 +00:00
Chia-I Wu
6aee7848bb
radv: improve externalMemoryFeatures for android ahb
...
VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT should always be set, as
required by the spec.
VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT should be set when
radv_ahb_format_for_vk_format knowns the format. That is,
radv_create_ahb_memory should at least know how to call
AHardwareBuffer_allocate.
VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT is always set. We can't know
if gralloc can allocate the format/flags/usage combo or not (gralloc
might use a private format for the combo).
Fixed
dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
47b37651f8
vulkan: add vk_image_format_to_ahb_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
380180516c
anv,hasvk,radv: do not fall back to AHARDWAREBUFFER_FORMAT_BLOB
...
When allocating a VkDeviceMemory exportable as AHB, it seems incorrect
to fall back to AHARDWAREBUFFER_FORMAT_BLOB when the image has no known
AHB format. We should fail the allocation instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
50e703f347
vulkan: add vk_ahb_format_to_image_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
2bbe0462e8
vulkan: define inline stubs when android api level < 26
...
This allows us to reduce ANDROID #ifdef's.
v2: always include vk_android.h in radv_formats.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
f81dce9bcc
vulkan: rename vk_image::ahardware_buffer_format
...
Rename it to ahb_format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Daniel Schürmann
d3f06cf5ce
vulkan/pipeline_cache: don't log warnings for internal caches
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22850 >
2023-05-11 08:36:12 +00:00
Simon Ser
31e6d15801
radv: advertise LINEAR filter support for multiplanar/subsampled
...
It seems like radv supports this but doesn't advertise it.
Signed-off-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22875 >
2023-05-10 10:02:27 +00:00
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