March 2013
Intermediate to advanced
984 pages
26h 18m
English
The following are a handful of tips for making effective use of compute shaders. By following this advice, your compute shaders are more likely to perform well and work correctly on a wide range of hardware.
Choose a local workgroup size that is appropriate for the workload you need to process. Choosing a size that is too large may not allow you to fit everything you need into shared variables. On the other hand, choosing a size that is too small may reduce efficiency, depending on the architecture of the graphics processor.
Remember to insert control flow and memory barriers before attempting to communicate between compute shader invocations. If you leave out memory barriers, ...