diff options
author | Mark Lobodzinski <mark@lunarg.com> | 2019-03-06 16:19:55 -0700 |
---|---|---|
committer | Mark Lobodzinski <mark@lunarg.com> | 2019-03-07 11:22:45 -0700 |
commit | 9e9da29038d801ce3330fb4273d2c5a5affcb350 (patch) | |
tree | 2c3a369bcff77229c97a32085af389166d01357f | |
parent | 8b0a7b88f1df43233e8a64867615e69feb6fc5da (diff) | |
download | vulkan-validation-layers-9e9da29038d801ce3330fb4273d2c5a5affcb350.tar.gz |
layers: Update GetShaderModuleState helper func
Change-Id: Iaf6feb3ffaeb4d45d1ac4f46502998571c14b42d
-rw-r--r-- | layers/core_validation.cpp | 6 | ||||
-rw-r--r-- | layers/core_validation.h | 2 | ||||
-rw-r--r-- | layers/gpu_validation.cpp | 4 | ||||
-rw-r--r-- | layers/shader_validation.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 719ee1f1e..a88f400ea 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -685,9 +685,9 @@ PIPELINE_LAYOUT_NODE const *CoreChecks::GetPipelineLayout(layer_data const *dev_ return &it->second; } -shader_module const *CoreChecks::GetShaderModuleState(layer_data const *dev_data, VkShaderModule module) { - auto it = dev_data->shaderModuleMap.find(module); - if (it == dev_data->shaderModuleMap.end()) { +shader_module const *CoreChecks::GetShaderModuleState(VkShaderModule module) { + auto it = shaderModuleMap.find(module); + if (it == shaderModuleMap.end()) { return nullptr; } return it->second.get(); diff --git a/layers/core_validation.h b/layers/core_validation.h index 6e9c90e67..35083aaef 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -261,7 +261,7 @@ class CoreChecks : public ValidationObject { std::shared_ptr<RENDER_PASS_STATE> GetRenderPassStateSharedPtr(VkRenderPass renderpass); FRAMEBUFFER_STATE* GetFramebufferState(VkFramebuffer framebuffer); COMMAND_POOL_NODE* GetCommandPoolNode(VkCommandPool pool); - shader_module const* GetShaderModuleState(layer_data const* dev_data, VkShaderModule module); + shader_module const* GetShaderModuleState(VkShaderModule module); const DeviceFeatures* GetEnabledFeatures(const layer_data* device_data); FENCE_NODE* GetFenceNode(layer_data* dev_data, VkFence fence); EVENT_STATE* GetEventNode(layer_data* dev_data, VkEvent event); diff --git a/layers/gpu_validation.cpp b/layers/gpu_validation.cpp index 759347594..4a6925d3b 100644 --- a/layers/gpu_validation.cpp +++ b/layers/gpu_validation.cpp @@ -543,7 +543,7 @@ std::vector<safe_VkGraphicsPipelineCreateInfo> CoreChecks::GpuPreCallRecordCreat for (uint32_t pipeline = 0; pipeline < count; ++pipeline) { if (pipeline_uses_debug_index[pipeline]) { for (uint32_t stage = 0; stage < pCreateInfos[pipeline].stageCount; ++stage) { - const shader_module *shader = GetShaderModuleState(dev_data, pCreateInfos[pipeline].pStages[stage].module); + const shader_module *shader = GetShaderModuleState(pCreateInfos[pipeline].pStages[stage].module); VkShaderModuleCreateInfo create_info = {}; VkShaderModule shader_module; create_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; @@ -583,7 +583,7 @@ void CoreChecks::GpuPostCallRecordCreateGraphicsPipelines(layer_data *dev_data, GetDispatchTable(dev_data)->DestroyShaderModule(GetDevice(dev_data), pCreateInfos->pStages[stage].module, pAllocator); } - auto shader_state = GetShaderModuleState(dev_data, pipeline_state->graphicsPipelineCI.pStages[stage].module); + auto shader_state = GetShaderModuleState(pipeline_state->graphicsPipelineCI.pStages[stage].module); std::vector<unsigned int> code; // Save the shader binary if debug info is present. // The core_validation ShaderModule tracker saves the binary too, but discards it when the ShaderModule diff --git a/layers/shader_validation.cpp b/layers/shader_validation.cpp index a425f666e..3e2ac0310 100644 --- a/layers/shader_validation.cpp +++ b/layers/shader_validation.cpp @@ -1993,7 +1993,7 @@ bool CoreChecks::ValidatePipelineShaderStage(layer_data *dev_data, VkPipelineSha PIPELINE_STATE *pipeline, shader_module const **out_module, spirv_inst_iter *out_entrypoint, bool check_point_size) { bool skip = false; - auto module = *out_module = GetShaderModuleState(dev_data, pStage->module); + auto module = *out_module = GetShaderModuleState(pStage->module); auto report_data = GetReportData(dev_data); if (!module->has_valid_spirv) return false; |