aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-03-02 09:45:13 +1300
committerChris Forbes <chrisforbes@google.com>2016-03-02 09:45:13 +1300
commit1efa35eaa2edadd6e6ceeb915625e3d9a2cf2012 (patch)
tree7f2e175da4d3f4d4bb63a242e9f69374d9b1ae21 /layers/draw_state.cpp
parent4bd7c7dfb55acbc18f23a561265b22c7a43d9e9c (diff)
downloadusermoji-1efa35eaa2edadd6e6ceeb915625e3d9a2cf2012.tar.xz
layers: Separate some variables
Don't abuse maxInputAttachmentCount in the second loop which has nothing to do with input attachments. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index eefffe33..5c874f58 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -7342,8 +7342,8 @@ bool validateSubpassCompatibility(layer_data* dev_data, VkCommandBuffer primaryB
}
skip_call |= validateAttachmentCompatibility(dev_data, primaryBuffer, primaryPass, primary_input_attach, secondaryBuffer, secondaryPass, secondary_input_attach, is_multi);
}
- maxInputAttachmentCount = std::max(primary_desc.colorAttachmentCount, secondary_desc.colorAttachmentCount);
- for (uint32_t i = 0; i < maxInputAttachmentCount; ++i) {
+ uint32_t maxColorAttachmentCount = std::max(primary_desc.colorAttachmentCount, secondary_desc.colorAttachmentCount);
+ for (uint32_t i = 0; i < maxColorAttachmentCount; ++i) {
uint32_t primary_color_attach = VK_ATTACHMENT_UNUSED, secondary_color_attach = VK_ATTACHMENT_UNUSED;
if (i < primary_desc.colorAttachmentCount) {
primary_color_attach = primary_desc.pColorAttachments[i].attachment;