Skip to content

ComputeTileShape

Chuck Walbourn edited this page Mar 24, 2025 · 3 revisions
DirectXTex

Computes the width and height of a Direct3D 11.2 or DirectX 12 Tiled Resource using the standard layouts for 64KiB tiles based on DXGI format.

HRESULT ComputeTileShape(DXGI_FORMAT fmt, TEX_DIMENSION dimension,
    TileShape& tiling);
struct TileShape
{
    size_t width;
    size_t height;
    size_t depth;
};

Remarks

When using Direct3D 11 headers, the TileShape::GetTileShape11 method will return a D3D11_TILE_SHAPE with the same data. There is also a constructor to convert from that structure.

When using Direct3D 12 headers, the TileShape::GetTileShape12 method will return a D3D12_TILE_SHAPE with the same data. There is also a constructor to convert from that structure.

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

Architecture

  • x86
  • x64
  • ARM64

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v19
  • GCC 10.5, 11.4, 12.3, 13.3, 14.2
  • MinGW 12.2, 13.2
  • CMake 3.20

Related Projects

DirectXTex Rust bindings

DirectX Tool Kit for DirectX 11

DirectX Tool Kit for DirectX 12

DirectXMesh

DirectXMath

Tools

Test Suite

Content Exporter

DxCapsViewer

See also

DirectX Landing Page

Clone this wiki locally