vkback: depth in D16_UNORM_S8_UINT targets is finer than the console's 16 bits on a device without the format (NVIDIA) #210
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory#210
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@360900 on GitHub · 2026-12-02 12:52 UTC · original
With #170, D32_SFLOAT_S8_UINT stands in for D16_UNORM_S8_UINT (DXGI 118 to 120) where the device has none, by default: no accurate path exists there (rule 29). Log line: "vkback: D32_SFLOAT_S8_UINT stands in for D16_UNORM_S8_UINT".
The depth bias keeps the console's unit. Stored depth is not rounded to 16 bits, so a depth test between surfaces closer than 2^-16 and a shader's read of the target can differ from the console. 2 such images in the world on an RTX 5080; the effect on the picture is not measured.
An accurate path would round depth to 16 bits in every pixel shader that draws into such a target, at the cost of the early depth test there.
@vktory6 on GitHub · 2026-12-02 16:01 UTC · original
Thanks for documenting your own PR's cost. It's a TASKS item now, "Depth finer than the console where D16_UNORM_S8_UINT is missing", at ultra-low priority: more precision than the console never blocks a merge. The review of #170 noticed that the tiled-lighting target's twin also becomes R32_SFLOAT, so values written through its UAV aren't quantised either; that's in the item too:
github.com/vktory6/VKtory@dcb33f3. Closing here, the task tracks it.