Skip to content

Commit

Permalink
GS:MTL: Fix crash on Intel HD 4000
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Jan 8, 2022
1 parent 668ec0a commit d6b44f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ static void setFnConstantI(MTLFunctionConstantValues* fc, unsigned int value, GS
m_merge_pipeline[i] = MakePipeline(pdesc, vs_convert, LoadShader(name), name);
}

pdesc.colorAttachments[0].blendingEnabled = NO;
pdesc.colorAttachments[0].pixelFormat = MTLPixelFormatInvalid;
pdesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8;
m_convert_pipeline[static_cast<int>(ShaderConvert::DATM_0)] = MakePipeline(pdesc, vs_convert, LoadShader(@"ps_datm0"), @"datm0");
Expand All @@ -913,6 +914,7 @@ static void setFnConstantI(MTLFunctionConstantValues* fc, unsigned int value, GS
applyAttribute(pdesc.vertexDescriptor, 1, MTLVertexFormatFloat2, offsetof(GSVertexPT1, t), 0);
applyAttribute(pdesc.vertexDescriptor, 2, MTLVertexFormatUChar4Normalized, offsetof(GSVertexPT1, c), 0);
pdesc.vertexDescriptor.layouts[0].stride = sizeof(GSVertexPT1);
pdesc.colorAttachments[0].blendingEnabled = YES;
pdesc.colorAttachments[0].pixelFormat = [m_layer pixelFormat];
pdesc.stencilAttachmentPixelFormat = MTLPixelFormatInvalid;
m_convert_pipeline[static_cast<int>(ShaderConvert::OSD)] = MakePipeline(pdesc, LoadShader(@"vs_osd"), LoadShader(@"ps_osd"), @"osd");
Expand Down

0 comments on commit d6b44f0

Please sign in to comment.