Mesa (main): radv: Add dispatch_initiator_task field to radv_device.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 20 19:31:56 UTC 2022
Module: Mesa
Branch: main
Commit: 44a71594c8da706b543b80cdaf814e5e51da7f10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=44a71594c8da706b543b80cdaf814e5e51da7f10
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Fri Jul 15 12:06:11 2022 +0200
radv: Add dispatch_initiator_task field to radv_device.
This is going to be used with task shader dispatches.
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
---
src/amd/vulkan/radv_device.c | 7 +++++++
src/amd/vulkan/radv_private.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 656a03df015..d5627be5bfa 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -3509,6 +3509,13 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
device->dispatch_initiator |= S_00B800_ORDER_MODE(1);
}
+ /* Disable partial preemption for task shaders.
+ * The kernel may not support preemption, but PAL always sets this bit,
+ * so let's also set it here for consistency.
+ */
+ device->dispatch_initiator_task =
+ device->dispatch_initiator | S_00B800_DISABLE_DISP_PREMPT_EN(1);
+
if (device->instance->debug_flags & RADV_DEBUG_HANG) {
/* Enable GPU hangs detection and dump logs if a GPU hang is
* detected.
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 7e9b6f65be1..e9bd90c401b 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -810,6 +810,7 @@ struct radv_device {
bool pbb_allowed;
uint32_t scratch_waves;
uint32_t dispatch_initiator;
+ uint32_t dispatch_initiator_task;
/* MSAA sample locations.
* The first index is the sample index.
More information about the mesa-commit
mailing list