Files
wgpu/tests/out/msl/quad-vert.msl
T

67 lines
2.0 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_Position;
float gl_PointSize;
type6 gl_ClipDistance;
type6 gl_CullDistance;
};
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 main2(
thread metal::float2& v_uv,
thread metal::float2 const& a_uv1,
thread gl_PerVertex& perVertexStruct,
thread metal::float2 const& a_pos1
) {
metal::float2 _e12 = a_uv1;
v_uv = _e12;
metal::float2 _e13 = a_pos1;
perVertexStruct.gl_Position = metal::float4(_e13.x, _e13.y, 0.0, 1.0);
return;
}
struct main1Input {
metal::float2 a_uv [[attribute(1)]];
metal::float2 a_pos [[attribute(0)]];
};
struct main1Output {
metal::float2 member [[user(loc0), center_perspective]];
metal::float4 gl_Position [[position]];
float gl_PointSize [[point_size]];
float gl_ClipDistance [[clip_distance]] [1];
};
vertex main1Output main1(
main1Input varyings [[stage_in]]
) {
metal::float2 v_uv = {};
metal::float2 a_uv1 = {};
gl_PerVertex perVertexStruct = const_gl_PerVertex;
metal::float2 a_pos1 = {};
const auto a_uv = varyings.a_uv;
const auto a_pos = varyings.a_pos;
a_uv1 = a_uv;
a_pos1 = a_pos;
main2(v_uv, a_uv1, perVertexStruct, a_pos1);
metal::float2 _e10 = v_uv;
metal::float4 _e11 = perVertexStruct.gl_Position;
float _e12 = perVertexStruct.gl_PointSize;
type6 _e13 = perVertexStruct.gl_ClipDistance;
type6 _e14 = perVertexStruct.gl_CullDistance;
const auto _tmp = type10 {_e10, _e11, _e12, _e13, _e14};
return main1Output { _tmp.member, _tmp.gl_Position, _tmp.gl_PointSize, {_tmp.gl_ClipDistance.inner[0]} };
}