shader-slang / slang

Making it easier to work with shaders
MIT License
2.06k stars 177 forks source link

[gfx] Metal graphics support #4324

Closed skallweitNV closed 3 months ago

skallweitNV commented 3 months ago

Adds support for basic Metal graphics pipelines.

Resource binding for different shader stages is not handled correctly yet. But otherwise, this should support most of gfx API for graphics pipelines, framebuffers etc.

The swapchain is implemented using extra backbuffer images, doing an extra copy to the Metal renderable on present. This is to support the current API of gfx, which needs explicit access to the backbuffer images. Metal doesn't support this natively.