- 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>macos/master
parent
031d582bc1
commit
8a3dcd4c7b
Loading…
Reference in new issue