0c0fd98322
This allows two variables of the same struct type to be flattened into the same interface struct without a member name conflict. Add shaders-msl/frag/in_block_with_multiple_structs_of_same_type.frag unit test shader to demonstrate this.
32 lines
433 B
GLSL
32 lines
433 B
GLSL
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct VOUT
|
|
{
|
|
float4 a;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 FragColor [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 Clip_a [[user(locn0)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]])
|
|
{
|
|
main0_out out = {};
|
|
VOUT Clip = {};
|
|
Clip.a = in.Clip_a;
|
|
VOUT tmp = Clip;
|
|
tmp.a += float4(1.0);
|
|
out.FragColor = tmp.a;
|
|
return out;
|
|
}
|
|
|