diff options
author | Chia-I Wu <[email protected]> | 2014-09-21 11:25:26 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-09-21 23:30:51 +0800 |
commit | 26fefae9a715b5498b5ffcd835556b02e4f0c68b (patch) | |
tree | a42b26c7d9d4089e3bf5f1ac131dc9e21a84e75d /src/gallium/drivers/ilo/ilo_3d.c | |
parent | 4eb2bbefd2bf0359aff7ebbb8e931a1c7833606f (diff) |
ilo: clarify cp owning/releasing
Make it own()'s responsibility to make room for release() and itself. To be
able to do that, allow ilo_cp_submit() in own().
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_3d.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_3d.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c index f0aee2f480b..30686d6075f 100644 --- a/src/gallium/drivers/ilo/ilo_3d.c +++ b/src/gallium/drivers/ilo/ilo_3d.c @@ -399,7 +399,15 @@ ilo_3d_own_cp(struct ilo_cp *cp, void *data) { struct ilo_3d *hw3d = data; + /* multiply by 2 for both resuming and pausing */ + if (ilo_cp_space(hw3d->cp) < hw3d->owner.reserve * 2) { + ilo_cp_submit(hw3d->cp, "out of space"); + assert(ilo_cp_space(hw3d->cp) >= hw3d->owner.reserve * 2); + } + ilo_3d_resume_queries(hw3d); + + assert(ilo_cp_space(hw3d->cp) >= hw3d->owner.reserve); } static void |