Skip to content

pvr/g5p: unsupported border colours sample, narrow integer colour targets - #43

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
jeroentrappers:g5p-border-int-targets
Dec 2, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
jeroentrappers:g5p-border-int-targets

Conversation

@jeroentrappers

Copy link
Copy Markdown
Contributor

Two A9 changes:

  • Sample unsupported border colours instead of failing the sampler. The A9 sampler has only a transparent-black border. A custom or other border colour now samples with transparent black (one warning) instead of failing sampler creation, and a custom border colour without a format falls back to R32G32B32A32 UINT/SFLOAT table entries instead of asserting (as the A8 path already does). In the GLES3.1 sample on the 6s, the slice with the border_clamp cases went from 47 crashes to 2.
  • Narrow integer colour targets on by default. 13 integer formats with 8- and 16-bit channels (R8/RG8/RGBA8, R16/RG16/RGBA16, UINT and SINT) rendered correctly on the device behind the format probe, and are now advertised as colour targets.

The second change relies on the Zink fix in #40 ("a batch whose recording failed does not lose the context"): without it, one refused draw in a test process loses the context and turns into hundreds of failures.

Tested on an iPhone 6s (S8003): GLES3.1 sample crashes 48 -> 3 overall; the integer-target formats' fragment_out / fbo cases pass; no regression in the GLES3 and GLES3.1 samples.

…pler

GLES3.1 texture.border_clamp aborted 45 times on the A9:
- The A9's sampler word clamps to a transparent black border only, and
  g5p_pack_sampler() refused a custom border colour, or a standard one
  other than transparent black, so Zink had no sampler. Such a sampler is
  now encoded with the transparent black border (one warning): a wrong
  colour where the border is read. The A8 driver's clamp-to-border is the
  same compromise. YCbCr and reduction modes stay refused.
- Zink creates some custom border colours without a format
  (customBorderColorWithoutFormat is not advertised), and
  pvr_border_color_table_create_custom_entry() asserted on the
  undefined format: packed as 32-bit RGBA of the colour's type instead,
  as our A8 driver does.

On an iPhone 6s (S8003), the GLES3.1 sample's 801-1600 slice: 47
crashes -> 2 (both image_load_store.3d), 410 -> 446 passes.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
R8, RG8, R16, RG16, RGBA8 and RGBA16 UINT/SINT and A2B10G10R10_UINT were
render probes, not advertised as colour attachments because they had not
run on the device. GLES 3.0 requires them renderable, and copy_image
renders into them.

Run on an iPhone 6s (S8003) with the probe rows on, against the same
build without them, the iPhone 6's GLES3 / GLES3.1 sample lists:
- GLES3.1: +175 passes (copy_image 640 -> 813), no new crash.
- GLES3: 30 Skip -> Pass, 11 Fail -> Pass; 40 Skip -> Fail, spread over
  every one of these formats alike, in fragment_out.array and fbo.blit
  conversions (multi-target sets G5P refuses, blits), not in a format.
  The 21 Pass -> Fail of that run all pass alone: the process had
  aborted before them (fixed by "zink: end a command buffer once").
- No GPU reset in either run.

Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
@henrikklee
henrikklee merged commit fd582bc into OrchardLinux:main Dec 2, 2026
1 check passed
henrikklee added a commit to ricktav/mesa that referenced this pull request Dec 2, 2026
Brings the A7 desktop branch up to date with jeroentrappers' A8/A9 fixes
(OrchardLinux#34-OrchardLinux#43), including OrchardLinux#40's Zink behaviour (a batch whose recording failed is
dropped without losing the context).

pvr_arch_g5p_gfx.c: both sides added helpers before
g5p_clear_attachments(): the A7's g5p_a7_clear_dirty() and main's
g5p_attachment_format()/g5p_render_extent() for secondaries. Both are kept;
the A7's clear quad now uses the render extent main computes.

pvr_arch_cmd_buffer.c: main skips Rogue's transparent object on every
apple_g5p device because it hangs the A9. The A7 also sets apple_g5p but
draws through upstream's Rogue path, so it keeps the transparent object as
before this merge; the A8 and A9 skip it as on main.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
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