winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM
authorMarek Olšák <maraeo@gmail.com>
Tue, 13 Sep 2011 13:01:45 +0000 (15:01 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 16 Sep 2011 15:25:12 +0000 (17:25 +0200)
so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.

src/gallium/drivers/r300/r300_flush.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index dc596c4..ad06ef4 100644 (file)
@@ -75,7 +75,7 @@ void r300_flush(struct pipe_context *pipe,
     if (rfence) {
         /* Create a fence, which is a dummy BO. */
         *rfence = r300->rws->buffer_create(r300->rws, 1, 1,
-                                           PIPE_BIND_VERTEX_BUFFER,
+                                           PIPE_BIND_CUSTOM,
                                            RADEON_DOMAIN_GTT);
         /* Add the fence as a dummy relocation. */
         r300->rws->cs_add_reloc(r300->cs,
index 1dc6eeb..652d114 100644 (file)
@@ -536,7 +536,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
 
     /* Assign a buffer manager. */
     if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER |
-                PIPE_BIND_CONSTANT_BUFFER))
+                PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_CUSTOM))
        provider = ws->cman;
     else
         provider = ws->kman;