18 ID3D11ClassLinkage* linkage =
nullptr;
19 ID3D11ComputeShader* dxShader =
nullptr;
20 HRESULT hr = device->CreateComputeShader(&code[0], code.size(), linkage, &dxShader);
30 return std::make_shared<DX11ComputeShader>(
31 reinterpret_cast<ID3D11Device*
>(device),
32 static_cast<Shader const*>(
object));
43 ID3D11ClassInstance* instances[1] = {
nullptr };
44 UINT numInstances = 0;
45 ID3D11ComputeShader* dxShader =
static_cast<ID3D11ComputeShader*
>(
mDXObject);
46 context->CSSetShader(dxShader, instances, numInstances);
54 ID3D11ClassInstance* instances[1] = {
nullptr };
55 UINT numInstances = 0;
56 ID3D11ComputeShader* dxShader =
nullptr;
57 context->CSSetShader(dxShader, instances, numInstances);
62 unsigned int bindPoint, ID3D11Buffer*
buffer)
66 ID3D11Buffer*
buffers[1] = { buffer };
67 context->CSSetConstantBuffers(bindPoint, 1, buffers);
72 unsigned int bindPoint)
76 ID3D11Buffer*
buffers[1] = {
nullptr };
77 context->CSSetConstantBuffers(bindPoint, 1, buffers);
82 unsigned int bindPoint, ID3D11ShaderResourceView* srView)
86 ID3D11ShaderResourceView* views[1] = { srView };
87 context->CSSetShaderResources(bindPoint, 1, views);
92 unsigned int bindPoint)
96 ID3D11ShaderResourceView* views[1] = {
nullptr };
97 context->CSSetShaderResources(bindPoint, 1, views);
102 unsigned int bindPoint, ID3D11UnorderedAccessView* uaView,
103 unsigned int initialCount)
107 ID3D11UnorderedAccessView* views[1] = { uaView };
108 unsigned int initialCounts[1] = { initialCount };
109 context->CSSetUnorderedAccessViews(bindPoint, 1, views,
115 unsigned int bindPoint)
119 ID3D11UnorderedAccessView* views[1] = {
nullptr };
120 unsigned int initialCounts[1] = { 0xFFFFFFFFu };
121 context->CSSetUnorderedAccessViews(bindPoint, 1, views,
127 unsigned int bindPoint, ID3D11SamplerState* state)
131 ID3D11SamplerState* states[1] = { state };
132 context->CSSetSamplers(bindPoint, 1, states);
137 unsigned int bindPoint)
141 ID3D11SamplerState* states[1] = {
nullptr };
142 context->CSSetSamplers(bindPoint, 1, states);
virtual void EnableSRView(ID3D11DeviceContext *context, unsigned int bindPoint, ID3D11ShaderResourceView *srView) override
virtual void DisableSRView(ID3D11DeviceContext *context, unsigned int bindPoint) override
static std::shared_ptr< GEObject > Create(void *device, GraphicsObject const *object)
#define CHECK_HR_RETURN_NONE(msg)
DX11ComputeShader(ID3D11Device *device, Shader const *shader)
GraphicsObjectType GetType() const
virtual void DisableSampler(ID3D11DeviceContext *context, unsigned int bindPoint) override
virtual void EnableSampler(ID3D11DeviceContext *context, unsigned int bindPoint, ID3D11SamplerState *state) override
#define LogError(message)
ID3D11DeviceChild * mDXObject
virtual void DisableUAView(ID3D11DeviceContext *context, unsigned int bindPoint) override
virtual void Disable(ID3D11DeviceContext *context) override
virtual void EnableUAView(ID3D11DeviceContext *context, unsigned int bindPoint, ID3D11UnorderedAccessView *uaView, unsigned int initialCount) override
typedef UINT(WINAPI *PFNWGLGETGPUIDSAMDPROC)(UINT maxCount
virtual void EnableCBuffer(ID3D11DeviceContext *context, unsigned int bindPoint, ID3D11Buffer *buffer) override
virtual void DisableCBuffer(ID3D11DeviceContext *context, unsigned int bindPoint) override
std::vector< unsigned char > const & GetCompiledCode() const
virtual void Enable(ID3D11DeviceContext *context) override