D894 - A dispatch that fetches a depth target reads the host's depths

Status: decided Date: 2026-10-19

The host holds a depth target as its own depth attachment and never writes it to guest memory (D817). A compute dispatch can reach such a target as a single-level two-dimensional 32_FLOAT image in one of the depth swizzles (ADDR_SW_*_Z*, addrtypes.h). It names that target by the descriptor's address, as a depth texture does, and does not read guest memory for it:

A target no draw on the host drew is refused by name, as is one whose extent is not the image's.

Why: Grand Theft Auto V's scene compute program reads its depth buffer, 32_FLOAT in 64KB_Z_X at the address of the depth target its draws bound, and writes it back. On the console the draws and the dispatch share that memory. Here the draws' depths exist only in the host's attachment, so reading guest memory would give the dispatch depths no draw wrote. A device test reads a drawn target's depths back as the draw left them, and one writes them and reads the new ones back.

Rejected: