Mesa (master): st/dri: don' t set PIPE_BIND_SHARED for privately-allocated renderbuffers

Marek Olšák mareko at kemper.freedesktop.org
Tue Aug 1 15:07:03 UTC 2017


Module: Mesa
Branch: master
Commit: 39608761cd20cbabb975a5d899dfe7c0dd3268b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=39608761cd20cbabb975a5d899dfe7c0dd3268b7

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jul 29 01:19:19 2017 +0200

st/dri: don't set PIPE_BIND_SHARED for privately-allocated renderbuffers

which are MSAA and depth/stencil buffers.

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/gallium/state_trackers/dri/dri2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 0cbc76f7f8..e4e2a534fd 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -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;




More information about the mesa-commit mailing list