Skip to content

shader: lower BRA.U and HSETP2 with a constant buffer - #774

Merged
PastaLaPate merged 4 commits into
Eglantine-Community:nx2-experimentalfrom
rdenno:fix/bra-u-hsetp2-cbuf
Nov 8, 2026
Merged

PastaLaPate merged 4 commits into
Eglantine-Community:nx2-experimentalfrom
rdenno:fix/bra-u-hsetp2-cbuf

Conversation

@rdenno

@rdenno rdenno commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Shaders using two instruction forms were rejected, causing invisible enemies in HWAoI and sometimes invisible roads in MKW:

  • @!P0 BRA.U: offset mode 1 (.U) only says the predicate is warp-uniform. It was refused as a convergence mode; it now lowers as a plain predicated branch, like mode 0 (the target already masks the mode bits).
  • HSETP2.GT.AND P1, PT, RZ.H0_H0, c[0x7][0xfc].H1_H1, !P1 (opcode 0x634): the constant buffer form of HSETP2, with the B swizzle, abs and neg bits where the register form has them. The value is loaded into a scratch register and the register form emitted.

Type of change

  • Bug fix
  • Game compatibility / game-support
  • Performance
  • New feature
  • Refactor / cleanup
  • CI / build
  • Documentation

Related issues

Testing

  • Tested on Windows
  • Tested on Linux
  • Tested on macOS
  • Tested on NVIDIA
  • Tested on AMD
  • Tested on Intel

Games tested:

Hyrule Warriors enemies are no longer invisible.

Checklist

  • I built it locally and it compiles without new warnings
  • I did not add any copyrighted game data, keys or firmware
  • Docs updated if needed
  • I added AI Disclosure if one was used

Screenshots / logs

Before/After

Assisted By: Claude Opus 5.5

marius851000 and others added 4 commits November 7, 2026 16:40
…ord_invite

[HUMANMADE] Fix discord invite link in docs
Shaders using two instruction forms were rejected, causing invisible enemies in HWAoI and sometimes invisible roads in MKW:

- @!P0 BRA.U: offset mode 1 (.U) only says the predicate is warp-uniform.
  It was refused as a convergence mode; it now lowers as a plain predicated
  branch, like mode 0 (the target already masks the mode bits).
- HSETP2.GT.AND P1, PT, RZ.H0_H0, c[0x7][0xfc].H1_H1, !P1 (opcode 0x634):
  the constant buffer form of HSETP2, with the B swizzle, abs and neg bits
  where the register form has them. The value is loaded into a scratch
  register and the register form emitted.

Assisted-by: Claude Opus 5.5
@github-actions
github-actions Bot changed the base branch from nx2 to nx2-experimental November 8, 2026 13:04
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Retargeted to nx2-experimental for pre-build testing. It will be promoted to nx2 after validation.

@PastaLaPate
PastaLaPate merged commit dc7fd24 into Eglantine-Community:nx2-experimental Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants