Skip to content
PS5PCEM
PartialGraphics

HTILE, DCC, CMASK and FMASK

HTILE, DCC, CMASK and FMASK are the console's compressed depth and color metadata. PS5PCEM tracks the pointers, clears HTILE in the cases it understands, and refuses a layout it would otherwise detile incorrectly.

Repository notes through October 10, 2026

What the four names are

HTILE is depth metadata. On the GFX10 pattern PS5PCEM implements, one dword covers an 8×8 pixel region, and those dwords are packed into a 32 KiB block that covers 1024 by 512 pixels. DCC is delta color compression for color targets. CMASK is a fast-clear and expand mask. FMASK tells a multisample resolve which sample belongs in which pixel.

The resource snapshot keeps the metadata pointers and the layout selectors, including the GFX10 linear-CMASK bit. That bit matters because applying a tiled address equation to a linear CMASK would silently scramble the mask. The backend rejects the unsupported layout instead.

Clears and depth

Correct HTILE and DCC clears are implemented for the layouts the renderer understands. Repeated metadata clears are covered by the vulkan-smoke htile-clears probe. A reset depth extent is recovered only for an active HTILE-backed surface, which keeps Ghost of Yōtei's G-buffer intact and still lets a stale 1×1 UI depth binding fail the attachment-size check.

Single-sample guest depth and stencil can be imported and written back when PS5_GPU_DEPTH_TRANSFER=1. Bound stencil planes become packed depth-plus-stencil attachments with the guest compare and update operations. Multisample depth uses the MSAA path. Compressed Z-range and hierarchical Z inside HTILE are not fully interpreted.

What is still explicit

The remaining work, stated in the GPU notes, is the rest of the layer views, the remaining compressed DCC and FMASK states, HTILE Z-range and Hi-Z, and CMASK states that are coupled to FMASK. An unsupported MSAA import keeps a first-use clear. Sampling the compressed surface as if it were plain texels is the failure this refusal exists to avoid.

Metadata support is therefore partial on purpose. The pointers are decoded. The layouts that have been validated are honored. The layouts that have not been validated are rejected or cleared.

What is implemented

  • HTILE pattern-21 addressing, one dword per 8×8, in 32 KiB blocks.
  • HTILE and DCC clears for the layouts the renderer understands.
  • Linear-CMASK detection that refuses a tiled equation on a linear mask.
  • Opt-in single-sample depth and stencil import and writeback.

What is still missing

  • Full HTILE Z-range and hierarchical-Z interpretation is incomplete.
  • Compressed DCC and FMASK states, and CMASK coupled to FMASK, remain outside the fast path.
  • An unsupported compressed import is cleared rather than sampled as raw texels.

Related mechanisms

What these pages are

The text follows the architecture notes and the October 2026 reports in the PS5PCEM repository. A focused test passing is not a new frame rate and not a new playthrough.

All technologies