mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:22:46 +00:00
gl_shader_decompiler: Use fragment output color for GPR 0-3.
This commit is contained in:
parent
5d529698c9
commit
5ba71369ac
|
@ -187,6 +187,11 @@ private:
|
||||||
|
|
||||||
/// Generates code representing a temporary (GPR) register.
|
/// Generates code representing a temporary (GPR) register.
|
||||||
std::string GetRegister(const Register& reg) {
|
std::string GetRegister(const Register& reg) {
|
||||||
|
if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg.GetIndex() < 4) {
|
||||||
|
// GPRs 0-3 are output color for the fragment shader
|
||||||
|
return std::string{"color."} + "rgba"[reg.GetIndex()];
|
||||||
|
}
|
||||||
|
|
||||||
return *declr_register.insert("register_" + std::to_string(reg)).first;
|
return *declr_register.insert("register_" + std::to_string(reg)).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue