SPIRV-Cross/reference/shaders-msl/asm/frag/empty-struct.asm.frag
Hans-Kristian Arntzen 361fe52c9d MSL: Properly support passing parameters by value.
MSL would force thread const& which would not work if the input argument
came from a different storage class.

Emit proper non-reference arguments for such values.
2018-08-06 15:43:51 +02:00

31 lines
497 B
GLSL

#pragma clang diagnostic ignored "-Wmissing-prototypes"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct EmptyStructTest
{
int empty_struct_member;
};
float GetValue(thread const EmptyStructTest& self)
{
return 0.0;
}
float GetValue_1(EmptyStructTest self)
{
return 0.0;
}
fragment void main0()
{
EmptyStructTest _23 = EmptyStructTest{ 0 };
EmptyStructTest emptyStruct;
float value = GetValue(emptyStruct);
value = GetValue_1(_23);
}