xshader: query the level of a heap 2D array in a pixel shader #606
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/606"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T00:46:23Z.
image_get_lodon a texture taken from the resource heap was translated for a 2D view only; a program that queries a 2D array was refused ("unsupported direct heap texture operation image_get_lod dim 5"). The level comes from how the coordinates within a slice change between pixels, so a 2D array is queried like one of its slices, with the two coordinates and no slice, as HLSL'sCalculateLevelOfDetailtakes them. A 1D array bound through a table passed its slice as a second coordinate; it now passes one.Refs #533.
Measured
ee38dcf0, both hosts, links): 3 pixel requests newly accepted, one deferred material family; 0 changed, 0 newly refused. All 3 compile with DXC 1.9.2609 and pass dxv.heap-lod: a mipped 2D view (translated before, the control) and a three-slice 2D-array view in the heap, each drawn at ten scales (below the chain, on and between levels, past the last mip, different scales in u and v). 20 draws, 5,120 pixels; clamped and unclamped levels are compared with log2 of the larger scale. The largest difference on each card was 0.0016 of a level, 0 failures. The tolerance is 1/16 of a level, which this check chooses; it isn't from a specification.python tuxbox.py checkof05fe9f8d(GE-Proton11-15): RTX 5090 (10de:2b85, 620.70.10) 206 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 205 pass, 0 fail.Evidence: TuxBox check of
05fe9f8dfe, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not runEvidence: TuxBox check of
05fe9f8dfe, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not runNot covered
🤖 Generated with Claude Code