MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::Pipeline::CS Struct Reference

#include <pipeline.hpp>

Static Public Member Functions

static void BindShader (ID3D11DeviceContext &device_context, ID3D11ComputeShader *shader) noexcept
 
static void BindShader (ID3D11DeviceContext &device_context, ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, U32 nb_class_instances) noexcept
 
static void BindConstantBuffer (ID3D11DeviceContext &device_context, U32 slot, ID3D11Buffer *buffer) noexcept
 
static void BindConstantBuffers (ID3D11DeviceContext &device_context, U32 slot, U32 nb_buffers, ID3D11Buffer *const *buffers) noexcept
 
static void BindSRV (ID3D11DeviceContext &device_context, U32 slot, ID3D11ShaderResourceView *srv) noexcept
 
static void BindSRVs (ID3D11DeviceContext &device_context, U32 slot, U32 nb_srvs, ID3D11ShaderResourceView *const *srvs) noexcept
 
static void BindUAV (ID3D11DeviceContext &device_context, U32 slot, ID3D11UnorderedAccessView *uav, U32 initial_count=0u) noexcept
 
static void BindUAVs (ID3D11DeviceContext &device_context, U32 slot, U32 nb_uavs, ID3D11UnorderedAccessView *const *uavs, const U32 *initial_counts=nullptr) noexcept
 
static void BindSampler (ID3D11DeviceContext &device_context, U32 slot, ID3D11SamplerState *sampler) noexcept
 
static void BindSamplers (ID3D11DeviceContext &device_context, U32 slot, U32 nb_samplers, ID3D11SamplerState *const *samplers) noexcept
 

Detailed Description

The compute shader stage.

Member Function Documentation

◆ BindConstantBuffer()

static void mage::rendering::Pipeline::CS::BindConstantBuffer ( ID3D11DeviceContext &  device_context,
U32  slot,
ID3D11Buffer *  buffer 
)
staticnoexcept

Binds a constant buffer to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to set the constant buffer to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1).
[in]bufferA pointer to the constant buffer.

◆ BindConstantBuffers()

static void mage::rendering::Pipeline::CS::BindConstantBuffers ( ID3D11DeviceContext &  device_context,
U32  slot,
U32  nb_buffers,
ID3D11Buffer *const *  buffers 
)
staticnoexcept

Binds an array of constant buffers to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT.
nb_buffers < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
  • slot.
buffers points to an array containing at least nb_buffers pointers to a constant buffer.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1).
[in]nb_buffersThe number of constant buffers in the array (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
  • slot).
[in]buffersA pointer to an array of constant buffers.

◆ BindSampler()

static void mage::rendering::Pipeline::CS::BindSampler ( ID3D11DeviceContext &  device_context,
U32  slot,
ID3D11SamplerState *  sampler 
)
staticnoexcept

Binds a sampler to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to set the sampler to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).
[in]samplerA pointer to the sampler.

◆ BindSamplers()

static void mage::rendering::Pipeline::CS::BindSamplers ( ID3D11DeviceContext &  device_context,
U32  slot,
U32  nb_samplers,
ID3D11SamplerState *const *  samplers 
)
staticnoexcept

Binds an array of samplers to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT.
nb_samplers < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT
  • slot.
samplers points to an array containing at least nb_samplers pointers to a sampler.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to begin setting samplers to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).
[in]nb_samplersThe number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - slot).
[in]samplersA pointer to an array of samplers.

◆ BindShader() [1/2]

static void mage::rendering::Pipeline::CS::BindShader ( ID3D11DeviceContext &  device_context,
ID3D11ComputeShader *  shader 
)
staticnoexcept

Binds a compute shader to the compute shader stage.

Parameters
[in,out]device_contextA reference to the device context.
[in]shaderA pointer to the compute shader.

◆ BindShader() [2/2]

static void mage::rendering::Pipeline::CS::BindShader ( ID3D11DeviceContext &  device_context,
ID3D11ComputeShader *  shader,
ID3D11ClassInstance *const *  class_instances,
U32  nb_class_instances 
)
staticnoexcept

Binds a compute shader to the compute shader stage.

Parameters
[in,out]device_contextA reference to the device context.
[in]shaderA pointer to the compute shader.
[in]class_instancesA pointer to an array of class-instance interfaces.
[in]nb_class_instancesThe numberof class-instance interfaces.

◆ BindSRV()

static void mage::rendering::Pipeline::CS::BindSRV ( ID3D11DeviceContext &  device_context,
U32  slot,
ID3D11ShaderResourceView *  srv 
)
staticnoexcept

Binds a shader resource view to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to set the shader resource view to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1).
[in]srvA pointer to the shader resource view.

◆ BindSRVs()

static void mage::rendering::Pipeline::CS::BindSRVs ( ID3D11DeviceContext &  device_context,
U32  slot,
U32  nb_srvs,
ID3D11ShaderResourceView *const *  srvs 
)
staticnoexcept

Binds an array of shader resource views to the compute shader stage.

Precondition
slot < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT.
nb_srvs < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
  • slot.
srvs points to an array containing at least nb_srvs pointers to a shader resource view.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to begin setting shader resource views to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1).
[in]nb_srvsThe number of shader resource views in the array. Up to a maximum of 128 slots are available for shader resource views (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - slot).
[in]srvsA pointer to an array of shader resource views.

◆ BindUAV()

static void mage::rendering::Pipeline::CS::BindUAV ( ID3D11DeviceContext &  device_context,
U32  slot,
ID3D11UnorderedAccessView *  uav,
U32  initial_count = 0u 
)
staticnoexcept

Binds an unordered access view to the compute shader stage.

Precondition
slot < D3D11_1_UAV_SLOT_COUNT.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to begin setting unordered access views to (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1).
[in]uavA pointer to the unordered access view.
[in]initial_countThe append and consume buffer offsets. This is only used for unordered access views created with D3D11_BUFFER_UAV_FLAG_APPEND or D3D11_BUFFER_UAV_FLAG_COUNTER.

◆ BindUAVs()

static void mage::rendering::Pipeline::CS::BindUAVs ( ID3D11DeviceContext &  device_context,
U32  slot,
U32  nb_uavs,
ID3D11UnorderedAccessView *const *  uavs,
const U32 initial_counts = nullptr 
)
staticnoexcept

Binds an array of unordered access views to the compute shader stage.

Precondition
slot < D3D11_1_UAV_SLOT_COUNT.
nb_uavs < D3D11_1_UAV_SLOT_COUNT - slot.
uavs points to an array containing at least nb_uavs pointers to an unordered access view.
Parameters
[in,out]device_contextA reference to the device context.
[in]slotThe index into the device's zero-based array to begin setting unordered access views to (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1).
[in]nb_uavsThe number of unordered access views in the array. Up to a maximum of 64 slots are available for unordered access views (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - slot).
[in]uavsA pointer to an array of unordered access views.
[in]initial_countsA pointer to an array of append and consume buffer offsets. This is only used for unordered access views created with D3D11_BUFFER_UAV_FLAG_APPEND or D3D11_BUFFER_UAV_FLAG_COUNTER.