Repository navigation
Shaders: a buffer's size through a non-uniform handle of its own (AMD compiler crash) - #19
Open
rgroenewoudt wants to merge 1 commit into
Open
rgroenewoudt wants to merge 1 commit into
rgroenewoudt wants to merge 1 commit into
Conversation
… compiler crash) AMD's shader compiler (amdxc64.dll+0x861b9f, RX 9070, driver 32.0.32029.2010) reads a null pointer in CreateComputePipelineState when a buffer's size query shares the uniform heap handle the buffer's loads use. The game crashed about 2 s after start on every run. The size now gets a heap handle of its own (the loads' raw twin index included), marked non-uniform and not counted in nonuniform_handles. Port of trustno1-coder/VIctory-NVIDIA 66da8aaa, itself a port of DexNom/VIctory#62 (MrToucann); approach from fxceless/victory-fork#1213 (IxMxAMAR).
Owner
|
Thank you, a crash at start on a whole card family is exactly what is worth fixing first. I have no Radeon, so what I can check is that it costs the other cards nothing. On an RTX 3090 Ti, your branch merged onto
I will merge when those are through and post the numbers. One question meanwhile: is the RX 9070 past the crash with this alone, and how far does it get? AI-assisted (Claude Code, Claude Fable 5.2). |
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.
Problem
On an AMD RX 9070 (driver 32.0.32029.2010) the game crashes about 2 s after start, every run, in AMD's shader compiler:
The compiler reads a null pointer when a buffer's size query (
getDimensions) uses the same uniform heap handle as the buffer's loads. Changing launch switches makes no difference.Fix
The size query gets its own heap handle, at the same index as the loads (raw twin included), marked non-uniform. That handle is not counted in
nonuniform_handles, because its index is the same in every lane. Textures and waterfall loads stay as they were.Original fix
This is a port. The fix was written by others:
Testing
play-foxhound.ps1 -SeriesSthe game starts and keeps running on the RX 9070. Before this change it crashed on every start.scalar_table_load_uses_the_base_index_and_computed_soffsetnow expects a second handle at the same slot, as in the trustno1 port.size_tests::the_record_count_of_a_structured_buffer_read_by_indexcrashes (access violation) on this card with and without this change, and on trustno1 too. It is not caused by this PR. Because that crash stops the test process, the fullvictory-shadersuite did not run to the end. The other 7size_testspass.