summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-02-05 12:30:19 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-06 21:00:52 +0200
commit98b5e236d4049d1a2a4c6413486b5015b7efe2c8 (patch)
tree4bf35037d1c4819815d5cf2b3424844ae0c5bfac /src/video_core
parentNVDRV: Further refactors and eliminate old code. (diff)
downloadyuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar.gz
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar.bz2
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar.lz
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar.xz
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.tar.zst
yuzu-98b5e236d4049d1a2a4c6413486b5015b7efe2c8.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index a95f68231..d7b57e0f3 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -247,8 +247,15 @@ void RasterizerVulkan::Clear() {
}
UpdateViewportsState(regs);
+ VkRect2D default_scissor;
+ default_scissor.offset.x = 0;
+ default_scissor.offset.y = 0;
+ default_scissor.extent.width = std::numeric_limits<s32>::max();
+ default_scissor.extent.height = std::numeric_limits<s32>::max();
+
VkClearRect clear_rect{
- .rect = GetScissorState(regs, 0, up_scale, down_shift),
+ .rect = regs.clear_flags.scissor ? GetScissorState(regs, 0, up_scale, down_shift)
+ : default_scissor,
.baseArrayLayer = regs.clear_buffers.layer,
.layerCount = 1,
};