startup: remove duplicate Pass render target bindings breaking Windows builds #2698
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2706"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T02:56:50Z.
Windows CI stopped building both
d3d12_xs_device_objandd3d12_xs_shimafter #2417 merged on top of #2448. MSVC reports C2086 forPass::bound_targetsandPass::bound_depthin both compilations. The four duplicate declarations are present on clean main ated53c1fe. Compiler outputKeep one copy of the eight slots and depth resource, with the comment documenting the last accepted bind. Both the pixel UAV overlap check and translated indirect draws read those same fields. The common bind path clears them on entry and populates them once when it accepts the binding. The optional trace array retains its own capture.
I compiled the two extracted field declarations from each revision and the actual clear/copy statements using Zig/Clang. The original fails for both duplicate members. The corrected program compiled and checked all eight distinct resources, depth, clearing the whole binding and rebinding depth only.
git diff --checkpassed. The upstream Windows check builds the complete D3D12 translation units with MSVC.Refs #2417, #2448 and #2704. AI-assisted using Codex (GPT-6.2 Astra, xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:59:16Z.
Review: COMMENTED
Review of head
ce4f081e: sound. This fixes the Windows build ofmain.On
main,struct Passdeclaresbound_targets[8]andbound_depthtwice (lines 2504-2505 and 2508-2509), so the MSVC build ofd3d12_xs_device.cppfails. The PR removes the first, uncommented pair and keeps the documented one.It also removes the first of two identical
std::copy_n(targets, 8, pass.bound_targets); pass.bound_depth = dsv_target;pairs inlist_targets(lines 3587-3588 and 3600-3601). Nothing in between readspass.bound_targetsorpass.bound_depth: only the trace copy,use_as_target,target_formats/target0,require_stateandtarget_countrun there. So keeping the later assignment does not change behavior.returnbefore both copies still skips the update when nothing is bound.Commands:
git show origin/main:src/startup_stubs/d3d12_xs_device.cpp | grep -n -E 'bound_targets|bound_depth'(shows the duplicate pair and the duplicate assignment),gh pr diff 2706.Win2025 dev + release on this head is running (
--targets d3d12_xs_device_obj,d3d12_xs_shim,offscreen_check, the d3d12x/cpu_shim WARP tests). A receipt will follow.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:03:54Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
ce4f081e0b031fbbebbaf940e338532a72369abc:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim offscreen_check -- -j 2):53.08s(configure3.11s)ctest --preset dev -R '^(d3d12x_.*_warp|cpu_shim_.*_warp|cpu_native_shim_startup)$' --parallel 2 --no-tests=error --output-on-failure): 18/18 passed (13.49s:cpu_shim_upload_texture_warp4.82s,cpu_shim_shadow_warp5.79s,cpu_shim_chain_warp3.71s,cpu_shim_draw_warp4.79s,cpu_shim_compute_warp2.87s,cpu_native_shim_startup1.93s,d3d12x_descriptor_heap_warp0.07s,d3d12x_descriptor_table_warp0.06s,d3d12x_compute_list_warp0.08s,d3d12x_graphics_list_warp0.09s,d3d12x_device_create_warp0.09s,d3d12x_descriptor_negative_warp0.07s,d3d12x_pso_reject_warp0.06s,d3d12x_device_struct_return_neither_control_warp0.07s,d3d12x_pso_static_sampler_warp0.06s,d3d12x_device_struct_return_warp0.06s,cpu_shim_texture_reuse_warp1.85s,d3d12x_device_negative_warp0.04s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim offscreen_check -- -j 2):146.73s(configure2.77s)ctest --preset release -R '^(d3d12x_.*_warp|cpu_shim_.*_warp|cpu_native_shim_startup)$' --parallel 2 --no-tests=error --output-on-failure): 18/18 passed (14.16s:cpu_shim_upload_texture_warp4.71s,cpu_shim_shadow_warp6.70s,cpu_shim_chain_warp3.78s,cpu_shim_draw_warp4.58s,cpu_shim_compute_warp2.93s,cpu_shim_texture_reuse_warp2.03s,cpu_native_shim_startup2.20s,d3d12x_compute_list_warp0.08s,d3d12x_graphics_list_warp0.09s,d3d12x_descriptor_heap_warp0.05s,d3d12x_descriptor_table_warp0.10s,d3d12x_descriptor_negative_warp0.07s,d3d12x_device_struct_return_neither_control_warp0.07s,d3d12x_pso_static_sampler_warp0.07s,d3d12x_device_create_warp0.11s,d3d12x_device_struct_return_warp0.06s,d3d12x_pso_reject_warp0.06s,d3d12x_device_negative_warp0.03s)sccache: 764/905 hits; wall235.9sRun after the merge as a check: the fixed device file builds in dev and release and the d3d12x/cpu_shim WARP tests pass.
AI-assisted; commands listed were executed locally.