Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce fragment shader execution when operations with side effects are present before discard #2233

Closed
aitor-lunarg opened this issue May 8, 2024 · 0 comments · Fixed by #2248
Assignees
Labels
CTS Issue causes a failure of one or more CTS tests

Comments

@aitor-lunarg
Copy link
Collaborator

aitor-lunarg commented May 8, 2024

Failing CTS tests:

dEQP-VK.fragment_operations.early_fragment.discard_no_early_fragment_tests_depth

Test has a fragment shader with side effects and a discard operation after. However, fragments get prematurely discarded under certain circumstances as an optimization (when they shouldn't).

We can circumvent this issue by making the discard operation "optional" whenever a side effect operation is present before the discard. Equivalent Metal code for the following GLSL: if (!gl_HelperInvocation) discard;

So, similar to #2232 I believe this is an oversight from Metal's end. MoltenVK should provide a short term solution for this case, and hopefully Metal fixes this issue in the long term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CTS Issue causes a failure of one or more CTS tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant