st/nine: Ignore nooverwrite for systemmem
authorAxel Davy <davyaxel0@gmail.com>
Fri, 12 Apr 2019 22:39:59 +0000 (00:39 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 30 Apr 2019 17:18:50 +0000 (19:18 +0200)
Systemmem has a specific behaviour we don't
mimick exactly.
That makes Halo feel free to use nooverwrite
with it all the time, even when reading again
at the same location.
Ignore nooverwrite to have proper synchronization.

Fixes: https://github.com/iXit/Mesa-3D/issues/348
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/buffer9.c

index 54855f16aeffd28c3467a805a5693485e2f995eb..30066f11c831f2512c89ca512ddc69d215d28dc3 100644 (file)
@@ -276,7 +276,7 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
      * Our tests: SYSTEMMEM doesn't DISCARD */
 
     if (This->base.pool == D3DPOOL_SYSTEMMEM)
-        Flags &= ~D3DLOCK_DISCARD;
+        Flags &= ~(D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE);
 
     if (Flags & D3DLOCK_DISCARD)
         usage = PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;