From b683e41fca8f88bf21085ccb3eee1dd6a91e293e Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 7 Jan 2019 02:09:39 -0300 Subject: gl_rasterizer_cache: Use dirty flags for the depth buffer --- src/video_core/engines/maxwell_3d.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/video_core/engines/maxwell_3d.cpp') 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(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); -- cgit v1.2.3