gpu: integrate XSS rendering and resource lifetime fixes #3942

Merged
R0Y00 merged 8 commits from upstream-pr/3942 into main 2026-12-03 17:42:59 +00:00
R0Y00 commented 2026-12-03 15:41:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T15:41:38Z.


Summary

  • Integrate native C++ shader translation and XSS graphics resource bindings.
  • Batch XMem range validation, preserve GPU-written ranges across submissions and recycle staging allocations after their fences.
  • Defer sampled texture and address-SRV allocations, track upload budget by creator and record presentation evidence.
  • Preserve the current main branch's lazy texture, descriptor publication and GPU readback behavior alongside the sampled-texture budget policy.

Verification

The local build at c2f5c8ca6 passed 71 targeted CTest cases. The Windows host was build 26300.9974 with an RTX 4060 Laptop GPU and NVIDIA driver 616.56. The cases cover native mesh and pixel shaders, cache equality, masked execution, packed outputs, UAV manifests, indirect draws, Mesh86 material buffers, texture deferral, retirement, linear staging and GPU-to-CPU visibility. The WQM draw fixture ran with the D3D12 debug layer enabled.

ctest --test-dir out/publish-xss-build -j 1 --output-on-failure --no-tests=error -R '^(native_direct_(mesh|container|cache_controls|cache_key_controls)|native_compute_manifest_reasons(_requests)?|native_graphics_wqm_(ir|warp)|native_mesh_(heap_provenance_smem_ir|packed_rows_vcc_ir|packed_order_dxil)|native_pixel_masked_region_alu_(controls|warp)|native_uav_slots_controls|startup_resource_budget_creators_(warp|hardware)|startup_triage_run|startup_mesh86_material_backing(_[a-z_]+)?_(warp|hardware)|startup_indirect_(draw_indexed|copy_provenance|translated_indexed_snapshot|translated_argument_snapshot)_(warp|hardware)|upload_reservation_unit_(all|reuse_rec_guard_mut)|upload_budget|startup_upload_reserve|linear_buffer_backing_share_(warp|hardware)|startup_slot133_lazy_textures_.*warp.*|startup_view_census_.*warp|startup_sampled_texture_policy.*_(warp|hardware)|startup_resource_retire_(title|views)_warp_debug[01]|linear_buffer_backing_(copy|staging-resize|staging-oom)_warp|gpu_cpu_visibility_reference_.*_warp|startup_gpu_to_cpu_.*warp.*)$'

In an earlier matched local XSS trace, median address validation for a sampled 39.8 MB heap fell from 1.97 s to 42 ms and median recording time from 2.09 s to 201 ms. That trace reached loading. Interactive scene presentation remains open.

Refs #3763 and #3641.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5629761904 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3942). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T15:41:38Z. --- ## Summary - Integrate native C++ shader translation and XSS graphics resource bindings. - Batch XMem range validation, preserve GPU-written ranges across submissions and recycle staging allocations after their fences. - Defer sampled texture and address-SRV allocations, track upload budget by creator and record presentation evidence. - Preserve the current main branch's lazy texture, descriptor publication and GPU readback behavior alongside the sampled-texture budget policy. ## Verification The local build at `c2f5c8ca6` passed 71 targeted CTest cases. The Windows host was build 26300.9974 with an RTX 4060 Laptop GPU and NVIDIA driver 616.56. The cases cover native mesh and pixel shaders, cache equality, masked execution, packed outputs, UAV manifests, indirect draws, Mesh86 material buffers, texture deferral, retirement, linear staging and GPU-to-CPU visibility. The WQM draw fixture ran with the D3D12 debug layer enabled. ```powershell ctest --test-dir out/publish-xss-build -j 1 --output-on-failure --no-tests=error -R '^(native_direct_(mesh|container|cache_controls|cache_key_controls)|native_compute_manifest_reasons(_requests)?|native_graphics_wqm_(ir|warp)|native_mesh_(heap_provenance_smem_ir|packed_rows_vcc_ir|packed_order_dxil)|native_pixel_masked_region_alu_(controls|warp)|native_uav_slots_controls|startup_resource_budget_creators_(warp|hardware)|startup_triage_run|startup_mesh86_material_backing(_[a-z_]+)?_(warp|hardware)|startup_indirect_(draw_indexed|copy_provenance|translated_indexed_snapshot|translated_argument_snapshot)_(warp|hardware)|upload_reservation_unit_(all|reuse_rec_guard_mut)|upload_budget|startup_upload_reserve|linear_buffer_backing_share_(warp|hardware)|startup_slot133_lazy_textures_.*warp.*|startup_view_census_.*warp|startup_sampled_texture_policy.*_(warp|hardware)|startup_resource_retire_(title|views)_warp_debug[01]|linear_buffer_backing_(copy|staging-resize|staging-oom)_warp|gpu_cpu_visibility_reference_.*_warp|startup_gpu_to_cpu_.*warp.*)$' ``` In an earlier matched local XSS trace, median address validation for a sampled 39.8 MB heap fell from 1.97 s to 42 ms and median recording time from 2.09 s to 201 ms. That trace reached loading. Interactive scene presentation remains open. Refs #3763 and #3641.
R0Y00 commented 2026-12-03 16:42:50 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T16:42:50Z.


The hosted Linux job on 47fb9bab has five actual failing checks. The FAIL lines under successful mutation audits are expected and are separate from this list.

  • docs_links_check: the material-placed-buffer-backing heading no longer matches the link in docs/experiments.md.
  • startup_triage_run_check: the inventory is missing four new compute root constant-buffer refusal reasons (unset parameter, non-CBV, misalignment, missing coherent backing).
  • startup_formatted_raw_srv_check: the extracted fixture lacks the new buffer_srv_offset helper and descriptor record.
  • startup_close_guard_check: the extracted Wrapper stub lacks the const own() overload used by the production fragment.
  • upload_reservation_unit_meta_check: two reservation contract anchors moved and the recordings-guard mutation no longer applies. When updating the fixture, keep its capacity and live-recording failure cases and verify the mutation still fails against the new anchor.

Log: https://github.com/R0Y00/Xbox2Windows/actions/runs/47150865898/job/144411621776

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7385317076 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3942#issuecomment-7385317076). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T16:42:50Z. --- The hosted Linux job on 47fb9bab has five actual failing checks. The FAIL lines under successful mutation audits are expected and are separate from this list. - docs_links_check: the material-placed-buffer-backing heading no longer matches the link in docs/experiments.md. - startup_triage_run_check: the inventory is missing four new compute root constant-buffer refusal reasons (unset parameter, non-CBV, misalignment, missing coherent backing). - startup_formatted_raw_srv_check: the extracted fixture lacks the new buffer_srv_offset helper and descriptor record. - startup_close_guard_check: the extracted Wrapper stub lacks the const own() overload used by the production fragment. - upload_reservation_unit_meta_check: two reservation contract anchors moved and the recordings-guard mutation no longer applies. When updating the fixture, keep its capacity and live-recording failure cases and verify the mutation still fails against the new anchor. Log: https://github.com/R0Y00/Xbox2Windows/actions/runs/47150865898/job/144411621776
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3942
No description provided.