Fix some shader disposal issues

This commit is contained in:
gdkchan 2020-01-05 13:40:21 -03:00 committed by Thog
parent a11f6f5235
commit 383452f5cf
3 changed files with 17 additions and 19 deletions

View file

@ -737,11 +737,11 @@ namespace Ryujinx.Graphics.Gpu.Engine
GraphicsShader gs = ShaderCache.GetGraphicsShader(state, addresses);
_vsUsesInstanceId = gs.Shaders[0].Program.Info.UsesInstanceId;
_vsUsesInstanceId = gs.Shaders[0]?.Program.Info.UsesInstanceId ?? false;
for (int stage = 0; stage < Constants.ShaderStages; stage++)
{
ShaderProgramInfo info = gs.Shaders[stage].Program?.Info;
ShaderProgramInfo info = gs.Shaders[stage]?.Program.Info;
_currentProgramInfo[stage] = info;