• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3
4using namespace metal;
5
6struct spvDescriptorSetBuffer0
7{
8    texture2d<float, access::write> uImage [[id(0)]];
9    texture2d<float> uImageRead [[id(1)]];
10};
11
12kernel void main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
13{
14    int2 coord = int2(gl_GlobalInvocationID.xy);
15    spvDescriptorSet0.uImage.write(spvDescriptorSet0.uImageRead.read(uint2(coord)), uint2(coord));
16}
17
18