summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-22 14:39:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-23 10:48:52 +0100
commit42330fbae862cda9ca17ec62eb0d2e4fb86032b8 (patch)
tree4604c304ef5d8ff0886d7d0c598cff22192994b8 /src/sna/gen3_render.c
parentdd130d1b06e8828d7a2471761bac36093b9a2391 (diff)
sna: Track CPU/GTT maps independently
Now that we use CPU mmaps to read/write to tiled X surfaces, we find ourselves frequently switching between CPU and GTT mmaps and so wish to cache both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r--src/sna/gen3_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 63dd5cc1..cb8f046d 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2305,7 +2305,7 @@ static void gen3_vertex_close(struct sna *sna)
sna->render.vertices = sna->render.vertex_data;
sna->render.vertex_size = ARRAY_SIZE(sna->render.vertex_data);
free_bo = bo;
- } else if (IS_CPU_MAP(bo->map)) {
+ } else if (sna->render.vertices == MAP(bo->map__cpu)) {
DBG(("%s: converting CPU map to GTT\n", __FUNCTION__));
sna->render.vertices = kgem_bo_map__gtt(&sna->kgem, bo);
if (sna->render.vertices == NULL) {