From 0e30c6b8a7e84211bb417362ec73f24ef134ae34 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Thu, 4 Jul 2019 11:41:41 -0400 Subject: gallium: switch boolean -> bool at the interface definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marek Olšák Acked-by: Alyssa Rosenzweig --- src/gallium/auxiliary/driver_ddebug/dd_context.c | 12 ++++++------ src/gallium/auxiliary/driver_ddebug/dd_draw.c | 6 +++--- src/gallium/auxiliary/driver_ddebug/dd_pipe.h | 2 +- src/gallium/auxiliary/driver_ddebug/dd_screen.c | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/gallium/auxiliary/driver_ddebug') diff --git a/src/gallium/auxiliary/driver_ddebug/dd_context.c b/src/gallium/auxiliary/driver_ddebug/dd_context.c index 001a69fa6c8..311eca7c1ae 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_context.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_context.c @@ -106,7 +106,7 @@ dd_context_destroy_query(struct pipe_context *_pipe, FREE(query); } -static boolean +static bool dd_context_begin_query(struct pipe_context *_pipe, struct pipe_query *query) { struct dd_context *dctx = dd_context(_pipe); @@ -124,9 +124,9 @@ dd_context_end_query(struct pipe_context *_pipe, struct pipe_query *query) return pipe->end_query(pipe, dd_query_unwrap(query)); } -static boolean +static bool dd_context_get_query_result(struct pipe_context *_pipe, - struct pipe_query *query, boolean wait, + struct pipe_query *query, bool wait, union pipe_query_result *result) { struct pipe_context *pipe = dd_context(_pipe)->pipe; @@ -135,7 +135,7 @@ dd_context_get_query_result(struct pipe_context *_pipe, } static void -dd_context_set_active_query_state(struct pipe_context *_pipe, boolean enable) +dd_context_set_active_query_state(struct pipe_context *_pipe, bool enable) { struct pipe_context *pipe = dd_context(_pipe)->pipe; @@ -144,7 +144,7 @@ dd_context_set_active_query_state(struct pipe_context *_pipe, boolean enable) static void dd_context_render_condition(struct pipe_context *_pipe, - struct pipe_query *query, boolean condition, + struct pipe_query *query, bool condition, enum pipe_render_cond_flag mode) { struct dd_context *dctx = dd_context(_pipe); @@ -411,7 +411,7 @@ static void dd_context_set_tess_state(struct pipe_context *_pipe, } static void dd_context_set_window_rectangles(struct pipe_context *_pipe, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rects) { diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index b25ac87e543..f9d9ed54b3e 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -1397,7 +1397,7 @@ dd_context_blit(struct pipe_context *_pipe, const struct pipe_blit_info *info) dd_after_draw(dctx, record); } -static boolean +static bool dd_context_generate_mipmap(struct pipe_context *_pipe, struct pipe_resource *res, enum pipe_format format, @@ -1409,7 +1409,7 @@ dd_context_generate_mipmap(struct pipe_context *_pipe, struct dd_context *dctx = dd_context(_pipe); struct pipe_context *pipe = dctx->pipe; struct dd_draw_record *record = dd_create_record(dctx); - boolean result; + bool result; record->call.type = CALL_GENERATE_MIPMAP; record->call.info.generate_mipmap.res = NULL; @@ -1430,7 +1430,7 @@ dd_context_generate_mipmap(struct pipe_context *_pipe, static void dd_context_get_query_result_resource(struct pipe_context *_pipe, struct pipe_query *query, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, diff --git a/src/gallium/auxiliary/driver_ddebug/dd_pipe.h b/src/gallium/auxiliary/driver_ddebug/dd_pipe.h index 708b2463e2b..1c3487c2011 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_pipe.h +++ b/src/gallium/auxiliary/driver_ddebug/dd_pipe.h @@ -128,7 +128,7 @@ struct call_draw_info { struct call_get_query_result_resource { struct pipe_query *query; enum pipe_query_type query_type; - boolean wait; + bool wait; enum pipe_query_value_type result_type; int index; struct pipe_resource *resource; diff --git a/src/gallium/auxiliary/driver_ddebug/dd_screen.c b/src/gallium/auxiliary/driver_ddebug/dd_screen.c index f3bd0798511..12d31b5fb33 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_screen.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_screen.c @@ -142,7 +142,7 @@ dd_screen_context_create(struct pipe_screen *_screen, void *priv, screen->context_create(screen, priv, flags)); } -static boolean +static bool dd_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, @@ -156,7 +156,7 @@ dd_screen_is_format_supported(struct pipe_screen *_screen, storage_sample_count, tex_usage); } -static boolean +static bool dd_screen_can_create_resource(struct pipe_screen *_screen, const struct pipe_resource *templat) { @@ -298,7 +298,7 @@ dd_screen_resource_destroy(struct pipe_screen *_screen, screen->resource_destroy(screen, res); } -static boolean +static bool dd_screen_resource_get_handle(struct pipe_screen *_screen, struct pipe_context *_pipe, struct pipe_resource *resource, @@ -347,7 +347,7 @@ dd_screen_fence_reference(struct pipe_screen *_screen, screen->fence_reference(screen, pdst, src); } -static boolean +static bool dd_screen_fence_finish(struct pipe_screen *_screen, struct pipe_context *_ctx, struct pipe_fence_handle *fence, -- cgit v1.2.3