summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
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) {
144 dirty_flags.color_buffer |= 1u << static_cast<u32>(rt_index); 144 dirty_flags.color_buffer |= 1u << static_cast<u32>(rt_index);
145 } 145 }
146 146
147 // Zeta buffer
148 constexpr u32 registers_in_zeta = sizeof(regs.zeta) / sizeof(u32);
149 if (method_call.method == MAXWELL3D_REG_INDEX(zeta_enable) ||
150 method_call.method == MAXWELL3D_REG_INDEX(zeta_width) ||
151 method_call.method == MAXWELL3D_REG_INDEX(zeta_height) ||
152 (method_call.method >= MAXWELL3D_REG_INDEX(zeta) &&
153 method_call.method < MAXWELL3D_REG_INDEX(zeta) + registers_in_zeta)) {
154 dirty_flags.zeta_buffer = true;
155 }
156
147 // Shader 157 // Shader
148 constexpr u32 shader_registers_count = 158 constexpr u32 shader_registers_count =
149 sizeof(regs.shader_config[0]) * Regs::MaxShaderProgram / sizeof(u32); 159 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:
1090 1090
1091 struct DirtyFlags { 1091 struct DirtyFlags {
1092 u8 color_buffer = 0xFF; 1092 u8 color_buffer = 0xFF;
1093 bool zeta_buffer = true;
1093 1094
1094 bool shaders = true; 1095 bool shaders = true;
1095 1096
@@ -1098,6 +1099,7 @@ public:
1098 1099
1099 void OnMemoryWrite() { 1100 void OnMemoryWrite() {
1100 color_buffer = 0xFF; 1101 color_buffer = 0xFF;
1102 zeta_buffer = true;
1101 shaders = true; 1103 shaders = true;
1102 vertex_array = 0xFFFFFFFF; 1104 vertex_array = 0xFFFFFFFF;
1103 } 1105 }