Skip to content

Commit

Permalink
layers: Fix ViewportScissorInheritanceTracker range
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Jun 21, 2023
1 parent 2824a5a commit 33eb828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layers/core_checks/cc_cmd_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ class CoreChecks::ViewportScissorInheritanceTracker {
viewport_mask_ = primary_state->viewportMask | primary_state->viewportWithCountMask;
scissor_mask_ = primary_state->scissorMask | primary_state->scissorWithCountMask;

for (uint32_t n = 0; n < kMaxViewports; ++n) {
for (uint32_t n = 0; n < primary_state->dynamic_state_value.viewports.size(); ++n) {
uint32_t bit = uint32_t(1) << n;
viewport_trashed_by_[n] = primary_state->trashedViewportMask & bit ? kTrashedByPrimary : kNotTrashed;
scissor_trashed_by_[n] = primary_state->trashedScissorMask & bit ? kTrashedByPrimary : kNotTrashed;
Expand Down Expand Up @@ -619,7 +619,7 @@ class CoreChecks::ViewportScissorInheritanceTracker {
viewport_mask_ |= secondary_state->viewportMask | secondary_state->viewportWithCountMask;
scissor_mask_ |= secondary_state->scissorMask | secondary_state->scissorWithCountMask;

for (uint32_t n = 0; n < kMaxViewports; ++n) {
for (uint32_t n = 0; n < secondary_state->dynamic_state_value.viewports.size(); ++n) {
uint32_t bit = uint32_t(1) << n;
if ((secondary_state->viewportMask | secondary_state->viewportWithCountMask) & bit) {
viewports_to_inherit_[n] = secondary_state->dynamic_state_value.viewports[n];
Expand Down

0 comments on commit 33eb828

Please sign in to comment.