diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-01-15 11:32:03 +1300 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-01-14 21:53:35 -0700 |
| commit | c8f716f269bf4762d407cd3053d9073c1149ef43 (patch) | |
| tree | ab94718854b6a3b4ef075aaa3e803037d7dbbd4a | |
| parent | 8a7189d4d80d3a3291549d551265f9c389075ce0 (diff) | |
| download | usermoji-c8f716f269bf4762d407cd3053d9073c1149ef43.tar.xz | |
layers: Fix mishandling of VI vs VS validation (Gitlab#69)
This wasn't quite correct. We'd end up trying to run it_a off beyond attribs.end(),
which is invalid and upsets the MS debug stdlib. This is most likely the root cause
of the weirdness that caused people to add _at_end, _first, etc to this function long ago,
so that can all disappear -- but for now, let's just deal with the actual bug.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
| -rw-r--r-- | layers/draw_state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index eabec543..b9d1388d 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -881,14 +881,14 @@ validate_vi_against_vs_inputs(layer_data *my_data, VkDevice dev, VkPipelineVerte bool b_at_end = inputs.size() == 0 || it_b == inputs.end(); auto a_first = a_at_end ? 0 : it_a->first; auto b_first = b_at_end ? 0 : it_b->first; - if (b_at_end || a_first < b_first) { + if (!a_at_end && (b_at_end || a_first < b_first)) { if (log_msg(my_data->report_data, VK_DEBUG_REPORT_PERF_WARN_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, /*dev*/0, __LINE__, SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", "Vertex attribute at location %d not consumed by VS", a_first)) { pass = false; } it_a++; } - else if (a_at_end || b_first < a_first) { + else if (!b_at_end && (a_at_end || b_first < a_first)) { if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, /*dev*/0, __LINE__, SHADER_CHECKER_INPUT_NOT_PRODUCED, "SC", "VS consumes input at location %d but not provided", b_first)) { pass = false; |
