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

A logical render device, used for resource creation and global operations. More...

#include <reshade_api_device.hpp>

Inheritance diagram for reshade::api::device:
reshade::api::api_object

Public Member Functions

virtual device_api get_api () const =0
 Gets the underlying graphics API used by this device. More...
 
virtual bool check_capability (device_caps capability) const =0
 Checks whether the device supports the specified capability . More...
 
virtual bool check_format_support (format format, resource_usage usage) const =0
 Checks whether the specified texture format supports the specified usage . More...
 
virtual bool create_sampler (const sampler_desc &desc, sampler *out_sampler)=0
 Creates a new sampler state object. More...
 
virtual void destroy_sampler (sampler sampler)=0
 Instantly destroys a sampler that was previously created via create_sampler. More...
 
virtual bool create_resource (const resource_desc &desc, const subresource_data *initial_data, resource_usage initial_state, resource *out_resource, void **shared_handle=nullptr)=0
 Allocates and creates a new resource. More...
 
virtual void destroy_resource (resource resource)=0
 Instantly destroys a resource that was previously created via create_resource and frees its memory. Make sure the resource is no longer in use on the GPU (via any command list that may reference it and is still being executed) before doing this (e.g. with command_queue::wait_idle) and never try to destroy resources created by the application! More...
 
virtual resource_desc get_resource_desc (resource resource) const =0
 Gets the description of the specified resource. More...
 
virtual bool create_resource_view (resource resource, resource_usage usage_type, const resource_view_desc &desc, resource_view *out_view)=0
 Creates a new resource view for the specified resource . More...
 
virtual void destroy_resource_view (resource_view view)=0
 Instantly destroys a resource view that was previously created via create_resource_view. More...
 
virtual resource get_resource_from_view (resource_view view) const =0
 Gets the handle to the underlying resource the specified resource view was created for. More...
 
virtual resource_view_desc get_resource_view_desc (resource_view view) const =0
 Gets the description of the specified resource view. More...
 
virtual bool map_buffer_region (resource resource, uint64_t offset, uint64_t size, map_access access, void **out_data)=0
 Maps the memory of a buffer resource into application address space. More...
 
virtual void unmap_buffer_region (resource resource)=0
 Unmaps a previously mapped buffer resource. More...
 
virtual bool map_texture_region (resource resource, uint32_t subresource, const subresource_box *box, map_access access, subresource_data *out_data)=0
 Maps the memory of a texture resource into application address space. More...
 
virtual void unmap_texture_region (resource resource, uint32_t subresource)=0
 Unmaps a previously mapped texture resource. More...
 
virtual void update_buffer_region (const void *data, resource resource, uint64_t offset, uint64_t size)=0
 Uploads data to a buffer resource. More...
 
virtual void update_texture_region (const subresource_data &data, resource resource, uint32_t subresource, const subresource_box *box=nullptr)=0
 Uploads data to a texture resource. More...
 
virtual bool create_pipeline (pipeline_layout layout, uint32_t subobject_count, const pipeline_subobject *subobjects, pipeline *out_pipeline)=0
 Creates a new pipeline state object. More...
 
virtual void destroy_pipeline (pipeline pipeline)=0
 Instantly destroys a pipeline state object that was previously created via create_pipeline. More...
 
virtual bool create_pipeline_layout (uint32_t param_count, const pipeline_layout_param *params, pipeline_layout *out_layout)=0
 Creates a new pipeline layout. More...
 
virtual void destroy_pipeline_layout (pipeline_layout layout)=0
 Instantly destroys a pipeline layout that was previously created via create_pipeline_layout. More...
 
bool allocate_descriptor_table (pipeline_layout layout, uint32_t param, descriptor_table *out_table)
 Allocates a descriptor table from an internal descriptor heap. More...
 
virtual bool allocate_descriptor_tables (uint32_t count, pipeline_layout layout, uint32_t param, descriptor_table *out_tables)=0
 Allocates one or more descriptor tables from an internal descriptor heap. More...
 
void free_descriptor_table (descriptor_table table)
 Frees a descriptor table that was previously allocated via allocate_descriptor_table. More...
 
virtual void free_descriptor_tables (uint32_t count, const descriptor_table *tables)=0
 Frees one or more descriptor tables that were previously allocated via allocate_descriptor_tables. More...
 
