startup: upload luma and chroma from single-image NV12 textures #1170
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1177"
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 R0Y00 on 2026-11-24T02:33:48Z.
Refs #1138. Depends on #1135. The temporary review base keeps this diff to one commit. Retarget to
mainafter #1135 lands.The source-built 8×4 reproduction against
e658fe24got a one-plane layout,S_OKfor Y, andE_INVALIDARGfor UV. The desktop draw uploader only copied the first plane. Both paths now use the same two desktop footprints for a single-mip, single-sample NV12 texture. A rejected array probe and short UV row return errors. The original video's texture format is still unknown.The regression writes both planes via the startup XG interface and uses the draw uploader's copy helper. A source-built pixel shader reads R8 and R8G8 views, converts the two planes to RGBA, and checks every pixel against the CPU. The U/V-swapped control produces 32 distinct-from-baseline pixel values per run.
Verified commit
7dcdfdc, first Release configure with the default intake Python location, Windows 11 build 26200.9974, debug layer off. NVIDIA RTX 4060 Laptop 32.0.16.1656 and Microsoft WARP 10.0.26100.9818 each matched all 32 pixels in both cases.Result: 3/3 passed, 0 skips. The first-configure
startup_stubscommand usedout/pe-env/Scripts/python.exe. The two NV12 tests invoke the compiled fixture directly.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:40:24Z.
Review: COMMENTED
Reviewed at commit
7dcdfdcd71c8747d4fe52089f5680f1cc6933350.src/startup_stubs/slice_footprints.hshares single-image even-dimension 2D NV12 footprint calculation and D3D12 subresource indexing (m + slice * mips + p * slices * mips) betweenxg_xs.cppandd3d12_draw.inl, withupload_texturedeferringstate.done = trueuntil all planes copy andXGCreateTextureComputerreturningE_NOTIMPLfor unsupported NV12 shapes (arrays/mips/odd sizes).tests/startup_nv12_draw.cppverifies bothUVandVU-swapped controls against CPU YCbCr math.python3 tests/docs_links_check.py(253 links across 16 Markdown files)python3 tests/bidi_controls_check.py(967 files)python3 tests/gpu_report_format_check.py(10 tests)python3 tests/xgameruntime_table_check.pystartup_nv12_draw_{warp,hardware}CTest runs (no CI checks reported on this branch yet; those rely on Windows/CI).Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T03:30:32Z.
Test report for
7dcdfdcd: Windows 11 Pro 26300, MSVC 14.50 (VS 18 Build Tools), Ninja, Release, debug layer off.cmake --build out/build/release: built with no errors or failures.ctest --no-tests=error -R startup: 7/7 passed, 0 failed, no skips.Not tested yet: a run with the console executable. Runs on this machine currently run out of system commit before the menus (#1199). I will add the executable result here once that is resolved.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T04:23:33Z.
Independent retarget check: the #1177 diff applies cleanly to
mainatb5cb8800in a fresh worktree. The worktree builds in Release with Windows 10.0.26300.10075 and MSVC 19.44.35228.0.ctest --preset release --no-tests=error -R '^startup_(nv12_draw_.*|stubs)$' -Vstartup_nv12_draw_warp: passed on WARP (Microsoft Basic Render Driver). UV and VU both matched all 32 pixels, 0 mismatches.startup_nv12_draw_hardware: passed on AMD Radeon RX 9060 XT 32.0.32029.2010. UV and VU both matched all 32 pixels, 0 mismatches.startup_stubs: passed.The PR still targets
codex/pr1135-review-base(5691fe81), so it has no CI againstmain. Please retarget/rebase it tomain; the local apply was clean. Note that #1174 touches the same four files (CMakeLists.txt,docs/startup-runtime.md,d3d12_draw.inl,d3d12_xs_device.cpp), so merge one and rebase the other.No game files, dumps or private logs were used. AI-assisted (Codex).