@@ -820,31 +820,30 @@ void GpuShaderInstrumentor::PostCallRecordCreateRayTracingPipelinesKHR(
820820 return ;
821821 }
822822
823- deferred_op_post_checks.emplace_back (
824- [this , held_chassis_state = chassis_state](std::pair<uint32_t , VkPipeline *> pipelines) mutable {
825- for (const auto [pipe_i, pipe] : vvl::enumerate (pipelines.second , pipelines.first )) {
826- std::shared_ptr<vvl::Pipeline> pipeline_state = ((GpuShaderInstrumentor *)this )->Get <vvl::Pipeline>(pipe);
827- ASSERT_AND_CONTINUE (pipeline_state);
828- if (pipeline_state->ray_tracing_library_ci ) {
829- for (VkPipeline lib : vvl::make_span (pipeline_state->ray_tracing_library_ci ->pLibraries ,
830- pipeline_state->ray_tracing_library_ci ->libraryCount )) {
831- auto lib_state = ((GpuShaderInstrumentor *)this )->Get <vvl::Pipeline>(lib);
832- ASSERT_AND_CONTINUE (lib_state);
833- pipeline_state->instrumentation_data .was_instrumented |=
834- lib_state->instrumentation_data .was_instrumented ;
835- }
823+ deferred_op_post_checks.emplace_back ([this , held_chassis_state =
824+ chassis_state](std::pair<uint32_t , VkPipeline *> pipelines) mutable {
825+ for (const auto [pipe_i, pipe] : vvl::enumerate (pipelines.second , pipelines.first )) {
826+ std::shared_ptr<vvl::Pipeline> pipeline_state = ((GpuShaderInstrumentor *)this )->Get <vvl::Pipeline>(pipe);
827+ ASSERT_AND_CONTINUE (pipeline_state);
828+ if (pipeline_state->ray_tracing_library_ci ) {
829+ for (VkPipeline lib : vvl::make_span (pipeline_state->ray_tracing_library_ci ->pLibraries ,
830+ pipeline_state->ray_tracing_library_ci ->libraryCount )) {
831+ auto lib_state = ((GpuShaderInstrumentor *)this )->Get <vvl::Pipeline>(lib);
832+ ASSERT_AND_CONTINUE (lib_state);
833+ pipeline_state->instrumentation_data .was_instrumented |= lib_state->instrumentation_data .was_instrumented ;
836834 }
837- auto &shader_instrumentation_metadata = held_chassis_state->shader_instrumentations_metadata [pipe_i];
838- // Ray tracing pipelines can be made of libraries, but contrary to GPL instrumentation is not postponed
839- // to final link time, and done at ray tracing library creation time.
840- // => No need to iterate over shader stages coming from libraries,
841- // stop at VkRayTracingPipelineCreateInfoKHR::stageCount
842- // Note: This code implicitly relies on the fact that in pipeline_state->stage_states,
843- // stages coming from libraries are added last.
844- PostCallRecordPipelineCreationShaderInstrumentation (
845- *pipeline_state, pipeline_state->RayTracingCreateInfo ().stageCount , shader_instrumentation_metadata);
846835 }
847- });
836+ auto &shader_instrumentation_metadata = held_chassis_state->shader_instrumentations_metadata [pipe_i];
837+ // Ray tracing pipelines can be made of libraries, but contrary to GPL instrumentation is not postponed
838+ // to final link time, and done at ray tracing library creation time.
839+ // => No need to iterate over shader stages coming from libraries,
840+ // stop at VkRayTracingPipelineCreateInfoKHR::stageCount
841+ // Note: This code implicitly relies on the fact that in pipeline_state->stage_states,
842+ // stages coming from libraries are added last.
843+ PostCallRecordPipelineCreationShaderInstrumentation (
844+ *pipeline_state, pipeline_state->RayTracingCreateInfo ().stageCount , shader_instrumentation_metadata);
845+ }
846+ });
848847 dispatch_device_->deferred_operation_post_check .insert (deferredOperation, std::move (deferred_op_post_checks));
849848 } else {
850849 for (uint32_t i = 0 ; i < count; ++i) {
@@ -1129,7 +1128,7 @@ bool GpuShaderInstrumentor::PreCallRecordPipelineCreationShaderInstrumentation(
11291128 auto modified_module_state = std::const_pointer_cast<vvl::ShaderModule>(stage_state.module_state );
11301129 ASSERT_AND_CONTINUE (modified_module_state);
11311130 if (!modified_module_state->spirv ) {
1132- continue ; // Hit when using VK_KHR_pipeline_binary
1131+ continue ; // Hit when using VK_KHR_pipeline_binary
11331132 }
11341133 std::unique_lock<std::mutex> module_lock (modified_module_state->module_mutex_ );
11351134
@@ -1818,8 +1817,9 @@ std::string GpuShaderInstrumentor::GenerateDebugInfoMessage(VkCommandBuffer comm
18181817 ss << " Unknown Pipeline Operation " ;
18191818 }
18201819
1821- if (action_command_index == cst::invalid_index_command) {
1822- ss << " Index Unknown (After " << cst::invalid_index_command << " commands, we stop tracking) \n " ;
1820+ uint32_t invalid_index_command = dispatch_instance_->settings .gpuav_settings .GetInvalidIndexCommand ();
1821+ if (action_command_index == invalid_index_command) {
1822+ ss << " Index Unknown (After " << invalid_index_command << " commands, we stop tracking) \n " ;
18231823 } else {
18241824 ss << " Index " << action_command_index << ' \n ' ;
18251825 }
0 commit comments