vrend: glTextureView will check whether the base texture is immutable

Signed-off-by: chenjiangnan <chen.jiangnan@zlingsmart.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
chenjiangnan 4 years ago
parent 71f169c8e8
commit 62cc6ed6e5
  1. 2
      src/vrend_renderer.c

@ -2241,7 +2241,7 @@ int vrend_create_sampler_view(struct vrend_context *ctx,
else if (view->format != view->texture->base.format) else if (view->format != view->texture->base.format)
needs_view = true; needs_view = true;
if (needs_view && vrend_format_can_texture_view(view->texture->base.format)) { if (needs_view && has_bit(view->texture->storage_bits, VREND_STORAGE_GL_IMMUTABLE)) {
glGenTextures(1, &view->id); glGenTextures(1, &view->id);
GLenum internalformat = tex_conv_table[format].internalformat; GLenum internalformat = tex_conv_table[format].internalformat;
unsigned base_layer = view->val0 & 0xffff; unsigned base_layer = view->val0 & 0xffff;

Loading…
Cancel
Save