Add alternative "GL" enum values for StencilOp (#3321)
This PR adds the alternative enum values for StencilOp. Similar to the other enums, I added these with the same names but with Gl added to the end. These are used by homebrew using Nouveau, though they might be used by games with the official Vulkan driver.
39d90be897/rnndb/graph/nv_3ddefs.xml (L77)
Fixes some broken graphics in Citra, such as missing shadows in Mario Kart 7. Likely fixes other homebrew.
This commit is contained in:
parent
42a2a80b87
commit
50d7ecf76d
2 changed files with 18 additions and 1 deletions
|
@ -9,6 +9,15 @@ namespace Ryujinx.Graphics.GAL
|
||||||
DecrementAndClamp,
|
DecrementAndClamp,
|
||||||
Invert,
|
Invert,
|
||||||
IncrementAndWrap,
|
IncrementAndWrap,
|
||||||
DecrementAndWrap
|
DecrementAndWrap,
|
||||||
|
|
||||||
|
ZeroGl = 0x0,
|
||||||
|
InvertGl = 0x150a,
|
||||||
|
KeepGl = 0x1e00,
|
||||||
|
ReplaceGl = 0x1e01,
|
||||||
|
IncrementAndClampGl = 0x1e02,
|
||||||
|
DecrementAndClampGl = 0x1e03,
|
||||||
|
IncrementAndWrapGl = 0x8507,
|
||||||
|
DecrementAndWrapGl = 0x8508
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -379,20 +379,28 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case GAL.StencilOp.Keep:
|
case GAL.StencilOp.Keep:
|
||||||
|
case GAL.StencilOp.KeepGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Keep;
|
return OpenTK.Graphics.OpenGL.StencilOp.Keep;
|
||||||
case GAL.StencilOp.Zero:
|
case GAL.StencilOp.Zero:
|
||||||
|
case GAL.StencilOp.ZeroGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Zero;
|
return OpenTK.Graphics.OpenGL.StencilOp.Zero;
|
||||||
case GAL.StencilOp.Replace:
|
case GAL.StencilOp.Replace:
|
||||||
|
case GAL.StencilOp.ReplaceGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Replace;
|
return OpenTK.Graphics.OpenGL.StencilOp.Replace;
|
||||||
case GAL.StencilOp.IncrementAndClamp:
|
case GAL.StencilOp.IncrementAndClamp:
|
||||||
|
case GAL.StencilOp.IncrementAndClampGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Incr;
|
return OpenTK.Graphics.OpenGL.StencilOp.Incr;
|
||||||
case GAL.StencilOp.DecrementAndClamp:
|
case GAL.StencilOp.DecrementAndClamp:
|
||||||
|
case GAL.StencilOp.DecrementAndClampGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Decr;
|
return OpenTK.Graphics.OpenGL.StencilOp.Decr;
|
||||||
case GAL.StencilOp.Invert:
|
case GAL.StencilOp.Invert:
|
||||||
|
case GAL.StencilOp.InvertGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.Invert;
|
return OpenTK.Graphics.OpenGL.StencilOp.Invert;
|
||||||
case GAL.StencilOp.IncrementAndWrap:
|
case GAL.StencilOp.IncrementAndWrap:
|
||||||
|
case GAL.StencilOp.IncrementAndWrapGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.IncrWrap;
|
return OpenTK.Graphics.OpenGL.StencilOp.IncrWrap;
|
||||||
case GAL.StencilOp.DecrementAndWrap:
|
case GAL.StencilOp.DecrementAndWrap:
|
||||||
|
case GAL.StencilOp.DecrementAndWrapGl:
|
||||||
return OpenTK.Graphics.OpenGL.StencilOp.DecrWrap;
|
return OpenTK.Graphics.OpenGL.StencilOp.DecrWrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue