[virglrenderer-devel] [PATCH] vrend: allocate texture, always use texture storage when available

Gert Wollny gert.wollny at collabora.com
Tue Jul 3 10:10:38 UTC 2018


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 <gert.wollny at collabora.com>
---
 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 5ef4d5e..68b3e2c 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -4938,7 +4938,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,
-- 
2.17.1



More information about the virglrenderer-devel mailing list