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/r300 | |
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/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 28 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.h | 10 |
4 files changed, 34 insertions, 34 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 0ccc753147b..f9e4aca0e92 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -87,8 +87,8 @@ void r300_resume_query(struct r300_context *r300, r300_mark_atom_dirty(r300, &r300->query_start); } -static boolean r300_begin_query(struct pipe_context* pipe, - struct pipe_query* query) +static bool r300_begin_query(struct pipe_context* pipe, + struct pipe_query* query) { struct r300_context* r300 = r300_context(pipe); struct r300_query* q = r300_query(query); @@ -138,10 +138,10 @@ static bool r300_end_query(struct pipe_context* pipe, return true; } -static boolean r300_get_query_result(struct pipe_context* pipe, - struct pipe_query* query, - boolean wait, - union pipe_query_result *vresult) +static bool r300_get_query_result(struct pipe_context* pipe, + struct pipe_query* query, + bool wait, + union pipe_query_result *vresult) { struct r300_context* r300 = r300_context(pipe); struct r300_query *q = r300_query(query); @@ -184,12 +184,12 @@ static boolean r300_get_query_result(struct pipe_context* pipe, static void r300_render_condition(struct pipe_context *pipe, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct r300_context *r300 = r300_context(pipe); union pipe_query_result result; - boolean wait; + bool wait; r300->skip_rendering = FALSE; @@ -209,7 +209,7 @@ static void r300_render_condition(struct pipe_context *pipe, } static void -r300_set_active_query_state(struct pipe_context *pipe, boolean enable) +r300_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 99231f2ad60..64ff5bbc67b 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -638,12 +638,12 @@ static bool r300_is_blending_supported(struct r300_screen *rscreen, return false; } -static boolean r300_is_format_supported(struct pipe_screen* screen, - enum pipe_format format, - enum pipe_texture_target target, - unsigned sample_count, - unsigned storage_sample_count, - unsigned usage) +static bool r300_is_format_supported(struct pipe_screen* screen, + enum pipe_format format, + enum pipe_texture_target target, + unsigned sample_count, + unsigned storage_sample_count, + unsigned usage) { uint32_t retval = 0; boolean is_r500 = r300_screen(screen)->caps.is_r500; @@ -683,7 +683,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, if (usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT)) { - return FALSE; + return false; } desc = util_format_description(format); @@ -695,18 +695,18 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, !util_format_is_rgba1010102_variant(desc) && format != PIPE_FORMAT_R16G16B16A16_FLOAT && format != PIPE_FORMAT_R16G16B16X16_FLOAT) { - return FALSE; + return false; } } else { /* Only allow depth/stencil, RGBA8. */ if (!util_format_is_depth_or_stencil(format) && !util_format_is_rgba8_variant(desc)) { - return FALSE; + return false; } } break; default: - return FALSE; + return false; } /* Check sampler format support. */ @@ -795,10 +795,10 @@ static void r300_fence_reference(struct pipe_screen *screen, rws->fence_reference(ptr, fence); } -static boolean r300_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout) +static bool r300_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout) { struct radeon_winsys *rws = r300_screen(screen)->rws; diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index a9dc869b87c..689341644fd 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -1035,17 +1035,17 @@ static void r300_texture_destroy(struct pipe_screen *screen, FREE(tex); } -boolean r300_resource_get_handle(struct pipe_screen* screen, - struct pipe_context *ctx, - struct pipe_resource *texture, - struct winsys_handle *whandle, - unsigned usage) +bool r300_resource_get_handle(struct pipe_screen* screen, + struct pipe_context *ctx, + struct pipe_resource *texture, + struct winsys_handle *whandle, + unsigned usage) { struct radeon_winsys *rws = r300_screen(screen)->rws; struct r300_resource* tex = (struct r300_resource*)texture; if (!tex) { - return FALSE; + return false; } return rws->buffer_get_handle(rws, tex->buf, tex->tex.stride_in_bytes[0], diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h index 33416710e43..bfc72962c5e 100644 --- a/src/gallium/drivers/r300/r300_texture.h +++ b/src/gallium/drivers/r300/r300_texture.h @@ -61,11 +61,11 @@ void r300_texture_setup_format_state(struct r300_screen *screen, unsigned height0_override, struct r300_texture_format_state *out); -boolean r300_resource_get_handle(struct pipe_screen* screen, - struct pipe_context *ctx, - struct pipe_resource *texture, - struct winsys_handle *whandle, - unsigned usage); +bool r300_resource_get_handle(struct pipe_screen* screen, + struct pipe_context *ctx, + struct pipe_resource *texture, + struct winsys_handle *whandle, + unsigned usage); struct pipe_resource* r300_texture_from_handle(struct pipe_screen* screen, |