st/dri: don't set PIPE_BIND_SHARED for privately-allocated renderbuffers
authorMarek Olšák <marek.olsak@amd.com>
Fri, 28 Jul 2017 23:19:19 +0000 (01:19 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 1 Aug 2017 15:06:38 +0000 (17:06 +0200)
which are MSAA and depth/stencil buffers.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/state_trackers/dri/dri2.c

index 0cbc76f7f8b256d4baa8437b645cca120adf243c..e4e2a534fd17ad62ce907a6d4fd765a24327facf 100644 (file)
@@ -732,7 +732,8 @@ dri2_allocate_textures(struct dri_context *ctx,
 
          if (drawable->textures[statt]) {
             templ.format = drawable->textures[statt]->format;
-            templ.bind = drawable->textures[statt]->bind & ~PIPE_BIND_SCANOUT;
+            templ.bind = drawable->textures[statt]->bind &
+                         ~(PIPE_BIND_SCANOUT | PIPE_BIND_SHARED);
             templ.nr_samples = drawable->stvis.samples;
 
             /* Try to reuse the resource.
@@ -781,7 +782,7 @@ dri2_allocate_textures(struct dri_context *ctx,
 
       if (format) {
          templ.format = format;
-         templ.bind = bind;
+         templ.bind = bind & ~PIPE_BIND_SHARED;
 
          if (drawable->stvis.samples > 1) {
             templ.nr_samples = drawable->stvis.samples;