mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 00:33:51 +00:00
68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
// language: metal1.0
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using metal::uint;
|
|
|
|
struct FragmentOutputVec4Vec3_ {
|
|
metal::float4 vec4f;
|
|
metal::int4 vec4i;
|
|
metal::uint4 vec4u;
|
|
metal::float3 vec3f;
|
|
metal::int3 vec3i;
|
|
metal::uint3 vec3u;
|
|
};
|
|
struct FragmentOutputVec2Scalar {
|
|
metal::float2 vec2f;
|
|
metal::int2 vec2i;
|
|
metal::uint2 vec2u;
|
|
float scalarf;
|
|
int scalari;
|
|
uint scalaru;
|
|
};
|
|
|
|
struct main_vec4vec3_Output {
|
|
metal::float4 vec4f [[color(0)]];
|
|
metal::int4 vec4i [[color(1)]];
|
|
metal::uint4 vec4u [[color(2)]];
|
|
metal::float3 vec3f [[color(3)]];
|
|
metal::int3 vec3i [[color(4)]];
|
|
metal::uint3 vec3u [[color(5)]];
|
|
};
|
|
fragment main_vec4vec3_Output main_vec4vec3_(
|
|
) {
|
|
FragmentOutputVec4Vec3_ output = {};
|
|
output.vec4f = metal::float4(0.0);
|
|
output.vec4i = metal::int4(0);
|
|
output.vec4u = metal::uint4(0u);
|
|
output.vec3f = metal::float3(0.0);
|
|
output.vec3i = metal::int3(0);
|
|
output.vec3u = metal::uint3(0u);
|
|
FragmentOutputVec4Vec3_ _e19 = output;
|
|
const auto _tmp = _e19;
|
|
return main_vec4vec3_Output { _tmp.vec4f, _tmp.vec4i, _tmp.vec4u, _tmp.vec3f, _tmp.vec3i, _tmp.vec3u };
|
|
}
|
|
|
|
|
|
struct main_vec2scalarOutput {
|
|
metal::float2 vec2f [[color(0)]];
|
|
metal::int2 vec2i [[color(1)]];
|
|
metal::uint2 vec2u [[color(2)]];
|
|
float scalarf [[color(3)]];
|
|
int scalari [[color(4)]];
|
|
uint scalaru [[color(5)]];
|
|
};
|
|
fragment main_vec2scalarOutput main_vec2scalar(
|
|
) {
|
|
FragmentOutputVec2Scalar output_1 = {};
|
|
output_1.vec2f = metal::float2(0.0);
|
|
output_1.vec2i = metal::int2(0);
|
|
output_1.vec2u = metal::uint2(0u);
|
|
output_1.scalarf = 0.0;
|
|
output_1.scalari = 0;
|
|
output_1.scalaru = 0u;
|
|
FragmentOutputVec2Scalar _e16 = output_1;
|
|
const auto _tmp = _e16;
|
|
return main_vec2scalarOutput { _tmp.vec2f, _tmp.vec2i, _tmp.vec2u, _tmp.scalarf, _tmp.scalari, _tmp.scalaru };
|
|
}
|