SPIRV-Cross/reference/opt/shaders-msl/asm/comp/bitcast_icmp.asm.comp
Hans-Kristian Arntzen 8216e87f02 Handle SPIR-V 1.4 selection constructs.
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that
component count of selector is equal to value component count.
2021-06-28 12:23:44 +02:00

30 lines
613 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct _3
{
int4 _m0;
uint4 _m1;
};
struct _4
{
uint4 _m0;
int4 _m1;
};
kernel void main0(device _3& restrict _5 [[buffer(0)]], device _4& restrict _6 [[buffer(1)]])
{
_6._m0 = uint4(int4(_5._m1) < _5._m0);
_6._m0 = uint4(int4(_5._m1) <= _5._m0);
_6._m0 = uint4(_5._m1 < uint4(_5._m0));
_6._m0 = uint4(_5._m1 <= uint4(_5._m0));
_6._m0 = uint4(int4(_5._m1) > _5._m0);
_6._m0 = uint4(int4(_5._m1) >= _5._m0);
_6._m0 = uint4(_5._m1 > uint4(_5._m0));
_6._m0 = uint4(_5._m1 >= uint4(_5._m0));
}