@@ -1061,6 +1061,63 @@ void replay_postprocess_vkCmdPushConstants2(lava_file_reader& reader, VkCommandB
1061
1061
replay_postprocess_vkCmdPushConstants2KHR (reader, commandBuffer, pPushConstantsInfo);
1062
1062
}
1063
1063
1064
+ static void copy_shader_stage (shader_stage& stage, const VkPipelineShaderStageCreateInfo& info)
1065
+ {
1066
+ stage.flags = info.flags ;
1067
+ stage.module = info.module ;
1068
+ stage.name = info.pName ;
1069
+ if (info.pSpecializationInfo )
1070
+ {
1071
+ stage.specialization_constants .resize (info.pSpecializationInfo ->mapEntryCount );
1072
+ memcpy (stage.specialization_constants .data (), info.pSpecializationInfo ->pMapEntries , info.pSpecializationInfo ->mapEntryCount * sizeof (uint32_t ));
1073
+ stage.specialization_data .resize (info.pSpecializationInfo ->dataSize );
1074
+ memcpy (stage.specialization_data .data (), info.pSpecializationInfo ->pData , info.pSpecializationInfo ->dataSize );
1075
+ }
1076
+ }
1077
+
1078
+ void replay_postprocess_vkCreateComputePipelines (lava_file_reader& reader, VkResult result, VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount,
1079
+ const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
1080
+ {
1081
+ for (uint32_t i = 0 ; i < createInfoCount; i++)
1082
+ {
1083
+ const uint32_t pipeline_index = index_to_VkPipeline.index (pPipelines[i]);
1084
+ trackedpipeline& pipeline_data = VkPipeline_index.at (pipeline_index);
1085
+ pipeline_data.shader_stages .resize (1 );
1086
+ copy_shader_stage (pipeline_data.shader_stages [0 ], pCreateInfos[i].stage );
1087
+ }
1088
+ }
1089
+
1090
+ void replay_postprocess_vkCreateGraphicsPipelines (lava_file_reader& reader, VkResult result, VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount,
1091
+ const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
1092
+ {
1093
+ for (uint32_t i = 0 ; i < createInfoCount; i++)
1094
+ {
1095
+ const uint32_t pipeline_index = index_to_VkPipeline.index (pPipelines[i]);
1096
+ trackedpipeline& pipeline_data = VkPipeline_index.at (pipeline_index);
1097
+ pipeline_data.shader_stages .resize (pCreateInfos[i].stageCount );
1098
+ for (uint32_t stage = 0 ; stage < pCreateInfos[i].stageCount ; stage++)
1099
+ {
1100
+ copy_shader_stage (pipeline_data.shader_stages [0 ], pCreateInfos[i].pStages [stage]);
1101
+ }
1102
+ }
1103
+ }
1104
+
1105
+
1106
+ void replay_postprocess_vkCreateRayTracingPipelinesKHR (lava_file_reader& reader, VkResult result, VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache,
1107
+ uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
1108
+ {
1109
+ for (uint32_t i = 0 ; i < createInfoCount; i++)
1110
+ {
1111
+ const uint32_t pipeline_index = index_to_VkPipeline.index (pPipelines[i]);
1112
+ trackedpipeline& pipeline_data = VkPipeline_index.at (pipeline_index);
1113
+ pipeline_data.shader_stages .resize (pCreateInfos[i].stageCount );
1114
+ for (uint32_t stage = 0 ; stage < pCreateInfos[i].stageCount ; stage++)
1115
+ {
1116
+ copy_shader_stage (pipeline_data.shader_stages [0 ], pCreateInfos[i].pStages [stage]);
1117
+ }
1118
+ }
1119
+ }
1120
+
1064
1121
void replay_pre_vkCmdPushConstants2KHR (lava_file_reader& reader, VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo)
1065
1122
{
1066
1123
assert (pPushConstantsInfo);
0 commit comments