summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-29 13:06:08 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-29 13:06:08 +0000
commit7df3da10e744d7f168ea3f30b21c434f99beae17 (patch)
tree041a1d8a3e72c237eb48db3a504f77e221a90e28 /src/sna/gen4_render.c
parent001dd080e15157961188c96718669dd1b4d6b939 (diff)
sna/gen4+: Assert that the cached binding location is valid
We can at least check that it is in the right region (i.e. not past where the current surface has been allocated from). References: https://bugs.freedesktop.org/show_bug.cgi?id=74176 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r--src/sna/gen4_render.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 4f4a4c80..1d164b6e 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -514,6 +514,7 @@ gen4_bind_bo(struct sna *sna,
/* After the first bind, we manage the cache domains within the batch */
offset = kgem_bo_get_binding(bo, format | is_dst << 31);
if (offset) {
+ assert(offset >= sna->kgem.surface);
if (is_dst)
kgem_bo_mark_dirty(bo);
return offset * sizeof(uint32_t);