dawn-cmake/test/bug/tint/1088.spvasm.expected.msl

82 lines
3.0 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
/* 0x0000 */ float4x4 arr[2];
};
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element arr[4];
};
struct LeftOver {
/* 0x0000 */ float4x4 worldViewProjection;
/* 0x0040 */ float time;
/* 0x0044 */ int8_t tint_pad_1[12];
/* 0x0050 */ tint_array_wrapper test2;
/* 0x00d0 */ tint_array_wrapper_1 test;
};
struct main_out {
float4 gl_Position;
float2 vUV_1;
};
struct tint_symbol_2 {
float3 position_param [[attribute(0)]];
float3 normal_param [[attribute(1)]];
float2 uv_param [[attribute(2)]];
};
struct tint_symbol_3 {
float2 vUV_1 [[user(locn0)]];
float4 gl_Position [[position]];
};
void main_1(constant LeftOver& x_14, thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread float2* const tint_symbol_7, thread float2* const tint_symbol_8) {
float4 q = 0.0f;
float3 p = 0.0f;
float3 const x_13 = *(tint_symbol_5);
q = float4(x_13.x, x_13.y, x_13.z, 1.0f);
float4 const x_21 = q;
p = float3(x_21.x, x_21.y, x_21.z);
float const x_27 = p.x;
float const x_41 = x_14.test.arr[0].el;
float const x_45 = (*(tint_symbol_5)).y;
float const x_49 = x_14.time;
p.x = (x_27 + sin(((x_41 * x_45) + x_49)));
float const x_55 = p.y;
float const x_57 = x_14.time;
p.y = (x_55 + sin((x_57 + 4.0f)));
float4x4 const x_69 = x_14.worldViewProjection;
float3 const x_70 = p;
*(tint_symbol_6) = (x_69 * float4(x_70.x, x_70.y, x_70.z, 1.0f));
float2 const x_83 = *(tint_symbol_7);
*(tint_symbol_8) = x_83;
float const x_87 = (*(tint_symbol_6)).y;
(*(tint_symbol_6)).y = (x_87 * -1.0f);
return;
}
main_out tint_symbol_inner(constant LeftOver& x_14, float3 position_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_9, thread float2* const tint_symbol_10, thread float3* const tint_symbol_11, thread float4* const tint_symbol_12, thread float2* const tint_symbol_13) {
*(tint_symbol_9) = position_param;
*(tint_symbol_10) = uv_param;
*(tint_symbol_11) = normal_param;
main_1(x_14, tint_symbol_9, tint_symbol_12, tint_symbol_10, tint_symbol_13);
main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_12), .vUV_1=*(tint_symbol_13)};
return tint_symbol_4;
}
vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_14 [[buffer(2)]]) {
thread float3 tint_symbol_14 = 0.0f;
thread float2 tint_symbol_15 = 0.0f;
thread float3 tint_symbol_16 = 0.0f;
thread float4 tint_symbol_17 = 0.0f;
thread float2 tint_symbol_18 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_14, tint_symbol_1.position_param, tint_symbol_1.uv_param, tint_symbol_1.normal_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
tint_symbol_3 wrapper_result = {};
wrapper_result.gl_Position = inner_result.gl_Position;
wrapper_result.vUV_1 = inner_result.vUV_1;
return wrapper_result;
}