From 8d09648e0a3ab5f01f7b2ab55697579aed2753c6 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 3 Jul 2018 12:10:38 +0200 Subject: [PATCH] vrend: allocate texture, always use texture storage when available For multisample textures glTexStorage*DMultisample was only used on GLES and not when the GL host provided it. Texture views need the texture to be immutable and this is achieved by allocating them using glTexStorage. Signed-off-by: Gert Wollny Reviewed-by: Dave Airlie --- 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 33e8478..23494a8 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -4931,7 +4931,7 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr, return EINVAL; } } else if (pr->nr_samples > 1) { - if (vrend_state.use_gles) { + if (vrend_state.use_gles || vrend_state.have_texture_storage) { if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) { glTexStorage2DMultisample(gr->target, pr->nr_samples, internalformat, pr->width0, pr->height0,