-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to enforce fragment execution with side effects in MSL
Metal will incorrectly discard fragments with side effects under certain circumstances prematurely. The conditions are the following: - Fragment will always be discarded - Pre fragment depth fails fails - Modifies depth value for a constant value in the fragment shader. This constant value will also fail the depth test. However, Metal will also discard the fragment even if it has operations with side effects inside the fragment shader before the discard operation. Vulkan states the graphics pipeline to execute in the following order: - Pre fragment depth test (cannot discard here due to modifying depth value in fragment shader) - Fragment shader (where the depth is modified) - Post fragment depth test (where fragment should be discarded) Therefore, we need to enforce fragment shader execution and not let Metal discard the fragment before that for such cases. This change adds an option to provide such utility.
- Loading branch information
1 parent
1ddd8b6
commit 08118b8
Showing
4 changed files
with
29 additions
and
8 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
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
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
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