Skip to content

Commit

Permalink
Track scissors like we track viewports (bugfix?).
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed May 18, 2020
1 parent 4e00a20 commit d37893d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/native/thin3d/VulkanRenderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,14 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR
// Not sure how much this is still happening but probably worth checking for nevertheless.
curRenderStep_ = steps_.back();
curStepHasViewport_ = false;
curStepHasScissor_ = false;
for (const auto &c : steps_.back()->commands) {
if (c.cmd == VKRRenderCommand::VIEWPORT) {
curStepHasViewport_ = true;
break;
} else if (c.cmd == VKRRenderCommand::SCISSOR) {
curStepHasScissor_ = true;
break;
}
}
return;
Expand Down Expand Up @@ -507,6 +511,7 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR

curRenderStep_ = step;
curStepHasViewport_ = false;
curStepHasScissor_ = false;
if (fb) {
curWidth_ = fb->width;
curHeight_ = fb->height;
Expand Down

1 comment on commit d37893d

@unknownbrackets
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derp, I thought I added those things. Thanks.

-[Unknown]

Please sign in to comment.