vrend: Create texture view for entire cube map

A texture view cannot be created for a single layer of a cube map.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/715>
macos/master
Akihiko Odaki 3 years ago committed by Marge Bot
parent 623f26f722
commit 4155bdaef9
  1. 5
      src/vrend_renderer.c

@ -1951,6 +1951,11 @@ int vrend_create_surface(struct vrend_context *ctx,
GLenum target = res->target; GLenum target = res->target;
GLenum internalformat = tex_conv_table[format].internalformat; GLenum internalformat = tex_conv_table[format].internalformat;
if (target == GL_TEXTURE_CUBE_MAP && first_layer == last_layer) {
first_layer = 0;
last_layer = 5;
}
if (vrend_resource_has_24bpp_internal_format(res)) if (vrend_resource_has_24bpp_internal_format(res))
internalformat = GL_RGB8; internalformat = GL_RGB8;

Loading…
Cancel
Save