ReShade
A generic post-processing injector for games and video software.
Public Member Functions | List of all members
reshade::api::command_list Struct Referenceabstract

A command list, used to enqueue render commands on the CPU, before later executing them in a command queue. More...

#include <reshade_api_device.hpp>

Inheritance diagram for reshade::api::command_list:
reshade::api::device_object reshade::api::api_object

Public Member Functions

void barrier (resource resource, resource_usage old_state, resource_usage new_state)
 Adds a barrier for the specified resource to the command stream. When both old_state and new_state are resource_usage::unordered_access a UAV barrier is added, otherwise a state transition is performed. More...
 
virtual void barrier (uint32_t count, const resource *resources, const resource_usage *old_states, const resource_usage *new_states)=0
 Adds a barrier for the specified resources to the command stream. More...
 
virtual void begin_render_pass (uint32_t count, const render_pass_render_target_desc *rts, const render_pass_depth_stencil_desc *ds=nullptr)=0
 Begins a render pass and binds render target and depth-stencil resource views. More...
 
virtual void end_render_pass ()=0
 Ends a render pass. This must be preceeded by a call to begin_render_pass. Render passes cannot be nested. More...
 
virtual void bind_render_targets_and_depth_stencil (uint32_t count, const resource_view *rtvs, resource_view dsv={ 0 })=0
 Binds individual render target and depth-stencil resource views. This must not be called between begin_render_pass and end_render_pass. More...
 
virtual void bind_pipeline (pipeline_stage stages, pipeline pipeline)=0
 Binds a pipeline state object. More...
 
void bind_pipeline_state (dynamic_state state, uint32_t value)
 Updates the specfified pipeline state to the specified value . This is only valid for states that have been listed in the dynamic states provided at creation of the currently bound pipeline state object. More...
 
virtual void bind_pipeline_states (uint32_t count, const dynamic_state *states, const uint32_t *values)=0
 Updates the specfified pipeline states to the specified values . This is only valid for states that have been listed in the dynamic states provided at creation of the currently bound pipeline state object. More...
 
virtual void bind_viewports (uint32_t first, uint32_t count, const viewport *viewports)=0
 Binds an array of viewports to the rasterizer stage. More...
 
virtual void bind_scissor_rects (uint32_t first, uint32_t count, const rect *rects)=0
 Binds an array of scissor rectangles to the rasterizer stage. More...
 
virtual void push_constants (shader_stage stages, pipeline_layout layout, uint32_t param, uint32_t first, uint32_t count, const void *values)=0
 Directly updates constant values in the specified shader pipeline stages. More...
 
virtual void push_descriptors (shader_stage stages, pipeline_layout layout, uint32_t param, const descriptor_set_update &update)=0
 Directly binds a temporary descriptor set for the specfified shader pipeline stage and updates with an array of descriptors. More...
 
void bind_descriptor_set (shader_stage stages, pipeline_layout layout, uint32_t param, descriptor_set set)
 Binds a single descriptor set. More...
 
virtual void bind_descriptor_sets (shader_stage stages, pipeline_layout layout, uint32_t first, uint32_t count, const descriptor_set *sets)=0
 Binds an array of descriptor sets. More...
 
virtual void bind_index_buffer (resource buffer, uint64_t offset, uint32_t index_size)=0
 Binds an index buffer to the input-assembler stage. More...
 
void bind_vertex_buffer (uint32_t index, resource buffer, uint64_t offset, uint32_t stride)
 Binds a single vertex buffer to the input-assembler stage. More...
 
virtual void bind_vertex_buffers (uint32_t first, uint32_t count, const resource *buffers, const uint64_t *offsets, const uint32_t *strides)=0
 Binds an array of vertex buffers to the input-assembler stage. More...
 
virtual void bind_stream_output_buffers (uint32_t first, uint32_t count, const api::resource *buffers, const uint64_t *offsets, const uint64_t *max_sizes)=0
 Binds an array of buffers to the stream-output stage. More...
 
