mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-28 10:00:50 +01:00
OpenGL: Mask out all color outputs with no fragment shader (#6341)
* OpenGL: Mask out all color outputs with no fragment shader This appears to match Vulkan's behaviour, which is needed for stencil shadows in Penny's Big Breakaway. It's far from the only issue, you can try the Full Bindless PR if you want to see it in a more intact state. * Remove unused member
This commit is contained in:
parent
c43fb92bbf
commit
57d8afd0c9
@ -1117,7 +1117,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
prg.Bind();
|
||||
}
|
||||
|
||||
if (prg.HasFragmentShader && _fragmentOutputMap != (uint)prg.FragmentOutputMap)
|
||||
if (_fragmentOutputMap != (uint)prg.FragmentOutputMap)
|
||||
{
|
||||
_fragmentOutputMap = (uint)prg.FragmentOutputMap;
|
||||
|
||||
|
@ -30,7 +30,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
private ProgramLinkStatus _status = ProgramLinkStatus.Incomplete;
|
||||
private int[] _shaderHandles;
|
||||
|
||||
public bool HasFragmentShader;
|
||||
public int FragmentOutputMap { get; }
|
||||
|
||||
public Program(ShaderSource[] shaders, int fragmentOutputMap)
|
||||
@ -40,6 +39,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
GL.ProgramParameter(Handle, ProgramParameterName.ProgramBinaryRetrievableHint, 1);
|
||||
|
||||
_shaderHandles = new int[shaders.Length];
|
||||
bool hasFragmentShader = false;
|
||||
|
||||
for (int index = 0; index < shaders.Length; index++)
|
||||
{
|
||||
@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
|
||||
if (shader.Stage == ShaderStage.Fragment)
|
||||
{
|
||||
HasFragmentShader = true;
|
||||
hasFragmentShader = true;
|
||||
}
|
||||
|
||||
int shaderHandle = GL.CreateShader(shader.Stage.Convert());
|
||||
@ -71,7 +71,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
|
||||
GL.LinkProgram(Handle);
|
||||
|
||||
FragmentOutputMap = fragmentOutputMap;
|
||||
FragmentOutputMap = hasFragmentShader ? fragmentOutputMap : 0;
|
||||
}
|
||||
|
||||
public Program(ReadOnlySpan<byte> code, bool hasFragmentShader, int fragmentOutputMap)
|
||||
@ -91,8 +91,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
}
|
||||
}
|
||||
|
||||
HasFragmentShader = hasFragmentShader;
|
||||
FragmentOutputMap = fragmentOutputMap;
|
||||
FragmentOutputMap = hasFragmentShader ? fragmentOutputMap : 0;
|
||||
}
|
||||
|
||||
public void Bind()
|
||||
|
Loading…
Reference in New Issue
Block a user