Metal: skip draws whose render pipeline failed to compile - #119
Closed
yorgunkral31 wants to merge 1 commit into
Closed
yorgunkral31 wants to merge 1 commit into
yorgunkral31 wants to merge 1 commit into
Conversation
Encoding a draw with a null MTLRenderPipelineState is undefined behavior; when newRenderPipelineState fails (for example on a vertex attribute/shader type mismatch that only some OS versions reject), the failed pipeline's draws now get skipped instead of encoding garbage, and the state cache no longer binds a null pipeline.
Contributor
|
If the pipeline fails to be generated, you shouldn't be drawing anything in the first place. You're failing to understand where the problem needs to be solved completely. The application will not work if it straight up does not draw something as it should. Closing, as per the contribution guidelines that state, AI-generated pull requests are not allowed. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Encoding a draw with a null
MTLRenderPipelineStateis undefined behavior. I hit this on iOS, where the OS rejects a vertex attribute conversion that macOS accepts — the failed pipeline's draws encoded garbage geometry. This guards the draw calls and the state-cache bind so a failed pipeline can't take the frame down on any platform. (Found while testing hedge-dev/UnleashedRecomp#1767 on device.)