virtual void draw (uint32_t vertex_count, uint32_t instance_count, uint32_t first_vertex, uint32_t first_instance)=0
 Draws non-indexed primitives. More...
 
virtual void draw_indexed (uint32_t index_count, uint32_t instance_count, uint32_t first_index, int32_t vertex_offset, uint32_t first_instance)=0
 Draws indexed primitives. More...
 
virtual void dispatch (uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z)=0
 Performs a compute shader dispatch. More...
 
virtual void draw_or_dispatch_indirect (indirect_command type, resource buffer, uint64_t offset, uint32_t draw_count, uint32_t stride)=0
 Executes indirect draw or dispatch commands. More...
 
virtual void copy_resource (resource source, resource dest)=0
 Copies the entire contents of the source resource to the dest ination resource. Dimensions of the two resources have to match. More...
 
virtual void copy_buffer_region (resource source, uint64_t source_offset, resource dest, uint64_t dest_offset, uint64_t size)=0
 Copies a linear memory region from the source buffer to the dest ination buffer. More...
 
virtual void copy_buffer_to_texture (resource source, uint64_t source_offset, uint32_t row_length, uint32_t slice_height, resource dest, uint32_t dest_subresource, const subresource_box *dest_box=nullptr)=0
 Copies a texture region from the source buffer to the dest ination texture. More...
 
virtual void copy_texture_region (resource source, uint32_t source_subresource, const subresource_box *source_box, resource dest, uint32_t dest_subresource, const subresource_box *dest_box, filter_mode filter=filter_mode::min_mag_mip_point)=0
 Copies or blits a texture region from the source texture to the dest ination texture. More...
 
virtual void copy_texture_to_buffer (resource source, uint32_t source_subresource, const subresource_box *source_box, resource dest, uint64_t dest_offset, uint32_t row_length=0, uint32_t slice_height=0)=0
 Copies a texture region from the source texture to the dest ination buffer. More...
 
virtual void resolve_texture_region (resource source, uint32_t source_subresource, const subresource_box *source_box, resource dest, uint32_t dest_subresource, int32_t dest_x, int32_t dest_y, int32_t dest_z, format format)=0
 Copies a region from the multisampled source texture to the non-multisampled dest ination texture. More...
 
virtual void clear_depth_stencil_view (resource_view dsv, const float *depth, const uint8_t *stencil, uint32_t rect_count=0, const rect *rects=nullptr)=0
 Clears the resource referenced by the depth-stencil view. More...
 
virtual void clear_render_target_view (resource_view rtv, const float color[4], uint32_t rect_count=0, const rect *rects=nullptr)=0
 Clears the resource referenced by the render target view. More...
 
virtual void clear_unordered_access_view_uint (resource_view uav, const uint32_t values[4], uint32_t rect_count=0, const rect *rects=nullptr)=0
 Clears the resource referenced by the unordered access view. More...
 
virtual void clear_unordered_access_view_float (resource_view uav, const float values[4], uint32_t rect_count=0, const rect *rects=nullptr)=0
 Clears the resource referenced by the unordered access view. More...
 
virtual void generate_mipmaps (resource_view srv)=0
 Generates the lower mipmap levels for the specified shader resource view. Uses the largest mipmap level of the view to recursively generate the lower levels of the mip and stops with the smallest level that is specified by the view. More...
 
virtual void begin_query (query_pool pool, query_type type, uint32_t index)=0
 Begins a query. More...
 
virtual void end_query (query_pool pool, query_type type, uint32_t index)=0
 Ends a query. More...
 
virtual void copy_query_pool_results (query_pool pool, query_type type, uint32_t first, uint32_t count, resource dest, uint64_t dest_offset, uint32_t stride)=0
 Copy the results of queries in a query pool to a buffer resource. More...
 
virtual void begin_debug_event (const char *label, const float color[4]=nullptr)=0
 Opens a debug event region in the command list. More...
 
