mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-08 14:38:18 +02:00
radv: include ahit/isec shaders in radv_get_shader_from_executable_index
This is necessary for GetPipelineExecutablePropertiesKHR, RADV_DEBUG and fossil-db. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39827>
This commit is contained in:
parent
e231405de2
commit
c811348dc2
1 changed files with 15 additions and 0 deletions
|
|
@ -627,6 +627,8 @@ radv_get_executable_count(struct radv_pipeline *pipeline)
|
|||
struct radv_ray_tracing_pipeline *rt_pipeline = radv_pipeline_to_ray_tracing(pipeline);
|
||||
for (uint32_t i = 0; i < rt_pipeline->stage_count; i++)
|
||||
ret += rt_pipeline->stages[i].shader ? 1 : 0;
|
||||
for (uint32_t i = 0; i < rt_pipeline->group_count; i++)
|
||||
ret += rt_pipeline->groups[i].ahit_isec_shader ? 1 : 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; ++i) {
|
||||
|
|
@ -657,6 +659,19 @@ radv_get_shader_from_executable_index(struct radv_pipeline *pipeline, int index,
|
|||
return rt_stage->shader;
|
||||
}
|
||||
|
||||
index--;
|
||||
}
|
||||
for (uint32_t i = 0; i < rt_pipeline->group_count; i++) {
|
||||
struct radv_ray_tracing_group *rt_group = &rt_pipeline->groups[i];
|
||||
if (!rt_group->ahit_isec_shader)
|
||||
continue;
|
||||
|
||||
if (!index) {
|
||||
*stage =
|
||||
rt_group->intersection_shader != VK_SHADER_UNUSED_KHR ? MESA_SHADER_INTERSECTION : MESA_SHADER_ANY_HIT;
|
||||
return rt_group->ahit_isec_shader;
|
||||
}
|
||||
|
||||
index--;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue