anv: populate rt shader groups if they were found in the cache
authorIván Briano <ivan.briano@intel.com>
Tue, 13 Sep 2022 19:28:42 +0000 (12:28 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 20 Sep 2022 20:03:49 +0000 (20:03 +0000)
If the pipeline does not use libraries and the shaders are all found in
the cache, we end up with empty groups and crash at pipeline emit time.

Fixes a bunch of tests under
dEQP-VK.pipeline.monolithic.shader_module_identifier.\*.ray_tracing\*

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18582>

src/intel/vulkan/anv_pipeline.c

index f7a2e77..a55a8a0 100644 (file)
@@ -2773,6 +2773,7 @@ anv_pipeline_compile_ray_tracing(struct anv_ray_tracing_pipeline *pipeline,
       stages[i].feedback.duration += os_time_get_nano() - stage_start;
    }
 
+ done:
    for (uint32_t i = 0; i < info->groupCount; i++) {
       const VkRayTracingShaderGroupCreateInfoKHR *ginfo = &info->pGroups[i];
       struct anv_rt_shader_group *group = &pipeline->groups[i];
@@ -2838,7 +2839,6 @@ anv_pipeline_compile_ray_tracing(struct anv_ray_tracing_pipeline *pipeline,
       }
    }
 
- done:
    ralloc_free(pipeline_ctx);
 
    anv_pipeline_compute_ray_tracing_stacks(pipeline, info, stack_max);