virtual void end_debug_event ()=0
 Closes the current debug event region (the last one opened with begin_debug_event). More...
 
virtual void insert_debug_marker (const char *label, const float color[4]=nullptr)=0
 Inserts a debug marker into the command list. More...
 
- Public Member Functions inherited from reshade::api::device_object
virtual deviceget_device ()=0
 Gets the parent device for this object. More...
 
- Public Member Functions inherited from reshade::api::api_object
virtual uint64_t get_native () const =0
 Gets the underlying native object for this API object. More...
 
virtual void get_private_data (const uint8_t guid[16], uint64_t *data) const =0
 Gets a user-defined 64-bit value from the object that was previously set via set_private_data, or zero if none associated with the specified guid exists. More...
 
virtual void set_private_data (const uint8_t guid[16], const uint64_t data)=0
 Stores a user-defined 64-bit value in the object and associates it with the specified guid . More...
 
template<typename T >
T & get_private_data () const
 Gets a reference to user-defined data from the object that was previously allocated via create_private_data. More...
 
template<typename T >
T & create_private_data ()
 Allocates user-defined data and stores it in the object. More...
 
template<typename T >
void destroy_private_data ()
 Frees user-defined data that was previously allocated via create_private_data. More...
 

Detailed Description

A command list, used to enqueue render commands on the CPU, before later executing them in a command queue.

Functionally equivalent to a 'ID3D11CommandList', 'ID3D12CommandList' or 'VkCommandBuffer'.

This class may NOT be used concurrently from multiple threads!

Member Function Documentation

◆ barrier() [1/2]

void reshade::api::command_list::barrier ( resource  resource,
resource_usage  old_state,
resource_usage  new_state 
)
inline

Adds a barrier for the specified resource to the command stream. When both old_state and new_state are resource_usage::unordered_access a UAV barrier is added, otherwise a state transition is performed.

Parameters
resourceResource to transition.
old_stateUsage flags describing how the resource was used before this barrier.
new_stateUsage flags describing how the resource will be used after this barrier.

◆ barrier() [2/2]

virtual void reshade::api::command_list::barrier ( uint32_t  count,
const resource resources,
const resource_usage old_states,
const resource_usage new_states 
)
pure virtual

Adds a barrier for the specified resources to the command stream.

Parameters
countNumber of resources to transition.
resourcesPointer to an array of resources to transition.
old_statesPointer to an array of usage flags describing how the resources were used before this barrier.
new_statesPointer to an array of usage flags describing how the resources will be used after this barrier.

◆ begin_debug_event()

virtual void reshade::api::command_list::begin_debug_event ( const char *  label,
const float  color[4] = nullptr 
)
pure virtual

Opens a debug event region in the command list.

Parameters
labelNull-terminated string containing the label of the event.
colorOptional RGBA color value associated with the event.

◆ begin_query()

virtual void reshade::api::command_list::begin_query ( query_pool  pool,
query_type  type,
uint32_t  index 
)
pure virtual

Begins a query.

Parameters
poolQuery pool that will manage the results of the query.
typeType of the query to begin.
indexIndex of the query in the pool.

◆ begin_render_pass()

virtual void reshade::api::command_list::begin_render_pass ( uint32_t  count,
const render_pass_render_target_desc rts,
const render_pass_depth_stencil_desc ds = nullptr 
)
pure virtual

Begins a render pass and binds render target and depth-stencil resource views.

Parameters
countNumber of render target views to bind.
rtsPointer to an array of render target descriptions.
dsOptional pointer to a depth-stencil description, or nullptr to bind none.

◆ bind_descriptor_set()

void reshade::api::command_list::bind_descriptor_set ( shader_stage  stages,
pipeline_layout  layout,
uint32_t  param,
descriptor_set  set 
)
inline

Binds a single descriptor set.

