Repository navigation
feat(agc): centroid pixel inputs and NoPerspective by I/J pair - #136
Merged
boykopovar merged 1 commit intoOct 1, 2026
Merged
Conversation
9 tasks done
6 tasks done
oneandonlydean
force-pushed
the
feat/pixel-input-vgpr-layout
branch
from
September 29, 2026 21:59
d5eded2 to
858cdea
Compare
oneandonlydean
force-pushed
the
feat/pixel-input-vgpr-layout
branch
from
September 30, 2026 11:00
858cdea to
b49a1e9
Compare
9 tasks done
oneandonlydean
force-pushed
the
feat/pixel-input-vgpr-layout
branch
from
September 30, 2026 11:12
b49a1e9 to
710f784
Compare
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Sep 30, 2026
…, boykopovar#129) into astrobot Conflicts resolved: - Shader disk cache (boykopovar#129 as merged upstream): upstream's version, plus astrobot's imageDepthCompare and waveLayout fields (format 3). - Shader fusion: upstream's fd4700b replaces astrobot's boykopovar#124 version. - -KRzWekV120: upstream's export replaces astrobot's; its test now calls sceAgcUnknown__MKRzWekV120. - Misaligned buffer views: upstream's push-constant adjustment (3dec6ce) replaces astrobot's view aliases; GuestBufferMemory is the rebased boykopovar#121 version (write watch on shared direct memory). - DirectMemory: rebased boykopovar#121 (re-register after the shared-backing remap, aliased pages leave the watch) plus boykopovar#164's per-piece unmap. - Depth: astrobot's DepthTarget model is kept for attachments; upstream's DepthSurface module is dropped (it would duplicate it). Upstream's mip-chain colour targets, CB_COLOR_VIEW MIP_LEVEL at bits 26-29 and export formats are taken into DecodeColorBuffer. - GPU-selected V#s: upstream's gpuDescriptor replaces astrobot's opt-in runtimeDescriptor; image_bvh_intersect_ray is upstream's. - Occlusion counter dumps: upstream's Vulkan occlusion queries replace astrobot's always-visible PIXEL_PIPE_STAT dump. - AudioOut2 DualSense ports: rebased boykopovar#180 on upstream's 16-bit ports. - Pixel stage decode: rebased boykopovar#136; mesh push constants: rebased boykopovar#133. - Label waits (boykopovar#178): noteHeldAtSubmit moved into reserveOutputs.
SPI_PS_INPUT_ENA/ADDR with PERSP_CENTROID (bit 2) or LINEAR_CENTROID (bit 6) was rejected; PPSA21564 binds 0x326 (perspective center and centroid, linear center, POS_X/Y). The PS input VGPR layout now follows the hardware rule: SPI_PS_INPUT_ADDR places every input it names in SPI order (two VGPRs per I/J pair, three for the pull model, one otherwise), loaded or not, and ENA & ADDR selects the loaded ones. ShaderPixelStageInfo carries inputAddr (replacing perspectiveCenterVgpr) plus perspectiveCentroid and linearCentroid; the recompiler places each loaded input with PixelInputVgpr. This also fixes the system inputs, which were always written from v0 (psSystemInputBase was never set), so POS_X overwrote the center I in any draw with barycentrics enabled. Draws are rasterized single-sampled, where the centroid is the pixel center: with fragment barycentrics the centroid pairs carry the center barycentrics (BaryCoordKHR for perspective; the linear center and centroid pairs now get BaryCoordNoPerspKHR). NoPerspective was decided for every parameter by one flag (LINEAR_CENTER loaded). v_interp_p2 now records whether it reads the J of a linear or a perspective pair, and a parameter is NoPerspective when it is read through a linear pair; parameters read through neither keep the old rule. A parameter read through both kinds of pair throws. Only pixel stages consult this. The request serializer moves to version 5 (older requests read back with their loaded inputs as the layout); the cache key and the driver's draw key compare and hash the new fields. The unsupported-input error names ENA and ADDR.
oneandonlydean
force-pushed
the
feat/pixel-input-vgpr-layout
branch
from
September 30, 2026 19:48
710f784 to
cb66ec2
Compare
8 of 9 tasks
Collaborator
Author
|
On the overlap note: the shared part with #167 is the pixel system input base. On main If #167 merges first, I'll rebase this PR onto it straight away. #137 is stacked on this one and only shows the overlap through this commit. |
pidsmandaks-ux
added a commit
to pidsmandaks-ux/AnyPS5
that referenced
this pull request
Oct 1, 2026
Import generic pixel-input compatibility fixes from upstream PRs boykopovar#136 and boykopovar#137.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DecodePixelStageInforejectedSPI_PS_INPUT_ENA/ADDRwith PERSP_CENTROID (bit 2) or LINEAR_CENTROID (bit 6). PPSA21564 binds 0x326 (perspective center and centroid, linear center, POS_X/Y). Both bits are now accepted.SPI_PS_INPUT_ADDRplaces every input it names in SPI order (2 VGPRs per I/J pair, 3 for the pull model, 1 otherwise), loaded or not, and ENA & ADDR selects the loaded ones.ShaderPixelStageInfocarriesinputAddr(replacingperspectiveCenterVgpr) plusperspectiveCentroidandlinearCentroid.PixelInputVgpr(inputAddr, input).psSystemInputBasewas never set, so POS_X overwrote the center I whenever barycentrics were enabled.BaryCoordKHRfor perspective,BaryCoordNoPerspKHRfor the linear center and centroid pairs.psNoPerspectiveflag). Now:v_interp_p2records, per parameter, whether its J operand is the J of a loaded linear pair or a perspective pair (IrProgramMetadata::pixelLinearInputs/pixelPerspectiveInputs).RequestSerializermoves to version 5 (main is at 4 since feat(shader): translate NGG geometry programs to mesh shaders #133 addedMeshConfiguration::esgsItemSize). The new pixel fields are gated on>= 5, and requests before version 5 read back with their loaded inputs as the layout. The recompile cache key and the driver's draw key compare and hash the new fields.The TechnicalDebt entry about skipped barycentrics is unchanged. This PR does not change how
fragmentShaderBarycentricEnabledreaches the recompiler.No overlap with #101 or #83: both touch
TranslationContext.hppnext to the image op declarations, and this PR addsSetPixelInputand a member elsewhere in the class.Tested
agc_shader_memorygainsverifyPixelInputs:PixelInputVgprlayouts (0x326, and ADDR-only inputs reserving VGPRs),inputAddrand the centroid flags survive serialization and change the cache key and the context hash.agc_driver_graphics_testsPixelInputLayoutTests:On main, 0x326 is rejected.
main.ctest: 79/79 pass;agc_driver_graphics_testsandagc_shader_memory_testspass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository