summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2019-07-04 11:41:41 -0400
committerIlia Mirkin <[email protected]>2019-07-22 22:13:51 -0400
commit0e30c6b8a7e84211bb417362ec73f24ef134ae34 (patch)
tree7567deb41938d64e8fadcac7514deece8f7c1613 /src/gallium/drivers/etnaviv
parent365f24705f9703962b6749f4fafe7cd92d9c60b1 (diff)
gallium: switch boolean -> bool at the interface definitions
This is a relatively minimal change to adjust all the gallium interfaces to use bool instead of boolean. I tried to avoid making unrelated changes inside of drivers to flip boolean -> bool to reduce the risk of regressions (the compiler will much more easily allow "dirty" values inside a char-based boolean than a C99 _Bool). This has been build-tested on amd64 with: Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d vc4 i915 svga virgl swr panfrost iris lima kmsro Gallium st: mesa xa xvmc xvmc vdpau va Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_fence.c2
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query.c10
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query.h6
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query_hw.c6
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query_pm.c6
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_query_sw.c6
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_resource.c12
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c4
8 files changed, 26 insertions, 26 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_fence.c b/src/gallium/drivers/etnaviv/etnaviv_fence.c
index cf3e67766ba..c0684bccf29 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_fence.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_fence.c
@@ -60,7 +60,7 @@ etna_screen_fence_reference(struct pipe_screen *pscreen,
*ptr = fence;
}
-static boolean
+static bool
etna_screen_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx,
struct pipe_fence_handle *fence, uint64_t timeout)
{
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c
index bd75ca90b8a..89e016d0104 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query.c
@@ -58,11 +58,11 @@ etna_destroy_query(struct pipe_context *pctx, struct pipe_query *pq)
q->funcs->destroy_query(etna_context(pctx), q);
}
-static boolean
+static bool
etna_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct etna_query *q = etna_query(pq);
- boolean ret;
+ bool ret;
if (q->active)
return false;
@@ -87,9 +87,9 @@ etna_end_query(struct pipe_context *pctx, struct pipe_query *pq)
return true;
}
-static boolean
+static bool
etna_get_query_result(struct pipe_context *pctx, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_query *q = etna_query(pq);
@@ -134,7 +134,7 @@ etna_get_driver_query_group_info(struct pipe_screen *pscreen, unsigned index,
}
static void
-etna_set_active_query_state(struct pipe_context *pctx, boolean enable)
+etna_set_active_query_state(struct pipe_context *pctx, bool enable)
{
struct etna_context *ctx = etna_context(pctx);
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.h b/src/gallium/drivers/etnaviv/etnaviv_query.h
index d738fb9e814..f1aa1499088 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query.h
@@ -35,10 +35,10 @@ struct etna_query;
struct etna_query_funcs {
void (*destroy_query)(struct etna_context *ctx, struct etna_query *q);
- boolean (*begin_query)(struct etna_context *ctx, struct etna_query *q);
+ bool (*begin_query)(struct etna_context *ctx, struct etna_query *q);
void (*end_query)(struct etna_context *ctx, struct etna_query *q);
- boolean (*get_query_result)(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result);
+ bool (*get_query_result)(struct etna_context *ctx, struct etna_query *q,
+ bool wait, union pipe_query_result *result);
};
struct etna_query {
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_hw.c b/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
index 0f3cd7257b6..e60d90dbb05 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_hw.c
@@ -138,7 +138,7 @@ realloc_query_bo(struct etna_context *ctx, struct etna_hw_query *hq)
etna_bo_cpu_fini(rsc->bo);
}
-static boolean
+static bool
etna_hw_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_hw_query *hq = etna_hw_query(q);
@@ -168,9 +168,9 @@ etna_hw_end_query(struct etna_context *ctx, struct etna_query *q)
list_delinit(&hq->node);
}
-static boolean
+static bool
etna_hw_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_hw_query *hq = etna_hw_query(q);
struct etna_resource *rsc = etna_resource(hq->prsc);
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
index c63ed830491..1c9061f8abb 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
@@ -518,7 +518,7 @@ etna_pm_destroy_query(struct etna_context *ctx, struct etna_query *q)
FREE(pq);
}
-static boolean
+static bool
etna_pm_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_pm_query *pq = etna_pm_query(q);
@@ -537,9 +537,9 @@ etna_pm_end_query(struct etna_context *ctx, struct etna_query *q)
etna_pm_query_get(ctx->stream, q, ETNA_PM_PROCESS_POST);
}
-static boolean
+static bool
etna_pm_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_pm_query *pq = etna_pm_query(q);
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
index bec8d0d588a..b9fc1cca26b 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
@@ -56,7 +56,7 @@ read_counter(struct etna_context *ctx, unsigned type)
return 0;
}
-static boolean
+static bool
etna_sw_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_sw_query *sq = etna_sw_query(q);
@@ -74,9 +74,9 @@ etna_sw_end_query(struct etna_context *ctx, struct etna_query *q)
sq->end_value = read_counter(ctx, q->type);
}
-static boolean
+static bool
etna_sw_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_sw_query *sq = etna_sw_query(q);
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index d5abe3adf70..48fad858fc2 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -140,7 +140,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
return true;
}
-static boolean
+static bool
etna_screen_can_create_resource(struct pipe_screen *pscreen,
const struct pipe_resource *templat)
{
@@ -624,7 +624,7 @@ fail:
return NULL;
}
-static boolean
+static bool
etna_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *prsc,
@@ -649,16 +649,16 @@ etna_resource_get_handle(struct pipe_screen *pscreen,
return etna_bo_get_name(rsc->bo, &handle->handle) == 0;
} else if (handle->type == WINSYS_HANDLE_TYPE_KMS) {
if (renderonly_get_handle(scanout, handle)) {
- return TRUE;
+ return true;
} else {
handle->handle = etna_bo_handle(rsc->bo);
- return TRUE;
+ return true;
}
} else if (handle->type == WINSYS_HANDLE_TYPE_FD) {
handle->handle = etna_bo_dmabuf(rsc->bo);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 62ebd9d0564..91cda51cdc3 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -386,7 +386,7 @@ gpu_supports_texure_format(struct etna_screen *screen, uint32_t fmt,
return true;
}
-static boolean
+static bool
etna_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
@@ -403,7 +403,7 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen,
target != PIPE_TEXTURE_3D &&
target != PIPE_TEXTURE_CUBE &&
target != PIPE_TEXTURE_RECT)
- return FALSE;
+ return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;