Shaders: GFX10 FLAT offsets ignore bit 11 #1636

Manually merged
github merged 1 commit from gh-pr/1636/head into gh-pr/1636/base 2026-11-26 04:39:13 +00:00
Owner

@⁠davutsimsekk on GitHub · 2026-11-24 20:13 UTC · original
davutsimsekk:fix/flat-offset-twelve-bits → main · +17 −0 · 2 files · 1 commits · merged 2026-11-25 00:23 UTC

GFX10 FLAT offsets are 11-bit and unsigned; the hardware ignores bit 11, unlike GLOBAL/SCRATCH which use a 12-bit signed offset. The decoder already masked with 0x7FF, but nothing said why and nothing pinned it.

This adds the comment and a regression test: flat_load_dword v0, v[1:2] with 0xDC30_0800 decodes as offset 0, and 0xDC30_0FFF as 0x7FF. No behaviour change.

Test

flat_offsets_ignore_bit_eleven in gfx10::tests.

  • cargo test -p victory-shader --lib: 121 passed, 0 failed, 1 ignored
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean
  • rustfmt --edition 2024 --check on both changed files: clean
  • The title was not run.
**@⁠davutsimsekk** on GitHub · 2026-11-24 20:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/1636) `davutsimsekk:fix/flat-offset-twelve-bits` → `main` · +17 −0 · 2 files · 1 commits · merged 2026-11-25 00:23 UTC GFX10 FLAT offsets are 11-bit and unsigned; the hardware ignores bit 11, unlike GLOBAL/SCRATCH which use a 12-bit signed offset. The decoder already masked with `0x7FF`, but nothing said why and nothing pinned it. This adds the comment and a regression test: `flat_load_dword v0, v[1:2]` with `0xDC30_0800` decodes as offset 0, and `0xDC30_0FFF` as 0x7FF. No behaviour change. ## Test `flat_offsets_ignore_bit_eleven` in `gfx10::tests`. - `cargo test -p victory-shader --lib`: 121 passed, 0 failed, 1 ignored - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: clean - `rustfmt --edition 2024 --check` on both changed files: clean - The title was not run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:12 +00:00
github manually merged commit 40f30be0b5 into gh-pr/1636/base 2026-11-26 04:39:13 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 20:46 UTC · original

Verified head ba2c202 merged cleanly onto main (ffe310e) on Windows 11 / AMD Radeon RX 9060 XT (RDNA4, gfx1200) + WARP / Rust 1.98.1 MSVC:

  • cargo test -p victory-shader --lib: 121 passed, 0 failed, 1 ignored (new FLAT 12-bit offset test + full GPU/WARP shader suite pass).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 20:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1636#issuecomment-7144047127) Verified head `ba2c202` merged cleanly onto `main` (`ffe310e`) on **Windows 11 / AMD Radeon RX 9060 XT (RDNA4, `gfx1200`) + WARP / Rust 1.98.1 MSVC**: - `cargo test -p victory-shader --lib`: **121 passed, 0 failed, 1 ignored** (new FLAT 12-bit offset test + full GPU/WARP shader suite pass). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠davutsimsekk on GitHub · 2026-11-24 21:12 UTC · original

Thanks, you're right. I kept \

**@⁠davutsimsekk** on GitHub · 2026-11-24 21:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1636#issuecomment-7144628730) Thanks, you're right. I kept \
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1636
No description provided.