From: Ilia Mirkin Date: Thu, 4 Jul 2019 15:41:41 +0000 (-0400) Subject: gallium: switch boolean -> bool at the interface definitions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e30c6b8a7e84211bb417362ec73f24ef134ae34;p=mesa.git 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 Reviewed-by: Marek Olšák Acked-by: Alyssa Rosenzweig --- 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, diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index 2a4d3ebab63..ff93db86bd3 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -32,7 +32,7 @@ #include "util/u_upload_mgr.h" #include "noop_public.h" -DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", false) void noop_init_state_functions(struct pipe_context *ctx); @@ -59,7 +59,7 @@ static void noop_destroy_query(struct pipe_context *ctx, struct pipe_query *quer FREE(query); } -static boolean noop_begin_query(struct pipe_context *ctx, struct pipe_query *query) +static bool noop_begin_query(struct pipe_context *ctx, struct pipe_query *query) { return true; } @@ -69,19 +69,19 @@ static bool noop_end_query(struct pipe_context *ctx, struct pipe_query *query) return true; } -static boolean noop_get_query_result(struct pipe_context *ctx, - struct pipe_query *query, - boolean wait, - union pipe_query_result *vresult) +static bool noop_get_query_result(struct pipe_context *ctx, + struct pipe_query *query, + bool wait, + union pipe_query_result *vresult) { uint64_t *result = (uint64_t*)vresult; *result = 0; - return TRUE; + return true; } static void -noop_set_active_query_state(struct pipe_context *pipe, boolean enable) +noop_set_active_query_state(struct pipe_context *pipe, bool enable) { } @@ -135,11 +135,11 @@ static struct pipe_resource *noop_resource_from_handle(struct pipe_screen *scree return noop_resource; } -static boolean noop_resource_get_handle(struct pipe_screen *pscreen, - struct pipe_context *ctx, - struct pipe_resource *resource, - struct winsys_handle *handle, - unsigned usage) +static bool noop_resource_get_handle(struct pipe_screen *pscreen, + struct pipe_context *ctx, + struct pipe_resource *resource, + struct winsys_handle *handle, + unsigned usage) { struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)pscreen; struct pipe_screen *screen = noop_screen->oscreen; @@ -296,13 +296,13 @@ static void noop_destroy_context(struct pipe_context *ctx) FREE(ctx); } -static boolean noop_generate_mipmap(struct pipe_context *ctx, - struct pipe_resource *resource, - enum pipe_format format, - unsigned base_level, - unsigned last_level, - unsigned first_layer, - unsigned last_layer) +static bool noop_generate_mipmap(struct pipe_context *ctx, + struct pipe_resource *resource, + enum pipe_format format, + unsigned base_level, + unsigned last_level, + unsigned first_layer, + unsigned last_layer) { return true; } @@ -423,12 +423,12 @@ static int noop_get_compute_param(struct pipe_screen *pscreen, return screen->get_compute_param(screen, ir_type, param, ret); } -static boolean noop_is_format_supported(struct pipe_screen* pscreen, - enum pipe_format format, - enum pipe_texture_target target, - unsigned sample_count, - unsigned storage_sample_count, - unsigned usage) +static bool noop_is_format_supported(struct pipe_screen* pscreen, + enum pipe_format format, + enum pipe_texture_target target, + unsigned sample_count, + unsigned storage_sample_count, + unsigned usage) { struct pipe_screen *screen = ((struct noop_pipe_screen*)pscreen)->oscreen; @@ -456,10 +456,10 @@ static void noop_fence_reference(struct pipe_screen *screen, { } -static boolean noop_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout) +static bool noop_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout) { return true; } diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c b/src/gallium/auxiliary/driver_noop/noop_state.c index 11e2c173a37..2ab18b55255 100644 --- a/src/gallium/auxiliary/driver_noop/noop_state.c +++ b/src/gallium/auxiliary/driver_noop/noop_state.c @@ -248,7 +248,7 @@ static void noop_set_stream_output_targets(struct pipe_context *ctx, } static void noop_set_window_rectangles(struct pipe_context *ctx, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rects) { diff --git a/src/gallium/auxiliary/driver_rbug/rbug_context.c b/src/gallium/auxiliary/driver_rbug/rbug_context.c index e1f3c4f2844..adf3493aab5 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_context.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_context.c @@ -63,7 +63,7 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag) } else if ((rb_pipe->draw_rule.blocker & flag) && (rb_pipe->draw_blocker & RBUG_BLOCK_RULE)) { unsigned k; - boolean block = FALSE; + bool block = false; unsigned sh; debug_printf("%s (%p %p) (%p %p) (%p %u) (%p %u)\n", __FUNCTION__, @@ -76,21 +76,21 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag) for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) { if (rb_pipe->draw_rule.shader[sh] && rb_pipe->draw_rule.shader[sh] == rb_pipe->curr.shader[sh]) - block = TRUE; + block = true; } if (rb_pipe->draw_rule.surf && rb_pipe->draw_rule.surf == rb_pipe->curr.zsbuf) - block = TRUE; + block = true; if (rb_pipe->draw_rule.surf) for (k = 0; k < rb_pipe->curr.nr_cbufs; k++) if (rb_pipe->draw_rule.surf == rb_pipe->curr.cbufs[k]) - block = TRUE; + block = true; if (rb_pipe->draw_rule.texture) { for (sh = 0; sh < ARRAY_SIZE(rb_pipe->curr.num_views); sh++) { for (k = 0; k < rb_pipe->curr.num_views[sh]; k++) { if (rb_pipe->draw_rule.texture == rb_pipe->curr.texs[sh][k]) { - block = TRUE; + block = true; sh = PIPE_SHADER_TYPES; /* to break out of both loops */ break; } @@ -164,13 +164,13 @@ rbug_destroy_query(struct pipe_context *_pipe, mtx_unlock(&rb_pipe->call_mutex); } -static boolean +static bool rbug_begin_query(struct pipe_context *_pipe, struct pipe_query *query) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; - boolean ret; + bool ret; mtx_lock(&rb_pipe->call_mutex); ret = pipe->begin_query(pipe, query); @@ -194,15 +194,15 @@ rbug_end_query(struct pipe_context *_pipe, return ret; } -static boolean +static bool rbug_get_query_result(struct pipe_context *_pipe, struct pipe_query *query, - boolean wait, + bool wait, union pipe_query_result *result) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; - boolean ret; + bool ret; mtx_lock(&rb_pipe->call_mutex); ret = pipe->get_query_result(pipe, @@ -215,7 +215,7 @@ rbug_get_query_result(struct pipe_context *_pipe, } static void -rbug_set_active_query_state(struct pipe_context *_pipe, boolean enable) +rbug_set_active_query_state(struct pipe_context *_pipe, bool enable) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; @@ -1266,7 +1266,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) rbug_screen_add_to_list(rb_screen, contexts, rb_pipe); - if (debug_get_bool_option("GALLIUM_RBUG_START_BLOCKED", FALSE)) { + if (debug_get_bool_option("GALLIUM_RBUG_START_BLOCKED", false)) { rb_pipe->draw_blocked = RBUG_BLOCK_BEFORE; } diff --git a/src/gallium/auxiliary/driver_rbug/rbug_core.c b/src/gallium/auxiliary/driver_rbug/rbug_core.c index 76394039b9b..66ac79385e1 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_core.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_core.c @@ -55,7 +55,7 @@ struct rbug_rbug struct rbug_screen *rb_screen; struct rbug_connection *con; thrd_t thread; - boolean running; + bool running; }; int @@ -713,7 +713,7 @@ err: return -EINVAL; } -static boolean +static bool rbug_header(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t serial) { int ret = 0; @@ -774,7 +774,7 @@ rbug_header(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t seri if (ret) rbug_send_error_reply(tr_rbug->con, serial, ret, NULL); - return TRUE; + return true; } static void @@ -856,7 +856,7 @@ rbug_start(struct rbug_screen *rb_screen) return NULL; tr_rbug->rb_screen = rb_screen; - tr_rbug->running = TRUE; + tr_rbug->running = true; tr_rbug->thread = u_thread_create(rbug_thread, tr_rbug); return tr_rbug; diff --git a/src/gallium/auxiliary/driver_rbug/rbug_objects.h b/src/gallium/auxiliary/driver_rbug/rbug_objects.h index 02973e07996..1a16eb416a4 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_objects.h +++ b/src/gallium/auxiliary/driver_rbug/rbug_objects.h @@ -64,7 +64,7 @@ struct rbug_shader void *replaced_tokens; enum rbug_shader_type type; - boolean disabled; + bool disabled; }; diff --git a/src/gallium/auxiliary/driver_rbug/rbug_public.h b/src/gallium/auxiliary/driver_rbug/rbug_public.h index 83f9c94e31f..d17cf98b807 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_public.h +++ b/src/gallium/auxiliary/driver_rbug/rbug_public.h @@ -38,7 +38,7 @@ struct pipe_context; struct pipe_screen * rbug_screen_create(struct pipe_screen *screen); -boolean +bool rbug_enabled(void); #ifdef __cplusplus diff --git a/src/gallium/auxiliary/driver_rbug/rbug_screen.c b/src/gallium/auxiliary/driver_rbug/rbug_screen.c index 6d93fb8e953..2b00e34dbc5 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_screen.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_screen.c @@ -37,7 +37,7 @@ #include "rbug_context.h" #include "rbug_objects.h" -DEBUG_GET_ONCE_BOOL_OPTION(rbug, "GALLIUM_RBUG", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(rbug, "GALLIUM_RBUG", false) static void rbug_screen_destroy(struct pipe_screen *_screen) @@ -119,7 +119,7 @@ rbug_screen_get_paramf(struct pipe_screen *_screen, param); } -static boolean +static bool rbug_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, @@ -198,7 +198,7 @@ rbug_screen_check_resource_capability(struct pipe_screen *_screen, return screen->check_resource_capability(screen, resource, bind); } -static boolean +static bool rbug_screen_resource_get_handle(struct pipe_screen *_screen, struct pipe_context *_pipe, struct pipe_resource *_resource, @@ -279,7 +279,7 @@ rbug_screen_fence_reference(struct pipe_screen *_screen, fence); } -static boolean +static bool rbug_screen_fence_finish(struct pipe_screen *_screen, struct pipe_context *_ctx, struct pipe_fence_handle *fence, @@ -292,7 +292,7 @@ rbug_screen_fence_finish(struct pipe_screen *_screen, return screen->fence_finish(screen, ctx, fence, timeout); } -boolean +bool rbug_enabled() { return debug_get_option_rbug(); diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index 70565db851d..232fea80504 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -167,13 +167,13 @@ trace_context_destroy_query(struct pipe_context *_pipe, } -static boolean +static bool trace_context_begin_query(struct pipe_context *_pipe, struct pipe_query *query) { struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; - boolean ret; + bool ret; query = trace_query_unwrap(query); @@ -211,17 +211,17 @@ trace_context_end_query(struct pipe_context *_pipe, } -static boolean +static bool trace_context_get_query_result(struct pipe_context *_pipe, struct pipe_query *_query, - boolean wait, + bool wait, union pipe_query_result *result) { struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; struct trace_query *tr_query = trace_query(_query); struct pipe_query *query = tr_query->query; - boolean ret; + bool ret; trace_dump_call_begin("pipe_context", "get_query_result"); @@ -248,7 +248,7 @@ trace_context_get_query_result(struct pipe_context *_pipe, static void trace_context_set_active_query_state(struct pipe_context *_pipe, - boolean enable) + bool enable) { struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; @@ -1356,7 +1356,7 @@ trace_context_fence_server_sync(struct pipe_context *_pipe, } -static inline boolean +static inline bool trace_context_generate_mipmap(struct pipe_context *_pipe, struct pipe_resource *res, enum pipe_format format, @@ -1367,7 +1367,7 @@ trace_context_generate_mipmap(struct pipe_context *_pipe, { struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; - boolean ret; + bool ret; trace_dump_call_begin("pipe_context", "generate_mipmap"); @@ -1640,7 +1640,7 @@ trace_context_set_context_param(struct pipe_context *_context, static void trace_context_render_condition(struct pipe_context *_context, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct trace_context *tr_context = trace_context(_context); diff --git a/src/gallium/auxiliary/driver_trace/tr_dump.c b/src/gallium/auxiliary/driver_trace/tr_dump.c index 185df214556..5bee07dd54e 100644 --- a/src/gallium/auxiliary/driver_trace/tr_dump.c +++ b/src/gallium/auxiliary/driver_trace/tr_dump.c @@ -57,11 +57,11 @@ #include "tr_texture.h" -static boolean close_stream = FALSE; +static bool close_stream = false; static FILE *stream = NULL; static mtx_t call_mutex = _MTX_INITIALIZER_NP; static long unsigned call_no = 0; -static boolean dumping = FALSE; +static bool dumping = false; static inline void @@ -178,7 +178,7 @@ trace_dump_trace_close(void) trace_dump_writes("\n"); if (close_stream) { fclose(stream); - close_stream = FALSE; + close_stream = false; stream = NULL; } call_no = 0; @@ -199,30 +199,30 @@ trace_dump_call_time(int64_t time) } -boolean +bool trace_dump_trace_begin(void) { const char *filename; filename = debug_get_option("GALLIUM_TRACE", NULL); if (!filename) - return FALSE; + return false; if (!stream) { if (strcmp(filename, "stderr") == 0) { - close_stream = FALSE; + close_stream = false; stream = stderr; } else if (strcmp(filename, "stdout") == 0) { - close_stream = FALSE; + close_stream = false; stream = stdout; } else { - close_stream = TRUE; + close_stream = true; stream = fopen(filename, "wt"); if (!stream) - return FALSE; + return false; } trace_dump_writes("\n"); @@ -236,12 +236,12 @@ trace_dump_trace_begin(void) atexit(trace_dump_trace_close); } - return TRUE; + return true; } -boolean trace_dump_trace_enabled(void) +bool trace_dump_trace_enabled(void) { - return stream ? TRUE : FALSE; + return stream ? true : false; } /* @@ -264,15 +264,15 @@ void trace_dump_call_unlock(void) void trace_dumping_start_locked(void) { - dumping = TRUE; + dumping = true; } void trace_dumping_stop_locked(void) { - dumping = FALSE; + dumping = false; } -boolean trace_dumping_enabled_locked(void) +bool trace_dumping_enabled_locked(void) { return dumping; } @@ -291,9 +291,9 @@ void trace_dumping_stop(void) mtx_unlock(&call_mutex); } -boolean trace_dumping_enabled(void) +bool trace_dumping_enabled(void) { - boolean ret; + bool ret; mtx_lock(&call_mutex); ret = trace_dumping_enabled_locked(); mtx_unlock(&call_mutex); diff --git a/src/gallium/auxiliary/driver_trace/tr_dump.h b/src/gallium/auxiliary/driver_trace/tr_dump.h index 7a268e31c46..3c14edfc903 100644 --- a/src/gallium/auxiliary/driver_trace/tr_dump.h +++ b/src/gallium/auxiliary/driver_trace/tr_dump.h @@ -47,8 +47,8 @@ struct pipe_box; * * Opening the trace file and checking if that is opened. */ -boolean trace_dump_trace_begin(void); -boolean trace_dump_trace_enabled(void); +bool trace_dump_trace_begin(void); +bool trace_dump_trace_enabled(void); void trace_dump_trace_flush(void); /* @@ -68,10 +68,10 @@ void trace_dump_call_unlock(void); */ void trace_dumping_start_locked(void); void trace_dumping_stop_locked(void); -boolean trace_dumping_enabled_locked(void); +bool trace_dumping_enabled_locked(void); void trace_dumping_start(void); void trace_dumping_stop(void); -boolean trace_dumping_enabled(void); +bool trace_dumping_enabled(void); void trace_dump_call_begin_locked(const char *klass, const char *method); void trace_dump_call_end_locked(void); diff --git a/src/gallium/auxiliary/driver_trace/tr_dump_defines.h b/src/gallium/auxiliary/driver_trace/tr_dump_defines.h index 7f969a30333..f6e94addfa1 100644 --- a/src/gallium/auxiliary/driver_trace/tr_dump_defines.h +++ b/src/gallium/auxiliary/driver_trace/tr_dump_defines.h @@ -50,7 +50,7 @@ trace_dump_query_type(unsigned value) if (!trace_dumping_enabled_locked()) return; - trace_dump_enum(util_str_query_type(value, FALSE)); + trace_dump_enum(util_str_query_type(value, false)); } diff --git a/src/gallium/auxiliary/driver_trace/tr_public.h b/src/gallium/auxiliary/driver_trace/tr_public.h index b03133f8d97..648ead18746 100644 --- a/src/gallium/auxiliary/driver_trace/tr_public.h +++ b/src/gallium/auxiliary/driver_trace/tr_public.h @@ -40,7 +40,7 @@ struct pipe_context; struct pipe_screen * trace_screen_create(struct pipe_screen *screen); -boolean +bool trace_enabled(void); #ifdef __cplusplus diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c index d14d46d123f..41243cf72af 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.c +++ b/src/gallium/auxiliary/driver_trace/tr_screen.c @@ -38,7 +38,7 @@ #include "tr_public.h" -static boolean trace = FALSE; +static bool trace = false; static const char * trace_screen_get_name(struct pipe_screen *_screen) @@ -220,7 +220,7 @@ trace_screen_get_compute_param(struct pipe_screen *_screen, } -static boolean +static bool trace_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, @@ -230,7 +230,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; - boolean result; + bool result; trace_dump_call_begin("pipe_screen", "is_format_supported"); @@ -390,7 +390,7 @@ trace_screen_check_resource_capability(struct pipe_screen *_screen, return screen->check_resource_capability(screen, resource, bind); } -static boolean +static bool trace_screen_resource_get_handle(struct pipe_screen *_screen, struct pipe_context *_pipe, struct pipe_resource *resource, @@ -532,7 +532,7 @@ trace_screen_fence_get_fd(struct pipe_screen *_screen, } -static boolean +static bool trace_screen_fence_finish(struct pipe_screen *_screen, struct pipe_context *_ctx, struct pipe_fence_handle *fence, @@ -637,18 +637,18 @@ trace_screen_destroy(struct pipe_screen *_screen) FREE(tr_scr); } -boolean +bool trace_enabled(void) { - static boolean firstrun = TRUE; + static bool firstrun = true; if (!firstrun) return trace; - firstrun = FALSE; + firstrun = false; if(trace_dump_trace_begin()) { trace_dumping_start(); - trace = TRUE; + trace = true; } return trace; diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 8f5ed4a5a67..820a8fe4443 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -309,7 +309,7 @@ threaded_context_unwrap_sync(struct pipe_context *pipe) *p = deref(param); \ } -TC_FUNC1(set_active_query_state, flags, , boolean, , *) +TC_FUNC1(set_active_query_state, flags, , bool, , *) TC_FUNC1(set_blend_color, blend_color, const, struct pipe_blend_color, *, ) TC_FUNC1(set_stencil_ref, stencil_ref, const, struct pipe_stencil_ref, *, ) @@ -371,7 +371,7 @@ tc_call_begin_query(struct pipe_context *pipe, union tc_payload *payload) pipe->begin_query(pipe, payload->query); } -static boolean +static bool tc_begin_query(struct pipe_context *_pipe, struct pipe_query *query) { struct threaded_context *tc = threaded_context(_pipe); @@ -414,9 +414,9 @@ tc_end_query(struct pipe_context *_pipe, struct pipe_query *query) return true; /* we don't care about the return value for this call */ } -static boolean +static bool tc_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 threaded_context *tc = threaded_context(_pipe); @@ -440,7 +440,7 @@ tc_get_query_result(struct pipe_context *_pipe, struct tc_query_result_resource { struct pipe_query *query; - boolean wait; + bool wait; enum pipe_query_value_type result_type; int index; struct pipe_resource *resource; @@ -460,7 +460,7 @@ tc_call_get_query_result_resource(struct pipe_context *pipe, static void tc_get_query_result_resource(struct pipe_context *_pipe, - struct pipe_query *query, boolean wait, + struct pipe_query *query, bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, unsigned offset) { @@ -492,7 +492,7 @@ tc_call_render_condition(struct pipe_context *pipe, union tc_payload *payload) static void tc_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 threaded_context *tc = threaded_context(_pipe); @@ -771,7 +771,7 @@ tc_call_set_window_rectangles(struct pipe_context *pipe, } static void -tc_set_window_rectangles(struct pipe_context *_pipe, boolean include, +tc_set_window_rectangles(struct pipe_context *_pipe, bool include, unsigned count, const struct pipe_scissor_state *rects) { @@ -2232,7 +2232,7 @@ tc_call_generate_mipmap(struct pipe_context *pipe, union tc_payload *payload) pipe_resource_reference(&p->res, NULL); } -static boolean +static bool tc_generate_mipmap(struct pipe_context *_pipe, struct pipe_resource *res, enum pipe_format format, diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c index 1ad47b00399..5bc47b09f38 100644 --- a/src/gallium/auxiliary/util/u_transfer.c +++ b/src/gallium/auxiliary/util/u_transfer.c @@ -85,9 +85,9 @@ void u_default_texture_subdata(struct pipe_context *pipe, } -boolean u_default_resource_get_handle(UNUSED struct pipe_screen *screen, - UNUSED struct pipe_resource *resource, - UNUSED struct winsys_handle *handle) +bool u_default_resource_get_handle(UNUSED struct pipe_screen *screen, + UNUSED struct pipe_resource *resource, + UNUSED struct winsys_handle *handle) { return FALSE; } @@ -114,11 +114,11 @@ u_resource( struct pipe_resource *res ) return (struct u_resource *)res; } -boolean u_resource_get_handle_vtbl(struct pipe_screen *screen, - UNUSED struct pipe_context *ctx, - struct pipe_resource *resource, - struct winsys_handle *handle, - UNUSED unsigned usage) +bool u_resource_get_handle_vtbl(struct pipe_screen *screen, + UNUSED struct pipe_context *ctx, + struct pipe_resource *resource, + struct winsys_handle *handle, + UNUSED unsigned usage) { struct u_resource *ur = u_resource(resource); return ur->vtbl->resource_get_handle(screen, resource, handle); diff --git a/src/gallium/auxiliary/util/u_transfer.h b/src/gallium/auxiliary/util/u_transfer.h index 14084983daf..9ca4d180c05 100644 --- a/src/gallium/auxiliary/util/u_transfer.h +++ b/src/gallium/auxiliary/util/u_transfer.h @@ -14,9 +14,9 @@ struct winsys_handle; extern "C" { #endif -boolean u_default_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *handle); +bool u_default_resource_get_handle(struct pipe_screen *screen, + struct pipe_resource *resource, + struct winsys_handle *handle); void u_default_buffer_subdata(struct pipe_context *pipe, struct pipe_resource *resource, @@ -46,9 +46,9 @@ void u_default_transfer_unmap( struct pipe_context *pipe, */ struct u_resource_vtbl { - boolean (*resource_get_handle)(struct pipe_screen *, - struct pipe_resource *tex, - struct winsys_handle *handle); + bool (*resource_get_handle)(struct pipe_screen *, + struct pipe_resource *tex, + struct winsys_handle *handle); void (*resource_destroy)(struct pipe_screen *, struct pipe_resource *pt); @@ -76,11 +76,11 @@ struct u_resource { }; -boolean u_resource_get_handle_vtbl(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_resource *resource, - struct winsys_handle *handle, - unsigned usage); +bool u_resource_get_handle_vtbl(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_resource *resource, + struct winsys_handle *handle, + unsigned usage); void u_resource_destroy_vtbl(struct pipe_screen *screen, struct pipe_resource *resource); diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c index d690eca5688..d3fce669e55 100644 --- a/src/gallium/auxiliary/vl/vl_stubs.c +++ b/src/gallium/auxiliary/vl/vl_stubs.c @@ -46,7 +46,7 @@ vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format) return NULL; } -boolean +bool vl_video_buffer_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 71b8f88b2a4..0c6bf5e1291 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -172,7 +172,7 @@ vl_video_buffer_surface_format(enum pipe_format format) return format; } -boolean +bool vl_video_buffer_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.h b/src/gallium/auxiliary/vl/vl_video_buffer.h index 8a1c0773fc9..5f21ab2650f 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.h +++ b/src/gallium/auxiliary/vl/vl_video_buffer.h @@ -88,7 +88,7 @@ vl_video_buffer_max_size(struct pipe_screen *screen); * check if video buffer format is supported for a codec/profile * can be used as default implementation of screen->is_video_format_supported */ -boolean +bool vl_video_buffer_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, 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; diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c index f0253238123..2e97e9d6e44 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c @@ -32,7 +32,7 @@ #include "fd2_util.h" #include "fd2_resource.h" -static boolean +static bool fd2_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -46,7 +46,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen, (sample_count > 1)) { /* TODO add MSAA */ DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) @@ -65,7 +65,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen, (format != PIPE_FORMAT_R8G8B8X8_UNORM))) { DBG("not supported render target: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if ((usage & (PIPE_BIND_SAMPLER_VIEW | diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c index 7ed57d2de5a..a6203269c67 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c @@ -33,7 +33,7 @@ #include "ir3/ir3_compiler.h" -static boolean +static bool fd3_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -47,7 +47,7 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen, (sample_count > 1)) { /* TODO add MSAA */ DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c index 961e907b779..6e5e903f5d1 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c @@ -33,7 +33,7 @@ #include "ir3/ir3_compiler.h" -static boolean +static bool fd4_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -47,7 +47,7 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen, (sample_count > 1)) { /* TODO add MSAA */ DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c index db961790879..92e4a94ff0e 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c @@ -49,7 +49,7 @@ valid_sample_count(unsigned sample_count) } } -static boolean +static bool fd5_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -63,7 +63,7 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen, !valid_sample_count(sample_count)) { DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c index e04984a3036..744737b5412 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_screen.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_screen.c @@ -55,7 +55,7 @@ valid_sample_count(unsigned sample_count) } } -static boolean +static bool fd6_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -69,7 +69,7 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen, !valid_sample_count(sample_count)) { DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x", util_format_name(format), target, sample_count, usage); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) diff --git a/src/gallium/drivers/freedreno/freedreno_fence.c b/src/gallium/drivers/freedreno/freedreno_fence.c index 940497bd495..be104dc8978 100644 --- a/src/gallium/drivers/freedreno/freedreno_fence.c +++ b/src/gallium/drivers/freedreno/freedreno_fence.c @@ -80,7 +80,7 @@ void fd_fence_ref(struct pipe_screen *pscreen, *ptr = pfence; } -boolean fd_fence_finish(struct pipe_screen *pscreen, +bool fd_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_fence_handle *fence, uint64_t timeout) diff --git a/src/gallium/drivers/freedreno/freedreno_fence.h b/src/gallium/drivers/freedreno/freedreno_fence.h index 4c33d3f4d8c..425c1906760 100644 --- a/src/gallium/drivers/freedreno/freedreno_fence.h +++ b/src/gallium/drivers/freedreno/freedreno_fence.h @@ -34,7 +34,7 @@ void fd_fence_populate(struct pipe_fence_handle *fence, void fd_fence_ref(struct pipe_screen *pscreen, struct pipe_fence_handle **ptr, struct pipe_fence_handle *pfence); -boolean fd_fence_finish(struct pipe_screen *screen, +bool fd_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *pfence, uint64_t timeout); diff --git a/src/gallium/drivers/freedreno/freedreno_query.c b/src/gallium/drivers/freedreno/freedreno_query.c index f8c0174ca19..def6166479b 100644 --- a/src/gallium/drivers/freedreno/freedreno_query.c +++ b/src/gallium/drivers/freedreno/freedreno_query.c @@ -57,11 +57,11 @@ fd_destroy_query(struct pipe_context *pctx, struct pipe_query *pq) q->funcs->destroy_query(fd_context(pctx), q); } -static boolean +static bool fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq) { struct fd_query *q = fd_query(pq); - boolean ret; + bool ret; if (q->active) return false; @@ -92,9 +92,9 @@ fd_end_query(struct pipe_context *pctx, struct pipe_query *pq) return true; } -static boolean +static bool fd_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 fd_query *q = fd_query(pq); @@ -108,7 +108,7 @@ fd_get_query_result(struct pipe_context *pctx, struct pipe_query *pq, static void fd_render_condition(struct pipe_context *pctx, struct pipe_query *pq, - boolean condition, enum pipe_render_cond_flag mode) + bool condition, enum pipe_render_cond_flag mode) { struct fd_context *ctx = fd_context(pctx); ctx->cond_query = pq; @@ -187,7 +187,7 @@ fd_get_driver_query_group_info(struct pipe_screen *pscreen, unsigned index, } static void -fd_set_active_query_state(struct pipe_context *pipe, boolean enable) +fd_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/freedreno/freedreno_query.h b/src/gallium/drivers/freedreno/freedreno_query.h index 89a84c46f34..15e9ce450de 100644 --- a/src/gallium/drivers/freedreno/freedreno_query.h +++ b/src/gallium/drivers/freedreno/freedreno_query.h @@ -35,10 +35,10 @@ struct fd_query; struct fd_query_funcs { void (*destroy_query)(struct fd_context *ctx, struct fd_query *q); - boolean (*begin_query)(struct fd_context *ctx, struct fd_query *q); + bool (*begin_query)(struct fd_context *ctx, struct fd_query *q); void (*end_query)(struct fd_context *ctx, struct fd_query *q); - boolean (*get_query_result)(struct fd_context *ctx, - struct fd_query *q, boolean wait, + bool (*get_query_result)(struct fd_context *ctx, + struct fd_query *q, bool wait, union pipe_query_result *result); }; diff --git a/src/gallium/drivers/freedreno/freedreno_query_acc.c b/src/gallium/drivers/freedreno/freedreno_query_acc.c index 7590fc1fbd7..2d4d79925bc 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_acc.c +++ b/src/gallium/drivers/freedreno/freedreno_query_acc.c @@ -74,7 +74,7 @@ realloc_query_bo(struct fd_context *ctx, struct fd_acc_query *aq) fd_bo_cpu_fini(rsc->bo); } -static boolean +static bool fd_acc_begin_query(struct fd_context *ctx, struct fd_query *q) { struct fd_batch *batch = fd_context_batch(ctx); @@ -113,9 +113,9 @@ fd_acc_end_query(struct fd_context *ctx, struct fd_query *q) list_delinit(&aq->node); } -static boolean +static bool fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct fd_acc_query *aq = fd_acc_query(q); const struct fd_acc_sample_provider *p = aq->provider; diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c index 212451b0de4..1c7048d3f28 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c @@ -132,7 +132,7 @@ fd_hw_destroy_query(struct fd_context *ctx, struct fd_query *q) free(hq); } -static boolean +static bool fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q) { struct fd_batch *batch = fd_context_batch(ctx); @@ -174,9 +174,9 @@ static void * sampptr(struct fd_hw_sample *samp, uint32_t n, void *ptr) return ((char *)ptr) + (samp->tile_stride * n) + samp->offset; } -static boolean +static bool fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct fd_hw_query *hq = fd_hw_query(q); const struct fd_hw_sample_provider *p = hq->provider; diff --git a/src/gallium/drivers/freedreno/freedreno_query_sw.c b/src/gallium/drivers/freedreno/freedreno_query_sw.c index d1c9fa29692..7a610d3b21b 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_sw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_sw.c @@ -108,7 +108,7 @@ is_draw_rate_query(struct fd_query *q) } } -static boolean +static bool fd_sw_begin_query(struct fd_context *ctx, struct fd_query *q) { struct fd_sw_query *sq = fd_sw_query(q); @@ -133,9 +133,9 @@ fd_sw_end_query(struct fd_context *ctx, struct fd_query *q) } } -static boolean +static bool fd_sw_get_query_result(struct fd_context *ctx, struct fd_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct fd_sw_query *sq = fd_sw_query(q); diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index e17a1e85d87..3c411f5bc15 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -747,7 +747,7 @@ fd_resource_modifier(struct fd_resource *rsc) return DRM_FORMAT_MOD_INVALID; } -static boolean +static bool fd_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *pctx, struct pipe_resource *prsc, diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index c5bc6068357..4fbe6dd9223 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -667,7 +667,7 @@ fd_get_compiler_options(struct pipe_screen *pscreen, return ir2_get_compiler_options(); } -boolean +bool fd_screen_bo_get_handle(struct pipe_screen *pscreen, struct fd_bo *bo, struct renderonly_scanout *scanout, @@ -680,14 +680,14 @@ fd_screen_bo_get_handle(struct pipe_screen *pscreen, return fd_bo_get_name(bo, &whandle->handle) == 0; } else if (whandle->type == WINSYS_HANDLE_TYPE_KMS) { if (renderonly_get_handle(scanout, whandle)) - return TRUE; + return true; whandle->handle = fd_bo_handle(bo); - return TRUE; + return true; } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { whandle->handle = fd_bo_dmabuf(bo); - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 12f3f849b5d..b65495de9fc 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -114,7 +114,7 @@ fd_screen(struct pipe_screen *pscreen) return (struct fd_screen *)pscreen; } -boolean fd_screen_bo_get_handle(struct pipe_screen *pscreen, +bool fd_screen_bo_get_handle(struct pipe_screen *pscreen, struct fd_bo *bo, struct renderonly_scanout *scanout, unsigned stride, diff --git a/src/gallium/drivers/i915/i915_query.c b/src/gallium/drivers/i915/i915_query.c index d6015a62f46..42f309553e2 100644 --- a/src/gallium/drivers/i915/i915_query.c +++ b/src/gallium/drivers/i915/i915_query.c @@ -54,7 +54,7 @@ static void i915_destroy_query(struct pipe_context *ctx, FREE(query); } -static boolean i915_begin_query(struct pipe_context *ctx, +static bool i915_begin_query(struct pipe_context *ctx, struct pipe_query *query) { return true; @@ -65,20 +65,20 @@ static bool i915_end_query(struct pipe_context *ctx, struct pipe_query *query) return true; } -static boolean i915_get_query_result(struct pipe_context *ctx, - struct pipe_query *query, - boolean wait, - union pipe_query_result *vresult) +static bool i915_get_query_result(struct pipe_context *ctx, + struct pipe_query *query, + bool wait, + union pipe_query_result *vresult) { uint64_t *result = (uint64_t*)vresult; /* 2* viewport Max */ *result = 512*1024*1024; - return TRUE; + return true; } static void -i915_set_active_query_state(struct pipe_context *pipe, boolean enable) +i915_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c index 2572fc40b2c..4b2e1453803 100644 --- a/src/gallium/drivers/i915/i915_resource_buffer.c +++ b/src/gallium/drivers/i915/i915_resource_buffer.c @@ -41,7 +41,7 @@ -static boolean +static bool i915_buffer_get_handle(struct pipe_screen *screen, struct pipe_resource *resource, struct winsys_handle *handle) diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c index 4ade04f223c..0521f2c4e29 100644 --- a/src/gallium/drivers/i915/i915_resource_texture.c +++ b/src/gallium/drivers/i915/i915_resource_texture.c @@ -681,7 +681,7 @@ i945_texture_layout(struct i915_texture * tex) -static boolean +static bool i915_texture_get_handle(struct pipe_screen * screen, struct pipe_resource *texture, struct winsys_handle *whandle) diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index b3b83cdd68f..45d7ec94e0b 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -471,7 +471,7 @@ i915_get_paramf(struct pipe_screen *screen, enum pipe_capf cap) } } -boolean +bool i915_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -530,7 +530,7 @@ i915_is_format_supported(struct pipe_screen *screen, uint i; if (sample_count > 1) - return FALSE; + return false; if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) return false; @@ -542,14 +542,14 @@ i915_is_format_supported(struct pipe_screen *screen, else if (tex_usage & PIPE_BIND_SAMPLER_VIEW) list = tex_supported; else - return TRUE; /* PIPE_BIND_{VERTEX,INDEX}_BUFFER */ + return true; /* PIPE_BIND_{VERTEX,INDEX}_BUFFER */ for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) { if (list[i] == format) - return TRUE; + return true; } - return FALSE; + return false; } @@ -568,7 +568,7 @@ i915_fence_reference(struct pipe_screen *screen, is->iws->fence_reference(is->iws, ptr, fence); } -static boolean +static bool i915_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *fence, diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h index c58055ab836..e10847a0548 100644 --- a/src/gallium/drivers/i915/i915_screen.h +++ b/src/gallium/drivers/i915/i915_screen.h @@ -65,7 +65,7 @@ i915_screen(struct pipe_screen *pscreen) return (struct i915_screen *) pscreen; } -boolean +bool i915_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/iris/iris_fence.c b/src/gallium/drivers/iris/iris_fence.c index 145b3e48dd1..53102dff3a0 100644 --- a/src/gallium/drivers/iris/iris_fence.c +++ b/src/gallium/drivers/iris/iris_fence.c @@ -225,7 +225,7 @@ rel2abs(uint64_t timeout) return now + timeout; } -static boolean +static bool iris_fence_finish(struct pipe_screen *p_screen, struct pipe_context *ctx, struct pipe_fence_handle *fence, diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c index 51f8a73d1fc..9d5519be23b 100644 --- a/src/gallium/drivers/iris/iris_formats.c +++ b/src/gallium/drivers/iris/iris_formats.c @@ -394,7 +394,7 @@ iris_format_for_usage(const struct gen_device_info *devinfo, * Returns true if the given format is supported for the given usage * (PIPE_BIND_*) and sample count. */ -boolean +bool iris_is_format_supported(struct pipe_screen *pscreen, enum pipe_format pformat, enum pipe_texture_target target, diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 8109d49c2f7..6cc0bd59a65 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -753,7 +753,7 @@ iris_destroy_query(struct pipe_context *ctx, struct pipe_query *p_query) } -static boolean +static bool iris_begin_query(struct pipe_context *ctx, struct pipe_query *query) { struct iris_context *ice = (void *) ctx; @@ -846,10 +846,10 @@ iris_check_query_no_flush(struct iris_context *ice, struct iris_query *q) } } -static boolean +static bool iris_get_query_result(struct pipe_context *ctx, struct pipe_query *query, - boolean wait, + bool wait, union pipe_query_result *result) { struct iris_context *ice = (void *) ctx; @@ -888,7 +888,7 @@ iris_get_query_result(struct pipe_context *ctx, static void iris_get_query_result_resource(struct pipe_context *ctx, struct pipe_query *query, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *p_res, @@ -975,7 +975,7 @@ iris_get_query_result_resource(struct pipe_context *ctx, } static void -iris_set_active_query_state(struct pipe_context *ctx, boolean enable) +iris_set_active_query_state(struct pipe_context *ctx, bool enable) { struct iris_context *ice = (void *) ctx; @@ -1063,7 +1063,7 @@ set_predicate_for_result(struct iris_context *ice, static void iris_render_condition(struct pipe_context *ctx, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct iris_context *ice = (void *) ctx; diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 8d2d3c275f8..d94bafce8ef 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -827,7 +827,7 @@ iris_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource) mod ? mod->supports_clear_color : false); } -static boolean +static bool iris_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_resource *resource, diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h index 66e18ae2353..c83e300a937 100644 --- a/src/gallium/drivers/iris/iris_screen.h +++ b/src/gallium/drivers/iris/iris_screen.h @@ -88,7 +88,7 @@ struct iris_screen { struct pipe_screen * iris_screen_create(int fd, const struct pipe_screen_config *config); -boolean +bool iris_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/lima/lima_fence.c b/src/gallium/drivers/lima/lima_fence.c index 50114c24c2b..c47975472fc 100644 --- a/src/gallium/drivers/lima/lima_fence.c +++ b/src/gallium/drivers/lima/lima_fence.c @@ -104,7 +104,7 @@ lima_fence_reference(struct pipe_screen *pscreen, *ptr = fence; } -static boolean +static bool lima_fence_finish(struct pipe_screen *pscreen, struct pipe_context *pctx, struct pipe_fence_handle *fence, uint64_t timeout) { diff --git a/src/gallium/drivers/lima/lima_query.c b/src/gallium/drivers/lima/lima_query.c index 2590ac1bad8..92a047c306b 100644 --- a/src/gallium/drivers/lima/lima_query.c +++ b/src/gallium/drivers/lima/lima_query.c @@ -54,7 +54,7 @@ lima_destroy_query(struct pipe_context *ctx, struct pipe_query *query) free(query); } -static boolean +static bool lima_begin_query(struct pipe_context *ctx, struct pipe_query *query) { return true; @@ -66,9 +66,9 @@ lima_end_query(struct pipe_context *ctx, struct pipe_query *query) return true; } -static boolean +static bool lima_get_query_result(struct pipe_context *ctx, struct pipe_query *query, - boolean wait, union pipe_query_result *vresult) + bool wait, union pipe_query_result *vresult) { uint64_t *result = &vresult->u64; @@ -78,7 +78,7 @@ lima_get_query_result(struct pipe_context *ctx, struct pipe_query *query, } static void -lima_set_active_query_state(struct pipe_context *pipe, boolean enable) +lima_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c index b5dbfe5d3ef..741fda1f222 100644 --- a/src/gallium/drivers/lima/lima_resource.c +++ b/src/gallium/drivers/lima/lima_resource.c @@ -321,7 +321,7 @@ err_out: return NULL; } -static boolean +static bool lima_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *pctx, struct pipe_resource *pres, @@ -334,13 +334,13 @@ lima_resource_get_handle(struct pipe_screen *pscreen, if (handle->type == WINSYS_HANDLE_TYPE_KMS && screen->ro && renderonly_get_handle(res->scanout, handle)) - return TRUE; + return true; if (!lima_bo_export(res->bo, handle)) - return FALSE; + return false; handle->stride = res->levels[0].stride; - return TRUE; + return true; } void diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c index b3f7fff26c4..3ae70b87ef1 100644 --- a/src/gallium/drivers/lima/lima_screen.c +++ b/src/gallium/drivers/lima/lima_screen.c @@ -249,7 +249,7 @@ lima_screen_get_shader_param(struct pipe_screen *pscreen, } } -static boolean +static bool lima_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -263,7 +263,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_TEXTURE_2D: break; default: - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) @@ -271,7 +271,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, /* be able to support 16, now limit to 4 */ if (sample_count > 1 && sample_count != 4) - return FALSE; + return false; if (usage & PIPE_BIND_RENDER_TARGET) { switch (format) { @@ -284,7 +284,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_Z24X8_UNORM: break; default: - return FALSE; + return false; } } @@ -295,7 +295,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_Z24X8_UNORM: break; default: - return FALSE; + return false; } } @@ -304,7 +304,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_R32G32B32_FLOAT: break; default: - return FALSE; + return false; } } @@ -315,7 +315,7 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_I32_UINT: break; default: - return FALSE; + return false; } } @@ -332,11 +332,11 @@ lima_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_Z24X8_UNORM: break; default: - return FALSE; + return false; } } - return TRUE; + return true; } static const void * diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c index 3b78b6dcbf6..222e21db3fd 100644 --- a/src/gallium/drivers/lima/lima_state.c +++ b/src/gallium/drivers/lima/lima_state.c @@ -414,7 +414,7 @@ lima_set_sampler_views(struct pipe_context *pctx, ctx->dirty |= LIMA_CONTEXT_DIRTY_TEXTURES; } -UNUSED static boolean +UNUSED static bool lima_set_damage_region(struct pipe_context *pctx, unsigned num_rects, int *rects) { struct lima_context *ctx = lima_context(pctx); diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 613d60fd623..d310d2a9b0a 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -121,7 +121,7 @@ do_flush( struct pipe_context *pipe, static void llvmpipe_render_condition(struct pipe_context *pipe, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe ); diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index ad11d8ca53f..59df7451807 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -89,10 +89,10 @@ llvmpipe_destroy_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool llvmpipe_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *vresult) { struct llvmpipe_screen *screen = llvmpipe_screen(pipe->screen); @@ -108,7 +108,7 @@ llvmpipe_get_query_result(struct pipe_context *pipe, llvmpipe_flush(pipe, NULL, __FUNCTION__); if (!wait) - return FALSE; + return false; lp_fence_wait(pq->fence); } @@ -143,11 +143,11 @@ llvmpipe_get_query_result(struct pipe_context *pipe, (struct pipe_query_data_timestamp_disjoint *)vresult; /* os_get_time_nano return nanoseconds */ td->frequency = UINT64_C(1000000000); - td->disjoint = FALSE; + td->disjoint = false; } break; case PIPE_QUERY_GPU_FINISHED: - vresult->b = TRUE; + vresult->b = true; break; case PIPE_QUERY_PRIMITIVES_GENERATED: *result = pq->num_primitives_generated; @@ -182,11 +182,11 @@ llvmpipe_get_query_result(struct pipe_context *pipe, break; } - return TRUE; + return true; } -static boolean +static bool llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q) { struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe ); @@ -329,7 +329,7 @@ llvmpipe_check_render_cond(struct llvmpipe_context *lp) } static void -llvmpipe_set_active_query_state(struct pipe_context *pipe, boolean enable) +llvmpipe_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 58dbf2d4301..4bbedf9215e 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -463,7 +463,7 @@ llvmpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param) * \param format the format to test * \param type one of PIPE_TEXTURE, PIPE_SURFACE */ -static boolean +static bool llvmpipe_is_format_supported( struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, @@ -477,7 +477,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; assert(target == PIPE_BUFFER || target == PIPE_TEXTURE_1D || @@ -490,7 +490,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, target == PIPE_TEXTURE_CUBE_ARRAY); if (sample_count > 1) - return FALSE; + return false; if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) return false; @@ -499,24 +499,24 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { /* this is a lie actually other formats COULD exist where we would fail */ if (format_desc->nr_channels < 3) - return FALSE; + return false; } else if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB) - return FALSE; + return false; if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN && format != PIPE_FORMAT_R11G11B10_FLOAT) - return FALSE; + return false; assert(format_desc->block.width == 1); assert(format_desc->block.height == 1); if (format_desc->is_mixed) - return FALSE; + return false; if (!format_desc->is_array && !format_desc->is_bitmask && format != PIPE_FORMAT_R11G11B10_FLOAT) - return FALSE; + return false; } if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) && @@ -530,44 +530,44 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, if (format_desc->is_array && format_desc->nr_channels == 3 && format_desc->block.bits != 96) { - return FALSE; + return false; } } if (bind & PIPE_BIND_DISPLAY_TARGET) { if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) - return FALSE; + return false; } if (bind & PIPE_BIND_DEPTH_STENCIL) { if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) - return FALSE; + return false; if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; /* TODO: Support stencil-only formats */ if (format_desc->swizzle[0] == PIPE_SWIZZLE_NONE) { - return FALSE; + return false; } } if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC || format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) { /* Software decoding is not hooked up. */ - return FALSE; + return false; } if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && format != PIPE_FORMAT_ETC1_RGB8) - return FALSE; + return false; /* * Everything can be supported by u_format * (those without fetch_rgba_float might be not but shouldn't hit that) */ - return TRUE; + return true; } @@ -629,7 +629,7 @@ llvmpipe_fence_reference(struct pipe_screen *screen, /** * Wait for the fence to finish. */ -static boolean +static bool llvmpipe_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *fence_handle, @@ -646,7 +646,7 @@ llvmpipe_fence_finish(struct pipe_screen *screen, lp_fence_wait(f); } - return TRUE; + return true; } static uint64_t diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 4dc7eb39f8f..ea993c9e524 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -187,7 +187,7 @@ fail: * Check the size of the texture specified by 'res'. * \return TRUE if OK, FALSE if too large. */ -static boolean +static bool llvmpipe_can_create_resource(struct pipe_screen *screen, const struct pipe_resource *res) { @@ -486,7 +486,7 @@ no_lpr: } -static boolean +static bool llvmpipe_resource_get_handle(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_resource *pt, @@ -498,7 +498,7 @@ llvmpipe_resource_get_handle(struct pipe_screen *screen, assert(lpr->dt); if (!lpr->dt) - return FALSE; + return false; return winsys->displaytarget_get_handle(winsys, lpr->dt, whandle); } diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index b425ac4f721..0af69252d70 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -74,7 +74,7 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen, nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr); } -static boolean +static bool nouveau_screen_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *pfence, diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c index e7a63181de8..d2e6945877b 100644 --- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c @@ -492,7 +492,7 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen, } } -boolean +bool nouveau_vp3_screen_video_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.h b/src/gallium/drivers/nouveau/nouveau_vp3_video.h index 809e971a678..96e995f89d5 100644 --- a/src/gallium/drivers/nouveau/nouveau_vp3_video.h +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.h @@ -235,7 +235,7 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen, enum pipe_video_entrypoint entrypoint, enum pipe_video_cap param); -boolean +bool nouveau_vp3_screen_video_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c index 4c8558bdf55..cdaffd433aa 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c @@ -46,7 +46,7 @@ layer_offset(struct pipe_resource *pt, unsigned level, unsigned layer) return lvl->offset + (layer * lvl->zslice_size); } -static boolean +static bool nv30_miptree_get_handle(struct pipe_screen *pscreen, struct pipe_resource *pt, struct winsys_handle *handle) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c index f26728868af..5a0c49e2ce3 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_query.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_query.c @@ -146,7 +146,7 @@ nv30_query_destroy(struct pipe_context *pipe, struct pipe_query *pq) FREE(pq); } -static boolean +static bool nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq) { struct nv30_context *nv30 = nv30_context(pipe); @@ -198,9 +198,9 @@ nv30_query_end(struct pipe_context *pipe, struct pipe_query *pq) return true; } -static boolean +static bool nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct nv30_screen *screen = nv30_screen(pipe->screen); struct nv30_query *q = nv30_query(pq); @@ -240,7 +240,7 @@ nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq, static void nv40_query_render_condition(struct pipe_context *pipe, struct pipe_query *pq, - boolean condition, enum pipe_render_cond_flag mode) + bool condition, enum pipe_render_cond_flag mode) { struct nv30_context *nv30 = nv30_context(pipe); struct nv30_query *q = nv30_query(pq); @@ -267,7 +267,7 @@ nv40_query_render_condition(struct pipe_context *pipe, } static void -nv30_set_active_query_state(struct pipe_context *pipe, boolean enable) +nv30_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 248640aa2a3..de3ad7c4296 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -425,7 +425,7 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, } } -static boolean +static bool nv30_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index 88720b1b1d5..b9da8b50565 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -319,7 +319,7 @@ nv84_screen_get_video_param(struct pipe_screen *pscreen, enum pipe_video_entrypoint entrypoint, enum pipe_video_cap param); -boolean +bool nv84_screen_video_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c index f2e304fde62..786d1803306 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c @@ -178,7 +178,7 @@ nv50_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt) FREE(mt); } -boolean +bool nv50_miptree_get_handle(struct pipe_screen *pscreen, struct pipe_resource *pt, struct winsys_handle *whandle) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query.c b/src/gallium/drivers/nouveau/nv50/nv50_query.c index 13088ebb5fa..08820b33672 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query.c @@ -47,7 +47,7 @@ nv50_destroy_query(struct pipe_context *pipe, struct pipe_query *pq) q->funcs->destroy_query(nv50_context(pipe), q); } -static boolean +static bool nv50_begin_query(struct pipe_context *pipe, struct pipe_query *pq) { struct nv50_query *q = nv50_query(pq); @@ -62,9 +62,9 @@ nv50_end_query(struct pipe_context *pipe, struct pipe_query *pq) return true; } -static boolean +static bool nv50_get_query_result(struct pipe_context *pipe, struct pipe_query *pq, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct nv50_query *q = nv50_query(pq); return q->funcs->get_query_result(nv50_context(pipe), q, wait, result); @@ -73,7 +73,7 @@ nv50_get_query_result(struct pipe_context *pipe, struct pipe_query *pq, static void nv50_render_condition(struct pipe_context *pipe, struct pipe_query *pq, - boolean condition, enum pipe_render_cond_flag mode) + bool condition, enum pipe_render_cond_flag mode) { struct nv50_context *nv50 = nv50_context(pipe); struct nouveau_pushbuf *push = nv50->base.pushbuf; @@ -144,7 +144,7 @@ nv50_render_condition(struct pipe_context *pipe, } static void -nv50_set_active_query_state(struct pipe_context *pipe, boolean enable) +nv50_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query.h b/src/gallium/drivers/nouveau/nv50/nv50_query.h index bd4c0a386f6..7dfc727cf29 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_query.h @@ -10,10 +10,10 @@ struct nv50_query; struct nv50_query_funcs { void (*destroy_query)(struct nv50_context *, struct nv50_query *); - boolean (*begin_query)(struct nv50_context *, struct nv50_query *); + bool (*begin_query)(struct nv50_context *, struct nv50_query *); void (*end_query)(struct nv50_context *, struct nv50_query *); - boolean (*get_query_result)(struct nv50_context *, struct nv50_query *, - boolean, union pipe_query_result *); + bool (*get_query_result)(struct nv50_context *, struct nv50_query *, + bool, union pipe_query_result *); }; struct nv50_query { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c index 4e74c462235..259723b99c3 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c @@ -119,7 +119,7 @@ nv50_hw_destroy_query(struct nv50_context *nv50, struct nv50_query *q) FREE(hq); } -static boolean +static bool nv50_hw_begin_query(struct nv50_context *nv50, struct nv50_query *q) { struct nouveau_pushbuf *push = nv50->base.pushbuf; @@ -264,9 +264,9 @@ nv50_hw_end_query(struct nv50_context *nv50, struct nv50_query *q) nouveau_fence_ref(nv50->screen->base.fence.current, &hq->fence); } -static boolean +static bool nv50_hw_get_query_result(struct nv50_context *nv50, struct nv50_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct nv50_hw_query *hq = nv50_hw_query(q); uint64_t *res64 = (uint64_t *)result; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.h b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.h index a89a66cec4f..4a351510f72 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.h @@ -17,10 +17,10 @@ struct nv50_hw_query; struct nv50_hw_query_funcs { void (*destroy_query)(struct nv50_context *, struct nv50_hw_query *); - boolean (*begin_query)(struct nv50_context *, struct nv50_hw_query *); + bool (*begin_query)(struct nv50_context *, struct nv50_hw_query *); void (*end_query)(struct nv50_context *, struct nv50_hw_query *); - boolean (*get_query_result)(struct nv50_context *, struct nv50_hw_query *, - boolean, union pipe_query_result *); + bool (*get_query_result)(struct nv50_context *, struct nv50_hw_query *, + bool, union pipe_query_result *); }; struct nv50_hw_query { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.c index 4a605f21c45..f42a04ef704 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.c @@ -76,11 +76,11 @@ nv50_hw_metric_destroy_query(struct nv50_context *nv50, FREE(hmq); } -static boolean +static bool nv50_hw_metric_begin_query(struct nv50_context *nv50, struct nv50_hw_query *hq) { struct nv50_hw_metric_query *hmq = nv50_hw_metric_query(hq); - boolean ret = false; + bool ret = false; unsigned i; for (i = 0; i < hmq->num_queries; i++) { @@ -118,15 +118,15 @@ sm11_hw_metric_calc_result(struct nv50_hw_query *hq, uint64_t res64[8]) return 0; } -static boolean +static bool nv50_hw_metric_get_query_result(struct nv50_context *nv50, - struct nv50_hw_query *hq, boolean wait, + struct nv50_hw_query *hq, bool wait, union pipe_query_result *result) { struct nv50_hw_metric_query *hmq = nv50_hw_metric_query(hq); union pipe_query_result results[4] = {}; uint64_t res64[4] = {}; - boolean ret = false; + bool ret = false; unsigned i; for (i = 0; i < hmq->num_queries; i++) { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c index bcfba9f5a87..506a0c7c9cd 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c @@ -158,7 +158,7 @@ nv50_hw_sm_destroy_query(struct nv50_context *nv50, struct nv50_hw_query *hq) FREE(hq); } -static boolean +static bool nv50_hw_sm_begin_query(struct nv50_context *nv50, struct nv50_hw_query *hq) { struct nv50_screen *screen = nv50->screen; @@ -330,9 +330,9 @@ nv50_hw_sm_query_read_data(uint32_t count[32][4], return true; } -static boolean +static bool nv50_hw_sm_get_query_result(struct nv50_context *nv50, struct nv50_hw_query *hq, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { uint32_t count[32][4]; uint64_t value = 0; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_resource.h b/src/gallium/drivers/nouveau/nv50/nv50_resource.h index c64b045364f..f3ee8ae41ad 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_resource.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_resource.h @@ -86,7 +86,7 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen, const struct pipe_resource *template, struct winsys_handle *whandle); -boolean +bool nv50_miptree_get_handle(struct pipe_screen *pscreen, struct pipe_resource *pt, struct winsys_handle *whandle); diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 4a868e87db6..dd5eb808da7 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -43,7 +43,7 @@ #define THREADS_IN_WARP 32 -static boolean +static bool nv50_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 89558ee442f..8b294be6d86 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -1049,7 +1049,7 @@ nv50_set_viewport_states(struct pipe_context *pipe, static void nv50_set_window_rectangles(struct pipe_context *pipe, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rectangles) { diff --git a/src/gallium/drivers/nouveau/nv50/nv84_video.c b/src/gallium/drivers/nouveau/nv50/nv84_video.c index 409c40d632f..dbec1f786f1 100644 --- a/src/gallium/drivers/nouveau/nv50/nv84_video.c +++ b/src/gallium/drivers/nouveau/nv50/nv84_video.c @@ -845,7 +845,7 @@ nv84_screen_get_video_param(struct pipe_screen *pscreen, } } -boolean +bool nv84_screen_video_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_video_profile profile, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c b/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c index af5baa3def0..e6847bac0ad 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c @@ -289,13 +289,13 @@ static uint64_t nvc0_miptree_get_modifier(struct nv50_miptree *mt) return modifier; } -static boolean +static bool nvc0_miptree_get_handle(struct pipe_screen *pscreen, struct pipe_resource *pt, struct winsys_handle *whandle) { struct nv50_miptree *mt = nv50_miptree(pt); - boolean ret; + bool ret; ret = nv50_miptree_get_handle(pscreen, pt, whandle); if (!ret) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index 40af9936859..d07be344e62 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c @@ -51,7 +51,7 @@ nvc0_destroy_query(struct pipe_context *pipe, struct pipe_query *pq) q->funcs->destroy_query(nvc0_context(pipe), q); } -static boolean +static bool nvc0_begin_query(struct pipe_context *pipe, struct pipe_query *pq) { struct nvc0_query *q = nvc0_query(pq); @@ -66,9 +66,9 @@ nvc0_end_query(struct pipe_context *pipe, struct pipe_query *pq) return true; } -static boolean +static bool nvc0_get_query_result(struct pipe_context *pipe, struct pipe_query *pq, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct nvc0_query *q = nvc0_query(pq); return q->funcs->get_query_result(nvc0_context(pipe), q, wait, result); @@ -77,7 +77,7 @@ nvc0_get_query_result(struct pipe_context *pipe, struct pipe_query *pq, static void nvc0_get_query_result_resource(struct pipe_context *pipe, struct pipe_query *pq, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, @@ -95,7 +95,7 @@ nvc0_get_query_result_resource(struct pipe_context *pipe, static void nvc0_render_condition(struct pipe_context *pipe, struct pipe_query *pq, - boolean condition, enum pipe_render_cond_flag mode) + bool condition, enum pipe_render_cond_flag mode) { struct nvc0_context *nvc0 = nvc0_context(pipe); struct nouveau_pushbuf *push = nvc0->base.pushbuf; @@ -262,7 +262,7 @@ nvc0_screen_get_driver_query_group_info(struct pipe_screen *pscreen, } static void -nvc0_set_active_query_state(struct pipe_context *pipe, boolean enable) +nvc0_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.h b/src/gallium/drivers/nouveau/nvc0/nvc0_query.h index a887b220557..4667dcdbd94 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.h @@ -10,13 +10,13 @@ struct nvc0_query; struct nvc0_query_funcs { void (*destroy_query)(struct nvc0_context *, struct nvc0_query *); - boolean (*begin_query)(struct nvc0_context *, struct nvc0_query *); + bool (*begin_query)(struct nvc0_context *, struct nvc0_query *); void (*end_query)(struct nvc0_context *, struct nvc0_query *); - boolean (*get_query_result)(struct nvc0_context *, struct nvc0_query *, - boolean, union pipe_query_result *); + bool (*get_query_result)(struct nvc0_context *, struct nvc0_query *, + bool, union pipe_query_result *); void (*get_query_result_resource)(struct nvc0_context *nvc0, struct nvc0_query *q, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c index b6a214ccd49..672b3e10eed 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c @@ -138,7 +138,7 @@ nvc0_hw_query_write_compute_invocations(struct nvc0_context *nvc0, PUSH_DATA (push, hq->bo->offset + hq->offset + offset); } -static boolean +static bool nvc0_hw_begin_query(struct nvc0_context *nvc0, struct nvc0_query *q) { struct nouveau_pushbuf *push = nvc0->base.pushbuf; @@ -304,9 +304,9 @@ nvc0_hw_end_query(struct nvc0_context *nvc0, struct nvc0_query *q) nouveau_fence_ref(nvc0->screen->base.fence.current, &hq->fence); } -static boolean +static bool nvc0_hw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { struct nvc0_hw_query *hq = nvc0_hw_query(q); uint64_t *res64 = (uint64_t*)result; @@ -387,7 +387,7 @@ nvc0_hw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q, static void nvc0_hw_get_query_result_resource(struct nvc0_context *nvc0, struct nvc0_query *q, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.h b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.h index 5c8ad5eb2d0..fa2af7ecaf5 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.h @@ -17,10 +17,10 @@ struct nvc0_hw_query; struct nvc0_hw_query_funcs { void (*destroy_query)(struct nvc0_context *, struct nvc0_hw_query *); - boolean (*begin_query)(struct nvc0_context *, struct nvc0_hw_query *); + bool (*begin_query)(struct nvc0_context *, struct nvc0_hw_query *); void (*end_query)(struct nvc0_context *, struct nvc0_hw_query *); - boolean (*get_query_result)(struct nvc0_context *, struct nvc0_hw_query *, - boolean, union pipe_query_result *); + bool (*get_query_result)(struct nvc0_context *, struct nvc0_hw_query *, + bool, union pipe_query_result *); }; struct nvc0_hw_query { @@ -32,7 +32,7 @@ struct nvc0_hw_query { uint32_t base_offset; uint32_t offset; /* base_offset + i * rotate */ uint8_t state; - boolean is64bit; + bool is64bit; uint8_t rotate; struct nouveau_mm_allocation *mm; struct nouveau_fence *fence; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c index 089af61820e..c78b04600d0 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c @@ -470,11 +470,11 @@ nvc0_hw_metric_destroy_query(struct nvc0_context *nvc0, FREE(hmq); } -static boolean +static bool nvc0_hw_metric_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq) { struct nvc0_hw_metric_query *hmq = nvc0_hw_metric_query(hq); - boolean ret = false; + bool ret = false; unsigned i; for (i = 0; i < hmq->num_queries; i++) { @@ -659,9 +659,9 @@ sm35_hw_metric_calc_result(struct nvc0_hw_query *hq, uint64_t res64[8]) return 0; } -static boolean +static bool nvc0_hw_metric_get_query_result(struct nvc0_context *nvc0, - struct nvc0_hw_query *hq, boolean wait, + struct nvc0_hw_query *hq, bool wait, union pipe_query_result *result) { struct nvc0_hw_metric_query *hmq = nvc0_hw_metric_query(hq); @@ -670,7 +670,7 @@ nvc0_hw_metric_get_query_result(struct nvc0_context *nvc0, union pipe_query_result results[8] = {}; uint64_t res64[8] = {}; uint64_t value = 0; - boolean ret = false; + bool ret = false; unsigned i; for (i = 0; i < hmq->num_queries; i++) { diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c index 726160d7c05..8d75995ab74 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c @@ -2303,7 +2303,7 @@ nvc0_hw_sm_destroy_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq) FREE(hq); } -static boolean +static bool nve4_hw_sm_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq) { struct nvc0_screen *screen = nvc0->screen; @@ -2388,7 +2388,7 @@ nve4_hw_sm_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq) return true; } -static boolean +static bool nvc0_hw_sm_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq) { struct nvc0_screen *screen = nvc0->screen; @@ -2673,9 +2673,9 @@ nve4_hw_sm_query_read_data(uint32_t count[32][8], return true; } -static boolean +static bool nvc0_hw_sm_get_query_result(struct nvc0_context *nvc0, struct nvc0_hw_query *hq, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { uint32_t count[32][8]; uint64_t value = 0; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_sw.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_sw.c index cd24618d564..8f5ae2c4c5b 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_sw.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_sw.c @@ -71,7 +71,7 @@ nvc0_sw_destroy_query(struct nvc0_context *nvc0, struct nvc0_query *q) FREE(sq); } -static boolean +static bool nvc0_sw_begin_query(struct nvc0_context *nvc0, struct nvc0_query *q) { #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS @@ -95,9 +95,9 @@ nvc0_sw_end_query(struct nvc0_context *nvc0, struct nvc0_query *q) #endif } -static boolean +static bool nvc0_sw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q, - boolean wait, union pipe_query_result *result) + bool wait, union pipe_query_result *result) { #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS struct nvc0_sw_query *sq = nvc0_sw_query(q); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index e209a00828e..847e8c7304b 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -39,7 +39,7 @@ #include "nv50/g80_texture.xml.h" -static boolean +static bool nvc0_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index 7c0f605dc16..a9ee7b784bd 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -949,7 +949,7 @@ nvc0_set_viewport_states(struct pipe_context *pipe, static void nvc0_set_window_rectangles(struct pipe_context *pipe, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rectangles) { diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index d20f0185a42..c7a34b2dcef 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -2501,7 +2501,7 @@ panfrost_set_polygon_stipple(struct pipe_context *pipe, static void panfrost_set_active_query_state(struct pipe_context *pipe, - boolean enable) + bool enable) { //struct panfrost_context *panfrost = pan_context(pipe); } @@ -2546,7 +2546,7 @@ panfrost_destroy_query(struct pipe_context *pipe, struct pipe_query *q) ralloc_free(q); } -static boolean +static bool panfrost_begin_query(struct pipe_context *pipe, struct pipe_query *q) { struct panfrost_context *ctx = pan_context(pipe); @@ -2580,10 +2580,10 @@ panfrost_end_query(struct pipe_context *pipe, struct pipe_query *q) return true; } -static boolean +static bool panfrost_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *vresult) { /* STUB */ diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index e7bd4442f94..31c7a062ebf 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -83,7 +83,7 @@ panfrost_resource_from_handle(struct pipe_screen *pscreen, return prsc; } -static boolean +static bool panfrost_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_resource *pt, @@ -97,10 +97,10 @@ panfrost_resource_get_handle(struct pipe_screen *pscreen, handle->modifier = DRM_FORMAT_MOD_INVALID; if (handle->type == WINSYS_HANDLE_TYPE_SHARED) { - return FALSE; + return false; } else if (handle->type == WINSYS_HANDLE_TYPE_KMS) { if (renderonly_get_handle(scanout, handle)) - return TRUE; + return true; handle->handle = rsrc->bo->gem_handle; handle->stride = rsrc->slices[0].stride; @@ -114,25 +114,25 @@ panfrost_resource_get_handle(struct pipe_screen *pscreen, int ret = drmIoctl(screen->ro->kms_fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); if (ret == -1) - return FALSE; + return false; handle->stride = scanout->stride; handle->handle = args.fd; - return TRUE; + return true; } else { int fd = panfrost_drm_export_bo(screen, rsrc->bo); if (fd < 0) - return FALSE; + return false; handle->handle = fd; handle->stride = rsrc->slices[0].stride; - return TRUE; + return true; } } - return FALSE; + return false; } static void @@ -656,7 +656,7 @@ panfrost_resource_get_internal_format(struct pipe_resource *prsrc) { return prsrc->format; } -static boolean +static bool panfrost_generate_mipmap( struct pipe_context *pctx, struct pipe_resource *prsrc, diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 59e683d8b72..7c513c94ecd 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -359,7 +359,7 @@ panfrost_get_paramf(struct pipe_screen *screen, enum pipe_capf param) * \param format the format to test * \param type one of PIPE_TEXTURE, PIPE_SURFACE */ -static boolean +static bool panfrost_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -382,17 +382,17 @@ panfrost_is_format_supported( struct pipe_screen *screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; if (sample_count > 1) - return FALSE; + return false; /* Format wishlist */ if (format == PIPE_FORMAT_X8Z24_UNORM) - return FALSE; + return false; if (format == PIPE_FORMAT_A1B5G5R5_UNORM || format == PIPE_FORMAT_X1B5G5R5_UNORM) - return FALSE; + return false; /* TODO */ if (format == PIPE_FORMAT_B5G5R5A1_UNORM) @@ -405,12 +405,12 @@ panfrost_is_format_supported( struct pipe_screen *screen, bool renderable = bind & PIPE_BIND_RENDER_TARGET; if (scanout && renderable && !util_format_is_rgba8_variant(format_desc)) - return FALSE; + return false; if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN && format_desc->layout != UTIL_FORMAT_LAYOUT_OTHER) { /* Compressed formats not yet hooked up. */ - return FALSE; + return false; } /* Internally, formats that are depth/stencil renderable are limited. @@ -437,7 +437,7 @@ panfrost_is_format_supported( struct pipe_screen *screen, } } - return TRUE; + return true; } @@ -473,7 +473,7 @@ panfrost_fence_reference(struct pipe_screen *pscreen, panfrost_drm_fence_reference(pscreen, ptr, fence); } -static boolean +static bool panfrost_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_fence_handle *fence, 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, diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 4a63d57caab..cfeab815584 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -239,19 +239,19 @@ static bool r600_is_zs_format_supported(enum pipe_format format) return r600_translate_dbformat(format) != ~0U; } -boolean evergreen_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) +bool evergreen_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) { struct r600_screen *rscreen = (struct r600_screen*)screen; unsigned retval = 0; if (target >= PIPE_MAX_TEXTURE_TYPES) { R600_ERR("r600: unsupported texture type %d\n", target); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) @@ -259,7 +259,7 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen, if (sample_count > 1) { if (!rscreen->has_msaa) - return FALSE; + return false; switch (sample_count) { case 2: @@ -267,7 +267,7 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen, case 8: break; default: - return FALSE; + return false; } } diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 239005cab7f..11c16957ad5 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -700,12 +700,12 @@ void *evergreen_create_db_flush_dsa(struct r600_context *rctx); void *evergreen_create_resolve_blend(struct r600_context *rctx); void *evergreen_create_decompress_blend(struct r600_context *rctx); void *evergreen_create_fastclear_blend(struct r600_context *rctx); -boolean evergreen_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); +bool evergreen_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); void evergreen_init_color_surface(struct r600_context *rctx, struct r600_surface *surf); void evergreen_init_color_surface_rat(struct r600_context *rctx, @@ -757,12 +757,12 @@ void *r600_create_resolve_blend(struct r600_context *rctx); void *r700_create_resolve_blend(struct r600_context *rctx); void *r600_create_decompress_blend(struct r600_context *rctx); bool r600_adjust_gprs(struct r600_context *rctx); -boolean r600_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); +bool r600_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); void r600_update_db_shader_control(struct r600_context * rctx); void r600_setup_scratch_buffers(struct r600_context *rctx); diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index 9eee322a28b..60d113e75ac 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -1090,10 +1090,10 @@ static void r600_fence_reference(struct pipe_screen *screen, *rdst = rsrc; } -static boolean r600_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout) +static bool r600_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout) { struct radeon_winsys *rws = ((struct r600_common_screen*)screen)->ws; struct r600_multi_fence *rfence = (struct r600_multi_fence *)fence; diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index ed2226293dd..0a41ac81384 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -994,8 +994,8 @@ static void r600_destroy_query(struct pipe_context *ctx, struct pipe_query *quer rquery->ops->destroy(rctx->screen, rquery); } -static boolean r600_begin_query(struct pipe_context *ctx, - struct pipe_query *query) +static bool r600_begin_query(struct pipe_context *ctx, + struct pipe_query *query) { struct r600_common_context *rctx = (struct r600_common_context *)ctx; struct r600_query *rquery = (struct r600_query *)query; @@ -1294,9 +1294,9 @@ static void r600_query_hw_add_result(struct r600_common_screen *rscreen, } } -static boolean r600_get_query_result(struct pipe_context *ctx, - struct pipe_query *query, boolean wait, - union pipe_query_result *result) +static bool r600_get_query_result(struct pipe_context *ctx, + struct pipe_query *query, bool wait, + union pipe_query_result *result) { struct r600_common_context *rctx = (struct r600_common_context *)ctx; struct r600_query *rquery = (struct r600_query *)query; @@ -1306,7 +1306,7 @@ static boolean r600_get_query_result(struct pipe_context *ctx, static void r600_get_query_result_resource(struct pipe_context *ctx, struct pipe_query *query, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, @@ -1753,7 +1753,7 @@ static void r600_query_hw_get_result_resource(struct r600_common_context *rctx, static void r600_render_condition(struct pipe_context *ctx, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct r600_common_context *rctx = (struct r600_common_context *)ctx; diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 96ffbf82927..b20a9d2a2f0 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -158,19 +158,19 @@ static bool r600_is_zs_format_supported(enum pipe_format format) return r600_translate_dbformat(format) != ~0U; } -boolean r600_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) +bool r600_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) { struct r600_screen *rscreen = (struct r600_screen*)screen; unsigned retval = 0; if (target >= PIPE_MAX_TEXTURE_TYPES) { R600_ERR("r600: unsupported texture type %d\n", target); - return FALSE; + return false; } if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) @@ -178,17 +178,17 @@ boolean r600_is_format_supported(struct pipe_screen *screen, if (sample_count > 1) { if (!rscreen->has_msaa) - return FALSE; + return false; /* R11G11B10 is broken on R6xx. */ if (rscreen->b.chip_class == R600 && format == PIPE_FORMAT_R11G11B10_FLOAT) - return FALSE; + return false; /* MSAA integer colorbuffers hang. */ if (util_format_is_pure_integer(format) && !util_format_is_depth_or_stencil(format)) - return FALSE; + return false; switch (sample_count) { case 2: @@ -196,7 +196,7 @@ boolean r600_is_format_supported(struct pipe_screen *screen, case 8: break; default: - return FALSE; + return false; } } diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index c7c606f131b..6d69bc4c0b2 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -3277,7 +3277,7 @@ static void r600_invalidate_buffer(struct pipe_context *ctx, struct pipe_resourc } -static void r600_set_active_query_state(struct pipe_context *ctx, boolean enable) +static void r600_set_active_query_state(struct pipe_context *ctx, bool enable) { struct r600_context *rctx = (struct r600_context*)ctx; diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 3eb96852a07..ddee3d9b833 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -468,11 +468,11 @@ static void r600_texture_get_info(struct pipe_screen* screen, *poffset = offset; } -static boolean r600_texture_get_handle(struct pipe_screen* screen, - struct pipe_context *ctx, - struct pipe_resource *resource, - struct winsys_handle *whandle, - unsigned usage) +static bool r600_texture_get_handle(struct pipe_screen* screen, + struct pipe_context *ctx, + struct pipe_resource *resource, + struct winsys_handle *whandle, + unsigned usage) { struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; struct r600_common_context *rctx; diff --git a/src/gallium/drivers/r600/radeon_video.c b/src/gallium/drivers/r600/radeon_video.c index 8e0af448be5..9149629a38c 100644 --- a/src/gallium/drivers/r600/radeon_video.c +++ b/src/gallium/drivers/r600/radeon_video.c @@ -333,10 +333,10 @@ int rvid_get_video_param(struct pipe_screen *screen, } } -boolean rvid_is_format_supported(struct pipe_screen *screen, - enum pipe_format format, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint) +bool rvid_is_format_supported(struct pipe_screen *screen, + enum pipe_format format, + enum pipe_video_profile profile, + enum pipe_video_entrypoint entrypoint) { /* HEVC 10 bit decoding should use P016 instead of NV12 if possible */ if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) diff --git a/src/gallium/drivers/r600/radeon_video.h b/src/gallium/drivers/r600/radeon_video.h index 8befc2f85df..4777c6c0e96 100644 --- a/src/gallium/drivers/r600/radeon_video.h +++ b/src/gallium/drivers/r600/radeon_video.h @@ -77,9 +77,9 @@ int rvid_get_video_param(struct pipe_screen *screen, enum pipe_video_cap param); /* the hardware only supports NV12 */ -boolean rvid_is_format_supported(struct pipe_screen *screen, - enum pipe_format format, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint); +bool rvid_is_format_supported(struct pipe_screen *screen, + enum pipe_format format, + enum pipe_video_profile profile, + enum pipe_video_entrypoint entrypoint); #endif // RADEON_VIDEO_H diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index eb9e2bb1165..bce5f36773e 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -1238,11 +1238,11 @@ static void si_blit(struct pipe_context *ctx, si_blitter_end(sctx); } -static boolean si_generate_mipmap(struct pipe_context *ctx, - struct pipe_resource *tex, - enum pipe_format format, - unsigned base_level, unsigned last_level, - unsigned first_layer, unsigned last_layer) +static bool si_generate_mipmap(struct pipe_context *ctx, + struct pipe_resource *tex, + enum pipe_format format, + unsigned base_level, unsigned last_level, + unsigned first_layer, unsigned last_layer) { struct si_context *sctx = (struct si_context*)ctx; struct si_texture *stex = (struct si_texture *)tex; diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c index 6d914a1b184..4df9e65dd08 100644 --- a/src/gallium/drivers/radeonsi/si_fence.c +++ b/src/gallium/drivers/radeonsi/si_fence.c @@ -283,10 +283,10 @@ static void si_fine_fence_set(struct si_context *ctx, } } -static boolean si_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout) +static bool si_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout) { struct radeon_winsys *rws = ((struct si_screen*)screen)->ws; struct si_multi_fence *sfence = (struct si_multi_fence *)fence; diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 0e93038b7a5..6beca2e0744 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -716,10 +716,10 @@ static int si_get_video_param(struct pipe_screen *screen, } } -static boolean si_vid_is_format_supported(struct pipe_screen *screen, - enum pipe_format format, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint) +static bool si_vid_is_format_supported(struct pipe_screen *screen, + enum pipe_format format, + enum pipe_video_profile profile, + enum pipe_video_entrypoint entrypoint) { /* HEVC 10 bit decoding should use P016 instead of NV12 if possible */ if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index 394bf7ff124..920febadba2 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -1119,8 +1119,8 @@ static void si_destroy_query(struct pipe_context *ctx, struct pipe_query *query) squery->ops->destroy(sctx, squery); } -static boolean si_begin_query(struct pipe_context *ctx, - struct pipe_query *query) +static bool si_begin_query(struct pipe_context *ctx, + struct pipe_query *query) { struct si_context *sctx = (struct si_context *)ctx; struct si_query *squery = (struct si_query *)query; @@ -1401,9 +1401,9 @@ static const struct si_query_ops query_hw_ops = { .resume = si_query_hw_resume, }; -static boolean si_get_query_result(struct pipe_context *ctx, - struct pipe_query *query, boolean wait, - union pipe_query_result *result) +static bool si_get_query_result(struct pipe_context *ctx, + struct pipe_query *query, bool wait, + union pipe_query_result *result) { struct si_context *sctx = (struct si_context *)ctx; struct si_query *squery = (struct si_query *)query; @@ -1413,7 +1413,7 @@ static boolean si_get_query_result(struct pipe_context *ctx, static void si_get_query_result_resource(struct pipe_context *ctx, struct pipe_query *query, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, @@ -1625,7 +1625,7 @@ static void si_query_hw_get_result_resource(struct si_context *sctx, static void si_render_condition(struct pipe_context *ctx, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct si_context *sctx = (struct si_context *)ctx; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 398dc83a924..827d6b31db2 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1347,7 +1347,7 @@ static void *si_create_db_flush_dsa(struct si_context *sctx) /* DB RENDER STATE */ -static void si_set_active_query_state(struct pipe_context *ctx, boolean enable) +static void si_set_active_query_state(struct pipe_context *ctx, bool enable) { struct si_context *sctx = (struct si_context*)ctx; @@ -2215,12 +2215,12 @@ static bool si_is_zs_format_supported(enum pipe_format format) return si_translate_dbformat(format) != V_028040_Z_INVALID; } -static boolean si_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 si_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) { struct si_screen *sscreen = (struct si_screen *)screen; unsigned retval = 0; diff --git a/src/gallium/drivers/radeonsi/si_state_viewport.c b/src/gallium/drivers/radeonsi/si_state_viewport.c index 39c8536e46a..55bdb037082 100644 --- a/src/gallium/drivers/radeonsi/si_state_viewport.c +++ b/src/gallium/drivers/radeonsi/si_state_viewport.c @@ -583,7 +583,7 @@ static void si_emit_window_rectangles(struct si_context *sctx) } static void si_set_window_rectangles(struct pipe_context *ctx, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rects) { diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 9f887715f73..2e31fbe94ad 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -824,11 +824,11 @@ static void si_texture_get_info(struct pipe_screen* screen, *poffset = offset; } -static boolean si_texture_get_handle(struct pipe_screen* screen, - struct pipe_context *ctx, - struct pipe_resource *resource, - struct winsys_handle *whandle, - unsigned usage) +static bool si_texture_get_handle(struct pipe_screen* screen, + struct pipe_context *ctx, + struct pipe_resource *resource, + struct winsys_handle *whandle, + unsigned usage) { struct si_screen *sscreen = (struct si_screen*)screen; struct si_context *sctx; diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 48f87e65619..ed0e67829d3 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -180,7 +180,7 @@ softpipe_is_resource_referenced( struct pipe_context *pipe, static void softpipe_render_condition(struct pipe_context *pipe, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct softpipe_context *softpipe = softpipe_context( pipe ); @@ -214,9 +214,9 @@ softpipe_create_context(struct pipe_screen *screen, softpipe->tgsi.buffer[i] = sp_create_tgsi_buffer(); } - softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE ); - softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE ); - softpipe->dump_cs = debug_get_bool_option( "SOFTPIPE_DUMP_CS", FALSE ); + softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", false ); + softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", false ); + softpipe->dump_cs = debug_get_bool_option( "SOFTPIPE_DUMP_CS", false ); softpipe->pipe.screen = screen; softpipe->pipe.destroy = softpipe_destroy; @@ -316,7 +316,7 @@ softpipe_create_context(struct pipe_screen *screen, (struct tgsi_buffer *) softpipe->tgsi.buffer[PIPE_SHADER_GEOMETRY]); - if (debug_get_bool_option( "SOFTPIPE_NO_RAST", FALSE )) + if (debug_get_bool_option( "SOFTPIPE_NO_RAST", false )) softpipe->no_rast = TRUE; softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe); diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 3bde9baa23a..bfa547df187 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -151,7 +151,7 @@ struct softpipe_context { /** Conditional query object and mode */ struct pipe_query *render_cond_query; enum pipe_render_cond_flag render_cond_mode; - boolean render_cond_cond; + bool render_cond_cond; /** Polygon stipple items */ struct { diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c index 1861b0da07e..64ed9de47f2 100644 --- a/src/gallium/drivers/softpipe/sp_fence.c +++ b/src/gallium/drivers/softpipe/sp_fence.c @@ -40,7 +40,7 @@ softpipe_fence_reference(struct pipe_screen *screen, } -static boolean +static bool softpipe_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *fence, diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index 6e7626d370e..bb86194b31f 100644 --- a/src/gallium/drivers/softpipe/sp_query.c +++ b/src/gallium/drivers/softpipe/sp_query.c @@ -86,7 +86,7 @@ softpipe_destroy_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool softpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q) { struct softpipe_context *softpipe = softpipe_context( pipe ); @@ -213,10 +213,10 @@ softpipe_end_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool softpipe_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *vresult) { struct softpipe_query *sq = softpipe_query(q); @@ -235,7 +235,7 @@ softpipe_get_query_result(struct pipe_context *pipe, sizeof(struct pipe_query_data_pipeline_statistics)); break; case PIPE_QUERY_GPU_FINISHED: - vresult->b = TRUE; + vresult->b = true; break; case PIPE_QUERY_SO_OVERFLOW_PREDICATE: case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE: @@ -246,7 +246,7 @@ softpipe_get_query_result(struct pipe_context *pipe, (struct pipe_query_data_timestamp_disjoint *)vresult; /* os_get_time_nano return nanoseconds */ td->frequency = UINT64_C(1000000000); - td->disjoint = FALSE; + td->disjoint = false; } break; case PIPE_QUERY_PRIMITIVES_EMITTED: @@ -263,7 +263,7 @@ softpipe_get_query_result(struct pipe_context *pipe, *result = sq->end - sq->start; break; } - return TRUE; + return true; } @@ -295,7 +295,7 @@ softpipe_check_render_cond(struct softpipe_context *sp) static void -softpipe_set_active_query_state(struct pipe_context *pipe, boolean enable) +softpipe_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 2b0916391cb..9c1a98ec4ea 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -406,7 +406,7 @@ softpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param) * \param format the format to test * \param type one of PIPE_TEXTURE, PIPE_SURFACE */ -static boolean +static bool softpipe_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -432,21 +432,21 @@ softpipe_is_format_supported( struct pipe_screen *screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; if (sample_count > 1) - return FALSE; + return false; if (bind & (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT | PIPE_BIND_SHARED)) { if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) - return FALSE; + return false; } if (bind & PIPE_BIND_RENDER_TARGET) { if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; /* * Although possible, it is unnatural to render into compressed or YUV @@ -455,18 +455,18 @@ softpipe_is_format_supported( struct pipe_screen *screen, */ if (format_desc->block.width != 1 || format_desc->block.height != 1) - return FALSE; + return false; } if (bind & PIPE_BIND_DEPTH_STENCIL) { if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; } if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC || format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) { /* Software decoding is not hooked up. */ - return FALSE; + return false; } if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) && @@ -483,13 +483,13 @@ softpipe_is_format_supported( struct pipe_screen *screen, * PIPE_FORMAT_R8G8B8X8_UNORM, for example, which will not work * (different bpp). */ - return FALSE; + return false; } } if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && format != PIPE_FORMAT_ETC1_RGB8) - return FALSE; + return false; /* * All other operations (sampling, transfer, etc). @@ -498,7 +498,7 @@ softpipe_is_format_supported( struct pipe_screen *screen, /* * Everything else should be supported by u_format. */ - return TRUE; + return true; } diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index c49bfcaba55..094b3f7c945 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -112,7 +112,7 @@ softpipe_resource_layout(struct pipe_screen *screen, * Check the size of the texture specified by 'res'. * \return TRUE if OK, FALSE if too large. */ -static boolean +static bool softpipe_can_create_resource(struct pipe_screen *screen, const struct pipe_resource *res) { @@ -250,7 +250,7 @@ softpipe_resource_from_handle(struct pipe_screen *screen, } -static boolean +static bool softpipe_resource_get_handle(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_resource *pt, @@ -262,7 +262,7 @@ softpipe_resource_get_handle(struct pipe_screen *screen, assert(spr->dt); if (!spr->dt) - return FALSE; + return false; return winsys->displaytarget_get_handle(winsys, spr->dt, whandle); } diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 84134018c17..4ccbb82ceb7 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -2275,7 +2275,7 @@ svga_linear_to_srgb(SVGA3dSurfaceFormat format) * Implement pipe_screen::is_format_supported(). * \param bindings bitmask of PIPE_BIND_x flags */ -boolean +bool svga_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -2293,17 +2293,17 @@ svga_is_format_supported(struct pipe_screen *screen, /* Multisamples is not supported in VGPU9 device */ if (sample_count > 1) - return FALSE; + return false; svga_format = svga_translate_format(ss, format, bindings); if (svga_format == SVGA3D_FORMAT_INVALID) { - return FALSE; + return false; } if (util_format_is_srgb(format) && (bindings & PIPE_BIND_DISPLAY_TARGET)) { /* We only support sRGB rendering with vgpu10 */ - return FALSE; + return false; } /* @@ -2331,10 +2331,10 @@ svga_is_format_supported(struct pipe_screen *screen, */ case SVGA3D_A4R4G4B4: case SVGA3D_A1R5G5B5: - return FALSE; + return false; default: - return FALSE; + return false; } } @@ -2349,7 +2349,7 @@ svga_is_format_supported(struct pipe_screen *screen, */ if (!svga_format_is_integer(svga_format) && (caps.value & SVGA3DFORMAT_OP_NOALPHABLEND)) { - return FALSE; + return false; } } @@ -2376,7 +2376,7 @@ svga_is_format_supported(struct pipe_screen *screen, * Implement pipe_screen::is_format_supported() for VGPU10 device. * \param bindings bitmask of PIPE_BIND_x flags */ -boolean +bool svga_is_dx_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -2400,7 +2400,7 @@ svga_is_dx_format_supported(struct pipe_screen *screen, * multisample with N+1 samples per pixel. */ if ((ss->ms_samples & (1 << (sample_count - 1))) == 0) { - return FALSE; + return false; } mask |= SVGA3D_DXFMT_MULTISAMPLE; } @@ -2418,7 +2418,7 @@ svga_is_dx_format_supported(struct pipe_screen *screen, svga_format = svga_translate_format(ss, format, bindings); if (svga_format == SVGA3D_FORMAT_INVALID) { - return FALSE; + return false; } /* @@ -2446,10 +2446,10 @@ svga_is_dx_format_supported(struct pipe_screen *screen, */ case SVGA3D_A4R4G4B4: case SVGA3D_A1R5G5B5: - return FALSE; + return false; default: - return FALSE; + return false; } } @@ -2464,7 +2464,7 @@ svga_is_dx_format_supported(struct pipe_screen *screen, */ if (!(svga_format_is_integer(svga_format) || (caps.u & SVGA3D_DXFMT_BLENDABLE))) { - return FALSE; + return false; } mask |= SVGA3D_DXFMT_COLOR_RENDERTARGET; } @@ -2487,7 +2487,7 @@ svga_is_dx_format_supported(struct pipe_screen *screen, /* Is the format supported for rendering */ if ((caps.u & mask) != mask) - return FALSE; + return false; if (bindings & PIPE_BIND_SAMPLER_VIEW) { SVGA3dSurfaceFormat sampler_format; @@ -2500,9 +2500,9 @@ svga_is_dx_format_supported(struct pipe_screen *screen, mask &= SVGA3D_DXFMT_VOLUME; mask |= SVGA3D_DXFMT_SHADER_SAMPLE; if ((caps.u & mask) != mask) - return FALSE; + return false; } } - return TRUE; + return true; } diff --git a/src/gallium/drivers/svga/svga_format.h b/src/gallium/drivers/svga/svga_format.h index 64d3cc06bed..a2ef4796374 100644 --- a/src/gallium/drivers/svga/svga_format.h +++ b/src/gallium/drivers/svga/svga_format.h @@ -131,7 +131,7 @@ SVGA3dSurfaceFormat svga_linear_to_srgb(SVGA3dSurfaceFormat format); -boolean +bool svga_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -140,7 +140,7 @@ svga_is_format_supported(struct pipe_screen *screen, unsigned bindings); -boolean +bool svga_is_dx_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c index cec95ed3b6f..8922ef56e59 100644 --- a/src/gallium/drivers/svga/svga_pipe_query.c +++ b/src/gallium/drivers/svga/svga_pipe_query.c @@ -81,10 +81,10 @@ svga_query(struct pipe_query *q) * VGPU9 */ -static boolean +static bool svga_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *result); static enum pipe_error @@ -164,9 +164,9 @@ end_query_vgpu9(struct svga_context *svga, struct svga_query *sq) return ret; } -static boolean +static bool get_query_result_vgpu9(struct svga_context *svga, struct svga_query *sq, - boolean wait, uint64_t *result) + bool wait, uint64_t *result) { struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws; enum pipe_error ret; @@ -190,7 +190,7 @@ get_query_result_vgpu9(struct svga_context *svga, struct svga_query *sq, state = sq->queryResult->state; if (state == SVGA3D_QUERYSTATE_PENDING) { if (!wait) - return FALSE; + return false; sws->fence_finish(sws, sq->fence, PIPE_TIMEOUT_INFINITE, SVGA_FENCE_FLAG_QUERY); state = sq->queryResult->state; @@ -200,7 +200,7 @@ get_query_result_vgpu9(struct svga_context *svga, struct svga_query *sq, state == SVGA3D_QUERYSTATE_FAILED); *result = (uint64_t)sq->queryResult->result32; - return TRUE; + return true; } @@ -626,9 +626,9 @@ end_query_vgpu10(struct svga_context *svga, struct svga_query *sq) return ret; } -static boolean +static bool get_query_result_vgpu10(struct svga_context *svga, struct svga_query *sq, - boolean wait, void *result, int resultLen) + bool wait, void *result, int resultLen) { struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws; SVGA3dQueryState queryState; @@ -651,7 +651,7 @@ get_query_result_vgpu10(struct svga_context *svga, struct svga_query *sq, if (queryState == SVGA3D_QUERYSTATE_PENDING || queryState == SVGA3D_QUERYSTATE_NEW) { if (!wait) - return FALSE; + return false; sws->fence_finish(sws, sq->fence, PIPE_TIMEOUT_INFINITE, SVGA_FENCE_FLAG_QUERY); sws->query_get_result(sws, sq->gb_query, sq->offset, &queryState, result, resultLen); @@ -660,7 +660,7 @@ get_query_result_vgpu10(struct svga_context *svga, struct svga_query *sq, assert(queryState == SVGA3D_QUERYSTATE_SUCCEEDED || queryState == SVGA3D_QUERYSTATE_FAILED); - return TRUE; + return true; } static struct pipe_query * @@ -847,7 +847,7 @@ svga_destroy_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool svga_begin_query(struct pipe_context *pipe, struct pipe_query *q) { struct svga_context *svga = svga_context(pipe); @@ -1073,17 +1073,17 @@ svga_end_query(struct pipe_context *pipe, struct pipe_query *q) } -static boolean +static bool svga_get_query_result(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, union pipe_query_result *vresult) { struct svga_screen *svgascreen = svga_screen(pipe->screen); struct svga_context *svga = svga_context(pipe); struct svga_query *sq = svga_query(q); uint64_t *result = (uint64_t *)vresult; - boolean ret = TRUE; + bool ret = true; assert(sq); @@ -1215,7 +1215,7 @@ svga_get_query_result(struct pipe_context *pipe, static void svga_render_condition(struct pipe_context *pipe, struct pipe_query *q, - boolean condition, enum pipe_render_cond_flag mode) + bool condition, enum pipe_render_cond_flag mode) { struct svga_context *svga = svga_context(pipe); struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws; @@ -1290,7 +1290,7 @@ svga_get_timestamp(struct pipe_context *pipe) static void -svga_set_active_query_state(struct pipe_context *pipe, boolean enable) +svga_set_active_query_state(struct pipe_context *pipe, bool enable) { } diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c index b9dca1ede2b..320d42dd535 100644 --- a/src/gallium/drivers/svga/svga_resource.c +++ b/src/gallium/drivers/svga/svga_resource.c @@ -75,7 +75,7 @@ svga_resource_from_handle(struct pipe_screen * screen, * and format can be created. * \Return TRUE if OK, FALSE if too large. */ -static boolean +static bool svga_can_create_resource(struct pipe_screen *screen, const struct pipe_resource *res) { @@ -102,7 +102,7 @@ svga_can_create_resource(struct pipe_screen *screen, format = svga_translate_format(svgascreen, res->format, res->bind); if (format == SVGA3D_FORMAT_INVALID) - return FALSE; + return false; base_level_size.width = res->width0; base_level_size.height = res->height0; diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index bfedbee7a48..b04542d711a 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -202,7 +202,7 @@ svga_transfer_dma(struct svga_context *svga, -static boolean +static bool svga_texture_get_handle(struct pipe_screen *screen, struct pipe_resource *texture, struct winsys_handle *whandle) @@ -1279,7 +1279,7 @@ out_unref: return NULL; } -boolean +bool svga_texture_generate_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, enum pipe_format format, @@ -1298,19 +1298,19 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, /* Only support 2D texture for now */ if (pt->target != PIPE_TEXTURE_2D) - return FALSE; + return false; /* Fallback to the mipmap generation utility for those formats that * do not support hw generate mipmap */ if (!svga_format_support_gen_mips(format)) - return FALSE; + return false; /* Make sure the texture surface was created with * SVGA3D_SURFACE_BIND_RENDER_TARGET */ if (!tex->handle || !(tex->key.flags & SVGA3D_SURFACE_BIND_RENDER_TARGET)) - return FALSE; + return false; templ.format = format; templ.u.tex.first_layer = first_layer; @@ -1320,7 +1320,7 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, psv = pipe->create_sampler_view(pipe, pt, &templ); if (psv == NULL) - return FALSE; + return false; sv = svga_pipe_sampler_view(psv); ret = svga_validate_pipe_sampler_view(svga, sv); @@ -1339,7 +1339,7 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, svga->hud.num_generate_mipmap++; - return TRUE; + return true; } diff --git a/src/gallium/drivers/svga/svga_resource_texture.h b/src/gallium/drivers/svga/svga_resource_texture.h index 053d74c6913..0c1bb8c4eb1 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.h +++ b/src/gallium/drivers/svga/svga_resource_texture.h @@ -287,7 +287,7 @@ svga_texture_from_handle(struct pipe_screen * screen, const struct pipe_resource *template, struct winsys_handle *whandle); -boolean +bool svga_texture_generate_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, enum pipe_format format, diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 9a13e68f17c..f2fa124cf06 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -781,14 +781,14 @@ svga_fence_reference(struct pipe_screen *screen, } -static boolean +static bool svga_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *fence, uint64_t timeout) { struct svga_winsys_screen *sws = svga_screen(screen)->sws; - boolean retVal; + bool retVal; SVGA_STATS_TIME_PUSH(sws, SVGA_STATS_TIME_FENCEFINISH); diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp index 8a1ef95c2c6..b3e67b9c18f 100644 --- a/src/gallium/drivers/swr/swr_context.cpp +++ b/src/gallium/drivers/swr/swr_context.cpp @@ -416,7 +416,7 @@ swr_destroy(struct pipe_context *pipe) static void swr_render_condition(struct pipe_context *pipe, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct swr_context *ctx = swr_context(pipe); diff --git a/src/gallium/drivers/swr/swr_context.h b/src/gallium/drivers/swr/swr_context.h index 3b83458b947..55de8e04663 100644 --- a/src/gallium/drivers/swr/swr_context.h +++ b/src/gallium/drivers/swr/swr_context.h @@ -148,7 +148,7 @@ struct swr_context { /** Conditional query object and mode */ struct pipe_query *render_cond_query; enum pipe_render_cond_flag render_cond_mode; - boolean render_cond_cond; + bool render_cond_cond; unsigned active_queries; unsigned num_vertex_buffers; diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp index 074d82a3b47..4e2b2af874c 100644 --- a/src/gallium/drivers/swr/swr_fence.cpp +++ b/src/gallium/drivers/swr/swr_fence.cpp @@ -123,7 +123,7 @@ swr_fence_reference(struct pipe_screen *screen, /* * Wait for the fence to finish. */ -boolean +bool swr_fence_finish(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle *fence_handle, diff --git a/src/gallium/drivers/swr/swr_fence.h b/src/gallium/drivers/swr/swr_fence.h index 4766b5b8911..2f7cd1cf9a6 100644 --- a/src/gallium/drivers/swr/swr_fence.h +++ b/src/gallium/drivers/swr/swr_fence.h @@ -54,14 +54,14 @@ swr_fence(struct pipe_fence_handle *fence) } -static INLINE boolean +static INLINE bool swr_is_fence_done(struct pipe_fence_handle *fence_handle) { struct swr_fence *fence = swr_fence(fence_handle); return (fence->read == fence->write); } -static INLINE boolean +static INLINE bool swr_is_fence_pending(struct pipe_fence_handle *fence_handle) { return swr_fence(fence_handle)->pending; @@ -76,10 +76,10 @@ void swr_fence_reference(struct pipe_screen *screen, struct pipe_fence_handle **ptr, struct pipe_fence_handle *f); -boolean swr_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence_handle, - uint64_t timeout); +bool swr_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence_handle, + uint64_t timeout); void swr_fence_submit(struct swr_context *ctx, struct pipe_fence_handle *fence); 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) { } diff --git a/src/gallium/drivers/swr/swr_query.h b/src/gallium/drivers/swr/swr_query.h index 1c736e4e1be..d838dc859e2 100644 --- a/src/gallium/drivers/swr/swr_query.h +++ b/src/gallium/drivers/swr/swr_query.h @@ -44,5 +44,5 @@ OSALIGNLINE(struct) swr_query { extern void swr_query_init(struct pipe_context *pipe); -extern boolean swr_check_render_cond(struct pipe_context *pipe); +extern bool swr_check_render_cond(struct pipe_context *pipe); #endif diff --git a/src/gallium/drivers/swr/swr_resource.h b/src/gallium/drivers/swr/swr_resource.h index 63327d6bd35..2228dff7488 100644 --- a/src/gallium/drivers/swr/swr_resource.h +++ b/src/gallium/drivers/swr/swr_resource.h @@ -67,12 +67,12 @@ swr_resource(struct pipe_resource *resource) return (struct swr_resource *)resource; } -static INLINE boolean +static INLINE bool swr_resource_is_texture(const struct pipe_resource *resource) { switch (resource->target) { case PIPE_BUFFER: - return FALSE; + return false; case PIPE_TEXTURE_1D: case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_2D: @@ -81,10 +81,10 @@ swr_resource_is_texture(const struct pipe_resource *resource) case PIPE_TEXTURE_3D: case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: - return TRUE; + return true; default: assert(0); - return FALSE; + return false; } } diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index 9b146284672..8e02c86bec0 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -81,7 +81,7 @@ swr_get_vendor(struct pipe_screen *screen) return "Intel Corporation"; } -static boolean +static bool swr_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, @@ -107,23 +107,23 @@ swr_is_format_supported(struct pipe_screen *_screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; if ((sample_count > screen->msaa_max_count) || !util_is_power_of_two_or_zero(sample_count)) - return FALSE; + return false; if (bind & PIPE_BIND_DISPLAY_TARGET) { if (!winsys->is_displaytarget_format_supported(winsys, bind, format)) - return FALSE; + return false; } if (bind & PIPE_BIND_RENDER_TARGET) { if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; if (mesa_to_swr_format(format) == (SWR_FORMAT)-1) - return FALSE; + return false; /* * Although possible, it is unnatural to render into compressed or YUV @@ -131,25 +131,25 @@ swr_is_format_supported(struct pipe_screen *_screen, * inside the state trackers. */ if (format_desc->block.width != 1 || format_desc->block.height != 1) - return FALSE; + return false; } if (bind & PIPE_BIND_DEPTH_STENCIL) { if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; if (mesa_to_swr_format(format) == (SWR_FORMAT)-1) - return FALSE; + return false; } if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC || format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) { - return FALSE; + return false; } if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && format != PIPE_FORMAT_ETC1_RGB8) { - return FALSE; + return false; } if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) && @@ -163,7 +163,7 @@ swr_is_format_supported(struct pipe_screen *_screen, if (format_desc->is_array && format_desc->nr_channels == 3 && format_desc->block.bits != 96) { - return FALSE; + return false; } } @@ -671,7 +671,7 @@ mesa_to_swr_format(enum pipe_format format) return it->second; } -static boolean +static bool swr_displaytarget_layout(struct swr_screen *screen, struct swr_resource *res) { struct sw_winsys *winsys = screen->winsys; @@ -689,7 +689,7 @@ swr_displaytarget_layout(struct swr_screen *screen, struct swr_resource *res) &stride); if (dt == NULL) - return FALSE; + return false; void *map = winsys->displaytarget_map(winsys, dt, 0); @@ -702,13 +702,13 @@ swr_displaytarget_layout(struct swr_screen *screen, struct swr_resource *res) winsys->displaytarget_unmap(winsys, dt); - return TRUE; + return true; } static bool swr_texture_layout(struct swr_screen *screen, struct swr_resource *res, - boolean allocate) + bool allocate) { struct pipe_resource *pt = &res->base; @@ -898,7 +898,7 @@ swr_texture_layout(struct swr_screen *screen, return true; } -static boolean +static bool swr_can_create_resource(struct pipe_screen *screen, const struct pipe_resource *templat) { @@ -910,7 +910,7 @@ swr_can_create_resource(struct pipe_screen *screen, /* Helper function that conditionally creates a single-sample resolve resource * and attaches it to main multisample resource. */ -static boolean +static bool swr_create_resolve_resource(struct pipe_screen *_screen, struct swr_resource *msaa_res) { diff --git a/src/gallium/drivers/swr/swr_screen.h b/src/gallium/drivers/swr/swr_screen.h index 51826a8af12..0fa44043191 100644 --- a/src/gallium/drivers/swr/swr_screen.h +++ b/src/gallium/drivers/swr/swr_screen.h @@ -46,7 +46,7 @@ struct swr_screen { struct sw_winsys *winsys; /* Configurable environment settings */ - boolean msaa_force_enable; + bool msaa_force_enable; uint8_t msaa_max_count; uint32_t client_copy_limit; diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index f33f96c1840..c21e08b4a5a 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -651,7 +651,7 @@ swr_set_framebuffer_state(struct pipe_context *pipe, { struct swr_context *ctx = swr_context(pipe); - boolean changed = !util_framebuffer_state_equal(&ctx->framebuffer, fb); + bool changed = !util_framebuffer_state_equal(&ctx->framebuffer, fb); assert(fb->width <= KNOB_GUARDBAND_WIDTH); assert(fb->height <= KNOB_GUARDBAND_HEIGHT); diff --git a/src/gallium/drivers/tegra/tegra_context.c b/src/gallium/drivers/tegra/tegra_context.c index e9ab1f61da6..e91baf0be34 100644 --- a/src/gallium/drivers/tegra/tegra_context.c +++ b/src/gallium/drivers/tegra/tegra_context.c @@ -73,7 +73,7 @@ tegra_draw_vbo(struct pipe_context *pcontext, static void tegra_render_condition(struct pipe_context *pcontext, struct pipe_query *query, - boolean condition, + bool condition, unsigned int mode) { struct tegra_context *context = to_tegra_context(pcontext); @@ -109,7 +109,7 @@ tegra_destroy_query(struct pipe_context *pcontext, struct pipe_query *query) context->gpu->destroy_query(context->gpu, query); } -static boolean +static bool tegra_begin_query(struct pipe_context *pcontext, struct pipe_query *query) { struct tegra_context *context = to_tegra_context(pcontext); @@ -125,10 +125,10 @@ tegra_end_query(struct pipe_context *pcontext, struct pipe_query *query) return context->gpu->end_query(context->gpu, query); } -static boolean +static bool tegra_get_query_result(struct pipe_context *pcontext, struct pipe_query *query, - boolean wait, + bool wait, union pipe_query_result *result) { struct tegra_context *context = to_tegra_context(pcontext); @@ -140,7 +140,7 @@ tegra_get_query_result(struct pipe_context *pcontext, static void tegra_get_query_result_resource(struct pipe_context *pcontext, struct pipe_query *query, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, @@ -154,7 +154,7 @@ tegra_get_query_result_resource(struct pipe_context *pcontext, } static void -tegra_set_active_query_state(struct pipe_context *pcontext, boolean enable) +tegra_set_active_query_state(struct pipe_context *pcontext, bool enable) { struct tegra_context *context = to_tegra_context(pcontext); @@ -523,7 +523,7 @@ tegra_set_scissor_states(struct pipe_context *pcontext, unsigned start_slot, } static void -tegra_set_window_rectangles(struct pipe_context *pcontext, boolean include, +tegra_set_window_rectangles(struct pipe_context *pcontext, bool include, unsigned int num_rectangles, const struct pipe_scissor_state *rectangles) { @@ -1132,7 +1132,7 @@ tegra_emit_string_marker(struct pipe_context *pcontext, const char *string, context->gpu->emit_string_marker(context->gpu, string, length); } -static boolean +static bool tegra_generate_mipmap(struct pipe_context *pcontext, struct pipe_resource *presource, enum pipe_format format, diff --git a/src/gallium/drivers/tegra/tegra_screen.c b/src/gallium/drivers/tegra/tegra_screen.c index 6e7769075d1..9ec3f6fe1d4 100644 --- a/src/gallium/drivers/tegra/tegra_screen.c +++ b/src/gallium/drivers/tegra/tegra_screen.c @@ -128,7 +128,7 @@ tegra_screen_get_timestamp(struct pipe_screen *pscreen) return screen->gpu->get_timestamp(screen->gpu); } -static boolean +static bool tegra_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -143,7 +143,7 @@ tegra_screen_is_format_supported(struct pipe_screen *pscreen, usage); } -static boolean +static bool tegra_screen_is_video_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_video_profile profile, @@ -155,7 +155,7 @@ tegra_screen_is_video_format_supported(struct pipe_screen *pscreen, entrypoint); } -static boolean +static bool tegra_screen_can_create_resource(struct pipe_screen *pscreen, const struct pipe_resource *template) { @@ -168,7 +168,7 @@ static int tegra_screen_import_resource(struct tegra_screen *screen, struct tegra_resource *resource) { struct winsys_handle handle; - boolean status; + bool status; int fd, err; memset(&handle, 0, sizeof(handle)); @@ -314,7 +314,7 @@ tegra_screen_resource_from_user_memory(struct pipe_screen *pscreen, return resource; } -static boolean +static bool tegra_screen_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *pcontext, struct pipe_resource *presource, @@ -324,7 +324,7 @@ tegra_screen_resource_get_handle(struct pipe_screen *pscreen, struct tegra_resource *resource = to_tegra_resource(presource); struct tegra_context *context = to_tegra_context(pcontext); struct tegra_screen *screen = to_tegra_screen(pscreen); - boolean ret = TRUE; + bool ret = true; /* * Assume that KMS handles for scanout resources will only ever be used @@ -379,7 +379,7 @@ tegra_screen_fence_reference(struct pipe_screen *pscreen, screen->gpu->fence_reference(screen->gpu, ptr, fence); } -static boolean +static bool tegra_screen_fence_finish(struct pipe_screen *pscreen, struct pipe_context *pcontext, struct pipe_fence_handle *fence, diff --git a/src/gallium/drivers/v3d/v3d_blit.c b/src/gallium/drivers/v3d/v3d_blit.c index e177369dd10..0da19ce380d 100644 --- a/src/gallium/drivers/v3d/v3d_blit.c +++ b/src/gallium/drivers/v3d/v3d_blit.c @@ -457,7 +457,7 @@ v3d_tfu(struct pipe_context *pctx, return true; } -boolean +bool v3d_generate_mipmap(struct pipe_context *pctx, struct pipe_resource *prsc, enum pipe_format format, diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 9143f53cee8..a9162ba8b1f 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -624,13 +624,13 @@ bool v3d_tfu_supports_tex_format(const struct v3d_device_info *devinfo, void v3d_init_query_functions(struct v3d_context *v3d); void v3d_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info); void v3d_blitter_save(struct v3d_context *v3d); -boolean v3d_generate_mipmap(struct pipe_context *pctx, - struct pipe_resource *prsc, - enum pipe_format format, - unsigned int base_level, - unsigned int last_level, - unsigned int first_layer, - unsigned int last_layer); +bool v3d_generate_mipmap(struct pipe_context *pctx, + struct pipe_resource *prsc, + enum pipe_format format, + unsigned int base_level, + unsigned int last_level, + unsigned int first_layer, + unsigned int last_layer); struct v3d_fence *v3d_fence_create(struct v3d_context *v3d); diff --git a/src/gallium/drivers/v3d/v3d_fence.c b/src/gallium/drivers/v3d/v3d_fence.c index 0edcb66d911..8d13a09a9f4 100644 --- a/src/gallium/drivers/v3d/v3d_fence.c +++ b/src/gallium/drivers/v3d/v3d_fence.c @@ -61,7 +61,7 @@ v3d_fence_reference(struct pipe_screen *pscreen, *p = f; } -static boolean +static bool v3d_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_fence_handle *pf, diff --git a/src/gallium/drivers/v3d/v3d_query.c b/src/gallium/drivers/v3d/v3d_query.c index f68c42321a1..31b62461f90 100644 --- a/src/gallium/drivers/v3d/v3d_query.c +++ b/src/gallium/drivers/v3d/v3d_query.c @@ -64,7 +64,7 @@ v3d_destroy_query(struct pipe_context *pctx, struct pipe_query *query) free(q); } -static boolean +static bool v3d_begin_query(struct pipe_context *pctx, struct pipe_query *query) { struct v3d_context *v3d = v3d_context(pctx); @@ -112,9 +112,9 @@ v3d_end_query(struct pipe_context *pctx, struct pipe_query *query) return true; } -static boolean +static bool v3d_get_query_result(struct pipe_context *pctx, struct pipe_query *query, - boolean wait, union pipe_query_result *vresult) + bool wait, union pipe_query_result *vresult) { struct v3d_context *v3d = v3d_context(pctx); struct v3d_query *q = (struct v3d_query *)query; @@ -158,7 +158,7 @@ v3d_get_query_result(struct pipe_context *pctx, struct pipe_query *query, } static void -v3d_set_active_query_state(struct pipe_context *pctx, boolean enable) +v3d_set_active_query_state(struct pipe_context *pctx, bool enable) { struct v3d_context *v3d = v3d_context(pctx); diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c index e2f112328fc..30c4c2fc812 100644 --- a/src/gallium/drivers/v3d/v3d_resource.c +++ b/src/gallium/drivers/v3d/v3d_resource.c @@ -366,7 +366,7 @@ v3d_resource_destroy(struct pipe_screen *pscreen, free(rsc); } -static boolean +static bool v3d_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *pctx, struct pipe_resource *prsc, @@ -408,13 +408,13 @@ v3d_resource_get_handle(struct pipe_screen *pscreen, return ok; } whandle->handle = bo->handle; - return TRUE; + return true; case WINSYS_HANDLE_TYPE_FD: whandle->handle = v3d_bo_get_dmabuf(bo); return whandle->handle != -1; } - return FALSE; + return false; } #define PAGE_UB_ROWS (VC5_UIFCFG_PAGE_SIZE / VC5_UIFBLOCK_ROW_SIZE) diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index b128df34072..7fb63a4f38c 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -461,7 +461,7 @@ v3d_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_type, return 0; } -static boolean +static bool v3d_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -475,10 +475,10 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, return false; if (sample_count > 1 && sample_count != V3D_MAX_SAMPLES) - return FALSE; + return false; if (target >= PIPE_MAX_TEXTURE_TYPES) { - return FALSE; + return false; } if (usage & PIPE_BIND_VERTEX_BUFFER) { @@ -537,7 +537,7 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_B10G10R10A2_SSCALED: break; default: - return FALSE; + return false; } } @@ -547,12 +547,12 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, if ((usage & PIPE_BIND_RENDER_TARGET) && format != PIPE_FORMAT_NONE && !v3d_rt_format_supported(&screen->devinfo, format)) { - return FALSE; + return false; } if ((usage & PIPE_BIND_SAMPLER_VIEW) && !v3d_tex_format_supported(&screen->devinfo, format)) { - return FALSE; + return false; } if ((usage & PIPE_BIND_DEPTH_STENCIL) && @@ -561,17 +561,17 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, format == PIPE_FORMAT_Z16_UNORM || format == PIPE_FORMAT_Z32_FLOAT || format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT)) { - return FALSE; + return false; } if ((usage & PIPE_BIND_INDEX_BUFFER) && !(format == PIPE_FORMAT_I8_UINT || format == PIPE_FORMAT_I16_UINT || format == PIPE_FORMAT_I32_UINT)) { - return FALSE; + return false; } - return TRUE; + return true; } #define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x))) diff --git a/src/gallium/drivers/vc4/vc4_fence.c b/src/gallium/drivers/vc4/vc4_fence.c index 0dbfbe966b8..7e2be3eeb36 100644 --- a/src/gallium/drivers/vc4/vc4_fence.c +++ b/src/gallium/drivers/vc4/vc4_fence.c @@ -72,7 +72,7 @@ vc4_fence_reference(struct pipe_screen *pscreen, *p = f; } -static boolean +static bool vc4_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_fence_handle *pf, diff --git a/src/gallium/drivers/vc4/vc4_query.c b/src/gallium/drivers/vc4/vc4_query.c index f08785f457f..94ec13817ee 100644 --- a/src/gallium/drivers/vc4/vc4_query.c +++ b/src/gallium/drivers/vc4/vc4_query.c @@ -184,7 +184,7 @@ vc4_destroy_query(struct pipe_context *pctx, struct pipe_query *pquery) free(query); } -static boolean +static bool vc4_begin_query(struct pipe_context *pctx, struct pipe_query *pquery) { struct vc4_query *query = (struct vc4_query *)pquery; @@ -246,9 +246,9 @@ vc4_end_query(struct pipe_context *pctx, struct pipe_query *pquery) return true; } -static boolean +static bool vc4_get_query_result(struct pipe_context *pctx, struct pipe_query *pquery, - boolean wait, union pipe_query_result *vresult) + bool wait, union pipe_query_result *vresult) { struct vc4_context *ctx = vc4_context(pctx); struct vc4_query *query = (struct vc4_query *)pquery; @@ -278,7 +278,7 @@ vc4_get_query_result(struct pipe_context *pctx, struct pipe_query *pquery, } static void -vc4_set_active_query_state(struct pipe_context *pctx, boolean enable) +vc4_set_active_query_state(struct pipe_context *pctx, bool enable) { } diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index 93688cde998..bd233048c47 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -284,7 +284,7 @@ vc4_resource_destroy(struct pipe_screen *pscreen, free(rsc); } -static boolean +static bool vc4_resource_get_handle(struct pipe_screen *pscreen, struct pipe_context *pctx, struct pipe_resource *prsc, @@ -315,7 +315,7 @@ vc4_resource_get_handle(struct pipe_screen *pscreen, * control node was used for pl111. */ fprintf(stderr, "flink unsupported with pl111\n"); - return FALSE; + return false; } return vc4_bo_flink(rsc->bo, &whandle->handle); @@ -325,7 +325,7 @@ vc4_resource_get_handle(struct pipe_screen *pscreen, return renderonly_get_handle(rsc->scanout, whandle); } whandle->handle = rsc->bo->handle; - return TRUE; + return true; case WINSYS_HANDLE_TYPE_FD: /* FDs are cross-device, so we can export directly from vc4. */ @@ -333,7 +333,7 @@ vc4_resource_get_handle(struct pipe_screen *pscreen, return whandle->handle != -1; } - return FALSE; + return false; } static void diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index a9441d7ceb0..d7325b885a4 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -307,7 +307,7 @@ vc4_screen_get_shader_param(struct pipe_screen *pscreen, return 0; } -static boolean +static bool vc4_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -321,10 +321,10 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen, return false; if (sample_count > 1 && sample_count != VC4_MAX_SAMPLES) - return FALSE; + return false; if (target >= PIPE_MAX_TEXTURE_TYPES) { - return FALSE; + return false; } if (usage & PIPE_BIND_VERTEX_BUFFER) { @@ -375,34 +375,34 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_R8_SSCALED: break; default: - return FALSE; + return false; } } if ((usage & PIPE_BIND_RENDER_TARGET) && !vc4_rt_format_supported(format)) { - return FALSE; + return false; } if ((usage & PIPE_BIND_SAMPLER_VIEW) && (!vc4_tex_format_supported(format) || (format == PIPE_FORMAT_ETC1_RGB8 && !screen->has_etc1))) { - return FALSE; + return false; } if ((usage & PIPE_BIND_DEPTH_STENCIL) && format != PIPE_FORMAT_S8_UINT_Z24_UNORM && format != PIPE_FORMAT_X8Z24_UNORM) { - return FALSE; + return false; } if ((usage & PIPE_BIND_INDEX_BUFFER) && format != PIPE_FORMAT_I8_UINT && format != PIPE_FORMAT_I16_UINT) { - return FALSE; + return false; } - return TRUE; + return true; } static void diff --git a/src/gallium/drivers/virgl/virgl_query.c b/src/gallium/drivers/virgl/virgl_query.c index df571ec4905..e8ef4557d5a 100644 --- a/src/gallium/drivers/virgl/virgl_query.c +++ b/src/gallium/drivers/virgl/virgl_query.c @@ -81,7 +81,7 @@ static inline struct virgl_query *virgl_query(struct pipe_query *q) static void virgl_render_condition(struct pipe_context *ctx, struct pipe_query *q, - boolean condition, + bool condition, enum pipe_render_cond_flag mode) { struct virgl_context *vctx = virgl_context(ctx); @@ -136,7 +136,7 @@ static void virgl_destroy_query(struct pipe_context *ctx, FREE(query); } -static boolean virgl_begin_query(struct pipe_context *ctx, +static bool virgl_begin_query(struct pipe_context *ctx, struct pipe_query *q) { struct virgl_context *vctx = virgl_context(ctx); @@ -171,10 +171,10 @@ static bool virgl_end_query(struct pipe_context *ctx, return true; } -static boolean virgl_get_query_result(struct pipe_context *ctx, - struct pipe_query *q, - boolean wait, - union pipe_query_result *result) +static bool virgl_get_query_result(struct pipe_context *ctx, + struct pipe_query *q, + bool wait, + union pipe_query_result *result) { struct virgl_query *query = virgl_query(q); @@ -230,14 +230,14 @@ static boolean virgl_get_query_result(struct pipe_context *ctx, } static void -virgl_set_active_query_state(struct pipe_context *pipe, boolean enable) +virgl_set_active_query_state(struct pipe_context *pipe, bool enable) { } static void virgl_get_query_result_resource(struct pipe_context *ctx, struct pipe_query *q, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index 74da5ef968c..ca4db39dab1 100644 --- a/src/gallium/drivers/virgl/virgl_resource.c +++ b/src/gallium/drivers/virgl/virgl_resource.c @@ -698,15 +698,15 @@ void virgl_resource_destroy(struct pipe_screen *screen, FREE(res); } -boolean virgl_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *whandle) +bool virgl_resource_get_handle(struct pipe_screen *screen, + struct pipe_resource *resource, + struct winsys_handle *whandle) { struct virgl_screen *vs = virgl_screen(screen); struct virgl_resource *res = virgl_resource(resource); if (res->u.b.target == PIPE_BUFFER) - return FALSE; + return false; return vs->vws->resource_get_handle(vs->vws, res->hw_res, res->metadata.stride[0], diff --git a/src/gallium/drivers/virgl/virgl_resource.h b/src/gallium/drivers/virgl/virgl_resource.h index 95ed3e8ef13..2151f36cf1c 100644 --- a/src/gallium/drivers/virgl/virgl_resource.h +++ b/src/gallium/drivers/virgl/virgl_resource.h @@ -171,9 +171,9 @@ void virgl_resource_destroy_transfer(struct virgl_context *vctx, void virgl_resource_destroy(struct pipe_screen *screen, struct pipe_resource *resource); -boolean virgl_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *whandle); +bool virgl_resource_get_handle(struct pipe_screen *screen, + struct pipe_resource *resource, + struct winsys_handle *whandle); void virgl_resource_dirty(struct virgl_resource *res, uint32_t level); diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index db3a520508e..35becc1bd6a 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -541,7 +541,7 @@ virgl_get_compute_param(struct pipe_screen *screen, return 0; } -static boolean +static bool has_format_bit(struct virgl_supported_format_mask *mask, enum virgl_formats fmt) { @@ -553,7 +553,7 @@ has_format_bit(struct virgl_supported_format_mask *mask, return (mask->bitmask[val / 32] & (1u << bit)) != 0; } -boolean +bool virgl_has_readback_format(struct pipe_screen *screen, enum virgl_formats fmt) { @@ -562,7 +562,7 @@ virgl_has_readback_format(struct pipe_screen *screen, fmt); } -static boolean +static bool virgl_is_vertex_format_supported(struct pipe_screen *screen, enum pipe_format format) { @@ -572,15 +572,15 @@ virgl_is_vertex_format_supported(struct pipe_screen *screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; if (format == PIPE_FORMAT_R11G11B10_FLOAT) { int vformat = VIRGL_FORMAT_R11G11B10_FLOAT; int big = vformat / 32; int small = vformat % 32; if (!(vscreen->caps.caps.v1.vertexbuffer.bitmask[big] & (1 << small))) - return FALSE; - return TRUE; + return false; + return true; } /* Find the first non-VOID channel. */ @@ -591,25 +591,25 @@ virgl_is_vertex_format_supported(struct pipe_screen *screen, } if (i == 4) - return FALSE; + return false; if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) - return FALSE; + return false; if (format_desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED) - return FALSE; - return TRUE; + return false; + return true; } -static boolean +static bool virgl_format_check_bitmask(enum pipe_format format, uint32_t bitmask[16], - boolean may_emulate_bgra) + bool may_emulate_bgra) { int big = format / 32; int small = format % 32; if ((bitmask[big] & (1 << small))) - return TRUE; + return true; /* On GLES hosts we don't advertise BGRx_SRGB, but we may be able * emulate it by using a swizzled RGBx */ @@ -619,15 +619,15 @@ virgl_format_check_bitmask(enum pipe_format format, else if (format == PIPE_FORMAT_B8G8R8X8_SRGB) format = PIPE_FORMAT_R8G8B8X8_SRGB; else { - return FALSE; + return false; } big = format / 32; small = format % 32; if (bitmask[big] & (1 << small)) - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -635,7 +635,7 @@ virgl_format_check_bitmask(enum pipe_format format, * \param format the format to test * \param type one of PIPE_TEXTURE, PIPE_SURFACE */ -static boolean +static bool virgl_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, @@ -664,22 +664,22 @@ virgl_is_format_supported( struct pipe_screen *screen, format_desc = util_format_description(format); if (!format_desc) - return FALSE; + return false; if (util_format_is_intensity(format)) - return FALSE; + return false; if (sample_count > 1) { if (!vscreen->caps.caps.v1.bset.texture_multisample) - return FALSE; + return false; if (bind & PIPE_BIND_SHADER_IMAGE) { if (sample_count > vscreen->caps.caps.v2.max_image_samples) - return FALSE; + return false; } if (sample_count > vscreen->caps.caps.v1.max_samples) - return FALSE; + return false; } if (bind & PIPE_BIND_VERTEX_BUFFER) { @@ -687,20 +687,20 @@ virgl_is_format_supported( struct pipe_screen *screen, } if (util_format_is_compressed(format) && target == PIPE_BUFFER) - return FALSE; + return false; /* Allow 3-comp 32 bit textures only for TBOs (needed for ARB_tbo_rgb32) */ if ((format == PIPE_FORMAT_R32G32B32_FLOAT || format == PIPE_FORMAT_R32G32B32_SINT || format == PIPE_FORMAT_R32G32B32_UINT) && target != PIPE_BUFFER) - return FALSE; + return false; if ((format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC || format_desc->layout == UTIL_FORMAT_LAYOUT_ETC || format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) && target == PIPE_TEXTURE_3D) - return FALSE; + return false; may_emulate_bgra = (vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_APP_TWEAK_SUPPORT) && @@ -712,7 +712,7 @@ virgl_is_format_supported( struct pipe_screen *screen, return TRUE; if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; /* * Although possible, it is unnatural to render into compressed or YUV @@ -721,17 +721,17 @@ virgl_is_format_supported( struct pipe_screen *screen, */ if (format_desc->block.width != 1 || format_desc->block.height != 1) - return FALSE; + return false; if (!virgl_format_check_bitmask(format, vscreen->caps.caps.v1.render.bitmask, may_emulate_bgra)) - return FALSE; + return false; } if (bind & PIPE_BIND_DEPTH_STENCIL) { if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; + return false; } /* @@ -762,11 +762,11 @@ virgl_is_format_supported( struct pipe_screen *screen, } if (i == 4) - return FALSE; + return false; /* no L4A4 */ if (format_desc->nr_channels < 4 && format_desc->channel[i].size == 4) - return FALSE; + return false; out_lookup: return virgl_format_check_bitmask(format, @@ -798,10 +798,10 @@ static void virgl_fence_reference(struct pipe_screen *screen, vws->fence_reference(vws, ptr, fence); } -static boolean virgl_fence_finish(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout) +static bool virgl_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout) { struct virgl_screen *vscreen = virgl_screen(screen); struct virgl_winsys *vws = vscreen->vws; diff --git a/src/gallium/drivers/virgl/virgl_screen.h b/src/gallium/drivers/virgl/virgl_screen.h index 097bba61127..3c7c596e1eb 100644 --- a/src/gallium/drivers/virgl/virgl_screen.h +++ b/src/gallium/drivers/virgl/virgl_screen.h @@ -65,7 +65,7 @@ virgl_screen(struct pipe_screen *pipe) return (struct virgl_screen *)pipe; } -boolean +bool virgl_has_readback_format(struct pipe_screen *screen, enum virgl_formats fmt); /* GL_ARB_map_buffer_alignment requires 64 as the minimum alignment value. In diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index b8192505a39..b2a6622210f 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -118,7 +118,7 @@ struct pipe_context { */ void (*render_condition)( struct pipe_context *pipe, struct pipe_query *query, - boolean condition, + bool condition, enum pipe_render_cond_flag mode ); /** @@ -151,7 +151,7 @@ struct pipe_context { void (*destroy_query)(struct pipe_context *pipe, struct pipe_query *q); - boolean (*begin_query)(struct pipe_context *pipe, struct pipe_query *q); + bool (*begin_query)(struct pipe_context *pipe, struct pipe_query *q); bool (*end_query)(struct pipe_context *pipe, struct pipe_query *q); /** @@ -159,10 +159,10 @@ struct pipe_context { * \param wait if true, this query will block until the result is ready * \return TRUE if results are ready, FALSE otherwise */ - boolean (*get_query_result)(struct pipe_context *pipe, - struct pipe_query *q, - boolean wait, - union pipe_query_result *result); + bool (*get_query_result)(struct pipe_context *pipe, + struct pipe_query *q, + bool wait, + union pipe_query_result *result); /** * Get results of a query, storing into resource. Note that this may not @@ -179,7 +179,7 @@ struct pipe_context { */ void (*get_query_result_resource)(struct pipe_context *pipe, struct pipe_query *q, - boolean wait, + bool wait, enum pipe_query_value_type result_type, int index, struct pipe_resource *resource, @@ -189,7 +189,7 @@ struct pipe_context { * Set whether all current non-driver queries except TIME_ELAPSED are * active or paused. */ - void (*set_active_query_state)(struct pipe_context *pipe, boolean enable); + void (*set_active_query_state)(struct pipe_context *pipe, bool enable); /*@}*/ @@ -315,7 +315,7 @@ struct pipe_context { const struct pipe_scissor_state * ); void (*set_window_rectangles)( struct pipe_context *, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state * ); @@ -853,13 +853,13 @@ struct pipe_context { * Generate mipmap. * \return TRUE if mipmap generation succeeds, FALSE otherwise */ - boolean (*generate_mipmap)(struct pipe_context *ctx, - struct pipe_resource *resource, - enum pipe_format format, - unsigned base_level, - unsigned last_level, - unsigned first_layer, - unsigned last_layer); + bool (*generate_mipmap)(struct pipe_context *ctx, + struct pipe_resource *resource, + enum pipe_format format, + unsigned base_level, + unsigned last_level, + unsigned first_layer, + unsigned last_layer); /** * Create a 64-bit texture handle. diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 0271a08f690..af67d593142 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -1055,7 +1055,7 @@ struct pipe_query_data_so_statistics struct pipe_query_data_timestamp_disjoint { uint64_t frequency; - boolean disjoint; + bool disjoint; }; /** @@ -1096,7 +1096,7 @@ union pipe_query_result /* PIPE_QUERY_SO_OVERFLOW_PREDICATE */ /* PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE */ /* PIPE_QUERY_GPU_FINISHED */ - boolean b; + bool b; /* PIPE_QUERY_OCCLUSION_COUNTER */ /* PIPE_QUERY_TIMESTAMP */ diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 3f9bad47095..9bd24772299 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -164,29 +164,29 @@ struct pipe_screen { * drawing surface. * \param bindings bitmask of PIPE_BIND_* */ - boolean (*is_format_supported)( struct pipe_screen *, - enum pipe_format format, - enum pipe_texture_target target, - unsigned sample_count, - unsigned storage_sample_count, - unsigned bindings ); + bool (*is_format_supported)( struct pipe_screen *, + enum pipe_format format, + enum pipe_texture_target target, + unsigned sample_count, + unsigned storage_sample_count, + unsigned bindings ); /** * Check if the given pipe_format is supported as output for this codec/profile. * \param profile profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN */ - boolean (*is_video_format_supported)( struct pipe_screen *, - enum pipe_format format, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint ); + bool (*is_video_format_supported)( struct pipe_screen *, + enum pipe_format format, + enum pipe_video_profile profile, + enum pipe_video_entrypoint entrypoint ); /** * Check if we can actually create the given resource (test the dimension, * overall size, etc). Used to implement proxy textures. * \return TRUE if size is OK, FALSE if too large. */ - boolean (*can_create_resource)(struct pipe_screen *screen, - const struct pipe_resource *templat); + bool (*can_create_resource)(struct pipe_screen *screen, + const struct pipe_resource *templat); /** * Create a new texture object, using the given template info. @@ -256,11 +256,11 @@ struct pipe_screen { * * \param usage A combination of PIPE_HANDLE_USAGE_* flags. */ - boolean (*resource_get_handle)(struct pipe_screen *, - struct pipe_context *context, - struct pipe_resource *tex, - struct winsys_handle *handle, - unsigned usage); + bool (*resource_get_handle)(struct pipe_screen *, + struct pipe_context *context, + struct pipe_resource *tex, + struct winsys_handle *handle, + unsigned usage); /** * Get stride and offset for the given pipe resource without the need to get @@ -314,10 +314,10 @@ struct pipe_screen { * * \param timeout in nanoseconds (may be PIPE_TIMEOUT_INFINITE). */ - boolean (*fence_finish)(struct pipe_screen *screen, - struct pipe_context *ctx, - struct pipe_fence_handle *fence, - uint64_t timeout); + bool (*fence_finish)(struct pipe_screen *screen, + struct pipe_context *ctx, + struct pipe_fence_handle *fence, + uint64_t timeout); /** * For fences created with PIPE_FLUSH_FENCE_FD (exported fd) or diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index b7fa76a803a..41c37402823 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -796,17 +796,17 @@ struct pipe_blit_info unsigned mask; /**< bitmask of PIPE_MASK_R/G/B/A/Z/S */ unsigned filter; /**< PIPE_TEX_FILTER_* */ - boolean scissor_enable; + bool scissor_enable; struct pipe_scissor_state scissor; /* Window rectangles can either be inclusive or exclusive. */ - boolean window_rectangle_include; + bool window_rectangle_include; unsigned num_window_rectangles; struct pipe_scissor_state window_rectangles[PIPE_MAX_WINDOW_RECTANGLES]; - boolean render_condition_enable; /**< whether the blit should honor the - current render condition */ - boolean alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */ + bool render_condition_enable; /**< whether the blit should honor the + current render condition */ + bool alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */ }; /** diff --git a/src/mesa/state_tracker/tests/st_format.c b/src/mesa/state_tracker/tests/st_format.c index 47a5fd0a7f0..3a2bb76d11d 100644 --- a/src/mesa/state_tracker/tests/st_format.c +++ b/src/mesa/state_tracker/tests/st_format.c @@ -35,7 +35,7 @@ #include "util/u_format.h" #include -static boolean +static bool is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target,