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>
macos/master
Akihiko Odaki 3 years ago
parent 7518f95b4a
commit 936a3e3982
  1. 5
      src/vrend_renderer.c

@ -1951,6 +1951,11 @@ int vrend_create_surface(struct vrend_context *ctx,
GLenum target = res->target;
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))
internalformat = GL_RGB8;

Loading…
Cancel
Save