SPIRV-Cross/reference/shaders-msl/vulkan/frag/demote-to-helper.vk.nocompat.msl23.ios.frag
Chip Davis 2219c4a392 MSL: Support SPV_EXT_demote_to_helper_invocation for MSL 2.3.
MSL 2.3 has everything needed to support this extension on all
platforms. The existing `discard_fragment()` function was given demote
semantics, similar to Direct3D, and the `simd_is_helper_thread()`
function was finally added to iOS.

I've left the old test alone. Should I remove it in favor of these?
2020-10-13 00:25:32 -05:00

13 lines
184 B
JavaScript

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
fragment void main0()
{
discard_fragment();
bool _9 = simd_is_helper_thread();
bool helper = _9;
}