radv/rt: Clone entrypoint names
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Sat, 12 Nov 2022 18:01:52 +0000 (19:01 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 14 Nov 2022 20:56:27 +0000 (20:56 +0000)
Fixes a vtn crash with
dEQP-VK.ray_tracing_pipeline.pipeline_library.configurations.singlethreaded_compilation.s0_l1
and validation enabled.

Closes: #7642
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19700>

src/amd/vulkan/radv_pipeline_rt.c

index a3cce18..aee1e24 100644 (file)
@@ -167,6 +167,9 @@ radv_rt_pipeline_library_create(VkDevice _device, VkPipelineCache _cache,
             memcpy(new_module->data, module->data, module->size);
 
             pipeline->stages[i].module = vk_shader_module_to_handle(new_module);
+            pipeline->stages[i].pName = ralloc_strdup(pipeline->ctx, pipeline->stages[i].pName);
+            if (!pipeline->stages[i].pName)
+               goto fail;
             pipeline->stages[i].pNext = NULL;
          } else {
             assert(iinfo);