diff options
author | Ilia Mirkin <[email protected]> | 2019-07-04 11:41:41 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2019-07-22 22:13:51 -0400 |
commit | 0e30c6b8a7e84211bb417362ec73f24ef134ae34 (patch) | |
tree | 7567deb41938d64e8fadcac7514deece8f7c1613 /src/gallium/drivers/v3d | |
parent | 365f24705f9703962b6749f4fafe7cd92d9c60b1 (diff) |
gallium: switch boolean -> bool at the interface definitions
This is a relatively minimal change to adjust all the gallium interfaces
to use bool instead of boolean. I tried to avoid making unrelated
changes inside of drivers to flip boolean -> bool to reduce the risk of
regressions (the compiler will much more easily allow "dirty" values
inside a char-based boolean than a C99 _Bool).
This has been build-tested on amd64 with:
Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d
vc4 i915 svga virgl swr panfrost iris lima kmsro
Gallium st: mesa xa xvmc xvmc vdpau va
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Acked-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_blit.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.h | 14 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_fence.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_query.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_resource.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 18 |
6 files changed, 25 insertions, 25 deletions
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))) |