Compartir a través de


estructura CD3D11_UNORDERED_ACCESS_VIEW_DESC (d3d11.h)

Representa una vista de acceso desordenado y proporciona métodos útiles para crear vistas de acceso desordenado.

Syntax

struct CD3D11_UNORDERED_ACCESS_VIEW_DESC : D3D11_UNORDERED_ACCESS_VIEW_DESC {
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC();
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    const D3D11_UNORDERED_ACCESS_VIEW_DESC & o
  );
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    D3D11_UAV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize,
    UINT                flags
  );
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    ID3D11Buffer *unnamedParam1,
    DXGI_FORMAT  format,
    UINT         firstElement,
    UINT         numElements,
    UINT         flags
  );
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    ID3D11Texture1D     *pTex1D,
    D3D11_UAV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize
  );
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    ID3D11Texture2D     *pTex2D,
    D3D11_UAV_DIMENSION viewDimension,
    DXGI_FORMAT         format,
    UINT                mipSlice,
    UINT                firstArraySlice,
    UINT                arraySize
  );
  void CD3D11_UNORDERED_ACCESS_VIEW_DESC(
    ID3D11Texture3D *pTex3D,
    DXGI_FORMAT     format,
    UINT            mipSlice,
    UINT            firstWSlice,
    UINT            wSize
  );
  void ~CD3D11_UNORDERED_ACCESS_VIEW_DESC();
};

Herencia

La estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC implementa D3D11_UNORDERED_ACCESS_VIEW_DESC.

Miembros

void CD3D11_UNORDERED_ACCESS_VIEW_DESC()

