Files
wgpu/tests/out/quad-vert.msl
T
2021-05-08 09:51:14 -04:00

61 lines
1.8 KiB
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
struct type6 {
float inner[1u];
};
struct gl_PerVertex {
metal::float4 gl_Position;
float gl_PointSize;
type6 gl_ClipDistance;
type6 gl_CullDistance;
};
struct type10 {
metal::float2 member;
metal::float4 gl_Position1;
float gl_PointSize1;
type6 gl_ClipDistance1;
type6 gl_CullDistance1;
};
constant metal::float4 const_type4_ = {0.0, 0.0, 0.0, 1.0};
constant type6 const_type6_ = {0.0};
constant gl_PerVertex const_gl_PerVertex = {const_type4_, 1.0, const_type6_, const_type6_};
void main1(
thread metal::float2& v_uv,
thread metal::float2 const& a_uv,
thread gl_PerVertex& perVertexStruct,
thread metal::float2 const& a_pos
) {
v_uv = a_uv;
metal::float2 _e13 = a_pos;
perVertexStruct.gl_Position = metal::float4(_e13.x, _e13.y, 0.0, 1.0);
return;
}
struct main2Input {
metal::float2 a_uv1 [[attribute(1)]];
metal::float2 a_pos1 [[attribute(0)]];
};
struct main2Output {
metal::float2 member [[user(loc0), center_perspective]];
metal::float4 gl_Position1 [[position]];
float gl_PointSize1 [[point_size]];
float gl_ClipDistance1 [[clip_distance]] [1];
};
vertex main2Output main2(
main2Input varyings [[stage_in]]
) {
metal::float2 v_uv = {};
metal::float2 a_uv = {};
gl_PerVertex perVertexStruct = const_gl_PerVertex;
metal::float2 a_pos = {};
const auto a_uv1 = varyings.a_uv1;
const auto a_pos1 = varyings.a_pos1;
a_uv = a_uv1;
a_pos = a_pos1;
main1(v_uv, a_uv, perVertexStruct, a_pos);
const auto _tmp = type10 {v_uv, perVertexStruct.gl_Position, perVertexStruct.gl_PointSize, perVertexStruct.gl_ClipDistance, perVertexStruct.gl_CullDistance};
return main2Output { _tmp.member, _tmp.gl_Position1, _tmp.gl_PointSize1, {_tmp.gl_ClipDistance1.inner[0]} };
}