freedreno: use writecombine buffers
authorRob Clark <robclark@freedesktop.org>
Thu, 25 Apr 2013 19:00:58 +0000 (15:00 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 25 Apr 2013 19:10:56 +0000 (15:10 -0400)
Better than uncached for writes, which are common for vertex buffer
upload, etc.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_resource.c

index b5efdce469d6d8e7789d084ad9c434207e3734f6..00f3db867b4d778ee74cfd187c6e126974141029 100644 (file)
@@ -155,7 +155,8 @@ fd_resource_create(struct pipe_screen *pscreen,
        rsc->cpp = util_format_get_blocksize(tmpl->format);
 
        size = rsc->pitch * tmpl->height0 * rsc->cpp;
-       flags = DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
+       flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
+                       DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
 
        rsc->bo = fd_bo_new(screen->dev, size, flags);