LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::ResourceViewDescriptor Struct Reference

Resource view descriptor structure. More...

#include <ResourceHeapFlags.h>

Public Member Functions

 ResourceViewDescriptor ()=default
 Default constructor to initialize the resource view with a null pointer.
 ResourceViewDescriptor (Resource *resource)
 Constructor to initialize the descriptor with a resource. The resource view will access the entire resource.
 ResourceViewDescriptor (Texture *texture, const TextureViewDescriptor &subresourceDesc)
 Constructor to initialize a descriptor with a texture subresource view.
 ResourceViewDescriptor (Buffer *buffer, const BufferViewDescriptor &subresourceDesc)
 Constructor to initialize a descriptor with a buffer subresource view.

Public Attributes

Resource * resource = nullptr
 Pointer to the hardware resource.
TextureViewDescriptor textureView
 Optional texture view descriptor.
BufferViewDescriptor bufferView
 Optional buffer view descriptor.
std::uint32_t initialCount = 0
 Initial counter value for an AppendStructuredBuffer and ConsumeStructuredBuffer in HLSL.

Detailed Description

Constructor & Destructor Documentation

◆ ResourceViewDescriptor() [1/4]

LLGL::ResourceViewDescriptor::ResourceViewDescriptor ( )
default

Default constructor to initialize the resource view with a null pointer.

◆ ResourceViewDescriptor() [2/4]

LLGL::ResourceViewDescriptor::ResourceViewDescriptor ( Resource * resource)
inline

Constructor to initialize the descriptor with a resource. The resource view will access the entire resource.

◆ ResourceViewDescriptor() [3/4]

LLGL::ResourceViewDescriptor::ResourceViewDescriptor ( Texture * texture,
const TextureViewDescriptor & subresourceDesc )
inline

Constructor to initialize a descriptor with a texture subresource view.

◆ ResourceViewDescriptor() [4/4]

LLGL::ResourceViewDescriptor::ResourceViewDescriptor ( Buffer * buffer,
const BufferViewDescriptor & subresourceDesc )
inline

Constructor to initialize a descriptor with a buffer subresource view.

Member Data Documentation

◆ bufferView

BufferViewDescriptor LLGL::ResourceViewDescriptor::bufferView

Optional buffer view descriptor.

Remarks
Can be used to declare a subresource view of a buffer resource.
This attribute is ignored if all of the following sub members have the respective value listed below:
  • bufferView.format is Format::Undefined;
  • bufferView.offset is 0.
  • bufferView.size is LLGL_WHOLE_SIZE.

◆ initialCount

std::uint32_t LLGL::ResourceViewDescriptor::initialCount = 0

Initial counter value for an AppendStructuredBuffer and ConsumeStructuredBuffer in HLSL.

Remarks
This is only used for HLSL (D3D) to initialize the hidden counter of appendable and consumable unordered access views (UAV). This will be used in the D3D backends for buffer resources that have been created with either the MiscFlags::Append or MiscFlags::Counter flags.
Note
Only supported with: Direct3D 11, Direct3D 12.
See also
MiscFlags::Append
MiscFlags::Counter

◆ resource

Resource* LLGL::ResourceViewDescriptor::resource = nullptr

Pointer to the hardware resource.

See also
This can be null when passed to a ResourceHeap to skip over resources that are intended to be unchanged. This way a single WriteResourceHeap invocation can be used to write a partial range of resource views.

◆ textureView

TextureViewDescriptor LLGL::ResourceViewDescriptor::textureView

Optional texture view descriptor.

Remarks
Can be used to declare a subresource view of a texture resource.
This attribute is ignored if one of the following sub members has the respective value listed below:
  • textureView.format is Format::Undefined
  • textureView.subresource.numMipLevels is 0
  • textureView.subresource.numArrayLayers is 0

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