Don’t change Render State if Vertex Function is Invalid

This commit is contained in:
Isaac Marovitz 2024-01-27 16:09:16 -05:00
parent d397e9477a
commit 84d0b3b052
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
1 changed files with 6 additions and 0 deletions

View File

@ -449,6 +449,12 @@ namespace Ryujinx.Graphics.Metal
{
Program prg = (Program)program;
if (prg.VertexFunction == null)
{
Logger.Error?.PrintMsg(LogClass.Gpu, "Invalid Vertex Function!");
return;
}
_renderEncoderState = new RenderEncoderState(
prg.VertexFunction,
prg.FragmentFunction,