Error when calling newRenderPipelineStateWithDescriptor

Hello,


We have an issue occuring with Metal on a number of Macs, when attempting to create render pipeline using newRenderPipelineStateWithDescriptor, it times out giving the following in xcode output :


[29264:610788] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

[29264:610788] MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 1 try

[29264:610893] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

[29264:610893] MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 2 try

[29264:610788] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

[29264:610788] MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 3 try


attemping to debug this issue i found it occurs on selected shaders, by just slicing some lines from fragment shader it can pass, as if there is a limit on number of shader instructions.all the shaders work on iOS fine, this error is happening on Mac only and not on all Macs


Can you please shed some light on what could be happening there and how to find a solution for this issue ?


Thank you


Shady

Replies

Hi Shady,

This is usually an indication of a crash in the GPU driver backed shader compiler (which executes in a separate process). It likely only occurs on Macs with specific GPUs. This would be a bug in the GPU driver and not really a fault in your code. However, it's possible there is a tricky sequence of shader/kernel code that the backend compiler is having trouble digesting, so changes to your shader may workaround the problem.

Filing a bug report at feedbackassistant.apple.com would also be helpful.