Repository navigation
hk: three CTS fixes (transform feedback counters, depth/stencil clear in an empty render, exact index range) - #56
Conversation
vkCmdBegin/EndTransformFeedbackEXT may pass pCounterBuffers = NULL with a non-zero counterBufferCount, meaning no counter buffers. The loop read pCounterBuffers[i] anyway and crashed dEQP-VK.transform_feedback.simple_optimized_gpl.resume_1_131072_null_counter_buffers. All 42 resume cases and the 4990 supported transform_feedback.simple cases pass with the check. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
An empty render's load-op clears are replaced with image clears. The replacement cleared an aspect only if the attachment's view had it, and took the format from the view. For a render pass depth/stencil attachment the view's aspect mask is ignored, so a depth-only view of a D32_SFLOAT_S8_UINT image bound as the stencil attachment must still get its stencil cleared; its view format (D32_SFLOAT) has no stencil part. The skipped clear left whatever the memory held: dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.depth_min_stencil_none_testing_stencil_ignore_depth_aspect read the stencil of the previous test's image (1, expected 0). For depth and stencil, take the aspects and the format from the image. Colour keeps the view format, in which the clear value is expressed. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
hk_CmdBindIndexBuffer2KHR rounded the bound range up to 4 bytes. Every encoder already rounds the range to dwords where the hardware needs it (agx_vdm_draw and the indirect size word in libagx_dgc.h, and the HAL200 encoders), but the rounded value also fed agx_direct_draw_overreads_indices(), which then missed overreads into the padding of 8- and 16-bit index buffers whose binding does not end on a dword (CTS dEQP-VK.robustness.bind_index_buffer2.type.* on G17P). Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
RyanTheTide
left a comment
There was a problem hiding this comment.
Thanks, the first two commits look good and test clean. The third one ("hk: bind the exact index-buffer range") regresses GL through zink on the A18 Pro, so I'm holding this PR for now.
On the Neo (73t), with the same kit on aurora-wip 7615582 and on 7615582 + #55..#60, every dEQP-GLES3.functional.buffer.map.{write,read_write}.render_as_index_array.* case (32) goes from Pass to Fail under zink, 3 of 3 runs, with "Image comparison failed". Reverting only b944aac on top of the series brings all 32 back to Pass. Native GL and all the Vulkan groups we ran are unaffected:
- main776, stride50;
- transform_feedback, renderpass2 depth_stencil_resolve, bind_index_buffer2, index_access, indexed_draw, query_pool, image_clearing;
- 281,580 names on the Neo and 605,583 on the M1 Pro and M2, 0 changes.
These tests draw GL_UNSIGNED_BYTE indices straight out of a mapped buffer. So some consumer of the bound range still relies on it being whole dwords, even though the HAL200 direct-draw encoder rounds its own size word. The bind_index_buffer2 cases also pass on the Neo without this commit, so the failures you saw may be specific to the M4 Pro.
Could you split the range change into its own PR, with the GLES3 group above in the test list? We'd take the transform feedback and depth/stencil clear fixes on their own straight away.
hk: three CTS fixes from #56, with index fetch windows counted from the first index's dword
|
Landed in #64 with your three commits unchanged and your authorship kept, plus one fixup for the index-buffer range. The exact range was right. The hardware index window starts at the dword holding the first index, though, and the encoders counted from the first index itself, so a draw starting mid-dword that ran to the end of a range ending mid-dword lost its last indices. That was the zink render_as_index_array failure. The fixup counts the windows from that dword, so the exact range stays. GitHub marked this PR merged because its commits came in with #64. Thanks for these! |
Three small Honeykrisp fixes found with the Vulkan CTS on the M4 Pro (G17P path, #55). Each is independent of #55 and applies to aurora-wip on its own.
vkCmdBegin/EndTransformFeedbackEXTmay passpCounterBuffers = NULLwith a non-zero count (no counter buffers); the loop dereferenced it and crasheddEQP-VK.transform_feedback.simple_optimized_gpl.resume_1_131072_null_counter_buffers.dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.depth_min_stencil_none_testing_stencil_ignore_depth_aspectread the previous test's stencil).hk_CmdBindIndexBuffer2KHRrounded the bound range up to 4 bytes, which hid overreads into the padding of 8- and 16-bit index buffers fromagx_direct_draw_overreads_indices()(dEQP-VK.robustness.bind_index_buffer2.type.*). Every encoder already rounds where the hardware needs it.Hardware tested on: Apple MacBook Pro (16-inch, M4 Pro, 2024), J616s / T6040, macOS 26.6.2 firmware, kernel 7.3.0-m4.14 (aurora
integration/aurora1aa2857509d+ #406, #408-#413).How tested: Built as a system Mesa (aurora's mesa-aurora options: asahi, zink, softpipe Gallium; asahi Vulkan) and run on the M4 Pro with deqp-runner (vk-gl-cts main mustpass), 6 jobs. The cases these fixes name (807:
robustness.bind_index_buffer2.*, thetransform_feedback.simple,simple_fast_gplandsimple_optimized_gplresume_*cases,renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.*andquery_pool.occlusion_query.*):76155824+ #55The 18 crashes are the
null_counter_buffersandnull_ptrs_end_xfbresume cases; the failures are 7bind_index_buffer2cases and 2depth_stencil_resolve*_ignore_*_aspectcases. An image-heavy dEQP-VK sample (image, copy_and_blit, renderpass, pipeline image/MSAA/blend, texture, compute.pipeline; 20,116 cases) gives 8,886 pass, 0 fail, and no GPU recovery in the kernel log.🤖 Generated with Claude Code