shader: support DS_READ_U16_D16_HI #356

Manually merged
github merged 1 commit from gh-pr/356/head into gh-pr/356/base 2026-11-26 09:17:28 +00:00
Owner

@⁠Techx3 on GitHub · 2026-08-28 21:38 UTC · original
Techx3:techx3/ds-read-u16-d16-hi → main · +45 −3 · 5 files · 1 commits · merged 2026-08-29 06:39 UTC

Summary

  • decode the GFX10 DS opcode 0xa7 as DS_READ_U16_D16_HI
  • lower it through the existing unsigned 16-bit shared-memory read
  • model the destination as a high-half partial VGPR write, preserving bits 15:0
  • add captured-instruction decode coverage and a runtime regression

Rationale

The ISA defines _d16_hi reads as updating only the high 16 bits of the destination VGPR while preserving the low half. Previously this captured opcode was rejected by the decoder.

The implementation reuses the established partial-destination representation already used by DS_READ_U16_D16, selecting the high half instead of introducing a parallel memory path.

Validation

  • Release build: kyty_emulator
  • CTest shader_cfg: passed
  • CTest shader_recompiler_compute: passed
  • runtime assertion: reading 0xcdef into the high half of 0x12345678 produces 0xcdef5678

Scope

This PR intentionally contains only DS_READ_U16_D16_HI support. Other shader changes from the experimental branch are being reviewed separately.

**@⁠Techx3** on GitHub · 2026-08-28 21:38 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/356) `Techx3:techx3/ds-read-u16-d16-hi` → `main` · +45 −3 · 5 files · 1 commits · merged 2026-08-29 06:39 UTC ## Summary - decode the GFX10 DS opcode 0xa7 as DS_READ_U16_D16_HI - lower it through the existing unsigned 16-bit shared-memory read - model the destination as a high-half partial VGPR write, preserving bits 15:0 - add captured-instruction decode coverage and a runtime regression ## Rationale The ISA defines _d16_hi reads as updating only the high 16 bits of the destination VGPR while preserving the low half. Previously this captured opcode was rejected by the decoder. The implementation reuses the established partial-destination representation already used by DS_READ_U16_D16, selecting the high half instead of introducing a parallel memory path. ## Validation - Release build: kyty_emulator - CTest shader_cfg: passed - CTest shader_recompiler_compute: passed - runtime assertion: reading 0xcdef into the high half of 0x12345678 produces 0xcdef5678 ## Scope This PR intentionally contains only DS_READ_U16_D16_HI support. Other shader changes from the experimental branch are being reviewed separately.
Decode the high-half D16 LDS read and route it through the existing unsigned-short load lowering. Represent the destination as a high-half partial write so the low 16 bits of the VGPR remain intact. Add captured-instruction decode coverage and a Vulkan execution regression that verifies the preserved half.

Co-authored-by: SueryRD <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:17:27 +00:00
github manually merged commit 30f83a88ad into gh-pr/356/base 2026-11-26 09:17:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.