Browse Source
Merge pull request #1029 from bunnei/fix-out-attrib
gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check.
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/video_core/renderer_opengl/gl_shader_decompiler.cpp
|
|
|
@ -356,13 +356,13 @@ public: |
|
|
|
* @param reg The register to use as the source value. |
|
|
|
*/ |
|
|
|
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); |
|
|
|
|
|
|
|
if (!dest.empty()) { |
|
|
|
// Can happen with unknown/unimplemented output attributes, in which case we ignore the
|
|
|
|
// instruction for now.
|
|
|
|
shader.AddLine(dest + " = " + src + ';'); |
|
|
|
shader.AddLine(dest + GetSwizzle(elem) + " = " + src + ';'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|