diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-29 13:06:08 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-29 13:06:08 +0000 |
commit | 7df3da10e744d7f168ea3f30b21c434f99beae17 (patch) | |
tree | 041a1d8a3e72c237eb48db3a504f77e221a90e28 /src/sna/gen6_render.c | |
parent | 001dd080e15157961188c96718669dd1b4d6b939 (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/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index cf417d4c..08c9f785 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1052,6 +1052,7 @@ gen6_bind_bo(struct sna *sna, DBG(("[%x] bo(handle=%d), format=%d, reuse %s binding\n", offset, bo->handle, format, is_dst ? "render" : "sampler")); + assert(offset >= sna->kgem.surface); if (is_dst) kgem_bo_mark_dirty(bo); return offset * sizeof(uint32_t); |