main moved under #307 and this branch. One conflict, in the test module of
emit/lower.rs: the imports take both sides' names (#117's `half_shift`
beside `Lowered`), and #117's `scalar_bit_tests_lower` sits after this
branch's waterfall tests. No code outside the test module was touched by
hand. A merge rather than a rebase so #307's commits keep their ids.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
GetResultSize and GetResult only treated S_OK as success, so a provider finishing with S_FALSE and a payload left the caller's buffers untouched and the call registered forever. Any nonnegative HRESULT is a success code; return the size, let the provider write the result, report bytes used, and release the call. Add a regression completing with S_FALSE and an eight-byte payload.
v_cmp_lg_{f32,f16} ("less or greater") is ordered and not equal: false
when either operand is a NaN, on RDNA2 hardware as in the ISA. It was
lowered to `fcmp one`, which says the same, but the AMD D3D12 driver runs
`fcmp one` as unordered and returns true for a NaN. NVIDIA and WARP get it
right. It now lowers as `olt | ogt`, which all three run alike.
New GPU test v_cmp_lg_is_false_for_nan covers both widths: NaN on either
side, both NaN, a signalling NaN, +0 against -0, inf against inf and
against -inf, and junk in the unread high halves for f16.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
rustdoc warns that the module docs link to the private const MICRO
(rustdoc::private_intra_doc_links). Plain code formatting keeps the
reference without the broken link.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Its only callers (stub_pipeline_is_created, constant_color_validates)
are #[cfg(windows)], so on macOS/Linux the helper is dead code and
cargo check --all-targets warns 'function constant_color is never used'.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
describe looked only for a host texture, so every UAV over a buffer printed 'uav None' in device-removed reports and drop traces, though the view is made. It now prints the buffer's title range, as a buffer shader view does.
The previous commit proves that a loop's compares select the lanes of
the access and that its retry keeps exactly the lanes still waiting.
Every failure of that proof was reported with one reason. They now say
which part failed:
- the access is in no single-block loop ending in s_cbranch_execnz;
- the loop is nested in another or split over blocks;
- the compares do not select the access's lanes;
- the retry does not keep the lanes still waiting.
Without the per-lane form the proof cannot run. Nothing is emitted then,
and that failure is the one reported, as before.
Tests, all hand-assembled:
- the case ifBars reported on upstream PR #566 (the compares never
narrow EXEC), an access under a further mask, a retry that keeps other
lanes than those waiting, a wave64 retry of one half: refused, each
with its reason;
- the waterfall LLVM writes for GFX10 and later (a v_cmpx_eq chain, the
retry as todo & !EXEC, also folded into s_andn2_wrexec) is accepted in
wave32 and wave64, and each lane samples its own texture on the GPU;
- one loop per operand, the sampler's inside the resource's, is refused
by name. The console gives each lane its own pair there; following the
outer loop's reads into the inner block is left for later.
Other per-lane work in a waterfall loop is still taken to run once for
each lane; marked as a shortcut.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
image_sample_o was refused by name. Its offset dword (x in bits 0-5, y
in 8-13, z in 16-21, signed) becomes sample's immediate offsets when it
is a constant within DXIL's -8..7; a computed or wider offset is still
refused, now saying so. Module::int_value reads an integer constant.
translate --validate on shaders.rpf: vertex/pixel 12172 -> 12176
validated (all four).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fill_phis treats a phi no one read directly as dead and fills a value
with no DXIL form (an unsupported s_memtime result, say) with zero. When
that value reaches a read through two joins, the first phi is only read
by the second, so it was never marked read: the read lowered with a
zero where the same value read directly is refused with "a scalar
memory read as data".
Mark the incoming phis of every read phi as read, transitively, before
the phis are filled. The reproducer from #604 now agrees for the direct
and the joined read, and the dead control (the timestamp replaced by a
group id) still lowers.