KHR-GL45.copy_image.functional fails on i965. It's copying a GL_RGB10_A2 renderbuffer to a GL_R11F_G11F_B10F 2D array texture.
Looks like a small data difference, or the alpha channel being toast: 0xc7f00004 vs 0xc7f00000.
My guess is that we need to land Jason's BLORP handling for uncommon formats.
Have a look at these 2 patches from Karol:
Not sure what the status is, but it's a start. Seems like mostly core issues.
Actually, it looks like we never hit any of the code Karol is modifying - we use BLORP for all glCopyImageSubData operations, with no fallbacks.
I think I misread things earlier, it looks like it's an issue unique to RGB9E5 formats. If I remove those from the test, it passes. If I restrict it to just that format, it fails even when copying RGB9E5 to RGB9E5.
Oddly, it seems to only happen for GL_TEXTURE_2D_ARRAY and GL_TEXTURE_3D - other targets are fine. And the error suggests it's somehow trashing the _source_ image...
Not matching pixels found. Left: [0, 0, 0] lvl:0, off: 0, data: 0xf8fc0000. Right: [0, 0, 0] lvl: 0, off: 0, data: 0xe7e00000
CopyImageSubData modified contents of source image. Original data: left.
Failure. Targets src: GL_TEXTURE_2D_ARRAY, dst: GL_TEXTURE_2D_ARRAY. Levels src: 0, dst: 0. Dimmensions src [7, 7], dst [7, 7]. Region [1 x 1 x 12] from [0, 0, 0] to [6, 6, 0]. Format src: 0x8c3d, dst: 0x8c3d
I think this is probably a test bug. The NVIDIA 384.69 closed source drivers also fail this test, and specifically RGB9E5 subtests.
I was wrong. While we use BLORP for glCopyImageSubData(), the test also does glGetTexImage() and we fall all the way back to software, and hit the code Karol was fixing.
Karol's memcpy path doesn't work for i965 because src_stride and dst_stride don't match, but if I take the approach Jason mentioned in his review, it totally works.
I'll respin that patch...
Patches on list:
Author: Karol Herbst <email@example.com>
Date: Wed Aug 16 20:32:42 2017 +0200
main/format: skip format conversion if src and dst format are equal
Fixes 'KHR-GL45.copy_image.functional' on Nouveau and i965.
v2: (by Kenneth Graunke)
Rewrite patch according to Jason Ekstrand's review feedback.
This makes it handle differing strides, which i965 needed.
Signed-off-by: Karol Herbst <firstname.lastname@example.org>
Reviewed-by: Jason Ekstrand <email@example.com>