Crea una instancia de una nueva instancia de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC sin inicializar.

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( const D3D11_UNORDERED_ACCESS_VIEW_DESC & o)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con una estructura de D3D11_UNORDERED_ACCESS_VIEW_DESC .

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( D3D11_UAV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize, UINT flags)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con D3D11_UNORDERED_ACCESS_VIEW_DESC valores.

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( ID3D11Buffer *unnamedParam1, DXGI_FORMAT format, UINT firstElement, UINT numElements, UINT flags)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con D3D11_BUFFER_UAV valores.

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( ID3D11Texture1D *pTex1D, D3D11_UAV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con valores D3D11_TEX1D_UAV o D3D11_TEX1D_ARRAY_UAV .

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( ID3D11Texture2D *pTex2D, D3D11_UAV_DIMENSION viewDimension, DXGI_FORMAT format, UINT mipSlice, UINT firstArraySlice, UINT arraySize)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con valores de textura 2D.

void CD3D11_UNORDERED_ACCESS_VIEW_DESC( ID3D11Texture3D *pTex3D, DXGI_FORMAT formato, UINT mipSlice, UINT firstWSlice, UINT wSize)

Crea una instancia nueva de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC que se inicializa con valores de textura 3D.

void ~CD3D11_UNORDERED_ACCESS_VIEW_DESC()

Destruye una instancia de una estructura de CD3D11_UNORDERED_ACCESS_VIEW_DESC .

Comentarios

Este es el modo en que D3D11.h define CD3D11_UNORDERED_ACCESS_VIEW_DESC:

struct CD3D11_UNORDERED_ACCESS_VIEW_DESC : public D3D11_UNORDERED_ACCESS_VIEW_DESC
{
    CD3D11_UNORDERED_ACCESS_VIEW_DESC()
    {}
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC( const D3D11_UNORDERED_ACCESS_VIEW_DESC& o ) :
        D3D11_UNORDERED_ACCESS_VIEW_DESC( o )
    {}
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC(
        D3D11_UAV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0, // FirstElement for BUFFER
        UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D
        UINT arraySize = -1, // WSize for TEXTURE3D
        UINT flags = 0 ) // BUFFER only
    {
        Format = format;
        ViewDimension = viewDimension;
        switch (viewDimension)
        {
        case D3D11_UAV_DIMENSION_BUFFER:
            Buffer.FirstElement = mipSlice;
            Buffer.NumElements = firstArraySlice;
            Buffer.Flags = flags;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE1D:
            Texture1D.MipSlice = mipSlice;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MipSlice = mipSlice;
            Texture1DArray.FirstArraySlice = firstArraySlice;
            Texture1DArray.ArraySize = arraySize;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE2D:
            Texture2D.MipSlice = mipSlice;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MipSlice = mipSlice;
            Texture2DArray.FirstArraySlice = firstArraySlice;
            Texture2DArray.ArraySize = arraySize;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE3D:
            Texture3D.MipSlice = mipSlice;
            Texture3D.FirstWSlice = firstArraySlice;
            Texture3D.WSize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC(
        _In_ ID3D11Buffer*,
        DXGI_FORMAT format,
        UINT firstElement,
        UINT numElements,
        UINT flags = 0 )
    {
        Format = format;
        ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
        Buffer.FirstElement = firstElement;
        Buffer.NumElements = numElements;
        Buffer.Flags = flags;
    }
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC(
        _In_ ID3D11Texture1D* pTex1D,
        D3D11_UAV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstArraySlice = 0,
        UINT arraySize = -1 )
    {
        ViewDimension = viewDimension;
        if (DXGI_FORMAT_UNKNOWN == format ||
            (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE1DARRAY == viewDimension))
        {
            D3D11_TEXTURE1D_DESC TexDesc;
            pTex1D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice;
        }
        Format = format;
        switch (viewDimension)
        {
        case D3D11_UAV_DIMENSION_TEXTURE1D:
            Texture1D.MipSlice = mipSlice;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MipSlice = mipSlice;
            Texture1DArray.FirstArraySlice = firstArraySlice;
            Texture1DArray.ArraySize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC(
        _In_ ID3D11Texture2D* pTex2D,
        D3D11_UAV_DIMENSION viewDimension,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstArraySlice = 0,
        UINT arraySize = -1 )
    {
        ViewDimension = viewDimension;
        if (DXGI_FORMAT_UNKNOWN == format || 
            (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE2DARRAY == viewDimension))
        {
            D3D11_TEXTURE2D_DESC TexDesc;
            pTex2D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlice;
        }
        Format = format;
        switch (viewDimension)
        {
        case D3D11_UAV_DIMENSION_TEXTURE2D:
            Texture2D.MipSlice = mipSlice;
            break;
        case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MipSlice = mipSlice;
            Texture2DArray.FirstArraySlice = firstArraySlice;
            Texture2DArray.ArraySize = arraySize;
            break;
        default: break;
        }
    }
    explicit CD3D11_UNORDERED_ACCESS_VIEW_DESC(
        _In_ ID3D11Texture3D* pTex3D,
        DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
        UINT mipSlice = 0,
        UINT firstWSlice = 0,
        UINT wSize = -1 )
    {
        ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
        if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize)
        {
            D3D11_TEXTURE3D_DESC TexDesc;
            pTex3D->GetDesc( &TexDesc );
            if (DXGI_FORMAT_UNKNOWN == format) format = TexDesc.Format;
            if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice;
        }
        Format = format;
        Texture3D.MipSlice = mipSlice;
        Texture3D.FirstWSlice = firstWSlice;
        Texture3D.WSize = wSize;
    }
    ~CD3D11_UNORDERED_ACCESS_VIEW_DESC() {}
    operator const D3D11_UNORDERED_ACCESS_VIEW_DESC&() const { return *this; }
};

Requisitos

Requisito Value
Cliente mínimo compatible Windows 7 [aplicaciones de escritorio | Aplicaciones para UWP]
Servidor mínimo compatible Windows Server 2008 R2 [aplicaciones de escritorio | Aplicaciones para UWP]
Encabezado d3d11.h

Consulte también

Estructuras auxiliares de CD3D11