Source

Branch

1/ @svadrb

@SebAaltonen

Thank you! Awesome post.

If one were to implement this API on top of existing API/driver, is it doable or is something missing?

2/ @SebAaltonen

@svadrb

You could implement it on top of Vulkan, if you had a custom shading language. Unfortunately there’s no MSL (Metal Shading Language) to SPIRV tools yet. That’s today possible with Vulkan BDA extension. But we’d need to add a the texture descriptor heap on top of it somehow.

3/ @SebAaltonen

@svadrb

Metal’s biggest limitation for implementing this API would be the lack of user visible texture descriptor heap. Everything else is there. And DirectX 12s biggest limitation is lack of 64-bit GPU pointers in HLSL. DirectX 12 handles 64-bit GPU pointers in the CPU side in some APIs

4/ @SebAaltonen

And if you want best possible performance for the root struct, you’d have to write some reflection to convert the root struct to API specific root struct build calls, and at draw time you need to setup the data that the shader expects. This is the biggest PITA.

Or you can simply ignore that and pass one pointer as the root struct and don’t get root prefetch optimizations. This is trivial, but the code runs slightly slower on the GPU.