Specifies texture layout options. On Xbox, this enumeration includes D3D12XBOX_ extension members.
typedef enum D3D12_TEXTURE_LAYOUT
{
D3D12_TEXTURE_LAYOUT_UNKNOWN = 0,
D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1,
D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2,
D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3,
//
// Xbox One extension enumeration constants:
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_0 = 0x100,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_1 = 0x101,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_2 = 0x102,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_3 = 0x103,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_4 = 0x104,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_5 = 0x105,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_6 = 0x106,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_7 = 0x107,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_LINEAR = 0x108,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_DISPLAY = 0x109,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_DISPLAY = 0x10A,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_DISPLAY = 0x10B,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_DISPLAY = 0x10C,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_THIN = 0x10D,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_THIN = 0x10E,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_THIN = 0x10F,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_1D_THIN = 0x110,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_THIN = 0x111,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_3D_THIN = 0x112,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_THICK = 0x113,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_THICK = 0x114,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_THICK = 0x115,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_1D_THICK = 0x116,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_THICK = 0x117,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_3D_THICK = 0x118,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_XTHICK = 0x119,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_XTHICK = 0x11A,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_LINEAR_GENERAL = 0x11F,
D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_MASK = 0x11F
} D3D12_TEXTURE_LAYOUT;
| Constant | Description |
|---|---|
| D3D12_TEXTURE_LAYOUT_UNKNOWN | The texture layout is unknown. |
| D3D12_TEXTURE_LAYOUT_ROW_MAJOR | Data for the texture is stored in row major (sometimes called pitch-linear) order. |
| D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE | The layout within 64KB tiles and tail mip packing is up to the driver. No standard swizzle pattern. |
| D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE | A default texture uses the standardized swizzle pattern. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_0 | Tile mode: COMP_DEPTH_0. Compressed depth, which is the normal mode for operating the depth/stencil hardware. There are multiple variants of COMP_DEPTH, to handle how the depth/stencil unit processes stencil buffers with MSAA. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_1 | Tile mode: COMP_DEPTH_1. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_2 | Tile mode: COMP_DEPTH_2. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_3 | Tile mode: COMP_DEPTH_3. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_COMP_DEPTH_4 | Tile mode: COMP_DEPTH_4. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_5 | Tile mode: UNC_DEPTH_5. Uncompressed depth, which is not currently used by the driver. There are multiple variants of UNC_DEPTH, to handle how the depth/stencil unit processes stencil buffers with MSAA. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_6 | Tile mode: UNC_DEPTH_6. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_UNC_DEPTH_7 | Tile mode: UNC_DEPTH_7. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_LINEAR | Tile mode: LINEAR. No microtiling or macrotiling. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_DISPLAY | Tile mode: 1D_DISPLAY. Display microtiling (8x8x1 microtile with a pattern optimized for display scan-out). |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_DISPLAY | Tile mode: 2D_DISPLAY. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_DISPLAY | Tile mode: TILED_DISPLAY. For use with D3D tiled resources. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_DISPLAY | Tile mode: TILED_2D_DISPLAY. For use with D3D tiled resources. 2D is microtiling and macrotiling. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_THIN | Tile mode: 1D_THIN. Thin means the default microtiling mode (8x8x1 microtile). |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_THIN | Tile mode: 2D_THIN. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_THIN | Tile mode: 3D_THIN. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_1D_THIN | Tile mode: TILED_1D_THIN. For use with D3D tiled resources. 1D is microtiling only. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_THIN | Tile mode: TILED_2D_THIN. For use with D3D tiled resources. 2D is microtiling and macrotiling. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_3D_THIN | Tile mode: TILED_3D_THIN. For use with D3D tiled resources. 3D is two levels of macrotiling plus microtiling. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_1D_THICK | Tile mode: 1D_THICK. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. THICK is an 8x8x4 microtiling pattern and is not compatible with render target or depth stencil usage. XTHICK is an 8x8x8 microtiling pattern and is not compatible with render target or depth stencil usage. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_THICK | Tile mode: 2D_THICK. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_THICK | Tile mode: 3D_THICK. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_1D_THICK | Tile mode: TILED_1D_THICK. For use with D3D tiled resources. 1D is microtiling only. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_2D_THICK | Tile mode: TILED_2D_THICK. For use with D3D tiled resources. 2D is microtiling and macrotiling. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_3D_THICK | Tile mode: TILED_3D_THICK. For use with D3D tiled resources. 3D is two levels of macrotiling plus microtiling. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_2D_XTHICK | Tile mode: 2D_XTHICK. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_3D_XTHICK | Tile mode: 3D_XTHICK. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_LINEAR_GENERAL | Tile mode: LINEAR_GENERAL. No microtiling or macrotiling. Not compatible with mipmaps. We recommend using D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_LINEAR instead. |
| D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_MASK | A bit-mask corresponding to the bits used to define an Xbox custom texture layout (Xbox tile mode). |
This enumeration is used by the D3D12_RESOURCE_DESC structure.
This enumeration is the Xbox version of the D3D12_TEXTURE_LAYOUT enumeration, containing D3D12.x extensions. For information about swizzle patterns, see Remarks for the PC version of the D3D12_TEXTURE_LAYOUT enumeration.
When a resource is created with D3D12TEXTURE_LAYOUT_UNKNOWN, the driver picks the most appropriate tile mode given the resource desc parameters. To override the driver’s selection, specify one of the D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE values and the driver will use that instead.
The D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_ items map to the 32 Xbox tile modes. Each tile mode represents a different pattern of arranging texels in memory; the various patterns have different tradeoffs in performance and memory footprint. In D3D11.x, these modes are in the XG_TILE_MODE enum in xg.h.
COMP_DEPTH is “compressed depth” – that is, the normal mode for operating the depth/stencil hardware. UNC_DEPTH is uncompressed depth, which is not currently used by the driver. There are multiple variants of each to handle how the depth/stencil unit processes stencil buffers with MSAA. The modes with TILED_, such as D3D12XBOX_TEXTURE_LAYOUT_TILE_MODE_TILED_DISPLAY, are for use with D3D tiled resources. 1D is microtiling only, 2D is microtiling and macrotiling, and 3D is two levels of macrotiling plus microtiling. THICK and XTHICK are special microtiling patterns for use with array and volume textures, which the driver does not currently use.
Header: Declared in d3d12_x.h.