diff --git a/layers/chassis/dispatch_object_manual.cpp b/layers/chassis/dispatch_object_manual.cpp index 49db2a50a2f..f1ad94b723e 100644 --- a/layers/chassis/dispatch_object_manual.cpp +++ b/layers/chassis/dispatch_object_manual.cpp @@ -2622,15 +2622,13 @@ VkResult DispatchDevice::CreateIndirectExecutionSetEXT(VkDevice device, const Vk switch (local_pCreateInfo.type) { case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT: if (local_pCreateInfo.info.pPipelineInfo) { - auto* pipeline_info = reinterpret_cast( - const_cast(local_pCreateInfo.info.pPipelineInfo)); + auto* pipeline_info = const_cast(local_pCreateInfo.info.pPipelineInfo); pipeline_info->initialPipeline = Unwrap(pipeline_info->initialPipeline); } break; case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT: if (local_pCreateInfo.info.pShaderInfo) { - auto* shader_info = reinterpret_cast( - const_cast(local_pCreateInfo.info.pShaderInfo)); + auto* shader_info = (vku::safe_VkIndirectExecutionSetShaderInfoEXT*)local_pCreateInfo.info.pShaderInfo; for (uint32_t index0 = 0; index0 < shader_info->shaderCount; ++index0) { if (shader_info->pSetLayoutInfos) { const auto& set_layout = shader_info->pSetLayoutInfos[index0]; diff --git a/layers/gpu_dump/gpu_dump_device_generated_commands.cpp b/layers/gpu_dump/gpu_dump_device_generated_commands.cpp index e1b124277ca..3b863d6a58c 100644 --- a/layers/gpu_dump/gpu_dump_device_generated_commands.cpp +++ b/layers/gpu_dump/gpu_dump_device_generated_commands.cpp @@ -37,6 +37,9 @@ void CommandBufferSubState::DumpDeviceGeneratedCommands(const VkGeneratedCommand return; // Invalid handle, will be caught by object lifetime validation } const auto indirect_execution_set = dev_data.Get(info.indirectExecutionSet); + if (info.indirectExecutionSet != VK_NULL_HANDLE && !indirect_execution_set) { + return; // Invalid handle, will be caught by object lifetime validation + } std::ostringstream ss; ss << "[Dump Device Generated Commands] (" << dev_data.FormatHandle(base.Handle()) << ", "