Tests and fixes so the suite runs under Wine #2973
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2973
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2973"
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?
@neonbyte1 on GitHub · 2026-11-26 01:50 UTC · original
neonbyte1:pr/wine-tests→main· +657 −343 · 15 files · 7 commits · openTest changes so that
cargo xtask wine-test(#1218) runs the Windows test suite on Linux. Stacked on #2969: the first commit here is that PR, so please review fromGPU tests: a capped view heap keeps its documented sizeon. I'll rebase it out once #2969 is decided.The runtime fixes this PR used to carry are now separate:
What's left here (tests that assumed Windows or particular hardware):
hosts_that_do_not_fuse_are_namedstill asserts on Windows that WARP doesn't fuse FMad. Under Wine, "WARP" is vkd3d-proton, which does fuse, so the test reports it instead. The null-buffer-view probe is skipped only where the host can't make the heap.E_NOTIMPL);Results under Wine 11.22, vkd3d-proton 3.1-83 (GE-Proton11-14) and DXVK
dxgi, on an RTX 5090 (driver 620.73.04), with #1218 merged for the runner (passed / failed):main63bcca4cargo clippy --workspace --all-targets(with and withoutdiagnostics) andcargo xtask policyare clean. Not run on Windows: on Windows these changes are skips that don't apply there, or keep the Windows assertion as it was.AI-assisted (Claude); measured on my machine, no game data shared.
Under Wine, D3DCompile is Wine's d3dcompiler_47 (vkd3d-shader HLSL): it has no methods on writable byte address buffers (E5005 'Load' is not defined on RWByteAddressBuffer) and ignores a [RootSignature] attribute, so the code holds no root signature to make. Every run-time shader of ours failed there: the argument clamp ("no argument clamp: indirect execution dropped", every indirect draw and dispatch then dropped as not bounded), the depth twin's 16-bit conversion ("no depth conversion"), and the tests' own shaders. A new module, compute, compiles a shader and serializes its root signature in Rust from the parameters the host binds. The clamp keeps main's design (one group, tiles of 64, groupshared costs charged in order, the list's budget, the record's rest copied) with the title's records a StructuredBuffer<uint> (t0) and the clamped records and the budget RWStructuredBuffer<uint> (u0, u1), indexed in words: bound() already refuses addresses and strides not multiples of 4. Its root signature is b0 (4 constants), SRV t0, UAV u1, UAV u0, as bound() binds them. The depth conversion indexes its scratch buffer in words (footprint offsets and pitches are multiples of 4) with b0 (8 constants) and UAV u0. Test shaders lose their RootSignature attributes the same way. A new test checks every word the clamp writes for draws, indexed draws, dispatches, mesh dispatches, records past the budget and the budget spent. The approach is Mumogg's (#1279: structured buffers indexed in words, the root signature serialized beside the shader), ported to main's rewritten clamp and extended to the depth conversion. The tests that bound their own root signatures: The marked-UAV, placed-view and depth-twin rebind tests compile their shaders with a [RootSignature] attribute Wine's compiler ignores, and the marked write ORs its page bit through a byte address buffer method it lacks. Their root signatures are made with crate::compute from what the tests bind, and the bitmap is a RWStructuredBuffer<uint> indexed in words.open() made the empty library from an empty slice, whose pointer is not null. vkd3d-proton (Wine) refuses a blob pointer with no bytes (d3d12_pipeline_library_init: `!blob_length && blob` is E_INVALIDARG), so under Wine no host pipeline library was made ("no host pipeline library: pipelines are not kept"), also after a rejected blob; the library tests failed with "an empty library". The empty library is now asked for with a null blob, which D3D12 takes as well.lists_share_a_table_and_copies_keep_their_views and a_submission_that_missed_leaves_the_copies_at_once read and write title memory through views[NonUniformResourceIndex(...)], an unbounded resource array of shader model 5.1. Wine's D3DCompile (vkd3d-shader) has none ("Unbounded resource arrays", "Shader model 5.1+ resource array" are hlsl_fixme there): the compile fails with E_NOTIMPL. Under Wine (ntdll exports wine_get_version) the two tests say so and return.cb61564dcdto46d158621f@Marvisak on GitHub · 2026-11-26 05:22 UTC · original · edited 2026-11-26 08:26 UTC
Automated triage for the maintainers.
Merge candidate, to land after #2969 (recommending a look, not approving). Thanks for the split. The runtime fixes are now #3091 and #3092, the shared shader-test host is #3093, and the empty-library fix was dropped in favour of #1722. Apart from #2969's commit (
16080c4), the branch now changes only tests:dynamic_slots_are_held_until_released(descriptor/host.rs) first probes for aHEAP_VIEWS-slot heap. On a capped host it expects(4 + MIN_DYNAMIC, MIN_DYNAMIC), which matchesHostHeap::new'smake(count + MIN_DYNAMIC)branch onmain.hosts_that_do_not_fuse_are_namedkeeps the Windows WARP assertion and only reports the answer under Wine.xgamesave.rs, using the existingxmem::on_wine) skip under Wine with a reason printed.Host::wait_idle.On Windows, each change is either a skip that doesn't trigger or the original assertion. CI
checkpasses.Nits, none blocking:
under_wineis written twice, invictory-gpu/src/compute.rsandvictory-shader/src/emit/host.rs.a_heap_buffer_read_where_no_buffer_view_is_reads_zerosno longer fails when no adapter ran. On a machine with no SM 6.6 device it now passes silently.Its first commit is #2969, so merging #2969 first, then rebasing this, keeps the history clean.
Generated by Claude Code
@neonbyte1 on GitHub · 2026-11-26 07:34 UTC · original
Thanks. Split as suggested:
This PR now holds only test changes (body and results table updated). It stays on #2969 until that's decided; then I'll rebase it out.
On
crash.rs: the interleaving was within one process.concurrent_crash_records_stay_togetherwrites from several threads, and under Wine two records came out mixed. The lock doesn't cover two processes writing the same log. I haven't seen that case, and #3092 says so.@fuzeofficlal on GitHub · 2026-11-26 02:08 UTC · original · reviewed
Reviewed and verified against
main(63bcca43) on native Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1+dxil.dll) — no native Windows regressions observed (note: includes thecompute.rsshader migration also in #2969):D3D12SerializeRootSignature+StructuredBuffer<uint>/RWStructuredBuffer<uint>preserves all 4-byte alignment invariants (indirect::bound,twin::Twin::copy);pipeline/library.rspassingnullwith length0toCreatePipelineLibrarycomplies with native D3D12 as well as vkd3d-proton.descriptor/host.rsprobingHEAP_VIEWSbefore assertingdynamic_slots_are_held_until_releasedalso fixes that test on native RTX 5090 (1M view-heap limit);net.rsLazyLocklookups preserve nativews2_32.dllpassthrough;crash.rs10 msappend_guard()avoids exception-handler re-entry deadlocks.Local verification (native Windows 11):
victory-hle: 152/152 unit + 2/2 integration passedvictory-loader: 35/35 unit (includingconcurrent_crash_records_stay_together) + 4/4 integration passedvictory-gpu(--test-threads=1,VICTORY_D3D12_DEBUG=1): WARP--features diagnostics246/246 passed (skipping pre-existingcompositor_failure_presents_primary_in_the_same_frame); RTX 5090 passed all modified suites (dynamic_slots_are_held_until_released,indirect7/7,twin2/2,pipeline::library11/11,queue5/5,bindless3/3)victory-shader:emit::semantics_tests34/34,a_heap_buffer_read_where_no_buffer_view_is_reads_zerospassedcargo clippy --all-targets -- -D warnings(default &--features diagnostics) +cargo xtask policy(192 files ok): 0 warnings@kotekompotek on GitHub · 2026-11-26 02:50 UTC · original · approved these changes
LGTM — reviewed the stack on top of #2969 (8db914232..cb61564dc).
The three real fixes check out:
bytes.is_empty() → nullis the correct fix — an empty Rust slice's pointer is non-null, and vkd3d-proton rejects a non-null pointer with zero length. The raw-vtableCreatePipelineLibrarycall withID3D12PipelineLibrary1::IID+from_rawis sound.WSAENETUNREACH/WSAHOST_NOT_FOUND+ aonce()log preserves the console-without-network answer instead of panicking; the export-presence test correctly moves these intoHOST_MAY_LACK.into_inner.Test-side changes verified:
wait_idlebumpssubmittedunder its lock before Signal — no fence-value collision with the submission path; the queue.rs present-test wait matches the documented vkd3d-proton#3524 hang.SharedDevice {device, queue}per adapter: command queues are free-threaded, WARP stays serialized, and the vkd3d fence-thread teardown motivation is real. Acceptable consequence: a device-removed event would now persist across tests — in practice that's fatal for the run anyway.under_wine()viawine_get_versionis the standard probe; both uses are cfg(test)/test-only.@neonbyte1 on GitHub · 2026-11-26 15:14 UTC · original
Thanks for the two nits. Both are fixed in a follow-up commit,
d70de2e:under_wineis defined once now, invictory_shader::emit::host.victory-gpualready depends on that crate with thehostfeature, so the two GPU call sites use the shared helper, and the copy incompute.rsis gone.a_heap_buffer_read_where_no_buffer_view_is_reads_zerosnow prints a skip that names the test and the missing condition (an SM 6.6 device with a full view heap), following the existingeprintln!("...; skipped")convention, instead of passing without a word.Checked under Wine on the RTX 5090:
no SM 6.6 device with a 2097152-slot view heap; skipped.hosts_that_do_not_fuse_are_namedand the two memory tests that use the shared helper pass.cargo xtask policypass.AI-assisted (Claude); measured on my machine, no game data shared.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.