aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-06-21 21:29:39 +0200
committerMarek Olšák <[email protected]>2016-06-25 23:13:42 +0200
commit7db10093d3ee26b0a5050ae01750465da1a76970 (patch)
tree379da8a7885586eba335e0fc68136bc6d403da61 /src/gallium/drivers/radeon
parent1c5a10497ab93495710989fe6c7dd1e776c51b05 (diff)
gallium/radeon: boolean -> bool, TRUE -> true, FALSE -> false
Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Vedran Miletić <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c12
-rw-r--r--src/gallium/drivers/radeon/r600_perfcounter.c22
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c2
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h10
-rw-r--r--src/gallium/drivers/radeon/r600_query.c58
-rw-r--r--src/gallium/drivers/radeon/r600_query.h30
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c4
-rw-r--r--src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c10
-rw-r--r--src/gallium/drivers/radeon/radeon_uvd.c2
9 files changed, 75 insertions, 75 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 4b0cf42a1df..9583d70489e 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -30,18 +30,18 @@
#include <inttypes.h>
#include <stdio.h>
-boolean r600_rings_is_buffer_referenced(struct r600_common_context *ctx,
- struct pb_buffer *buf,
- enum radeon_bo_usage usage)
+bool r600_rings_is_buffer_referenced(struct r600_common_context *ctx,
+ struct pb_buffer *buf,
+ enum radeon_bo_usage usage)
{
if (ctx->ws->cs_is_buffer_referenced(ctx->gfx.cs, buf, usage)) {
- return TRUE;
+ return true;
}
if (radeon_emitted(ctx->dma.cs, 0) &&
ctx->ws->cs_is_buffer_referenced(ctx->dma.cs, buf, usage)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void *r600_buffer_map_sync_with_rings(struct r600_common_context *ctx,
diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c
index af9a692d150..471c1dc58ca 100644
--- a/src/gallium/drivers/radeon/r600_perfcounter.c
+++ b/src/gallium/drivers/radeon/r600_perfcounter.c
@@ -418,8 +418,8 @@ error:
return NULL;
}
-static boolean r600_init_block_names(struct r600_common_screen *screen,
- struct r600_perfcounter_block *block)
+static bool r600_init_block_names(struct r600_common_screen *screen,
+ struct r600_perfcounter_block *block)
{
unsigned i, j, k;
unsigned groups_shader = 1, groups_se = 1, groups_instance = 1;
@@ -452,7 +452,7 @@ static boolean r600_init_block_names(struct r600_common_screen *screen,
block->group_names = MALLOC(block->num_groups * block->group_name_stride);
if (!block->group_names)
- return FALSE;
+ return false;
groupname = block->group_names;
for (i = 0; i < groups_shader; ++i) {
@@ -487,7 +487,7 @@ static boolean r600_init_block_names(struct r600_common_screen *screen,
block->selector_names = MALLOC(block->num_groups * block->num_selectors *
block->selector_name_stride);
if (!block->selector_names)
- return FALSE;
+ return false;
groupname = block->group_names;
p = block->selector_names;
@@ -499,7 +499,7 @@ static boolean r600_init_block_names(struct r600_common_screen *screen,
groupname += block->group_name_stride;
}
- return TRUE;
+ return true;
}
int r600_get_perfcounter_info(struct r600_common_screen *screen,
@@ -577,17 +577,17 @@ void r600_perfcounters_destroy(struct r600_common_screen *rscreen)
rscreen->perfcounters->cleanup(rscreen);
}
-boolean r600_perfcounters_init(struct r600_perfcounters *pc,
- unsigned num_blocks)
+bool r600_perfcounters_init(struct r600_perfcounters *pc,
+ unsigned num_blocks)
{
pc->blocks = CALLOC(num_blocks, sizeof(struct r600_perfcounter_block));
if (!pc->blocks)
- return FALSE;
+ return false;
- pc->separate_se = debug_get_bool_option("RADEON_PC_SEPARATE_SE", FALSE);
- pc->separate_instance = debug_get_bool_option("RADEON_PC_SEPARATE_INSTANCE", FALSE);
+ pc->separate_se = debug_get_bool_option("RADEON_PC_SEPARATE_SE", false);
+ pc->separate_instance = debug_get_bool_option("RADEON_PC_SEPARATE_INSTANCE", false);
- return TRUE;
+ return true;
}
void r600_perfcounters_add_block(struct r600_common_screen *rscreen,
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 8b6f3ab58cd..06388d51735 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -446,7 +446,7 @@ bool r600_common_context_init(struct r600_common_context *rctx,
rctx->allocator_zeroed_memory =
u_suballocator_create(&rctx->b, rscreen->info.gart_page_size,
- 0, PIPE_USAGE_DEFAULT, TRUE);
+ 0, PIPE_USAGE_DEFAULT, true);
if (!rctx->allocator_zeroed_memory)
return false;
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index a70c7fe5565..75dc5acc247 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -243,7 +243,7 @@ struct r600_texture {
unsigned dirty_level_mask; /* each bit says if that mipmap is compressed */
unsigned stencil_dirty_level_mask; /* each bit says if that mipmap is compressed */
struct r600_texture *flushed_depth_texture;
- boolean is_flushing_texture;
+ bool is_flushing_texture;
struct radeon_surf surface;
/* Colorbuffer compression and fast clear. */
@@ -524,7 +524,7 @@ struct r600_common_context {
struct r600_atom render_cond_atom;
struct pipe_query *render_cond;
unsigned render_cond_mode;
- boolean render_cond_invert;
+ bool render_cond_invert;
bool render_cond_force_off; /* for u_blitter */
/* MSAA sample locations.
@@ -586,9 +586,9 @@ struct r600_common_context {
};
/* r600_buffer.c */
-boolean r600_rings_is_buffer_referenced(struct r600_common_context *ctx,
- struct pb_buffer *buf,
- enum radeon_bo_usage usage);
+bool r600_rings_is_buffer_referenced(struct r600_common_context *ctx,
+ struct pb_buffer *buf,
+ enum radeon_bo_usage usage);
void *r600_buffer_map_sync_with_rings(struct r600_common_context *ctx,
struct r600_resource *resource,
unsigned usage);
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index 5474dbf2dea..d4d7292bcea 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -63,8 +63,8 @@ static enum radeon_value_id winsys_id_from_type(unsigned type)
}
}
-static boolean r600_query_sw_begin(struct r600_common_context *rctx,
- struct r600_query *rquery)
+static bool r600_query_sw_begin(struct r600_common_context *rctx,
+ struct r600_query *rquery)
{
struct r600_query_sw *query = (struct r600_query_sw *)rquery;
@@ -122,7 +122,7 @@ static boolean r600_query_sw_begin(struct r600_common_context *rctx,
unreachable("r600_query_sw_begin: bad query type");
}
- return TRUE;
+ return true;
}
static bool r600_query_sw_end(struct r600_common_context *rctx,
@@ -189,10 +189,10 @@ static bool r600_query_sw_end(struct r600_common_context *rctx,
return true;
}
-static boolean r600_query_sw_get_result(struct r600_common_context *rctx,
- struct r600_query *rquery,
- boolean wait,
- union pipe_query_result *result)
+static bool r600_query_sw_get_result(struct r600_common_context *rctx,
+ struct r600_query *rquery,
+ bool wait,
+ union pipe_query_result *result)
{
struct r600_query_sw *query = (struct r600_query_sw *)rquery;
@@ -201,8 +201,8 @@ static boolean r600_query_sw_get_result(struct r600_common_context *rctx,
/* Convert from cycles per millisecond to cycles per second (Hz). */
result->timestamp_disjoint.frequency =
(uint64_t)rctx->screen->info.clock_crystal_freq * 1000;
- result->timestamp_disjoint.disjoint = FALSE;
- return TRUE;
+ result->timestamp_disjoint.disjoint = false;
+ return true;
case PIPE_QUERY_GPU_FINISHED: {
struct pipe_screen *screen = rctx->b.screen;
result->b = screen->fence_finish(screen, query->fence,
@@ -212,19 +212,19 @@ static boolean r600_query_sw_get_result(struct r600_common_context *rctx,
case R600_QUERY_GPIN_ASIC_ID:
result->u32 = 0;
- return TRUE;
+ return true;
case R600_QUERY_GPIN_NUM_SIMD:
result->u32 = rctx->screen->info.num_good_compute_units;
- return TRUE;
+ return true;
case R600_QUERY_GPIN_NUM_RB:
result->u32 = rctx->screen->info.num_render_backends;
- return TRUE;
+ return true;
case R600_QUERY_GPIN_NUM_SPI:
result->u32 = 1; /* all supported chips have one SPI per SE */
- return TRUE;
+ return true;
case R600_QUERY_GPIN_NUM_SE:
result->u32 = rctx->screen->info.max_se;
- return TRUE;
+ return true;
}
result->u64 = query->end_result - query->begin_result;
@@ -240,7 +240,7 @@ static boolean r600_query_sw_get_result(struct r600_common_context *rctx,
break;
}
- return TRUE;
+ return true;
}
static struct r600_query_ops sw_query_ops = {
@@ -372,14 +372,14 @@ static struct r600_query_hw_ops query_hw_default_hw_ops = {
.add_result = r600_query_hw_add_result,
};
-boolean r600_query_hw_init(struct r600_common_context *rctx,
- struct r600_query_hw *query)
+bool r600_query_hw_init(struct r600_common_context *rctx,
+ struct r600_query_hw *query)
{
query->buffer.buf = r600_new_query_buffer(rctx, query);
if (!query->buffer.buf)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static struct pipe_query *r600_query_hw_create(struct r600_common_context *rctx,
@@ -538,7 +538,7 @@ static void r600_query_hw_emit_start(struct r600_common_context *ctx,
r600_update_prims_generated_query_state(ctx, query->b.type, 1);
ctx->need_gfx_cs_space(&ctx->b, query->num_cs_dw_begin + query->num_cs_dw_end,
- TRUE);
+ true);
/* Get a new query buffer if needed. */
if (query->buffer.results_end + query->result_size > query->buffer.buf->b.b.width0) {
@@ -620,7 +620,7 @@ static void r600_query_hw_emit_stop(struct r600_common_context *ctx,
/* The queries which need begin already called this in begin_query. */
if (query->flags & R600_QUERY_HW_FLAG_NO_START) {
- ctx->need_gfx_cs_space(&ctx->b, query->num_cs_dw_end, FALSE);
+ ctx->need_gfx_cs_space(&ctx->b, query->num_cs_dw_end, false);
}
/* emit end query */
@@ -753,8 +753,8 @@ static void r600_query_hw_reset_buffers(struct r600_common_context *rctx,
}
}
-boolean r600_query_hw_begin(struct r600_common_context *rctx,
- struct r600_query *rquery)
+bool r600_query_hw_begin(struct r600_common_context *rctx,
+ struct r600_query *rquery)
{
struct r600_query_hw *query = (struct r600_query_hw *)rquery;
@@ -956,9 +956,9 @@ static void r600_query_hw_clear_result(struct r600_query_hw *query,
util_query_clear_result(result, query->b.type);
}
-boolean r600_query_hw_get_result(struct r600_common_context *rctx,
- struct r600_query *rquery,
- boolean wait, union pipe_query_result *result)
+bool r600_query_hw_get_result(struct r600_common_context *rctx,
+ struct r600_query *rquery,
+ bool wait, union pipe_query_result *result)
{
struct r600_query_hw *query = (struct r600_query_hw *)rquery;
struct r600_query_buffer *qbuf;
@@ -973,7 +973,7 @@ boolean r600_query_hw_get_result(struct r600_common_context *rctx,
PIPE_TRANSFER_READ |
(wait ? 0 : PIPE_TRANSFER_DONTBLOCK));
if (!map)
- return FALSE;
+ return false;
while (results_base != qbuf->results_end) {
query->ops->add_result(rctx, query, map + results_base,
@@ -987,7 +987,7 @@ boolean r600_query_hw_get_result(struct r600_common_context *rctx,
rquery->type == PIPE_QUERY_TIMESTAMP) {
result->u64 = (1000000 * result->u64) / rctx->screen->info.clock_crystal_freq;
}
- return TRUE;
+ return true;
}
static void r600_render_condition(struct pipe_context *ctx,
@@ -1057,7 +1057,7 @@ void r600_resume_queries(struct r600_common_context *ctx)
assert(ctx->num_cs_dw_queries_suspend == 0);
/* Check CS space here. Resuming must not be interrupted by flushes. */
- ctx->need_gfx_cs_space(&ctx->b, num_cs_dw, TRUE);
+ ctx->need_gfx_cs_space(&ctx->b, num_cs_dw, true);
LIST_FOR_EACH_ENTRY(query, &ctx->active_queries, list) {
r600_query_hw_emit_start(ctx, query);
diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h
index b573a17bd01..e99a9119ee9 100644
--- a/src/gallium/drivers/radeon/r600_query.h
+++ b/src/gallium/drivers/radeon/r600_query.h
@@ -75,11 +75,11 @@ enum {
struct r600_query_ops {
void (*destroy)(struct r600_common_context *, struct r600_query *);
- boolean (*begin)(struct r600_common_context *, struct r600_query *);
+ bool (*begin)(struct r600_common_context *, struct r600_query *);
bool (*end)(struct r600_common_context *, struct r600_query *);
- boolean (*get_result)(struct r600_common_context *,
- struct r600_query *, boolean wait,
- union pipe_query_result *result);
+ bool (*get_result)(struct r600_common_context *,
+ struct r600_query *, bool wait,
+ union pipe_query_result *result);
};
struct r600_query {
@@ -140,18 +140,18 @@ struct r600_query_hw {
unsigned stream;
};
-boolean r600_query_hw_init(struct r600_common_context *rctx,
- struct r600_query_hw *query);
+bool r600_query_hw_init(struct r600_common_context *rctx,
+ struct r600_query_hw *query);
void r600_query_hw_destroy(struct r600_common_context *rctx,
struct r600_query *rquery);
-boolean r600_query_hw_begin(struct r600_common_context *rctx,
- struct r600_query *rquery);
+bool r600_query_hw_begin(struct r600_common_context *rctx,
+ struct r600_query *rquery);
bool r600_query_hw_end(struct r600_common_context *rctx,
struct r600_query *rquery);
-boolean r600_query_hw_get_result(struct r600_common_context *rctx,
- struct r600_query *rquery,
- boolean wait,
- union pipe_query_result *result);
+bool r600_query_hw_get_result(struct r600_common_context *rctx,
+ struct r600_query *rquery,
+ bool wait,
+ union pipe_query_result *result);
/* Performance counters */
enum {
@@ -233,8 +233,8 @@ struct r600_perfcounters {
void (*cleanup)(struct r600_common_screen *);
- boolean separate_se;
- boolean separate_instance;
+ bool separate_se;
+ bool separate_instance;
};
struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
@@ -248,7 +248,7 @@ int r600_get_perfcounter_group_info(struct r600_common_screen *,
unsigned index,
struct pipe_driver_query_group_info *info);
-boolean r600_perfcounters_init(struct r600_perfcounters *, unsigned num_blocks);
+bool r600_perfcounters_init(struct r600_perfcounters *, unsigned num_blocks);
void r600_perfcounters_add_block(struct r600_common_screen *,
struct r600_perfcounters *,
const char *name, unsigned flags,
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 6a8ea56933e..81acd42a330 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1274,7 +1274,7 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx,
return false;
}
- (*flushed_depth_texture)->is_flushing_texture = TRUE;
+ (*flushed_depth_texture)->is_flushing_texture = true;
(*flushed_depth_texture)->non_disp_tiling = false;
return true;
}
@@ -1746,7 +1746,7 @@ static void vi_get_fast_clear_parameters(enum pipe_format surface_format,
surface_format == PIPE_FORMAT_B5G6R5_SRGB) {
extra_channel = -1;
} else if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
- if(r600_translate_colorswap(surface_format, FALSE) <= 1)
+ if(r600_translate_colorswap(surface_format, false) <= 1)
extra_channel = desc->nr_channels - 1;
else
extra_channel = 0;
diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index d3952089a97..d183ff07af2 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -404,7 +404,7 @@ void radeon_llvm_emit_store(
LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;
LLVMValueRef temp_ptr, temp_ptr2 = NULL;
unsigned chan, chan_index;
- boolean is_vec_store = FALSE;
+ bool is_vec_store = false;
enum tgsi_opcode_type dtype = tgsi_opcode_infer_dst_type(inst->Instruction.Opcode);
if (dst[0]) {
@@ -1557,10 +1557,10 @@ void radeon_llvm_context_init(struct radeon_llvm_context * ctx, const char *trip
struct lp_build_tgsi_context * bld_base = &ctx->soa.bld_base;
- type.floating = TRUE;
- type.fixed = FALSE;
- type.sign = TRUE;
- type.norm = FALSE;
+ type.floating = true;
+ type.fixed = false;
+ type.sign = true;
+ type.norm = false;
type.width = 32;
type.length = 1;
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index a2d1d2d7461..d9d52f668a2 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -1124,7 +1124,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
return NULL;
if (info.drm_major < 3)
- dec->use_legacy = TRUE;
+ dec->use_legacy = true;
dec->base = *templ;
dec->base.context = context;