summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2019-07-04 11:41:41 -0400
committerIlia Mirkin <[email protected]>2019-07-22 22:13:51 -0400
commit0e30c6b8a7e84211bb417362ec73f24ef134ae34 (patch)
tree7567deb41938d64e8fadcac7514deece8f7c1613 /src/gallium/include
parent365f24705f9703962b6749f4fafe7cd92d9c60b1 (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/include')
-rw-r--r--src/gallium/include/pipe/p_context.h32
-rw-r--r--src/gallium/include/pipe/p_defines.h4
-rw-r--r--src/gallium/include/pipe/p_screen.h42
-rw-r--r--src/gallium/include/pipe/p_state.h10
4 files changed, 44 insertions, 44 deletions
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) */
};
/**