mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
vulkan: add pipeline helper to retrieve scratch-size/ray-queries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31384>
This commit is contained in:
parent
35b0d3569e
commit
c6dc2df9e5
2 changed files with 20 additions and 0 deletions
|
|
@ -2726,6 +2726,20 @@ struct vk_rt_pipeline {
|
|||
uint8_t dynamic_descriptor_offsets[MESA_VK_MAX_DESCRIPTOR_SETS];
|
||||
};
|
||||
|
||||
uint32_t
|
||||
vk_pipeline_get_rt_scratch_size(struct vk_pipeline *pipeline)
|
||||
{
|
||||
assert(pipeline->bind_point == VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR);
|
||||
return container_of(pipeline, struct vk_rt_pipeline, base)->scratch_size;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
vk_pipeline_get_rt_ray_queries(struct vk_pipeline *pipeline)
|
||||
{
|
||||
assert(pipeline->bind_point == VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR);
|
||||
return container_of(pipeline, struct vk_rt_pipeline, base)->ray_queries;
|
||||
}
|
||||
|
||||
static struct vk_rt_stage
|
||||
vk_rt_stage_ref(struct vk_rt_stage *stage)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -230,6 +230,12 @@ void
|
|||
vk_cmd_unbind_pipelines_for_stages(struct vk_command_buffer *cmd_buffer,
|
||||
VkShaderStageFlags stages);
|
||||
|
||||
uint32_t
|
||||
vk_pipeline_get_rt_scratch_size(struct vk_pipeline *pipeline);
|
||||
|
||||
uint32_t
|
||||
vk_pipeline_get_rt_ray_queries(struct vk_pipeline *pipeline);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue