mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 21:16:01 +00:00
Don't restore Viewport 0 if it hasn't been set yet. (#3219)
Fixes a driver crash when starting some games caused by #3217
This commit is contained in:
parent
79408b68c3
commit
d1146a5af2
1 changed files with 5 additions and 2 deletions
|
@ -612,7 +612,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
_program?.Bind();
|
_program?.Bind();
|
||||||
_unit0Sampler?.Bind(0);
|
_unit0Sampler?.Bind(0);
|
||||||
|
|
||||||
GL.ViewportArray(0, 1, _viewportArray);
|
RestoreViewport0();
|
||||||
|
|
||||||
Enable(EnableCap.CullFace, _cullEnable);
|
Enable(EnableCap.CullFace, _cullEnable);
|
||||||
Enable(EnableCap.StencilTest, _stencilTestEnable);
|
Enable(EnableCap.StencilTest, _stencilTestEnable);
|
||||||
|
@ -1500,9 +1500,12 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestoreViewport0()
|
public void RestoreViewport0()
|
||||||
|
{
|
||||||
|
if (_viewportArray.Length > 0)
|
||||||
{
|
{
|
||||||
GL.ViewportArray(0, 1, _viewportArray);
|
GL.ViewportArray(0, 1, _viewportArray);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual)
|
public bool TryHostConditionalRendering(ICounterEvent value, ulong compare, bool isEqual)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue