New DirectX 11 Features For The Compute Shader
The compute shader provides more general processing capabilities because of the following new features added to DirectX 11 for Windows 7 :
- Explicit thread dispatch
- Random access I/O (scatter)
- Interthread communication by using locally shared registers
- Ability to read and sample DirectX data objects
- Atomic operators on shared memory locations
The following sections provide details about these features.
Explicit Thread Dispatch
The compute shader provides an explicit Dispatch() entry point to make clear how many threads are launched for a given algorithm.
In previous DirectX releases, an application was required to draw two triangles to start work in multiple execution threads. Developers required a good understanding of polygon fill rules and texture sampling rules to guarantee that the number of threads that the application launched matched the data set to be processed.
Random Access I/O (Scatter)
By using the compute shader, applications can write data to arbitrary destinations. This feature enables developers to implement new types of algorithms that have runtime-dependent output sizes. For example, variable-length compression and encoding schemes require this capability.
Previous versions of Direct3D required the developer to preallocate the output destination of all units of execution before runtime.
Interthread Communications That Use Locally Shared Registers
The compute shader enables threads to read and write from a new class of registers that are visible to multiple threads. Threads can use these registers to cache previous results or to swap data across thread boundaries.
Ability To Read And Sample DirectX Data Objects
The compute shader can also use the standard resource types that the graphics APIs support for graphics-like image sampling and filtering and for random-access read and write operations.
Atomic Operators On Shared Memory Locations
When multiple threads try to access the same shared locations in video memory, conflicts and race conditions can occur. The compute shader includes a special set of intrinsic operators that enable atomic access to shared locations. An application can use these operators to ensure that its computations produce the same result regardless of the order in which threads execute.
Support Tech ARP!
<<< Direct3D 11 Introduction, Compute Shader : Previous Page | Next Page : Supported Configurations & Target Apps For The Compute Shader >>>