diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 48ffa49ee77..079edc0c4bc 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -177,6 +177,11 @@ static void radv_pipeline_destroy(struct radv_device *device, struct radv_pipeline *pipeline, const VkAllocationCallbacks *allocator) { + if (pipeline->type == RADV_PIPELINE_COMPUTE) { + free(pipeline->compute.rt_group_handles); + free(pipeline->compute.rt_stack_sizes); + } + for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) if (pipeline->shaders[i]) radv_shader_variant_destroy(device, pipeline->shaders[i]); diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 47d968f670c..8eef46d5024 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1734,6 +1734,16 @@ enum radv_pipeline_type { RADV_PIPELINE_COMPUTE, }; +struct radv_pipeline_group_handle { + uint32_t handles[2]; +}; + +struct radv_pipeline_shader_stack_size { + uint32_t recursive_size; + /* anyhit + intersection */ + uint32_t non_recursive_size; +}; + struct radv_pipeline { struct vk_object_base base; enum radv_pipeline_type type; @@ -1798,6 +1808,10 @@ struct radv_pipeline { /* Last pre-PS API stage */ gl_shader_stage last_vgt_api_stage; } graphics; + struct { + struct radv_pipeline_group_handle *rt_group_handles; + struct radv_pipeline_shader_stack_size *rt_stack_sizes; + } compute; }; unsigned max_waves;