Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies texture layout options.
Syntax
typedef enum D3D11_TEXTURE_LAYOUT {
D3D11_TEXTURE_LAYOUT_UNDEFINED = 0,
D3D11_TEXTURE_LAYOUT_ROW_MAJOR = 1,
D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE = 2
} ;
Constants
D3D11_TEXTURE_LAYOUT_UNDEFINED Value: 0 The texture layout is undefined, and is selected by the driver. |
D3D11_TEXTURE_LAYOUT_ROW_MAJOR Value: 1 Data for the texture is stored in row major (sometimes called pitch-linear) order. |
D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE Value: 2 A default texture uses the standardized swizzle pattern. |
Remarks
This enumeration controls the swizzle pattern of default textures and enable map support on default textures. Callers must query D3D11_FEATURE_DATA_D3D11_OPTIONS2 to ensure that each option is supported.
The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another. A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location.

UINT xBytesMask = 1010 1010 1000 1111
UINT yMask = 0101 0101 0111 0000
To compute the swizzled address, the following code could be used (where the _pdep_u32 instruction is supported):
UINT swizzledOffset = resourceBaseOffset +
_pdep_u32(xOffset, xBytesMask) +
_pdep_u32(yOffset, yBytesMask);
Requirements
Requirement | Value |
---|---|
Header | d3d11_3.h |