Skip to content

gpu: slot 133 texture replacement for #2773 - #3347

Open
romn4rch wants to merge 4 commits into
R0Y00:mainfrom
romn4rch:copilot/pr-2773-review-9bab5832
Open

romn4rch wants to merge 4 commits into
R0Y00:mainfrom
romn4rch:copilot/pr-2773-review-9bab5832

Conversation

@romn4rch

@romn4rch romn4rch commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

This is the replacement review PR for #2773, synchronized with upstream main at 24fcd0b5742abb2fcaba8066093d70829df956a3. The merge exposed a fixture-only mismatch: current main requires a native compiler-revision marker on synthetic compute manifests, so the slot-133 fixture now writes x2w::native_compute_output_revision. No slot-133 runtime behavior was changed to accommodate the test.

The original PR remains open and overlaps this revision. Please keep only one and mark #2773 as superseded if this replacement is selected; this PR does not close it.

Validation

  • cmake --build out\build\release --target startup_slot133_lazy_textures_check startup_stream_consumer d3d12_xs_shim — passed in Release.
  • ctest --test-dir out\build\release --no-tests=error -R '^(startup_resource_retire_title_(warp_debug0|off_warp|hardware_debug0|off_hardware)|startup_resource_retire_views_(warp_debug0|keep_warp|noretire_warp)|startup_slot133_lazy_textures_(warp_debug0|hardware_debug0|noretire_warp|off_warp)|startup_view_census_(warp|off_warp|vary_warp)|startup_view_alloc_(records|materialized|ids)(_control)?_warp|startup_title_heap_device_warp)$' --output-on-failure — 21/21 passed, including all slot-133 cases and the reported Release retirement cases.
  • $env:X2W_D3D12_PERMISSIVE='1'; $env:X2W_D3D12_DEBUG='1'; python -B tests\startup_sampler_heap_check.py wrapped out\build\release\d3d12_xs.dll warp — passed; descriptor-token copies matched.
  • $env:X2W_FXC='C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\fxc.exe'; python -B tests\startup_frame_copy_check.py out\build\release\startup_stream_consumer.exe warp — passed; 32 pixels exact, one refresh for changed contents and none for unchanged contents.
  • Hardware: startup_slot133_lazy_textures_hardware_debug0 and both resource-retirement hardware cases passed on NVIDIA GeForce RTX 3050 6GB Laptop GPU, driver 32.0.16.2140, Windows 10 Pro 26H2 build 26300.10075, debug layer off; tested commit 02182842cc3d0c7b5ebaec9c46077d9b6dfe8f23.
  • GitHub Actions run 46140793329 completed successfully: Windows, Linux Python, and gfx1013 fixture jobs passed; the opt-in /O2 job was skipped.

triggered02 and others added 4 commits November 26, 2026 13:48
# Conflicts:
#	docs/experiments.md
#	docs/startup-runtime.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@romn4rch romn4rch changed the title gpu: slot 133 texture review follow-up gpu: slot 133 texture replacement for #2773 Nov 28, 2026

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean opt-in lazy materialization of slot-133 read-only textures.

  • Defers desktop CreateCommittedResource until first copy, CPU-map, or translated draw bind.
  • Null placeholder SRV descriptors refresh in place on materialization, including CopyDescriptorsSimple copies.
  • Untouched textures retire cleanly at guest Release(); in-flight computes stay live via retire_hold.
  • Lock ordering (draw_lock -> lazy_texture_mutex -> note_lock -> retire_lock) and publication hook handle descriptor race windows.
  • Test fixture covers budget delta, selective materialization, SRV refresh with copies, prepare/overwrite/resume race, and Release-before-first-use dispatch_translated path.
  • Documentation updated in experiments.md and startup-runtime.md.

The approach is consistent with existing slot-133 and retired-resource patterns.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean opt-in lazy materialization of slot-133 read-only textures.

  • Defers desktop CreateCommittedResource until first copy, CPU-map, or translated draw bind.
  • Null placeholder SRV descriptors refresh in place on materialization, including CopyDescriptorsSimple copies.
  • Untouched textures retire cleanly at guest Release(); in-flight computes stay live via retire_hold.
  • Lock ordering (draw_lock -> lazy_texture_mutex -> note_lock -> retire_lock) and publication hook handle descriptor race windows.
  • Test fixture covers budget delta, selective materialization, SRV refresh with copies, prepare/overwrite/resume race, and Release-before-first-use dispatch_translated path.
  • Documentation updated in experiments.md and startup-runtime.md.

The approach is consistent with existing slot-133 and retired-resource patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants