SPIRV-Cross/reference/shaders-msl
Aitor Camacho cd8865deab 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 after side effect operation
 - Pre fragment depth 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 and fragment
   discarded)
 - Post fragment depth test

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.
2024-05-21 11:24:56 +02:00
..
amd Updates for pull request #1162 2019-09-24 14:35:25 -04:00
asm MSL: Fix SUMulExtended for 64-bit inputs. 2024-04-15 13:37:00 +02:00
comp Updated tests. 2024-04-18 09:19:01 +02:00
desktop-only MSL: Workaround compiler issue with image fence when used as reference. 2024-04-03 13:28:12 +02:00
flatten MSL: Selectively enable fast-math in MSL code to match Vulkan CTS results. 2021-09-22 18:58:31 -04:00
frag Add option to enforce fragment execution with side effects in MSL 2024-05-21 11:24:56 +02:00
intel Updates for pull request #1162 2019-09-24 14:35:25 -04:00
legacy/vert Updates for pull request #1162 2019-09-24 14:35:25 -04:00
masking MSL: Remove special case for threadgroup array wrapper. 2023-12-07 14:41:42 +01:00
tesc fix a bunch of case where SPIRType::op is wrong/corrupted 2023-11-30 15:42:46 +01:00
tese MSL: Fix patch vertex count with raw buffer tese input. 2023-12-04 14:24:16 -08:00
vert Use recursive template for spvArrayCopy 2024-04-01 17:11:31 -05:00
vulkan Use --preserve-numeric-ids when assembling test shaders. 2023-06-23 14:54:16 -07:00