Cocoa Port: Use MTLPixelFormatBGRA8Unorm pixel format for all Metal display view pipeline descriptors in order to stop dev+ builds from assert crashing themselves under some very rare and specific situations.

This commit is contained in:
rogerman 2022-05-13 15:53:13 -07:00
parent b565073299
commit 9ed9c0a9e4
1 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@
[[[hudPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatBGRA8Unorm];
hudPipeline = [[device newRenderPipelineStateWithDescriptor:hudPipelineDesc error:nil] retain];
[[[hudPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatRGBA8Unorm];
[[[hudPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatBGRA8Unorm];
hudRGBAPipeline = [[device newRenderPipelineStateWithDescriptor:hudPipelineDesc error:nil] retain];
[hudPipelineDesc release];
@ -1180,7 +1180,7 @@
break;
}
[[[outputPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatRGBA8Unorm];
[[[outputPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatBGRA8Unorm];
[self setOutputRGBAPipeline:[[sharedData device] newRenderPipelineStateWithDescriptor:outputPipelineDesc error:nil]];
if ([self drawableFormat] != MTLPixelFormatInvalid)
@ -1226,7 +1226,7 @@
}
#endif
[[[outputPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatRGBA8Unorm];
[[[outputPipelineDesc colorAttachments] objectAtIndexedSubscript:0] setPixelFormat:MTLPixelFormatBGRA8Unorm];
outputRGBAPipeline = [[[sharedData device] newRenderPipelineStateWithDescriptor:outputPipelineDesc error:nil] retain];
if ([self drawableFormat] != MTLPixelFormatInvalid)