diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-05-31 16:45:13 +1200 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-31 08:49:43 -0600 |
| commit | a9ec01cf6e4c109fb7e8b20ba4ac8c3de64693fe (patch) | |
| tree | 2006b9ebc64738ce2d58d126b36f2440d8b36856 /layers/core_validation.cpp | |
| parent | f866a08cf788a3519a65f44fd1d05f9849971d09 (diff) | |
| download | usermoji-a9ec01cf6e4c109fb7e8b20ba4ac8c3de64693fe.tar.xz | |
layers: Make precise DS validation work for both bind points
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 806d594a..46bfaddf 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2784,9 +2784,10 @@ static bool validate_and_update_draw_state(layer_data *my_data, GLOBAL_CB_NODE * } // Now complete other state checks - // TODO : When Compute shaders are properly parsed, fix this section to validate them as well if (state.pipelineLayout) { string errorString; + auto pipelineLayout = (bindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS) ? pPipe->graphicsPipelineCI.layout : pPipe->computePipelineCI.layout; + // Need a vector (vs. std::set) of active Sets for dynamicOffset validation in case same set bound w/ different offsets vector<std::tuple<cvdescriptorset::DescriptorSet *, unordered_set<uint32_t>, std::vector<uint32_t> const *>> activeSetBindingsPairs; for (auto & setBindingPair : pPipe->active_slots) { @@ -2798,7 +2799,7 @@ static bool validate_and_update_draw_state(layer_data *my_data, GLOBAL_CB_NODE * "VkPipeline 0x%" PRIxLEAST64 " uses set #%u but that set is not bound.", (uint64_t)pPipe->pipeline, setIndex); } else if (!verify_set_layout_compatibility(my_data, state.boundDescriptorSets[setIndex], - pPipe->graphicsPipelineCI.layout, setIndex, errorString)) { + pipelineLayout, setIndex, errorString)) { // Set is bound but not compatible w/ overlapping pipelineLayout from PSO VkDescriptorSet setHandle = state.boundDescriptorSets[setIndex]->GetSet(); result |= @@ -2806,7 +2807,7 @@ static bool validate_and_update_draw_state(layer_data *my_data, GLOBAL_CB_NODE * (uint64_t)setHandle, __LINE__, DRAWSTATE_PIPELINE_LAYOUTS_INCOMPATIBLE, "DS", "VkDescriptorSet (0x%" PRIxLEAST64 ") bound as set #%u is not compatible with overlapping VkPipelineLayout 0x%" PRIxLEAST64 " due to: %s", - (uint64_t)setHandle, setIndex, (uint64_t)pPipe->graphicsPipelineCI.layout, errorString.c_str()); + (uint64_t)setHandle, setIndex, (uint64_t)pipelineLayout, errorString.c_str()); } else { // Valid set is bound and layout compatible, validate that it's updated // Pull the set node cvdescriptorset::DescriptorSet *pSet = state.boundDescriptorSets[setIndex]; |
