Explorar o código

gl_shader_decompiler: Fix swizzle in GetRegister.

bunnei %!s(int64=8) %!d(string=hai) anos
pai
achega
59f4ff4659
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

+ 1 - 1
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -199,7 +199,7 @@ private:
     std::string GetRegister(const Register& reg, unsigned elem = 0) {
         if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg < 4) {
             // GPRs 0-3 are output color for the fragment shader
-            return std::string{"color."} + "rgba"[reg + elem];
+            return std::string{"color."} + "rgba"[(reg + elem) & 3];
         }
 
         return *declr_register.insert("register_" + std::to_string(reg + elem)).first;