mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 13:17:59 -05:00
ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO).
This commit is contained in:
@ -220,6 +220,8 @@ private:
|
||||
|
||||
/// Generates code representing a temporary (GPR) register.
|
||||
std::string GetRegister(const Register& reg, unsigned elem = 0) {
|
||||
if (reg == Register::ZeroIndex)
|
||||
return "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) & 3];
|
||||
|
Reference in New Issue
Block a user