mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:42:52 +00:00
gl_shader_decompiler: Fix swizzle in GetRegister.
This commit is contained in:
parent
5a28dce9eb
commit
59f4ff4659
|
@ -199,7 +199,7 @@ private:
|
||||||
std::string GetRegister(const Register& reg, unsigned elem = 0) {
|
std::string GetRegister(const Register& reg, unsigned elem = 0) {
|
||||||
if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg < 4) {
|
if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg < 4) {
|
||||||
// GPRs 0-3 are output color for the fragment shader
|
// 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;
|
return *declr_register.insert("register_" + std::to_string(reg + elem)).first;
|
||||||
|
|
Loading…
Reference in a new issue