Closed pusewicz closed 1 month ago
This needs some more work:
-[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1615: failed assertion `Set Render Pipeline State Validation
For stencil attachment, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatDepth32Float_Stencil8).
Looks good so far. Not sure why the depth format of a pipeline doesn't match. The depth format is supposed to get copied over here: https://github.com/RandyGaul/cute_framework/blob/master/src/cute_graphics.cpp#L1651
Yep so it's a matter of debugging to see where the different depth formats are set. If you need help debugging let me know, or if you're stuck I can also look into it and solve it. Thanks so much for the help!
@RandyGaul It turns out, this branch works just fine. I applied the same branch again, on a fresh clone of Cute and it works as expected. Must have been a cache issue when building via XCode.
Similarly to https://github.com/cocos2d/cocos2d-x/pull/19774/files, we default to
CF_PIXEL_FORMAT_D32_FLOAT_S8_UINT
and set it toCF_PIXEL_FORMAT_D24_UNORM_S8_UINT
if it's supported.