radv: Add group info to pipeline.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592>
This commit is contained in:
Bas Nieuwenhuizen 2021-08-16 00:04:30 +02:00 committed by Marge Bot
parent 080400e43c
commit 0f090a51b3
2 changed files with 19 additions and 0 deletions

View File

@ -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]);

View File

@ -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;