Parameters
stagesShader stages that will use the descriptors.
layoutPipeline layout that describes the descriptors.
paramIndex of the pipeline layout parameter that describes the descriptor set (root parameter index in D3D12, descriptor set index in Vulkan).
setDescriptor set to bind.

◆ bind_descriptor_sets()

virtual void reshade::api::command_list::bind_descriptor_sets ( shader_stage  stages,
pipeline_layout  layout,
uint32_t  first,
uint32_t  count,
const descriptor_set sets 
)
pure virtual

Binds an array of descriptor sets.

Parameters
stagesShader stages that will use the descriptors.
layoutPipeline layout that describes the descriptors.
firstIndex of the first pipeline layout parameter that describes the first descriptor set to bind.
countNumber of descriptor sets to bind.
setsPointer to an array of descriptor sets to bind.

◆ bind_index_buffer()

virtual void reshade::api::command_list::bind_index_buffer ( resource  buffer,
uint64_t  offset,
uint32_t  index_size 
)
pure virtual

Binds an index buffer to the input-assembler stage.

Parameters
bufferIndex buffer resource. This resource must have been created with the resource_usage::index_buffer usage.
offsetOffset (in bytes) from the start of the index buffer to the first index to use. In D3D9 this has to be 0.
index_sizeSize (in bytes) of each index. Can typically be 2 (16-bit indices) or 4 (32-bit indices).

◆ bind_pipeline()

virtual void reshade::api::command_list::bind_pipeline ( pipeline_stage  stages,
pipeline  pipeline 
)
pure virtual

Binds a pipeline state object.

Parameters
stagesPipeline stages to update with state from the pipeline state object.
pipelinePipeline state object to bind.

◆ bind_pipeline_state()

void reshade::api::command_list::bind_pipeline_state ( dynamic_state  state,
uint32_t  value 
)
inline

Updates the specfified pipeline state to the specified value . This is only valid for states that have been listed in the dynamic states provided at creation of the currently bound pipeline state object.

Parameters
statePipeline state to update.
valueValue to update the pipeline state to.

◆ bind_pipeline_states()

virtual void reshade::api::command_list::bind_pipeline_states ( uint32_t  count,
const dynamic_state states,
const uint32_t *  values 
)
pure virtual

Updates the specfified pipeline states to the specified values . This is only valid for states that have been listed in the dynamic states provided at creation of the currently bound pipeline state object.

Parameters
countNumber of pipeline states to update.
statesPointer to an array of pipeline states to update.
valuesPointer to an array of values to update the pipeline states to, with one for each state in states .

◆ bind_render_targets_and_depth_stencil()

virtual void reshade::api::command_list::bind_render_targets_and_depth_stencil ( uint32_t  count,
const resource_view rtvs,
resource_view  dsv = { 0 } 
)
pure virtual

Binds individual render target and depth-stencil resource views. This must not be called between begin_render_pass and end_render_pass.

This is not supported (and will do nothing) in Vulkan.

Parameters
countNumber of render target views to bind.
rtvsPointer to an array of render target views to bind.
dsvDepth-stencil view to bind, or zero to bind none.

◆ bind_scissor_rects()

virtual void reshade::api::command_list::bind_scissor_rects ( uint32_t  first,
uint32_t  count,
const rect rects 
)
pure virtual

Binds an array of scissor rectangles to the rasterizer stage.

Parameters
firstIndex of the first scissor rectangle to bind. In D3D9, D3D10, D3D11 and D3D12 this has to be 0.
countNumber of scissor rectangles to bind. In D3D9 this has to be 1.
rectsPointer to an array of scissor rectangles.

◆ bind_stream_output_buffers()

virtual void reshade::api::command_list::bind_stream_output_buffers ( uint32_t  first,
uint32_t  count,
const api::resource buffers,
const uint64_t *  offsets,
const uint64_t *  max_sizes 
)
pure virtual

Binds an array of buffers to the stream-output stage.

