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

Describes a resource, such as a buffer or texture. More...

#include <reshade_api_resource.hpp>

Public Member Functions

constexpr resource_desc ()
 
constexpr resource_desc (uint64_t size, memory_heap heap, resource_usage usage, resource_flags flags=resource_flags::none)
 
constexpr resource_desc (uint32_t width, uint32_t height, uint16_t layers, uint16_t levels, format format, uint16_t samples, memory_heap heap, resource_usage usage, resource_flags flags=resource_flags::none)
 
constexpr resource_desc (resource_type type, uint32_t width, uint32_t height, uint16_t depth_or_layers, uint16_t levels, format format, uint16_t samples, memory_heap heap, resource_usage usage, resource_flags flags=resource_flags::none)
 

Public Attributes

resource_type type
 Type of the resource. More...
 
union {
   struct {
      uint64_t   size
 Size of the buffer (in bytes). More...
 
      uint32_t   stride
 Structure stride for structured buffers (in bytes), otherwise zero. More...
 
   }   buffer
 Used when resource type is a buffer. More...
 
   struct {
      uint32_t   width
 Width of the texture (in texels). More...
 
      uint32_t   height
 If this is a 2D or 3D texture, height of the texture (in texels), otherwise 1. More...
 
      uint16_t   depth_or_layers
 If this is a 3D texture, depth of the texture (in texels), otherwise number of array layers. More...
 
      uint16_t   levels
 Maximum number of mipmap levels in the texture, including the base level, so at least 1. Can also be zero in case the exact number of mipmap levels is unknown. More...
 
      format   format
 Data format of each texel in the texture. More...
 
      uint16_t   samples
 The number of samples per texel. Set to a value higher than 1 for multisampling. More...
 
   }   texture
 Used when resource type is a texture or surface. More...
 
}; 
 
memory_heap heap
 Memory heap the resource allocation is placed in. More...
 
resource_usage usage
 Flags that specify how this resource is used. This should contain all resource states the resource will ever be transitioned to (including the initial state specified for resource creation). More...
 
resource_flags flags
 Flags that specify additional parameters. More...
 

Detailed Description

Describes a resource, such as a buffer or texture.

Constructor & Destructor Documentation

◆ resource_desc() [1/4]

constexpr reshade::api::resource_desc::resource_desc ( )
inlineconstexpr

◆ resource_desc() [2/4]

constexpr reshade::api::resource_desc::resource_desc ( uint64_t  size,
memory_heap  heap,
resource_usage  usage,
resource_flags  flags = resource_flags::none 
)
inlineconstexpr

◆ resource_desc() [3/4]

constexpr reshade::api::resource_desc::resource_desc ( uint32_t  width,
uint32_t  height,
uint16_t  layers,
uint16_t  levels,
format  format,
uint16_t  samples,
memory_heap  heap,
resource_usage  usage,
resource_flags  flags = resource_flags::none 
)
inlineconstexpr

◆ resource_desc() [4/4]

constexpr reshade::api::resource_desc::resource_desc ( resource_type  type,
uint32_t  width,
uint32_t  height,
uint16_t  depth_or_layers,
uint16_t  levels,
format  format,
uint16_t  samples,
memory_heap  heap,
resource_usage  usage,
resource_flags  flags = resource_flags::none 
)
inlineconstexpr

Member Data Documentation

◆ 

union { ... }

◆ 

struct { ... } reshade::api::resource_desc::buffer

Used when resource type is a buffer.

◆ depth_or_layers

uint16_t reshade::api::resource_desc::depth_or_layers

If this is a 3D texture, depth of the texture (in texels), otherwise number of array layers.

◆ flags

resource_flags reshade::api::resource_desc::flags

Flags that specify additional parameters.

◆ format

format reshade::api::resource_desc::format

Data format of each texel in the texture.

◆ heap

memory_heap reshade::api::resource_desc::heap

Memory heap the resource allocation is placed in.

◆ height

uint32_t reshade::api::resource_desc::height

If this is a 2D or 3D texture, height of the texture (in texels), otherwise 1.

◆ levels

uint16_t reshade::api::resource_desc::levels

Maximum number of mipmap levels in the texture, including the base level, so at least 1. Can also be zero in case the exact number of mipmap levels is unknown.

◆ samples

uint16_t reshade::api::resource_desc::samples

The number of samples per texel. Set to a value higher than 1 for multisampling.

◆ size

uint64_t reshade::api::resource_desc::size

Size of the buffer (in bytes).

◆ stride

uint32_t reshade::api::resource_desc::stride

Structure stride for structured buffers (in bytes), otherwise zero.

◆ 

struct { ... } reshade::api::resource_desc::texture

Used when resource type is a texture or surface.

◆ type

resource_type reshade::api::resource_desc::type

Type of the resource.

◆ usage

resource_usage reshade::api::resource_desc::usage

Flags that specify how this resource is used. This should contain all resource states the resource will ever be transitioned to (including the initial state specified for resource creation).

◆ width

uint32_t reshade::api::resource_desc::width

Width of the texture (in texels).


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