bed4918cb5
This is also needed for `VK_KHR_relaxed_block_layout` support.
21 lines
445 B
Plaintext
21 lines
445 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct foo
|
|
{
|
|
uint bar;
|
|
packed_float3 baz;
|
|
uchar quux;
|
|
packed_uchar4 blah;
|
|
packed_half2 wibble;
|
|
};
|
|
|
|
kernel void main0(device foo& _6 [[buffer(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
|
{
|
|
_6.bar = gl_LocalInvocationID.x;
|
|
_6.baz = float3(gl_GlobalInvocationID);
|
|
}
|
|
|