virtual void get_descriptor_heap_offset (descriptor_table table, uint32_t binding, uint32_t array_offset, descriptor_heap *out_heap, uint32_t *out_offset) const =0
 Gets the offset (in descriptors) of the specified binding in the underlying descriptor heap of a descriptor table. More...
 
void copy_descriptors (const descriptor_table_copy &copy)
 Copies the contents of a descriptor table to another descriptor table. More...
 
virtual void copy_descriptor_tables (uint32_t count, const descriptor_table_copy *copies)=0
 Copies the contents between multiple descriptor tables. More...
 
void update_descriptors (const descriptor_table_update &update)
 Updates the contents of a descriptor table with the specified descriptors. More...
 
virtual void update_descriptor_tables (uint32_t count, const descriptor_table_update *updates)=0
 Updates the contents of multiple descriptor tables with the specified descriptors. More...
 
virtual bool create_query_heap (query_type type, uint32_t size, query_heap *out_heap)=0
 Creates a new query heap. More...
 
virtual void destroy_query_heap (query_heap heap)=0
 Instantly destroys a query heap that was previously created via create_query_heap. More...
 
virtual bool get_query_heap_results (query_heap heap, uint32_t first, uint32_t count, void *results, uint32_t stride)=0
 Gets the results of queries in a query heap. More...
 
virtual void set_resource_name (resource resource, const char *name)=0
 Associates a name with a resource, for easier debugging in external tools. More...
 
virtual void set_resource_view_name (resource_view view, const char *name)=0
 Associates a name with a resource view, for easier debugging in external tools. More...
 
virtual bool create_fence (uint64_t initial_value, fence_flags flags, fence *out_fence, void **shared_handle=nullptr)=0
 Creates a new fence synchronization object. More...
 
virtual void destroy_fence (fence fence)=0
 Instantly destroys a fence that was previously created via create_fence. More...
 
virtual uint64_t get_completed_fence_value (fence fence) const =0
 Gets the current value of the specified fence. More...
 
virtual bool wait (fence fence, uint64_t value, uint64_t timeout=UINT64_MAX)=0
 Wait until the specified fence reached the specified value. More...
 
virtual bool signal (fence fence, uint64_t value)=0
 Updates the specified fence to the specified value. More...
 
virtual bool get_property (device_properties property, void *data) const =0
 Gets data for a property of this device. More...
 
virtual uint64_t get_resource_view_gpu_address (resource_view view) const =0
 Gets the GPU address for a resource view. More...
 
virtual void get_acceleration_structure_size (acceleration_structure_type type, acceleration_structure_build_flags flags, uint32_t input_count, const acceleration_structure_build_input *inputs, uint64_t *out_size, uint64_t *out_build_scratch_size, uint64_t *out_update_scratch_size) const =0
 Gets the required acceleration structure size needed to build the specified data. More...
 
virtual bool get_pipeline_shader_group_handles (pipeline pipeline, uint32_t first, uint32_t count, void *out_handles)=0
 Gets the shader group handles for a ray tracing pipeline, to be put into a shader binding table. 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 , typename... Args>
T & create_private_data (Args &&... args)
 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 logical render device, used for resource creation and global operations.

Functionally equivalent to a 'IDirect3DDevice9', 'ID3D10Device', 'ID3D11Device', 'ID3D12Device', 'HGLRC' or 'VkDevice'.

This class is safe to use concurrently from multiple threads in D3D10+ and Vulkan.

Member Function Documentation

◆ allocate_descriptor_table()

bool reshade::api::device::allocate_descriptor_table ( pipeline_layout  layout,
uint32_t  param,
descriptor_table out_table 
)
inline

Allocates a descriptor table from an internal descriptor heap.

Parameters
layoutPipeline layout that contains a parameter that describes the descriptor table.
paramIndex of the pipeline layout parameter that describes the descriptor table.
out_tablePointer to a a variable that is set to the handles of the created descriptor table.
Returns
true if the descriptor table was successfully allocated, false otherwise (in this case out_table is set to zeroe).

◆ allocate_descriptor_tables()

virtual bool reshade::api::device::allocate_descriptor_tables ( uint32_t  count,
pipeline_layout  layout,
uint32_t  param,
descriptor_table out_tables 
)
pure virtual

