aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_rbug
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/auxiliary/driver_rbug
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/auxiliary/driver_rbug')
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_context.c24
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_core.c8
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_objects.h2
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_public.h2
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_screen.c10
5 files changed, 23 insertions, 23 deletions
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();