SPIRV-Cross/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag
Hans-Kristian Arntzen 3b5c4c7316 Implement constant empty struct correctly on all backends.
MSL actually supports empty structs, so enable that path as well.
2019-10-26 16:10:11 +02:00

32 lines
494 B
GLSL

#version 450
struct EmptyStructTest
{
int empty_struct_member;
};
struct EmptyStruct2Test
{
EmptyStructTest _m0;
};
float GetValue(EmptyStruct2Test self)
{
return 0.0;
}
float GetValue_1(EmptyStruct2Test self)
{
return 0.0;
}
void main()
{
EmptyStructTest _25 = EmptyStructTest(0);
EmptyStruct2Test emptyStruct;
float value = GetValue(emptyStruct);
value = GetValue_1(EmptyStruct2Test(_25));
value = GetValue_1(EmptyStruct2Test(EmptyStructTest(0)));
}