Allocates one or more descriptor tables from an internal descriptor heap.

Parameters
countNumber of descriptor tables to allocate.
layoutPipeline layout that contains a parameter that describes the descriptor tables.
paramIndex of the pipeline layout parameter that describes the descriptor tables.
out_tablesPointer to the first element of an array of handles with at least count elements that is filled with the handles of the created descriptor tables.
Returns
true if the descriptor tables were successfully allocated, false otherwise (in this case out_tables is filled with zeroes).

◆ check_capability()

virtual bool reshade::api::device::check_capability ( device_caps  capability) const
pure virtual

Checks whether the device supports the specified capability .

◆ check_format_support()

virtual bool reshade::api::device::check_format_support ( format  format,
resource_usage  usage 
) const
pure virtual

Checks whether the specified texture format supports the specified usage .

◆ copy_descriptor_tables()

virtual void reshade::api::device::copy_descriptor_tables ( uint32_t  count,
const descriptor_table_copy copies 
)
pure virtual

Copies the contents between multiple descriptor tables.

Parameters
countNumber of copies to process.
copiesPointer to the first element of an array of descriptor table copies to process.

◆ copy_descriptors()

void reshade::api::device::copy_descriptors ( const descriptor_table_copy copy)
inline

Copies the contents of a descriptor table to another descriptor table.

Parameters
copyDescriptor table copy to process.

◆ create_fence()

virtual bool reshade::api::device::create_fence ( uint64_t  initial_value,
fence_flags  flags,
fence out_fence,
void **  shared_handle = nullptr 
)
pure virtual

Creates a new fence synchronization object.

Parameters
initial_valueThe initial value for the fence.
flagsFence creation options.
out_fencePointer to a variable that is set to the handle of the created fence.
shared_handleOptional pointer to a variable of type HANDLE used when flags contains fence_flags::shared. When that variable is a nullptr, it is set to the exported shared handle of the created fence. When that variable is a valid handle, the fence is imported from that shared handle.
Returns
true if the fence was successfully created, false otherwise (in this case out_fence is set to zero).

◆ create_pipeline()

virtual bool reshade::api::device::create_pipeline ( pipeline_layout  layout,
uint32_t  subobject_count,
const pipeline_subobject subobjects,
pipeline out_pipeline 
)
pure virtual

Creates a new pipeline state object.

Parameters
layoutPipeline layout to use.
subobject_countNumber of sub-objects.
subobjectsPointer to the first element of an array of sub-objects that describe this pipeline.
out_pipelinePointer to a variable that is set to the handle of the created pipeline state object.
Returns
true if the pipeline state object was successfully created, false otherwise (in this case out_pipeline is set to zero).

◆ create_pipeline_layout()

virtual bool reshade::api::device::create_pipeline_layout ( uint32_t  param_count,
const pipeline_layout_param params,
pipeline_layout out_layout 
)
pure virtual

Creates a new pipeline layout.

Parameters
param_countNumber of layout parameters.
paramsPointer to the first element of an array of layout parameters that describe this pipeline layout.
out_layoutPointer to a variable that is set to the handle of the created pipeline layout.
Returns
true if the pipeline layout was successfully created, false otherwise (in this case out_layout is set to zero).

◆ create_query_heap()

virtual bool reshade::api::device::create_query_heap ( query_type  type,
uint32_t  size,
query_heap out_heap 
)
pure virtual

Creates a new query heap.

Parameters
typeType of queries that will be used with this query heap.
sizeNumber of queries to allocate in the query heap.
out_heapPointer to a variable that is set to the handle of the created query heap.
Returns
true if the query heap was successfully created, false otherwise (in this case out_heap is set to zero).

◆ create_resource()

virtual bool reshade::api::device::create_resource ( const resource_desc desc,
const subresource_data initial_data,
resource_usage  initial_state,
resource out_resource,
void **  shared_handle = nullptr 
)
pure virtual

Allocates and creates a new resource.

