Skip to content

Layered rendering: a draw into all slices of a 3D color target aborts with "color views of several array slices are unsupported" #2102

Closed

Description

@johnmaia

Title: Disney Epic Mickey: Rebrushed (PPSA15657 v01.000.000, retail, UE4).
Build: main f145139 + #1836 #1940 #1893 #1904 #1934 #1837 (with a padding fix) #2101 #1902 #1928, Linux, RX 7600 (RADV).

Before its first frame, the title fills a whole 3D render target in one draw, with each slice written by its own primitives. The draw fails in DecodeColorBuffer:

[gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
[videoout] presentation failed: AGC graphics: color views of several array slices are unsupported

What the draw binds (logged locally at the throw)

CB_COLOR_VIEW   = 0x00060000   slices 0..48, mip 0
CB_COLOR_INFO   = 0x10040730   format 12 (16_16_16_16), number 7 (float), DCC_ENABLE (bit 28)
CB_COLOR_ATTRIB2= 0x000bc02f   48 x 48, MAX_MIP 0
CB_COLOR_ATTRIB3= 0x4ec6c02f   RESOURCE_TYPE 2 (3D), depth 48
PA_CL_VS_OUT_CNTL = 0x01240000 USE_VTX_RENDER_TARGET_INDX (bit 18), VS_OUT_MISC_VEC_ENA, VS_OUT_MISC_SIDE_BUS_ENA

It is a rect-list draw: the null pixel program is prepared at draw (#1902) and its rectangle at draw (#1928). So this is UE4's "rasterize into a volume texture" pattern: an RGBA16F 48³ volume, one instance per slice, and the vertex stage choosing the slice through the render target index export.

What is missing

  1. DecodeColorBuffer accepts one slice per view. A slice range needs a multi-layer attachment view (the volume path already makes 2D-array-compatible views of one slice in StorageTexture::AttachmentView) and a framebuffer or rendering layer count.
  2. The render target index export is ignored. It would have to reach gl_Layer from the last pre-rasterization stage. For a rect-list draw that is the tessellation evaluation stage, so the value has to pass through the rect-list stages (shaderOutputLayer).
  3. Right behind this: the target has DCC enabled, and 3D targets with DCC are refused (mipmapped or DCC 3D color targets are unsupported).

I'm looking into this for the title and will post here before writing anything, in case someone already has layered rendering in progress.

Investigated and written by Claude (AI assistant) on a contributor's machine; the register print was local only.

Activity

  1. EdouardSence commented on Oct 9, 2026

    @EdouardSence
    Contributor

    Ratchet & Clank: Rift Apart (PPSA01474) also stops here, about 25 s in, on Linux with an RX 9070 XT (RADV):

    AGC graphics: color views of several array slices are unsupported
    

    Base: main 43972e6 + #1673, #1339, #1836, #1837, #1893, #2105, #2184, #2226, #2219, #1902, #1928.

    I tried #1077, which renders layered draws into 3D color targets, but it no longer merges into current main: it conflicts in libSceAgcDriver/CMakeLists.txt, VulkanDevice.cpp, Context.hpp and ShaderValidation.cpp. So I haven't checked whether this title's target is 3D or a 2D array.

    Tested and written by Claude (AI assistant) on a contributor's machine.

  2. tv7 commented on Oct 9, 2026

    @tv7
    Contributor

    Silent Hill: Townfall (PPSA33286 v02.003.000, UE) also stops here, at its first presentation. Windows 11, MinGW, RTX 3070.

    [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
    [videoout] presentation failed: AGC graphics: color views of several array slices are unsupported
    

    Same PA_CL_VS_OUT_CNTL as Epic Mickey above. Before it, the title creates its 3840x2160 render targets.

    On main d70b899 it took these, in this order, to get here; each one cleared the stop before it:

    1. fix(agc): defer shaders that cannot be prepared at registration to their first use #1836: s_swappc_b64 call target at pc 0x74 (105 shaders deferred at registration).
    2. fix(agc): skip registration-time preparation for unsupported shader types #1893: registered shader type 8.
    3. VOP1 SDWA destination selector 4 (unused 2, source selector 3) of opcode 0x50, i.e. v_cvt_f16_u16_sdwa ... dst_sel:WORD_0 dst_unused:UNUSED_PRESERVE src0_sel:BYTE_3. No open PR covers it. Locally I allowed byte source selects for VCvtF16U16 in vop1SdwaRules, the same kind of change as fix(recompiler): accept SDWA destination selects on v_not_b32 #2200 for v_not_b32.
    4. feat(agc): DMA_DATA prefetches to DST_SEL nowhere #1709: DMA_DATA prefetch destination.
    5. CouchRiv's bd5f22c9 from Sampled image heap of 16 rejects a retail shader before the metadata limit #1789: shader image heap capacity exceeded.
    6. feat(agc): implement deferred faults for reads through null SRT pointers #759: compute shader read through a null SRT (guest memory is not readable at 0x58).
    7. fix(agc): accept bound copies of a registered shader header that differ only in user_data #1837: rectangle ABI refers to a replaced shader header.
    8. fix(agc): reuse a host import only while it covers its region #2101: guest buffer view exceeds its GPU owner.

    Also on the branch, for another title and not needed here: #1339 and three placeholder imports. As noted above, #1077 conflicts with current main in four files, so I haven't tried it.

  3. AlxcBTW commented on Oct 10, 2026

    @AlxcBTW
    Contributor

    Taxi Chaos 2 (PPSA30279 v01.007.000, Unreal Engine) also stops here at its first menu frame, with the same warning:

    [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
    AGC graphics: color views of several array slices are unsupported
    

    The local build that reached this point has #2054, #425 and a local workaround for #1409. Windows 11 26200, Radeon 880M (ANYPS5_GPU=AMD). Dump from my own copy; no game files are shared.

    AI-assisted: yes

  4. AlxcBTW commented on Oct 11, 2026

    @AlxcBTW
    Contributor

    Two more titles stop here:

    For Sword of the Sea, a local port of #1077 together with #423's layer and viewport index exports gets past this stop, and the main menu renders correctly. The port sits on an older base and has conflicts with current main, so it is evidence for #1077's approach, not a branch to merge.

    AI-assisted: yes (Claude Code)

  5. Tamalero commented on Oct 11, 2026

    @Tamalero
    Contributor

    High on Life (PPSA15388 v01.120.000, UE4) also stops here, on its first run. It plays the publisher logos, the content warning and the Squanch Games logo, then its loading screen (the small ship on a star map) runs until frame 1728, about 90 s in, and the title aborts:

    [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
    AGC graphics: color views of several array slices are unsupported
    

    It has the same PA_CL_VS_OUT_CNTL as the other titles here. Linux (CachyOS), RTX 4090, NVIDIA 615.78, Release, relinked with --to-intel; main f5c0fe00 plus #757, #758 and local fixes that aren't on this path (#3334, #3335, #3336). I'll try #1077 with #423, as @AlxcBTW did for Sword of the Sea, and report back.

    Tested and written by Claude (AI assistant) on a contributor's machine.

  6. Tamalero commented on Oct 11, 2026

    @Tamalero
    Contributor

    Following up on High on Life: #423 with #1077 ported onto the same tree gets it past this stop. The layered draw no longer throws, and the next stop is a compute shader writing a depth surface as a storage image, which is #1409:

    compute shader 0x20313a0000: AGC graphics: storage image access to depth/stencil surface 0x20af9a0000 is not implemented
    
    Port notes

    Tested and written by Claude (AI assistant) on a contributor's machine.

  7. alfalfa-star commented on Oct 11, 2026

    @alfalfa-star
    Contributor

    LEGO Horizon Adventures (PPSA14632) hits this on current main (90c152e). After #3279 it no longer stops at the ancillary shader, and it aborts after about 35 s on its 64x64x64 RGBA16F lighting volumes. #1077 is now rebased onto that main, with #423 squashed in, and LEGO gets past this stop with it, next stopping at #1409.

    @AlxcBTW @xXPBSXx @Rohan03x @MisterbALLIN: if you want to try Minecraft Dungeons II, Sword of the Sea, Palworld or Kena on it, the head is 5e14fe0d on alfalfa-star:feat/agc-layered-volume-targets.

    AI-assisted: yes (Claude Code)

  8. AlxcBTW commented on Oct 11, 2026

    @AlxcBTW
    Contributor

    @alfalfa-star I tried 5e14fe0 on Windows with an RTX 5070, where AnyPS5 builds graphics pipeline libraries. agc_driver_layered_volume_draw fails there:

    vertex draw: slice 1 texel (16, 0) channel 0 is 255, expected 64 (another layer's band)
    

    On that path Pipeline::Begin starts dynamic rendering with layerCount = 1, so every layer lands in the color view's first slice. No error is raised, the picture is just wrong.

    Commit bdd55e0 on AlxcBTW/AnyPS5 fix/layered-dynamic-rendering-layers-2 sits on top of your head, so you can cherry-pick it:

    • Framebuffer keeps its layer count and Begin passes it as VkRenderingInfo::layerCount. The maxFramebufferLayers check now covers both paths.
    • The mesh case in the layered test validates with the device's subgroup size (32 on NVIDIA) instead of 64.
    • agc_vertex_layer_export copies the extension names. They pointed into a destroyed RecompileResult.
    • agc_driver_vertex_clip_cull_draw shuts the driver down before returning. Without that it hung at exit on Windows.

    With it, the five layered and clip/cull tests and 296 other agc tests pass on NVIDIA. Only agc_driver_depth_compare_copy skipped, because it opened no device.

    AI-assisted: yes (Claude Code)

  9. queeeef commented on Oct 11, 2026

    @queeeef
    Contributor

    Palworld (PPSA23126, 01.102.999, Unreal Engine) needs both #3633 and #1077 here, one after the other:

    1. color views of several array slices are unsupported: fix(agc): render a color view of several array slices into its first slice #3633 gets past it.
    2. mipmapped or DCC 3D color targets are unsupported. Register values (local diagnostic): slot 0, a 48x48x48 volume with DCC on, maxMip 0, view slices 0-48, format 12 number 7, CB_COLOR_INFO 0x10040730, ATTRIB2 0x000bc02f, ATTRIB3 0x4ec6c02f, CB_COLOR_VIEW 0x00060000, PA_CL_VS_OUT_CNTL 0x01240000 (render target index export on). A layered draw into a DCC volume; feat(agc): render layered draws into 3D color targets #1077 drops the DCC part of the check and gets past it.

    #3633 and #1077 conflict in DecodeColorBuffer, as both rewrite the slice checks. I resolved it with #1077's volume branch and #3633's 2D-array branch, keeping lastSlice >= slice (merge commit ab6e3a3d); the tests/Graphics.cpp conflict is resolved the same way but not built. With both, the next stop is #1409.

    Note on #1077: [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000) is still printed, because bit 24 is outside layerExports, although the layered draw is routed.

    Windows 11 Pro 26300, RTX 2080 Ti, MinGW-w64 GCC 15.2.0 (WinLibs r7), RelWithDebInfo, main a11c8f7f7. Full list in #2648. AI-assisted (Claude Code).

  10. oneandonlydean commented on Oct 14, 2026

    @oneandonlydean
    Collaborator

    Closing: layered draws into a 3D color target render on main since #3763, and #3633 covers array views; the error in the title is gone. If a title still stops on a layered draw on current main, comment here with the message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions