Compartir a través de


estructura de CD3DX12_RESOURCE_DESC

Estructura auxiliar para habilitar la inicialización sencilla de una estructura de D3D12_RESOURCE_DESC .

Sintaxis

struct CD3DX12_RESOURCE_DESC  : public D3D12_RESOURCE_DESC{
                        CD3DX12_RESOURCE_DESC();
                        explicit CD3DX12_RESOURCE_DESC(const D3D12_RESOURCE_DESC& o);
                        CD3DX12_RESOURCE_DESC(D3D12_RESOURCE_DIMENSION dimension, UINT64 alignment, UINT64 width, UINT height, UINT16 depthOrArraySize, UINT16 mipLevels, DXGI_FORMAT format, UINT sampleCount, UINT sampleQuality, D3D12_TEXTURE_LAYOUT layout, D3D12_RESOURCE_FLAGS flags);
  CD3DX12_RESOURCE_DESC static inline Buffer(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE);
  CD3DX12_RESOURCE_DESC static inline Buffer(UINT64 width, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, UINT64 alignment = 0);
  CD3DX12_RESOURCE_DESC static inline Tex1D(DXGI_FORMAT format, UINT64 width, UINT16 arraySize = 1, UINT16 mipLevels = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0);
  CD3DX12_RESOURCE_DESC static inline Tex2D(DXGI_FORMAT format, UINT64 width, UINT height, UINT16 arraySize = 1, UINT16 mipLevels = 0, UINT sampleCount = 1, UINT sampleQuality = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0);
  CD3DX12_RESOURCE_DESC static inline Tex3D(DXGI_FORMAT format, UINT64 width, UINT height, UINT16 depth, UINT16 mipLevels = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0);
  UINT16                inline Depth() const;
  UINT16                inline ArraySize() const;
  UINT8                 inline PlaneCount(ID3D12Device* pDevice) const;
  UINT                  inline Subresources(ID3D12Device* pDevice) const;
  UINT                  inline CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSlice);
                        operator const D3D12_RESOURCE_DESC&() const;
                        operator == (const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r);
                        operator !=  (const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r);
};

Miembros

CD3DX12_RESOURCE_DESC()

Crea una nueva instancia sin inicializar de un CD3DX12_RESOURCE_DESC.

explicit CD3DX12_RESOURCE_DESC(const D3D12_RESOURCE_DESC& o)

Crea una nueva instancia de un CD3DX12_RESOURCE_DESC, inicializado con el contenido de otra estructura de D3D12_RESOURCE_DESC .

CD3DX12_RESOURCE_DESC(dimensión D3D12_RESOURCE_DIMENSION, alineación UINT64, ancho UINT64, alto UINT, profundidad UINT16OrArraySize, UINT16 mipLevels, DXGI_FORMAT formato, UINT sampleCount, UINT sampleQuality, D3D12_TEXTURE_LAYOUT diseño, D3D12_RESOURCE_FLAGS marcas)

Crea una nueva instancia de un CD3DX12_RESOURCE_DESC, inicializando los parámetros siguientes:

D3D12_RESOURCE_DIMENSION dimensión

Alineación UINT64

Ancho UINT64

Alto UINT

Profundidad UINT16OrArraySize

UINT16 mipLevels

formato de DXGI_FORMAT

SampleCount de UINT

Ejemplo de UINTQuality

diseño de D3D12_TEXTURE_LAYOUT

marcas de D3D12_RESOURCE_FLAGS

static inline Buffer(const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE)

Especifica una función que inicializa los parámetros siguientes:

& D3D12_RESOURCE_ALLOCATION_INFO resAllocInfo

(opt) marcas de D3D12_RESOURCE_FLAGS = D3D12_RESOURCE_FLAG_NONE

static inline Buffer(UINT64 width, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, UINT64 alignment = 0)

Especifica una función que inicializa los parámetros siguientes:

Ancho UINT64

(opt) marcas de D3D12_RESOURCE_FLAGS = D3D12_RESOURCE_FLAG_NONE

(opt) Alineación UINT64 = 0

static inline Tex1D(DXGI_FORMAT format, UINT64 width, UINT16 arraySize = 1, UINT16 mipLevels = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0)

Especifica una función que inicializa los parámetros siguientes:

formato de DXGI_FORMAT

Ancho UINT64

(opt) Matriz UINT16Size = 1

(opt) UINT16 mipLevels = 0

(opt) marcas de D3D12_RESOURCE_FLAGS = D3D12_RESOURCE_FLAG_NONE

(opt) D3D12_TEXTURE_LAYOUT diseño = D3D12_TEXTURE_LAYOUT_UNKNOWN

(opt) Alineación UINT64 = 0

static inline Tex2D(DXGI_FORMAT format, UINT64 width, UINT height, UINT16 arraySize = 1, UINT16 mipLevels = 0, UINT sampleCount = 1, UINT sampleQuality = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0)

Especifica una función que inicializa los parámetros siguientes:

formato de DXGI_FORMAT

Ancho UINT64

Alto UINT

(opt) Matriz UINT16Size = 1

(opt) UINT16 mipLevels = 0

(opt) SampleCount de UINT = 1

(opt) Ejemplo de UINTQuality = 0

(opt) marcas de D3D12_RESOURCE_FLAGS = D3D12_RESOURCE_FLAG_NONE

(opt) D3D12_TEXTURE_LAYOUT diseño = D3D12_TEXTURE_LAYOUT_UNKNOWN

(opt) Alineación UINT64 = 0

static inline Tex3D(DXGI_FORMAT format, UINT64 width, UINT height, UINT16 depth, UINT16 mipLevels = 0, D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE, D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN, UINT64 alignment = 0)

Especifica una función que inicializa los parámetros siguientes:

formato de DXGI_FORMAT

Ancho UINT64

Alto UINT

Profundidad UINT16

(opt) UINT16 mipLevels = 0

(opt) marcas de D3D12_RESOURCE_FLAGS = D3D12_RESOURCE_FLAG_NONE

(opt) D3D12_TEXTURE_LAYOUT diseño = D3D12_TEXTURE_LAYOUT_UNKNOWN

(opt) Alineación UINT64 = 0

inline Depth() const

Si Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D, devuelve DepthOrArraySize. Si dimensión != D3D12_RESOURCE_DIMENSION_TEXTURE3D, devuelve 1.

inline ArraySize() const

Si Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D, devuelve DepthOrArraySize. Si Dimensión == D3D12_RESOURCE_DIMENSION_TEXTURE3D, devuelve 1. Consulte D3D12_RESOURCE_DIMENSION_TEXTURE3D.

inline PlaneCount(ID3D12Device* pDevice) const

Devuelve D3D12GetFormatPlaneCount(pDevice, Format). Vea D3D12GetFormatPlaneCount e ID3D12Device.

inline Subresources(ID3D12Device* pDevice) const

Devuelve el número de subrecursos, calculados como MipLevels * ArraySize() * PlaneCount(pDevice).

inline CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSlice)

Calcula un índice de subrecursos mediante D3D12CalcSubresource.

operator const D3D12_RESOURCE_DESC&() const

Define el & operador pass-by-reference para el tipo de estructura primario.

operator == (const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r)

Devuelve true si todos los miembros de cada estructura son idénticos.

operator != (const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r)

Devuelve false si todos los miembros de cada estructura son idénticos.

Requisitos

Requisito Value
Encabezado
D3dx12.h

Vea también

D3D12_RESOURCE_DESC

Estructuras auxiliares de D3D12