Parameters
descDescription of the resource to create.
initial_dataOptional data to upload to the resource after creation. This should point to an array of mapped_subresource, one for each subresource (mipmap levels and array layers). Can be nullptr to indicate no initial data to upload.
initial_stateInitial state of the resource after creation. This can later be changed via command_list::barrier. It should also be part of the resource_desc::usage flags of the description.
out_resourcePointer to a variable that is set to the handle of the created resource.
shared_handleOptional pointer to a variable of type HANDLE used when resource_desc::flags contains resource_flags::shared. When that variable is a nullptr, it is set to the exported shared handle of the created resource. When that variable is a valid handle, the resource is imported from that shared handle.
Returns
true if the resource was successfully created, false otherwise (in this case out_resource is set to zero).

◆ create_resource_view()

virtual bool reshade::api::device::create_resource_view ( resource  resource,
resource_usage  usage_type,
const resource_view_desc desc,
resource_view out_view 
)
pure virtual

Creates a new resource view for the specified resource .

Parameters
resourceResource to create the view to.
usage_typeUsage type of the resource view to create. Set to resource_usage::shader_resource to create a shader resource view, resource_usage::depth_stencil for a depth-stencil view, resource_usage::render_target for a render target etc.
descDescription of the resource view to create.
out_viewPointer to a variable that is set to the handle of the created resource view.
Returns
true if the resource view was successfully created, false otherwise (in this case out_view is set to zero).

◆ create_sampler()

virtual bool reshade::api::device::create_sampler ( const sampler_desc desc,
sampler out_sampler 
)
pure virtual

Creates a new sampler state object.

Parameters
descDescription of the sampler to create.
out_samplerPointer to a variable that is set to the handle of the created sampler.
Returns
true if the sampler was successfully created, false otherwise (in this case out_sampler is set to zero).

◆ destroy_fence()

virtual void reshade::api::device::destroy_fence ( fence  fence)
pure virtual

Instantly destroys a fence that was previously created via create_fence.

◆ destroy_pipeline()

virtual void reshade::api::device::destroy_pipeline ( pipeline  pipeline)
pure virtual

Instantly destroys a pipeline state object that was previously created via create_pipeline.

◆ destroy_pipeline_layout()

virtual void reshade::api::device::destroy_pipeline_layout ( pipeline_layout  layout)
pure virtual

Instantly destroys a pipeline layout that was previously created via create_pipeline_layout.

◆ destroy_query_heap()

virtual void reshade::api::device::destroy_query_heap ( query_heap  heap)
pure virtual

Instantly destroys a query heap that was previously created via create_query_heap.

◆ destroy_resource()

virtual void reshade::api::device::destroy_resource ( resource  resource)
pure virtual

Instantly destroys a resource that was previously created via create_resource and frees its memory. Make sure the resource is no longer in use on the GPU (via any command list that may reference it and is still being executed) before doing this (e.g. with command_queue::wait_idle) and never try to destroy resources created by the application!

◆ destroy_resource_view()

virtual void reshade::api::device::destroy_resource_view ( resource_view  view)
pure virtual

Instantly destroys a resource view that was previously created via create_resource_view.

◆ destroy_sampler()

virtual void reshade::api::device::destroy_sampler ( sampler  sampler)
pure virtual

Instantly destroys a sampler that was previously created via create_sampler.

◆ free_descriptor_table()

void reshade::api::device::free_descriptor_table ( descriptor_table  table)
inline

Frees a descriptor table that was previously allocated via allocate_descriptor_table.

◆ free_descriptor_tables()

virtual void reshade::api::device::free_descriptor_tables ( uint32_t  count,
const descriptor_table tables 
)
pure virtual

Frees one or more descriptor tables that were previously allocated via allocate_descriptor_tables.

◆ get_acceleration_structure_size()

virtual void reshade::api::device::get_acceleration_structure_size ( acceleration_structure_type  type,
acceleration_structure_build_flags  flags,
uint32_t  input_count,
const acceleration_structure_build_input inputs,
uint64_t *  out_size,
uint64_t *  out_build_scratch_size,
uint64_t *  out_update_scratch_size 
) const
pure virtual

Gets the required acceleration structure size needed to build the specified data.

See also
device_caps::ray_tracing
Parameters
typeType of the acceleration structure.
flagsAcceleration structure build options.
input_countNumber of build inputs.
inputsPointer to the first element of an array of build inputs describing the geometry of the acceleration structure.
out_sizePointer to a variable that is set to the required buffer size for the acceleration structure.
out_build_scratch_sizePointer to a variable that is set to the required scratch buffer size for building the acceleration structure.
out_update_scratch_sizePointer to a variable that is set to the required scratch buffer size for updating the acceleration structure.

