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

Describes a resource view, which specifies how to interpret the data of a resource. More...

#include <reshade_api_resource.hpp>

Public Member Functions

constexpr resource_view_desc ()
 
constexpr resource_view_desc (format format, uint64_t offset, uint64_t size)
 
constexpr resource_view_desc (format format, uint32_t first_level, uint32_t levels, uint32_t first_layer, uint32_t layers)
 
constexpr resource_view_desc (resource_view_type type, format format, uint64_t offset, uint64_t size)
 
constexpr resource_view_desc (resource_view_type type, format format, uint32_t first_level, uint32_t levels, uint32_t first_layer, uint32_t layers)
 
constexpr resource_view_desc (format format)
 

Public Attributes

resource_view_type type
 Resource type the view should interpret the resource data to. More...
 
format format
 Format the view should reinterpret the resource data to (can be different than the format of the resource as long as they are compatible). Set to format::unknown to indicate that a buffer view should be a structured buffer. Set to format::r32_typeless to indicate that a buffer view should be raw / a byte address buffer. More...
 
union {
   struct {
      uint64_t   offset
 Offset from the start of the buffer resource (in bytes). More...
 
      union {
         uint64_t   size
 Size of the view in the buffer resource (in bytes). Set to -1 (UINT64_MAX) to indicate that the entire buffer resource should be used. More...
 
         struct {
            uint32_t   count
 Number of elements this view covers for structured buffers. More...
 
            uint32_t   stride
 Structure stride for structured buffers (in bytes). More...
 
         }   structured
 Used instead of size when format is format::unknown. More...
 
      } 
 
   }   buffer
 Used when view type is a buffer or acceleration structure. More...
 
   struct {
      uint32_t   first_level
 Index of the most detailed mipmap level to use. This number has to be between zero and the maximum number of mipmap levels in the texture minus 1. More...
 
      uint32_t   levels
 Maximum number of mipmap levels for the view of the texture. Set to -1 (UINT32_MAX) to indicate that all mipmap levels down to the least detailed should be used. More...
 
      uint32_t   first_layer
 Index of the first array layer of the texture array to use. This value is ignored if the texture is not layered. More...
 
      uint32_t   layers
 Maximum number of array layers for the view of the texture array. This value is ignored if the texture is not layered. Set to -1 (UINT32_MAX) to indicate that all array layers should be used. More...
 
   }   texture
 Used when view type is a texture. More...
 
}; 
 

Detailed Description

Describes a resource view, which specifies how to interpret the data of a resource.

Constructor & Destructor Documentation

◆ resource_view_desc() [1/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( )
inlineconstexpr

◆ resource_view_desc() [2/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( format  format,
uint64_t  offset,
uint64_t  size 
)
inlineconstexpr

◆ resource_view_desc() [3/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( format  format,
uint32_t  first_level,
uint32_t  levels,
uint32_t  first_layer,
uint32_t  layers 
)
inlineconstexpr

◆ resource_view_desc() [4/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( resource_view_type  type,
format  format,
uint64_t  offset,
uint64_t  size 
)
inlineconstexpr

◆ resource_view_desc() [5/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( resource_view_type  type,
format  format,
uint32_t  first_level,
uint32_t  levels,
uint32_t  first_layer,
uint32_t  layers 
)
inlineconstexpr

◆ resource_view_desc() [6/6]

constexpr reshade::api::resource_view_desc::resource_view_desc ( format  format)
inlineexplicitconstexpr

Member Data Documentation

◆ 

union { ... }

◆ 

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

Used when view type is a buffer or acceleration structure.

◆ count

uint32_t reshade::api::resource_view_desc::count

Number of elements this view covers for structured buffers.

◆ first_layer

uint32_t reshade::api::resource_view_desc::first_layer

Index of the first array layer of the texture array to use. This value is ignored if the texture is not layered.

◆ first_level

uint32_t reshade::api::resource_view_desc::first_level

Index of the most detailed mipmap level to use. This number has to be between zero and the maximum number of mipmap levels in the texture minus 1.

◆ format

format reshade::api::resource_view_desc::format

Format the view should reinterpret the resource data to (can be different than the format of the resource as long as they are compatible). Set to format::unknown to indicate that a buffer view should be a structured buffer. Set to format::r32_typeless to indicate that a buffer view should be raw / a byte address buffer.

◆ layers

uint32_t reshade::api::resource_view_desc::layers

Maximum number of array layers for the view of the texture array. This value is ignored if the texture is not layered. Set to -1 (UINT32_MAX) to indicate that all array layers should be used.

◆ levels

uint32_t reshade::api::resource_view_desc::levels

Maximum number of mipmap levels for the view of the texture. Set to -1 (UINT32_MAX) to indicate that all mipmap levels down to the least detailed should be used.

◆ offset

uint64_t reshade::api::resource_view_desc::offset

Offset from the start of the buffer resource (in bytes).

◆ size

uint64_t reshade::api::resource_view_desc::size

Size of the view in the buffer resource (in bytes). Set to -1 (UINT64_MAX) to indicate that the entire buffer resource should be used.

◆ stride

uint32_t reshade::api::resource_view_desc::stride

Structure stride for structured buffers (in bytes).

◆ 

struct { ... } reshade::api::resource_view_desc::structured

Used instead of size when format is format::unknown.

◆ 

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

Used when view type is a texture.

◆ type

resource_view_type reshade::api::resource_view_desc::type

Resource type the view should interpret the resource data to.


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