diff options
author | Ilia Mirkin <[email protected]> | 2019-07-04 11:41:41 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2019-07-22 22:13:51 -0400 |
commit | 0e30c6b8a7e84211bb417362ec73f24ef134ae34 (patch) | |
tree | 7567deb41938d64e8fadcac7514deece8f7c1613 /src/gallium/drivers/swr/swr_query.cpp | |
parent | 365f24705f9703962b6749f4fafe7cd92d9c60b1 (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/swr/swr_query.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_query.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/drivers/swr/swr_query.cpp b/src/gallium/drivers/swr/swr_query.cpp index ea31de630b3..8c49a2ebb29 100644 --- a/src/gallium/drivers/swr/swr_query.cpp +++ b/src/gallium/drivers/swr/swr_query.cpp @@ -72,10 +72,10 @@ swr_destroy_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool swr_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *result) { struct swr_query *pq = swr_query(q); @@ -83,7 +83,7 @@ swr_get_query_result(struct pipe_context *pipe, if (pq->fence) { if (!wait && !swr_is_fence_done(pq->fence)) - return FALSE; + return false; swr_fence_finish(pipe->screen, NULL, pq->fence, 0); swr_fence_reference(pipe->screen, &pq->fence, NULL); @@ -98,7 +98,7 @@ swr_get_query_result(struct pipe_context *pipe, result->b = pq->result.core.DepthPassCount != 0; break; case PIPE_QUERY_GPU_FINISHED: - result->b = TRUE; + result->b = true; break; /* Counters */ case PIPE_QUERY_OCCLUSION_COUNTER: @@ -155,10 +155,10 @@ swr_get_query_result(struct pipe_context *pipe, break; } - return TRUE; + return true; } -static boolean +static bool swr_begin_query(struct pipe_context *pipe, struct pipe_query *q) { struct swr_context *ctx = swr_context(pipe); @@ -229,15 +229,15 @@ swr_end_query(struct pipe_context *pipe, struct pipe_query *q) } -boolean +bool swr_check_render_cond(struct pipe_context *pipe) { struct swr_context *ctx = swr_context(pipe); - boolean b, wait; + bool b, wait; uint64_t result; if (!ctx->render_cond_query) - return TRUE; /* no query predicate, draw normally */ + return true; /* no query predicate, draw normally */ wait = (ctx->render_cond_mode == PIPE_RENDER_COND_WAIT || ctx->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT); @@ -247,12 +247,12 @@ swr_check_render_cond(struct pipe_context *pipe) if (b) return ((!result) == ctx->render_cond_cond); else - return TRUE; + return true; } static void -swr_set_active_query_state(struct pipe_context *pipe, boolean enable) +swr_set_active_query_state(struct pipe_context *pipe, bool enable) { } |