Skip to content

fix(shader): preserve interpolation instruction operands - #142

Merged
boykopovar merged 2 commits into
boykopovar:mainfrom
SamG-Coder:codex/shader-interpolation-operands
Oct 1, 2026
Merged

boykopovar merged 2 commits into
boykopovar:mainfrom
SamG-Coder:codex/shader-interpolation-operands

Conversation

@SamG-Coder

@SamG-Coder SamG-Coder commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Preserve the actual source operands and intermediate destination of V_INTERP_P1_F32 / V_INTERP_P2_F32 when fragment barycentrics are enabled. This permits mixed perspective/linear I/J pairs on the same parameter and preserves copied coordinates, modified coordinates, and arithmetic on the partial result.

Rebased onto upstream c7fb257. Former dependencies #113 and #136, and parameter-slot fix #137, are now upstream. Retains upstream rejection of unsupported interpolated pass-through inputs. Slot tests now verify the per-vertex declarations used by explicit interpolation. Devices without enabled fragment barycentrics retain the existing direct-attribute path and its limitations.

Tested

Windows / RTX 5080, c329ad2:

  • Full build and packaged libraries passed; 88/88 CTest tests passed.
  • 37/37 converted original PS5-targeted demos passed, 74 frames, 16,576 interior pixel comparisons, maximum channel error 1/255.
  • Perspective/linear center and centroid modes, all mixed-pair combinations, copied I/J with originals overwritten, modified J, and modified P1 results passed.
  • Both deliberately incorrect I/J-pair mutations were rejected, with 39/255 channel error.

No physical-console, multisample-centroid, complete-application, clean-exit or performance claim. Processes are stopped after capture. The earlier original-program symbolic analysis was not repeated for this rebase. Demos, captures and reports remain outside Git.

Checklist

  • Based on current upstream main; merged dependencies removed
  • One implementation topic; unsupported paths retain strict validation
  • No new code comments, third-party code, investigation documents, images or original application assets
  • Generic behavior
  • Depends on: none
  • AI-assisted: yes

@STL1te STL1te mentioned this pull request Sep 29, 2026
5 of 9 tasks
@github-actions github-actions Bot added build shader core/shader agc libSceAgc* needs rebase Conflicts with main, rebase needed labels Sep 29, 2026
oneandonlydean added a commit to oneandonlydean/AnyPS5 that referenced this pull request Sep 30, 2026
…nterpolation

With fragment barycentrics enabled (PR boykopovar#142, now forwarded from the device),
v_interp_p1/p2 compute P0 + I*P10 + J*P20 from the slot's vertices, so the
slot tests' interpolated inputs are declared per vertex and pass-through
vertices interpolate exactly. The Vulkan-interpolated fallback keeps its
checks with barycentrics disabled.
@SamG-Coder
SamG-Coder force-pushed the codex/shader-interpolation-operands branch from 31fec29 to c329ad2 Compare October 1, 2026 10:19
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 1, 2026
@boykopovar
boykopovar merged commit cfb1d76 into boykopovar:main Oct 1, 2026
3 checks passed
oneandonlydean added a commit to oneandonlydean/AnyPS5 that referenced this pull request Oct 1, 2026
…opovar#208 test layout, our merged PRs) into astrobot

Conflicts resolved:
- Driver.cpp: upstream split it into Execution/src/Driver/*; astrobot's
  driver changes are ported into the split files (flip throttle
  APS5_MAX_QUEUED_FLIPS, dispatch tolerance, NoteProgram, metadata-pass
  switch and DB HTILE blits, depth state in the draw register key, HTILE
  fill clears, wait outcome counters, opt-in deferred EOP interrupts).
  boykopovar#192's KnownDrawRejection is taken.
- Our merged PRs take upstream's reviewed versions: boykopovar#124 shader fusion,
  boykopovar#128 videoout open param, boykopovar#132 CB metadata passes, boykopovar#138 EOP events,
  boykopovar#176 GE_INDX_OFFSET, boykopovar#136/boykopovar#137 pixel inputs and NoPerspective by I/J
  pair, boykopovar#133 mesh tests. boykopovar#142's interpolation validation is upstream's.
- Depth: astrobot's DepthTarget model stays; upstream's DepthSurface
  module is dropped again, boykopovar#188's 16-bit depth-bit reads are kept on top.
- Videodec2: upstream's ffmpeg-core version (boykopovar#42 rework); 3rdparty/FFmpeg
  stays for libSceAvPlayer only.
- Tests follow boykopovar#208's layout (add_test_executable, build/tests); the
  AvPlayer, GDS and wave tests are defined the same way.
- Shader disk cache format 5 and request serialization version 7 cover
  both sides' fields.
- Duplicates the auto-merge produced (state decoders, RequestInputInfo,
  structurizer helpers, image offsets, opcode enum, tests) are removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants