Direct3D11+ComputeShader: Reference device bug with AllMemoryBarrier()?

Started by
10 comments, last by JB2009 13 years, 5 months ago
Hi Dieter,

I did try the manual inter-group sync, but aborted the work due to the need for the spin wait. Thanks for the warning about register space.

Your explanation of AllMemoryBarrier() agrees exactly with my experience with testing AllMemoryBarrier() and the reference device. Other posts (e.g. [D3D11] Compute Shader Memory Barriers) imply that AllMemoryBarrier() somehow ensures that all previous shared memory writes in the code have been completed, which is why I had the problem that started this thread. I think that (erroneous) idea comes from a misinterpretation of the MSDN documentation, but I think the documentation is ambiguous because many of us have made the same mistake. It says "Blocks execution of all threads in a group until all memory accesses have been completed". Perhaps it should say "Blocks execution of all threads in a group until all memory accesses that have already started have completed"?

I was hoping to find a way to overcome the 1024 "Num threads per group" limit. My compute shaders require up to 4096 calculations, where each calculation depends on its neighbors, so it is not OK to use multiple groups. I suspect (from a quick glance at the ATI Stream Computing document) that the hardware can achieve this, but the 1024 numthreads Direct3D 11 limit prevents that being available to us.

Many thanks for your help,

JB.
Advertisement
Hi Jason,

> Did you try doing multiple passes over the data instead of everything all at once yet?

Each of the 4096 items must be processed once per iteration, and each item depends on values from its two adjacent items from the previous iteration.

Therefore it is one indivisible problem.

I've got the "4 items per thread" code working, though I'll probably need multiple versions of each shader for different numbers of items (e.g. using macros) as the number of items varies from 6 to 4096.

Thanks for your help.

JB.

[Edited by - JB2009 on November 12, 2010 5:54:58 AM]

This topic is closed to new replies.

Advertisement