d3d/archive/D3D11_3_FunctionalSpec.htm [3717:3867]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a software component outside the scope of this specification which happens to own the list of DirectX formats going forward).
  • SampleDesc: Multisample parameters for the surface (Sample Count and Quality Level). For buffers, Texture1D, Texture1DArray, and Texture3D resources, the only Sample Count allowed is 1 and the only allowed Quality Level is zero.
  • Resources are made up of one of more Subresources. These Subresources share a common lifespan with each other and the Resource. In other words, the Resource and Subresources are atomically allocated and destroyed. However, some operations occur at the Subresource level, versus the Resource level. Subresources are three dimensional entities (with height, width, depth, pitch, and slice pitch), but degenerate into two and one dimensional entities for a certain Resource. For ex. a fully mipped Texture2D Resource creation with a width of two, a height of two, and an array size of two will have four Subresources that can be individually referenced for certain operations. Two Subresources have a width of two, height of two, and depth of one. These two Subresources are the most detailed mip level. The additional two Subresources have a width of one, height of one, and depth of one. Each Subresource is allowed to have it's own address, so the Resource may have somewhere between one and four disjoint allocations to satisfy the previous example. Each Subresource inherits the properties of the Resource, and Subresources may not be part of multiple Resources.

    typedef enum D3D10DDIRESOURCE_TYPE
    {
        D3D10DDIRESOURCE_BUFFER      = 1,
        D3D10DDIRESOURCE_TEXTURE1D   = 2,
        D3D10DDIRESOURCE_TEXTURE2D   = 3,
        D3D10DDIRESOURCE_TEXTURE3D   = 4,
        D3D10DDIRESOURCE_TEXTURECUBE = 5,
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11DDIRESOURCE_BUFFEREX    = 6,
    #endif
    } D3D10DDIRESOURCE_TYPE;
    
    typedef struct D3D10DDI_MIPINFO
    {
        UINT TexelWidth;
        UINT TexelHeight;
        UINT TexelDepth;
        UINT PhysicalWidth;
        UINT PhysicalHeight;
        UINT PhysicalDepth;
    } D3D10DDI_MIPINFO;
    
    typedef struct D3D10_DDIARG_SUBRESOURCE_UP
    {
        VOID*   pSysMem;
        UINT  SysMemPitch;
        UINT  SysMemSlicePitch;
    } D3D10_DDIARG_SUBRESOURCE_UP;
    
    typedef struct D3D11DDI_HRESOURCE
    {
        void* m_pDrvPrivate;
    } D3D11DDI_HRESOURCE;
    
    // Bits for D3D11DDI_CREATERESOURCE::BindFlags
    
    typedef enum D3D10_DDI_RESOURCE_BIND_FLAG
    {
        D3D10_DDI_BIND_VERTEX_BUFFER     = 0x00000001L,
        D3D10_DDI_BIND_INDEX_BUFFER      = 0x00000002L,
        D3D10_DDI_BIND_CONSTANT_BUFFER   = 0x00000004L,
        D3D10_DDI_BIND_SHADER_RESOURCE   = 0x00000008L,
        D3D10_DDI_BIND_STREAM_OUTPUT     = 0x00000010L,
        D3D10_DDI_BIND_RENDER_TARGET     = 0x00000020L,
        D3D10_DDI_BIND_DEPTH_STENCIL     = 0x00000040L,
        D3D10_DDI_BIND_PIPELINE_MASK     = 0x0000007FL,
    
        D3D10_DDI_BIND_PRESENT           = 0x00000080L,
        D3D10_DDI_BIND_MASK              = 0x000000FFL,
    
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11_DDI_BIND_UNORDERED_ACCESS  = 0x00000100L,
    
        D3D11_DDI_BIND_PIPELINE_MASK     = 0x0000017FL,
        D3D11_DDI_BIND_MASK              = 0x000001FFL,
    #endif
    } D3D10_DDI_RESOURCE_BIND_FLAG;
    
    // Bits for D3D11DDI_CREATERESOURCE::MapFlags
    typedef enum D3D10_DDI_CPU_ACCESS
    {
        D3D10_DDI_CPU_ACCESS_WRITE          = 0x00000001L,
        D3D10_DDI_CPU_ACCESS_READ           = 0x00000002L,
        D3D10_DDI_CPU_ACCESS_MASK          = 0x00000003L,
    } D3D10_DDI_CPU_ACCESS;
    
    // Bits for D3D11DDI_CREATERESOURCE::Usage
    typedef enum D3D10_DDI_RESOURCE_USAGE
    {
        D3D10_DDI_USAGE_DEFAULT    = 0,
        D3D10_DDI_USAGE_IMMUTABLE  = 1,
        D3D10_DDI_USAGE_DYNAMIC    = 2,
        D3D10_DDI_USAGE_STAGING    = 3,
    } D3D10_DDI_RESOURCE_USAGE;
    
    // Bits for D3D11DDI_CREATERESOURCE::MiscFlags
    typedef enum D3D10_DDI_RESOURCE_MISC_FLAG
    {
        D3D10_DDI_RESOURCE_AUTO_GEN_MIP_MAP             = 0x00000001L,
        D3D10_DDI_RESOURCE_MISC_SHARED                  = 0x00000002L,
        // Reserved for D3D11_RESOURCE_MISC_TEXTURECUBE   0x00000004L,
        D3D10_DDI_RESOURCE_MISC_DISCARD_ON_PRESENT      = 0x00000008L,
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11_DDI_RESOURCE_MISC_DRAWINDIRECT_ARGS       = 0x00000010L,
        D3D11_DDI_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS  = 0x00000020L,
        D3D11_DDI_RESOURCE_MISC_BUFFER_STRUCTURED       = 0x00000040L,
        D3D11_DDI_RESOURCE_MISC_RESOURCE_CLAMP          = 0x00000080L,
    #endif
        // Reserved for D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX 0x00000100L,
        // Reserved for D3D11_RESOURCE_MISC_GDI_COMPATIBLE 0x00000200L,
        D3D10_DDI_RESOURCE_MISC_REMOTE                  = 0x00000400L,
    } D3D10_DDI_RESOURCE_MISC_FLAG;
    
    typedef struct D3D11DDIARG_CREATERESOURCE
    {
        CONST D3D10DDI_MIPINFO*              pMipInfoList;
        CONST D3D10_DDIARG_SUBRESOURCE_UP*   pInitialDataUP; // non-NULL if Usage has invariant
        D3D10DDIRESOURCE_TYPE                ResourceDimension; // Part of old Caps1
    
        UINT                                 Usage; // Part of old Caps1
        UINT                                 BindFlags; // Part of old Caps1
        UINT                                 MapFlags;
        UINT                                 MiscFlags;
    
        DXGI_FORMAT                          Format; // Totally different than D3DDDIFORMAT
        DXGI_SAMPLE_DESC                     SampleDesc;
        UINT                                 MipLevels;
        UINT                                 ArraySize;
    
        // Can only be non-NULL, if BindFlags has D3D10_DDI_BIND_PRESENT bit set; but not always.
        // Presence of structure is an indication that Resource could be used as a primary (ie. scanned-out),
        // and naturally used with Present (flip style). (UMD can prevent this- see dxgiddi.h)
        // If pPrimaryDesc absent, blt/ copy style is implied when used with Present.
        DXGI_DDI_PRIMARY_DESC*               pPrimaryDesc;
    
        UINT                                 ByteStride; // 'StructureByteStride' at API
    } D3D11DDIARG_CREATERESOURCE;
    
        // part of user mode Device interface:
        STDMETHOD_( SIZE_T, CalcPrivateResourceSize )( D3D10DDI_HDEVICE hDrvDevice,
            CONST D3D11DDIARG_CREATERESOURCEIN* pCreateResourceIn );
        STDMETHOD( CreateResource )( D3D10DDI_HDEVICE hDrvDevice,
            CONST D3D11DDIARG_CREATERESOURCEIN* pCreateResourceIn,
            D3D11DDI_HRESOURCE hDrvResource );
        STDMETHOD_( void, DestroyResource )( D3D10DDI_HDEVICE hDrvDevice,
            D3D11DDI_HRESOURCE hDrvResource );
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    
    
    
    d3d/archive/images/d3d11/D3D11_3_FunctionalSpec.htm [3309:3459]:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    a software component outside the scope of this specification which happens to own the list of DirectX formats going forward).
    
    
  • SampleDesc: Multisample parameters for the surface (Sample Count and Quality Level). For buffers, Texture1D, Texture1DArray, and Texture3D resources, the only Sample Count allowed is 1 and the only allowed Quality Level is zero.
  • Resources are made up of one of more Subresources. These Subresources share a common lifespan with each other and the Resource. In other words, the Resource and Subresources are atomically allocated and destroyed. However, some operations occur at the Subresource level, versus the Resource level. Subresources are three dimensional entities (with height, width, depth, pitch, and slice pitch), but degenerate into two and one dimensional entities for a certain Resource. For ex. a fully mipped Texture2D Resource creation with a width of two, a height of two, and an array size of two will have four Subresources that can be individually referenced for certain operations. Two Subresources have a width of two, height of two, and depth of one. These two Subresources are the most detailed mip level. The additional two Subresources have a width of one, height of one, and depth of one. Each Subresource is allowed to have it's own address, so the Resource may have somewhere between one and four disjoint allocations to satisfy the previous example. Each Subresource inherits the properties of the Resource, and Subresources may not be part of multiple Resources.

    typedef enum D3D10DDIRESOURCE_TYPE
    {
        D3D10DDIRESOURCE_BUFFER      = 1,
        D3D10DDIRESOURCE_TEXTURE1D   = 2,
        D3D10DDIRESOURCE_TEXTURE2D   = 3,
        D3D10DDIRESOURCE_TEXTURE3D   = 4,
        D3D10DDIRESOURCE_TEXTURECUBE = 5,
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11DDIRESOURCE_BUFFEREX    = 6,
    #endif
    } D3D10DDIRESOURCE_TYPE;
    
    typedef struct D3D10DDI_MIPINFO
    {
        UINT TexelWidth;
        UINT TexelHeight;
        UINT TexelDepth;
        UINT PhysicalWidth;
        UINT PhysicalHeight;
        UINT PhysicalDepth;
    } D3D10DDI_MIPINFO;
    
    typedef struct D3D10_DDIARG_SUBRESOURCE_UP
    {
        VOID*   pSysMem;
        UINT  SysMemPitch;
        UINT  SysMemSlicePitch;
    } D3D10_DDIARG_SUBRESOURCE_UP;
    
    typedef struct D3D11DDI_HRESOURCE
    {
        void* m_pDrvPrivate;
    } D3D11DDI_HRESOURCE;
    
    // Bits for D3D11DDI_CREATERESOURCE::BindFlags
    
    typedef enum D3D10_DDI_RESOURCE_BIND_FLAG
    {
        D3D10_DDI_BIND_VERTEX_BUFFER     = 0x00000001L,
        D3D10_DDI_BIND_INDEX_BUFFER      = 0x00000002L,
        D3D10_DDI_BIND_CONSTANT_BUFFER   = 0x00000004L,
        D3D10_DDI_BIND_SHADER_RESOURCE   = 0x00000008L,
        D3D10_DDI_BIND_STREAM_OUTPUT     = 0x00000010L,
        D3D10_DDI_BIND_RENDER_TARGET     = 0x00000020L,
        D3D10_DDI_BIND_DEPTH_STENCIL     = 0x00000040L,
        D3D10_DDI_BIND_PIPELINE_MASK     = 0x0000007FL,
    
        D3D10_DDI_BIND_PRESENT           = 0x00000080L,
        D3D10_DDI_BIND_MASK              = 0x000000FFL,
    
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11_DDI_BIND_UNORDERED_ACCESS  = 0x00000100L,
    
        D3D11_DDI_BIND_PIPELINE_MASK     = 0x0000017FL,
        D3D11_DDI_BIND_MASK              = 0x000001FFL,
    #endif
    } D3D10_DDI_RESOURCE_BIND_FLAG;
    
    // Bits for D3D11DDI_CREATERESOURCE::MapFlags
    typedef enum D3D10_DDI_CPU_ACCESS
    {
        D3D10_DDI_CPU_ACCESS_WRITE          = 0x00000001L,
        D3D10_DDI_CPU_ACCESS_READ           = 0x00000002L,
        D3D10_DDI_CPU_ACCESS_MASK          = 0x00000003L,
    } D3D10_DDI_CPU_ACCESS;
    
    // Bits for D3D11DDI_CREATERESOURCE::Usage
    typedef enum D3D10_DDI_RESOURCE_USAGE
    {
        D3D10_DDI_USAGE_DEFAULT    = 0,
        D3D10_DDI_USAGE_IMMUTABLE  = 1,
        D3D10_DDI_USAGE_DYNAMIC    = 2,
        D3D10_DDI_USAGE_STAGING    = 3,
    } D3D10_DDI_RESOURCE_USAGE;
    
    // Bits for D3D11DDI_CREATERESOURCE::MiscFlags
    typedef enum D3D10_DDI_RESOURCE_MISC_FLAG
    {
        D3D10_DDI_RESOURCE_AUTO_GEN_MIP_MAP             = 0x00000001L,
        D3D10_DDI_RESOURCE_MISC_SHARED                  = 0x00000002L,
        // Reserved for D3D11_RESOURCE_MISC_TEXTURECUBE   0x00000004L,
        D3D10_DDI_RESOURCE_MISC_DISCARD_ON_PRESENT      = 0x00000008L,
    #if D3D11DDI_MINOR_HEADER_VERSION >= 1
        D3D11_DDI_RESOURCE_MISC_DRAWINDIRECT_ARGS       = 0x00000010L,
        D3D11_DDI_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS  = 0x00000020L,
        D3D11_DDI_RESOURCE_MISC_BUFFER_STRUCTURED       = 0x00000040L,
        D3D11_DDI_RESOURCE_MISC_RESOURCE_CLAMP          = 0x00000080L,
    #endif
        // Reserved for D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX 0x00000100L,
        // Reserved for D3D11_RESOURCE_MISC_GDI_COMPATIBLE 0x00000200L,
        D3D10_DDI_RESOURCE_MISC_REMOTE                  = 0x00000400L,
    } D3D10_DDI_RESOURCE_MISC_FLAG;
    
    typedef struct D3D11DDIARG_CREATERESOURCE
    {
        CONST D3D10DDI_MIPINFO*              pMipInfoList;
        CONST D3D10_DDIARG_SUBRESOURCE_UP*   pInitialDataUP; // non-NULL if Usage has invariant
        D3D10DDIRESOURCE_TYPE                ResourceDimension; // Part of old Caps1
    
        UINT                                 Usage; // Part of old Caps1
        UINT                                 BindFlags; // Part of old Caps1
        UINT                                 MapFlags;
        UINT                                 MiscFlags;
    
        DXGI_FORMAT                          Format; // Totally different than D3DDDIFORMAT
        DXGI_SAMPLE_DESC                     SampleDesc;
        UINT                                 MipLevels;
        UINT                                 ArraySize;
    
        // Can only be non-NULL, if BindFlags has D3D10_DDI_BIND_PRESENT bit set; but not always.
        // Presence of structure is an indication that Resource could be used as a primary (ie. scanned-out),
        // and naturally used with Present (flip style). (UMD can prevent this- see dxgiddi.h)
        // If pPrimaryDesc absent, blt/ copy style is implied when used with Present.
        DXGI_DDI_PRIMARY_DESC*               pPrimaryDesc;
    
        UINT                                 ByteStride; // 'StructureByteStride' at API
    } D3D11DDIARG_CREATERESOURCE;
    
        // part of user mode Device interface:
        STDMETHOD_( SIZE_T, CalcPrivateResourceSize )( D3D10DDI_HDEVICE hDrvDevice,
            CONST D3D11DDIARG_CREATERESOURCEIN* pCreateResourceIn );
        STDMETHOD( CreateResource )( D3D10DDI_HDEVICE hDrvDevice,
            CONST D3D11DDIARG_CREATERESOURCEIN* pCreateResourceIn,
            D3D11DDI_HRESOURCE hDrvResource );
        STDMETHOD_( void, DestroyResource )( D3D10DDI_HDEVICE hDrvDevice,
            D3D11DDI_HRESOURCE hDrvResource );
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -