2018-02-21 22:52:03 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
struct s1
|
|
|
|
{
|
|
|
|
int a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct s2
|
|
|
|
{
|
|
|
|
s1 b;
|
|
|
|
};
|
|
|
|
|
2019-05-23 12:54:04 +00:00
|
|
|
struct s1_1
|
2018-03-05 15:34:42 +00:00
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
int a;
|
2018-03-05 15:34:42 +00:00
|
|
|
};
|
|
|
|
|
2019-05-23 12:54:04 +00:00
|
|
|
struct s2_1
|
2018-03-05 15:34:42 +00:00
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
s1_1 b;
|
2018-03-05 15:34:42 +00:00
|
|
|
};
|
|
|
|
|
2018-02-21 22:52:03 +00:00
|
|
|
struct dstbuffer
|
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
s2_1 test[1];
|
2018-02-21 22:52:03 +00:00
|
|
|
};
|
|
|
|
|
2019-09-18 19:56:51 +00:00
|
|
|
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
|
|
|
|
|
2019-06-21 10:44:33 +00:00
|
|
|
kernel void main0(device dstbuffer& _19 [[buffer(0)]])
|
2018-02-21 22:52:03 +00:00
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
s2 testVal;
|
2018-02-21 22:52:03 +00:00
|
|
|
testVal.b.a = 0;
|
|
|
|
_19.test[0].b.a = testVal.b.a;
|
|
|
|
}
|
|
|
|
|