rafx-api
requires metal 2.0. iOS GPU family 3 or higher is recommended. (A9 or higher on mobile)
For more info, see the Metal Feature Set Tables provided by Apple.
Metal support is fairly complete but could probably be optimized. See Future Work.
Metal is supported on macOS and iOS only. A9 or higher is recommended on mobile.
rafx-api
uses the default metal coordinate system with no modifications.
Set the environment variable METAL_DEVICE_WRAPPER_TYPE=1
Xcode can be used to debug/trace a frame. It can be used by rust by making an empty xcode project and changing the debug settings to launch an external program.
rafx-api
accepts metal source code or compiled shader libraries. You can compile this yourself, or use
rafx-shader-processor
. The shader processor currently uses vulkan GLSL as input. spirv-cross
is used to translate
the shader to metal shader language. There are a few things about this process to be aware of:
rafx-framework
or other higher-level rafx crates to load the shader, the setup and API will handle this for you
automatically.Tile shading is not supported in rafx-api. It’s unclear how metal’s abstraction can be mapped to other backends.
rafx-api
makes the internally created metal objects available to you, so you can always natively implement a
performance-critical part of your pipeline if needed.