Repository navigation
Shaders: SP3 text gives a message only the fields it has - #283
Closed
SkippySteve wants to merge 1 commit into
Closed
SkippySteve wants to merge 1 commit into
SkippySteve wants to merge 1 commit into
Conversation
The disassembler wrote every s_sendmsg as if it were a GS message, with a GS operation and a stream, so the mesh stage's allocation request read "sendmsg(MSG_GS_ALLOC_REQ, GS_OP_NOP, 0)", and only four of the GFX10 message ids had names. Now messages are spelled the way LLVM's AMDGPU assembler spells them: the operation only for GS, GS_DONE and SYSMSG, the stream only for a GS emit or cut, and every GFX10 message id named. An operand whose bits no field accounts for (an unknown id, a stream on a NOP, an operation on a message that has none, bits above the stream) stays as raw hex instead of losing those bits. The text is only used for shader dumps; translation does not read it.
Author
|
superseded by #326 (combined shader DX/parser robustness) |
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.
gfx10/sp3.rswrote everys_sendmsgoperand as if it were a GS message, with a GS operation and a stream. So the mesh/NGG stage's allocation request appeared in shader dumps assendmsg(MSG_GS_ALLOC_REQ, GS_OP_NOP, 0), and only four of the GFX10 message ids had names (MSG_GS, MSG_GS_DONE, MSG_ORDERED_PS_DONE, MSG_GS_ALLOC_REQ).Messages are now spelled the way LLVM's AMDGPU assembler spells them:
MSG_GS,MSG_GS_DONEandMSG_SYSMSG(SYSMSG_OP_*).Before → after:
0x0009sendmsg(MSG_GS_ALLOC_REQ, GS_OP_NOP, 0)sendmsg(MSG_GS_ALLOC_REQ)0x0008sendmsg(8, GS_OP_NOP, 0)sendmsg(MSG_EARLY_PRIM_DEALLOC)0x002Fsendmsg(15, GS_OP_EMIT, 0)sendmsg(MSG_SYSMSG, SYSMSG_OP_REG_RD)0x0122sendmsg(MSG_GS, GS_OP_EMIT, 1)0x0019sendmsg(MSG_GS_ALLOC_REQ, GS_OP_CUT, 0)0x0019Only shader dumps use this text (
victoryshader listing viaInstruction::text). Translation matches on the opcode and reads the raw immediate, so its behaviour does not change.The new test
sendmsg_names_only_the_fields_a_message_hasdecodes synthetics_sendmsgwords and needs no game data.Testing on Linux:
cargo test -p victory-shader: 57 passed.cargo clippy -p victory-shader --all-targets: no new warnings. The only warning is the existing unusedconstant_colorinemit/mod.rs, which is onmaintoo.cargo fmt --check -p victory-shader: clean.cargo xtask policy: ok.