shader, gpu: type pixel outputs by integer render target formats #348

Closed
github-bot wants to merge 1 commit from gh-pr/346/head into gh-pr/346/base
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 13:27 UTC · original
AnastasisKon:vibe/target-comps-8b06a2 → main · +174 −29 · 22 files · 1 commits · closed without merging

The converter checks a pixel output's type against its color attachment, so a pipeline rendering to an R32Uint target refuses a float4 output and its draws drop (179 refused pipelines of one run, tester report #313; 179 and 135 in #280 and #265). The console's exports are raw dwords either way, so Options::target_comps (per SV_Target index: 5 u32, 4 i32) now retypes the signature elements in Lower::new, and the stores to them emit as storeOutput.i32. Described pipelines whose color formats are integer ones get their pixel shader translated with those comps (Shader::native_targets_shader, glue::make_host_pipe; the disk cache keys on the options as on any other variant), falling back to the plain translation - refused at conversion as before - when the container cannot be read back. Test: an_integer_render_target_types_its_output_u32 (victory-shader 356 pass). Documented in docs/native-host.md.

What this changes

How it was tested

  • cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings
  • Ran the game (say how far it got), or not needed

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md
  • New diagnostics are behind a VICTORY_* variable and documented
**@⁠AnastasisKon** on GitHub · 2026-11-27 13:27 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/346) `AnastasisKon:vibe/target-comps-8b06a2` → `main` · +174 −29 · 22 files · 1 commits · closed without merging The converter checks a pixel output's type against its color attachment, so a pipeline rendering to an R32Uint target refuses a float4 output and its draws drop (179 refused pipelines of one run, tester report #313; 179 and 135 in #280 and #265). The console's exports are raw dwords either way, so Options::target_comps (per SV_Target index: 5 u32, 4 i32) now retypes the signature elements in Lower::new, and the stores to them emit as storeOutput.i32. Described pipelines whose color formats are integer ones get their pixel shader translated with those comps (Shader::native_targets_shader, glue::make_host_pipe; the disk cache keys on the options as on any other variant), falling back to the plain translation - refused at conversion as before - when the container cannot be read back. Test: an_integer_render_target_types_its_output_u32 (victory-shader 356 pass). Documented in docs/native-host.md. ## What this changes <!-- One change per pull request. Name the issue you claimed for it: Refs #123 (or Closes #123). --> ## How it was tested - [ ] `cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory` - [ ] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` - [ ] Ran the game (say how far it got), or not needed ## Checklist - [ ] No game files, game code, disassembly listings or SDK files are included - [ ] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md - [ ] New diagnostics are behind a `VICTORY_*` variable and documented
The converter checks a pixel output's type against its color
attachment, so a pipeline rendering to an R32Uint target refuses a
float4 output and its draws drop (179 refused pipelines of one run,
tester report #313; 179 and 135 in #280 and #265). The console's
exports are raw dwords either way, so Options::target_comps (per
SV_Target index: 5 u32, 4 i32) now retypes the signature elements in
Lower::new, and the stores to them emit as storeOutput.i32.
Described pipelines whose color formats are integer ones get their
pixel shader translated with those comps (Shader::native_targets_shader,
glue::make_host_pipe; the disk cache keys on the options as on any
other variant), falling back to the plain translation - refused at
conversion as before - when the container cannot be read back.
Test: an_integer_render_target_types_its_output_u32 (victory-shader
356 pass). Documented in docs/native-host.md.

Co-authored-by: AnastasisKon <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:38:58 +00:00
github-bot closed this pull request 2026-11-27 13:38:58 +00:00
github-bot referenced this pull request from a commit 2026-11-27 16:23:10 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.