summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-07 06:09:39 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-07 20:22:28 +0100
commitb683e41fca8f88bf21085ccb3eee1dd6a91e293e (patch)
tree3b33a50ecc5725c4d42bf4adb2526352dc901629 /src/video_core/engines
parentgl_rasterizer_cache: Use dirty flags for color buffers (diff)
downloadyuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar.gz
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar.bz2
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar.lz
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar.xz
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.tar.zst
yuzu-b683e41fca8f88bf21085ccb3eee1dd6a91e293e.zip
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp10
-rw-r--r--src/video_core/engines/maxwell_3d.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 88483eab9..d64a5080b 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -144,6 +144,16 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
dirty_flags.color_buffer |= 1u << static_cast<u32>(rt_index);
}
+ // Zeta buffer
+ constexpr u32 registers_in_zeta = sizeof(regs.zeta) / sizeof(u32);
+ if (method_call.method == MAXWELL3D_REG_INDEX(zeta_enable) ||
+ method_call.method == MAXWELL3D_REG_INDEX(zeta_width) ||
+ method_call.method == MAXWELL3D_REG_INDEX(zeta_height) ||
+ (method_call.method >= MAXWELL3D_REG_INDEX(zeta) &&
+ method_call.method < MAXWELL3D_REG_INDEX(zeta) + registers_in_zeta)) {
+ dirty_flags.zeta_buffer = true;
+ }
+
// Shader
constexpr u32 shader_registers_count =
sizeof(regs.shader_config[0]) * Regs::MaxShaderProgram / sizeof(u32);
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 8d0e18d80..1f76aa670 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -1090,6 +1090,7 @@ public:
struct DirtyFlags {
u8 color_buffer = 0xFF;
+ bool zeta_buffer = true;
bool shaders = true;
@@ -1098,6 +1099,7 @@ public:
void OnMemoryWrite() {
color_buffer = 0xFF;
+ zeta_buffer = true;
shaders = true;
vertex_array = 0xFFFFFFFF;
}