Skip to content

WIP: gallium/util: do not use undefined memory for texcoords

Erik Faye-Lund requested to merge kusma/mesa:blitter-read-garbage-fix into master

blitter_context_priv::vertices is initialized at start-up, but can (and will) be overwritten by calls to the blitter since then. Since we always copy from the LOD read by the the vertex-shader, and we risk blitting from out-of-range LODs, which give incorrect results.

So let's just bite the bullet and not use the XY-codepath in the shared code. The difference is just a few writes, but then we always update all the read state as apropriate.

This fixes a case for me where the following two Khronos Confidental CTS cases are run back to back:

GTF-GL33.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_error_blitframebuffer_multisampled_framebuffers_different_formats GTF-GL33.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_nearest_filter_color_blit

Fixes: 22ed1ba0 ("gallium/u_blitter: use draw_rectangle for all blits except cubemaps")

Edited by Erik Faye-Lund

Merge request reports