We now support version 2 of the virgl_renderer_callbacks struct, so
update the test to check for an unsupported version. Use
VIRGL_RENDERER_CALLBACKS_VERSION + 1 as the test version to ensure we
don't fail this test again when we update the struct in the future.
Fixes: test_virgl_init.virgl_init_cbs_wrong_ver
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
This gets us passing at least for now. Some of these tests
should be upgraded to the new version instead.
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
The checked fixture run in the child test process.
Fix leaks found thanks to AddressSanitizer.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
- virgl maps VIRGL_FORMAT_B8G8R8X8_UNORM to GL_RGBA8
- _mesa_choose_tex_format() maps GL_RGBA8 to
MESA_FORMAT_R8G8B8A8_UNORM or MESA_FORMAT_A8B8G8R8_UNORM or
MESA_FORMAT_B8G8R8A8_UNORM.
- it ends up in (gl_texture_image *)img->TexFormat
- then in intel (_DRIImage *) image->format.
- on create image, image->dri_format = driGLFormatToImageFormat() (to
ex: MESA_FORMAT_R8G8B8A8_UNORM -> __DRI_IMAGE_FORMAT_ABGR8888)
- on query, intel_lookup_fourcc() -> __DRI_IMAGE_FOURCC_ABGR8888 == GBM_FORMAT_ABGR8888.
For some reason, driGLFormatToImageFormat() doesn't map
MESA_FORMAT_A8B8G8R8_UNORM, so I only check the two possible values I
could find.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>