@@ -1356,6 +1356,9 @@ pl_create_compute_shader(plDevice* ptDevice, const plComputeShaderDesc* ptDescri
13561356 plComputeShaderHandle tHandle = pl__get_new_compute_shader_handle (ptDevice );
13571357 plComputeShader * ptShader = pl__get_compute_shader (ptDevice , tHandle );
13581358 ptShader -> tDesc = * ptDescription ;
1359+
1360+ if (ptShader -> tDesc .pcDebugName == NULL )
1361+ ptShader -> tDesc .pcDebugName = "unnamed compute shader" ;
13591362
13601363 plVulkanComputeShader * ptVulkanShader = & ptDevice -> sbtComputeShadersHot [tHandle .uIndex ];
13611364
@@ -1437,7 +1440,7 @@ pl_create_compute_shader(plDevice* ptDevice, const plComputeShaderDesc* ptDescri
14371440 .stage = tShaderStage
14381441 };
14391442 PL_VULKAN (vkCreateComputePipelines (ptDevice -> tLogicalDevice , VK_NULL_HANDLE , 1 , & tPipelineCreateInfo , gptGraphics -> ptAllocationCallbacks , & ptVulkanShader -> tPipeline ));
1440-
1443+ pl__set_vulkan_object_name ( ptDevice , ( uint64_t ) ptVulkanShader -> tPipeline , VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT , ptShader -> tDesc . pcDebugName );
14411444 return tHandle ;
14421445}
14431446
@@ -1449,6 +1452,9 @@ pl_create_shader(plDevice* ptDevice, const plShaderDesc* ptDescription)
14491452 ptShader -> tDesc = * ptDescription ;
14501453 uint32_t uStageCount = 1 ;
14511454
1455+ if (ptShader -> tDesc .pcDebugName == NULL )
1456+ ptShader -> tDesc .pcDebugName = "unnamed shader" ;
1457+
14521458 plVulkanShader * ptVulkanShader = & ptDevice -> sbtShadersHot [tHandle .uIndex ];
14531459
14541460 // TODO: handle these properly
@@ -1705,6 +1711,7 @@ pl_create_shader(plDevice* ptDevice, const plShaderDesc* ptDescription)
17051711 };
17061712
17071713 PL_VULKAN (vkCreateGraphicsPipelines (ptDevice -> tLogicalDevice , VK_NULL_HANDLE , 1 , & tPipelineInfo , gptGraphics -> ptAllocationCallbacks , & tVulkanShader .tPipeline ));
1714+ pl__set_vulkan_object_name (ptDevice , (uint64_t )tVulkanShader .tPipeline , VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT , ptShader -> tDesc .pcDebugName );
17081715 ptVulkanShader -> tPipeline = tVulkanShader .tPipeline ;
17091716 ptVulkanShader -> tPipelineLayout = tVulkanShader .tPipelineLayout ;
17101717 return tHandle ;
0 commit comments