OSDN Git Service

Merge remote-tracking branch 'mesa/17.0' into marshmallow-x86 marshmallow-x86 android-x86-6.0-r3
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 20 Apr 2017 07:53:26 +0000 (15:53 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 20 Apr 2017 07:53:26 +0000 (15:53 +0800)
1  2 
src/gallium/drivers/nouveau/nouveau_buffer.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/state_trackers/dri/dri2.c

@@@ -486,12 -473,11 +483,13 @@@ nouveau_buffer_transfer_map(struct pipe
      * complete its operation, or set up a staging area to perform our work in.
      */
     if (nouveau_buffer_busy(buf, usage & PIPE_TRANSFER_READ_WRITE)) {
-       if (unlikely(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)) {
+       if (unlikely(usage & (PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE |
+                             PIPE_TRANSFER_PERSISTENT))) {
           /* Discarding was not possible, must sync because
            * subsequent transfers might use UNSYNCHRONIZED. */
 +         pipe_mutex_lock(screen->push_mutex);
           nouveau_buffer_sync(nv, buf, usage & PIPE_TRANSFER_READ_WRITE);
 +         pipe_mutex_unlock(screen->push_mutex);
        } else
        if (usage & PIPE_TRANSFER_DISCARD_RANGE) {
           /* The whole range is being discarded, so it doesn't matter what was
Simple merge