diff options
author | Feng Chen <vonchenplus@gmail.com> | 2023-08-23 13:35:59 +0200 |
---|---|---|
committer | Feng Chen <vonchenplus@gmail.com> | 2023-09-07 12:01:30 +0200 |
commit | 0145c89879f934a3f09314e29c63889c65077a8d (patch) | |
tree | a93eee61350af69b9d8cb7cf268f350c2708c9b7 /src/video_core/renderer_vulkan | |
parent | video_core: set vertex buffer num to 16, because mvk have when using more than 16 (diff) | |
download | yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar.gz yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar.bz2 yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar.lz yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar.xz yuzu-0145c89879f934a3f09314e29c63889c65077a8d.tar.zst yuzu-0145c89879f934a3f09314e29c63889c65077a8d.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 032f694bc..3e04b7583 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -989,6 +989,19 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs if (!state_tracker.TouchScissors()) { return; } + if (!regs.viewport_scale_offset_enabled) { + const auto x = static_cast<float>(regs.surface_clip.x); + const auto y = static_cast<float>(regs.surface_clip.y); + const auto width = static_cast<float>(regs.surface_clip.width); + const auto height = static_cast<float>(regs.surface_clip.height); + VkRect2D scissor; + scissor.offset.x = static_cast<u32>(x); + scissor.offset.y = static_cast<u32>(y); + scissor.extent.width = static_cast<u32>(width != 0.0f ? width : 1.0f); + scissor.extent.height = static_cast<u32>(height != 0.0f ? height : 1.0f); + scheduler.Record([scissor](vk::CommandBuffer cmdbuf) { cmdbuf.SetScissor(0, scissor); }); + return; + } u32 up_scale = 1; u32 down_shift = 0; if (texture_cache.IsRescaling()) { |