Parameters
firstFirst stream-output slot for binding.
countNumber of stream-output targets to bind.
buffersPointer to an array of buffer resources. These resources must have been created with the resource_usage::stream_output usage.
offsetsPointer to an array of offset values, one for each buffer. Each offset is the number of bytes from the start of the buffer to the first element to write to.
max_sizesOptional pointer to an array of size values, one for each buffer. Can be nullptr or have elements set to UINT64_MAX to use the entire buffer.

◆ bind_vertex_buffer()

void reshade::api::command_list::bind_vertex_buffer ( uint32_t  index,
resource  buffer,
uint64_t  offset,
uint32_t  stride 
)
inline

Binds a single vertex buffer to the input-assembler stage.

Parameters
indexInput slot for binding.
bufferVertex buffer resource. This resources must have been created with the resource_usage::vertex_buffer usage.
offsetOffset (in bytes) from the start of the vertex buffer to the first vertex element to use.
strideSize (in bytes) of the vertex element that will be used from the vertex buffer (is added to an element offset to advance to the next).

◆ bind_vertex_buffers()

virtual void reshade::api::command_list::bind_vertex_buffers ( uint32_t  first,
uint32_t  count,
const resource buffers,
const uint64_t *  offsets,
const uint32_t *  strides 
)
pure virtual

Binds an array of vertex buffers to the input-assembler stage.

Parameters
firstFirst input slot for binding.
countNumber of vertex buffers to bind.
buffersPointer to an array of vertex buffer resources. These resources must have been created with the resource_usage::vertex_buffer usage.
offsetsPointer to an array of offset values, one for each buffer. Each offset is the number of bytes from the start of the vertex buffer to the first vertex element to use.
stridesPointer to an array of stride values, one for each buffer. Each stride is the size (in bytes) of the vertex element that will be used from that vertex buffer (is added to an element offset to advance to the next).

◆ bind_viewports()

virtual void reshade::api::command_list::bind_viewports ( uint32_t  first,
uint32_t  count,
const viewport viewports 
)
pure virtual

Binds an array of viewports to the rasterizer stage.

Parameters
firstIndex of the first viewport to bind. In D3D9, D3D10, D3D11 and D3D12 this has to be 0.
countNumber of viewports to bind. In D3D9 this has to be 1.
viewportsPointer to an array of viewports.

◆ clear_depth_stencil_view()

virtual void reshade::api::command_list::clear_depth_stencil_view ( resource_view  dsv,
const float *  depth,
const uint8_t *  stencil,
uint32_t  rect_count = 0,
const rect rects = nullptr 
)
pure virtual

Clears the resource referenced by the depth-stencil view.

The resource the depth-stencil view points to has to be in the resource_usage::depth_stencil_write state.

Parameters
dsvResource view handle of the depth-stencil.
depthOptional value to clear the depth buffer with.
stencilOptional value to clear the stencil buffer with.
rect_countNumber of rectangles to clear in the depth-stencil resource, or zero to clear the whole resource.
rectsPointer to an array of rectangles.

◆ clear_render_target_view()

virtual void reshade::api::command_list::clear_render_target_view ( resource_view  rtv,
const float  color[4],
uint32_t  rect_count = 0,
const rect rects = nullptr 
)
pure virtual

Clears the resource referenced by the render target view.

The resource the render target view points to has to be in the resource_usage::render_target state.

Parameters
rtvResource view handle of the render target.
colorValue to clear the resource with.
rect_countNumber of rectangles to clear in the render target resource, or zero to clear the whole resource.
rectsPointer to an array of rectangles.

◆ clear_unordered_access_view_float()

virtual void reshade::api::command_list::clear_unordered_access_view_float ( resource_view  uav,
const float  values[4],
uint32_t  rect_count = 0,
const rect rects = nullptr 
)
pure virtual

Clears the resource referenced by the unordered access view.

The resource the unordered access view points to has to be in the resource_usage::unordered_access state.

