Repository navigation
Conversation
…t window On a CPU without CLZERO (Intel), every emulated CLZERO / CLZERO loop checked its target with is_writable, which calls VirtualQuery. VirtualQuery sizes the region by walking it to its end, and the coherent window is one committed region of up to 4 GiB: ~40 ms a call (the cost uma::in_committed_window already notes for DirectStorage). The retail game runs about 25 emulated instructions a second, nearly all of them CLZERO loops into that window, and two thread dumps 5 s apart found its main thread in the exception handler both times: 1-2 presents a second. The coherent window is committed and read-write as a whole, so a target inside it is writable without asking; readable() and read_committed() already take this path. Measured on the retail game (RTX 5080, i5-12600K): ~1.5 fps -> 30 fps (the title's frame clock) on its first-run and account screens, and it reaches the Navigation menu.
|
This now conflicts with AI use
|
Author
|
Closing: #306 (merged) takes the same VirtualQuery out of the CLZERO path, and more. |
raylitebull
added a commit
that referenced
this pull request
Nov 29, 2026
Indoors the reflections CS_TemporalResolve2_Opaque and CS_TemporalResolve1_Alpha resolve were capped at XCL_AMBIENT_REFLECT (0.5) times the larger of the sky's level (clamped to 0.65) and the 64x36 cells under them. With rays forced to miss they come out with the sky's light, and in daylight that cap reaches 0.5 x 0.65 = 0.33 while a room's light is of 0.01 to 0.1 (VIctory-Neo's capture of a cutscene frame), so eyes, glossy floors and glass glowed. VIctory-Neo (3aca295, "hold"; from Vice-Tay #99 and avatarmanz/VIctory-7900XTX #314) holds every texel of the resolved image to n times the light around: the ambient estimate at the four of the 160x90 gathered points about the texel, with a fifth of the room's slow mean, hue kept. Neo's launcher turns it on at 1 (cfecf35): in the first house of a shared save a terrarium's glass, a table top, a patch of floor, a microwave door and a wall clock no longer show white; outside only a glass door is darker. Port it as a second bound in the existing reflection cap: the cap is now the smaller of the old one and XCL_AMBIENT_REFLECT_HOLD times the light around (the cells under the texel while no points are gathered; no hold before any frame's light is kept), so reflections are never brighter than before. On by default at 1.25: XCL's estimate is XCL_AMBIENT_FRAME (0.8) of what the surfaces send out, so this is Neo's 1. XCL_AMBIENT_REFLECT_HOLD=0 turns it off. A log line counts the holds. Tests: the switch's parsing and default, the point layout the shader reads, and a GPU run of the program on an 8x8 image (held to the points, to the cells without points, and to the sky's cap alone with the hold off; hue kept, dim texels left). Ported from VIctory-Neo (https://github.com/KyleS98/VIctory-Neo, bdc3f38, GPL-3.0-or-later). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 6eb60e9fca61b9b90afb0023f8ea36473a9b79a3)
raylitebull
added a commit
that referenced
this pull request
Nov 29, 2026
Indoors the reflections CS_TemporalResolve2_Opaque and CS_TemporalResolve1_Alpha resolve were capped at XCL_AMBIENT_REFLECT (0.5) times the larger of the sky's level (clamped to 0.65) and the 64x36 cells under them. With rays forced to miss they come out with the sky's light, and in daylight that cap reaches 0.5 x 0.65 = 0.33 while a room's light is of 0.01 to 0.1 (VIctory-Neo's capture of a cutscene frame), so eyes, glossy floors and glass glowed. VIctory-Neo (3aca295, "hold"; from Vice-Tay #99 and avatarmanz/VIctory-7900XTX #314) holds every texel of the resolved image to n times the light around: the ambient estimate at the four of the 160x90 gathered points about the texel, with a fifth of the room's slow mean, hue kept. Neo's launcher turns it on at 1 (cfecf35): in the first house of a shared save a terrarium's glass, a table top, a patch of floor, a microwave door and a wall clock no longer show white; outside only a glass door is darker. Port it as a second bound in the existing reflection cap: the cap is now the smaller of the old one and XCL_AMBIENT_REFLECT_HOLD times the light around (the cells under the texel while no points are gathered; no hold before any frame's light is kept), so reflections are never brighter than before. On by default at 1.25: XCL's estimate is XCL_AMBIENT_FRAME (0.8) of what the surfaces send out, so this is Neo's 1. XCL_AMBIENT_REFLECT_HOLD=0 turns it off. A log line counts the holds. Tests: the switch's parsing and default, the point layout the shader reads, and a GPU run of the program on an 8x8 image (held to the points, to the cells without points, and to the sky's cap alone with the hold off; hue kept, dim texels left). Ported from VIctory-Neo (https://github.com/KyleS98/VIctory-Neo, bdc3f38, GPL-3.0-or-later). (cherry picked from commit 6eb60e9fca61b9b90afb0023f8ea36473a9b79a3)
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.
Related to #278
What is in it
crates/xcl/src/eh.rs:is_writablereturns early for a range inside the committed coherent window (+5 lines)Tested
cargo test --workspace -- --test-threads=4: 652 passed, 0 failed, 40 ignored (SKIPPED:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64)is_writablefaster, its answer for the coherent window is the same as before, so a test that fails without it would have to timeVirtualQueryXCL_NETWORK=0: ~1.5 fps → 30 fps (the title's frame clock) on the first-run and account screens, and it now reaches the Navigation menu. Before the fix, two thread dumps 5 s apart had the main thread in the exception handler undergame_scarlett_master.exe+0x4e8aab0(a CLZERO loop) both timesgpu: Virtual Desktop Monitor:smoke.ps1takes the first display adapter, a virtual one on this machine; both runs were on the RTX 5080Regression run
main:
PR:
Not tested
AI use