microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.5k stars 404 forks source link

DirectCompute support #27

Open walbourn opened 6 years ago

walbourn commented 6 years ago

Similar to the IEffect interface and the built-in shaders, we could create a set of DirectCompute shaders as well--which is easier done with DirectX Tool Kit for DX12 since all supported feature levels can do DirectCompute 5.0 or better.

Possible built-in compute shaders:

A number of these fall into the existing PostProcess class, but would do it via DirectCompute instead of a Pixel shader.

walbourn commented 6 years ago

Proposed design of the high-level interface:

class ICompute
{
public:
    virtual ~ICompute() = default;

    virtual void __cdecl Dispatch(
        _In_ ID3D12GraphicsCommandList* commandList,
        uint32_t ThreadGroupCountX,
        uint32_t ThreadGroupCountY,
        uint32_t ThreadGroupCountZ) = 0;
        };
}