Repository navigation
shader_library: read indexes in blocks and reject incomplete reads (RT-SHADER-INDEX-BLOCK-READ) - #1218
Open
sodove wants to merge 1 commit into
Open
shader_library: read indexes in blocks and reject incomplete reads (RT-SHADER-INDEX-BLOCK-READ)#1218sodove wants to merge 1 commit into
sodove wants to merge 1 commit into
Conversation
Contributor
|
Read the whole diff and tested
I did not measure load times. Nothing to change from my side. AI-assisted (Claude Code, Claude Opus 5.5). |
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.
Claimed in the coordination issue as: RT-SHADER-INDEX-BLOCK-READ (claim).
Depends on: none. #1108 changes how the JSON parser moves subtrees and applies independently.
What changed
The first pipeline that needs the shader library waits for
ShaderLibrary::load. Its main and optional indexes now read in 16 KiB blocks. The reader keeps native Unicode paths and shared reads on Windows, and checks the file error indicator before parsing.This also fixes a reproducible Windows failure. An index started with a valid JSON object and had a locked byte after 64 KiB of readable input. On
mainthe load succeeded with just the readable prefix. The regression test now requires a read error and an unloaded library.Measured
Native Windows 11 x64, Ryzen 5 9600X, MSVC 19.44
/O2. Each sample timed the complete publicShaderLibrary::loadcall with warm filesystem cache, including parsing and building the lookup table. After the timer stopped, the harness looked up every synthetic entry and checked its name, stage key, local size and push-constant size. One warm-up round, then 12 paired rounds with alternating revision order.The larger index improved in all 12 pairs on both baselines. The small control favored the change in only 6/12 pairs on
main. Baseline58be9cdf8, #1108 patch fromf6ea7b667. This measures the first shader-library load on synthetic data. Game startup and frame rate were not timed.Tested
gta6rt.exein RelWithDebInfo. Native Windows CTestsshader_libraryandmodspassed. The Windows lock test failed at the successful-load assertion on the unmodified reader. The shader-library suite also passed on GCC 15.2, Linux x86-64.d3d12_computeandd3d12_fspx_computepassed on both Windows adapters below. The latter creates compute PSOs from the optional FSPX index, dispatches them and verifies readback.GPUs tested: RTX 5070 Ti (NVIDIA 610.74), Ryzen 5 9600X integrated Radeon (AMD 32.0.21045.29003), Windows 11.
AI-assisted: yes (OpenAI Codex).
Checklist