SPIRV-Cross/reference/shaders-msl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp
Hans-Kristian Arntzen c7eda1bce9 Test glsl.std450 more exhaustively.
Make sure to test everything with scalar as well to catch any weird edge
cases.

Not all opcodes are covered here, just the arithmetic ones. FP64 packing
is also ignored.
2019-07-17 11:53:05 +02:00

36 lines
443 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct _8
{
float _m0;
float _m1;
};
struct _15
{
float _m0;
int _m1;
};
struct _3
{
float _m0;
int _m1;
};
kernel void main0(device _3& _4 [[buffer(0)]])
{
_8 _23;
_23._m0 = modf(20.0, _23._m1);
_15 _24;
_24._m0 = frexp(40.0, _24._m1);
_4._m0 = _23._m0;
_4._m0 = _23._m1;
_4._m0 = _24._m0;
_4._m1 = _24._m1;
}