◆ get_api()

virtual device_api reshade::api::device::get_api ( ) const
pure virtual

Gets the underlying graphics API used by this device.

◆ get_completed_fence_value()

virtual uint64_t reshade::api::device::get_completed_fence_value ( fence  fence) const
pure virtual

Gets the current value of the specified fence.

◆ get_descriptor_heap_offset()

virtual void reshade::api::device::get_descriptor_heap_offset ( descriptor_table  table,
uint32_t  binding,
uint32_t  array_offset,
descriptor_heap out_heap,
uint32_t *  out_offset 
) const
pure virtual

Gets the offset (in descriptors) of the specified binding in the underlying descriptor heap of a descriptor table.

Parameters
tableDescriptor table to get the offset from.
bindingBinding in the descriptor table to get the offset from.
array_offsetArray index in the specified binding .
out_heapPointer to a variable that is set to the handle of the underlying descriptor heap the table was allocated from.
out_offsetPointer to a variable that is set to the offset of the binding in the underlying descriptor heap.

◆ get_pipeline_shader_group_handles()

virtual bool reshade::api::device::get_pipeline_shader_group_handles ( pipeline  pipeline,
uint32_t  first,
uint32_t  count,
void *  out_handles 
)
pure virtual

Gets the shader group handles for a ray tracing pipeline, to be put into a shader binding table.

See also
device_caps::ray_tracing
Parameters
pipelineRay tracing pipeline to query.
firstIndex of the first shader group in the pipeline_subobject_type::shader_groups array that was used to create the pipeline.
countNumber of shader groups to get handles for.
out_handlesPointer to the first element of an array (with elements of the size reported by device_properties::shader_group_handle_size) that is filled with the handles.
Returns
true if the shader group handles were successfully retrieved, false otherwise.

◆ get_property()

virtual bool reshade::api::device::get_property ( device_properties  property,
void *  data 
) const
pure virtual

Gets data for a property of this device.

Parameters
propertyProperty to query.
dataPointer to a variable that is set to the value of the property. The necessary data type is documented at the device_properties enumeration.
Returns
true if the property exists and was retrieved, false otherwise.

◆ get_query_heap_results()

virtual bool reshade::api::device::get_query_heap_results ( query_heap  heap,
uint32_t  first,
uint32_t  count,
void *  results,
uint32_t  stride 
)
pure virtual

Gets the results of queries in a query heap.

Parameters
heapQuery heap that contains the queries.
firstIndex of the first query in the query heap to copy the results from.
countNumber of query results to copy.
resultsPointer to the first element of an array that is filled with the results. The necessary data type is documented at the query_type enumeration.
strideSize (in bytes) of each element in the results array.
Returns
true if the query results were successfully downloaded from the GPU, false otherwise.

◆ get_resource_desc()

virtual resource_desc reshade::api::device::get_resource_desc ( resource  resource) const
pure virtual

Gets the description of the specified resource.

◆ get_resource_from_view()

virtual resource reshade::api::device::get_resource_from_view ( resource_view  view) const
pure virtual

Gets the handle to the underlying resource the specified resource view was created for.

Resource views may be created without a resource in D3D12, which is used to initialize a null descriptor (reading zeroes, writes are discarded). This may therefore return zero for such views.

◆ get_resource_view_desc()

virtual resource_view_desc reshade::api::device::get_resource_view_desc ( resource_view  view) const
pure virtual

Gets the description of the specified resource view.

◆ get_resource_view_gpu_address()

virtual uint64_t reshade::api::device::get_resource_view_gpu_address ( resource_view  view) const
pure virtual

Gets the GPU address for a resource view.

Parameters
viewResource view to query.
Returns
GPU address of the resource view, or zero in case of failure or when no fixed GPU address exists.

◆ map_buffer_region()

virtual bool reshade::api::device::map_buffer_region ( resource  resource,
uint64_t  offset,
uint64_t  size,
map_access  access,
void **  out_data 
)
pure virtual

Maps the memory of a buffer resource into application address space.

