Thanks.
Well... no. I have not.
Do I have to consider this with structured buffers?
No, you don't. It's totally legal to access structures with a stride that's not a multiple of 16 bytes.
Oh, you can use the standard storage formats with RWBuffers?Hyunkel, yes, I'm familiar with DX11 compute shaders. You don't necessarily need to use StructuredBuffer UAV. You can use several UAVs as outputs of your compute shaders. So instead of a stream (array) of packed interleaved struct data, you might have streams (arrays) of individual struct members. Instead of 1 RWStructuredBuffer, you'd have 4 RWBuffers as targets of your compute shader. The main disadvantage I see is that you use 4 target slots instead of 1 (there should always be at least 8 supported, if I recall well). I believe you can have texture/buffer UAVs as well in cs_5_0 (unlike cs_4_1) but I've actually used RWStructuredBuffer just like you.
For some reason I never thought of that.
That does make things a lot easier indeed.
I'll have to see if that performs just as well, but I see no reason why it wouldn't, and the memory footprint should obviously be quite a bit lower.
Thanks for pointing this out!






