From f6f302bbbcbe020542b49fc26f30ac4c09d092ad Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Tue, 1 Aug 2023 14:38:19 +0200 Subject: [PATCH] lavapipe: Advertise AMDX_shader_enqueue Reviewed-by: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 15 +++++++++++++++ src/gallium/frontends/lavapipe/lvp_pipeline.c | 1 + 2 files changed, 16 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 92eda7fcbde..90b4199a247 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -214,6 +214,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported = .EXT_provoking_vertex = true, .EXT_line_rasterization = true, .EXT_robustness2 = true, + .AMDX_shader_enqueue = true, .GOOGLE_decorate_string = true, .GOOGLE_hlsl_functionality1 = true, .NV_device_generated_commands = true, @@ -584,6 +585,11 @@ lvp_get_features(const struct lvp_physical_device *pdevice, /* maintenance5 */ .maintenance5 = true, + + /* VK_AMDX_shader_enqueue */ +#ifdef VK_ENABLE_BETA_EXTENSIONS + .shaderEnqueue = true, +#endif }; } @@ -994,6 +1000,15 @@ lvp_get_properties(const struct lvp_physical_device *device, struct vk_propertie .prefersLocalInvocationPrimitiveOutput = true, .prefersCompactVertexOutput = true, .prefersCompactPrimitiveOutput = false, + + /* VK_AMDX_shader_enqueue */ +#ifdef VK_ENABLE_BETA_EXTENSIONS + .maxExecutionGraphDepth = 32, + .maxExecutionGraphShaderOutputNodes = LVP_MAX_EXEC_GRAPH_PAYLOADS, + .maxExecutionGraphShaderPayloadSize = 0xFFFF, + .maxExecutionGraphShaderPayloadCount = LVP_MAX_EXEC_GRAPH_PAYLOADS, + .executionGraphDispatchAddressAlignment = 4, +#endif }; /* Vulkan 1.0 */ diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 2beba91b79a..934051d8f97 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -332,6 +332,7 @@ compile_spirv(struct lvp_device *pdevice, const VkPipelineShaderStageCreateInfo .descriptor_array_non_uniform_indexing = true, .descriptor_indexing = true, .runtime_descriptor_array = true, + .shader_enqueue = true, }, .ubo_addr_format = nir_address_format_vec2_index_32bit_offset, .ssbo_addr_format = nir_address_format_vec2_index_32bit_offset,