freedreno: use writecombine buffers 10/6210/1
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 b5efdce..00f3db8 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);