summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-07-29 20:19:51 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:29 +0100
commit9bc7b04ca587a349a9fc865d05e30966d6a84d65 (patch)
treeb5bef9b90abf783634d950f4cf852637145e9632 /src/video_core
parentgl_graphics_pipeline: Add downscale factor to shader uniforms (diff)
downloadyuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar.gz
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar.bz2
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar.lz
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar.xz
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.tar.zst
yuzu-9bc7b04ca587a349a9fc865d05e30966d6a84d65.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index b91e7edf8..615704711 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -533,7 +533,8 @@ void RasterizerOpenGL::SyncViewport() {
auto& flags = maxwell3d.dirty.flags;
const auto& regs = maxwell3d.regs;
- const bool dirty_viewport = flags[Dirty::Viewports];
+ const bool rescale_viewports = flags[VideoCommon::Dirty::RescaleViewports];
+ const bool dirty_viewport = flags[Dirty::Viewports] || rescale_viewports;
const bool dirty_clip_control = flags[Dirty::ClipControl];
if (dirty_clip_control || flags[Dirty::FrontFace]) {
@@ -574,8 +575,9 @@ void RasterizerOpenGL::SyncViewport() {
if (dirty_viewport) {
flags[Dirty::Viewports] = false;
- const bool force = flags[Dirty::ViewportTransform];
+ const bool force = flags[Dirty::ViewportTransform] || rescale_viewports;
flags[Dirty::ViewportTransform] = false;
+ flags[VideoCommon::Dirty::RescaleViewports] = false;
const auto& resolution = Settings::values.resolution_info;
const auto scale_up = [&](u32 value) -> u32 {
@@ -911,11 +913,14 @@ void RasterizerOpenGL::SyncLogicOpState() {
void RasterizerOpenGL::SyncScissorTest() {
auto& flags = maxwell3d.dirty.flags;
- if (!flags[Dirty::Scissors]) {
+ if (!flags[Dirty::Scissors] && !flags[VideoCommon::Dirty::RescaleScissors]) {
return;
}
flags[Dirty::Scissors] = false;
+ const bool force = flags[VideoCommon::Dirty::RescaleScissors];
+ flags[VideoCommon::Dirty::RescaleScissors] = false;
+
const auto& regs = maxwell3d.regs;
const auto& resolution = Settings::values.resolution_info;
@@ -927,7 +932,7 @@ void RasterizerOpenGL::SyncScissorTest() {
return std::max<u32>(converted_value, 1U);
};
for (std::size_t index = 0; index < Maxwell::NumViewports; ++index) {
- if (!flags[Dirty::Scissor0 + index]) {
+ if (!force && !flags[Dirty::Scissor0 + index]) {
continue;
}
flags[Dirty::Scissor0 + index] = false;