-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metal): clear only bound textures
`clearQuad()` can be operating on framebuffers that don't have all the color/depth/stencil buffers attached. For example, if there is no stencil buffer in the framebuffer, the Metal driver asserts with: ``` validateDepthStencilState: failed assertion `MTLDepthStencilDescriptor uses frontFaceStencil but MTLRenderPassDescriptor has a nil stencilAttachment texture' ``` Copy the logic from `setFrameBuffer()` to check which buffers we can clear. Using this info set the pipeline state that is valid for currently bound buffers.
- Loading branch information
1 parent
61c770b
commit f4018da
Showing
1 changed file
with
80 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters