From 0ab17ab4062278ceed3a3dc28796493280e6d0a1 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 6 Jan 2019 03:58:43 -0300 Subject: gl_shader_cache: Use dirty flags for shaders --- src/video_core/engines/maxwell_3d.cpp | 8 ++++++++ 1 file changed, 8 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 b19b3a75a..0ed7bc5d8 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -135,6 +135,14 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { if (regs.reg_array[method_call.method] != method_call.argument) { regs.reg_array[method_call.method] = method_call.argument; + // Shader + constexpr u32 shader_registers_count = + sizeof(regs.shader_config[0]) * Regs::MaxShaderProgram / sizeof(u32); + if (method_call.method >= MAXWELL3D_REG_INDEX(shader_config[0]) && + method_call.method < MAXWELL3D_REG_INDEX(shader_config[0]) + shader_registers_count) { + dirty_flags.shaders = true; + } + // Vertex format if (method_call.method >= MAXWELL3D_REG_INDEX(vertex_attrib_format) && method_call.method < -- cgit v1.2.3