%% one region of a sampler feedback map, from shader write to decode. flowchart TD PS["Pixel shader
WriteSamplerFeedback(uv)"] --> BITS["64 bits for the region:
4 per mip (self, +x, +y, +x+y)"] BITS -->|"mips 0-7"| LO["low word at (2x, y)
32-bit atomic OR"] BITS -->|"mips 8-15"| HI["high word at (2x+1, y)
32-bit atomic OR"] LO --> MAP[("R32_UINT map
2W x H")] HI --> MAP MAP --> RES["ResolveSubresourceRegion
DECODE (compute kernel)"] RES --> SCAN["mip 0: self + 3 neighbours
then coarser mips at the corners"] SCAN --> OUT["R8_UINT per region:
finest mip, or 0xff"]