XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALResourceUsage Struct Reference

#include <GraphicsTypes.h>

Inheritance diagram for xiiGALResourceUsage:
[legend]

Public Types

enum  Enum : StorageType {
  Immutable = 0 , Default , Dynamic , Staging ,
  Unified , Sparse , ENUM_COUNT
}
 
using StorageType = xiiUInt8
 

Detailed Description

This describes the expected resource usage. It generally mirrors the D3D11_USAGE enumeration, which is used to describe the usage for both the buffer and texture descriptions.

Member Enumeration Documentation

◆ Enum

enum xiiGALResourceUsage::Enum : StorageType
Enumerator
Immutable 

A resource that can only be read by the GPU. It cannot be written to by the GPU, and cannot be accessed by the CPU. This type of resource must be initialized when it is created, since it cannot be modified after creation.

Default 

A resource that requires read and write access by the GPU and can also be occasionally written to by the CPU.

Dynamic 

A resource that can be read by the GPU and written to, at least once per frame by the CPU.

Staging 

A resource that facilitates transferring data between the GPU and CPU.

Unified 

A resource that resides in a unified memory (eg. memory shared between the CPU and GPU), that can be read and written to by the GPU and can also be directly accessed by the CPU.

Remarks
An application should check if unified memory is available on the device by checking the device capabilities. If there is no unified memory support, an application should choose another usage type (typically xiiGALResourceUsage::Default).
Sparse 

A resource that can be partially committed to physical memory.


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