diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-29 13:15:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-29 13:15:43 +0000 |
commit | 971a5e64f574f09ef43bcca9e0bd02cb0e42aa03 (patch) | |
tree | 15af4d64a46e899cf902b7eeaf464501ee218588 /src | |
parent | 7df3da10e744d7f168ea3f30b21c434f99beae17 (diff) |
sna: Add assertions for set/get binding
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/kgem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 0c3e0b08..14a3f952 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -6592,6 +6592,8 @@ uint32_t kgem_bo_get_binding(struct kgem_bo *bo, uint32_t format) { struct kgem_bo_binding *b; + assert(bo->refcnt); + for (b = &bo->binding; b && b->offset; b = b->next) if (format == b->format) return b->offset; @@ -6603,6 +6605,8 @@ void kgem_bo_set_binding(struct kgem_bo *bo, uint32_t format, uint16_t offset) { struct kgem_bo_binding *b; + assert(bo->refcnt); + for (b = &bo->binding; b; b = b->next) { if (b->offset) continue; |