Add capability for BGRA formats (#3011)
This commit is contained in:
parent
60f7cba30a
commit
0e59573f2b
5 changed files with 17 additions and 1 deletions
|
@ -167,6 +167,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
this.Copy(dest, src);
|
||||
}
|
||||
|
||||
bool supportsBgra = Config.GpuAccessor.QueryHostSupportsBgraFormat();
|
||||
int regIndexBase = 0;
|
||||
|
||||
for (int rtIndex = 0; rtIndex < 8; rtIndex++)
|
||||
|
@ -185,7 +186,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
Operand src = Register(regIndexBase + component, RegisterType.Gpr);
|
||||
|
||||
// Perform B <-> R swap if needed, for BGRA formats (not supported on OpenGL).
|
||||
if (component == 0 || component == 2)
|
||||
if (!supportsBgra && (component == 0 || component == 2))
|
||||
{
|
||||
Operand isBgra = Attribute(AttributeConsts.FragmentOutputIsBgraBase + rtIndex * 4);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue