Closed aroidzap closed 1 month ago
@aroidzap What you are asking is for slang to generate an argument buffer for MyStruct. This is done by doing:
void compute(ParameterBlock<MyStruct> data) {}
Otherwise, slang will hoist out all the resource types from the struct as top level parameters to fit the traditional binding model.
Thanks, I forgot about it, because it was not necessary when using [CudaKernel]
or [DllExport]
.
Currently all structures in kernel arguments are flattened into arguments as separate structure members.
i.e. instead of:
this is generated:
Should be possible, see: https://developer.apple.com/documentation/realitykit/passing-structured-data-to-a-metal-compute-function