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/i915 | |
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/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_query.c | 14 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_resource_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_resource_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.h | 2 |
5 files changed, 16 insertions, 16 deletions
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, |