Repository navigation
st/mesa, zink: RG16 copies, sample-count minimums, failed batches - #40
Merged
Merged
Conversation
glCopyImageSubData between formats blits through canonical formats, and
two-channel 16-bit data takes R16G16_UNORM (for G16R16's sake). A GLES
driver need not render or sample R16G16_UNORM: it is not a core GLES
format. Without it util_blitter refuses the blit ("ZINK: blit
unsupported") and every copy into an RG16UI, RG16I or RG16F image is
lost. Copy R16G16 as R16G16_UINT then, which is bit-exact.
On an iPhone 6s (Zink on the PowerVR G5P driver): the 51 GLES3.1
copy_image cases of the sample with an RG16 destination pass (5 before);
the sample's other 769 non-3D copy_image cases are unchanged.
Generated-by: LLM
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
get_max_samples_for_formats() counts sample counts from 2, so a driver without multisampled integer formats, or without multisample textures of colour or depth formats, reported GL_MAX_INTEGER_SAMPLES, GL_MAX_COLOR_TEXTURE_SAMPLES or GL_MAX_DEPTH_TEXTURE_SAMPLES as 0. GL's minimum for each is 1 (single-sampled formats count), and ES 3.1 queries each format against it. Report 1 when the driver has multisampling at all. On an iPhone 6s (Zink on the PowerVR G5P driver): 12 more GLES3.1 cases of the sample pass (state_query.internal_format samples, sample_variables). Generated-by: LLM Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
submit_queue() ended each batch's command buffer inside VRAM_ALLOC_LOOP, which calls vkEndCommandBuffer() again after VK_ERROR_OUT_OF_DEVICE_MEMORY. That error is the recording's own (a draw whose pipeline the driver could not create), so the command buffer is already invalid, and ending it again is invalid usage: the Vulkan runtime asserts in vk_command_buffer_end(). Call it once and keep the error handling. On the iPhone 6s (G5P): draw_buffers_indexed and fragment_out cases with a colour set G5P refuses aborted in that assert; they now fail. Generated-by: LLM Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
When vkEndCommandBuffer() reports the recording's error (a render or draw the driver refused, on G5P an attachment set it does not render), the batch is submitted without its command buffers so that its semaphores are still signalled, and the context was marked lost. Every later draw of that context then failed: under the CTS, the rest of the test process. Drop that batch's work only. The device is not lost and neither is the context's other work; a real device loss still reports as before. On an iPhone 6s (S8003), the iPhone 6's sample lists: - GLES3 sample: 3278 -> 4247 passes (75.9 % -> 96.7 % of supported); the 1801-2700 slice alone 476 -> 855. - GLES3.1 sample: 1776 -> 2191 passes (61.1 % -> 75.4 %), with the narrow integer colour targets of the commit before. Most of the cases this turns into passes had nothing refused: they ran after a refused case in the same process. Generated-by: LLM Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
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>
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.
Four fixes in shared code that the A9 (Zink on the PowerVR G5P driver) exposed:
Tested on an iPhone 6s (S8003): GLES3.1
copy_image+46 (RG16 destinations), +12 (state_query.internal_format samples, sample_variables); the context fix removed a cascade of up to 500 failures after one refused draw.