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/nouveau/nv50 | |
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/nouveau/nv50')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw_metric.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_resource.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv84_video.c | 2 |
12 files changed, 28 insertions, 28 deletions
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, |