ComputeSharp
ComputeSharp copied to clipboard
Buffers and Textures as method parameter
As far as I know, hlsl supports pass buffers and textures in method call. Are there any plans to support this?
Currently, I must maintain copies of the same function for each shader and each parameter
for example, to achieve something like
public readonly void DoSomething(ReadWriteBuffer<uint> array);
I have to make method variants and copies for every buffer and every shader, and situation may even get worse if their are more than one parameters
public ReadWriteBuffer<uint> array1;
public ReadWriteBuffer<uint> array2;
public ReadWriteBuffer<uint> array3;
public readonly void DoSomethingOverArray1AndArray2();
public readonly void DoSomethingOverArray1AndArray3();
public readonly void DoSomethingOverArray2AndArray3();
This looks foolish and brings a lot of trouble