| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct Foo |
| 7 |
{ |
| 8 |
float4 v; |
| 9 |
}; |
| 10 |
|
| 11 |
struct UBO |
| 12 |
{ |
| 13 |
Foo foo; |
| 14 |
}; |
| 15 |
|
| 16 |
struct spvDescriptorSetBuffer0 |
| 17 |
{ |
| 18 |
constant UBO* ubos [[id(0)]][2]; |
| 19 |
}; |
| 20 |
|
| 21 |
struct main0_out |
| 22 |
{ |
| 23 |
float4 FragColor [[color(0)]]; |
| 24 |
}; |
| 25 |
|
| 26 |
fragment main0_out main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]]) |
| 27 |
{ |
| 28 |
main0_out out = {}; |
| 29 |
out.FragColor = spvDescriptorSet0.ubos[1]->foo.v; |
| 30 |
return out; |
| 31 |
} |
| 32 |
|