SPIRV-Cross/reference/shaders-msl
Chip Davis 9d9415754b MSL: Add support for subgroup operations.
Some support for subgroups is present starting in Metal 2.0 on both iOS
and macOS. macOS gains more complete support in 10.14 (Metal 2.1).

Some restrictions are present. On iOS and on macOS 10.13, the
implementation of `OpGroupNonUniformElect` is incorrect: if thread 0 has
already terminated or is not executing a conditional branch, the first
thread that *is* will falsely believe itself not to be. Unfortunately,
this operation is part of the "basic" feature set; without it, subgroups
cannot be supported at all.

The `SubgroupSize` and `SubgroupLocalInvocationId` builtins are only
available in compute shaders (and, by extension, tessellation control
shaders), despite SPIR-V making them available in all stages. This
limits the usefulness of some of the subgroup operations in fragment
shaders.

Although Metal on macOS supports some clustered, inclusive, and
exclusive operations, it does not support them all. In particular,
inclusive and exclusive min, max, and, or, and xor; as well as cluster
sizes other than 4 are not supported. If this becomes a problem, they
could be emulated, but at a significant performance cost due to the need
for non-uniform operations.
2019-05-15 17:40:04 -05:00
..
asm Fix a copy-pasto. 2019-04-26 17:16:21 -05:00
comp MSL: Add support for subgroup operations. 2019-05-15 17:40:04 -05:00
desktop-only Fix tests for device->constant address space change in MSL tessellation control shader generation. 2019-04-10 18:37:04 +01:00
flatten MSL: Emit F{Min,Max,Clamp} as fast:: and N{Min,Max,Clamp} as precise::. 2018-09-01 23:01:46 -05:00
frag Fix nonuniform test for MSL. 2019-05-13 15:14:18 +02:00
legacy/vert CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
tesc Fix tests for device->constant address space change in MSL tessellation control shader generation. 2019-04-10 18:37:04 +01:00
tese MSL: Use vectors for the tessellation level builtins in tese shaders. 2019-02-22 12:18:51 -06:00
vert MSL: Cast texture_buffer index to uint. 2019-04-23 12:46:48 +02:00
vulkan MSL: Add support for subgroup operations. 2019-05-15 17:40:04 -05:00