summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-15 20:07:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-16 10:02:42 +0000
commit15ccb7148d15d776a661c1b8c5b9b2360fcae4ad (patch)
tree0b04d19afb194479f3b2e242ce49fb7e03c457f7 /src
parentfde25b08922d97ca0d4a69c654bf690edbd53b3d (diff)
sna/gen6+: Apply the is_scanout to the key not value in the binding cache
Oops, we never managed to reuse the cached location of the target surface as we entered it into the cache with the wrong key. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen6_render.c2
-rw-r--r--src/sna/gen7_render.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index ec29124f..6883928f 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1248,7 +1248,7 @@ gen6_bind_bo(struct sna *sna,
ss[4] = 0;
ss[5] = is_scanout ? 0 : 3 << 16;
- kgem_bo_set_binding(bo, format, offset | is_scanout << 31);
+ kgem_bo_set_binding(bo, format | is_scanout << 31, offset);
DBG(("[%x] bind bo(handle=%d, addr=%d), format=%d, width=%d, height=%d, pitch=%d, tiling=%d -> %s\n",
offset, bo->handle, ss[1],
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 29b1cdc3..30dd6413 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1373,7 +1373,7 @@ gen7_bind_bo(struct sna *sna,
if (sna->kgem.gen == 075)
ss[7] |= HSW_SURFACE_SWIZZLE(RED, GREEN, BLUE, ALPHA);
- kgem_bo_set_binding(bo, format, offset | is_scanout << 31);
+ kgem_bo_set_binding(bo, format | is_scanout << 31, offset);
DBG(("[%x] bind bo(handle=%d, addr=%d), format=%d, width=%d, height=%d, pitch=%d, tiling=%d -> %s\n",
offset, bo->handle, ss[1],