diff options
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_stateobj.h')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_stateobj.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index 9aee9e49566..77ff7dcf209 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h @@ -98,6 +98,19 @@ so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo, so_data(so, data); } +/* Determine if this buffer object is referenced by this state object. */ +static INLINE boolean +so_bo_is_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo) +{ + int i; + + for (i = 0; i < so->cur_reloc; i++) + if (so->reloc[i].bo == bo) + return true; + + return false; +} + static INLINE void so_dump(struct nouveau_stateobj *so) { |