Skip to content

GPU: buffer views past the end of their host copy are null, views running past it are cut - #635

Closed
claude-GTA6 wants to merge 7 commits into
Marvisak:mainfrom
claude-GTA6:pr-view-bounds
Closed

claude-GTA6 wants to merge 7 commits into
Marvisak:mainfrom
claude-GTA6:pr-view-bounds

Conversation

@claude-GTA6

Copy link
Copy Markdown

From a tester working with Claude (AI-assisted); measured on my own machine.

What

buffer_srv / buffer_uav (descriptor/host.rs) move a title buffer view's FirstElement onto its host copy but never check it against the copy's size. A view whose first element lies past the end of the copy is an invalid call.

Seen

RTX 5090 (driver 621.24), Windows 11 26200, diag build with VICTORY_D3D12_DEBUG=1, a few minutes into the first mission's world. The debug layer reported the call below, and the device was removed with DXGI_ERROR_INVALID_CALL:

D3D12: ID3D12Device::CreateUnorderedAccessView: The Dimensions of the View are invalid due to at least one of the following conditions. Assuming StructureByteStride 16, FirstElement (value = 2706088) must be between 0 and the maximum ...

Without the debug layer the view is undefined behaviour.

Change

In both functions, after the offset is applied:

  • a view whose first element is at or past the copy's end becomes a null view (logged once);
  • a view whose last element runs past the end is cut to fit.

With this change the debug layer reported no API errors in the same scene (that run also had other fixes stacked, listed below).

Testing

…ning past it are cut

A title buffer view whose first element lies past the end of the host copy
it is made on was created as is. That is an invalid call: with the debug
layer (VICTORY_D3D12_DEBUG=1) on an RTX 5090 it removed the device
(DXGI_ERROR_INVALID_CALL after 'CreateUnorderedAccessView: ... StructureByteStride
16, FirstElement (value = 2706088) must be between 0 and the maximum'); without it
the view is undefined. Such views are now left null (once-logged), and views
whose last element runs past the copy are cut to fit, in buffer_srv and buffer_uav.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A title view whose record count is 0 became a view of NumElements 0, also an
invalid call: on an RTX 5090 with the debug layer, continuing from a save
removed the device on the start screen (CreateUnorderedAccessView, stride 16,
FirstElement in range, NumElements 0). Made null like a view past the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude-GTA6

claude-GTA6 commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Pushed 66e9038, one more case of the same class: a view of no elements is now null too.

On an RTX 5090 (driver 621.24, Windows 11) with the debug layer, continuing from a save removed the device on the start screen. The last message before the removal was CreateUnorderedAccessView on a structured view, stride 16, with FirstElement in range and NumElements 0 (the title's own record count). With this commit, on my branch:

On 66e9038 (upstream main base): cargo test -p victory-gpu 43 passed, 1 ignored; clippy clean; release builds.

@Vaximous

Copy link
Copy Markdown
Contributor

Hardware data point for the NumElements == 0 part of this PR. PR creation is closed right now, so I'm posting it here instead of opening a duplicate.

  • On an RTX 4070 Ti (Windows 11 26300, no debug layer), a buffer SRV or UAV with NumElements == 0 passed to CreateShaderResourceView / CreateUnorderedAccessView removes the device with DXGI_ERROR_INVALID_CALL (0x887A0001).
  • In the title, on a local integration branch, this happened right at world entry, with empty DRED breadcrumbs. Whether a run hit it depended on what was in the shader cache, so it looked random. With the check, those runs reach the world.
  • A standalone test is on Vaximous/VIctory branch gpu/zero-element-buffer-views (one commit, 25d3abd, on main 6af0fae): descriptor::host::tests::buffer_views_of_no_elements_are_null.
    • It registers a title buffer and makes View::Placed buffer SRVs/UAVs of one and of zero elements through HostHeap::make_at.
    • It asserts the empty slots are null and GetDeviceRemovedReason stays S_OK.
    • Without the check, it removes the device on this GPU. With it, it passes (victory-gpu: 46 passed, 1 ignored).
    • Feel free to take the test into this PR.

Test by Vaximous (Vaximous/VIctory 25d3abd, offered on this PR): makes
placed buffer SRVs/UAVs of one and of zero elements and checks the empty
slot is null and the device stays. Fails without the check (the slot is kept).

Co-Authored-By: Vax <vaximous@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

@Vaximous thanks, I took your test into this PR as cfe7610b (credited as co-author). I only took the test: your fix and mine make the same check.

On an RTX 5090 (621.24): the test passes with the check, and fails when I disable the check (a view of no elements (unordered: false), the slot is kept). cargo test -p victory-gpu: 44 passed, 1 ignored. Clippy's one warning (host.rs:267, a missing safety comment) is already on main.

Your note that a run's chance of hitting this depended on the shader cache fits what I saw: it only showed up for me after a save existed, so continuing from it took a different path at world entry.

descriptor/host.rs: keep both new tests (zero-element buffer views are null; upstream's null UAV dimension tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@DenRakEiw DenRakEiw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested head fb29c17 (fast-forward on main ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP (VICTORY_D3D12_WARP=1):

  • cargo test -p victory-gpu (RTX 5090): 51 passed, 0 failed, 1 ignored (includes descriptor::host::tests::buffer_views_of_no_elements_are_null, GetDeviceRemovedReason clean)
  • VICTORY_D3D12_WARP=1 cargo test -p victory-gpu (WARP): 51 passed, 0 failed, 1 ignored
  • cargo clippy -p victory-gpu --all-targets: 0 warnings
  • cargo xtask policy: ok

Code review looks clean and sound: both buffer_srv and buffer_uav check FirstElement >= capacity against the host shadow buffer's element capacity, clamp NumElements to capacity - FirstElement (guaranteed ≤ u32::MAX since NumElements is u32 and FirstElement < capacity), and reject NumElements == 0 so the caller gets a null descriptor instead of triggering device removal. Approving.

AI-assisted (Gemini 4 Neon).

@adamdotpy

Copy link
Copy Markdown

Review of fb29c17 on Windows 11 / Rust 1.98.1: cargo test -p victory-gpu 51 passed, 1 ignored; cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings clean.

The clamp itself is right, and one detail deserves a comment in the code: capacity comes from the host copy's Width, which shadow::find pads to 64 KiB on purpose ("Rounded up so that views ending in the buffer's last 256 bytes fit"). So views into that padding stay legal and the check never rejects a view the host would accept — which is the behaviour you want, but it is not obvious from the two functions.

Two things I would add before merge:

  1. Tests for both new branches. The current test covers NumElements == 0 only; a view whose FirstElement is at or past capacity, and one that runs past the end, are untested. Both are cheap: shadow::register a 0x1000-byte title buffer (64 KiB after padding, so 4096 elements of 16 bytes), then HostHeap::make_at a view at 4096 (null, slot not kept) and one at 4095 with 4 elements (kept, device not removed).

  2. The two blocks are identical, so the arithmetic can only be exercised through the device. Factoring them into cut_to_copy(first, count, capacity) -> Option<u32> makes the exact numbers assertable without a GPU and stops the two copies from drifting.

While writing those, one trap worth a comment: the descriptor word layouts differ between the two view types. A shader resource view's buffer union starts at word 4 — u64 FirstElement forces the union to 8-byte alignment after Shader4ComponentMapping, so word 3 is padding — while an unordered access view's starts at word 2. A test that sets the words of the wrong one silently tests nothing.

With the guard disabled, all three tests fail, so they pin the behaviour rather than passing vacuously.

@claude-GTA6

claude-GTA6 commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

@adamdotpy thanks, both done in 5346bfa2 (on top of fb29c17, the merge of upstream main into this branch):

  1. The two identical blocks are now one function, cut_to_copy(first, count, capacity) -> Option<u32>, which both view functions call. Its doc comment says why the host copy's 64 KiB padding (shadow::find) keeps views into it legal, so the check never refuses a view the host would take.
  2. A unit test without a device covers each branch: a view that fits, one cut to the last element, one starting at the end, one far past it, one of no elements, and one cut to the whole copy. The device test from @Vaximous still covers the null slot and that the device stays up.

On the word-layout trap: the device test sets the SRV's count at word 6 and the UAV's at word 4, which matches the two layouts you describe (SRV union at word 4, UAV at word 2).

On 5346bfa2 (Windows 11, RTX 5090): cargo test -p victory-gpu 52 passed, 1 ignored; cargo clippy -p victory-gpu --all-targets -- -D warnings clean.

…vice

buffer_srv and buffer_uav shared the same three checks; cut_to_copy now holds
them (start at or past the end: null; past the end: cut; no elements: null)
with unit tests of each case, and says why the host copy's 64 KiB padding keeps
views into it legal. Suggested by adamdotpy in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nazmi pushed a commit to nazmi/VIctory that referenced this pull request Nov 24, 2026
Applied as the net diff of upstream PR Marvisak#635 (head fb29c17), 4 commits: fb29c17,cfe7610b,66e9038a,64133ca8.
@adamdotpy

Copy link
Copy Markdown

Both suggestions are in and they are better than what I asked for: one cut_to_copy with the padding rationale attached is what the code needed, and the six-case unit test covers every branch. I measured 5346bfa2 here (Windows 11, Rust 1.98.1, cargo test -p victory-gpu 52 passed, 1 ignored; clippy --all-features clean), which matches your numbers.

One gap is left, and it is the branch I would least like to lose: the device test covers the null side (a view past the copy, Vaximous's case) but not the cut side. A missing cut does not fail loudly — it builds a view whose last elements run past the copy, which the debug layer rejects and which some drivers accept, so a regression there looks like a rare device removal rather than a test failure. The arithmetic test cannot catch it either, since it never reaches make_at.

I had the same need on your head and wrote that test; it is pushed as adamdotpy@b8db48b (review/635-view-bounds, one commit on top of 5346bfa, 56 lines, one file). It goes through HostHeap::make_at for both view kinds: slot not kept at FirstElement == capacity, kept at capacity - 1 with one element, kept and cut at capacity - 1 with four, and GetDeviceRemovedReason alive after each. With the cut disabled, both it and your unit test fail, so it pins the wiring as well as the arithmetic.

Take it, rewrite it or ignore it — it is yours, not a PR on this branch.

@Yaekai

Yaekai commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Independent test & review on Windows 11 + NVIDIA RTX 3070 (Rust 1.98.1) at head fb29c17:

  • cargo test -p victory-gpu --lib: 52 passed, 0 failed (including buffer_views_of_no_elements_are_null on live D3D12 and views_are_cut_to_their_host_copy).
  • cargo clippy -p victory-gpu -- -D warnings: 0 warnings.
  • One small overflow edge case in buffer_srv / buffer_uav: buffer.FirstElement += offset / element could wrap in release (or panic in debug) if a guest descriptor carries a huge FirstElement (e.g. u64::MAX), potentially wrapping back below capacity. Using buffer.FirstElement = buffer.FirstElement.saturating_add(offset / element) makes cut_to_copy unconditionally reject it.

Great fix for out-of-bounds / zero-element buffer views — looks ready to merge!

@adamdotpy

Copy link
Copy Markdown

Confirming @Yaekai's find, with where the value comes from and what the worst case actually is.

buffer.FirstElement is the guest's own number: srv_desc / uav_desc build the host description from the [u32; 10] words of the title's descriptor (host.rs:427), so a corrupt or adversarial dword sets it directly, and buffer_srv / buffer_uav add offset / element to it with a plain += (host.rs:536, host.rs:586). With FirstElement near u64::MAX that is a debug panic (tests run with overflow checks) and a wrap in release.

Two things worth recording about the impact, because they change how urgent it is:

  • It cannot reach past the host copy. cut_to_copy still rejects first >= capacity, so a wrapped value produces a small first element and a view of the wrong part of the same host copy — the title reads element 0 instead of wherever it asked. Silently wrong data is worse for a bug report than the null view the code intends, but it is not an out-of-bounds host access.
  • saturating_add cannot reject a legitimate view: offset is inside the copy and offset / element <= Width / element == capacity, so a view that fits today has FirstElement + offset / element <= 2 * capacity and saturates only when the guest number was already nonsense — which is exactly the case where cut_to_copy should say no. @Yaekai's one-word change is the right fix, and it is two lines, not a redesign.

This is pre-existing on main (git grep "FirstElement +=" upstream/main finds both lines), so it is not something the branch introduced — but this PR is where the arithmetic became visible and named, which is the right moment to harden it.

One thing that would go with it: the cut side of this code on a real device. My review/635-view-bounds branch (adamdotpy@b8db48b) does exactly that — HostHeap::make_at for both view kinds, slot not kept at FirstElement == capacity, kept at capacity - 1 with one element, kept and cut at capacity - 1 with four, GetDeviceRemovedReason alive after each — and it fails if the cut is disabled. Take it or ignore it, it is yours; it would catch a regression in the wrapped-first direction too, because a wrapped view is a kept view of the wrong bytes and nothing in the unit tests can see that.

@XIIYAZ

XIIYAZ commented Nov 24, 2026

Copy link
Copy Markdown

Tested on an RTX 3070 (Windows 11), diag build, on a branch with #193, #483, #439 and runtime descriptor kind checks stacked. I ported the same check by hand because that branch's buffer_srv/buffer_uav also make raw views out of structured ones, so the cut applies to the raw window as well.

  • Before: the device was removed with DXGI_ERROR_INVALID_CALL at world entry in every run (about 10 runs).
  • After: a 7-minute run in the world, no removal, about 3,000 draws per frame.
  • The view that tripped it was an unordered buffer view of 0 elements (count=0, first element well inside the copy), which this PR's count > 0 check makes null. No view started past the copy's end in that run.

Unit test views_are_cut_to_their_host_copy passes there too.

🤖 Generated with Claude Code

@adamdotpy

Copy link
Copy Markdown

This is the evidence that settles it. A zero-element unordered buffer view (count=0, first element well inside the copy) removing the device with DXGI_ERROR_INVALID_CALL at world entry, ten runs running, and a 7-minute world run with ~3,000 draws a frame afterwards — that is the count > 0 branch in cut_to_copy doing its job on a real title, on hardware, not just in views_are_cut_to_their_host_copy. One thing still open on this branch from the earlier thread, and it is now the only one: the unchecked buffer.FirstElement += offset / element in buffer_srv/buffer_uav that @Yaekai flagged — a corrupt descriptor can wrap it in release and pass cut_to_copy with a small first, giving a view of the wrong part of the copy. saturating_add closes it and cannot reject a legitimate view. If you want it, my review/635-view-bounds branch (adamdotpy@b8db48b) already has the device-side test for the cut, which would catch a regression in that direction too.

The first element is the title's own descriptor word; a corrupt one near
u64::MAX wrapped when the host copy's offset was added and passed
cut_to_copy as a small first element, viewing the wrong part of the copy.
Saturating keeps it past the copy, so the view is null; a view that fits
cannot saturate (offset / element <= capacity). Found by Yaekai, confirmed
by adamdotpy in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

@Yaekai thanks, and @adamdotpy for the impact analysis: fixed in 79f6e246. Both buffer_srv and buffer_uav now use saturating_add, so a corrupt first element stays past the copy and the view is null instead of wrapping to a small one. As you showed, a view that fits can't saturate. cargo test -p victory-gpu 52 passed (1 ignored), and cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings is clean (Windows 11 / RTX 5090).

@XIIYAZ thanks for the hardware data point. A zero-element unordered view removing the device at world entry, then 7 minutes in the world after the fix, is the exact case this PR set out to catch.

@adamdotpy on your device test for the cut side: thanks for writing it. The maintainer of this branch will decide on taking it; it's noted.

@adamdotpy

Copy link
Copy Markdown

Verified 79f6e246 here (Windows 11, Rust 1.98.1, isolated target dir): cargo test -p victory-gpu --lib 52 passed / 1 ignored, including views_are_cut_to_their_host_copy; cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings clean. The diff is exactly the two saturating_add lines in buffer_srv/buffer_uav with the reason in a comment.

I also reproduced the wrap itself with a throwaway test on your head (reverted afterwards, tree clean): with wrapping_add, (u64::MAX - 3) + 4 becomes element 0 and cut_to_copy(0, 4, 1_000_000) keeps the view — a corrupt descriptor getting a view of the start of the copy, as @Yaekai said. With your saturating_add the same input is u64::MAX and the view is null. And the "cannot reject a legitimate view" half holds arithmetically as well as by inspection: I looped every first in 0..capacity for three capacities and first.saturating_add(capacity) never saturates, since a fitting view sums to at most 2 * capacity.

That closes the last open item on this branch from my side: the cut is tested without a device, the cut side has a device test offered in review/635-view-bounds, the zero-element world crash has hardware red/green from @XIIYAZ, and the overflow is now saturating. Nothing left that I can add.

@SlopComp

Copy link
Copy Markdown

Same crash on an RTX 5080 (driver 616.92), with a case this check doesn't catch: the first element is inside the copy but the view has no elements.

CreateUnorderedAccessView: ... StructureByteStride 16, FirstElement (value = 2670472) must be between 0 and the maximum offset of the Buffer, 11403263 ... NumElements (value = 0) must be between 1 and 8732792

The device was removed with DXGI_ERROR_INVALID_CALL. Making a view with NumElements == 0 a null view as well fixed it here.

@adamdotpy

Copy link
Copy Markdown

Checked this exact case against the current head 79f6e246 (worktree on the PR head, isolated target dir, Windows 11 / Rust 1.98.1): a NumElements == 0 buffer view is already a null view there, and no CreateUnorderedAccessView call can see it.

Every buffer view path — View::Shader on a buffer, View::Unordered on a buffer, and View::Placed on a buffer — funnels into buffer_uav/buffer_srv (descriptor/host.rs), and both now do, in order: saturate FirstElement, compute capacity = shadow Width / element, then cut_to_copy(first, count, capacity). cut_to_copy returns None when first >= capacity and when the cut count is 0, i.e. for NumElements == 0 with first anywhere inside the copy — exactly the case in your log (FirstElement = 2670472 inside the copy, NumElements = 0). The None becomes a null view plus a one-time log ("buffer view past the end of its host copy, or of no elements: null"), so the runtime error you quoted ("NumElements must be between 1 and 8732792") is never reached.

Evidence run here: cargo test -p victory-gpu --lib views_are_cut on 79f6e246 passes, and that test pins the case directly: assert_eq!(cut_to_copy(8, 0, 4096), None, "no elements") alongside the wrap case cut_to_copy(u64::MAX, 1, 4096) == None. So if you still see the NumElements == 0 device removal, the build was not 79f6e246 — on main (ffe310e) the cut does not exist yet (buffer.FirstElement += offset / element straight into CreateUnorderedAccessView), which reproduces your log exactly.

So: no code change needed on this branch for the zero-element case; it is covered since 5346bfa and red/green'd by @XIIYAZ's world-entry crash (device removed before, 7 minutes in the world after). If you can still reproduce on 79f6e246 itself, send the branch sha you ran and the once! log line that fired (or didn't) — that would mean a path that bypasses buffer_uav, and I'll dig again.

edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
…null, views running past it are cut

Head 5346bfa (claude-GTA6). Conflicts in descriptor/host.rs: our
buffer views can be made raw off their elements (raw_window) and refuse
a raw start off 16 bytes; the cut runs after both, counting dwords for a
view made raw. #635's tests pass make_at no annotation (#568).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ast it a cut one

`cut_to_copy`'s arithmetic is tested without a device; that it is handed
the right arguments, and that both functions act on the answer, is not.
This goes through `HostHeap::make_at` for both view kinds and checks the
slot: null for a view whose first element is past the copy, kept for one
whose last element is, with the device alive after each (both are the
invalid calls the host removes it for).

The two descriptor word layouts differ: a shader resource view's buffer
union starts a word later than an unordered access view's, because the
64-bit `FirstElement` aligns it past `Shader4ComponentMapping`. Setting
the wrong words leaves `NumElements` 0, which tests the null path twice.

Disabling the cut fails both tests.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Housekeeping: I rewrote this branch's history to fix commit author metadata (a wrong local git identity), so three commit IDs changed. The contents are identical (same tree, same commits):

was now commit
fb29c17c c2f81ff3 Merge upstream main (the approved head)
5346bfa2 4a05b26d one cut_to_copy, tested without a device
79f6e246 8e58f536 saturating first element

@adamdotpy: I took your device test as 62f3e9b5 (you're the author) on top of 8e58f536. On Windows 11 / RTX 5090, cargo test -p victory-gpu passes 53 (1 ignored), and clippy --all-targets --all-features --locked -D warnings is clean. I also checked that it bites: with the cut in cut_to_copy disabled, both it and views_are_cut_to_their_host_copy fail. Thanks for writing it.

@adamdotpy

Copy link
Copy Markdown

Verified the new head 62f3e9b here (worktree on the PR head, isolated target dir, Windows 11 / Rust 1.98.1): the added device test a view past its host copy makes a null slot, one running past it a cut one passes — a FirstElement past the copy yields a null slot (kept(0) false) for both SRV and UAV, the last in-copy element is kept, and a view running past the end is cut. cargo test -p victory-gpu 53 passed / 0 failed / 1 ignored, clippy --all-targets --all-features --locked -D warnings clean, cargo build --release -p victory builds. Together with the host-side views_are_cut_to_their_host_copy and @XIIYAZ's/SlopComp's hardware crashes this now covers past-the-end, wrapping, and zero-element views from both sides. Nothing left open from my side on this branch.

@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Closing this as superseded by 4051149c on main ("null views for title buffer views that are empty or run past their copy"). It covers the cases this PR was for: zero-element views (@XIIYAZ's and SlopComp's world-entry crash) and views past the copy's end. Its within saturates, so the wrap @Yaekai found is covered too, and its views now take their own copy via shadow::for_view. This branch now conflicts with that redesign.

The one behavioural difference: here, a view that starts inside its copy but runs past the end was cut to the part that fits, while main makes it null, and within's test pins that on purpose. If cutting turns out to matter for a title (shaders reading zeros for the valid part), it can come back as a small follow-up on top of main.

Thanks to everyone who tested and reviewed: @adamdotpy (including the device test for the cut), @Vaximous, @Yaekai, @XIIYAZ, @DenRakEiw and SlopComp.

geiyiliyabumo pushed a commit to geiyiliyabumo/VIctory that referenced this pull request Nov 25, 2026
…vt-440-111a

Shaders: f16 cvt via valu16; unused resinfo channels are 0 (Marvisak#440)
ThatMaddLadd added a commit to ThatMaddLadd/VIctory that referenced this pull request Nov 25, 2026
ThatMaddLadd added a commit to ThatMaddLadd/VIctory that referenced this pull request Nov 25, 2026
Upstream closed Marvisak#635: main's 4051149 makes title buffer views that are
empty or run past their host copy null, the cases Marvisak#635 covered.
ThatMaddLadd added a commit to ThatMaddLadd/VIctory that referenced this pull request Nov 25, 2026
Upstream superseded Marvisak#635 and Marvisak#568 (reverted just before this merge); Marvisak#189,
Marvisak#334, Marvisak#437, Marvisak#542, Marvisak#587 and Marvisak#1529 are still open upstream and are kept.

Resolutions:
- emit::Options is upstream's struct with Marvisak#189's `wave64` added;
  TranslateOptions stays as its alias. lower::Parts carries both `options`
  and upstream's `view_marks`.
- Shader cache: upstream's cached refusals and hit flag, keyed by Marvisak#189's
  Wave64 mode byte as before.
- lower.rs: Marvisak#542's 2 GiB bound applies to raw and structured views; title
  memory (upstream's MEMORY path and root views read as memory) is not
  bounded again, being checked where it is looked up. Scalar loads take
  upstream's raw views plus Marvisak#437's UAVs. The descriptor-kind use keeps
  Marvisak#437's preference for image/vector uses inside upstream's fallback.
  image() is upstream's (its own a16 bias/compare, gather4_l and _cl
  grads), replacing Marvisak#437's parallel version.
- Marvisak#189: AddH (upstream's f16 wave sum) in apply_wave_op; 16-bit
  reductions are refused in an emulated 64-lane wave. mask_dword checks
  Marvisak#189's deferred ballot errors before upstream's mask_number.
- Marvisak#334: indirect arguments keep the per-list buffer states (no
  indirect::done); upstream's single-group clamp dispatch is taken, and
  its diagnostics readback copies from the read state without barriers.
- GPU adapter: upstream still creates its device on the default adapter,
  so host_adapter() stays. The shader test host keeps the high-performance
  adapter pick and adds upstream's dedicated-memory requirement.
- Marvisak#1529: gameinput.rs as the PR's own merge of main (scripted keys first,
  then keyboard and mouse); run.rs configures controls and FidelityFX.
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.

7 participants