From: Chris Forbes Date: Wed, 6 Jul 2016 00:18:26 +0000 (+1200) Subject: layers: Fix handling of component qualifier on VS inputs X-Git-Tag: upstream/1.1.92~2890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbd044f3db7dc272d33b69ea2f76a8ef7dea1a6d;p=platform%2Fupstream%2FVulkan-Tools.git layers: Fix handling of component qualifier on VS inputs Interface matcher assumed no location aliasing, but this is allowed. Signed-off-by: Chris Forbes --- diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 43834bb..8d1bf8d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -1750,6 +1750,7 @@ static bool validate_vi_against_vs_inputs(debug_report_data *report_data, VkPipe auto it_a = attribs.begin(); auto it_b = inputs.begin(); + bool used = false; while ((attribs.size() > 0 && it_a != attribs.end()) || (inputs.size() > 0 && it_b != inputs.end())) { bool a_at_end = attribs.size() == 0 || it_a == attribs.end(); @@ -1757,11 +1758,12 @@ static bool validate_vi_against_vs_inputs(debug_report_data *report_data, VkPipe auto a_first = a_at_end ? 0 : it_a->first; auto b_first = b_at_end ? 0 : it_b->first.first; if (!a_at_end && (b_at_end || a_first < b_first)) { - if (log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, + if (!used && log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", "Vertex attribute at location %d not consumed by VS", a_first)) { pass = false; } + used = false; it_a++; } else if (!b_at_end && (a_at_end || b_first < a_first)) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, /*dev*/ 0, @@ -1786,7 +1788,7 @@ static bool validate_vi_against_vs_inputs(debug_report_data *report_data, VkPipe } /* OK! */ - it_a++; + used = true; it_b++; } }