Other meanings of DirectCompute
Graphics & Computing
DirectCompute is Microsoft's general-purpose GPU compute API that runs as part of the DirectX 11 and later graphics platforms, enabling developers to harness the parallel processing power of graphics processing units (GPUs) for non-graphics tasks such as physics simulations, image processing, and machine learning inference. Introduced with Windows 7 and DirectX 11 in 2009, it provides a compute shader model that integrates with the Direct3D pipeline, allowing data-parallel workloads to execute on the GPU with access to the same resources as graphics shaders. DirectCompute competes with and complements other GPGPU frameworks like CUDA and OpenCL, but its tight coupling with DirectX makes it a natural choice for Windows-based applications, particularly games and multimedia software.
DirectCompute is a component of Microsoft's DirectX API that exposes the GPU's parallel processing capabilities through a set of compute shader stages. Unlike traditional vertex and pixel shaders, compute shaders are not tied to the graphics pipeline; they operate on arbitrary data buffers and can be dispatched with a specified number of thread groups, each containing a defined number of threads. This model allows for flexible data-parallel algorithms, such as sorting, convolution, and matrix operations, to be executed efficiently on the GPU. DirectCompute integrates with Direct3D resources, enabling seamless sharing of textures and buffers between graphics and compute operations, which is crucial for effects like post-processing and deferred rendering. The API is designed to work across a range of hardware, from integrated GPUs to discrete cards from NVIDIA, AMD, and Intel, with each vendor providing drivers that map the compute shader model to their underlying architecture.1
DirectCompute was first announced in 2008 and shipped with DirectX 11 in Windows 7, marking Microsoft's entry into the general-purpose GPU computing arena. It was developed in response to the growing popularity of NVIDIA's CUDA and the cross-platform OpenCL standard, offering a unified compute solution within the DirectX ecosystem. The initial version, Shader Model 5.0, provided basic compute capabilities, including structured buffers, atomic operations, and thread synchronization. DirectX 12, released in 2015, significantly expanded DirectCompute's scope with features like asynchronous compute, which allows compute shaders to run concurrently with graphics work on the same GPU, improving utilization and performance. This evolution has made DirectCompute a key technology for modern game engines, enabling advanced effects such as screen-space reflections, global illumination, and real-time ray tracing acceleration structures.2
DirectCompute is widely used in real-time graphics and simulation, but its applications extend beyond gaming. In scientific computing, it has been employed for fluid dynamics, molecular dynamics, and image processing, though CUDA and OpenCL often dominate in non-Windows environments. Within the Windows ecosystem, DirectCompute is leveraged by applications like Adobe Photoshop for GPU-accelerated filters, and by video encoding tools for hardware-accelerated transcoding. In the realm of machine learning, DirectCompute has been used to implement neural network inference on GPUs, particularly in frameworks that target DirectX, such as Microsoft's own Windows ML. The API's integration with DirectX also makes it a natural fit for virtual reality and mixed reality applications, where low-latency compute is essential for tracking and rendering. Additionally, DirectCompute has been used in cryptocurrency mining, though this has declined with the rise of specialized ASICs.3
One lesser-known aspect of DirectCompute is its role in the development of the DirectX 11 feature level 11_0, which was the first to support compute shaders, but feature level 10_0 and 10_1 also have limited compute support, allowing older hardware to run basic compute workloads. Another niche detail is that DirectCompute's thread group dimensions are limited to 1024 threads per group, but the total number of groups is virtually unlimited, enabling massive parallelism. A notable edge case is that DirectCompute does not support double-precision floating-point operations on all hardware; this is optional and depends on the GPU's capabilities, which can be queried via the API. Historically, DirectCompute was also used in the development of the Bullet physics engine's GPU-accelerated rigid body simulation, which demonstrated the API's potential for complex physics. Additionally, DirectCompute's compute shaders can be compiled to intermediate language (DXIL) and run on any DirectX 12-compatible device, including those with different GPU architectures, thanks to the driver's role in translating DXIL to machine code.
DirectCompute is a trademark of Microsoft Corporation.
Help improve the encyclopedia. Reports go straight to the site manager.