Explorar el Código

gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check.

bunnei hace 8 años
padre
commit
639ebb39f6
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

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

@@ -356,13 +356,13 @@ public:
      * @param reg The register to use as the source value.
      * @param reg The register to use as the source value.
      */
      */
     void SetOutputAttributeToRegister(Attribute::Index attribute, u64 elem, const Register& reg) {
     void SetOutputAttributeToRegister(Attribute::Index attribute, u64 elem, const Register& reg) {
-        std::string dest = GetOutputAttribute(attribute) + GetSwizzle(elem);
+        std::string dest = GetOutputAttribute(attribute);
         std::string src = GetRegisterAsFloat(reg);
         std::string src = GetRegisterAsFloat(reg);
 
 
         if (!dest.empty()) {
         if (!dest.empty()) {
             // Can happen with unknown/unimplemented output attributes, in which case we ignore the
             // Can happen with unknown/unimplemented output attributes, in which case we ignore the
             // instruction for now.
             // instruction for now.
-            shader.AddLine(dest + " = " + src + ';');
+            shader.AddLine(dest + GetSwizzle(elem) + " = " + src + ';');
         }
         }
     }
     }