docs(debt): record NVIDIA's unswizzled opaque black border under a DST_SEL that moves alpha #23059

Merged
MichonGoddijn231849 merged 1 commit from upstream-pr/23059 into main 2026-11-19 07:00:09 +00:00
MichonGoddijn231849 commented 2026-11-18 17:07:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-11-18T17:07:49Z.


What

A debt entry records how an opaque black border comes back when the T# DST_SEL moves alpha. RDNA2 applies the DST_SEL to the border like a texel. AnyPS5 turns the DST_SEL into the image view's component swizzle without enabling VK_EXT_border_color_swizzle, which Vulkan leaves undefined. AMD's driver happens to swizzle the border like RDNA2. NVIDIA reports borderColorSwizzleFromImage = false and returns the unswizzled (0, 0, 0, 1).

Only docs/dev/debt/changes/docs-nvidia-border-dst-sel.md is added; no code changes. The existing border entries cover BC_SWIZZLE (RequireBorderSwizzle) and image-table S#s, not DST_SEL, and nothing open covers it.

Measurement: tools/hw-oracle on gfx1036 against agc_oracle_runner on both GPUs. A 2x1 texture is point-sampled with image_sample_lz (DMASK 0xf) at x = -0.5 through an S# with CLAMP_BORDER on every axis and each border color type, BC_SWIZZLE 0:

format, DST_SEL border type gfx1036 AMD host NVIDIA host
8_8_8_8_UNORM, W,Z,Y,X 1 (opaque black) (1.0, 0, 0, 0) (1.0, 0, 0, 0) (0, 0, 0, 1.0)
8_8_8_8_UINT, W,Z,Y,X 1 (opaque black) (1, 0, 0, 0) (1, 0, 0, 0) (0, 0, 0, 1)
8_8_8_8_UNORM / UINT, W,Z,Y,X 0, 2 match match match
8_8_8_8_UNORM / UINT, X,Y,Z,W 0, 1, 2 match match match
8_8_8_8_UNORM, X,X,0,1 0, 1, 2 match match match
8_UNORM, X,0,0,1 0, 1, 2 match match match

Integer opaque white reads 1 on all three. (One-channel formats with an X,Y,Z,W DST_SEL differ on both hosts, borders included, because RDNA2 repeats X into the missing channels; #22654 covers that.)

Tested

Windows 11 Pro 10.0.26200; NVIDIA GeForce RTX 5080 (driver 610.74) and AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036, driver 32.0.21045.16010), AnyPS5 at main. Feature bits from vulkaninfo: borderColorSwizzle true on both, borderColorSwizzleFromImage false on NVIDIA and true on AMD. The fragment passes tools/debt_fold.py --check and tools/check_conventions.py. Not tested on a PS5.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 610.74, Windows 11 Pro 10.0.26200; AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036), driver 32.0.21045.16010, Windows 11 Pro 10.0.26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5380547349 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23059). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-11-18T17:07:49Z. --- ### What A debt entry records how an opaque black border comes back when the T# DST_SEL moves alpha. RDNA2 applies the DST_SEL to the border like a texel. AnyPS5 turns the DST_SEL into the image view's component swizzle without enabling VK_EXT_border_color_swizzle, which Vulkan leaves undefined. AMD's driver happens to swizzle the border like RDNA2. NVIDIA reports `borderColorSwizzleFromImage = false` and returns the unswizzled (0, 0, 0, 1). Only `docs/dev/debt/changes/docs-nvidia-border-dst-sel.md` is added; no code changes. The existing border entries cover BC_SWIZZLE (`RequireBorderSwizzle`) and image-table S#s, not DST_SEL, and nothing open covers it. **Measurement:** `tools/hw-oracle` on gfx1036 against `agc_oracle_runner` on both GPUs. A 2x1 texture is point-sampled with `image_sample_lz` (DMASK 0xf) at x = -0.5 through an S# with `CLAMP_BORDER` on every axis and each border color type, BC_SWIZZLE 0: | format, DST_SEL | border type | gfx1036 | AMD host | NVIDIA host | | --- | --- | --- | --- | --- | | 8_8_8_8_UNORM, W,Z,Y,X | 1 (opaque black) | (1.0, 0, 0, 0) | (1.0, 0, 0, 0) | (0, 0, 0, 1.0) | | 8_8_8_8_UINT, W,Z,Y,X | 1 (opaque black) | (1, 0, 0, 0) | (1, 0, 0, 0) | (0, 0, 0, 1) | | 8_8_8_8_UNORM / UINT, W,Z,Y,X | 0, 2 | match | match | match | | 8_8_8_8_UNORM / UINT, X,Y,Z,W | 0, 1, 2 | match | match | match | | 8_8_8_8_UNORM, X,X,0,1 | 0, 1, 2 | match | match | match | | 8_UNORM, X,0,0,1 | 0, 1, 2 | match | match | match | Integer opaque white reads 1 on all three. (One-channel formats with an X,Y,Z,W DST_SEL differ on both hosts, borders included, because RDNA2 repeats X into the missing channels; #22654 covers that.) ### Tested Windows 11 Pro 10.0.26200; NVIDIA GeForce RTX 5080 (driver 610.74) and AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036, driver 32.0.21045.16010), AnyPS5 at `main`. Feature bits from `vulkaninfo`: `borderColorSwizzle` true on both, `borderColorSwizzleFromImage` false on NVIDIA and true on AMD. The fragment passes `tools/debt_fold.py --check` and `tools/check_conventions.py`. Not tested on a PS5. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5080, driver 610.74, Windows 11 Pro 10.0.26200; AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036), driver 32.0.21045.16010, Windows 11 Pro 10.0.26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
boykopovar/AnyPS5!23059
No description provided.