Skip to content

pvr/g5p: float colour targets, vertex SSBO banks, 3D slice views, DS aspects - #41

Merged
henrikklee merged 4 commits into
OrchardLinux:mainfrom
jeroentrappers:g5p-formats-misc
Dec 2, 2026
Merged

henrikklee merged 4 commits into
OrchardLinux:mainfrom
jeroentrappers:g5p-formats-misc

Conversation

@jeroentrappers

Copy link
Copy Markdown
Contributor

Four smaller A9 fixes:

  • 32-bit float colour targets through the raw pass. R32/RG32/RGBA32 SFLOAT were not colour targets; the raw pass already stores 32-bit integer targets' words unconverted, and a float target's words are the same bits: stored with the matching UINT PBE key, advertised without blending. The A8 keeps its own R32F float pass.
  • Vertex SSBO stores move a bank-0 offset or value to bank 1 (the form is witnessed all-bank-1), with the move a storage-buffer load already uses.
  • A 2D view of a 3D image's slices keeps its own slice count on G5P: the upstream override to the whole depth made every draw into a 3D slice a refused "layered" render (Zink's blit for glCopyImageSubData).
  • One aspect of a combined depth/stencil image takes that aspect's texel size in pvr_setup_transfer_surface() (it divided the aspect's row pitch by the combined format's texel and asserted).

Tested on an iPhone 6s (S8003): GLES3 +25 / Vulkan +16 newly runnable float-target cases pass, 22 / 22 Vulkan vertex-SSBO cases, GLES3.1 3D copy_image +108, GLES3 texture.shadow 15 crashes -> 44 / 44.

… texel size

Zink uploads a GL DEPTH24_STENCIL8 texture (D32_SFLOAT_S8_UINT on G5P)
one aspect at a time. pvr_setup_transfer_surface() divided the aspect's
row pitch by the combined format's 8-byte texel and asserted (the depth
plane of a one-texel-wide level has a 4-byte pitch). Take the aspect's
texel size for a single-aspect transfer of a combined format; the G5P
CPU transfer already copies into the ZLS planes.

On an iPhone 6s (S8003): the 44 GLES3 texture.shadow cases of the
sample's 1801-2700 slice go from 15 crashes to 44 passes.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
pvr_arch_image.c set the layer count of every 2D or 2D-array view of a
3D image to the image's whole depth. G5P renders a one-slice view as a
one-layer target and refuses a view of more layers (g5p_job_init()), so
every draw into a 3D slice was dropped: Zink blits glCopyImageSubData
between formats by drawing into a 2D view of the destination slice, and
those copies kept the slice's old contents.

On G5P the view keeps its own count; the whole depth stays in Rogue's
texture words (info.array_size), unchanged for everything else.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
The vertex SSBO store form is witnessed with every register in vertex
bank 1, so a store whose byte offset or value lived in bank 0 was
refused ("no witnessed mixed-bank form"). Move such an operand to
bank 1 first with the move a storage-buffer load already uses for its
offset (vs_bank1_index()).

On an iPhone 6s (S8003): the 22 Vulkan CTS cases of the sample refused
for this pass.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
R32_SFLOAT, R32G32_SFLOAT and R32G32B32A32_SFLOAT were not colour
targets on the A9. The raw pass already stores 32-bit integer targets'
words unconverted; a float target's words are the same bits. Render
them as raw targets, stored with the matching UINT format's PBE key,
and advertise them as colour attachments without blending. The A8
keeps its own R32F float pass.

On an iPhone 6s (S8003): 3 more Vulkan CTS cases (use_after_copy with
an RGBA32F pass, an RG32F blit source) and 3 GLES3/3.1 cases (an R32F
renderbuffer, float derivative FBOs) pass; no regression in the 269
float-target cases run.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
@henrikklee
henrikklee merged commit 0fe1234 into OrchardLinux:main Dec 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants