naga::back::msl::writer

Constant ARGUMENT_BUFFER_WRAPPER_STRUCT

source
pub(crate) const ARGUMENT_BUFFER_WRAPPER_STRUCT: &str = "NagaArgumentBufferWrapper";
Expand description

For some reason, Metal does not let you have metal::texture<..>* as a buffer argument. However, if you put that texture inside a struct, everything is totally fine. This baffles me to no end.

As such, we wrap all argument buffers in a struct that has a single generic <T> field. This allows NagaArgumentBufferWrapper<metal::texture<..>>* to work. The astute among you have noticed that this should be exactly the same to the compiler, and you’re correct.