Parameters
uavResource view handle of the unordered access view.
valuesValue to clear the resource with.
rect_countNumber of rectangles to clear in the unordered access resource, or zero to clear the whole resource.
rectsPointer to an array of rectangles.

◆ clear_unordered_access_view_uint()

virtual void reshade::api::command_list::clear_unordered_access_view_uint ( resource_view  uav,
const uint32_t  values[4],
uint32_t  rect_count = 0,
const rect rects = nullptr 
)
pure virtual

Clears the resource referenced by the unordered access view.

The resource the unordered access view points to has to be in the resource_usage::unordered_access state.

Parameters
uavResource view handle of the unordered access view.
valuesValue to clear the resource with.
rect_countNumber of rectangles to clear in the unordered access resource, or zero to clear the whole resource.
rectsPointer to an array of rectangles.

◆ copy_buffer_region()

virtual void reshade::api::command_list::copy_buffer_region ( resource  source,
uint64_t  source_offset,
resource  dest,
uint64_t  dest_offset,
uint64_t  size 
)
pure virtual

Copies a linear memory region from the source buffer to the dest ination buffer.

This is not supported (and will do nothing) in D3D9. The source resource has to be in the resource_usage::copy_source state. The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
sourceBuffer resource to copy from.
source_offsetOffset (in bytes) into the source buffer to start copying at.
destBuffer resource to copy to.
dest_offsetOffset (in bytes) into the dest ination buffer to start copying to.
sizeNumber of bytes to copy.

◆ copy_buffer_to_texture()

virtual void reshade::api::command_list::copy_buffer_to_texture ( resource  source,
uint64_t  source_offset,
uint32_t  row_length,
uint32_t  slice_height,
resource  dest,
uint32_t  dest_subresource,
const subresource_box dest_box = nullptr 
)
pure virtual

Copies a texture region from the source buffer to the dest ination texture.

The source resource has to be in the resource_usage::copy_source state. The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
sourceBuffer resource to copy from.
source_offsetOffset (in bytes) into the source buffer to start copying at.
row_lengthNumber of pixels from one row to the next (in the buffer), or zero if data is tightly packed.
slice_heightNumber of rows from one slice to the next (in the buffer) or zero if data is tightly packed.
destTexture resource to copy to.
dest_subresourceIndex of the subresource of the dest ination texture to copy to.
dest_boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the dest ination texture to copy to.

◆ copy_query_pool_results()

virtual void reshade::api::command_list::copy_query_pool_results ( query_pool  pool,
query_type  type,
uint32_t  first,
uint32_t  count,
resource  dest,
uint64_t  dest_offset,
uint32_t  stride 
)
pure virtual

Copy the results of queries in a query pool to a buffer resource.

The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
poolQuery pool that manages the results of the queries.
typeType of the queries to copy.
firstIndex of the first query in the pool to copy the result from.
countNumber of query results to copy.
destBuffer resource to copy to.
dest_offsetOffset (in bytes) into the dest ination buffer to start copying to.
strideSize (in bytes) of each result element.

◆ copy_resource()

virtual void reshade::api::command_list::copy_resource ( resource  source,
resource  dest 
)
pure virtual

Copies the entire contents of the source resource to the dest ination resource. Dimensions of the two resources have to match.

The source resource has to be in the resource_usage::copy_source state. The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
sourceResource to copy from.
destResource to copy to.

◆ copy_texture_region()

virtual void reshade::api::command_list::copy_texture_region ( resource  source,
uint32_t  source_subresource,
const subresource_box source_box,
resource  dest,
uint32_t  dest_subresource,
const subresource_box dest_box,
filter_mode  filter = filter_mode::min_mag_mip_point 
)
pure virtual

Copies or blits a texture region from the source texture to the dest ination texture.

The source resource has to be in the resource_usage::copy_source state. The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
sourceTexture resource to copy from.
source_subresourceIndex of the subresource of the source texture to copy from.
source_boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the source texture to blit from.
destTexture resource to copy to.
dest_subresourceIndex of the subresource of the dest ination texture to copy to.
dest_boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the dest ination texture to blit to.
filterFilter to apply when copy requires scaling.

