Repository navigation
D3D12.X: exclude GPU-written textures from write-watch ranges - #3
Draft
RandomGithub12309 wants to merge 1 commit into
Draft
RandomGithub12309 wants to merge 1 commit into
RandomGithub12309 wants to merge 1 commit into
Conversation
title_textures::refresh skips textures with e.gpu_written == true during upload filtering, yet cached_watch_ranges still included their backing memory in GetWriteWatch scan ranges, and note_gpu_write did not bump TEXTURES_GEN. Bump TEXTURES_GEN in note_gpu_write when e.gpu_written flips to true, filter !e.gpu_written entries when building watched_texture_ranges for cached_watch_ranges, and add a unit test. Assisted-by: Antigravity (Gemini 4 Neon)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exclude
gpu_writtentextures from write-watch ranges (cached_watch_ranges) and bumpTEXTURES_GENwhennote_gpu_writemarks a texture as GPU-written.refreshalready skipse.gpu_writtentextures when deciding which textures to upload, butcached_watch_rangesstill included their backing memory in theGetWriteWatchscan ranges, causing unnecessary page watch scans (and keepingWATCH_CACHEstale until an unrelated registration/release bumpedTEXTURES_GEN).(Parked as a draft PR on
RandomGithub12309/xclwhile#667and#674are in review upstream; rebase ontoivall/xcl:mainand run the full workspace test suite +scripts/smoke.ps1before opening upstream.)What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs: bumpTEXTURES_GENinnote_gpu_writewhene.gpu_writtentransitions totrue, extractwatched_texture_rangesfiltering!e.gpu_writtenforcached_watch_ranges, and addnote_gpu_write_bumps_generation_and_excludes_texture_from_watch_ranges.Tested
32.0.16.2114), Intel Core Ultra 7 255HX (20 cores), Windows 11 Build 26300,rustc 1.100.0 (0ef1bc386 2026-11-09)stable-x86_64-pc-windows-msvc(debug).cargo test -p xcl --lib hle::d3d12x::title_textures -- --test-threads=4 --nocapture:11 passed, 0 failed, 0 ignored(adapter printedSKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mipsonIntel(R) Graphics;note_gpu_write_bumps_generation_and_excludes_texture_from_watch_rangespassed).Regression run
mainbaselinedd2ae9aalready captured on this machine; runcargo test --workspace -- --test-threads=4andscripts/smoke.ps1before submitting upstream toivall/xcl).Not tested
cargo test --workspaceandscripts/smoke.ps1on this standalone branch (deferred until ready to open upstream), AMD/Intel GPUs, Wine/Linux.AI use