Parameters
resourceBuffer resource to map to host memory.
offsetOffset (in bytes) into the buffer resource to start mapping.
sizeNumber of bytes to map. Set to -1 (UINT64_MAX) to indicate that the entire buffer should be mapped.
accessHint on how the returned data pointer will be accessed.
out_dataPointer to a variable that is set to a pointer to the memory of the buffer resource.
Returns
true if the memory of the buffer resource was successfully mapped, false otherwise (in this case out_data is set to nullptr).

◆ map_texture_region()

virtual bool reshade::api::device::map_texture_region ( resource  resource,
uint32_t  subresource,
const subresource_box box,
map_access  access,
subresource_data out_data 
)
pure virtual

Maps the memory of a texture resource into application address space.

Parameters
resourceTexture resource to map to host memory.
subresourceIndex of the subresource to map (level + (layer * levels)).
boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the resource to map.
accessHint on how the returned data pointer will be accessed.
out_dataPointer to a variable that is set to a pointer to the memory of the texture resource and optionally the row and slice pitch of that data (depending on the resource type).
Returns
true if the memory of the texture resource was successfully mapped, false otherwise (in this case out_data is set to nullptr).

◆ set_resource_name()

virtual void reshade::api::device::set_resource_name ( resource  resource,
const char *  name 
)
pure virtual

Associates a name with a resource, for easier debugging in external tools.

Parameters
resourceResource to associate a name with.
nameNull-terminated name string.

◆ set_resource_view_name()

virtual void reshade::api::device::set_resource_view_name ( resource_view  view,
const char *  name 
)
pure virtual

Associates a name with a resource view, for easier debugging in external tools.

Parameters
viewResource view to associate a name with.
nameNull-terminated name string.

◆ signal()

virtual bool reshade::api::device::signal ( fence  fence,
uint64_t  value 
)
pure virtual

Updates the specified fence to the specified value.

Parameters
fenceFence to update.
valueValue the fence should be set to.
Returns
true if the signal operation was successful, false otherwise.

◆ unmap_buffer_region()

virtual void reshade::api::device::unmap_buffer_region ( resource  resource)
pure virtual

Unmaps a previously mapped buffer resource.

Parameters
resourceBuffer resource to unmap from host memory.

◆ unmap_texture_region()

virtual void reshade::api::device::unmap_texture_region ( resource  resource,
uint32_t  subresource 
)
pure virtual

Unmaps a previously mapped texture resource.

Parameters
resourceTexture resource to unmap from host memory.
subresourceIndex of the subresource to unmap (level + (layer * levels)).

◆ update_buffer_region()

virtual void reshade::api::device::update_buffer_region ( const void *  data,
resource  resource,
uint64_t  offset,
uint64_t  size 
)
pure virtual

Uploads data to a buffer resource.

Parameters
dataPointer to the data to upload.
resourceBuffer resource to upload to.
offsetOffset (in bytes) into the buffer resource to start uploading to.
sizeNumber of bytes to upload.

◆ update_descriptor_tables()

virtual void reshade::api::device::update_descriptor_tables ( uint32_t  count,
const descriptor_table_update updates 
)
pure virtual

Updates the contents of multiple descriptor tables with the specified descriptors.

Parameters
countNumber of updates to process.
updatesPointer to the first element of an array of descriptor table updates to process.

◆ update_descriptors()

void reshade::api::device::update_descriptors ( const descriptor_table_update update)
inline

Updates the contents of a descriptor table with the specified descriptors.

Parameters
updateDescriptor table update to process.

◆ update_texture_region()

virtual void reshade::api::device::update_texture_region ( const subresource_data data,
resource  resource,
uint32_t  subresource,
const subresource_box box = nullptr 
)
pure virtual

Uploads data to a texture resource.

Parameters
dataPointer to the data to upload.
resourceTexture resource to upload to.
subresourceIndex of the subresource to upload to (level + (layer * levels)).
boxOptional 3D box (or nullptr to reference the entire subresource) that defines the region in the resource to upload to.

◆ wait()

virtual bool reshade::api::device::wait ( fence  fence,
uint64_t  value,
uint64_t  timeout = UINT64_MAX 
)
pure virtual

Wait until the specified fence reached the specified value.

Parameters
fenceFence to wait on.
valueValue the fence has to each or exceed.
timeoutReturn early after the specified time in nanoseconds, or set to UINT64_MAX to never time out.
Returns
true if the wait operation was successful, false otherwise.

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