Shaders: vector buffer loads through a descriptor built around a table in the code #2916
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2916"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Proudnoob4 on 2026-11-29T18:48:11Z.
What it fixes
A vector buffer load through a descriptor built around the PC (
s_getpc_b64,s_add_u32of the table's offset, the descriptor ins[n:n+3]with num_records set, thenbuffer_load_dword ... offen) was refused insidehandle("a descriptor built around a table in the code"). A load has no effect of its own, so this did not refuse the program: it only left the loaded registers missing, the joins after it read 0, and nothing was logged. Scalar (smem) andglobal_loadreads of such tables were lowered already.Where it shows: the title's ACES tone-map table bake, in the form it hands to
DeserializeComputePipelineStateX(0x218), reads its spline coefficients this way. All 18 coefficient loads read 0 and the 32³ table it bakes came out one colour. The plain container of the same shader reads the table withglobal_load, so regular pipelines don't meet this.How
The load reads the table's dwords through
code_dword, as the scalar path does, with 0 at bytes past the descriptor's size (the console's range check). Stores, atomics, typed, sub-dword and indexed accesses through such a descriptor stay refused.Tested
a_vector_load_through_a_descriptor_built_around_a_table_in_the_code(hand-assembled GFX10; fails on main).VICTORY_DESERIALIZE_COMPUTE=1(RTX 4080 16 GB, 1440p, DLSS Quality; a build with this change and other open PRs): the scene is still grey. So this removes one cause, not the last one on that path, and the switch should stay off.cargo test -p victory-shader --lib --locked: 412 passed, 51 failed. Main gives 411 and the same 51 here, all for want of an SM 6.6 device (Windows 10, test binaries without the Agility SDK); none fails only with this change.crates/victory-loader/src/crash.rs:804(as on other open PRs, e.g. #2487), before it reaches this change.AI-assisted.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.