I am trying to launch my application on iPad pro and getting an error when trying to create a new library with dispatched data as shown in the below image Error on creating new library with existing built .metallib
The library format is not supported or was built with old version of the tools
Here is the .metal code with which I am getting this error:
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct VtxIn
{
packed_float2 pos;
packed_float2 uv0;
};
struct VtxOut
{
float4 pos [[position]];
float2 uv0;
};
vertex VtxOut MainVS ( device VtxIn* iVtxA [[ buffer(0) ]],
uint iIdx [[ vertex_id ]])
{
VtxOut oVtx;
oVtx.pos = float4( iVtxA[iIdx].pos, 0.0, 1.0 );
oVtx.uv0 = iVtxA[iIdx].uv0;
return oVtx;
}
fragment float4 MainPS ( VtxOut iVtx [[ stage_in]],
texture2d<float> iTex2D [[ texture(0) ]],
sampler iSampler2D [[ sampler(0) ]] )
{
return iTex2D.sample( iSampler2D, iVtx.uv0 );
};