Repository navigation
Shaders: a buffer's size is asked through a non-uniform handle of its own (AMD's compiler crash at amdxc64.dll+0x861b9f) - #1213
Conversation
…handle of its own, marked non-uniform (AMD's compiler crash) AMD's compiler (amdxc64.dll+0x861b9f; RX 9070 XT, driver 32.0.32029.2010) reads a null pointer compiling a buffer's getDimensions through the uniform heap handle the buffer's loads use, and the process ends. Five of the title's compute programs did so on main 32b31f7, each made alone with `victory translate --pipelines`: f16876929fa64f9f (bvh_skinning:CSComputeSkinningTreeAnimVelocity), 878933b499cfa14d (CSComputeSkinningTreeAnim), a567b9ef845fb680 (CSComputeTreeAnim), c1eee35dbc50a9ef (GpuParticleUpdate:CS_UpdateSkinnedAttachMeshTreeParticles) and 27ce027e7188bed3 (ped_standard_lod_muv_emissive:CS_RaytracingResolve). With every clean-up pass off (VICTORY_SHADER_OPT=0) the first and the fourth still did. descriptor_data now makes a heap handle of its own for a buffer's size, marked non-uniform (Shader::size_handle; not counted in nonuniform_handles, its index being the same in every lane); a descriptor loaded per lane keeps its handle, non-uniform already. All five compile. The idea, and the test's program, are those of pull request fxceless#452, rebased onto main. Test (dims_tests): the program's pipeline compiles on the hardware GPU and on WARP. On the RX 9070 XT without the change the test process ends inside amdxc64.dll. Co-authored-by: MalfoyDraco99 <171201207+MalfoyDraco99@users.noreply.github.com>
|
In game on an RX 9070 XT (driver 32.0.32029.2010), 32b31f7 + this PR + #1195, only jmehru#5 hit the same four programs on an RX 9070 with the same driver and builds them with #195 + #452. This PR alone builds all five on 32b31f7. Upstream, Marvisak/VIctory#1785 bisects the end of the same fault to 850b66f ("one handle per descriptor at a fixed address, and per join"). |
…ess/victory-fork#1213 does The four size-read programs crash because the size query and the buffer's loads use the same uniform heap handle. fxceless/victory-fork#1213 (IxMxAMAR) asks the size through a handle of its own, marked non-uniform and not counted in nonuniform_handles. On the RX 9060 XT that clears all four here too, without a digest list. It replaces the groupshared hoist and the Module helpers it needed. The nine programs that need one clean-up pass keep it by digest. All 13 programs validate and create their pipelines on the RX 9060 XT; cargo test -p victory-shader: 240 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A752X7rKCzD2ViPbSWcyut
…ram clean-up passes fxceless#1213 asks a buffer's size through a non-uniform handle of its own. On the RX 9060 XT that clears the size-read programs on its own, without a digest list, so the groupshared hoist and the Module helpers it needed go. What remains is what fxceless#1213 does not target. The constant-folding pass runs for indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays, which ends the process without it. The FACTS pass runs for the eight glints pixel programs. This branch with fxceless#1213: all 13 programs validate and create their pipelines. Alone, the two tree programs still fail, as they do without fxceless#1213. cargo test -p victory-shader: 218 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A752X7rKCzD2ViPbSWcyut
|
Confirmed on our side: merged
This is the furthest this fork has come on our card. Thanks for the diagnosis. Tested on RX 9070 XT (RDNA4), measured |
Fixes the AMD shader-compiler crash at
amdxc64.dll+0x861b9f(a null read) for the title's compute programs that read a buffer's size from its descriptor. Reports of that offset: #120, #145, #505, #881 here; Marvisak/VIctory#1783, #1785 and #2517 upstream.Cause
getDimensionsthrough the uniform heap handle that the buffer's loads use, and the process ends.main32b31f7, each made alone withvictory translate --pipelines(RX 9070 XT, driver 32.0.32029.2010):f16876929fa64f9fbvh_skinning:CSComputeSkinningTreeAnimVelocity878933b499cfa14dbvh_skinning:CSComputeSkinningTreeAnima567b9ef845fb680bvh_skinning:CSComputeTreeAnimc1eee35dbc50a9efGpuParticleUpdate:CS_UpdateSkinnedAttachMeshTreeParticles27ce027e7188bed3ped_standard_lod_muv_emissive:CS_RaytracingResolveVICTORY_SHADER_OPT=0), the first and the fourth still crashed.Change
descriptor_datamakes a heap handle of its own for a buffer's size, marked non-uniform (Shader::size_handle). It isn't counted innonuniform_handles, since its index is the same in every lane.main.Relation to #984
878933b499cfa14d,a567b9ef845fb680,27ce027e7188bed3); the other two still crash.Tests
dims_tests: the program's pipeline compiles on the hardware GPU and on WARP. On the RX 9070 XT without the change, the test process ends insideamdxc64.dll.cargo test -p victory-shader -p victory-gpu --all-featureson32b31f7: victory-shader 217 passed. victory-gpu 202 passed and 1 failed:indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which fails the same way here without this change (3 of 3 runs each way).victory translate shaders.rpf --pipelinesover the whole archive with this change: every emitted program got its host pipeline (14,199 vertex/pixel, 2,675 compute, 8,762 mesh), and nothing crashed. Without it, each of the five above ends the process.