sna: Add assertions for set/get binding
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
7df3da10e7
commit
971a5e64f5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue