radv/rt: reference library shaders during radv_rt_fill_stage_info()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
This commit is contained in:
committed by
Marge Bot
parent
772b5b3758
commit
7f2a569ec5
@@ -210,9 +210,10 @@ radv_rt_fill_stage_info(const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
|
||||
struct radv_ray_tracing_pipeline *library_pipeline =
|
||||
radv_pipeline_to_ray_tracing(pipeline);
|
||||
for (unsigned j = 0; j < library_pipeline->stage_count; ++j) {
|
||||
stages[idx].shader = vk_pipeline_cache_object_ref(library_pipeline->stages[j].shader);
|
||||
stages[idx].stage = library_pipeline->stages[j].stage;
|
||||
stages[idx].stack_size = library_pipeline->stages[j].stack_size;
|
||||
memcpy(stages[idx].sha1, library_pipeline->stages[j].sha1, SHA1_DIGEST_LENGTH);
|
||||
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
@@ -367,9 +368,7 @@ radv_rt_precompile_shaders(struct radv_device *device, struct vk_pipeline_cache
|
||||
const struct radv_pipeline_key *key,
|
||||
struct radv_ray_tracing_stage *stages)
|
||||
{
|
||||
uint32_t idx;
|
||||
|
||||
for (idx = 0; idx < pCreateInfo->stageCount; idx++) {
|
||||
for (uint32_t idx = 0; idx < pCreateInfo->stageCount; idx++) {
|
||||
int64_t stage_start = os_time_get_nano();
|
||||
struct radv_pipeline_stage stage;
|
||||
radv_pipeline_stage_init(&pCreateInfo->pStages[idx], &stage, stages[idx].stage);
|
||||
@@ -409,17 +408,6 @@ radv_rt_precompile_shaders(struct radv_device *device, struct vk_pipeline_cache
|
||||
}
|
||||
}
|
||||
|
||||
/* reference library shaders */
|
||||
if (pCreateInfo->pLibraryInfo) {
|
||||
for (unsigned i = 0; i < pCreateInfo->pLibraryInfo->libraryCount; ++i) {
|
||||
RADV_FROM_HANDLE(radv_pipeline, pipeline, pCreateInfo->pLibraryInfo->pLibraries[i]);
|
||||
struct radv_ray_tracing_pipeline *library = radv_pipeline_to_ray_tracing(pipeline);
|
||||
|
||||
for (unsigned j = 0; j < library->stage_count; ++j)
|
||||
stages[idx++].shader = vk_pipeline_cache_object_ref(library->stages[j].shader);
|
||||
}
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user