KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
1.96k stars 549 forks source link

MSL: Option to enforce fragment execution when side effects are present before discard #2322

Closed aitor-lunarg closed 1 month ago

aitor-lunarg commented 1 month ago

Details can be found here: https://github.com/KhronosGroup/MoltenVK/issues/2233

In short, Metal will incorrectly discard fragments with side effects under certain circumstances prematurely even when the side effect takes place before discard. The conditions are the following:

To circumvent this issue, we need to trick Metal into thinking that not all fragment executions may be discarded

HansKristian-Work commented 1 month ago

Fixed on main.