st/nine: Fix buffer bind flags
authorAxel Davy <axel.davy@ens.fr>
Fri, 11 Mar 2016 21:22:10 +0000 (22:22 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 18 May 2016 21:37:14 +0000 (23:37 +0200)
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/buffer9.c

index ed0c4f1fa7f75727488f4e6953970bc944fd310e..5e8d22e9fc40b4ba8622cc03a2f47956b6d28910 100644 (file)
@@ -65,9 +65,9 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
     info->width0 = Size;
     info->flags = 0;
 
-    info->bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_WRITE;
-    if (!(Usage & D3DUSAGE_WRITEONLY))
-        info->bind |= PIPE_BIND_TRANSFER_READ;
+    /* Note: WRITEONLY is just tip for resource placement, the resource
+     * can still be read (but slower). */
+    info->bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_TRANSFER_READ;
 
     info->usage = PIPE_USAGE_DEFAULT;
     if (Usage & D3DUSAGE_DYNAMIC)