shader: fix source-less VOP1 length and VOP3 CMPX destination #180

Open
davutsimsekk wants to merge 1 commit from upstream-pr/180 into main
davutsimsekk commented 2026-11-25 19:35:12 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by davutsimsekk on 2026-11-25T19:35:12Z.


Fixes two GFX10 decoder cases where the encoded fields do not describe the instruction's real operands.

  • The source-less VOP1 opcodes (v_nop, v_pipeflush, v_clrexcp) stay one dword. Their SRC0 field can contain a shader hash whose low bits look like an extension marker; consuming that word shifts every following instruction.
  • VOP3 v_cmpx_* writes EXEC, not the encoded VDST. The decoder now reports EXEC for those opcodes and leaves ordinary VOP3/VOPC compares on VDST.

Tested

  • cargo test -p victory-shader --lib --locked vop1_without_operands_has_no_extension_word: 1 passed.
  • cargo test -p victory-shader --lib --locked vop3_cmpx_writes_exec: 1 passed.
  • Windows 11, Rust 1.98.1, locked offline build.

Not tested

  • No in-game run; synthetic instruction words only.

AI use

  • Automated coding agent for analysis, patch preparation and test runs.
<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:5497866479 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180). Originally posted by [davutsimsekk](https://github.com/davutsimsekk) on 2026-11-25T19:35:12Z. --- Fixes two GFX10 decoder cases where the encoded fields do not describe the instruction's real operands. - The source-less VOP1 opcodes (`v_nop`, `v_pipeflush`, `v_clrexcp`) stay one dword. Their SRC0 field can contain a shader hash whose low bits look like an extension marker; consuming that word shifts every following instruction. - VOP3 `v_cmpx_*` writes EXEC, not the encoded VDST. The decoder now reports EXEC for those opcodes and leaves ordinary VOP3/VOPC compares on VDST. **Tested** - `cargo test -p victory-shader --lib --locked vop1_without_operands_has_no_extension_word`: 1 passed. - `cargo test -p victory-shader --lib --locked vop3_cmpx_writes_exec`: 1 passed. - Windows 11, Rust 1.98.1, locked offline build. **Not tested** - No in-game run; synthetic instruction words only. **AI use** - Automated coding agent for analysis, patch preparation and test runs.
KernelSmoker commented 2026-11-25 19:59:45 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by KernelSmoker on 2026-11-25T19:59:45Z.


Independent verification on PR head 4d291d4 (Bazzite Linux 45 x86_64, Rust 1.98.1):

  • Linux cargo test --offline --locked -p victory-shader: 187 passed, 0 failed, 6 ignored (lib, including both new tests vop1_without_operands_has_no_extension_word and vop3_cmpx_writes_exec) + 3 passed, 0 failed, 1 ignored (tests/resource_tracking.rs).
  • cargo clippy --offline --locked -p victory-shader --all-targets: 0 warnings in crates/victory-shader/src/gfx10/.
  • Code check:
    • The three source-less VOP1 opcodes in gfx10/mod.rs (0x000, 0x01B, 0x041) match v_nop, v_pipeflush, v_clrexcp in gfx10/opcodes.rs and gfx10/fields.rs:436.
    • Setting v.dst = Some(scalar(EXEC, lanes)) for v_cmpx* in the VOP3 arm of gfx10/fields.rs:595 brings it in line with the existing VOPC arm (fields.rs:511) and GFX10/RDNA2 semantics (VOP3 v_cmpx writes EXEC only, not VDST).
    • Minor note: v_clrexcp (0x041, e.g. 0x7E00_82FF) could optionally be added alongside v_nop/v_pipeflush in vop1_without_operands_has_no_extension_word.
<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7173039431 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#issuecomment-7173039431). Originally posted by [KernelSmoker](https://github.com/KernelSmoker) on 2026-11-25T19:59:45Z. --- Independent verification on PR head `4d291d4` (Bazzite Linux 45 x86_64, Rust 1.98.1): - Linux `cargo test --offline --locked -p victory-shader`: **187 passed, 0 failed, 6 ignored** (lib, including both new tests `vop1_without_operands_has_no_extension_word` and `vop3_cmpx_writes_exec`) + **3 passed, 0 failed, 1 ignored** (`tests/resource_tracking.rs`). - `cargo clippy --offline --locked -p victory-shader --all-targets`: **0 warnings** in `crates/victory-shader/src/gfx10/`. - Code check: - The three source-less VOP1 opcodes in `gfx10/mod.rs` (`0x000`, `0x01B`, `0x041`) match `v_nop`, `v_pipeflush`, `v_clrexcp` in `gfx10/opcodes.rs` and `gfx10/fields.rs:436`. - Setting `v.dst = Some(scalar(EXEC, lanes))` for `v_cmpx*` in the VOP3 arm of `gfx10/fields.rs:595` brings it in line with the existing VOPC arm (`fields.rs:511`) and GFX10/RDNA2 semantics (VOP3 `v_cmpx` writes `EXEC` only, not `VDST`). - Minor note: `v_clrexcp` (`0x041`, e.g. `0x7E00_82FF`) could optionally be added alongside `v_nop`/`v_pipeflush` in `vop1_without_operands_has_no_extension_word`.
lcg007xd-c commented 2026-11-25 21:13:38 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by lcg007xd-c on 2026-11-25T21:13:38Z.

Review: APPROVED


Verified on Linux (Rust 1.98.1)

  • cargo test -p victory-shader --lib on 4d291d4: 187 passed, 0 failed, 6 ignored. Merged into current main with --no-commit: 198 passed, 0 failed (main alone: 196).
  • Fail-without-fix, one half at a time, keeping both new tests:
    • With gfx10/fields.rs reverted to main, vop3_cmpx_writes_exec fails: left: Some(Scalar { code: 5, .. }), right: Some(Scalar { code: 126, .. }).
    • With only the 0x3F arm in gfx10/mod.rs reverted, vop1_without_operands_has_no_extension_word fails.
  • cargo clippy -p victory-shader --target x86_64-pc-windows-msvc: the same 10 warnings as main, none in gfx10/.
  • git merge --no-commit --no-ff into main: merges cleanly.
  • LLVM agrees on both points. llvm-mc --disassemble -triple=amdgcn -mcpu=gfx1030:
    • v_nop, v_pipeflush and v_clrexcp with SRC0 = 0xFF, 0xFA or 0xF9, followed by s_endpgm, decode as one 4-byte instruction each, then s_endpgm.
    • The test's VOP3 word 0xD4110005 0x0001E501 decodes as v_cmpx_lt_f32_e64 v1, 1.0, with no SGPR destination. LLVM re-encodes VDST as 0x7e and warns "potentially undefined instruction encoding" for VDST = 5, so EXEC is the right destination to report.

Notes (non-blocking)

  1. gfx10/mod.rs:215 uses the opcode numbers 0x000 | 0x01B | 0x041, while gfx10/fields.rs:436 uses the names "v_nop" | "v_pipeflush" | "v_clrexcp". Both lists say the same thing. Matching on name(Encoding::Vop1, opcode as u16) here, or sharing one list, would keep the length decode and the operand decode from drifting apart.
  2. For context on risk: the main consumers already special-case v_cmpx and ignore v.dst (ir.rs:987, structure.rs:1049, emit/lower.rs:10090). The VOP3 half mostly makes Fields consistent with the VOPC arm. It is unlikely to change generated code. The VOP1 length fix is the part that changes behaviour: every instruction after a hashed v_nop was shifted before.

Not verified

  • No translation of a real title shader and no GPU run.

Reviewed with Claude Code.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:review:6065065938 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#pullrequestreview-6065065938). Originally posted by [lcg007xd-c](https://github.com/lcg007xd-c) on 2026-11-25T21:13:38Z. **Review:** APPROVED --- ### Verified on Linux (Rust 1.98.1) - `cargo test -p victory-shader --lib` on 4d291d4: 187 passed, 0 failed, 6 ignored. Merged into current main with `--no-commit`: 198 passed, 0 failed (main alone: 196). - Fail-without-fix, one half at a time, keeping both new tests: - With `gfx10/fields.rs` reverted to main, `vop3_cmpx_writes_exec` fails: `left: Some(Scalar { code: 5, .. })`, `right: Some(Scalar { code: 126, .. })`. - With only the `0x3F` arm in `gfx10/mod.rs` reverted, `vop1_without_operands_has_no_extension_word` fails. - `cargo clippy -p victory-shader --target x86_64-pc-windows-msvc`: the same 10 warnings as main, none in `gfx10/`. - `git merge --no-commit --no-ff` into main: merges cleanly. - LLVM agrees on both points. `llvm-mc --disassemble -triple=amdgcn -mcpu=gfx1030`: - `v_nop`, `v_pipeflush` and `v_clrexcp` with SRC0 = `0xFF`, `0xFA` or `0xF9`, followed by `s_endpgm`, decode as one 4-byte instruction each, then `s_endpgm`. - The test's VOP3 word `0xD4110005 0x0001E501` decodes as `v_cmpx_lt_f32_e64 v1, 1.0`, with no SGPR destination. LLVM re-encodes VDST as `0x7e` and warns "potentially undefined instruction encoding" for VDST = 5, so EXEC is the right destination to report. ### Notes (non-blocking) 1. `gfx10/mod.rs:215` uses the opcode numbers `0x000 | 0x01B | 0x041`, while `gfx10/fields.rs:436` uses the names `"v_nop" | "v_pipeflush" | "v_clrexcp"`. Both lists say the same thing. Matching on `name(Encoding::Vop1, opcode as u16)` here, or sharing one list, would keep the length decode and the operand decode from drifting apart. 2. For context on risk: the main consumers already special-case `v_cmpx` and ignore `v.dst` (`ir.rs:987`, `structure.rs:1049`, `emit/lower.rs:10090`). The VOP3 half mostly makes `Fields` consistent with the VOPC arm. It is unlikely to change generated code. The VOP1 length fix is the part that changes behaviour: every instruction after a hashed `v_nop` was shifted before. ### Not verified - No translation of a real title shader and no GPU run. Reviewed with Claude Code.
Yoshi-233 commented 2026-11-26 03:57:16 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Yoshi-233 on 2026-11-26T03:57:16Z.


@KernelSmoker I checked the v_clrexcp case you mentioned on this fork, comparing the parent 000ffdd with 4d291d4. I put s_endpgm directly after each instruction and swept all 512 SRC0 encodings for each of v_nop, v_pipeflush, and v_clrexcp. On the parent, all three swallowed the next word for the same five values: 0xe9, 0xea, 0xf9, 0xfa, and 0xff. On the PR all 1,536 decoded with the end instruction at byte 4. An ordinary v_mov_b32 control kept its correct length for all 512 encodings on both revisions.

I also checked the decoded destination for 95 named VOP3 CMPX opcodes, wave32/wave64, and four encoded destinations. All 760 disagreed with the expected EXEC destination on the parent and all 760 matched on the PR. The SSA writes and subsequent reads of EXEC already agreed on both revisions. Linux CPU-only; the PR's shader library suite passed 187 with 6 ignored.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7182166295 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#issuecomment-7182166295). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-26T03:57:16Z. --- @KernelSmoker I checked the `v_clrexcp` case you mentioned on this fork, comparing the parent `000ffdd` with `4d291d4`. I put `s_endpgm` directly after each instruction and swept all 512 SRC0 encodings for each of `v_nop`, `v_pipeflush`, and `v_clrexcp`. On the parent, all three swallowed the next word for the same five values: `0xe9`, `0xea`, `0xf9`, `0xfa`, and `0xff`. On the PR all 1,536 decoded with the end instruction at byte 4. An ordinary `v_mov_b32` control kept its correct length for all 512 encodings on both revisions. I also checked the decoded destination for 95 named VOP3 CMPX opcodes, wave32/wave64, and four encoded destinations. All 760 disagreed with the expected EXEC destination on the parent and all 760 matched on the PR. The SSA writes and subsequent reads of EXEC already agreed on both revisions. Linux CPU-only; the PR's shader library suite passed 187 with 6 ignored.
MamaLeVrai commented 2026-11-26 05:00:22 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-26T05:00:22Z.


RDNA2 data point. This PR (4d291d4) merged on main 4f62c2a, cargo test --release -p victory-shader --lib on an RX 6950 XT (Windows 11 build 26300, Rust 1.98.1):

  • main: 275 passed, 2 failed.
  • This PR: 277 passed, 2 failed, in 2 runs out of 2. The 2 new tests pass.

The 2 failures are the same as on main: the RDNA2 wave-size tests scalar_counted_in_a_divergent_loop_read_after_it and scalar_counted_in_nested_divergent_loops, fixed by #110 and #204. No regression here. Not run in the game.

harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7183093558 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#issuecomment-7183093558). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-26T05:00:22Z. --- RDNA2 data point. This PR (`4d291d4`) merged on `main` `4f62c2a`, `cargo test --release -p victory-shader --lib` on an RX 6950 XT (Windows 11 build 26300, Rust 1.98.1): - `main`: 275 passed, 2 failed. - This PR: 277 passed, 2 failed, in 2 runs out of 2. The 2 new tests pass. The 2 failures are the same as on `main`: the RDNA2 wave-size tests `scalar_counted_in_a_divergent_loop_read_after_it` and `scalar_counted_in_nested_divergent_loops`, fixed by #110 and #204. No regression here. Not run in the game. harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300 AI-assisted (Claude Code); no game data.
adrianmjim commented 2026-11-26 19:41:08 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by adrianmjim on 2026-11-26T19:41:08Z.


Data from the title, on how much this changes in practice. I tested 4d291d4 on native Windows 11 (26300) with an RX 7900 XT (RDNA3) and Rust 1.98.1.

Unit tests. cargo test -p victory-shader --lib -- --test-threads=1 gives 268 passed, 0 failed and 6 ignored, against 266 on the base 000ffdd.

The title's shaders. I ran victory translate --validate --host-lanes 32-64 over the game's whole shaders.rpf, and nothing changes against 000ffdd:

  • VS/PS 14247/14247, CS 2682/2682 and MS 8694 of 8765 validate, with the same 195 + 71 refusals and the same 40601701 IR instructions.
  • With a local per-program DXIL hash, 0 of 25623 programs change.
  • victory shader-info decodes the same 26698 programs and 44386798 instructions before and after.

Why nothing changes, from a full disassembly of the archive. The review above expected the VOP1 length fix to change behaviour, because instructions after a hashed v_nop would have been shifted. In this title they aren't:

  • All 127972 VOP1-encoded v_nop have SRC0 = 0, so they already decoded as one dword. There are no v_pipeflush or v_clrexcp at all.
  • The per-program hash is in two VOP3-encoded v_nop, at offsets 0x0 and 0xC of every program. Each has SRC2 = 0xFF and a literal, so each is 3 dwords, and all 53396 of them already decode as 3 dwords. This PR does not touch that path.
  • All 3821 VOP3 v_cmpx encode VDST as 126 (EXEC_LO), so the fields.rs change gives the same operand as before.

So both halves are correct guards, but this title has no instruction that needs either one.

Not tested: the current main (4f62c2a), other titles, in-game runs.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7201854021 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#issuecomment-7201854021). Originally posted by [adrianmjim](https://github.com/adrianmjim) on 2026-11-26T19:41:08Z. --- Data from the title, on how much this changes in practice. I tested `4d291d4` on native Windows 11 (26300) with an RX 7900 XT (RDNA3) and Rust 1.98.1. **Unit tests.** `cargo test -p victory-shader --lib -- --test-threads=1` gives 268 passed, 0 failed and 6 ignored, against 266 on the base `000ffdd`. **The title's shaders.** I ran `victory translate --validate --host-lanes 32-64` over the game's whole `shaders.rpf`, and nothing changes against `000ffdd`: - VS/PS 14247/14247, CS 2682/2682 and MS 8694 of 8765 validate, with the same 195 + 71 refusals and the same 40601701 IR instructions. - With a local per-program DXIL hash, 0 of 25623 programs change. - `victory shader-info` decodes the same 26698 programs and 44386798 instructions before and after. **Why nothing changes, from a full disassembly of the archive.** The review above expected the VOP1 length fix to change behaviour, because instructions after a hashed `v_nop` would have been shifted. In this title they aren't: - All 127972 VOP1-encoded `v_nop` have SRC0 = 0, so they already decoded as one dword. There are no `v_pipeflush` or `v_clrexcp` at all. - The per-program hash is in two VOP3-encoded `v_nop`, at offsets 0x0 and 0xC of every program. Each has SRC2 = 0xFF and a literal, so each is 3 dwords, and all 53396 of them already decode as 3 dwords. This PR does not touch that path. - All 3821 VOP3 `v_cmpx` encode VDST as 126 (EXEC_LO), so the `fields.rs` change gives the same operand as before. So both halves are correct guards, but this title has no instruction that needs either one. Not tested: the current main (`4f62c2a`), other titles, in-game runs.
Yoshi-233 commented 2026-11-27 01:11:56 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Yoshi-233 on 2026-11-27T01:11:56Z.


I rechecked the current default branch, a-publier at 4eb6cfd, since #180 targets main. Both decoder cases still reproduce on that branch. The distinction matters for testing the build people currently get from a fresh clone.

  • Out of 1,536 synthetic VOP1 streams, base consumed the following s_endpgm for 15 (the five ignored SRC0 values on each of v_nop, v_pipeflush and v_clrexcp). All 512 ordinary MOV length controls were correct.
  • For 95 VOP3 CMPX opcodes × two wave widths × four VDST encodings, base reported the encoded destination in all 760 cases, while the IR already wrote EXEC. Ordinary VOP3 CMP and VOPC controls matched throughout.

The patch from 4d291d4 does not apply as a plain patch against a-publier (the test hunk in gfx10/mod.rs has different context). I tried the backport of your fix in CGBJ #4 on 4eb6cfd: it applies cleanly, all 1,536 instruction boundaries and 760 CMPX destinations match, and the Linux victory-shader --lib suite reports 212 passed, 2 ignored. This gives maintainers a tested option for the default branch. These are synthetic CPU cases; the title-corpus observation above is compatible with this result.

AI-assisted testing on native x86-64 Linux, Rust 1.98.1.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7207093547 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#issuecomment-7207093547). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-27T01:11:56Z. --- I rechecked the current default branch, `a-publier` at `4eb6cfd`, since #180 targets `main`. Both decoder cases still reproduce on that branch. The distinction matters for testing the build people currently get from a fresh clone. - Out of 1,536 synthetic VOP1 streams, base consumed the following `s_endpgm` for 15 (the five ignored SRC0 values on each of `v_nop`, `v_pipeflush` and `v_clrexcp`). All 512 ordinary MOV length controls were correct. - For 95 VOP3 CMPX opcodes × two wave widths × four VDST encodings, base reported the encoded destination in all 760 cases, while the IR already wrote EXEC. Ordinary VOP3 CMP and VOPC controls matched throughout. The patch from `4d291d4` does not apply as a plain patch against `a-publier` (the test hunk in `gfx10/mod.rs` has different context). I tried [the backport of your fix in CGBJ #4](https://github.com/carlm125/cool_fox/pull/4) on `4eb6cfd`: it applies cleanly, all 1,536 instruction boundaries and 760 CMPX destinations match, and the Linux `victory-shader --lib` suite reports 212 passed, 2 ignored. This gives maintainers a tested option for the default branch. These are synthetic CPU cases; the title-corpus observation above is compatible with this result. AI-assisted testing on native x86-64 Linux, Rust 1.98.1.
gut0to commented 2026-11-27 14:57:46 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-27T14:57:46Z.

Code review location: crates/victory-shader/src/gfx10/mod.rs; line 215

@@ -208,7 +208,17 @@ fn instruction(code: &[u8], offset: usize) -> Result<Instruction, ShaderError> {
         // Literal constant, SDWA, DPP16, DPP8, DPP8 with fetch-inactive.
         let extra = usize::from(matches!(src0, 0xFF | 0xF9 | 0xFA | 0xE9 | 0xEA));
         match w >> 25 {
-            0x3F => (Encoding::Vop1, (w >> 9) & 0xFF, 1 + extra),
+            0x3F => {
+                let opcode = (w >> 9) & 0xFF;
+                // These VOP1s take no source, so the field is not a literal
+                // (the console compiler stores a shader hash there).
+                let no_source = matches!(opcode, 0x000 | 0x01B | 0x041);

AI-assisted static review; I did not run tests. The no-source table also includes opcode 0x041 (v_clrexcp), but the fixture covers only v_nop and v_pipeflush. Could it add v_clrexcp with SRC0 = 0xFF followed immediately by s_endpgm? That would verify the third opcode stays one dword and that the decoder does not consume the next instruction as a false literal.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:review-comment:4720865117 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#discussion_r4720865117). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-27T14:57:46Z. **Code review location:** `crates/victory-shader/src/gfx10/mod.rs`; line 215 ~~~~diff @@ -208,7 +208,17 @@ fn instruction(code: &[u8], offset: usize) -> Result<Instruction, ShaderError> { // Literal constant, SDWA, DPP16, DPP8, DPP8 with fetch-inactive. let extra = usize::from(matches!(src0, 0xFF | 0xF9 | 0xFA | 0xE9 | 0xEA)); match w >> 25 { - 0x3F => (Encoding::Vop1, (w >> 9) & 0xFF, 1 + extra), + 0x3F => { + let opcode = (w >> 9) & 0xFF; + // These VOP1s take no source, so the field is not a literal + // (the console compiler stores a shader hash there). + let no_source = matches!(opcode, 0x000 | 0x01B | 0x041); ~~~~ --- AI-assisted static review; I did not run tests. The no-source table also includes opcode `0x041` (`v_clrexcp`), but the fixture covers only `v_nop` and `v_pipeflush`. Could it add `v_clrexcp` with `SRC0 = 0xFF` followed immediately by `s_endpgm`? That would verify the third opcode stays one dword and that the decoder does not consume the next instruction as a false literal.
gut0to commented 2026-11-27 14:57:46 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-27T14:57:46Z.

Review: COMMENTED


AI-assisted static review; I inspected the decoder change and its fixtures, but did not run the test suite. One boundary case is not covered yet:

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:review:6089999280 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180#pullrequestreview-6089999280). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-27T14:57:46Z. **Review:** COMMENTED --- AI-assisted static review; I inspected the decoder change and its fixtures, but did not run the test suite. One boundary case is not covered yet:
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/180:upstream-pr/180'
git switch 'upstream-pr/180'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/180'
git switch 'upstream-pr/180'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/180'
git switch 'upstream-pr/180'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/180'
git switch 'main'
git merge --squash 'upstream-pr/180'
git switch 'main'
git merge --ff-only 'upstream-pr/180'
git switch 'main'
git merge 'upstream-pr/180'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Belobug/VIctory-Belobug-AMD!180
No description provided.