AnyPS5/docs/dev/debt
alfalfa-star 1055617751 feat(agc): render layered draws into 3D color targets
A color view of several depth slices of a 3D target (CB_COLOR_VIEW
SLICE_START < SLICE_MAX) was rejected as "color views of several array
slices are unsupported". Titles render such volumes with one draw: an
instanced draw whose vertex stage picks each primitive's slice through
the misc position export (PA_CL_VS_OUT_CNTL USE_VTX_RENDER_TARGET_INDX
with VS_OUT_MISC_VEC_ENA).

Depends on #423, which carries PA_CL_VS_OUT_CNTL to the recompiler.

- DecodeColorBuffer takes the slice range of a 3D target
  (ColorTarget::layers, clamped to the surface's last slice), allows DCC
  on 3D targets, and sizes a tiled 3D target by its whole surface
  (SurfaceForTarget moves to State.cpp for that). DecodeState sets
  State::renderLayers and, for a layered draw, USE_VTX_RENDER_TARGET_INDX
  (State::layerExports); color targets of different slice counts and
  layered draws with a depth target throw.
- The driver adds State::layerExports to the PA_CL_VS_OUT_CNTL bits #423
  passes (it already passes VS_OUT_MISC_VEC_ENA), so the render target
  index reaches gl_Layer only for layered draws and stays ignored
  elsewhere as before.
- A vertex stage writing gl_Layer declares ShaderViewportIndexLayerEXT
  and SPV_EXT_shader_viewport_index_layer when the device offers them
  (the device enables VK_EXT_shader_viewport_index_layer when present),
  instead of SPIR-V 1.5 ShaderLayer, which a Vulkan 1.1 device cannot
  take. Graphics validation accepts the capability, the extension and a
  vertex Layer output when it is enabled, and a per-primitive Layer
  output of a mesh stage.
- The resident target's attachment view is a 2D array view of the
  slices, and the framebuffer has that many layers (Framebuffer and
  AcquireFramebuffer take the layer count).

The execution test agc_driver_layered_volume_draw draws three bands,
one per layer, into slices 1..3 of a 4-slice 64 KiB-tiled volume and
reads every slice back: slice 0 stays untouched and slice 1 + L holds
only band L. It also recompiles a mesh program with the layer export and
validates it against the layered state. The mesh case does not draw:
lavapipe's LLVM backend aborts compiling that mesh pipeline ("Cannot
emit physreg copy instruction"), which a test cannot catch. On RADV the
same mesh draw renders the bands into the right slices.

PPSA14632 (LEGO Horizon Adventures) renders its 64x64x64 RGBA16F
translucency lighting volumes (two DCC targets, 64 instances) this way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:00:04 +04:00
..
libSceAcm.md feat(libSceVideoOut): implement sceVideoOutDeleteVrrActiveStatusEvent 2026-10-12 23:04:58 -04:00
libSceAgc.md docs(debt): record the sceAgcGetGsPrimPayload search and null pointers 2026-10-12 19:46:20 -03:00
libSceAgcDriver.md feat(agc): render layered draws into 3D color targets 2026-10-13 13:00:04 +04:00
libSceAjm.native.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceAmpr.md Merge pull request #4207 from xXPBSXx/fix/ampr-amm-usage-stats 2026-10-12 22:57:04 +02:00
libSceAppContent.md feat(exports): export the calls PPSA01317 imports 2026-10-13 01:11:29 +02:00
libSceAudio3d.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceAudioIn.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceAudioOut.md feat(audioout2): report supported user attributes 2026-10-13 10:24:04 +02:00
libSceAudioPropagation.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceAudiodec.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceAvPlayer.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceBluetoothHid.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceCdlgG2P.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceCdlgPlayerReview.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceCesCs.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceCommonDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceContentDelete.md feat(libSceContentSearch): implement the search calls over an empty library 2026-10-13 00:34:12 +05:30
libSceContentExport.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceContentSearch.md feat(libSceContentSearch): implement the search calls over an empty library 2026-10-13 00:34:12 +05:30
libSceDbgThreadSanitizer.md feat(libSceDbgThreadSanitizer): declare the TSan annotation calls and report the sanitizer disabled 2026-10-13 02:12:05 -04:00
libSceErrorDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceFiber.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceFont.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceGameLiveStreaming.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceGameUpdate.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceHmd.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceHmd2.md fix(exports): export the calls PPSA29866 imports 2026-10-12 21:32:38 +02:00
libSceHttp.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceHttp2.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceIme.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceJobManager.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceJpegEnc.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceJson2.md feat(libSceSaveData): answer sceSaveDataDirNameSearch2 2026-10-12 22:59:26 +02:00
libSceKeyboard.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceLibcInternal.md Merge pull request #4569 from pipe1os/feat/libkernel-fdopendir 2026-10-12 23:00:17 +02:00
libSceLoginDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceMbus.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceMsgDialog.native.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceNet.md fix(libkernel): accept NOTE_EXTEND on a directory watch on Windows 2026-10-12 22:37:31 +02:00
libSceNetCtlApDialog.md feat(libSceNetCtlApDialog): run the offline access-point dialog lifecycle 2026-10-12 20:03:59 +01:00
libSceNgs2.native.md fix(libSceNgs2): reject unverified listener transforms 2026-10-12 23:12:40 +02:00
libSceNpAuth.md feat(exports): export the calls PPSA01317 imports 2026-10-13 01:11:29 +02:00
libSceNpAuthAuthorizedAppDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceNpCommerce.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceNpEntitlementAccess.md docs(debt): cite the source of sceNpEntitlementAccessGetPftFlag 2026-10-13 10:08:30 +02:00
libSceNpManager.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceNpPartner001.md docs(technical-debt): drop stale EAAccess unknown-info line and move the new one off the section end 2026-10-12 18:46:44 +00:00
libSceNpSessionSignaling.md docs(debt): cite ASTRO BOT's call to sceNpSessionSignalingGetConnectionStatus 2026-10-12 22:05:40 +01:00
libSceNpTrophy2.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceNpWebApi2.md feat(exports): export the calls PPSA01317 imports 2026-10-13 01:11:29 +02:00
libSceOpusCeltDec.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceOpusDec.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libScePad.md feat(libScePad): apply the angular velocity deadband 2026-10-12 22:29:57 +01:00
libScePlayGo.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libScePlayerInvitationDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libScePngEnc.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libScePosixForWebKit.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceProprietaryVoiceChatHelperPrx.md feat(libSceProprietaryVoiceChatHelperPrx): implement the voice chat helper lifecycle 2026-10-13 10:34:39 +02:00
libScePsml_debug.md feat(exports): export the calls PPSA01317 imports 2026-10-13 01:11:29 +02:00
libSceRazorCpu.md feat(libSceRazorCpu): implement sceRazorCpuSync 2026-10-12 21:58:39 +02:00
libSceRtc.md fix(rtc): reject date strings ending at the minutes 2026-10-12 19:44:03 +00:00
libSceRudp.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceSaveData.native.md feat(libSceSaveData): implement sceSaveDataGetConvertProgress 2026-10-13 09:48:44 +02:00
libSceSaveDataDialog.native.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceShare.md feat(libSceShare): implement sceShareCaptureVideoClipExtended 2026-10-12 18:46:45 +00:00
libSceSharePlay.md feat(libSceSharePlay): implement sceSharePlayProhibitController 2026-10-12 21:58:43 +02:00
libSceSigninDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceSsl.md feat(exports): export the calls PPSA01317 imports 2026-10-13 01:11:29 +02:00
libSceSystemGesture.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceSystemService.md feat: convert a title's other executables and start them with sceSystemServiceLoadExec 2026-10-13 08:51:50 +01:00
libSceTextToSpeech2.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceUlt.md feat(libSceUlt): accept option parameters in sceUltQueueCreate and sceUltQueueDataResourcePoolCreate 2026-10-12 22:48:53 +02:00
libSceUsbd.md feat(libSceUsbd): pass USB devices and transfers through to the host with libusb 2026-10-12 22:32:42 +02:00
libSceUserService.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceVdecsw.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceVideoOut.md feat(libSceVideoOut): implement sceVideoOutDeleteVrrActiveStatusEvent 2026-10-12 23:04:58 -04:00
libSceVideodec2.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceVoiceChat.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceVoiceQoS.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceVrSetupDialog.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libSceZlib.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
libc.md Merge pull request #4918 from Feuris/feat/libc-mtx-init-with-name 2026-10-13 10:30:43 +02:00
libkernel.md Merge pull request #4960 from fdfawef324/feat/libSceDbgThreadSanitizer 2026-10-13 10:34:04 +02:00
libkernel_sys.md feat(libkernel_sys): implement renameat 2026-10-13 10:19:35 +02:00
libs.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00
relinker.md docs(debt): mention --windows-gui and its lost output on the console entry 2026-10-12 21:02:32 +02:00
shader.md Merge pull request #423 from MichonGoddijn231849/feat/clip-cull-distances 2026-10-13 21:47:43 +13:00
ulobjmgr.md docs(debt): move library entries to one file per library 2026-10-12 20:38:29 +02:00