Skip to content

Measure D16 point and linear sampling through a runtime sampler heap - #2

Open
passerbyyhx wants to merge 1 commit into
AlanQiang0418:codex/d16-normalized-image-readfrom
passerbyyhx:evidence/d16-runtime-sampler-heap
Open

passerbyyhx wants to merge 1 commit into
AlanQiang0418:codex/d16-normalized-image-readfrom
passerbyyhx:evidence/d16-runtime-sampler-heap

Conversation

@passerbyyhx

Copy link
Copy Markdown

This adds an opt-in Windows measurement for the heap-loaded sampler case discussed in Marvisak#2030 and Marvisak#2006. The fixture reuses one translated compute shader, one pipeline and the same physical sampler slot for point → linear → point. Each dispatch records both the D16 result and its paired f32 sample. The fixture also verifies in DXIL that both sampling operations use a handle loaded from the sampler heap.

At e87c4f1, the RTX 4090 Laptop and WARP gave these results:

Sample Returned f32 bits D16 Reference
Point, stored code ffaf 3f7fb000 3bfe 3bfd
Point, stored code ffef 3f7ff000 3c00 3bff
Linear, between ff6f and ffef 3f7fb000 3bfe 3bfe

Point references round the exact fraction code / 65535 once to binary16. Linear references round the paired f32 read on the same device. The first and last rows have identical f32 bits but different reference D16 values. This narrows what a future correction must distinguish. Three independent processes reproduced the readbacks on both devices.

The fixture prints the point discrepancies and checks its controls. The regular D16 tests still pass; strict shader Clippy and the asset check passed. The report includes the complete matrix and the command for running the measurement.

Complete measurements and reference calculation · Coordination claim

Use the same translated sampler table, PSO and bound heap for point, linear and point again. Record a paired f32 alongside the packed word and verify both DXIL sampler dependencies. Keep the cross-device measurement opt-in and report the measured edge codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant