Repository: godot
Issue: Metal rendering driver fails to run on Apple's software Metal implementation (paravirtual device)
Labels: bug,platform:macos,topic:rendering,crash

### Tested versions

- Reproducible in: 4.4.beta https://github.com/godotengine/godot/commit/7b1ed520bdcca21d36e25e2094802b9b33dae2c6

### System information

GitHub Actions

### Issue description

The Metal rendering driver fails to run on Apple's software Metal implementation (paravirtual device):

```
 Metal 3.1 - Forward+ - Using Device #0: Apple - Apple Paravirtual device (Apple5)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppleParavirtDevice newArgumentEncoderWithLayout:]: unrecognized selector sent to instance 0x15186e800'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000019c1722cc __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019bc56158 objc_exception_throw + 60
	2   CoreFoundation                      0x000000019c224568 -[NSObject(NSObject) __retain_OA] + 0
	3   AppleParavirtGPUMetalIOGPUFamily    0x0000000114fb0f5c doUncompressedBlit + 11180
	4   Metal                               0x00000001a643cec4 -[_MTLDevice newArgumentEncoderWithArguments:structType:] + 136
	5   godot.macos.editor.universal        0x00000001048b74b0 _ZN9DirAccess15_create_builtinI13DirAccessUnixEE3RefIS_Ev + 3011780
	6   godot.macos.editor.universal        0x0000000107161a68 _ZN17RendererSceneCull8Instance18dependency_deletedERK3RIDP17DependencyTracker + 165848
	7   godot.macos.editor.universal        0x000000010730b378 _ZN22RendererCanvasRenderRD22_create_material_funcsEPN10RendererRD15MaterialStorage10ShaderDataE + 98132
	8   godot.macos.editor.universal        0x0000000107db8fd8 _ZNK6Object22can_translate_messagesEv + 265940
	9   godot.macos.editor.universal        0x0000000107db9bb4 _ZNK6Object22can_translate_messagesEv + 268976
	10  godot.macos.editor.universal        0x000000010777b3ec _ZN7ClassDB7creatorIN9core_bind14EngineDebuggerEEEP6Objectb + 35228
	11  godot.macos.editor.universal        0x000000010777b7d0 _ZN7ClassDB7creatorIN9core_bind14EngineDebuggerEEEP6Objectb + 36224
	12  libsystem_pthread.dylib             0x000000019c01df94 _pthread_start + 136
	13  libsystem_pthread.dylib             0x000000019c018d34 thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException
```

This is most likely because the GPU exposed via paravirtualization is only Apple5, but we need a newer GPU. See also https://github.com/JuliaGPU/Metal.jl/issues/309. While it's unlikely we can cater to the Apple5 GPU, we should exit with a proper error message (one that refers to the paravirtualized device not being supported) instead of crashing.

For context, I'm looking to run the Metal renderer on CI so we can check for visual regressions. I have this working on Vulkan/OpenGL on Linux already using llvmpipe, and on D3D12 on Windows using WARP (the official software implementation of Direct3D).

This is the command line I'm using on CI as part of https://github.com/Calinou/godot/tree/ci-check-visual-regressions:

```bash
godot --audio-driver Dummy --path tests/visual_regressions --rendering-driver metal --rendering-method forward_plus -- --save-results
```

cc @stuartcarnie 

### Steps to reproduce

- Try running a Godot project with `--rendering-driver metal` on a headless platform with no GPU (e.g. GitHub Actions). Do not use the `--headless` flag at the same time.

### Minimal reproduction project (MRP)

N/A