◆ copy_texture_to_buffer()

virtual void reshade::api::command_list::copy_texture_to_buffer ( resource  source,
uint32_t  source_subresource,
const subresource_box source_box,
resource  dest,
uint64_t  dest_offset,
uint32_t  row_length = 0,
uint32_t  slice_height = 0 
)
pure virtual

Copies a texture region from the source texture to the dest ination buffer.

The source resource has to be in the resource_usage::copy_source state. The dest ination resource has to be in the resource_usage::copy_dest state.

Parameters
sourceTexture resource to copy from.
source_subresourceIndex of the subresource of the source texture to copy from.
source_boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the source texture to copy from.
destBuffer resource to copy to.
dest_offsetOffset (in bytes) into the dest ination buffer to start copying to.
row_lengthNumber of pixels from one row to the next (in the buffer), or zero if data is tightly packed.
slice_heightNumber of rows from one slice to the next (in the buffer), or zero if data is tightly packed.

◆ dispatch()

virtual void reshade::api::command_list::dispatch ( uint32_t  group_count_x,
uint32_t  group_count_y,
uint32_t  group_count_z 
)
pure virtual

Performs a compute shader dispatch.

This is not supported (and will do nothing) in D3D9 and D3D10.

Parameters
group_count_xNumber of thread groups dispatched in the x direction.
group_count_yNumber of thread groups dispatched in the y direction.
group_count_zNumber of thread groups dispatched in the z direction.

◆ draw()

virtual void reshade::api::command_list::draw ( uint32_t  vertex_count,
uint32_t  instance_count,
uint32_t  first_vertex,
uint32_t  first_instance 
)
pure virtual

Draws non-indexed primitives.

Parameters
vertex_countNumber of vertices to draw.
instance_countNumber of instances to draw. In D3D9 this has to be 1.
first_vertexIndex of the first vertex.
first_instanceValue added to each index before reading per-instance data from a vertex buffer. In D3D9 this has to be 0.

◆ draw_indexed()

virtual void reshade::api::command_list::draw_indexed ( uint32_t  index_count,
uint32_t  instance_count,
uint32_t  first_index,
int32_t  vertex_offset,
uint32_t  first_instance 
)
pure virtual

Draws indexed primitives.

Parameters
index_countNumber of indices read from the index buffer for each instance.
instance_countNumber of instances to draw. In D3D9 this has to be 1.
first_indexLocation of the first index read from the index buffer.
vertex_offsetValue added to each index before reading per-vertex data from a vertex buffer.
first_instanceValue added to each index before reading per-instance data from a vertex buffer. In D3D9 this has to be 0.

◆ draw_or_dispatch_indirect()

virtual void reshade::api::command_list::draw_or_dispatch_indirect ( indirect_command  type,
resource  buffer,
uint64_t  offset,
uint32_t  draw_count,
uint32_t  stride 
)
pure virtual

Executes indirect draw or dispatch commands.

This is not supported (and will do nothing) in D3D9 and D3D10.

Parameters
typeSpecifies whether this is an indirect draw, indexed draw or dispatch command.
bufferBuffer resource that contains command arguments.
offsetOffset (in bytes) from the start of the argument buffer to the first argument to use.
draw_countNumber of commands to execute.
strideStride (in bytes) between commands in the argument buffer.

◆ end_debug_event()

virtual void reshade::api::command_list::end_debug_event ( )
pure virtual

Closes the current debug event region (the last one opened with begin_debug_event).

◆ end_query()

virtual void reshade::api::command_list::end_query ( query_pool  pool,
query_type  type,
uint32_t  index 
)
pure virtual

Ends a query.

Parameters
poolQuery pool that will manage the results of the query.
typeType of the query end.
indexIndex of the query in the pool.

◆ end_render_pass()

virtual void reshade::api::command_list::end_render_pass ( )
pure virtual

