GPU: use CreateDXGIFactory2 and clean fallback/skip in large texture upload test #2324
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2324
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2324/head"
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?
@Decodere on GitHub · 2026-11-25 14:28 UTC · original
Decodere:fix-2238-texture-test-dxgi-factory→main· +70 −10 · 1 files · 1 commits · merged 2026-11-25 18:18 UTCWhat is in it
Fixes #2238.
gpu::texture::tests::gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixelsincrates/xcl/src/gpu/texture.rswas the onlyIDXGIFactory6call site in the crate requesting it through DXGI 1.1CreateDXGIFactory1().expect("DXGI factory"), while the other sevenIDXGIFactory6call sites useCreateDXGIFactory2::<IDXGIFactory6>(DXGI_CREATE_FACTORY_FLAGS(0))and handle factory errors without panicking. On Wine/DXGI setups whereCreateDXGIFactory1rejectsIDXGIFactory6withDXGI_ERROR_UNSUPPORTED(0x887A0004) or factory creation fails (E_FAIL), the test hard-panicked instead of falling back to the default D3D12 device or skipping cleanly; it also ignoredXCL_ADAPTER=warp.crates/xcl/src/gpu/texture.rs(#[cfg(test)]only, zero production runtime changes):gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixelstoCreateDXGIFactory2::<IDXGIFactory6>(DXGI_CREATE_FACTORY_FLAGS(0))vialarge_upload_device/select_large_upload_device_with.Selector::Warpviafactory.EnumWarpAdapter()(matchinggpu::recomp::runner).agility::create_device(None, D3D_FEATURE_LEVEL_11_0)only when DXGI factory creation fails underSelector::Auto, preserving headless-CIno GPUskips when factory enumeration succeeds with zero hardware adapters and never ignoring an explicitXCL_ADAPTERfilter..expect("DXGI factory")withrunner::skip_test(&reason)whenever no factory or device is available.large_upload_device_selection_handles_factory_fallback_and_selectorscovering all five selection and fallback paths.Tested
Hardware / toolchain: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32-only), Rust 1.100.0, DXC 1.9.2609.5.
make_factory().expect("DXGI factory")selection logic):cargo test -p xcl --lib gpu::texture::tests::large_upload_device_selection_handles_factory_fallback_and_selectors -- --exact --nocapture:0 passed; 1 failed(panicked withDXGI factory: "DXGI_ERROR_UNSUPPORTED (0x887A0004)").05ad2d6conorigin/main06c9f550):cargo build --release --workspace: passed.cargo test --release -p xcl --lib gpu::texture::tests -- --test-threads=1 --nocapture(RTX 4060):15 passed; 0 failed; 0 ignored(1.14 s;large upload adapter: NVIDIA GeForce RTX 4060,byte_exact=true;retail_ttpf_textures_detile_with_their_mip_chainsprintedXCL_SAMPLE_TTPF not set – skipping).XCL_ADAPTER=warp cargo test --release -p xcl --lib gpu::texture::tests::gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels -- --exact --nocapture:1 passed; 0 failed(0.36 s;large upload adapter: WARP (software renderer),byte_exact=true).Regression run
cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocaptureon05ad2d6c):1266 passed; 0 failed; 46 ignoredacross 23 test binaries.28tests printedSKIPPEDdue to host hardware/environment capabilities:21no wave64(RTX 4060 is wave32-only: 1 ingpu::dxil::kernel, 4 ingpu::recomp::lower, 14 ingpu::recomp::lower_dxil, 2 ingpu::recomp::tests)3wave32, per-lane form: refused(f16_programs_on_the_gpuarithmetic & packed,f32_programs_on_the_gpuconversions)2missing D3D12 debug layer (test_title_draws_with_a_root_signature_under_the_debug_layer:no d3d12SDKLayers.dll;uploads_start_from_each_subresources_state:no D3D12 debug layer)1no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form)1cannot disable the driver cache(shaders::tests::pso_measurement_compiles_an_exact_synthetic_record)scripts/smoke.ps1 -Seconds 60):Baseline (
origin/main06c9f5505f63f10c5ec49ef932d75b2c28177324):PR head (
05ad2d6cf4da3878219d40df3b9bae81c1fa8d9c):Not tested
DXGI_ERROR_UNSUPPORTED(0x887A0004) orE_FAILfromCreateDXGIFactory1/CreateDXGIFactory2(verified via closure-injected pure-CPU unit tests covering all five factory-failure and selector paths).d3d12SDKLayers.dllnot installed on this host), andXCL_SAMPLE_TTPFretail TTPF fixture.AI use
Assisted by Google Antigravity (Gemini 4 Neon) for code analysis, implementation, test authoring, and verification.
@nnonno91 on GitHub · 2026-11-25 14:33 UTC · original
Independent adapter-selection and upload check on
05ad2d6cf4da3878219d40df3b9bae81c1fa8d9c.Tested
cargo test --locked -p xcl --lib large_upload_device_selection_handles_factory_fallback_and_selectors -- --nocapture --test-threads=1gave 1 passed, 0 failed, 0 ignored and no skips.cargo test --locked -p xcl --lib gpu::texture::tests::gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels -- --exact --nocapture --test-threads=1withXCL_ADAPTER=AMD Radeon,NVIDIA GeForce RTX 5090andwarpin separate processes. Each printed the requested adapter and returnedbyte_exact=truefor the 138,412,032-byte upload. Each gave 1 passed, 0 failed, 0 ignored and no skips.XCL_ADAPTER=no-xcl-adapter-matchgave 1 reported pass with one explicitSKIPPED ... no GPU, 0 failed and 0 ignored. The upload did not run on a fallback adapter.Not tested
Wine/DXGI failure on a real Wine host, a retail title and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the tests and wrote this report.
@Lum7nt on GitHub · 2026-11-25 14:45 UTC · original
Tested on
05ad2d6cf4da3878219d40df3b9bae81c1fa8d9c(05ad2d6, clean PR head onorigin/main06c9f55):32.0.15.8142/ 581.42, wave32), Intel Core i5-10400, Windows 11 (NT10.0.22631.0),rustc 1.100.0(x86_64-pc-windows-msvc), DXC1.8.2502.11(Windows SDK10.0.26100.0), debug profile,XCL_ADAPTER=nvidia.cargo test -p xcl --lib gpu_large_mixed_upload -- --nocapture): 1 passed, 0 failed, 0 ignored (1222 filtered out). Printed:cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4): 1264 passed, 2 failed, 46 ignored (vsorigin/main06c9f55: 1263 passed, 2 failed, 46 ignored; +1 passed from the new test).origin/main06c9f55on this machine):hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob:GetCachedBlob()returnedHRESULT(0x8000FFFF)("Catastrophic failure")gpu_compute_e2e::offline_compute_pipeline_is_reused_by_a_second_process:driver_file.metadata()returnedERROR_PATH_NOT_FOUND(code 3)SKIPPEDGPU/environment checks (27 lines, same asmain): 20no wave64, 3 per-lane#1426refusals (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32), 2 no D3D12 debug layer (0x887A002D/no d3d12SDKLayers.dll), 1cannot disable the driver cache (0x887A002D), 1no heap windows.Not tested
XCL_SAMPLE_*tests (unset), andscripts/smoke.ps1(no retail title folder here; notetexture.rsis#[cfg(test)]-only in this diff).AI use
Gemini 4 Hydrogen (Low)) checked out05ad2d6, ran the build and tests on this machine, and drafted this report.@SlopTart on GitHub · 2026-11-25 14:47 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).This is the Wine/DXGI leg the thread was missing, on the issue this PR fixes (#2238: the factory call used to abort under Wine).
gpu::texture::tests::large_upload_device_selection_handles_factory_fallback_and_selectors: passes on this lane.gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels(138 MB upload), default adapter: passes, no DXGI abort under Wine.XCL_ADAPTER="AMD Radeon RX 7900 XT": passes.XCL_ADAPTER="no-xcl-adapter-match": reportsSKIPPED ... no GPU, exits 0, no fallback upload and no panic.CreateDXGIFactory2itself prints onlywarn: Ignoring flagsunder Wine, no abort.So the CreateDXGIFactory2 path and the fallback/skip cleanup behave correctly on the Wine/vkd3d-proton lane, not just native Windows.
Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@DavidM1911 on GitHub · 2026-11-25 18:04 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!