vrend: use compatible view internalformat for 24bpp imported EGL resources

Fixes a missed internalformat fixup when glTextureView() is used to create
vrend_surfaces for resources backed by shared EGL images without an
alpha channel (e.g. RGBX, BGRX). Such resources are registered in host
Mesa with internalformat GL_RGB8, but virglrenderer prefers to create
32bpp textures and do it's own swizzling.

fixes: commit ebb2cf3 "vrend: convert linear color to srgb for 24bpp
imported EGL resources".

Signed-off-by: Ryan Neph <ryanneph@google.com>
macos/master
Ryan Neph 3 years ago
parent 5a1387cde8
commit 6428beead4
  1. 4
      src/vrend_renderer.c

@ -1913,10 +1913,8 @@ int vrend_create_surface(struct vrend_context *ctx,
GLenum target = res->target;
GLenum internalformat = tex_conv_table[format].internalformat;
if (res->base.format == VIRGL_FORMAT_B8G8R8X8_UNORM &&
has_bit(res->storage_bits, VREND_STORAGE_EGL_IMAGE)) {
if (vrend_resource_has_24bpp_internal_format(res))
internalformat = GL_RGB8;
}
VREND_DEBUG(dbg_tex, ctx, "Create texture view from %s for %s\n",
util_format_name(res->base.format),

Loading…
Cancel
Save