aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-10-28 21:30:51 +1100
committerTimothy Arceri <[email protected]>2019-10-28 11:24:39 +0000
commit1909bc526dd0e51d49252a1fc1c2aab0a8a51fb5 (patch)
tree40397bc26a41f9d465ca73cff2fe2f1184a261c1 /src/gallium/drivers
parent7f106a2b5d0b27c1ce47a4b335c4cc8ae9cd460b (diff)
util: remove LIST_IS_EMPTY macro
Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query_hw.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_query_acc.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_query_hw.c4
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.c2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.c8
-rw-r--r--src/gallium/drivers/r600/r600_pipe_common.c4
-rw-r--r--src/gallium/drivers/radeonsi/gfx10_query.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_gfx_cs.c4
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c4
9 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_hw.c b/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
index 9324071f41c..588583c4fde 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
@@ -176,7 +176,7 @@ etna_hw_get_query_result(struct etna_context *ctx, struct etna_query *q,
struct etna_resource *rsc = etna_resource(hq->prsc);
const struct etna_hw_sample_provider *p = hq->provider;
- assert(LIST_IS_EMPTY(&hq->node));
+ assert(list_is_empty(&hq->node));
if (!wait) {
int ret;
diff --git a/src/gallium/drivers/freedreno/freedreno_query_acc.c b/src/gallium/drivers/freedreno/freedreno_query_acc.c
index dd8665e0ca6..49c71c4b644 100644
--- a/src/gallium/drivers/freedreno/freedreno_query_acc.c
+++ b/src/gallium/drivers/freedreno/freedreno_query_acc.c
@@ -123,7 +123,7 @@ fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q,
DBG("%p: wait=%d, active=%d", q, wait, q->active);
- assert(LIST_IS_EMPTY(&aq->node));
+ assert(list_is_empty(&aq->node));
/* if !wait, then check the last sample (the one most likely to
* not be ready yet) and bail if it is not ready:
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c
index 6699b98062c..f1d22328df8 100644
--- a/src/gallium/drivers/freedreno/freedreno_query_hw.c
+++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c
@@ -184,10 +184,10 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q,
DBG("%p: wait=%d, active=%d", q, wait, q->active);
- if (LIST_IS_EMPTY(&hq->periods))
+ if (list_is_empty(&hq->periods))
return true;
- assert(LIST_IS_EMPTY(&hq->list));
+ assert(list_is_empty(&hq->list));
assert(!hq->period);
/* if !wait, then check the last sample (the one most likely to
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c
index d0c66c56128..a830f8133d7 100644
--- a/src/gallium/drivers/nouveau/nouveau_fence.c
+++ b/src/gallium/drivers/nouveau/nouveau_fence.c
@@ -100,7 +100,7 @@ nouveau_fence_del(struct nouveau_fence *fence)
}
}
- if (!LIST_IS_EMPTY(&fence->work)) {
+ if (!list_is_empty(&fence->work)) {
debug_printf("WARNING: deleting fence with work still pending !\n");
nouveau_fence_trigger_work(fence);
}
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c
index f44b669e917..3ba6ea95d1d 100644
--- a/src/gallium/drivers/nouveau/nouveau_mm.c
+++ b/src/gallium/drivers/nouveau/nouveau_mm.c
@@ -181,10 +181,10 @@ nouveau_mm_allocate(struct nouveau_mman *cache,
return NULL;
}
- if (!LIST_IS_EMPTY(&bucket->used)) {
+ if (!list_is_empty(&bucket->used)) {
slab = LIST_ENTRY(struct mm_slab, bucket->used.next, head);
} else {
- if (LIST_IS_EMPTY(&bucket->free)) {
+ if (list_is_empty(&bucket->free)) {
mm_slab_new(cache, MAX2(mm_get_order(size), MM_MIN_ORDER));
}
slab = LIST_ENTRY(struct mm_slab, bucket->free.next, head);
@@ -284,8 +284,8 @@ nouveau_mm_destroy(struct nouveau_mman *cache)
return;
for (i = 0; i < MM_NUM_BUCKETS; ++i) {
- if (!LIST_IS_EMPTY(&cache->bucket[i].used) ||
- !LIST_IS_EMPTY(&cache->bucket[i].full))
+ if (!list_is_empty(&cache->bucket[i].used) ||
+ !list_is_empty(&cache->bucket[i].full))
debug_printf("WARNING: destroying GPU memory cache "
"with some buffers still in use\n");
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c
index e91356094ff..4c914fa082f 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.c
+++ b/src/gallium/drivers/r600/r600_pipe_common.c
@@ -298,7 +298,7 @@ void r600_need_dma_space(struct r600_common_context *ctx, unsigned num_dw,
void r600_preflush_suspend_features(struct r600_common_context *ctx)
{
/* suspend queries */
- if (!LIST_IS_EMPTY(&ctx->active_queries))
+ if (!list_is_empty(&ctx->active_queries))
r600_suspend_queries(ctx);
ctx->streamout.suspended = false;
@@ -316,7 +316,7 @@ void r600_postflush_resume_features(struct r600_common_context *ctx)
}
/* resume queries */
- if (!LIST_IS_EMPTY(&ctx->active_queries))
+ if (!list_is_empty(&ctx->active_queries))
r600_resume_queries(ctx);
}
diff --git a/src/gallium/drivers/radeonsi/gfx10_query.c b/src/gallium/drivers/radeonsi/gfx10_query.c
index c5e668a3760..c0a0bc8ce57 100644
--- a/src/gallium/drivers/radeonsi/gfx10_query.c
+++ b/src/gallium/drivers/radeonsi/gfx10_query.c
@@ -79,7 +79,7 @@ struct gfx10_sh_query {
static void emit_shader_query(struct si_context *sctx)
{
- assert(!LIST_IS_EMPTY(&sctx->shader_query_buffers));
+ assert(!list_is_empty(&sctx->shader_query_buffers));
struct gfx10_sh_query_buffer *qbuf = list_last_entry(&sctx->shader_query_buffers,
struct gfx10_sh_query_buffer, list);
@@ -119,7 +119,7 @@ static bool gfx10_alloc_query_buffer(struct si_context *sctx)
struct gfx10_sh_query_buffer *qbuf = NULL;
- if (!LIST_IS_EMPTY(&sctx->shader_query_buffers)) {
+ if (!list_is_empty(&sctx->shader_query_buffers)) {
qbuf = list_last_entry(&sctx->shader_query_buffers,
struct gfx10_sh_query_buffer, list);
if (qbuf->head + sizeof(struct gfx10_sh_query_buffer_mem) <= qbuf->buf->b.b.width0)
@@ -510,7 +510,7 @@ void gfx10_init_query(struct si_context *sctx)
void gfx10_destroy_query(struct si_context *sctx)
{
- while (!LIST_IS_EMPTY(&sctx->shader_query_buffers)) {
+ while (!list_is_empty(&sctx->shader_query_buffers)) {
struct gfx10_sh_query_buffer *qbuf =
list_first_entry(&sctx->shader_query_buffers,
struct gfx10_sh_query_buffer, list);
diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c
index 48bb259339f..15aed6b236b 100644
--- a/src/gallium/drivers/radeonsi/si_gfx_cs.c
+++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c
@@ -154,7 +154,7 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags,
}
if (ctx->has_graphics) {
- if (!LIST_IS_EMPTY(&ctx->active_queries))
+ if (!list_is_empty(&ctx->active_queries))
si_suspend_queries(ctx);
ctx->streamout.suspended = false;
@@ -426,7 +426,7 @@ void si_begin_new_gfx_cs(struct si_context *ctx)
si_streamout_buffers_dirty(ctx);
}
- if (!LIST_IS_EMPTY(&ctx->active_queries))
+ if (!list_is_empty(&ctx->active_queries))
si_resume_queries(ctx);
assert(!ctx->gfx_cs->prev_dw);
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 90ca0912160..b5bcd51a7fc 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -256,7 +256,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
}
}
- if (!LIST_IS_EMPTY(&cache->empty)) {
+ if (!list_is_empty(&cache->empty)) {
/* An empty entry has no surface associated with it.
* Use the first empty entry.
*/
@@ -266,7 +266,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
/* Remove from LRU list */
list_del(&entry->head);
}
- else if (!LIST_IS_EMPTY(&cache->unused)) {
+ else if (!list_is_empty(&cache->unused)) {
/* free the last used buffer and reuse its entry */
entry = LIST_ENTRY(struct svga_host_surface_cache_entry,
cache->unused.prev, head);