Ends a render pass. This must be preceeded by a call to begin_render_pass. Render passes cannot be nested.

◆ generate_mipmaps()

virtual void reshade::api::command_list::generate_mipmaps ( resource_view  srv)
pure virtual

Generates the lower mipmap levels for the specified shader resource view. Uses the largest mipmap level of the view to recursively generate the lower levels of the mip and stops with the smallest level that is specified by the view.

This will invalidate all previous descriptor bindings, which will need to be reset by calls to bind_descriptor_set or push_descriptors. The resource the shader resource view points to has to be in the resource_usage::shader_resource state and has to have been created with the resource_flags::generate_mipmaps flag.

Parameters
srvShader resource view to update.

◆ insert_debug_marker()

virtual void reshade::api::command_list::insert_debug_marker ( const char *  label,
const float  color[4] = nullptr 
)
pure virtual

Inserts a debug marker into the command list.

Parameters
labelNull-terminated string containing the label of the debug marker.
colorOptional RGBA color value associated with the debug marker.

◆ push_constants()

virtual void reshade::api::command_list::push_constants ( shader_stage  stages,
pipeline_layout  layout,
uint32_t  param,
uint32_t  first,
uint32_t  count,
const void *  values 
)
pure virtual

Directly updates constant values in the specified shader pipeline stages.

In D3D9 this updates the values of uniform registers, in D3D10/11 and OpenGL the constant buffer specified in the pipeline layout, in D3D12 it sets root constants and in Vulkan push constants.

Parameters
stagesShader stages that will use the updated constants.
layoutPipeline layout that describes where the constants are located.
paramLayout parameter index of the constant range in the pipeline layout (root parameter index in D3D12).
firstStart offset (in 32-bit values) to the first constant in the constant range to begin updating.
countNumber of 32-bit values to update.
valuesPointer to an array of 32-bit values to set the constants to. These can be floating-point, integer or boolean depending on what the shader is expecting.

◆ push_descriptors()

virtual void reshade::api::command_list::push_descriptors ( shader_stage  stages,
pipeline_layout  layout,
uint32_t  param,
const descriptor_set_update update 
)
pure virtual

Directly binds a temporary descriptor set for the specfified shader pipeline stage and updates with an array of descriptors.

Parameters
stagesShader stages that will use the updated descriptors.
layoutPipeline layout that describes the descriptors.
paramLayout parameter index of the descriptor set in the pipeline layout (root parameter index in D3D12, descriptor set index in Vulkan).
updateRange of descriptors to update in the temporary set (descriptor_set_update::set is ignored).

◆ resolve_texture_region()

virtual void reshade::api::command_list::resolve_texture_region ( resource  source,
uint32_t  source_subresource,
const subresource_box source_box,
resource  dest,
uint32_t  dest_subresource,
int32_t  dest_x,
int32_t  dest_y,
int32_t  dest_z,
format  format 
)
pure virtual

Copies a region from the multisampled source texture to the non-multisampled dest ination texture.

The source resource has to be in the resource_usage::resolve_source state. The dest ination resource has to be in the resource_usage::resolve_dest state.

Parameters
sourceTexture resource to resolve from.
source_subresourceIndex of the subresource of the source texture to resolve from.
source_boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the source texture to resolve. In D3D10 and D3D11 this has to be nullptr.
destTexture resource to resolve to.
dest_subresourceIndex of the subresource of the dest ination texture to resolve to.
dest_xOptional X offset (in texels) that defines the region in the dest ination texture to resolve to. In D3D10 and D3D11 this has to be zero.
dest_yOptional Y offset (in texels) that defines the region in the dest ination texture to resolve to. In D3D10 and D3D11 this has to be zero.
dest_zOptional Z offset (in texels) that defines the region in the dest ination texture to resolve to. In D3D10 and D3D11 this has to be zero.
formatFormat of the resource data.

The documentation for this struct was generated from the following file: