Repository navigation
GPU: no blending on integer render targets in host pipelines (fixes #806) - #1152
Conversation
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: vkd3d-proton refuses such a pipeline with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. (cherry picked from commit 169efcb)
|
This PR has no CI run yet, so I ran the CI's checks at head
The new tests check the blend description; I did not create a pipeline with an integer target on the AMD device. |
…ied together Merges Marvisak#72 Marvisak#347 Marvisak#1000 Marvisak#358 Marvisak#352 Marvisak#626 Marvisak#1152 Marvisak#1129 Marvisak#1203 Marvisak#24 Marvisak#642 Marvisak#427 Marvisak#485 Marvisak#550 Marvisak#174 Marvisak#1279 onto main (ffe310e), each head unchanged, no conflicts. One change of mine: three of the PRs each add a `mod tests` at the end of pipeline/host.rs, so the merge defines `tests` three times (E0428). The second and third are named `library_tests` and `blend_tests`; nothing else changes. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (367 passed, 6 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ame wait bundle Taken from the bundle: 64 MB stacks for pipeline workers (#1129), no blending on integer render targets (#1152), root signature flag fallback (#626), read-only depth read states (#485, on our stored rtvs/dsv and bind_targets), enhanced texture barrier translation (#642, on our recording_list so continuation segments get it), indirect mesh dispatch (#24), the frame wait taking its tick before it sleeps (#174), and the make.rs unit tests (#1203). Kept from our side: - pipeline/make.rs: early() starts every compute pipeline at creation (b4e8419); the per-pipeline wake pair, per-frame budget, wait_compute and copystat counters. The bundle's the_wait_budget_is_spent_once_per_frame test is dropped (written for its fixed BUDGET; our FrameBudget tests cover it); a_pipeline_is_made_once now holds the tests' serial lock. - indirect.rs: our whole file (#40's overflow-safe clamp, DXC fallback for Wine, rectangle pass). #1279's structured-buffer clamp and its readback test (written for the old bound/done API) are left out. - draw.rs: NOT_MADE counter, user_dword, typed table nulls (table_view_props, mirror_for_draw); the depth test calls readable() directly since our tables() needs a host pipeline. - frame.rs: our `_tick` (the diagnostics log already names it). - list.rs: execute_indirect's DISPATCH_SINGLE mapping in one place; our tests beside the bundle's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve the title write masks and the effective blend state on float and normalized color targets. Both the legacy graphics descriptor and the pipeline stream use the corrected state. Inspired-by: Marvisak#1152
|
Automated triage for the maintainers. Recommended for a maintainer's look. Generated by Claude Code |
0x00trace
left a comment
There was a problem hiding this comment.
Read the diff at 7c4b952 and ran it merged onto main 940d32f (no conflicts). The report here was RADV; this is NVIDIA through vkd3d-proton (Arch Linux, Wine 11.22, vkd3d-proton, RTX 5080, driver 620.73.04).
A temporary test made one graphics pipeline with targets R8G8B8A8_UNORM, R16G16B16A16_FLOAT and R8_UINT, blending on, IndependentBlendEnable off:
- with the description as it is: refused,
E_INVALIDARG, "Enabling blending on RT 2 with format DXGI_FORMAT_R8_UINT, but using integer format is not supported"; - through
host_blend: made.
The four pipeline::host tests pass. From reading, turning on IndependentBlendEnable can't make a logic op invalid: host_blend only does it when target 0 blends, and D3D12 does not allow blending and a logic op on one target.
Not checked: the title, and a mesh pipeline (it takes the same host_blend result).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st pipelines (fixes Marvisak#806)
|
In-title result for this PR on Linux. Setup: Grand Theft Auto VI Series X, the first mission's prison yard. RTX 5080 on Linux, Proton with vkd3d-proton 3.2.0. Our working branch is Without this PR, every run (6 of 6) has one refused mesh pipeline: Its draws are dropped at 2 to 4 per frame. In the runs where they were dropped, the room's walls around the window went missing (the scene showed straight through to the yard), and they came back later in the same run. The pipeline's pixel shader writes an integer target with blending on, which vkd3d-proton refuses here just as the Windows runtime does. With this PR, How it was found: the walls went missing intermittently, so the picture alone couldn't settle it. The frame lines' dropped counts for this one refused pipeline matched the runs where the walls went missing (4 per frame there, 0 to 2 in runs where they stayed). The ztrx fork's notes pointed at the integer-target blend refusal. |
…ed wall mesh pipeline)
|
Native Windows follow-up for the integer-target blend fix from #806 and Xeltax#9. I compared two diagnostics builds of fxceless/victory-fork at 0b0074e on Windows 10 22H2 with an RTX 3060 Laptop 6 GB (NVIDIA 591.59, Agility SDK 1.620.2). On the base build, the driver rejected mesh f5e50eb2108c425b + pixel ce3f0432a08f1d35 with E_INVALIDARG (0x80070057). The combined build created that exact mesh pipeline. Reproduction for the combined build:
Observed in the cutscene: the player reported clearer principal-character models, more of the street and buildings drawn, and more visible lighting. The supplied frames show faces, clothing, the car interior and street lighting, with some surfaces still nearly black and some daytime terrain/background still missing. Parts of the background appeared as the passage continued. The player ended the run during the cutscene, before checking gameplay. This is visual evidence from a combined build, so it does not isolate the contribution of the blend change versus mip reduction. As a performance check, the medians of the first 18 reported intervals with at least 500 draws were 280 ms for the base and 359 ms for the combined run. The workloads/caches were not matched by scene or frame, and the combined run still had zero-pipeline-queue intervals at around 2?4 FPS late in the cutscene. The exact pipeline's successful creation is the targeted result relevant to #1152. The source-only integration PR contains the tested diff, the mip-copy conflict resolution and the validation details. |
|
This is the better of the three (mine is #2346, the other is #2042), for two reasons I ran into while writing mine:
Two things worth carrying over from mine before this lands:
So: closing #2346 in favour of this one. If the |
…EVELS_ON_DEMAND in the run command Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st pipelines (fixes Marvisak#806)
Brings the upstream fixes since da82e44, keeping our own pieces where the two lines solved the same thing: - Depth bounds now come from upstream's maintained implementation (DEPTH_STENCIL1 stream, host support probe, replay on pipeline bind and after the indirect clamp, list reset defaults). Our hand port of victory-fork's c96b4f2 (State/Fixed fields, list entry, env probe) is dropped in favour of it; VICTORY_DEPTH_BOUNDS=0 still turns the test off, now by clearing the host support flag. - Integer render targets take no blending from upstream's Marvisak#1152 instead of our Victory-AMD port (same behaviour, format-list based). - Our present-plane diagnostic (the note a device-removed report prints) is kept inside upstream's compositing present path. - Our view-heap cap, targets-bad guard, texture upload budget, ambient pass, texback copy-back, indirect gather and quad-helper read survive. Also fixes a diagnostics-only build error in the upload budget counter (served was consumed before it was counted). Conflicts: README.md, draw.rs, host.rs, list.rs, pipeline/host.rs.
GPU: no blending on integer render targets in host pipelines (fixes Marvisak#806) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… new base The renderer README of the old branch (5fff8e0, f44ae53, eb4918e, 9a41398, b673d84, f711b62, 9b32e6f), carried over as one change since main's README moved under each of them: the renderer section with the run command (raw access chains off, VICTORY_PIPELINE_JOURNAL=1, VICTORY_LEVELS_ON_DEMAND=1), and the stack's rows after main's. Adapted: upstream base 67e8ae1; no Marvisak#2366 row (main's 8ff7913 replaces it), no Marvisak#67 row (not in this rebuild); Marvisak#1152 and Marvisak#2389 kept. The journal and soft-crash notes (e543c44) and the breadcrumbs row (1f0d6c3) are not repeated: Marvisak#491's and Marvisak#2292's current heads put them in the variables table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream main merged Marvisak#2143, Marvisak#2162, Marvisak#158, Marvisak#1906 and Marvisak#1152 and took up what Marvisak#1769 (LDS bounds, Marvisak#1949) and Marvisak#1763 (typed UAV formats, Marvisak#2462) did; main's code is kept for those. - emit/lower.rs: ds_bpermute within each half (main's Marvisak#573, same as Marvisak#439's); LDS bounds as main's Marvisak#1949 (Marvisak#1769's test-only counter kept, its and_guard dropped); title-memory marks: main's straddling-write lookup (Marvisak#2484) with Marvisak#2167's current head (3cb308d, rebased on 63bcca4): guarded dirty atomics, raw_dword2, memory_null, synthetic_mark_dxil in lower/mark_tests.rs; the old Marvisak#2167 head taken out first. - emit/host.rs: main's shared WARP device and lock (Marvisak#244) with Marvisak#439's adapter list and Host::on (create_device takes an optional adapter). - descriptor/host.rs: main's Marvisak#2462 format checks; Marvisak#1763's tests kept. - gpu host.rs: main's multi-plane present with Marvisak#2310's crumbed copy. - pipeline.rs: Marvisak#2118/Marvisak#2311's builder and BVH checks with main's skip hashes (Marvisak#1320); draw.rs, shadow.rs, main.rs: both sides. - Tests main added since get Marvisak#439's Parts fields and emit's Target. - README: base 63bcca4; rows of PRs merged upstream, superseded or closed taken out, with a note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous renderer (old upstream base 940d32f) is the first parent and is also kept as the branch renderer-2026-11-25-oldbase; the second parent is the rebuild: fork main (upstream main 63bcca4 + our pull requests) with the renderer stack merged on it: Marvisak#439 (on main: update/439-main's resolution), Marvisak#2309, Marvisak#2167, Marvisak#2118, Marvisak#2311, Marvisak#1722, Marvisak#1751, Marvisak#688, Marvisak#1872, Marvisak#2292, Marvisak#2310, Marvisak#2112 (opt-in), Marvisak#2230 (latch on by default), Marvisak#2389, Marvisak#2088 (small windows opt-in), Marvisak#2099's new head, and tonight's Marvisak#491 journal fixes. Merged upstream since: Marvisak#2143, Marvisak#2162, Marvisak#158, Marvisak#1906, Marvisak#1152; superseded by main: Marvisak#1769, Marvisak#1763, Marvisak#2366. The picture on this base still shows the overlay that plain upstream main shows too; that is being looked into. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d back into title memory (VICTORY_TEXTURE_BACK, on by default) On the console the CPU and the GPU share memory, so what a compute pass stores into a texture is there for the title's code to read. Here it stayed in the host copy. The title's water passes write a 256x256 height map (R32_FLOAT), a displacement map (R32G32_FLOAT) and two smaller maps that its CPU physics samples; it read memory nothing wrote, and boats sat in a pit in the water (RyanCase94/victory-Rycas on an RTX 4070 Ti 12 GB: with the copy the boat floats and drives, without it the mission fails). A list whose shaders write a texture of a kind copied back, through any unordered view (root or placed), copies the levels and layers those views expose into a read-back buffer when it closes; once the list has run, the texels are tiled into the texture's title memory in the console's layout. Each copy holds a ticket for its allocation that a release, a new texture in the same memory or a remap there takes away, so nothing lands in memory that is no longer the texture's. A flight's copies count as memory it writes, so preparing a later submission waits for them as for its shaders' buffer writes. The kinds: on by default with the four found reading (256x256f41,256x256f16,64x64f16,128x128f36). Across the forks `=1` meant either those four or none (fxceless/victory-fork issue Marvisak#1037); here unset and `1` are the built-in list, `0` none, a plain list replaces it, `+`/`-` entries change it, and what is not understood is named in the log. A list that writes none of them pays one look at the written texture's size and format. A per-second log line counts copies recorded and landed and their bytes, and since the start those dropped, not tiled and passed over. Textures in a pipe/bank XOR swizzle mode cannot be tiled until victory-formats has those modes' address patterns: they are counted and named once ("could not be tiled e=Unsupported"). Sources: Geckomacabre/vx-layer eee5667d7 (origin), as merged in fxceless/victory-fork 895c0b8 + 04df435 (pull request Marvisak#999; tickets per allocation), with BradRoland's pull request Marvisak#1152 (only the levels and layers bound views expose; its WARP regression test, adapted). Marvisak pull request Marvisak#2573 (Bebrik229) is the same port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and Wave32 a10179ab allowlist (Marvisak#1248)
gpu/shader: port water texture readback (Marvisak#1152, Marvisak#1170) and Wave32 a10179ab (Marvisak#1248)
Fixes #806, where the patch was first posted as an issue.
What
host_blendinpipeline/host.rsbuilds the blend description both host pipeline paths get (graphics and mesh): blending off on every render target in use whose format is*_UINT/*_SINT. When the title's description hasIndependentBlendEnableoff, each target first gets a copy of target 0's state, so the other targets keep blending as before. A state without integer blending is passed through unchanged.Why
The title leaves blending enabled on integer render targets. The console ignores it there, but D3D12 does not allow it, so vkd3d-proton refuses the whole pipeline:
That is a world mesh pipeline, so its draws were lost on Linux.
How tested
30b0eb9), diagnostics build, into the world: before, the pipeline above was refused (1 refusal, the error above); after, the same pipeline is created, with no refusal and no integer-blend error in the run.cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningsand the same with--all-features: clean.integer_targets_do_not_blendandblend_states_without_integer_blending_are_kept(both paths build the description throughhost_blend). They are in a Windows-only module, so CI runs them; I could not run them here.Not tested
Written with an AI assistant.