From 62cc6ed6e50b271365eea533bebc1688630abb4f Mon Sep 17 00:00:00 2001 From: chenjiangnan Date: Tue, 18 May 2021 08:35:40 +0800 Subject: [PATCH] vrend: glTextureView will check whether the base texture is immutable Signed-off-by: chenjiangnan Reviewed-by: Gert Wollny --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index d2e546a..7d1d7e8 100644 --- a/src/vrend_renderer.c +++ b/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) 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); GLenum internalformat = tex_conv_table[format].internalformat; unsigned base_layer = view->val0 & 0xffff;