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

82 lines
3.2 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(thread float3* const tint_symbol_5, const constant LeftOver* const tint_symbol_6, thread float4* const tint_symbol_7, thread float2* const tint_symbol_8, thread float2* const tint_symbol_9) {
float4 q = 0.0f;
float3 p = 0.0f;
float3 const x_13 = *(tint_symbol_5);
q = float4(x_13[0], x_13[1], x_13[2], 1.0f);
float4 const x_21 = q;
p = float3(x_21[0], x_21[1], x_21[2]);
float const x_27 = p[0];
float const x_41 = (*(tint_symbol_6)).test.arr[0].el;
float const x_45 = (*(tint_symbol_5))[1];
float const x_49 = (*(tint_symbol_6)).time;
p[0] = (x_27 + sin(((x_41 * x_45) + x_49)));
float const x_55 = p[1];
float const x_57 = (*(tint_symbol_6)).time;
p[1] = (x_55 + sin((x_57 + 4.0f)));
float4x4 const x_69 = (*(tint_symbol_6)).worldViewProjection;
float3 const x_70 = p;
*(tint_symbol_7) = (x_69 * float4(x_70[0], x_70[1], x_70[2], 1.0f));
float2 const x_83 = *(tint_symbol_8);
*(tint_symbol_9) = x_83;
float const x_87 = (*(tint_symbol_7))[1];
(*(tint_symbol_7))[1] = (x_87 * -1.0f);
return;
}
main_out tint_symbol_inner(float3 position_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float3* const tint_symbol_12, const constant LeftOver* const tint_symbol_13, thread float4* const tint_symbol_14, thread float2* const tint_symbol_15) {
*(tint_symbol_10) = position_param;
*(tint_symbol_11) = uv_param;
*(tint_symbol_12) = normal_param;
main_1(tint_symbol_10, tint_symbol_13, tint_symbol_14, tint_symbol_11, tint_symbol_15);
main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_14), .vUV_1=*(tint_symbol_15)};
return tint_symbol_4;
}
vertex tint_symbol_3 tint_symbol(const constant LeftOver* tint_symbol_19 [[buffer(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
thread float3 tint_symbol_16 = 0.0f;
thread float2 tint_symbol_17 = 0.0f;
thread float3 tint_symbol_18 = 0.0f;
thread float4 tint_symbol_20 = 0.0f;
thread float2 tint_symbol_21 = 0.0f;
main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, tint_symbol_1.uv_param, tint_symbol_1.normal_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), tint_symbol_19, &(tint_symbol_20), &(tint_symbol_21));
tint_symbol_3 wrapper_result = {};
wrapper_result.gl_Position = inner_result.gl_Position;
wrapper_result.vUV_1 = inner_result.vUV_1;
return wrapper_result;
}