summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
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/auxiliary
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/auxiliary')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c4
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_slab.c14
-rw-r--r--src/gallium/auxiliary/util/u_dirty_surfaces.h8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index f95f07d1ab0..9e6d8fd11a0 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -1431,7 +1431,7 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen,
env += num;
strip_hyphens(s);
- if (added && !LIST_IS_EMPTY(&pane->graph_list)) {
+ if (added && !list_is_empty(&pane->graph_list)) {
struct hud_graph *graph;
graph = LIST_ENTRY(struct hud_graph, pane->graph_list.prev, head);
strncpy(graph->name, s, sizeof(graph->name)-1);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 8cedc42b916..8e54e811488 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -391,7 +391,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
#if 0
mtx_lock(&mgr->mutex);
debug_printf("%s: failed to create buffer\n", __FUNCTION__);
- if(!LIST_IS_EMPTY(&mgr->list))
+ if(!list_is_empty(&mgr->list))
pb_debug_manager_dump_locked(mgr);
mtx_unlock(&mgr->mutex);
#endif
@@ -444,7 +444,7 @@ pb_debug_manager_destroy(struct pb_manager *_mgr)
struct pb_debug_manager *mgr = pb_debug_manager(_mgr);
mtx_lock(&mgr->mutex);
- if(!LIST_IS_EMPTY(&mgr->list)) {
+ if(!list_is_empty(&mgr->list)) {
debug_printf("%s: unfreed buffers\n", __FUNCTION__);
pb_debug_manager_dump_locked(mgr);
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c
index 844bf3535f6..d8468696151 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c
@@ -74,7 +74,7 @@ pb_slab_reclaim(struct pb_slabs *slabs, struct pb_slab_entry *entry)
static void
pb_slabs_reclaim_locked(struct pb_slabs *slabs)
{
- while (!LIST_IS_EMPTY(&slabs->reclaim)) {
+ while (!list_is_empty(&slabs->reclaim)) {
struct pb_slab_entry *entry =
LIST_ENTRY(struct pb_slab_entry, slabs->reclaim.next, head);
@@ -114,20 +114,20 @@ pb_slab_alloc(struct pb_slabs *slabs, unsigned size, unsigned heap)
/* If there is no candidate slab at all, or the first slab has no free
* entries, try reclaiming entries.
*/
- if (LIST_IS_EMPTY(&group->slabs) ||
- LIST_IS_EMPTY(&LIST_ENTRY(struct pb_slab, group->slabs.next, head)->free))
+ if (list_is_empty(&group->slabs) ||
+ list_is_empty(&LIST_ENTRY(struct pb_slab, group->slabs.next, head)->free))
pb_slabs_reclaim_locked(slabs);
/* Remove slabs without free entries. */
- while (!LIST_IS_EMPTY(&group->slabs)) {
+ while (!list_is_empty(&group->slabs)) {
slab = LIST_ENTRY(struct pb_slab, group->slabs.next, head);
- if (!LIST_IS_EMPTY(&slab->free))
+ if (!list_is_empty(&slab->free))
break;
list_del(&slab->head);
}
- if (LIST_IS_EMPTY(&group->slabs)) {
+ if (list_is_empty(&group->slabs)) {
/* Drop the mutex temporarily to prevent a deadlock where the allocation
* calls back into slab functions (most likely to happen for
* pb_slab_reclaim if memory is low).
@@ -241,7 +241,7 @@ pb_slabs_deinit(struct pb_slabs *slabs)
/* Reclaim all slab entries (even those that are still in flight). This
* implicitly calls slab_free for everything.
*/
- while (!LIST_IS_EMPTY(&slabs->reclaim)) {
+ while (!list_is_empty(&slabs->reclaim)) {
struct pb_slab_entry *entry =
LIST_ENTRY(struct pb_slab_entry, slabs->reclaim.next, head);
pb_slab_reclaim(slabs, entry);
diff --git a/src/gallium/auxiliary/util/u_dirty_surfaces.h b/src/gallium/auxiliary/util/u_dirty_surfaces.h
index 0d848792739..e9ec5f25953 100644
--- a/src/gallium/auxiliary/util/u_dirty_surfaces.h
+++ b/src/gallium/auxiliary/util/u_dirty_surfaces.h
@@ -85,7 +85,7 @@ util_dirty_surfaces_use_levels_for_sampling(struct pipe_context *pipe, struct ut
static inline void
util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util_dirty_surfaces *dss, struct pipe_sampler_view *psv, struct pipe_sampler_state *pss, util_dirty_surface_flush_t flush)
{
- if(!LIST_IS_EMPTY(&dss->dirty_list))
+ if(!list_is_empty(&dss->dirty_list))
util_dirty_surfaces_use_levels_for_sampling(pipe, dss, (unsigned)pss->min_lod + psv->u.tex.first_level,
MIN2((unsigned)ceilf(pss->max_lod) + psv->u.tex.first_level, psv->u.tex.last_level), flush);
}
@@ -99,20 +99,20 @@ util_dirty_surface_init(struct util_dirty_surface *ds)
static inline boolean
util_dirty_surface_is_dirty(struct util_dirty_surface *ds)
{
- return !LIST_IS_EMPTY(&ds->dirty_list);
+ return !list_is_empty(&ds->dirty_list);
}
static inline void
util_dirty_surface_set_dirty(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
{
- if(LIST_IS_EMPTY(&ds->dirty_list))
+ if(list_is_empty(&ds->dirty_list))
list_addtail(&ds->dirty_list, &dss->dirty_list);
}
static inline void
util_dirty_surface_set_clean(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
{
- if(!LIST_IS_EMPTY(&ds->dirty_list))
+ if(!list_is_empty(&ds->dirty_list))
list_delinit(&ds->dirty_list);
}