diff --git a/src/host_shaders/metal_copy_to_lut_texture.metal b/src/host_shaders/metal_copy_to_lut_texture.metal index 1c996516..ef993b64 100644 --- a/src/host_shaders/metal_copy_to_lut_texture.metal +++ b/src/host_shaders/metal_copy_to_lut_texture.metal @@ -3,6 +3,7 @@ using namespace metal; constant ushort lutTextureWidth [[function_constant(0)]]; +// The copy is done in a vertex shader instead of a compute kernel, since dispatching compute would require ending the render pass vertex void vertexCopyToLutTexture(uint vid [[vertex_id]], texture1d_array out [[texture(0)]], constant ushort* data [[buffer(0)]]) { out.write(data[vid], vid % lutTextureWidth, vid / lutTextureWidth); }