treewide: Replace the usage of TRUE/FALSE with true/false
this is a separate patch as it's won't affect the code style Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
This commit is contained in:
@@ -106,7 +106,7 @@ static BOOL CALLBACK impl_call_once_callback(PINIT_ONCE InitOnce, PVOID Paramete
|
||||
struct impl_call_once_param *param = (struct impl_call_once_param*)Parameter;
|
||||
(param->func)();
|
||||
((void)InitOnce); ((void)Context); // suppress warning
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct impl_tss_dtor_entry {
|
||||
@@ -338,7 +338,7 @@ thrd_current(void)
|
||||
if (state->thrd.handle == NULL)
|
||||
{
|
||||
if (!DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(),
|
||||
&(state->thrd.handle), 0, FALSE, DUPLICATE_SAME_ACCESS))
|
||||
&(state->thrd.handle), 0, false, DUPLICATE_SAME_ACCESS))
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -1004,7 +1004,7 @@ wgl_create_sync_khr(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_lis
|
||||
break;
|
||||
|
||||
case EGL_SYNC_REUSABLE_KHR:
|
||||
wgl_sync->event = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
wgl_sync->event = CreateEvent(NULL, true, false, NULL);
|
||||
if (!wgl_sync->event) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreateSyncKHR");
|
||||
free(wgl_sync);
|
||||
|
||||
@@ -573,7 +573,7 @@ counter_dialog(void)
|
||||
dialog = newwin(dh, dw, (h - dh) / 2, (w - dw) / 2);
|
||||
box(dialog, 0, 0);
|
||||
wrefresh(dialog);
|
||||
keypad(dialog, TRUE);
|
||||
keypad(dialog, true);
|
||||
|
||||
while (true) {
|
||||
int max = MIN2(dh - 2, group->group->num_countables);
|
||||
@@ -660,7 +660,7 @@ main_ui(void)
|
||||
cbreak();
|
||||
wtimeout(mainwin, options.refresh_ms);
|
||||
noecho();
|
||||
keypad(mainwin, TRUE);
|
||||
keypad(mainwin, true);
|
||||
curs_set(0);
|
||||
start_color();
|
||||
init_pair(COLOR_GROUP_HEADER, COLOR_WHITE, COLOR_GREEN);
|
||||
|
||||
@@ -312,11 +312,11 @@ cso_create_context(struct pipe_context *pipe, unsigned flags)
|
||||
|
||||
if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY,
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
|
||||
ctx->has_geometry_shader = TRUE;
|
||||
ctx->has_geometry_shader = true;
|
||||
}
|
||||
if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_TESS_CTRL,
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
|
||||
ctx->has_tessellation = TRUE;
|
||||
ctx->has_tessellation = true;
|
||||
}
|
||||
if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_COMPUTE,
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
|
||||
@@ -325,16 +325,16 @@ cso_create_context(struct pipe_context *pipe, unsigned flags)
|
||||
PIPE_SHADER_CAP_SUPPORTED_IRS);
|
||||
if (supported_irs & ((1 << PIPE_SHADER_IR_TGSI) |
|
||||
(1 << PIPE_SHADER_IR_NIR))) {
|
||||
ctx->has_compute_shader = TRUE;
|
||||
ctx->has_compute_shader = true;
|
||||
}
|
||||
}
|
||||
if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_MESH,
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
|
||||
ctx->has_task_mesh_shader = TRUE;
|
||||
ctx->has_task_mesh_shader = true;
|
||||
}
|
||||
if (pipe->screen->get_param(pipe->screen,
|
||||
PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0) {
|
||||
ctx->has_streamout = TRUE;
|
||||
ctx->has_streamout = true;
|
||||
}
|
||||
|
||||
if (pipe->screen->get_param(pipe->screen,
|
||||
|
||||
@@ -57,9 +57,9 @@ bool
|
||||
draw_get_option_use_llvm(void)
|
||||
{
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
return debug_get_bool_option("DRAW_USE_LLVM", TRUE);
|
||||
return debug_get_bool_option("DRAW_USE_LLVM", true);
|
||||
#else
|
||||
return FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ err_out:
|
||||
struct draw_context *
|
||||
draw_create(struct pipe_context *pipe)
|
||||
{
|
||||
return draw_create_context(pipe, NULL, TRUE);
|
||||
return draw_create_context(pipe, NULL, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ struct draw_context *
|
||||
draw_create_with_llvm_context(struct pipe_context *pipe,
|
||||
void *context)
|
||||
{
|
||||
return draw_create_context(pipe, context, TRUE);
|
||||
return draw_create_context(pipe, context, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -126,7 +126,7 @@ draw_create_with_llvm_context(struct pipe_context *pipe,
|
||||
struct draw_context *
|
||||
draw_create_no_llvm(struct pipe_context *pipe)
|
||||
{
|
||||
return draw_create_context(pipe, NULL, FALSE);
|
||||
return draw_create_context(pipe, NULL, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -145,30 +145,30 @@ draw_init(struct draw_context *draw)
|
||||
ASSIGN_4V(draw->plane[3], 0, 1, 0, 1);
|
||||
ASSIGN_4V(draw->plane[4], 0, 0, 1, 1); /* yes these are correct */
|
||||
ASSIGN_4V(draw->plane[5], 0, 0, -1, 1); /* mesa's a bit wonky */
|
||||
draw->clip_xy = TRUE;
|
||||
draw->clip_z = TRUE;
|
||||
draw->clip_xy = true;
|
||||
draw->clip_z = true;
|
||||
|
||||
draw->pt.user.planes = (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) &(draw->plane[0]);
|
||||
draw->pt.user.eltMax = ~0;
|
||||
|
||||
if (!draw_pipeline_init(draw))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!draw_pt_init(draw))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!draw_vs_init(draw))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!draw_gs_init(draw))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
draw->quads_always_flatshade_last = !draw->pipe->screen->get_param(
|
||||
draw->pipe->screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION);
|
||||
|
||||
draw->floating_point_depth = false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -852,13 +852,13 @@ void draw_do_flush(struct draw_context *draw, unsigned flags)
|
||||
if (!draw->suspend_flushing) {
|
||||
assert(!draw->flushing); /* catch inadvertant recursion */
|
||||
|
||||
draw->flushing = TRUE;
|
||||
draw->flushing = true;
|
||||
|
||||
draw_pipeline_flush(draw, flags);
|
||||
|
||||
draw_pt_flush(draw, flags);
|
||||
|
||||
draw->flushing = FALSE;
|
||||
draw->flushing = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1269,7 +1269,7 @@ draw_will_inject_frontface(const struct draw_context *draw)
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
|
||||
if (reduced_prim != MESA_PRIM_TRIANGLES) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return (rast &&
|
||||
|
||||
@@ -687,7 +687,7 @@ draw_geometry_shader_run(struct draw_geometry_shader *shader,
|
||||
/* Update prim_info:
|
||||
*/
|
||||
for (int i = 0; i < shader->num_vertex_streams; i++) {
|
||||
output_prims[i].linear = TRUE;
|
||||
output_prims[i].linear = true;
|
||||
output_prims[i].elts = NULL;
|
||||
output_prims[i].start = 0;
|
||||
output_prims[i].count = shader->stream[i].emitted_vertices;
|
||||
@@ -744,7 +744,7 @@ draw_gs_init(struct draw_context *draw)
|
||||
MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
|
||||
if (!draw->gs.tgsi.machine->Primitives[i] ||
|
||||
!draw->gs.tgsi.machine->PrimitiveOffsets[i])
|
||||
return FALSE;
|
||||
return false;
|
||||
memset(draw->gs.tgsi.machine->Primitives[i], 0,
|
||||
MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector));
|
||||
memset(draw->gs.tgsi.machine->PrimitiveOffsets[i], 0,
|
||||
@@ -752,7 +752,7 @@ draw_gs_init(struct draw_context *draw)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
const unsigned prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const unsigned count = input_prims->count; \
|
||||
const bool quads_flatshade_last = FALSE; \
|
||||
const bool quads_flatshade_last = false; \
|
||||
const bool last_vertex_last = !gs->draw->rasterizer->flatshade_first; \
|
||||
do { \
|
||||
switch (prim) { \
|
||||
|
||||
@@ -681,7 +681,7 @@ fetch_instanced(struct gallivm_state *gallivm,
|
||||
aos = lp_build_fetch_rgba_aos(gallivm,
|
||||
format_desc,
|
||||
lp_float32_vec4_type(),
|
||||
FALSE,
|
||||
false,
|
||||
map_ptr,
|
||||
stride, zero, zero,
|
||||
NULL);
|
||||
@@ -752,7 +752,7 @@ fetch_vector(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
lp_build_fetch_rgba_soa(gallivm, format_desc,
|
||||
fetch_type, FALSE, map_ptr, offset,
|
||||
fetch_type, false, map_ptr, offset,
|
||||
blduivec.zero, blduivec.zero,
|
||||
NULL, inputs);
|
||||
|
||||
@@ -1275,7 +1275,7 @@ generate_clipmask(struct draw_llvm *llvm,
|
||||
int i;
|
||||
i = plane_idx - 6;
|
||||
|
||||
*have_clipdist = TRUE;
|
||||
*have_clipdist = true;
|
||||
if (i < 4) {
|
||||
clipdist = LLVMBuildLoad2(builder, vec_type, outputs[cd[0]][i], "");
|
||||
} else {
|
||||
@@ -1482,7 +1482,7 @@ draw_gs_llvm_emit_vertex(const struct lp_build_gs_iface *gs_base,
|
||||
outputs, clipmask,
|
||||
gs_info->num_outputs, gs_type,
|
||||
-1,
|
||||
FALSE);
|
||||
false);
|
||||
lp_build_endif(&if_ctx);
|
||||
}
|
||||
|
||||
@@ -1604,7 +1604,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
LLVMValueRef variant_func;
|
||||
const unsigned pos = draw->vs.position_output;
|
||||
const unsigned cv = draw->vs.clipvertex_output;
|
||||
bool have_clipdist = FALSE;
|
||||
bool have_clipdist = false;
|
||||
struct lp_bld_tgsi_system_values system_values;
|
||||
|
||||
memset(&system_values, 0, sizeof(system_values));
|
||||
@@ -1686,9 +1686,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
LLVMPositionBuilderAtEnd(builder, block);
|
||||
|
||||
memset(&vs_type, 0, sizeof vs_type);
|
||||
vs_type.floating = TRUE; /* floating point values */
|
||||
vs_type.sign = TRUE; /* values are signed */
|
||||
vs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */
|
||||
vs_type.floating = true; /* floating point values */
|
||||
vs_type.sign = true; /* values are signed */
|
||||
vs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */
|
||||
vs_type.width = 32; /* 32-bit float */
|
||||
vs_type.length = vector_length;
|
||||
|
||||
@@ -1890,8 +1890,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
||||
LLVMPointerType(LLVMInt8TypeInContext(context),
|
||||
0), "");
|
||||
tmp = lp_build_gather(gallivm, vs_type.length,
|
||||
32, bld.type, TRUE,
|
||||
fetch_elts, tmp, FALSE);
|
||||
32, bld.type, true,
|
||||
fetch_elts, tmp, false);
|
||||
LLVMBuildStore(builder, tmp, index_store);
|
||||
}
|
||||
lp_build_else(&if_ctx);
|
||||
@@ -2039,7 +2039,7 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
|
||||
key->bypass_viewport = llvm->draw->bypass_viewport;
|
||||
key->clip_halfz = llvm->draw->rasterizer->clip_halfz;
|
||||
/* XXX assumes edgeflag output not at 0 */
|
||||
key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE);
|
||||
key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? true : false);
|
||||
key->ucp_enable = llvm->draw->rasterizer->clip_plane_enable;
|
||||
key->has_gs_or_tes = llvm->draw->gs.geometry_shader != NULL || llvm->draw->tes.tess_eval_shader != NULL;
|
||||
key->num_outputs = draw_total_vs_outputs(llvm->draw);
|
||||
@@ -2404,9 +2404,9 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
|
||||
lp_build_context_init(&bld, gallivm, lp_type_int(32));
|
||||
|
||||
memset(&gs_type, 0, sizeof gs_type);
|
||||
gs_type.floating = TRUE; /* floating point values */
|
||||
gs_type.sign = TRUE; /* values are signed */
|
||||
gs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */
|
||||
gs_type.floating = true; /* floating point values */
|
||||
gs_type.sign = true; /* values are signed */
|
||||
gs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */
|
||||
gs_type.width = 32; /* 32-bit float */
|
||||
gs_type.length = vector_length;
|
||||
|
||||
@@ -2972,9 +2972,9 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
|
||||
lp_build_context_init(&bld, gallivm, lp_type_int(32));
|
||||
|
||||
memset(&tcs_type, 0, sizeof tcs_type);
|
||||
tcs_type.floating = TRUE; /* floating point values */
|
||||
tcs_type.sign = TRUE; /* values are signed */
|
||||
tcs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */
|
||||
tcs_type.floating = true; /* floating point values */
|
||||
tcs_type.sign = true; /* values are signed */
|
||||
tcs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */
|
||||
tcs_type.width = 32; /* 32-bit float */
|
||||
tcs_type.length = vector_length;
|
||||
|
||||
@@ -3545,9 +3545,9 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
|
||||
lp_build_context_init(&bld, gallivm, lp_type_int(32));
|
||||
|
||||
memset(&tes_type, 0, sizeof tes_type);
|
||||
tes_type.floating = TRUE; /* floating point values */
|
||||
tes_type.sign = TRUE; /* values are signed */
|
||||
tes_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */
|
||||
tes_type.floating = true; /* floating point values */
|
||||
tes_type.sign = true; /* values are signed */
|
||||
tes_type.norm = false; /* values are not limited to [0,1] or [-1,1] */
|
||||
tes_type.width = 32; /* 32-bit float */
|
||||
tes_type.length = vector_length;
|
||||
|
||||
@@ -3643,7 +3643,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
|
||||
lp_int_type(tes_type), 0);
|
||||
|
||||
convert_to_aos(gallivm, variant->vertex_header_type, io, NULL, outputs, clipmask,
|
||||
draw_total_tes_outputs(llvm->draw), tes_type, primid_slot, FALSE);
|
||||
draw_total_tes_outputs(llvm->draw), tes_type, primid_slot, false);
|
||||
}
|
||||
lp_build_loop_end_cond(&lp_loop, num_tess_coord, step, LLVMIntUGE);
|
||||
lp_bld_llvm_sampler_soa_destroy(sampler);
|
||||
|
||||
@@ -198,7 +198,7 @@ draw_mesh_prim_run(struct draw_context *draw,
|
||||
asmblr->per_prim = per_prim_inputs;
|
||||
asmblr->cull_prim_idx = cull_prim_idx;
|
||||
|
||||
output_prims->linear = TRUE;
|
||||
output_prims->linear = true;
|
||||
output_prims->elts = NULL;
|
||||
output_prims->start = 0;
|
||||
output_prims->prim = input_prims->prim;
|
||||
|
||||
@@ -64,16 +64,16 @@ draw_pipeline_init(struct draw_context *draw)
|
||||
!draw->pipeline.cull ||
|
||||
!draw->pipeline.user_cull ||
|
||||
!draw->pipeline.validate)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* these defaults are oriented toward the needs of softpipe */
|
||||
draw->pipeline.wide_point_threshold = 1000000.0f; /* infinity */
|
||||
draw->pipeline.wide_line_threshold = 1.0f;
|
||||
draw->pipeline.wide_point_sprites = FALSE;
|
||||
draw->pipeline.line_stipple = TRUE;
|
||||
draw->pipeline.point_sprite = TRUE;
|
||||
draw->pipeline.wide_point_sprites = false;
|
||||
draw->pipeline.line_stipple = true;
|
||||
draw->pipeline.point_sprite = true;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -359,14 +359,14 @@ generate_aaline_fs_nir(struct aaline_stage *aaline)
|
||||
aaline_fs = *orig_fs; /* copy to init */
|
||||
aaline_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir);
|
||||
if (!aaline_fs.ir.nir)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
nir_lower_aaline_fs(aaline_fs.ir.nir, &aaline->fs->generic_attrib, NULL, NULL);
|
||||
aaline->fs->aaline_fs = aaline->driver_create_fs_state(pipe, &aaline_fs);
|
||||
if (aaline->fs->aaline_fs == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,17 +382,17 @@ bind_aaline_fragment_shader(struct aaline_stage *aaline)
|
||||
if (!aaline->fs->aaline_fs) {
|
||||
if (aaline->fs->state.type == PIPE_SHADER_IR_NIR) {
|
||||
if (!generate_aaline_fs_nir(aaline))
|
||||
return FALSE;
|
||||
return false;
|
||||
} else
|
||||
if (!generate_aaline_fs(aaline))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
aaline->driver_bind_fs_state(pipe, aaline->fs->aaline_fs);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -527,13 +527,13 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
|
||||
|
||||
draw_aaline_prepare_outputs(draw, draw->pipeline.aaline);
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast);
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
/* now really draw first line */
|
||||
stage->line = aaline_line;
|
||||
@@ -552,7 +552,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
|
||||
stage->next->flush(stage->next, flags);
|
||||
|
||||
/* restore original frag shader */
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
aaline->driver_bind_fs_state(pipe, aaline->fs ? aaline->fs->driver_fs : NULL);
|
||||
|
||||
/* restore original rasterizer state */
|
||||
@@ -560,7 +560,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
}
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
draw_remove_extra_vertex_attribs(draw);
|
||||
}
|
||||
@@ -743,7 +743,7 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
|
||||
*/
|
||||
aaline = draw_aaline_stage(draw);
|
||||
if (!aaline)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* save original driver functions */
|
||||
aaline->driver_create_fs_state = pipe->create_fs_state;
|
||||
@@ -759,5 +759,5 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
|
||||
*/
|
||||
draw->pipeline.aaline = &aaline->stage;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ aa_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
|
||||
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0,
|
||||
TGSI_SWIZZLE_Y, TRUE);
|
||||
TGSI_SWIZZLE_Y, true);
|
||||
|
||||
/* compute coverage factor = (1-d)/(1-k) */
|
||||
|
||||
@@ -401,11 +401,11 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
||||
|
||||
aapoint->fs->generic_attrib = transform.maxGeneric + 1;
|
||||
FREE((void *)aapoint_fs.tokens);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
FREE((void *)aapoint_fs.tokens);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -419,17 +419,17 @@ generate_aapoint_fs_nir(struct aapoint_stage *aapoint)
|
||||
aapoint_fs = *orig_fs; /* copy to init */
|
||||
aapoint_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir);
|
||||
if (!aapoint_fs.ir.nir)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
nir_lower_aapoint_fs(aapoint_fs.ir.nir, &aapoint->fs->generic_attrib, aapoint->bool_type);
|
||||
aapoint->fs->aapoint_fs = aapoint->driver_create_fs_state(pipe, &aapoint_fs);
|
||||
if (aapoint->fs->aapoint_fs == NULL)
|
||||
goto fail;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -446,16 +446,16 @@ bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
|
||||
if (!aapoint->fs->aapoint_fs) {
|
||||
if (aapoint->fs->state.type == PIPE_SHADER_IR_NIR) {
|
||||
if (!generate_aapoint_fs_nir(aapoint))
|
||||
return FALSE;
|
||||
return false;
|
||||
} else if (!generate_aapoint_fs(aapoint))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
aapoint->driver_bind_fs_state(pipe, aapoint->fs->aapoint_fs);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -590,13 +590,13 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
|
||||
|
||||
draw_aapoint_prepare_outputs(draw, draw->pipeline.aapoint);
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast);
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
/* now really draw first point */
|
||||
stage->point = aapoint_point;
|
||||
@@ -615,7 +615,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
|
||||
stage->next->flush(stage->next, flags);
|
||||
|
||||
/* restore original frag shader */
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
aapoint->driver_bind_fs_state(pipe, aapoint->fs ? aapoint->fs->driver_fs : NULL);
|
||||
|
||||
/* restore original rasterizer state */
|
||||
@@ -623,7 +623,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
}
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
draw_remove_extra_vertex_attribs(draw);
|
||||
}
|
||||
@@ -809,7 +809,7 @@ draw_install_aapoint_stage(struct draw_context *draw,
|
||||
*/
|
||||
aapoint = draw_aapoint_stage(draw, bool_type);
|
||||
if (!aapoint)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* save original driver functions */
|
||||
aapoint->driver_create_fs_state = pipe->create_fs_state;
|
||||
@@ -823,5 +823,5 @@ draw_install_aapoint_stage(struct draw_context *draw,
|
||||
|
||||
draw->pipeline.aapoint = &aapoint->stage;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -484,13 +484,13 @@ do_clip_tri(struct draw_stage *stage,
|
||||
*/
|
||||
if (is_user_clip_plane) {
|
||||
/* we want to see an edge along the clip plane */
|
||||
*new_edge = TRUE;
|
||||
new_vert->edgeflag = TRUE;
|
||||
*new_edge = true;
|
||||
new_vert->edgeflag = true;
|
||||
}
|
||||
else {
|
||||
/* we don't want to see an edge along the frustum clip plane */
|
||||
*new_edge = *edge_prev;
|
||||
new_vert->edgeflag = FALSE;
|
||||
new_vert->edgeflag = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -143,7 +143,7 @@ generate_pstip_fs(struct pstip_stage *pstip)
|
||||
0,
|
||||
wincoord_file);
|
||||
if (pstip_fs.tokens == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
} else {
|
||||
pstip_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir);
|
||||
nir_lower_pstipple_fs(pstip_fs.ir.nir,
|
||||
@@ -158,9 +158,9 @@ generate_pstip_fs(struct pstip_stage *pstip)
|
||||
FREE((void *)pstip_fs.tokens);
|
||||
|
||||
if (!pstip->fs->pstip_fs)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,12 +174,12 @@ bind_pstip_fragment_shader(struct pstip_stage *pstip)
|
||||
struct draw_context *draw = pstip->stage.draw;
|
||||
if (!pstip->fs->pstip_fs &&
|
||||
!generate_pstip_fs(pstip))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pstip->driver_bind_fs_state(pstip->pipe, pstip->fs->pstip_fs);
|
||||
draw->suspend_flushing = FALSE;
|
||||
return TRUE;
|
||||
draw->suspend_flushing = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
|
||||
|
||||
assert(num_samplers <= PIPE_MAX_SAMPLERS);
|
||||
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
|
||||
pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
|
||||
num_samplers, pstip->state.samplers);
|
||||
@@ -229,7 +229,7 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
|
||||
num_sampler_views, 0, false,
|
||||
pstip->state.sampler_views);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
/* now really draw first triangle */
|
||||
stage->tri = draw_pipe_passthrough_tri;
|
||||
@@ -248,7 +248,7 @@ pstip_flush(struct draw_stage *stage, unsigned flags)
|
||||
stage->next->flush(stage->next, flags);
|
||||
|
||||
/* restore original frag shader, texture, sampler state */
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pstip->driver_bind_fs_state(pipe, pstip->fs ? pstip->fs->driver_fs : NULL);
|
||||
|
||||
pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
|
||||
@@ -259,7 +259,7 @@ pstip_flush(struct draw_stage *stage, unsigned flags)
|
||||
pstip->num_sampler_views, 0, false,
|
||||
pstip->state.sampler_views);
|
||||
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -513,11 +513,11 @@ draw_install_pstipple_stage(struct draw_context *draw,
|
||||
pipe->set_sampler_views = pstip_set_sampler_views;
|
||||
pipe->set_polygon_stipple = pstip_set_polygon_stipple;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
if (pstip)
|
||||
pstip->stage.destroy(&pstip->stage);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,19 +76,19 @@ draw_alloc_temp_verts(struct draw_stage *stage, unsigned nr)
|
||||
ubyte *store = (ubyte *) MALLOC(MAX_VERTEX_SIZE * nr +
|
||||
DRAW_EXTRA_VERTICES_PADDING);
|
||||
if (!store)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
stage->tmp = (struct vertex_header **) MALLOC(sizeof(struct vertex_header *) * nr);
|
||||
if (stage->tmp == NULL) {
|
||||
FREE(store);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < nr; i++)
|
||||
stage->tmp[i] = (struct vertex_header *)(store + i * MAX_VERTEX_SIZE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,60 +66,60 @@ draw_need_pipeline(const struct draw_context *draw,
|
||||
if (reduced_prim == MESA_PRIM_LINES) {
|
||||
/* line stipple */
|
||||
if (rasterizer->line_stipple_enable && draw->pipeline.line_stipple)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* wide lines */
|
||||
if (roundf(rasterizer->line_width) > draw->pipeline.wide_line_threshold)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* AA lines */
|
||||
if ((!rasterizer->multisample && rasterizer->line_smooth) && draw->pipeline.aaline)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (draw_current_shader_num_written_culldistances(draw))
|
||||
return TRUE;
|
||||
return true;
|
||||
} else if (reduced_prim == MESA_PRIM_POINTS) {
|
||||
/* large points */
|
||||
if (rasterizer->point_size > draw->pipeline.wide_point_threshold)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* sprite points */
|
||||
if (rasterizer->point_quad_rasterization
|
||||
&& draw->pipeline.wide_point_sprites)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* AA points */
|
||||
if ((!rasterizer->multisample && rasterizer->point_smooth) && draw->pipeline.aapoint)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* point sprites */
|
||||
if (rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (draw_current_shader_num_written_culldistances(draw))
|
||||
return TRUE;
|
||||
return true;
|
||||
} else if (reduced_prim == MESA_PRIM_TRIANGLES) {
|
||||
/* polygon stipple */
|
||||
if (rasterizer->poly_stipple_enable && draw->pipeline.pstipple)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* unfilled polygons */
|
||||
if (rasterizer->fill_front != PIPE_POLYGON_MODE_FILL ||
|
||||
rasterizer->fill_back != PIPE_POLYGON_MODE_FILL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* polygon offset */
|
||||
if (rasterizer->offset_point ||
|
||||
rasterizer->offset_line ||
|
||||
rasterizer->offset_tri)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* two-side lighting */
|
||||
if (rasterizer->light_twoside)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (draw_current_shader_num_written_culldistances(draw))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* polygon cull - this is difficult - hardware can cull just fine
|
||||
@@ -131,7 +131,7 @@ draw_need_pipeline(const struct draw_context *draw,
|
||||
return TRUE;
|
||||
*/
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ validate_pipeline(struct draw_stage *stage)
|
||||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct draw_stage *next = draw->pipeline.rasterize;
|
||||
bool need_det = FALSE;
|
||||
bool precalc_flat = FALSE;
|
||||
bool need_det = false;
|
||||
bool precalc_flat = false;
|
||||
bool wide_lines, wide_points;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
|
||||
@@ -161,15 +161,15 @@ validate_pipeline(struct draw_stage *stage)
|
||||
|
||||
/* drawing large/sprite points (but not AA points)? */
|
||||
if (rast->sprite_coord_enable && draw->pipeline.point_sprite)
|
||||
wide_points = TRUE;
|
||||
wide_points = true;
|
||||
else if ((!rast->multisample && rast->point_smooth) && draw->pipeline.aapoint)
|
||||
wide_points = FALSE;
|
||||
wide_points = false;
|
||||
else if (rast->point_size > draw->pipeline.wide_point_threshold)
|
||||
wide_points = TRUE;
|
||||
wide_points = true;
|
||||
else if (rast->point_quad_rasterization && draw->pipeline.wide_point_sprites)
|
||||
wide_points = TRUE;
|
||||
wide_points = true;
|
||||
else
|
||||
wide_points = FALSE;
|
||||
wide_points = false;
|
||||
|
||||
/*
|
||||
* NOTE: we build up the pipeline in end-to-start order.
|
||||
@@ -181,7 +181,7 @@ validate_pipeline(struct draw_stage *stage)
|
||||
if ((!rast->multisample && rast->line_smooth) && draw->pipeline.aaline) {
|
||||
draw->pipeline.aaline->next = next;
|
||||
next = draw->pipeline.aaline;
|
||||
precalc_flat = TRUE;
|
||||
precalc_flat = true;
|
||||
}
|
||||
|
||||
if ((!rast->multisample && rast->point_smooth) && draw->pipeline.aapoint) {
|
||||
@@ -192,7 +192,7 @@ validate_pipeline(struct draw_stage *stage)
|
||||
if (wide_lines) {
|
||||
draw->pipeline.wide_line->next = next;
|
||||
next = draw->pipeline.wide_line;
|
||||
precalc_flat = TRUE;
|
||||
precalc_flat = true;
|
||||
}
|
||||
|
||||
if (wide_points) {
|
||||
@@ -203,7 +203,7 @@ validate_pipeline(struct draw_stage *stage)
|
||||
if (rast->line_stipple_enable && draw->pipeline.line_stipple) {
|
||||
draw->pipeline.stipple->next = next;
|
||||
next = draw->pipeline.stipple;
|
||||
precalc_flat = TRUE; /* only needed for lines really */
|
||||
precalc_flat = true; /* only needed for lines really */
|
||||
}
|
||||
|
||||
if (rast->poly_stipple_enable
|
||||
@@ -216,8 +216,8 @@ validate_pipeline(struct draw_stage *stage)
|
||||
rast->fill_back != PIPE_POLYGON_MODE_FILL) {
|
||||
draw->pipeline.unfilled->next = next;
|
||||
next = draw->pipeline.unfilled;
|
||||
precalc_flat = TRUE; /* only needed for triangles really */
|
||||
need_det = TRUE;
|
||||
precalc_flat = true; /* only needed for triangles really */
|
||||
need_det = true;
|
||||
}
|
||||
|
||||
if (precalc_flat) {
|
||||
@@ -234,13 +234,13 @@ validate_pipeline(struct draw_stage *stage)
|
||||
rast->offset_tri) {
|
||||
draw->pipeline.offset->next = next;
|
||||
next = draw->pipeline.offset;
|
||||
need_det = TRUE;
|
||||
need_det = true;
|
||||
}
|
||||
|
||||
if (rast->light_twoside) {
|
||||
draw->pipeline.twoside->next = next;
|
||||
next = draw->pipeline.twoside;
|
||||
need_det = TRUE;
|
||||
need_det = true;
|
||||
}
|
||||
|
||||
/* Always run the cull stage as we calculate determinant there
|
||||
|
||||
@@ -147,9 +147,9 @@ wideline_first_line(struct draw_stage *stage,
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast);
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
stage->line = wideline_line;
|
||||
|
||||
@@ -168,9 +168,9 @@ wideline_flush(struct draw_stage *stage, unsigned flags)
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,9 +215,9 @@ widepoint_first_point(struct draw_stage *stage,
|
||||
|
||||
/* Disable triangle culling, stippling, unfilled mode etc. */
|
||||
r = draw_get_rasterizer_no_cull(draw, rast);
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pipe->bind_rasterizer_state(pipe, r);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
|
||||
/* XXX we won't know the real size if it's computed by the vertex shader! */
|
||||
if ((rast->point_size > draw->pipeline.wide_point_threshold) ||
|
||||
@@ -286,9 +286,9 @@ widepoint_flush(struct draw_stage *stage, unsigned flags)
|
||||
|
||||
/* restore original rasterizer state */
|
||||
if (draw->rast_handle) {
|
||||
draw->suspend_flushing = TRUE;
|
||||
draw->suspend_flushing = true;
|
||||
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
|
||||
draw->suspend_flushing = FALSE;
|
||||
draw->suspend_flushing = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ needs_primid(const struct draw_context *draw)
|
||||
else if (tes)
|
||||
return !tes->info.uses_primid;
|
||||
else
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ draw_prim_assembler_is_required(const struct draw_context *draw,
|
||||
{
|
||||
/* viewport index requires primitive boundaries to get correct vertex */
|
||||
if (draw_current_shader_uses_viewport_index(draw))
|
||||
return TRUE;
|
||||
return true;
|
||||
switch (prim_info->prim) {
|
||||
case MESA_PRIM_LINES_ADJACENCY:
|
||||
case MESA_PRIM_LINE_STRIP_ADJACENCY:
|
||||
case MESA_PRIM_TRIANGLES_ADJACENCY:
|
||||
case MESA_PRIM_TRIANGLE_STRIP_ADJACENCY:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
return needs_primid(draw);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ draw_prim_assembler_run(struct draw_context *draw,
|
||||
asmblr->needs_primid = needs_primid(asmblr->draw);
|
||||
asmblr->num_prims = 0;
|
||||
|
||||
output_prims->linear = TRUE;
|
||||
output_prims->linear = true;
|
||||
output_prims->elts = NULL;
|
||||
output_prims->start = 0;
|
||||
output_prims->prim = assembled_prim;
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
#include "util/u_draw.h"
|
||||
|
||||
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", false)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", false)
|
||||
|
||||
|
||||
/* Overall we split things into:
|
||||
@@ -129,7 +129,7 @@ draw_pt_arrays(struct draw_context *draw,
|
||||
if (draw->pt.rebind_parameters) {
|
||||
/* update constants, viewport dims, clip planes, etc */
|
||||
middle->bind_parameters(middle);
|
||||
draw->pt.rebind_parameters = FALSE;
|
||||
draw->pt.rebind_parameters = false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < num_draws; i++) {
|
||||
@@ -164,7 +164,7 @@ draw_pt_arrays(struct draw_context *draw,
|
||||
draw->pt.user.drawid++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ draw_pt_flush(struct draw_context *draw, unsigned flags)
|
||||
}
|
||||
|
||||
if (flags & DRAW_FLUSH_PARAMETER_CHANGE) {
|
||||
draw->pt.rebind_parameters = TRUE;
|
||||
draw->pt.rebind_parameters = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,15 +195,15 @@ draw_pt_init(struct draw_context *draw)
|
||||
|
||||
draw->pt.front.vsplit = draw_pt_vsplit(draw);
|
||||
if (!draw->pt.front.vsplit)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
draw->pt.middle.fetch_shade_emit = draw_pt_middle_fse(draw);
|
||||
if (!draw->pt.middle.fetch_shade_emit)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit(draw);
|
||||
if (!draw->pt.middle.general)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
if (draw->llvm) {
|
||||
@@ -212,7 +212,7 @@ draw_pt_init(struct draw_context *draw)
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -313,11 +313,11 @@ fse_run_linear_elts(struct draw_pt_middle_end *middle,
|
||||
if (!draw->render->allocate_vertices(draw->render,
|
||||
(ushort) fse->key.output_stride,
|
||||
(ushort) count))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
hw_verts = draw->render->map_vertices(draw->render);
|
||||
if (!hw_verts)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Single routine to fetch vertices, run shader and emit HW verts.
|
||||
* Clipping is done elsewhere -- either by the API or on hardware,
|
||||
@@ -331,7 +331,7 @@ fse_run_linear_elts(struct draw_pt_middle_end *middle,
|
||||
|
||||
draw->render->release_vertices(draw->render);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -120,9 +120,9 @@ fetch_pipeline_prepare(struct draw_pt_middle_end *middle,
|
||||
draw->guard_band_xy,
|
||||
draw->bypass_viewport,
|
||||
draw->rasterizer->clip_halfz,
|
||||
(draw->vs.edgeflag_output ? TRUE : FALSE));
|
||||
(draw->vs.edgeflag_output ? true : false));
|
||||
|
||||
draw_pt_so_emit_prepare(fpme->so_emit, FALSE);
|
||||
draw_pt_so_emit_prepare(fpme->so_emit, false);
|
||||
|
||||
if (!(opt & PT_PIPELINE)) {
|
||||
draw_pt_emit_prepare(fpme->emit, gs_out_prim, max_vertices);
|
||||
@@ -236,7 +236,7 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
struct draw_prim_info ia_prim_info;
|
||||
struct draw_vertex_info ia_vert_info;
|
||||
const struct draw_prim_info *prim_info = in_prim_info;
|
||||
bool free_prim_info = FALSE;
|
||||
bool free_prim_info = false;
|
||||
unsigned opt = fpme->opt;
|
||||
int num_vertex_streams = 1;
|
||||
|
||||
@@ -315,7 +315,7 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
FREE(vert_info->verts);
|
||||
vert_info = &ia_vert_info;
|
||||
prim_info = &ia_prim_info;
|
||||
free_prim_info = TRUE;
|
||||
free_prim_info = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,12 +386,12 @@ fetch_pipeline_run(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = FALSE;
|
||||
fetch_info.linear = false;
|
||||
fetch_info.start = 0;
|
||||
fetch_info.elts = fetch_elts;
|
||||
fetch_info.count = fetch_count;
|
||||
|
||||
prim_info.linear = FALSE;
|
||||
prim_info.linear = false;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = draw_count;
|
||||
prim_info.elts = draw_elts;
|
||||
@@ -414,12 +414,12 @@ fetch_pipeline_linear_run(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = TRUE;
|
||||
fetch_info.linear = true;
|
||||
fetch_info.start = start;
|
||||
fetch_info.count = count;
|
||||
fetch_info.elts = NULL;
|
||||
|
||||
prim_info.linear = TRUE;
|
||||
prim_info.linear = true;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = count;
|
||||
prim_info.elts = NULL;
|
||||
@@ -444,12 +444,12 @@ fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = TRUE;
|
||||
fetch_info.linear = true;
|
||||
fetch_info.start = start;
|
||||
fetch_info.count = count;
|
||||
fetch_info.elts = NULL;
|
||||
|
||||
prim_info.linear = FALSE;
|
||||
prim_info.linear = false;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = draw_count;
|
||||
prim_info.elts = draw_elts;
|
||||
@@ -460,7 +460,7 @@ fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
|
||||
fetch_pipeline_generic(middle, &fetch_info, &prim_info);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ llvm_middle_end_prepare(struct draw_pt_middle_end *middle,
|
||||
draw->guard_band_xy,
|
||||
draw->bypass_viewport,
|
||||
draw->rasterizer->clip_halfz,
|
||||
(draw->vs.edgeflag_output ? TRUE : FALSE));
|
||||
(draw->vs.edgeflag_output ? true : false));
|
||||
|
||||
draw_pt_so_emit_prepare(fpme->so_emit, (gs == NULL && tes == NULL));
|
||||
|
||||
@@ -511,7 +511,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
struct draw_prim_info ia_prim_info;
|
||||
struct draw_vertex_info ia_vert_info;
|
||||
const struct draw_prim_info *prim_info = in_prim_info;
|
||||
bool free_prim_info = FALSE;
|
||||
bool free_prim_info = false;
|
||||
unsigned opt = fpme->opt;
|
||||
bool clipped = 0;
|
||||
ushort *tes_elts_out = NULL;
|
||||
@@ -607,7 +607,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
FREE(vert_info->verts);
|
||||
vert_info = &tes_vert_info;
|
||||
prim_info = &tes_prim_info;
|
||||
free_prim_info = TRUE;
|
||||
free_prim_info = true;
|
||||
|
||||
/*
|
||||
* pt emit can only handle ushort number of vertices (see
|
||||
@@ -641,7 +641,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
}
|
||||
vert_info = &gs_vert_info[0];
|
||||
prim_info = &gs_prim_info[0];
|
||||
free_prim_info = FALSE;
|
||||
free_prim_info = false;
|
||||
/*
|
||||
* pt emit can only handle ushort number of vertices (see
|
||||
* render->allocate_vertices).
|
||||
@@ -666,7 +666,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
}
|
||||
vert_info = &ia_vert_info;
|
||||
prim_info = &ia_prim_info;
|
||||
free_prim_info = TRUE;
|
||||
free_prim_info = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -739,12 +739,12 @@ llvm_middle_end_run(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = FALSE;
|
||||
fetch_info.linear = false;
|
||||
fetch_info.start = 0;
|
||||
fetch_info.elts = fetch_elts;
|
||||
fetch_info.count = fetch_count;
|
||||
|
||||
prim_info.linear = FALSE;
|
||||
prim_info.linear = false;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = draw_count;
|
||||
prim_info.elts = draw_elts;
|
||||
@@ -767,12 +767,12 @@ llvm_middle_end_linear_run(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = TRUE;
|
||||
fetch_info.linear = true;
|
||||
fetch_info.start = start;
|
||||
fetch_info.count = count;
|
||||
fetch_info.elts = NULL;
|
||||
|
||||
prim_info.linear = TRUE;
|
||||
prim_info.linear = true;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = count;
|
||||
prim_info.elts = NULL;
|
||||
@@ -797,12 +797,12 @@ llvm_middle_end_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
struct draw_fetch_info fetch_info;
|
||||
struct draw_prim_info prim_info;
|
||||
|
||||
fetch_info.linear = TRUE;
|
||||
fetch_info.linear = true;
|
||||
fetch_info.start = start;
|
||||
fetch_info.count = count;
|
||||
fetch_info.elts = NULL;
|
||||
|
||||
prim_info.linear = FALSE;
|
||||
prim_info.linear = false;
|
||||
prim_info.start = 0;
|
||||
prim_info.count = draw_count;
|
||||
prim_info.elts = draw_elts;
|
||||
@@ -813,7 +813,7 @@ llvm_middle_end_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
|
||||
llvm_pipeline_generic(middle, &fetch_info, &prim_info);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ mesh_middle_end_prepare(struct draw_pt_middle_end *middle,
|
||||
draw->guard_band_xy,
|
||||
draw->bypass_viewport,
|
||||
draw->rasterizer->clip_halfz,
|
||||
FALSE);
|
||||
false);
|
||||
|
||||
draw_pt_so_emit_prepare(mpme->so_emit, false);
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ draw_has_so(const struct draw_context *draw)
|
||||
const struct pipe_stream_output_info *state = draw_so_info(draw);
|
||||
|
||||
if (state && state->num_outputs > 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -98,10 +98,10 @@ draw_pt_so_emit_prepare(struct pt_so_emit *emit, bool use_pre_clip_pos)
|
||||
/* if we have a state with outputs make sure we have
|
||||
* buffers to output to */
|
||||
if (emit->has_so) {
|
||||
bool has_valid_buffer = FALSE;
|
||||
bool has_valid_buffer = false;
|
||||
for (unsigned i = 0; i < draw->so.num_targets; ++i) {
|
||||
if (draw->so.targets[i]) {
|
||||
has_valid_buffer = TRUE;
|
||||
has_valid_buffer = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ so_emit_prim(struct pt_so_emit *so,
|
||||
continue;
|
||||
|
||||
unsigned ob = state->output[slot].output_buffer;
|
||||
buffer_written[ob] = TRUE;
|
||||
buffer_written[ob] = true;
|
||||
|
||||
float *buffer = (float *)((char *)draw->so.targets[ob]->mapping +
|
||||
draw->so.targets[ob]->target.buffer_offset +
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* declare more local vars */ \
|
||||
const enum mesa_prim prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const bool quads_flatshade_last = FALSE; \
|
||||
const bool quads_flatshade_last = false; \
|
||||
const bool last_vertex_last = !so->draw->rasterizer->flatshade_first; \
|
||||
do { \
|
||||
switch (prim) { \
|
||||
|
||||
@@ -66,7 +66,7 @@ llvm_fetch_tcs_input(struct draw_tess_ctrl_shader *shader,
|
||||
for (i = 0; i < num_vertices; i++) {
|
||||
const float (*input)[4];
|
||||
int vertex_idx = prim_id * num_vertices + i;
|
||||
if (input_prim_info->linear == FALSE)
|
||||
if (input_prim_info->linear == false)
|
||||
vertex_idx = input_prim_info->elts[vertex_idx];
|
||||
#if DEBUG_INPUTS
|
||||
debug_printf("%d) tcs vertex index = %d (prim idx = %d)\n",
|
||||
@@ -175,7 +175,7 @@ int draw_tess_ctrl_shader_run(struct draw_tess_ctrl_shader *shader,
|
||||
shader->input_vertex_stride = input_stride;
|
||||
shader->input_info = input_info;
|
||||
|
||||
output_prims->linear = TRUE;
|
||||
output_prims->linear = true;
|
||||
output_prims->start = 0;
|
||||
output_prims->elts = NULL;
|
||||
output_prims->count = 0;
|
||||
@@ -230,7 +230,7 @@ llvm_fetch_tes_input(struct draw_tess_eval_shader *shader,
|
||||
const float (*input)[4];
|
||||
int vertex_idx = prim_id * num_vertices + i;
|
||||
|
||||
if (input_prim_info->linear == FALSE)
|
||||
if (input_prim_info->linear == false)
|
||||
vertex_idx = input_prim_info->elts[vertex_idx];
|
||||
#if DEBUG_INPUTS
|
||||
debug_printf("%d) tes vertex index = %d (prim idx = %d)\n",
|
||||
@@ -336,7 +336,7 @@ int draw_tess_eval_shader_run(struct draw_tess_eval_shader *shader,
|
||||
output_verts->count = 0;
|
||||
output_verts->verts = NULL;
|
||||
|
||||
output_prims->linear = FALSE;
|
||||
output_prims->linear = false;
|
||||
output_prims->start = 0;
|
||||
output_prims->elts = NULL;
|
||||
output_prims->count = 0;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#include "nir/nir_to_tgsi.h"
|
||||
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", false)
|
||||
|
||||
|
||||
struct draw_vertex_shader *
|
||||
@@ -91,7 +91,7 @@ draw_create_vertex_shader(struct draw_context *draw,
|
||||
#endif
|
||||
|
||||
if (vs) {
|
||||
bool found_clipvertex = FALSE;
|
||||
bool found_clipvertex = false;
|
||||
vs->position_output = -1;
|
||||
for (unsigned i = 0; i < vs->info.num_outputs; i++) {
|
||||
if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION &&
|
||||
@@ -102,7 +102,7 @@ draw_create_vertex_shader(struct draw_context *draw,
|
||||
vs->edgeflag_output = i;
|
||||
} else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPVERTEX &&
|
||||
vs->info.output_semantic_index[i] == 0) {
|
||||
found_clipvertex = TRUE;
|
||||
found_clipvertex = true;
|
||||
vs->clipvertex_output = i;
|
||||
} else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX) {
|
||||
vs->viewport_index_output = i;
|
||||
@@ -166,18 +166,18 @@ draw_vs_init(struct draw_context *draw)
|
||||
if (!draw->llvm) {
|
||||
draw->vs.tgsi.machine = tgsi_exec_machine_create(PIPE_SHADER_VERTEX);
|
||||
if (!draw->vs.tgsi.machine)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
draw->vs.emit_cache = translate_cache_create();
|
||||
if (!draw->vs.emit_cache)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
draw->vs.fetch_cache = translate_cache_create();
|
||||
if (!draw->vs.fetch_cache)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1273,7 +1273,7 @@ lp_build_div(struct lp_build_context *bld,
|
||||
return bld->undef;
|
||||
|
||||
/* fast rcp is disabled (just uses div), so makes no sense to try that */
|
||||
if (FALSE &&
|
||||
if (false &&
|
||||
((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) ||
|
||||
(util_get_cpu_caps()->has_avx && type.width == 32 && type.length == 8)) &&
|
||||
type.floating)
|
||||
@@ -1861,16 +1861,16 @@ arch_rounding_available(const struct lp_type type)
|
||||
(type.length == 1 || type.width*type.length == 128)) ||
|
||||
(util_get_cpu_caps()->has_avx && type.width*type.length == 256) ||
|
||||
(util_get_cpu_caps()->has_avx512f && type.width*type.length == 512))
|
||||
return TRUE;
|
||||
return true;
|
||||
else if ((util_get_cpu_caps()->has_altivec &&
|
||||
(type.width == 32 && type.length == 4)))
|
||||
return TRUE;
|
||||
return true;
|
||||
else if (util_get_cpu_caps()->has_neon)
|
||||
return TRUE;
|
||||
return true;
|
||||
else if (util_get_cpu_caps()->family == CPU_S390X)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
enum lp_build_round_mode
|
||||
@@ -2644,7 +2644,7 @@ lp_build_rcp(struct lp_build_context *bld,
|
||||
* particular uses that require less workarounds.
|
||||
*/
|
||||
|
||||
if (FALSE && ((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) ||
|
||||
if (false && ((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) ||
|
||||
(util_get_cpu_caps()->has_avx && type.width == 32 && type.length == 8))){
|
||||
const unsigned num_iterations = 0;
|
||||
LLVMValueRef res;
|
||||
@@ -3035,7 +3035,7 @@ lp_build_sin(struct lp_build_context *bld,
|
||||
return lp_build_intrinsic(builder, intrinsic, vec_type, args, 1, 0);
|
||||
}
|
||||
|
||||
return lp_build_sin_or_cos(bld, a, FALSE);
|
||||
return lp_build_sin_or_cos(bld, a, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -3057,7 +3057,7 @@ lp_build_cos(struct lp_build_context *bld,
|
||||
return lp_build_intrinsic(builder, intrinsic, vec_type, args, 1, 0);
|
||||
}
|
||||
|
||||
return lp_build_sin_or_cos(bld, a, TRUE);
|
||||
return lp_build_sin_or_cos(bld, a, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -3535,7 +3535,7 @@ lp_build_log2(struct lp_build_context *bld,
|
||||
LLVMValueRef x)
|
||||
{
|
||||
LLVMValueRef res;
|
||||
lp_build_log2_approx(bld, x, NULL, NULL, &res, FALSE);
|
||||
lp_build_log2_approx(bld, x, NULL, NULL, &res, false);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -3550,7 +3550,7 @@ lp_build_log2_safe(struct lp_build_context *bld,
|
||||
LLVMValueRef x)
|
||||
{
|
||||
LLVMValueRef res;
|
||||
lp_build_log2_approx(bld, x, NULL, NULL, &res, TRUE);
|
||||
lp_build_log2_approx(bld, x, NULL, NULL, &res, true);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ build_binary_int_overflow(struct gallivm_state *gallivm,
|
||||
oelems[0] = type_ref;
|
||||
oelems[1] = LLVMInt1TypeInContext(gallivm->context);
|
||||
|
||||
otype = LLVMStructTypeInContext(gallivm->context, oelems, 2, FALSE);
|
||||
otype = LLVMStructTypeInContext(gallivm->context, oelems, 2, false);
|
||||
oresult = lp_build_intrinsic_binary(builder, intr_str,
|
||||
otype, a, b);
|
||||
if (ofbit) {
|
||||
|
||||
@@ -455,9 +455,9 @@ lp_build_const_string(struct gallivm_state *gallivm,
|
||||
unsigned len = strlen(str) + 1;
|
||||
LLVMTypeRef i8 = LLVMInt8TypeInContext(gallivm->context);
|
||||
LLVMValueRef string = LLVMAddGlobal(gallivm->module, LLVMArrayType(i8, len), "");
|
||||
LLVMSetGlobalConstant(string, TRUE);
|
||||
LLVMSetGlobalConstant(string, true);
|
||||
LLVMSetLinkage(string, LLVMInternalLinkage);
|
||||
LLVMSetInitializer(string, LLVMConstStringInContext(gallivm->context, str, len, TRUE));
|
||||
LLVMSetInitializer(string, LLVMConstStringInContext(gallivm->context, str, len, true));
|
||||
string = LLVMConstBitCast(string, LLVMPointerType(i8, 0));
|
||||
return string;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ lp_build_clamped_float_to_unsigned_norm(struct gallivm_state *gallivm,
|
||||
|
||||
assert(src_type.floating);
|
||||
assert(dst_width <= src_type.width);
|
||||
src_type.sign = FALSE;
|
||||
src_type.sign = false;
|
||||
|
||||
mantissa = lp_mantissa(src_type);
|
||||
|
||||
@@ -860,7 +860,7 @@ lp_build_conv(struct gallivm_state *gallivm,
|
||||
dst_type.width,
|
||||
tmp[i]);
|
||||
}
|
||||
tmp_type.floating = FALSE;
|
||||
tmp_type.floating = false;
|
||||
}
|
||||
else {
|
||||
double dst_scale = lp_const_scale(dst_type);
|
||||
@@ -885,12 +885,12 @@ lp_build_conv(struct gallivm_state *gallivm,
|
||||
for(i = 0; i < num_tmps; ++i) {
|
||||
tmp[i] = lp_build_iround(&bld, tmp[i]);
|
||||
}
|
||||
tmp_type.floating = FALSE;
|
||||
tmp_type.floating = false;
|
||||
}
|
||||
else {
|
||||
LLVMTypeRef tmp_vec_type;
|
||||
|
||||
tmp_type.floating = FALSE;
|
||||
tmp_type.floating = false;
|
||||
tmp_vec_type = lp_build_vec_type(gallivm, tmp_type);
|
||||
for(i = 0; i < num_tmps; ++i) {
|
||||
#if 0
|
||||
@@ -971,15 +971,15 @@ lp_build_conv(struct gallivm_state *gallivm,
|
||||
dst_type,
|
||||
tmp[i]);
|
||||
}
|
||||
tmp_type.floating = TRUE;
|
||||
tmp_type.floating = true;
|
||||
}
|
||||
else {
|
||||
double src_scale = lp_const_scale(src_type);
|
||||
LLVMTypeRef tmp_vec_type;
|
||||
|
||||
/* Use an equally sized integer for intermediate computations */
|
||||
tmp_type.floating = TRUE;
|
||||
tmp_type.sign = TRUE;
|
||||
tmp_type.floating = true;
|
||||
tmp_type.sign = true;
|
||||
tmp_vec_type = lp_build_vec_type(gallivm, tmp_type);
|
||||
for(i = 0; i < num_tmps; ++i) {
|
||||
#if 0
|
||||
@@ -1083,15 +1083,15 @@ lp_build_conv_mask(struct gallivm_state *gallivm,
|
||||
* We assume all values are 0 or -1
|
||||
*/
|
||||
|
||||
src_type.floating = FALSE;
|
||||
src_type.fixed = FALSE;
|
||||
src_type.sign = TRUE;
|
||||
src_type.norm = FALSE;
|
||||
src_type.floating = false;
|
||||
src_type.fixed = false;
|
||||
src_type.sign = true;
|
||||
src_type.norm = false;
|
||||
|
||||
dst_type.floating = FALSE;
|
||||
dst_type.fixed = FALSE;
|
||||
dst_type.sign = TRUE;
|
||||
dst_type.norm = FALSE;
|
||||
dst_type.floating = false;
|
||||
dst_type.fixed = false;
|
||||
dst_type.sign = true;
|
||||
dst_type.norm = false;
|
||||
|
||||
/*
|
||||
* Truncate or expand bit width
|
||||
|
||||
@@ -226,7 +226,7 @@ lp_profile(LLVMValueRef func, const void *code)
|
||||
{
|
||||
#if defined(__linux__) && defined(PROFILE)
|
||||
static std::ofstream perf_asm_file;
|
||||
static bool first_time = TRUE;
|
||||
static bool first_time = true;
|
||||
static FILE *perf_map_file = NULL;
|
||||
if (first_time) {
|
||||
/*
|
||||
@@ -243,7 +243,7 @@ lp_profile(LLVMValueRef func, const void *code)
|
||||
snprintf(filename, sizeof filename, "/tmp/perf-%llu.map.asm", (unsigned long long)pid);
|
||||
perf_asm_file.open(filename);
|
||||
}
|
||||
first_time = FALSE;
|
||||
first_time = false;
|
||||
}
|
||||
if (perf_map_file) {
|
||||
const char *symbol = LLVMGetValueName(func);
|
||||
|
||||
@@ -112,7 +112,7 @@ format_matches_type(const struct util_format_description *desc,
|
||||
desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB ||
|
||||
desc->block.width != 1 ||
|
||||
desc->block.height != 1) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type.floating) {
|
||||
@@ -127,18 +127,18 @@ format_matches_type(const struct util_format_description *desc,
|
||||
|
||||
for (chan = 0; chan < desc->nr_channels; ++chan) {
|
||||
if (desc->channel[chan].size != type.width) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID) {
|
||||
if (desc->channel[chan].type != chan_type ||
|
||||
desc->channel[chan].normalized != type.norm) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -257,8 +257,8 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm,
|
||||
"");
|
||||
|
||||
/* Initialize vector constants */
|
||||
normalized = FALSE;
|
||||
needs_uitofp = FALSE;
|
||||
normalized = false;
|
||||
needs_uitofp = false;
|
||||
|
||||
/* Loop over 4 color components */
|
||||
for (i = 0; i < 4; ++i) {
|
||||
@@ -276,7 +276,7 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm,
|
||||
assert(desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED);
|
||||
|
||||
if (bits == 32) {
|
||||
needs_uitofp = TRUE;
|
||||
needs_uitofp = true;
|
||||
}
|
||||
|
||||
shifts[i] = lp_build_const_int32(gallivm, shift);
|
||||
@@ -284,7 +284,7 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm,
|
||||
|
||||
if (desc->channel[i].normalized) {
|
||||
scales[i] = lp_build_const_float(gallivm, 1.0 / mask);
|
||||
normalized = TRUE;
|
||||
normalized = true;
|
||||
}
|
||||
else
|
||||
scales[i] = lp_build_const_float(gallivm, 1.0);
|
||||
@@ -397,7 +397,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm,
|
||||
LLVMGetUndef(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context), 4)),
|
||||
LLVMConstVector(swizzles, 4), "");
|
||||
|
||||
normalized = FALSE;
|
||||
normalized = false;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
unsigned bits = desc->channel[i].size;
|
||||
unsigned shift = desc->channel[i].shift;
|
||||
@@ -416,7 +416,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm,
|
||||
|
||||
if (desc->channel[i].normalized) {
|
||||
scales[i] = lp_build_const_float(gallivm, mask);
|
||||
normalized = TRUE;
|
||||
normalized = true;
|
||||
}
|
||||
else
|
||||
scales[i] = lp_build_const_float(gallivm, 1.0);
|
||||
@@ -513,7 +513,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
fetch_type = lp_type_uint(type.width*4);
|
||||
packed = lp_build_gather(gallivm, type.length/4,
|
||||
format_desc->block.bits, fetch_type,
|
||||
aligned, base_ptr, offset, TRUE);
|
||||
aligned, base_ptr, offset, true);
|
||||
|
||||
assert(format_desc->block.bits <= vec_len);
|
||||
(void) vec_len; /* silence unused var warning for non-debug build */
|
||||
@@ -549,7 +549,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
|
||||
packed = lp_build_gather(gallivm, type.length/4,
|
||||
format_desc->block.bits, fetch_type,
|
||||
aligned, base_ptr, offset, TRUE);
|
||||
aligned, base_ptr, offset, true);
|
||||
|
||||
assert(format_desc->block.bits * type.length / 4 <=
|
||||
type.width * type.length);
|
||||
@@ -640,7 +640,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
|
||||
packed = lp_build_gather_elem(gallivm, num_pixels,
|
||||
format_desc->block.bits, 32, aligned,
|
||||
base_ptr, offset, k, FALSE);
|
||||
base_ptr, offset, k, false);
|
||||
|
||||
tmps[k] = lp_build_unpack_arith_rgba_aos(gallivm,
|
||||
format_desc,
|
||||
@@ -711,7 +711,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
memset(&tmp_type, 0, sizeof tmp_type);
|
||||
tmp_type.width = 8;
|
||||
tmp_type.length = num_pixels * 4;
|
||||
tmp_type.norm = TRUE;
|
||||
tmp_type.norm = true;
|
||||
|
||||
tmp = lp_build_fetch_subsampled_rgba_aos(gallivm,
|
||||
format_desc,
|
||||
@@ -738,7 +738,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
memset(&tmp_type, 0, sizeof tmp_type);
|
||||
tmp_type.width = 8;
|
||||
tmp_type.length = num_pixels * 4;
|
||||
tmp_type.norm = TRUE;
|
||||
tmp_type.norm = true;
|
||||
|
||||
tmp = lp_build_fetch_s3tc_rgba_aos(gallivm,
|
||||
format_desc,
|
||||
@@ -766,7 +766,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
memset(&tmp_type, 0, sizeof tmp_type);
|
||||
tmp_type.width = 8;
|
||||
tmp_type.length = num_pixels * 4;
|
||||
tmp_type.norm = TRUE;
|
||||
tmp_type.norm = true;
|
||||
tmp_type.sign = (format_desc->format == PIPE_FORMAT_RGTC1_SNORM ||
|
||||
format_desc->format == PIPE_FORMAT_RGTC2_SNORM ||
|
||||
format_desc->format == PIPE_FORMAT_LATC1_SNORM ||
|
||||
|
||||
@@ -245,8 +245,8 @@ lp_build_gather_s3tc(struct gallivm_state *gallivm,
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
elems[i] = lp_build_gather_elem(gallivm, length,
|
||||
block_bits, block_bits, TRUE,
|
||||
base_ptr, offsets, i, FALSE);
|
||||
block_bits, block_bits, true,
|
||||
base_ptr, offsets, i, false);
|
||||
elems[i] = LLVMBuildBitCast(builder, elems[i], type32dxt, "");
|
||||
}
|
||||
if (length == 1) {
|
||||
@@ -523,7 +523,7 @@ lp_build_lerp23(struct lp_build_context *bld,
|
||||
assert(!type.floating && !type.fixed && !type.norm && type.width == 8);
|
||||
|
||||
lp_build_context_init(&bld2, gallivm, i16_type);
|
||||
bld2.type.sign = TRUE;
|
||||
bld2.type.sign = true;
|
||||
x = lp_build_const_int_vec(gallivm, bld->type, 255*1/3);
|
||||
|
||||
/* FIXME: use native avx256 unpack/pack */
|
||||
@@ -653,7 +653,7 @@ s3tc_dxt1_full_to_rgba_aos(struct gallivm_state *gallivm,
|
||||
LLVMValueRef v0_lo, v0_hi, v1_lo, v1_hi, addlo, addhi;
|
||||
|
||||
lp_build_context_init(&bld2, gallivm, i16_type);
|
||||
bld2.type.sign = TRUE;
|
||||
bld2.type.sign = true;
|
||||
|
||||
/*
|
||||
* This isn't as expensive as it looks (the unpack is the same as
|
||||
@@ -678,11 +678,11 @@ s3tc_dxt1_full_to_rgba_aos(struct gallivm_state *gallivm,
|
||||
|
||||
/* select between colors2/3 */
|
||||
/* signed compare is faster saves some xors */
|
||||
type.sign = TRUE;
|
||||
type.sign = true;
|
||||
sel_mask = lp_build_compare(gallivm, type, PIPE_FUNC_GREATER, col0, col1);
|
||||
color2 = lp_build_select(&bld32, sel_mask, color2, color2_2);
|
||||
color3 = lp_build_select(&bld32, sel_mask, color3, color3_2);
|
||||
type.sign = FALSE;
|
||||
type.sign = false;
|
||||
|
||||
if (format == PIPE_FORMAT_DXT1_RGBA ||
|
||||
format == PIPE_FORMAT_DXT1_SRGBA) {
|
||||
@@ -853,7 +853,7 @@ lp_build_lerpdxta(struct gallivm_state *gallivm,
|
||||
memset(&type16, 0, sizeof type16);
|
||||
type16.width = 16;
|
||||
type16.length = 2*n;
|
||||
type16.sign = TRUE;
|
||||
type16.sign = true;
|
||||
memset(&type8, 0, sizeof type8);
|
||||
type8.width = 8;
|
||||
type8.length = 4*n;
|
||||
@@ -991,7 +991,7 @@ s3tc_dxt5_alpha_channel(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
/* signed compare is faster saves some xors */
|
||||
type.sign = TRUE;
|
||||
type.sign = true;
|
||||
/* alpha0 > alpha1 selection */
|
||||
sel_mask = lp_build_compare(gallivm, type, PIPE_FUNC_GREATER,
|
||||
alpha0, alpha1);
|
||||
@@ -1226,7 +1226,7 @@ lp_build_lerp23_single(struct lp_build_context *bld,
|
||||
assert(!type.floating && !type.fixed && !type.norm && type.width == 8);
|
||||
|
||||
lp_build_context_init(&bld2, gallivm, i16_type);
|
||||
bld2.type.sign = TRUE;
|
||||
bld2.type.sign = true;
|
||||
|
||||
/* weights 256/3, 256*2/3, with correct rounding */
|
||||
elems[0] = elems[1] = elems[2] = elems[3] =
|
||||
@@ -1274,7 +1274,7 @@ s3tc_decode_block_dxt1(struct gallivm_state *gallivm,
|
||||
memset(&type32, 0, sizeof type32);
|
||||
type32.width = 32;
|
||||
type32.length = 4;
|
||||
type32.sign = TRUE;
|
||||
type32.sign = true;
|
||||
|
||||
memset(&type8, 0, sizeof type8);
|
||||
type8.width = 8;
|
||||
@@ -1567,7 +1567,7 @@ lp_build_lerpdxta_block(struct gallivm_state *gallivm,
|
||||
memset(&type16, 0, sizeof type16);
|
||||
type16.width = 16;
|
||||
type16.length = 8;
|
||||
type16.sign = TRUE;
|
||||
type16.sign = true;
|
||||
|
||||
lp_build_context_init(&bld, gallivm, type16);
|
||||
/*
|
||||
@@ -1686,10 +1686,10 @@ s3tc_decode_block_dxt5(struct gallivm_state *gallivm,
|
||||
alpha0 = LLVMBuildShuffleVector(builder, alpha0, alpha0, shuffle1, "");
|
||||
alpha1 = LLVMBuildShuffleVector(builder, alpha1, alpha1, shuffle1, "");
|
||||
|
||||
type16.sign = TRUE;
|
||||
type16.sign = true;
|
||||
sel_mask = lp_build_compare(gallivm, type16, PIPE_FUNC_GREATER,
|
||||
alpha0, alpha1);
|
||||
type16.sign = FALSE;
|
||||
type16.sign = false;
|
||||
sel_mask = LLVMBuildBitCast(builder, sel_mask, bld8.vec_type, "");
|
||||
|
||||
if (!util_get_cpu_caps()->has_ssse3) {
|
||||
@@ -1718,9 +1718,9 @@ s3tc_decode_block_dxt5(struct gallivm_state *gallivm,
|
||||
tmp1 = LLVMBuildLShr(builder, acode,
|
||||
lp_build_const_int_vec(gallivm, type32, 6), "");
|
||||
/* use signed pack doesn't matter and otherwise need sse41 */
|
||||
type32.sign = type16.sign = TRUE;
|
||||
type32.sign = type16.sign = true;
|
||||
acode = lp_build_pack2(gallivm, type32, type16, tmp0, tmp1);
|
||||
type32.sign = type16.sign = FALSE;
|
||||
type32.sign = type16.sign = false;
|
||||
/* now have 8x6bit in 8x16bit, 01, 45, 89, ..., 23, 67, ... */
|
||||
acode0 = LLVMBuildAnd(builder, acode,
|
||||
lp_build_const_int_vec(gallivm, type16, 0x7), "");
|
||||
@@ -2344,8 +2344,8 @@ lp_build_gather_rgtc(struct gallivm_state *gallivm,
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
elems[i] = lp_build_gather_elem(gallivm, length,
|
||||
block_bits, block_bits, TRUE,
|
||||
base_ptr, offsets, i, FALSE);
|
||||
block_bits, block_bits, true,
|
||||
base_ptr, offsets, i, false);
|
||||
elems[i] = LLVMBuildBitCast(builder, elems[i], type32dxt, "");
|
||||
}
|
||||
if (length == 1) {
|
||||
|
||||
@@ -322,11 +322,11 @@ lp_build_unpack_rgba_soa(struct gallivm_state *gallivm,
|
||||
/* Decode the input vector components */
|
||||
for (chan = 0; chan < format_desc->nr_channels; ++chan) {
|
||||
struct util_format_channel_description chan_desc = format_desc->channel[chan];
|
||||
bool srgb_chan = FALSE;
|
||||
bool srgb_chan = false;
|
||||
|
||||
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB &&
|
||||
format_desc->swizzle[3] != chan) {
|
||||
srgb_chan = TRUE;
|
||||
srgb_chan = true;
|
||||
}
|
||||
|
||||
inputs[chan] = lp_build_extract_soa_chan(&bld,
|
||||
@@ -457,7 +457,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
format_desc->block.bits,
|
||||
fetch_type,
|
||||
aligned,
|
||||
base_ptr, offset, FALSE);
|
||||
base_ptr, offset, false);
|
||||
|
||||
/*
|
||||
* convert texels to float rgba
|
||||
@@ -610,7 +610,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
packed[i] = lp_build_gather(gallivm, gather_type.length,
|
||||
format_desc->block.bits,
|
||||
fetch_type, aligned,
|
||||
base_ptr, offsetr, FALSE);
|
||||
base_ptr, offsetr, false);
|
||||
if (fp64) {
|
||||
struct lp_type conv_type = type;
|
||||
conv_type.width *= 2;
|
||||
@@ -663,7 +663,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
|
||||
output[i] = lp_build_extract_soa_chan(&bld,
|
||||
blockbits,
|
||||
FALSE,
|
||||
false,
|
||||
chan_desc,
|
||||
dst[vec_nr]);
|
||||
}
|
||||
@@ -693,7 +693,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
packed = lp_build_gather(gallivm, type.length,
|
||||
format_desc->block.bits,
|
||||
fetch_type, aligned,
|
||||
base_ptr, offset, FALSE);
|
||||
base_ptr, offset, false);
|
||||
if (format == PIPE_FORMAT_R11G11B10_FLOAT) {
|
||||
lp_build_r11g11b10_to_float(gallivm, packed, rgba_out);
|
||||
}
|
||||
@@ -721,14 +721,14 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
LLVMValueRef s_offset = lp_build_const_int_vec(gallivm, type, 4);
|
||||
offset = LLVMBuildAdd(builder, offset, s_offset, "");
|
||||
packed = lp_build_gather(gallivm, type.length, 32, fetch_type,
|
||||
aligned, base_ptr, offset, FALSE);
|
||||
aligned, base_ptr, offset, false);
|
||||
packed = LLVMBuildAnd(builder, packed,
|
||||
lp_build_const_int_vec(gallivm, type, mask), "");
|
||||
}
|
||||
else {
|
||||
assert (format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT);
|
||||
packed = lp_build_gather(gallivm, type.length, 32, fetch_type,
|
||||
aligned, base_ptr, offset, TRUE);
|
||||
aligned, base_ptr, offset, true);
|
||||
packed = LLVMBuildBitCast(builder, packed,
|
||||
lp_build_vec_type(gallivm, type), "");
|
||||
}
|
||||
@@ -773,7 +773,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
memset(&tmp_type, 0, sizeof tmp_type);
|
||||
tmp_type.width = 8;
|
||||
tmp_type.length = type.length * 4;
|
||||
tmp_type.norm = TRUE;
|
||||
tmp_type.norm = true;
|
||||
tmp_type.sign = is_signed;
|
||||
|
||||
packed = lp_build_fetch_rgba_aos(gallivm, flinear_desc, tmp_type,
|
||||
|
||||
@@ -235,7 +235,7 @@ yuv_to_rgb_soa(struct gallivm_state *gallivm,
|
||||
LLVMValueRef cvg;
|
||||
|
||||
memset(&type, 0, sizeof type);
|
||||
type.sign = TRUE;
|
||||
type.sign = true;
|
||||
type.width = 32;
|
||||
type.length = n;
|
||||
|
||||
@@ -322,7 +322,7 @@ rgb_to_rgba_aos(struct gallivm_state *gallivm,
|
||||
LLVMValueRef rgba;
|
||||
|
||||
memset(&type, 0, sizeof type);
|
||||
type.sign = TRUE;
|
||||
type.sign = true;
|
||||
type.width = 32;
|
||||
type.length = n;
|
||||
|
||||
@@ -498,7 +498,7 @@ lp_build_fetch_subsampled_rgba_aos(struct gallivm_state *gallivm,
|
||||
assert(format_desc->block.height == 1);
|
||||
|
||||
fetch_type = lp_type_uint(32);
|
||||
packed = lp_build_gather(gallivm, n, 32, fetch_type, TRUE, base_ptr, offset, FALSE);
|
||||
packed = lp_build_gather(gallivm, n, 32, fetch_type, true, base_ptr, offset, false);
|
||||
|
||||
(void)j;
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ lp_build_gather(struct gallivm_state *gallivm,
|
||||
if (((src_width % 32) == 0) && ((src_width % dst_type.width) == 0) &&
|
||||
(dst_type.length > 1)) {
|
||||
/* use vector fetch (if dst_type is vector) */
|
||||
vec_fetch = TRUE;
|
||||
vec_fetch = true;
|
||||
if (dst_type.floating) {
|
||||
fetch_type = lp_type_float_vec(dst_type.width, src_width);
|
||||
} else {
|
||||
@@ -463,7 +463,7 @@ lp_build_gather(struct gallivm_state *gallivm,
|
||||
fetch_dst_type.length = dst_type.length;
|
||||
} else {
|
||||
/* use scalar fetch */
|
||||
vec_fetch = FALSE;
|
||||
vec_fetch = false;
|
||||
if (dst_type.floating && ((src_width == 32) || (src_width == 64))) {
|
||||
fetch_type = lp_type_float(src_width);
|
||||
} else {
|
||||
@@ -508,7 +508,7 @@ lp_build_gather(struct gallivm_state *gallivm,
|
||||
|
||||
LLVMValueRef elems[LP_MAX_VECTOR_WIDTH / 8];
|
||||
unsigned i;
|
||||
bool vec_zext = FALSE;
|
||||
bool vec_zext = false;
|
||||
struct lp_type res_type, gather_res_type;
|
||||
LLVMTypeRef res_t, gather_res_t;
|
||||
|
||||
@@ -530,11 +530,11 @@ lp_build_gather(struct gallivm_state *gallivm,
|
||||
* (We're not trying that with other bit widths as that might not be
|
||||
* easier, in particular with 8 bit values at least with only sse2.)
|
||||
*/
|
||||
assert(vec_fetch == FALSE);
|
||||
assert(vec_fetch == false);
|
||||
gather_res_type.width /= 2;
|
||||
fetch_dst_type = fetch_type;
|
||||
src_type = lp_build_vec_type(gallivm, fetch_type);
|
||||
vec_zext = TRUE;
|
||||
vec_zext = true;
|
||||
}
|
||||
res_t = lp_build_vec_type(gallivm, res_type);
|
||||
gather_res_t = lp_build_vec_type(gallivm, gather_res_type);
|
||||
|
||||
@@ -85,7 +85,7 @@ static const struct debug_named_value lp_bld_debug_flags[] = {
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(gallivm_debug, "GALLIVM_DEBUG", lp_bld_debug_flags, 0)
|
||||
|
||||
|
||||
static bool gallivm_initialized = FALSE;
|
||||
static bool gallivm_initialized = false;
|
||||
|
||||
unsigned lp_native_vector_width;
|
||||
|
||||
@@ -121,7 +121,7 @@ create_pass_manager(struct gallivm_state *gallivm)
|
||||
|
||||
gallivm->passmgr = LLVMCreateFunctionPassManagerForModule(gallivm->module);
|
||||
if (!gallivm->passmgr)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
#if GALLIVM_HAVE_CORO == 1
|
||||
gallivm->cgpassmgr = LLVMCreatePassManager();
|
||||
@@ -191,7 +191,7 @@ create_pass_manager(struct gallivm_state *gallivm)
|
||||
LLVMAddCoroCleanupPass(gallivm->passmgr);
|
||||
#endif
|
||||
#endif
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,10 +316,10 @@ init_gallivm_engine(struct gallivm_state *gallivm)
|
||||
free(engine_data_layout);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
assert(!gallivm->module);
|
||||
|
||||
if (!lp_build_init())
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
gallivm->context = context;
|
||||
gallivm->cache = cache;
|
||||
@@ -404,7 +404,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
|
||||
gallivm->target = LLVMCreateTargetData(layout);
|
||||
if (!gallivm->target) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,12 +412,12 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
goto fail;
|
||||
|
||||
lp_build_coro_declare_malloc_hooks(gallivm);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
gallivm_free_ir(gallivm);
|
||||
gallivm_free_code(gallivm);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned
|
||||
@@ -438,7 +438,7 @@ lp_build_init(void)
|
||||
{
|
||||
lp_build_init_native_width();
|
||||
if (gallivm_initialized)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
|
||||
/* LLVMLinkIn* are no-ops at runtime. They just ensure the respective
|
||||
@@ -475,9 +475,9 @@ lp_build_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
gallivm_initialized = TRUE;
|
||||
gallivm_initialized = true;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ mask_has_loop(struct lp_exec_mask *mask)
|
||||
for (i = mask->function_stack_size - 1; i >= 0; --i) {
|
||||
const struct function_ctx *ctx = &mask->function_stack[i];
|
||||
if (ctx->loop_stack_size > 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -76,9 +76,9 @@ mask_has_switch(struct lp_exec_mask *mask)
|
||||
for (i = mask->function_stack_size - 1; i >= 0; --i) {
|
||||
const struct function_ctx *ctx = &mask->function_stack[i];
|
||||
if (ctx->switch_stack_size > 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -94,9 +94,9 @@ mask_has_cond(struct lp_exec_mask *mask)
|
||||
for (i = mask->function_stack_size - 1; i >= 0; --i) {
|
||||
const struct function_ctx *ctx = &mask->function_stack[i];
|
||||
if (ctx->cond_stack_size > 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void lp_exec_mask_update(struct lp_exec_mask *mask)
|
||||
@@ -173,8 +173,8 @@ lp_exec_mask_function_init(struct lp_exec_mask *mask, int function_idx)
|
||||
void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context *bld)
|
||||
{
|
||||
mask->bld = bld;
|
||||
mask->has_mask = FALSE;
|
||||
mask->ret_in_main = FALSE;
|
||||
mask->has_mask = false;
|
||||
mask->ret_in_main = false;
|
||||
/* For the main function */
|
||||
mask->function_stack_size = 1;
|
||||
|
||||
|
||||
@@ -393,17 +393,17 @@ lp_build_llvm_texture_member(struct gallivm_state *gallivm,
|
||||
_index, #_name, _emit_load, out_type ); \
|
||||
}
|
||||
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(first_level, LP_JIT_TEXTURE_FIRST_LEVEL, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(base_ptr, LP_JIT_TEXTURE_BASE, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, FALSE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, FALSE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, FALSE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(num_samples, LP_JIT_TEXTURE_NUM_SAMPLES, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, TRUE)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(first_level, LP_JIT_TEXTURE_FIRST_LEVEL, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(base_ptr, LP_JIT_TEXTURE_BASE, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, false)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, false)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, false)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(num_samples, LP_JIT_TEXTURE_NUM_SAMPLES, true)
|
||||
LP_BUILD_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, true)
|
||||
|
||||
/**
|
||||
* Fetch the specified member of the lp_jit_sampler structure.
|
||||
@@ -465,11 +465,11 @@ lp_build_llvm_sampler_member(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(min_lod, LP_JIT_SAMPLER_MIN_LOD, TRUE)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(max_lod, LP_JIT_SAMPLER_MAX_LOD, TRUE)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(lod_bias, LP_JIT_SAMPLER_LOD_BIAS, TRUE)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(border_color, LP_JIT_SAMPLER_BORDER_COLOR, FALSE)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(max_aniso, LP_JIT_SAMPLER_MAX_ANISO, TRUE)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(min_lod, LP_JIT_SAMPLER_MIN_LOD, true)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(max_lod, LP_JIT_SAMPLER_MAX_LOD, true)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(lod_bias, LP_JIT_SAMPLER_LOD_BIAS, true)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(border_color, LP_JIT_SAMPLER_BORDER_COLOR, false)
|
||||
LP_BUILD_LLVM_SAMPLER_MEMBER(max_aniso, LP_JIT_SAMPLER_MAX_ANISO, true)
|
||||
|
||||
/**
|
||||
* Fetch the specified member of the lp_jit_image structure.
|
||||
@@ -559,14 +559,14 @@ lp_build_llvm_image_member(struct gallivm_state *gallivm,
|
||||
_index, #_name, _emit_load ); \
|
||||
}
|
||||
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(width, LP_JIT_IMAGE_WIDTH, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(height, LP_JIT_IMAGE_HEIGHT, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(depth, LP_JIT_IMAGE_DEPTH, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(base_ptr, LP_JIT_IMAGE_BASE, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, LP_JIT_IMAGE_ROW_STRIDE, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, LP_JIT_IMAGE_IMG_STRIDE, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(num_samples, LP_JIT_IMAGE_NUM_SAMPLES, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, TRUE)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(width, LP_JIT_IMAGE_WIDTH, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(height, LP_JIT_IMAGE_HEIGHT, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(depth, LP_JIT_IMAGE_DEPTH, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(base_ptr, LP_JIT_IMAGE_BASE, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, LP_JIT_IMAGE_ROW_STRIDE, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, LP_JIT_IMAGE_IMG_STRIDE, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(num_samples, LP_JIT_IMAGE_NUM_SAMPLES, true)
|
||||
LP_BUILD_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, true)
|
||||
|
||||
void
|
||||
lp_build_jit_fill_sampler_dynamic_state(struct lp_sampler_dynamic_state *state)
|
||||
|
||||
@@ -207,7 +207,7 @@ lp_build_compare(struct gallivm_state *gallivm,
|
||||
}
|
||||
#endif
|
||||
|
||||
return lp_build_compare_ext(gallivm, type, func, a, b, FALSE);
|
||||
return lp_build_compare_ext(gallivm, type, func, a, b, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,7 +224,7 @@ lp_build_cmp_ordered(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
LLVMValueRef b)
|
||||
{
|
||||
return lp_build_compare_ext(bld->gallivm, bld->type, func, a, b, TRUE);
|
||||
return lp_build_compare_ext(bld->gallivm, bld->type, func, a, b, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2301,7 +2301,7 @@ visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *instr)
|
||||
params.target = glsl_sampler_to_pipe(instr->sampler_dim, instr->is_array);
|
||||
params.texture_unit = instr->texture_index;
|
||||
params.explicit_lod = explicit_lod;
|
||||
params.is_sviewinfo = TRUE;
|
||||
params.is_sviewinfo = true;
|
||||
params.sizes_out = sizes_out;
|
||||
params.samples_only = (instr->op == nir_texop_texture_samples);
|
||||
params.texture_unit_offset = texture_unit_offset;
|
||||
|
||||
@@ -504,14 +504,14 @@ static void emit_load_var(struct lp_build_nir_context *bld_base,
|
||||
LLVMValueRef attrib_index_val = lp_build_add(&bld_base->uint_bld, indir_index, lp_build_const_int_vec(gallivm, bld_base->uint_bld.type, comp_loc));
|
||||
LLVMValueRef index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
attrib_index_val, 4, idx,
|
||||
TRUE);
|
||||
true);
|
||||
LLVMValueRef index_vec2 = NULL;
|
||||
LLVMTypeRef scalar_type = LLVMFloatTypeInContext(gallivm->context);
|
||||
LLVMValueRef inputs_array = LLVMBuildBitCast(gallivm->builder, bld->inputs_array, LLVMPointerType(scalar_type, 0), "");
|
||||
|
||||
if (bit_size == 64)
|
||||
index_vec2 = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indir_index, 4, idx + 1, TRUE);
|
||||
indir_index, 4, idx + 1, true);
|
||||
|
||||
/* Gather values from the input register array */
|
||||
result[i] = build_gather(bld_base, &bld_base->base, scalar_type, inputs_array, index_vec, NULL, index_vec2);
|
||||
@@ -869,7 +869,7 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base,
|
||||
indirect_val = lp_build_min(uint_bld, indirect_val, max_index);
|
||||
reg_storage = LLVMBuildBitCast(builder, reg_storage, LLVMPointerType(reg_bld->elem_type, 0), "");
|
||||
for (unsigned i = 0; i < nc; i++) {
|
||||
LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, TRUE);
|
||||
LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, true);
|
||||
vals[i] = build_gather(bld_base, reg_bld, reg_bld->elem_type, reg_storage, indirect_offset, NULL, NULL);
|
||||
}
|
||||
} else {
|
||||
@@ -904,7 +904,7 @@ static void emit_store_reg(struct lp_build_nir_context *bld_base,
|
||||
for (unsigned i = 0; i < nc; i++) {
|
||||
if (!(writemask & (1 << i)))
|
||||
continue;
|
||||
LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, TRUE);
|
||||
LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, true);
|
||||
dst[i] = LLVMBuildBitCast(builder, dst[i], reg_bld->vec_type, "");
|
||||
emit_mask_scatter(bld, reg_storage, indirect_offset, dst[i], &bld->exec_mask);
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
||||
if ((util_get_cpu_caps()->has_sse2 || util_get_cpu_caps()->has_altivec) &&
|
||||
src_type.width * src_type.length >= 128) {
|
||||
const char *intrinsic = NULL;
|
||||
bool swap_intrinsic_operands = FALSE;
|
||||
bool swap_intrinsic_operands = false;
|
||||
|
||||
switch(src_type.width) {
|
||||
case 32:
|
||||
@@ -607,7 +607,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
||||
intrinsic = "llvm.ppc.altivec.vpkuwus";
|
||||
}
|
||||
#if UTIL_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = true;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@@ -618,7 +618,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
||||
} else if (util_get_cpu_caps()->has_altivec) {
|
||||
intrinsic = "llvm.ppc.altivec.vpkshss";
|
||||
#if UTIL_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = true;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
@@ -627,7 +627,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
||||
} else if (util_get_cpu_caps()->has_altivec) {
|
||||
intrinsic = "llvm.ppc.altivec.vpkshus";
|
||||
#if UTIL_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -789,7 +789,7 @@ lp_build_packs2(struct gallivm_state *gallivm,
|
||||
assert(src_type.width == dst_type.width * 2);
|
||||
assert(src_type.length * 2 == dst_type.length);
|
||||
|
||||
clamp = TRUE;
|
||||
clamp = true;
|
||||
|
||||
/* All X86 SSE non-interleaved pack instructions take signed inputs and
|
||||
* saturate them, so no need to clamp for those cases. */
|
||||
@@ -797,7 +797,7 @@ lp_build_packs2(struct gallivm_state *gallivm,
|
||||
src_type.width * src_type.length >= 128 &&
|
||||
src_type.sign &&
|
||||
(src_type.width == 32 || src_type.width == 16))
|
||||
clamp = FALSE;
|
||||
clamp = false;
|
||||
|
||||
if(clamp) {
|
||||
struct lp_build_context bld;
|
||||
@@ -923,7 +923,7 @@ lp_build_resize(struct gallivm_state *gallivm,
|
||||
/*
|
||||
* Register width remains constant -- use vector packing intrinsics
|
||||
*/
|
||||
tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, src, num_srcs);
|
||||
tmp[0] = lp_build_pack(gallivm, src_type, dst_type, true, src, num_srcs);
|
||||
}
|
||||
else {
|
||||
if (src_type.width / dst_type.width > num_srcs) {
|
||||
@@ -943,7 +943,7 @@ lp_build_resize(struct gallivm_state *gallivm,
|
||||
}
|
||||
num_srcs *= size_ratio;
|
||||
src_type.length = new_length;
|
||||
tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, tmp, num_srcs);
|
||||
tmp[0] = lp_build_pack(gallivm, src_type, dst_type, true, tmp, num_srcs);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
@@ -957,7 +957,7 @@ lp_build_resize(struct gallivm_state *gallivm,
|
||||
dst_type.length = dst_type.length / size_ratio;
|
||||
|
||||
for (i = 0; i < size_ratio; i++) {
|
||||
tmp[i] = lp_build_pack(gallivm, src_type, dst_type, TRUE,
|
||||
tmp[i] = lp_build_pack(gallivm, src_type, dst_type, true,
|
||||
&src[i*num_pack_srcs], num_pack_srcs);
|
||||
}
|
||||
tmp[0] = lp_build_concat(gallivm, tmp, dst_type, size_ratio);
|
||||
|
||||
@@ -71,21 +71,21 @@ lp_sampler_wrap_mode_uses_border_color(enum pipe_tex_wrap mode,
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
||||
case PIPE_TEX_WRAP_MIRROR_REPEAT:
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
||||
return FALSE;
|
||||
return false;
|
||||
case PIPE_TEX_WRAP_CLAMP:
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP:
|
||||
if (min_img_filter == PIPE_TEX_FILTER_NEAREST &&
|
||||
mag_img_filter == PIPE_TEX_FILTER_NEAREST) {
|
||||
return FALSE;
|
||||
return false;
|
||||
} else {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
assert(0 && "unexpected wrap mode");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ lp_build_pmin(struct lp_build_sample_context *bld,
|
||||
const unsigned num_quads = length / 4;
|
||||
const bool pmin_per_quad = pmin_bld->type.length != length;
|
||||
|
||||
int_size = lp_build_minify(int_size_bld, bld->int_size, first_level, TRUE);
|
||||
int_size = lp_build_minify(int_size_bld, bld->int_size, first_level, true);
|
||||
float_size = lp_build_int_to_float(float_size_bld, int_size);
|
||||
max_aniso = lp_build_broadcast_scalar(coord_bld, max_aniso);
|
||||
max_aniso = lp_build_mul(coord_bld, max_aniso, max_aniso);
|
||||
@@ -381,7 +381,7 @@ lp_build_rho(struct lp_build_sample_context *bld,
|
||||
*/
|
||||
|
||||
LLVMValueRef int_size =
|
||||
lp_build_minify(int_size_bld, bld->int_size, first_level, TRUE);
|
||||
lp_build_minify(int_size_bld, bld->int_size, first_level, true);
|
||||
LLVMValueRef float_size = lp_build_int_to_float(float_size_bld, int_size);
|
||||
|
||||
if (derivs) {
|
||||
@@ -1386,7 +1386,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
|
||||
if (bld->num_mips == 1) {
|
||||
ilevel_vec = lp_build_broadcast_scalar(&bld->int_size_bld, ilevel);
|
||||
*out_size = lp_build_minify(&bld->int_size_bld, bld->int_size,
|
||||
ilevel_vec, TRUE);
|
||||
ilevel_vec, true);
|
||||
*out_size = lp_build_scale_view_dims(&bld->int_size_bld, *out_size,
|
||||
bld->int_tex_blocksize,
|
||||
bld->int_tex_blocksize_log2,
|
||||
@@ -1442,7 +1442,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
|
||||
bld4.type,
|
||||
ilevel,
|
||||
indexi);
|
||||
tmp[i] = lp_build_minify(&bld4, int_size_vec, ileveli, TRUE);
|
||||
tmp[i] = lp_build_minify(&bld4, int_size_vec, ileveli, true);
|
||||
tmp[i] = lp_build_scale_view_dims(&bld4, tmp[i],
|
||||
int_tex_blocksize_vec,
|
||||
int_tex_blocksize_log2_vec,
|
||||
@@ -1483,7 +1483,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
|
||||
lp_build_broadcast_scalar(&bld->int_coord_bld,
|
||||
bld->int_view_blocksize);
|
||||
*out_size = lp_build_minify(&bld->int_coord_bld, int_size_vec,
|
||||
ilevel, FALSE);
|
||||
ilevel, false);
|
||||
*out_size = lp_build_scale_view_dims(&bld->int_coord_bld,
|
||||
*out_size,
|
||||
int_tex_blocksize_vec,
|
||||
@@ -1499,7 +1499,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
|
||||
ilevel, indexi);
|
||||
tmp[i] = bld->int_size;
|
||||
tmp[i] = lp_build_minify(&bld->int_size_in_bld, tmp[i],
|
||||
ilevel1, TRUE);
|
||||
ilevel1, true);
|
||||
tmp[i] = lp_build_scale_view_dims(&bld->int_size_in_bld,
|
||||
tmp[i],
|
||||
bld->int_tex_blocksize,
|
||||
|
||||
@@ -505,9 +505,9 @@ lp_is_simple_wrap_mode(unsigned mode)
|
||||
switch (mode) {
|
||||
case PIPE_TEX_WRAP_REPEAT:
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,9 +562,9 @@ has_layer_coord(enum pipe_texture_target tex)
|
||||
/* cube is not layered but 3rd coord (after cube mapping) behaves the same */
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -409,8 +409,8 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld,
|
||||
bld->texel_type.length,
|
||||
bld->format_desc->block.bits,
|
||||
fetch_type,
|
||||
TRUE,
|
||||
data_ptr, offset, TRUE);
|
||||
true,
|
||||
data_ptr, offset, true);
|
||||
|
||||
rgba8 = LLVMBuildBitCast(builder, rgba8, u8n_vec_type, "");
|
||||
}
|
||||
@@ -418,7 +418,7 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld,
|
||||
rgba8 = lp_build_fetch_rgba_aos(bld->gallivm,
|
||||
bld->format_desc,
|
||||
u8n.type,
|
||||
TRUE,
|
||||
true,
|
||||
data_ptr, offset,
|
||||
x_subcoord,
|
||||
y_subcoord,
|
||||
@@ -662,8 +662,8 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
bld->texel_type.length,
|
||||
bld->format_desc->block.bits,
|
||||
fetch_type,
|
||||
TRUE,
|
||||
data_ptr, offset[k][j][i], TRUE);
|
||||
true,
|
||||
data_ptr, offset[k][j][i], true);
|
||||
|
||||
rgba8 = LLVMBuildBitCast(builder, rgba8, u8n_vec_type, "");
|
||||
}
|
||||
@@ -671,7 +671,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
rgba8 = lp_build_fetch_rgba_aos(bld->gallivm,
|
||||
bld->format_desc,
|
||||
u8n.type,
|
||||
TRUE,
|
||||
true,
|
||||
data_ptr, offset[k][j][i],
|
||||
x_subcoord[i],
|
||||
y_subcoord[j],
|
||||
|
||||
@@ -159,7 +159,7 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
|
||||
|
||||
lp_build_fetch_rgba_soa(bld->gallivm,
|
||||
bld->format_desc,
|
||||
bld->texel_type, TRUE,
|
||||
bld->texel_type, true,
|
||||
data_ptr, offset,
|
||||
i, j,
|
||||
bld->cache,
|
||||
@@ -393,7 +393,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
||||
{
|
||||
struct lp_build_context abs_coord_bld = bld->coord_bld;
|
||||
abs_coord_bld.type.sign = FALSE;
|
||||
abs_coord_bld.type.sign = false;
|
||||
|
||||
if (bld->static_sampler_state->normalized_coords) {
|
||||
/* mul by tex size */
|
||||
@@ -465,7 +465,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
|
||||
}
|
||||
if (!is_gather) {
|
||||
/* compute mirror function */
|
||||
coord = lp_build_coord_mirror(bld, coord, TRUE);
|
||||
coord = lp_build_coord_mirror(bld, coord, true);
|
||||
|
||||
/* scale coord to length */
|
||||
coord = lp_build_mul(coord_bld, coord, length_f);
|
||||
@@ -499,7 +499,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
|
||||
* For GL4 gather with per-sample offsets we'd need to the mirroring
|
||||
* per coord too.
|
||||
*/
|
||||
coord = lp_build_coord_mirror(bld, coord, FALSE);
|
||||
coord = lp_build_coord_mirror(bld, coord, false);
|
||||
coord = lp_build_mul(coord_bld, coord, length_f);
|
||||
|
||||
/*
|
||||
@@ -556,7 +556,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
||||
{
|
||||
struct lp_build_context abs_coord_bld = bld->coord_bld;
|
||||
abs_coord_bld.type.sign = FALSE;
|
||||
abs_coord_bld.type.sign = false;
|
||||
|
||||
if (bld->static_sampler_state->normalized_coords) {
|
||||
/* scale coord to length */
|
||||
@@ -752,7 +752,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
|
||||
coord = lp_build_add(coord_bld, coord, offset);
|
||||
}
|
||||
/* compute mirror function */
|
||||
coord = lp_build_coord_mirror(bld, coord, TRUE);
|
||||
coord = lp_build_coord_mirror(bld, coord, true);
|
||||
|
||||
/* scale coord to length */
|
||||
assert(bld->static_sampler_state->normalized_coords);
|
||||
@@ -784,7 +784,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
|
||||
*/
|
||||
{
|
||||
struct lp_build_context abs_coord_bld = *int_coord_bld;
|
||||
abs_coord_bld.type.sign = FALSE;
|
||||
abs_coord_bld.type.sign = false;
|
||||
/* clamp to [0, length - 1] */
|
||||
icoord = lp_build_min(&abs_coord_bld, icoord, length_minus_one);
|
||||
}
|
||||
@@ -1861,7 +1861,7 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld,
|
||||
data_ptr1, mipoff1, coords, offsets,
|
||||
colors1);
|
||||
} else {
|
||||
lp_build_sample_image_linear(bld, FALSE, size1, NULL,
|
||||
lp_build_sample_image_linear(bld, false, size1, NULL,
|
||||
row_stride1_vec, img_stride1_vec,
|
||||
data_ptr1, mipoff1, coords, offsets,
|
||||
colors1);
|
||||
@@ -1933,7 +1933,7 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld,
|
||||
mipoff0 = lp_build_get_mip_offsets(bld, ilevel0);
|
||||
}
|
||||
|
||||
lp_build_sample_image_linear(bld, FALSE, size0, linear_mask,
|
||||
lp_build_sample_image_linear(bld, false, size0, linear_mask,
|
||||
row_stride0_vec, img_stride0_vec,
|
||||
data_ptr0, mipoff0, coords, offsets,
|
||||
colors0);
|
||||
@@ -1977,7 +1977,7 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld,
|
||||
mipoff1 = lp_build_get_mip_offsets(bld, ilevel1);
|
||||
}
|
||||
|
||||
lp_build_sample_image_linear(bld, FALSE, size1, linear_mask,
|
||||
lp_build_sample_image_linear(bld, false, size1, linear_mask,
|
||||
row_stride1_vec, img_stride1_vec,
|
||||
data_ptr1, mipoff1, coords, offsets,
|
||||
colors1);
|
||||
@@ -2369,7 +2369,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
|
||||
LLVMValueRef weights = lp_build_gather(gallivm, coord_bld->type.length,
|
||||
coord_bld->type.width,
|
||||
lp_elem_type(coord_bld->type),
|
||||
TRUE, filter_table, q, TRUE);
|
||||
true, filter_table, q, true);
|
||||
|
||||
/*
|
||||
* Mask off the weights here which should ensure no-op for loops
|
||||
@@ -2567,13 +2567,13 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
|
||||
LLVMValueRef layer = lp_build_iround(&bld->coord_bld, coords[3]);
|
||||
LLVMValueRef six = lp_build_const_int_vec(bld->gallivm, bld->int_coord_type, 6);
|
||||
layer = lp_build_mul(&bld->int_coord_bld, layer, six);
|
||||
coords[3] = lp_build_layer_coord(bld, texture_index, TRUE, layer, NULL);
|
||||
coords[3] = lp_build_layer_coord(bld, texture_index, true, layer, NULL);
|
||||
/* because of seamless filtering can't add it to face (coords[2]) here. */
|
||||
}
|
||||
} else if ((target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
target == PIPE_TEXTURE_2D_ARRAY) && !is_lodq) {
|
||||
coords[2] = lp_build_iround(&bld->coord_bld, coords[2]);
|
||||
coords[2] = lp_build_layer_coord(bld, texture_index, FALSE, coords[2], NULL);
|
||||
coords[2] = lp_build_layer_coord(bld, texture_index, false, coords[2], NULL);
|
||||
}
|
||||
|
||||
if (bld->static_sampler_state->compare_mode != PIPE_TEX_COMPARE_NONE) {
|
||||
@@ -2998,7 +2998,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
|
||||
lp_build_if(&if_ctx, bld->gallivm, lod_positive);
|
||||
{
|
||||
/* Use the minification filter */
|
||||
lp_build_sample_mipmap(bld, min_filter, mip_filter, FALSE,
|
||||
lp_build_sample_mipmap(bld, min_filter, mip_filter, false,
|
||||
coords, offsets,
|
||||
ilevel0, ilevel1, lod_fpart,
|
||||
texels);
|
||||
@@ -3007,7 +3007,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
|
||||
{
|
||||
/* Use the magnification filter */
|
||||
lp_build_sample_mipmap(bld, mag_filter, PIPE_TEX_MIPFILTER_NONE,
|
||||
FALSE,
|
||||
false,
|
||||
coords, offsets,
|
||||
ilevel0, NULL, NULL,
|
||||
texels);
|
||||
@@ -3060,7 +3060,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
|
||||
* cheaper than linear, hence do a separate path for that.
|
||||
*/
|
||||
lp_build_sample_mipmap(bld, PIPE_TEX_FILTER_NEAREST,
|
||||
mip_filter_for_nearest, FALSE,
|
||||
mip_filter_for_nearest, false,
|
||||
coords, offsets,
|
||||
ilevel0, ilevel1, lod_fpart,
|
||||
texels);
|
||||
@@ -3097,7 +3097,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
|
||||
struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
|
||||
unsigned dims = bld->dims, chan;
|
||||
unsigned target = bld->static_texture_state->target;
|
||||
bool out_of_bound_ret_zero = TRUE;
|
||||
bool out_of_bound_ret_zero = true;
|
||||
LLVMValueRef size, ilevel;
|
||||
LLVMValueRef row_stride_vec = NULL, img_stride_vec = NULL;
|
||||
LLVMValueRef x = coords[0], y = coords[1], z = coords[2];
|
||||
@@ -3142,10 +3142,10 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
|
||||
if (target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
if (out_of_bound_ret_zero) {
|
||||
z = lp_build_layer_coord(bld, texture_unit, FALSE, z, &out1);
|
||||
z = lp_build_layer_coord(bld, texture_unit, false, z, &out1);
|
||||
out_of_bounds = lp_build_or(int_coord_bld, out_of_bounds, out1);
|
||||
} else {
|
||||
z = lp_build_layer_coord(bld, texture_unit, FALSE, z, NULL);
|
||||
z = lp_build_layer_coord(bld, texture_unit, false, z, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3210,7 +3210,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
|
||||
|
||||
lp_build_fetch_rgba_soa(bld->gallivm,
|
||||
bld->format_desc,
|
||||
bld->texel_type, TRUE,
|
||||
bld->texel_type, true,
|
||||
bld->base_ptr, offset,
|
||||
i, j,
|
||||
bld->cache,
|
||||
@@ -3386,13 +3386,13 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
||||
res_format_desc = util_format_description(static_texture_state->res_format);
|
||||
|
||||
if (gallivm_perf & GALLIVM_PERF_NO_QUAD_LOD || op_is_lodq) {
|
||||
bld.no_quad_lod = TRUE;
|
||||
bld.no_quad_lod = true;
|
||||
}
|
||||
if (!(gallivm_perf & GALLIVM_PERF_RHO_APPROX) || op_is_lodq) {
|
||||
bld.no_rho_approx = TRUE;
|
||||
bld.no_rho_approx = true;
|
||||
}
|
||||
if (!(gallivm_perf & GALLIVM_PERF_BRILINEAR) || op_is_lodq || lod_bias || explicit_lod) {
|
||||
bld.no_brilinear = TRUE;
|
||||
bld.no_brilinear = true;
|
||||
}
|
||||
|
||||
bld.vector_width = lp_type_width(type);
|
||||
@@ -4013,7 +4013,7 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm,
|
||||
struct lp_derivatives *deriv_ptr = NULL;
|
||||
unsigned num_param = 0;
|
||||
unsigned num_coords, num_derivs, num_offsets, layer;
|
||||
bool need_cache = FALSE;
|
||||
bool need_cache = false;
|
||||
|
||||
const enum lp_sampler_lod_control lod_control =
|
||||
(sample_key & LP_SAMPLER_LOD_CONTROL_MASK)
|
||||
@@ -4033,7 +4033,7 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *format_desc;
|
||||
format_desc = util_format_description(static_texture_state->format);
|
||||
if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
|
||||
need_cache = TRUE;
|
||||
need_cache = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4153,12 +4153,12 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm,
|
||||
if (layer && op_type == LP_SAMPLER_OP_LODQ)
|
||||
layer = 0;
|
||||
|
||||
bool need_cache = FALSE;
|
||||
bool need_cache = false;
|
||||
if (dynamic_state->cache_ptr) {
|
||||
const struct util_format_description *format_desc;
|
||||
format_desc = util_format_description(static_texture_state->format);
|
||||
if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
|
||||
need_cache = TRUE;
|
||||
need_cache = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4308,7 +4308,7 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state,
|
||||
struct gallivm_state *gallivm,
|
||||
const struct lp_sampler_params *params)
|
||||
{
|
||||
bool use_tex_func = FALSE;
|
||||
bool use_tex_func = false;
|
||||
|
||||
/*
|
||||
* Do not use a function call if the sampling is "simple enough".
|
||||
@@ -4337,7 +4337,7 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state,
|
||||
const bool simple_tex =
|
||||
op_type != LP_SAMPLER_OP_TEXTURE ||
|
||||
((static_sampler_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE ||
|
||||
static_texture_state->level_zero_only == TRUE) &&
|
||||
static_texture_state->level_zero_only == true) &&
|
||||
static_sampler_state->min_img_filter == static_sampler_state->mag_img_filter);
|
||||
|
||||
use_tex_func = !(simple_format && simple_tex);
|
||||
@@ -4542,7 +4542,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
|
||||
lp_build_const_int32(gallivm, 2), "");
|
||||
}
|
||||
|
||||
size = lp_build_minify(&bld_int_vec4, size, lod, TRUE);
|
||||
size = lp_build_minify(&bld_int_vec4, size, lod, true);
|
||||
size = lp_build_scale_view_dims(&bld_int_vec4, size, tex_blocksize,
|
||||
tex_blocksize_log2, view_blocksize);
|
||||
|
||||
@@ -4891,7 +4891,7 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
|
||||
lp_build_context_init(&texel_bld, gallivm, texel_type);
|
||||
lp_build_fetch_rgba_soa(gallivm,
|
||||
format_desc,
|
||||
texel_type, TRUE,
|
||||
texel_type, true,
|
||||
base_ptr, offset,
|
||||
i, j,
|
||||
NULL,
|
||||
|
||||
@@ -194,7 +194,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
|
||||
type, 1 << channel, num_channels), "");
|
||||
|
||||
type2 = type;
|
||||
type2.floating = FALSE;
|
||||
type2.floating = false;
|
||||
type2.width *= 2;
|
||||
type2.length /= 2;
|
||||
|
||||
@@ -271,7 +271,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
|
||||
*/
|
||||
|
||||
struct lp_type type4 = type;
|
||||
type4.floating = FALSE;
|
||||
type4.floating = false;
|
||||
type4.width *= 4;
|
||||
type4.length /= 4;
|
||||
|
||||
@@ -470,7 +470,7 @@ lp_build_swizzle_aos(struct lp_build_context *bld,
|
||||
* channels.
|
||||
*/
|
||||
struct lp_type type4 = type;
|
||||
type4.floating = FALSE;
|
||||
type4.floating = false;
|
||||
type4.width *= 4;
|
||||
type4.length /= 4;
|
||||
|
||||
|
||||
@@ -258,13 +258,13 @@ lp_build_tgsi_inst_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
case TGSI_OPCODE_UP4UB:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if the opcode has been implemented */
|
||||
if (!action->emit) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(&emit_data, 0, sizeof(emit_data));
|
||||
@@ -336,7 +336,7 @@ lp_build_tgsi_inst_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
if (info->num_dst >= 2)
|
||||
bld_base->emit_store(bld_base, inst, info, 1, emit_data.output1);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
}
|
||||
|
||||
if (!lp_bld_tgsi_list_init(bld_base)) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct tgsi_parse_context parse;
|
||||
@@ -554,7 +554,7 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
if (!lp_build_tgsi_inst_llvm(bld_base, instr)) {
|
||||
_debug_printf("warning: failed to translate tgsi opcode %s to LLVM\n",
|
||||
tgsi_get_opcode_name(instr->Instruction.Opcode));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,5 +566,5 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
bld_base->emit_epilogue(bld_base);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1627,7 +1627,7 @@ log_emit_cpu(
|
||||
LLVMValueRef src0 = emit_data->args[0];
|
||||
|
||||
lp_build_log2_approx(&bld_base->base, src0,
|
||||
&p_exp, &p_floor_log2, &p_log2, FALSE);
|
||||
&p_exp, &p_floor_log2, &p_log2, false);
|
||||
|
||||
emit_data->output[TGSI_CHAN_X] = p_floor_log2;
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_LIT:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_RCP:
|
||||
/* TGSI_OPCODE_RECIP */
|
||||
@@ -480,10 +480,10 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_EXP:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_LOG:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_MUL:
|
||||
src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL);
|
||||
@@ -499,14 +499,14 @@ lp_emit_instruction_aos(
|
||||
|
||||
case TGSI_OPCODE_DP3:
|
||||
/* TGSI_OPCODE_DOT3 */
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_DP4:
|
||||
/* TGSI_OPCODE_DOT4 */
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_DST:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_MIN:
|
||||
src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL);
|
||||
@@ -597,31 +597,31 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_DDX:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_DDY:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_KILL:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_KILL_IF:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_PK2H:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_PK2US:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_PK4B:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_PK4UB:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_SEQ:
|
||||
src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL);
|
||||
@@ -668,25 +668,25 @@ lp_emit_instruction_aos(
|
||||
case TGSI_OPCODE_UP2H:
|
||||
/* deprecated */
|
||||
assert (0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_UP2US:
|
||||
/* deprecated */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_UP4B:
|
||||
/* deprecated */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_UP4UB:
|
||||
/* deprecated */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_ARR:
|
||||
@@ -695,7 +695,7 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_CAL:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_RET:
|
||||
/* safe to ignore at end */
|
||||
@@ -725,11 +725,11 @@ lp_emit_instruction_aos(
|
||||
|
||||
case TGSI_OPCODE_DIV:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_DP2:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_TXL:
|
||||
dst0 = emit_tex(bld, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD);
|
||||
@@ -740,29 +740,29 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_BRK:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_IF:
|
||||
case TGSI_OPCODE_UIF:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_BGNLOOP:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_BGNSUB:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_ELSE:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_ENDIF:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_ENDLOOP:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_ENDSUB:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_CEIL:
|
||||
src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL);
|
||||
@@ -771,12 +771,12 @@ lp_emit_instruction_aos(
|
||||
|
||||
case TGSI_OPCODE_I2F:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_NOT:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_TRUNC:
|
||||
@@ -786,53 +786,53 @@ lp_emit_instruction_aos(
|
||||
|
||||
case TGSI_OPCODE_SHL:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_ISHR:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_AND:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_OR:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_MOD:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_XOR:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_TXF:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_TXQ:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_CONT:
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case TGSI_OPCODE_EMIT:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_ENDPRIM:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_NOP:
|
||||
@@ -843,14 +843,14 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (info->num_dst) {
|
||||
lp_emit_store_aos(bld, inst, 0, dst0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ analyse_tex(struct analysis_context *ctx,
|
||||
|
||||
if (info->num_texs < ARRAY_SIZE(info->tex)) {
|
||||
struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
|
||||
bool indirect = FALSE;
|
||||
bool indirect = false;
|
||||
unsigned readmask = 0;
|
||||
|
||||
tex_info->target = inst->Texture.Texture;
|
||||
@@ -143,12 +143,12 @@ analyse_tex(struct analysis_context *ctx,
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
/* modifier would be in another not analyzed reg so just say indirect */
|
||||
if (modifier != LP_BLD_TEX_MODIFIER_NONE) {
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
}
|
||||
break;
|
||||
case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
@@ -157,7 +157,7 @@ analyse_tex(struct analysis_context *ctx,
|
||||
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV) {
|
||||
/* We don't track explicit derivatives, although we could */
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
tex_info->sampler_unit = inst->Src[3].Register.Index;
|
||||
tex_info->texture_unit = inst->Src[3].Register.Index;
|
||||
} else {
|
||||
@@ -175,7 +175,7 @@ analyse_tex(struct analysis_context *ctx,
|
||||
if (readmask & (1 << chan)) {
|
||||
analyse_src(ctx, chan_info, &inst->Src[0].Register, chan);
|
||||
if (chan_info->file != TGSI_FILE_INPUT) {
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
}
|
||||
} else {
|
||||
memset(chan_info, 0, sizeof *chan_info);
|
||||
@@ -183,12 +183,12 @@ analyse_tex(struct analysis_context *ctx,
|
||||
}
|
||||
|
||||
if (indirect) {
|
||||
info->indirect_textures = TRUE;
|
||||
info->indirect_textures = true;
|
||||
}
|
||||
|
||||
++info->num_texs;
|
||||
} else {
|
||||
info->indirect_textures = TRUE;
|
||||
info->indirect_textures = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,8 +210,8 @@ analyse_sample(struct analysis_context *ctx,
|
||||
if (info->num_texs < ARRAY_SIZE(info->tex)) {
|
||||
struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
|
||||
unsigned target = ctx->sample_target[inst->Src[1].Register.Index];
|
||||
bool indirect = FALSE;
|
||||
bool shadow = FALSE;
|
||||
bool indirect = false;
|
||||
bool shadow = false;
|
||||
unsigned readmask;
|
||||
|
||||
switch (target) {
|
||||
@@ -245,14 +245,14 @@ analyse_sample(struct analysis_context *ctx,
|
||||
tex_info->sampler_unit = inst->Src[2].Register.Index;
|
||||
|
||||
if (tex_info->texture_unit != tex_info->sampler_unit) {
|
||||
info->sampler_texture_units_different = TRUE;
|
||||
info->sampler_texture_units_different = true;
|
||||
}
|
||||
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_LOD ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_LOD_BIAS || shadow) {
|
||||
/* We don't track insts with additional regs, although we could */
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
}
|
||||
|
||||
for (chan = 0; chan < 4; ++chan) {
|
||||
@@ -260,7 +260,7 @@ analyse_sample(struct analysis_context *ctx,
|
||||
if (readmask & (1 << chan)) {
|
||||
analyse_src(ctx, chan_info, &inst->Src[0].Register, chan);
|
||||
if (chan_info->file != TGSI_FILE_INPUT) {
|
||||
indirect = TRUE;
|
||||
indirect = true;
|
||||
}
|
||||
} else {
|
||||
memset(chan_info, 0, sizeof *chan_info);
|
||||
@@ -268,12 +268,12 @@ analyse_sample(struct analysis_context *ctx,
|
||||
}
|
||||
|
||||
if (indirect) {
|
||||
info->indirect_textures = TRUE;
|
||||
info->indirect_textures = true;
|
||||
}
|
||||
|
||||
++info->num_texs;
|
||||
} else {
|
||||
info->indirect_textures = TRUE;
|
||||
info->indirect_textures = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,22 +349,22 @@ analyse_instruction(struct analysis_context *ctx,
|
||||
analyse_tex(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, FALSE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, false);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE_C:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, TRUE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, true);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE_C_LZ:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_ZERO, TRUE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_ZERO, true);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE_D:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV, FALSE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV, false);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE_B:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_BIAS, FALSE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_BIAS, false);
|
||||
break;
|
||||
case TGSI_OPCODE_SAMPLE_L:
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD, FALSE);
|
||||
analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -590,7 +590,7 @@ lp_build_tgsi_info(const struct tgsi_token *tokens,
|
||||
ctx->imm[ctx->num_imms][chan] = value;
|
||||
|
||||
if (value < 0.0f || value > 1.0f) {
|
||||
info->unclamped_immediates = TRUE;
|
||||
info->unclamped_immediates = true;
|
||||
}
|
||||
}
|
||||
++ctx->num_imms;
|
||||
|
||||
@@ -403,7 +403,7 @@ static void lp_exec_mask_ret(struct lp_exec_mask *mask, int *pc)
|
||||
* we don't drop the mask even if we have no call stack
|
||||
* (e.g. after a ret in a if clause after the endif)
|
||||
*/
|
||||
mask->ret_in_main = TRUE;
|
||||
mask->ret_in_main = true;
|
||||
}
|
||||
|
||||
exec_mask = LLVMBuildNot(builder,
|
||||
@@ -996,12 +996,12 @@ emit_fetch_immediate(
|
||||
index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle,
|
||||
FALSE);
|
||||
false);
|
||||
if (tgsi_type_is_64bit(stype))
|
||||
index_vec2 = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle_in >> 16,
|
||||
FALSE);
|
||||
false);
|
||||
/* Gather values from the immediate register array */
|
||||
res = build_gather(bld_base, imms_array, index_vec, NULL, index_vec2);
|
||||
} else {
|
||||
@@ -1067,12 +1067,12 @@ emit_fetch_input(
|
||||
index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle,
|
||||
TRUE);
|
||||
true);
|
||||
if (tgsi_type_is_64bit(stype)) {
|
||||
index_vec2 = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle_in >> 16,
|
||||
TRUE);
|
||||
true);
|
||||
}
|
||||
/* cast inputs_array pointer to float* */
|
||||
fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0);
|
||||
@@ -1263,7 +1263,7 @@ emit_fetch_tcs_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index,
|
||||
bld_base->info->output_semantic_name[reg->Register.Index]);
|
||||
} else {
|
||||
@@ -1272,7 +1272,7 @@ emit_fetch_tcs_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index);
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,7 @@ emit_fetch_tcs_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index,
|
||||
bld_base->info->output_semantic_name[reg->Register.Index]);
|
||||
} else {
|
||||
@@ -1296,7 +1296,7 @@ emit_fetch_tcs_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index);
|
||||
}
|
||||
assert(res2);
|
||||
@@ -1370,7 +1370,7 @@ emit_fetch_tes_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index);
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,7 @@ emit_fetch_tes_input(
|
||||
vertex_index,
|
||||
reg->Register.Indirect,
|
||||
attrib_index,
|
||||
FALSE,
|
||||
false,
|
||||
swizzle_index);
|
||||
}
|
||||
assert(res2);
|
||||
@@ -1434,12 +1434,12 @@ emit_fetch_temporary(
|
||||
index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle,
|
||||
TRUE);
|
||||
true);
|
||||
if (tgsi_type_is_64bit(stype)) {
|
||||
index_vec2 = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
swizzle_in >> 16,
|
||||
TRUE);
|
||||
true);
|
||||
}
|
||||
|
||||
/* cast temps_array pointer to float* */
|
||||
@@ -1707,7 +1707,7 @@ emit_store_output(struct lp_build_tgsi_context *bld_base,
|
||||
index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
chan_index,
|
||||
TRUE);
|
||||
true);
|
||||
|
||||
fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0);
|
||||
outputs_array = LLVMBuildBitCast(builder, bld->outputs_array, fptr_type, "");
|
||||
@@ -1818,7 +1818,7 @@ emit_store_temp(struct lp_build_tgsi_context *bld_base,
|
||||
index_vec = get_soa_array_offsets(&bld_base->uint_bld,
|
||||
indirect_index,
|
||||
chan_index,
|
||||
TRUE);
|
||||
true);
|
||||
|
||||
fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0);
|
||||
temps_array = LLVMBuildBitCast(builder, bld->temps_array, fptr_type, "");
|
||||
@@ -2667,7 +2667,7 @@ emit_size_query( struct lp_build_tgsi_soa_context *bld,
|
||||
params.target = pipe_target;
|
||||
params.resources_type = bld->resources_type;
|
||||
params.resources_ptr = bld->resources_ptr;
|
||||
params.is_sviewinfo = TRUE;
|
||||
params.is_sviewinfo = true;
|
||||
params.lod_property = lod_property;
|
||||
params.explicit_lod = explicit_lod;
|
||||
params.sizes_out = sizes_out;
|
||||
@@ -2688,12 +2688,12 @@ near_end_of_shader(struct lp_build_tgsi_soa_context *bld,
|
||||
enum tgsi_opcode opcode;
|
||||
|
||||
if (pc + i >= bld->bld_base.info->num_instructions)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
opcode = bld->bld_base.instructions[pc + i].Instruction.Opcode;
|
||||
|
||||
if (opcode == TGSI_OPCODE_END)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (opcode == TGSI_OPCODE_TEX ||
|
||||
opcode == TGSI_OPCODE_TXP ||
|
||||
@@ -2719,10 +2719,10 @@ near_end_of_shader(struct lp_build_tgsi_soa_context *bld,
|
||||
opcode == TGSI_OPCODE_UIF ||
|
||||
opcode == TGSI_OPCODE_BGNLOOP ||
|
||||
opcode == TGSI_OPCODE_SWITCH)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3259,7 +3259,7 @@ txq_emit(
|
||||
{
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_size_query(bld, emit_data->inst, emit_data->output, FALSE);
|
||||
emit_size_query(bld, emit_data->inst, emit_data->output, false);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3270,7 +3270,7 @@ txf_emit(
|
||||
{
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_fetch_texels(bld, emit_data->inst, emit_data->output, FALSE);
|
||||
emit_fetch_texels(bld, emit_data->inst, emit_data->output, false);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3281,7 +3281,7 @@ sample_i_emit(
|
||||
{
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_fetch_texels(bld, emit_data->inst, emit_data->output, TRUE);
|
||||
emit_fetch_texels(bld, emit_data->inst, emit_data->output, true);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3293,7 +3293,7 @@ sample_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE,
|
||||
FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
false, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3305,7 +3305,7 @@ sample_b_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_LOD_BIAS,
|
||||
FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
false, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3317,7 +3317,7 @@ sample_c_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE,
|
||||
TRUE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
true, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3329,7 +3329,7 @@ sample_c_lz_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_LOD_ZERO,
|
||||
TRUE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
true, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3341,7 +3341,7 @@ sample_d_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV,
|
||||
FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
false, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3353,7 +3353,7 @@ sample_l_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD,
|
||||
FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
false, LP_SAMPLER_OP_TEXTURE, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3365,7 +3365,7 @@ gather4_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE,
|
||||
FALSE, LP_SAMPLER_OP_GATHER, emit_data->output);
|
||||
false, LP_SAMPLER_OP_GATHER, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3376,7 +3376,7 @@ sviewinfo_emit(
|
||||
{
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_size_query(bld, emit_data->inst, emit_data->output, TRUE);
|
||||
emit_size_query(bld, emit_data->inst, emit_data->output, true);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3388,7 +3388,7 @@ lod_emit(
|
||||
struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base);
|
||||
|
||||
emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE,
|
||||
FALSE, LP_SAMPLER_OP_LODQ, emit_data->output);
|
||||
false, LP_SAMPLER_OP_LODQ, emit_data->output);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4516,7 +4516,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
|
||||
bld.bld_base.soa = TRUE;
|
||||
bld.bld_base.soa = true;
|
||||
bld.bld_base.emit_debug = emit_debug;
|
||||
bld.bld_base.emit_fetch_funcs[TGSI_FILE_CONSTANT] = emit_fetch_constant;
|
||||
bld.bld_base.emit_fetch_funcs[TGSI_FILE_IMMEDIATE] = emit_fetch_immediate;
|
||||
|
||||
@@ -86,7 +86,7 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
|
||||
{
|
||||
assert(elem_type);
|
||||
if (!elem_type)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
const LLVMTypeKind elem_kind = LLVMGetTypeKind(elem_type);
|
||||
|
||||
@@ -96,41 +96,41 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
|
||||
if (elem_kind != (lp_has_fp16()
|
||||
? LLVMHalfTypeKind : LLVMIntegerTypeKind)) {
|
||||
debug_printf("%s:%d: type is not 16 bits\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
if (elem_kind != LLVMFloatTypeKind) {
|
||||
debug_printf("%s:%d: type is not float\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 64:
|
||||
if (elem_kind != LLVMDoubleTypeKind) {
|
||||
debug_printf("%s:%d: type is not double\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (elem_kind != LLVMIntegerTypeKind) {
|
||||
debug_printf("%s:%d: element is not integer\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LLVMGetIntTypeWidth(elem_type) != type.width) {
|
||||
debug_printf("%s:%d: type width mismatch %d != %d\n",
|
||||
__FILE__, __LINE__,
|
||||
LLVMGetIntTypeWidth(elem_type), type.width);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,20 +139,20 @@ lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
|
||||
{
|
||||
assert(vec_type);
|
||||
if (!vec_type)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (type.length == 1)
|
||||
return lp_check_elem_type(type, vec_type);
|
||||
|
||||
if (LLVMGetTypeKind(vec_type) != LLVMVectorTypeKind) {
|
||||
printf("%s:%d: kind is not vector\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LLVMGetVectorSize(vec_type) != type.length) {
|
||||
printf("%s:%d: vector size mismatch %d != expected %d\n", __FILE__, __LINE__,
|
||||
LLVMGetVectorSize(vec_type), type.length);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLVMTypeRef elem_type = LLVMGetElementType(vec_type);
|
||||
@@ -166,7 +166,7 @@ lp_check_value(struct lp_type type, LLVMValueRef val)
|
||||
{
|
||||
assert(val);
|
||||
if (!val)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
LLVMTypeRef vec_type = LLVMTypeOf(val);
|
||||
|
||||
|
||||
@@ -214,8 +214,8 @@ lp_type_float(unsigned width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.floating = TRUE;
|
||||
res_type.sign = TRUE;
|
||||
res_type.floating = true;
|
||||
res_type.sign = true;
|
||||
res_type.width = width;
|
||||
res_type.length = 1;
|
||||
|
||||
@@ -230,8 +230,8 @@ lp_type_float_vec(unsigned width, unsigned total_width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.floating = TRUE;
|
||||
res_type.sign = TRUE;
|
||||
res_type.floating = true;
|
||||
res_type.sign = true;
|
||||
res_type.width = width;
|
||||
res_type.length = total_width / width;
|
||||
|
||||
@@ -246,7 +246,7 @@ lp_type_int(unsigned width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.sign = TRUE;
|
||||
res_type.sign = true;
|
||||
res_type.width = width;
|
||||
res_type.length = 1;
|
||||
|
||||
@@ -261,7 +261,7 @@ lp_type_int_vec(unsigned width, unsigned total_width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.sign = TRUE;
|
||||
res_type.sign = true;
|
||||
res_type.width = width;
|
||||
res_type.length = total_width / width;
|
||||
|
||||
@@ -303,7 +303,7 @@ lp_type_unorm(unsigned width, unsigned total_width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.norm = TRUE;
|
||||
res_type.norm = true;
|
||||
res_type.width = width;
|
||||
res_type.length = total_width / width;
|
||||
|
||||
@@ -317,8 +317,8 @@ lp_type_fixed(unsigned width, unsigned total_width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.sign = TRUE;
|
||||
res_type.fixed = TRUE;
|
||||
res_type.sign = true;
|
||||
res_type.fixed = true;
|
||||
res_type.width = width;
|
||||
res_type.length = total_width / width;
|
||||
|
||||
@@ -332,7 +332,7 @@ lp_type_ufixed(unsigned width, unsigned total_width)
|
||||
struct lp_type res_type;
|
||||
|
||||
memset(&res_type, 0, sizeof res_type);
|
||||
res_type.fixed = TRUE;
|
||||
res_type.fixed = true;
|
||||
res_type.width = width;
|
||||
res_type.length = total_width / width;
|
||||
|
||||
@@ -376,9 +376,9 @@ lp_float32_vec4_type(void)
|
||||
struct lp_type type;
|
||||
|
||||
memset(&type, 0, sizeof(type));
|
||||
type.floating = TRUE;
|
||||
type.sign = TRUE;
|
||||
type.norm = FALSE;
|
||||
type.floating = true;
|
||||
type.sign = true;
|
||||
type.norm = false;
|
||||
type.width = 32;
|
||||
type.length = 4;
|
||||
|
||||
@@ -392,9 +392,9 @@ lp_int32_vec4_type(void)
|
||||
struct lp_type type;
|
||||
|
||||
memset(&type, 0, sizeof(type));
|
||||
type.floating = FALSE;
|
||||
type.sign = TRUE;
|
||||
type.norm = FALSE;
|
||||
type.floating = false;
|
||||
type.sign = true;
|
||||
type.norm = false;
|
||||
type.width = 32;
|
||||
type.length = 4;
|
||||
|
||||
@@ -408,9 +408,9 @@ lp_unorm8_vec4_type(void)
|
||||
struct lp_type type;
|
||||
|
||||
memset(&type, 0, sizeof(type));
|
||||
type.floating = FALSE;
|
||||
type.sign = FALSE;
|
||||
type.norm = TRUE;
|
||||
type.floating = false;
|
||||
type.sign = false;
|
||||
type.norm = true;
|
||||
type.width = 8;
|
||||
type.length = 4;
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
|
||||
|
||||
if (tex_format == PIPE_FORMAT_NONE) {
|
||||
debug_printf("Unable to find texture format for font.\n");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(&tex_templ, 0, sizeof(tex_templ));
|
||||
@@ -414,14 +414,14 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
|
||||
|
||||
tex = screen->resource_create(screen, &tex_templ);
|
||||
if (!tex) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
map = pipe_texture_map(pipe, tex, 0, 0, PIPE_MAP_WRITE, 0, 0,
|
||||
tex->width0, tex->height0, &transfer);
|
||||
if (!map) {
|
||||
pipe_resource_reference(&tex, NULL);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
@@ -438,7 +438,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
|
||||
out_font->texture = tex;
|
||||
out_font->glyph_width = 8;
|
||||
out_font->glyph_height = 14;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -450,5 +450,5 @@ util_font_create(struct pipe_context *pipe, enum util_font_name name,
|
||||
case UTIL_FONT_FIXED_8X13:
|
||||
return util_font_create_fixed_8x13(pipe, out_font);
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
assert(sysInfo.dwNumberOfProcessors >= 1);
|
||||
if (cpu_index != ALL_CPUS && cpu_index >= sysInfo.dwNumberOfProcessors) {
|
||||
/* Tell hud_get_num_cpus there are only this many CPUs. */
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Get accumulated user and sys time for all threads */
|
||||
if (!GetProcessTimes(GetCurrentProcess(), &ftCreation, &ftExit,
|
||||
&ftKernel, &ftUser))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
GetSystemTimeAsFileTime(&ftNow);
|
||||
|
||||
@@ -92,7 +92,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
/* XXX: we ignore cpu_index, i.e, we assume that the individual CPU usage
|
||||
* and the system usage are one and the same.
|
||||
*/
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#elif DETECT_OS_BSD
|
||||
@@ -114,20 +114,20 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
int mib[] = { CTL_KERN, KERN_CP_TIME };
|
||||
|
||||
if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
#elif DETECT_OS_OPENBSD
|
||||
int mib[] = { CTL_KERN, KERN_CPTIME };
|
||||
long sum_cp_time[CPUSTATES];
|
||||
|
||||
len = sizeof(sum_cp_time);
|
||||
if (sysctl(mib, ARRAY_SIZE(mib), sum_cp_time, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
for (int state = 0; state < CPUSTATES; state++)
|
||||
cp_time[state] = sum_cp_time[state];
|
||||
#else
|
||||
if (sysctlbyname("kern.cp_time", cp_time, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
#endif
|
||||
} else {
|
||||
#if DETECT_OS_NETBSD
|
||||
@@ -135,26 +135,26 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
|
||||
len = sizeof(cp_time);
|
||||
if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
#elif DETECT_OS_OPENBSD
|
||||
int mib[] = { CTL_KERN, KERN_CPTIME2, cpu_index };
|
||||
|
||||
len = sizeof(cp_time);
|
||||
if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
#else
|
||||
long *cp_times = NULL;
|
||||
|
||||
if (sysctlbyname("kern.cp_times", NULL, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (len < (cpu_index + 1) * sizeof(cp_time))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
cp_times = malloc(len);
|
||||
|
||||
if (sysctlbyname("kern.cp_times", cp_times, &len, NULL, 0) == -1)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
memcpy(cp_time, cp_times + (cpu_index * CPUSTATES),
|
||||
sizeof(cp_time));
|
||||
@@ -167,7 +167,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
|
||||
*total_time = *busy_time + cp_time[CP_IDLE];
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -186,7 +186,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
|
||||
f = fopen("/proc/stat", "r");
|
||||
if (!f)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
while (!feof(f) && fgets(line, sizeof(line), f)) {
|
||||
if (strstr(line, cpuname) == line) {
|
||||
@@ -201,7 +201,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
&v[6], &v[7], &v[8], &v[9], &v[10], &v[11]);
|
||||
if (num < 5) {
|
||||
fclose(f);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* user + nice + system */
|
||||
@@ -213,11 +213,11 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
*total_time += v[i];
|
||||
}
|
||||
fclose(f);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -73,11 +73,11 @@ hud_batch_query_update(struct hud_batch_query_context *bq,
|
||||
bq->num_query_types);
|
||||
if (!bq->result[idx]) {
|
||||
fprintf(stderr, "gallium_hud: out of memory.\n");
|
||||
bq->failed = TRUE;
|
||||
bq->failed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pipe->get_query_result(pipe, query, FALSE, bq->result[idx]))
|
||||
if (!pipe->get_query_result(pipe, query, false, bq->result[idx]))
|
||||
break;
|
||||
|
||||
++bq->results;
|
||||
@@ -108,7 +108,7 @@ hud_batch_query_update(struct hud_batch_query_context *bq,
|
||||
fprintf(stderr,
|
||||
"gallium_hud: create_batch_query failed. You may have "
|
||||
"selected too many or incompatible queries.\n");
|
||||
bq->failed = TRUE;
|
||||
bq->failed = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ hud_batch_query_begin(struct hud_batch_query_context *bq,
|
||||
fprintf(stderr,
|
||||
"gallium_hud: could not begin batch query. You may have "
|
||||
"selected too many or incompatible queries.\n");
|
||||
bq->failed = TRUE;
|
||||
bq->failed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ query_new_value_normal(struct query_info *info, struct pipe_context *pipe)
|
||||
union pipe_query_result result;
|
||||
uint64_t *res64 = (uint64_t *)&result;
|
||||
|
||||
if (query && pipe->get_query_result(pipe, query, FALSE, &result)) {
|
||||
if (query && pipe->get_query_result(pipe, query, false, &result)) {
|
||||
if (info->type == PIPE_DRIVER_QUERY_TYPE_FLOAT) {
|
||||
assert(info->result_index == 0);
|
||||
info->results_cumulative += (uint64_t) (result.f * 1000.0f);
|
||||
@@ -426,27 +426,27 @@ hud_driver_query_install(struct hud_batch_query_context **pbq,
|
||||
{
|
||||
struct pipe_driver_query_info query = { 0 };
|
||||
unsigned num_queries, i;
|
||||
bool found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
if (!screen->get_driver_query_info)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
num_queries = screen->get_driver_query_info(screen, 0, NULL);
|
||||
|
||||
for (i = 0; i < num_queries; i++) {
|
||||
if (screen->get_driver_query_info(screen, i, &query) &&
|
||||
strcmp(query.name, name) == 0) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
hud_pipe_query_install(pbq, pane, query.name, query.query_type, 0,
|
||||
query.max_value.u64, query.type, query.result_type,
|
||||
query.flags);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ static bool
|
||||
get_nic_bytes(const char *fn, uint64_t *bytes)
|
||||
{
|
||||
if (get_file_value(fn, bytes) < 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -291,12 +291,12 @@ static inline bool
|
||||
pb_check_alignment(uint32_t requested, uint32_t provided)
|
||||
{
|
||||
if (!requested)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (requested > provided)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (provided % requested != 0)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ pb_check_alignment(uint32_t requested, uint32_t provided)
|
||||
static inline bool
|
||||
pb_check_usage(unsigned requested, unsigned provided)
|
||||
{
|
||||
return (requested & provided) == requested ? TRUE : FALSE;
|
||||
return (requested & provided) == requested ? true : false;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -314,10 +314,10 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr,
|
||||
|
||||
if (p_atomic_dec_zero(&fenced_buf->base.reference.count)) {
|
||||
fenced_buffer_destroy_locked(fenced_mgr, fenced_buf);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr,
|
||||
* Otherwise assume the work has been already carried out by another
|
||||
* thread that re-aquired the lock before us.
|
||||
*/
|
||||
proceed = fence == fenced_buf->fence ? TRUE : FALSE;
|
||||
proceed = fence == fenced_buf->fence ? true : false;
|
||||
|
||||
ops->fence_reference(ops, &fence, NULL);
|
||||
|
||||
@@ -396,7 +396,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr,
|
||||
struct list_head *curr, *next;
|
||||
struct fenced_buffer *fenced_buf;
|
||||
struct pipe_fence_handle *prev_fence = NULL;
|
||||
bool ret = FALSE;
|
||||
bool ret = false;
|
||||
|
||||
curr = fenced_mgr->fenced.next;
|
||||
next = curr->next;
|
||||
@@ -412,7 +412,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr,
|
||||
/* Don't return just now. Instead preemptively check if the
|
||||
* following buffers' fences already expired, without further waits.
|
||||
*/
|
||||
wait = FALSE;
|
||||
wait = false;
|
||||
} else {
|
||||
signaled = ops->fence_signalled(ops, fenced_buf->fence, 0);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr,
|
||||
|
||||
fenced_buffer_remove_locked(fenced_mgr, fenced_buf);
|
||||
|
||||
ret = TRUE;
|
||||
ret = true;
|
||||
|
||||
curr = next;
|
||||
next = curr->next;
|
||||
@@ -470,7 +470,7 @@ fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr)
|
||||
ret = fenced_buffer_copy_storage_to_cpu_locked(fenced_buf);
|
||||
if (ret == PIPE_OK) {
|
||||
fenced_buffer_destroy_gpu_storage_locked(fenced_buf);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
fenced_buffer_destroy_cpu_storage_locked(fenced_buf);
|
||||
}
|
||||
@@ -480,7 +480,7 @@ fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr)
|
||||
next = curr->next;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -552,7 +552,7 @@ fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
fenced_buf->buffer = provider->create_buffer(fenced_mgr->provider,
|
||||
fenced_buf->size,
|
||||
&fenced_buf->desc);
|
||||
return fenced_buf->buffer ? TRUE : FALSE;
|
||||
return fenced_buf->buffer ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
assert(!fenced_buf->buffer);
|
||||
|
||||
/* Check for signaled buffers before trying to allocate. */
|
||||
fenced_manager_check_signalled_locked(fenced_mgr, FALSE);
|
||||
fenced_manager_check_signalled_locked(fenced_mgr, false);
|
||||
|
||||
fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf);
|
||||
|
||||
@@ -576,7 +576,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
* - or buffers are being being swapped out from GPU memory into CPU memory.
|
||||
*/
|
||||
while (!fenced_buf->buffer &&
|
||||
(fenced_manager_check_signalled_locked(fenced_mgr, FALSE) ||
|
||||
(fenced_manager_check_signalled_locked(fenced_mgr, false) ||
|
||||
fenced_manager_free_gpu_storage_locked(fenced_mgr))) {
|
||||
fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf);
|
||||
}
|
||||
@@ -586,7 +586,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
* necessary.
|
||||
*/
|
||||
while (!fenced_buf->buffer &&
|
||||
(fenced_manager_check_signalled_locked(fenced_mgr, TRUE) ||
|
||||
(fenced_manager_check_signalled_locked(fenced_mgr, true) ||
|
||||
fenced_manager_free_gpu_storage_locked(fenced_mgr))) {
|
||||
fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf);
|
||||
}
|
||||
@@ -776,7 +776,7 @@ fenced_buffer_validate(struct pb_buffer *buf,
|
||||
if (!fenced_buf->buffer) {
|
||||
assert(!fenced_buf->mapcount);
|
||||
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE);
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, true);
|
||||
if (ret != PIPE_OK) {
|
||||
goto done;
|
||||
}
|
||||
@@ -920,7 +920,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr,
|
||||
mtx_lock(&fenced_mgr->mutex);
|
||||
|
||||
/* Try to create GPU storage without stalling. */
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, FALSE);
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, false);
|
||||
|
||||
/* Attempt to use CPU memory to avoid stalling the GPU. */
|
||||
if (ret != PIPE_OK) {
|
||||
@@ -929,7 +929,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr,
|
||||
|
||||
/* Create GPU storage, waiting for some to be available. */
|
||||
if (ret != PIPE_OK) {
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE);
|
||||
ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, true);
|
||||
}
|
||||
|
||||
/* Give up. */
|
||||
@@ -959,7 +959,7 @@ fenced_bufmgr_flush(struct pb_manager *mgr)
|
||||
struct fenced_manager *fenced_mgr = fenced_manager(mgr);
|
||||
|
||||
mtx_lock(&fenced_mgr->mutex);
|
||||
while (fenced_manager_check_signalled_locked(fenced_mgr, TRUE))
|
||||
while (fenced_manager_check_signalled_locked(fenced_mgr, true))
|
||||
;
|
||||
mtx_unlock(&fenced_mgr->mutex);
|
||||
|
||||
@@ -983,7 +983,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
|
||||
sched_yield();
|
||||
#endif
|
||||
mtx_lock(&fenced_mgr->mutex);
|
||||
while (fenced_manager_check_signalled_locked(fenced_mgr, TRUE))
|
||||
while (fenced_manager_check_signalled_locked(fenced_mgr, true))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ static inline bool
|
||||
check_random_pattern(const uint8_t *dst, pb_size size,
|
||||
pb_size *min_ofs, pb_size *max_ofs)
|
||||
{
|
||||
bool result = TRUE;
|
||||
bool result = true;
|
||||
pb_size i;
|
||||
*min_ofs = size;
|
||||
*max_ofs = 0;
|
||||
@@ -146,7 +146,7 @@ check_random_pattern(const uint8_t *dst, pb_size size,
|
||||
if(*dst++ != random_pattern[i % sizeof(random_pattern)]) {
|
||||
*min_ofs = MIN2(*min_ofs, i);
|
||||
*max_ofs = MAX2(*max_ofs, i);
|
||||
result = FALSE;
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -69,7 +69,7 @@ pb_validate_add_buffer(struct pb_validate *vl,
|
||||
bool *already_present)
|
||||
{
|
||||
assert(buf);
|
||||
*already_present = FALSE;
|
||||
*already_present = false;
|
||||
if (!buf)
|
||||
return PIPE_ERROR;
|
||||
|
||||
@@ -85,7 +85,7 @@ pb_validate_add_buffer(struct pb_validate *vl,
|
||||
|
||||
assert(entry->buf == buf);
|
||||
entry->flags |= flags;
|
||||
*already_present = TRUE;
|
||||
*already_present = true;
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ pp_celshade_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val)
|
||||
ppq->shaders[n][1] =
|
||||
pp_tgsi_to_state(ppq->p->pipe, celshade, false, "celshade");
|
||||
|
||||
return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE;
|
||||
return (ppq->shaders[n][1] != NULL) ? true : false;
|
||||
}
|
||||
|
||||
/** Free function */
|
||||
|
||||
@@ -65,7 +65,7 @@ pp_nored_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val)
|
||||
ppq->shaders[n][1] =
|
||||
pp_tgsi_to_state(ppq->p->pipe, nored, false, "nored");
|
||||
|
||||
return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE;
|
||||
return (ppq->shaders[n][1] != NULL) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ pp_nogreen_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val)
|
||||
ppq->shaders[n][1] =
|
||||
pp_tgsi_to_state(ppq->p->pipe, nogreen, false, "nogreen");
|
||||
|
||||
return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE;
|
||||
return (ppq->shaders[n][1] != NULL) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ pp_noblue_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val)
|
||||
ppq->shaders[n][1] =
|
||||
pp_tgsi_to_state(ppq->p->pipe, noblue, false, "noblue");
|
||||
|
||||
return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE;
|
||||
return (ppq->shaders[n][1] != NULL) ? true : false;
|
||||
}
|
||||
|
||||
/* Free functions */
|
||||
|
||||
@@ -253,7 +253,7 @@ pp_debug(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (!debug_get_bool_option("PP_DEBUG", FALSE))
|
||||
if (!debug_get_bool_option("PP_DEBUG", false))
|
||||
return;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
@@ -229,7 +229,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
|
||||
|
||||
if (!tmp_text) {
|
||||
pp_debug("Failed to allocate shader space\n");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pp_debug("mlaa: using %u max search steps\n", val);
|
||||
@@ -279,7 +279,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
|
||||
|
||||
FREE(tmp_text);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
|
||||
@@ -291,7 +291,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
|
||||
*/
|
||||
pp_jimenezmlaa_free(ppq, n);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Short wrapper to init the depth version. */
|
||||
|
||||
@@ -134,7 +134,7 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe,
|
||||
const uint semantic_indexes[] = { 0, 0 };
|
||||
p->passvs = util_make_vertex_passthrough_shader(p->pipe, 2,
|
||||
semantic_names,
|
||||
semantic_indexes, FALSE);
|
||||
semantic_indexes, false);
|
||||
}
|
||||
|
||||
p->framebuffer.nr_cbufs = 1;
|
||||
|
||||
@@ -143,7 +143,7 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
|
||||
cso_set_tessctrl_shader_handle(cso, NULL);
|
||||
cso_set_tesseval_shader_handle(cso, NULL);
|
||||
cso_set_geometry_shader_handle(cso, NULL);
|
||||
cso_set_render_condition(cso, NULL, FALSE, 0);
|
||||
cso_set_render_condition(cso, NULL, false, 0);
|
||||
|
||||
// Kept only for this frame.
|
||||
pipe_resource_reference(&ppq->depth, indepth);
|
||||
@@ -259,7 +259,7 @@ pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (tgsi_text_translate(text, tokens, PP_MAX_TOKENS) == FALSE) {
|
||||
if (tgsi_text_translate(text, tokens, PP_MAX_TOKENS) == false) {
|
||||
_debug_printf("pp: Failed to translate a shader for %s\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ renderonly_get_handle(struct renderonly_scanout *scanout,
|
||||
struct winsys_handle *handle)
|
||||
{
|
||||
if (!scanout)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
assert(handle->type == WINSYS_HANDLE_TYPE_KMS);
|
||||
handle->handle = scanout->handle;
|
||||
handle->stride = scanout->stride;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,7 @@ debug_screen_wrap(struct pipe_screen *screen)
|
||||
screen = trace_screen_create(screen);
|
||||
screen = noop_screen_create(screen);
|
||||
|
||||
if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
|
||||
if (debug_get_bool_option("GALLIUM_TESTS", false))
|
||||
util_run_tests(screen);
|
||||
|
||||
return screen;
|
||||
|
||||
@@ -197,7 +197,7 @@ aa_prolog(struct tgsi_transform_context *ctx)
|
||||
*/
|
||||
/* KILL_IF tmp0.w; # if tmp0.w < 0 KILL */
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0,
|
||||
TGSI_SWIZZLE_W, FALSE);
|
||||
TGSI_SWIZZLE_W, false);
|
||||
|
||||
/* If the distance is less than the threshold, the coverage/alpha value
|
||||
* will be greater than one. Clamp to one here.
|
||||
|
||||
@@ -444,7 +444,7 @@ iter_declaration(
|
||||
|
||||
EOL();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -485,7 +485,7 @@ iter_property(
|
||||
}
|
||||
EOL();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -505,7 +505,7 @@ iter_immediate(
|
||||
|
||||
EOL();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -517,7 +517,7 @@ iter_instruction(
|
||||
uint instno = ctx->instno++;
|
||||
const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode );
|
||||
uint i;
|
||||
bool first_reg = TRUE;
|
||||
bool first_reg = true;
|
||||
|
||||
INSTID( instno );
|
||||
TXT( ": " );
|
||||
@@ -547,7 +547,7 @@ iter_instruction(
|
||||
_dump_register_dst( ctx, dst );
|
||||
_dump_writemask( ctx, dst->Register.WriteMask );
|
||||
|
||||
first_reg = FALSE;
|
||||
first_reg = false;
|
||||
}
|
||||
|
||||
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
|
||||
@@ -578,7 +578,7 @@ iter_instruction(
|
||||
if (src->Register.Absolute)
|
||||
CHR( '|' );
|
||||
|
||||
first_reg = FALSE;
|
||||
first_reg = false;
|
||||
}
|
||||
|
||||
if (inst->Instruction.Texture) {
|
||||
@@ -643,7 +643,7 @@ iter_instruction(
|
||||
|
||||
EOL();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -671,7 +671,7 @@ prolog(
|
||||
struct dump_ctx *ctx = (struct dump_ctx *) iter;
|
||||
ENM( iter->processor.Processor, tgsi_processor_type_names );
|
||||
EOL();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -686,7 +686,7 @@ init_dump_ctx(struct dump_ctx *ctx, uint flags)
|
||||
ctx->iter.iterate_property = iter_property;
|
||||
|
||||
if (flags & TGSI_DUMP_FLOAT_AS_HEX)
|
||||
ctx->dump_float_as_hex = TRUE;
|
||||
ctx->dump_float_as_hex = true;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -159,7 +159,7 @@ remove_dynamic_indexes(struct tgsi_transform_context *ctx,
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
|
||||
for (i = 0; i < dc->num_iterations; i++) {
|
||||
bool out_of_bound_index = FALSE;
|
||||
bool out_of_bound_index = false;
|
||||
/**
|
||||
* Make sure we are not exceeding index limit of constant buffer
|
||||
*
|
||||
@@ -178,7 +178,7 @@ remove_dynamic_indexes(struct tgsi_transform_context *ctx,
|
||||
if ((reg->Register.File == TGSI_FILE_CONSTANT) &&
|
||||
(!reg->Register.Indirect &&
|
||||
(reg->Register.Index > dc->const_buf_range[i]))) {
|
||||
out_of_bound_index = TRUE;
|
||||
out_of_bound_index = true;
|
||||
}
|
||||
|
||||
if (!out_of_bound_index) {
|
||||
@@ -279,7 +279,7 @@ dIndexing_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
int i;
|
||||
bool indexing = FALSE;
|
||||
bool indexing = false;
|
||||
struct dIndexing_transform_context *dc = dIndexing_transform_context(ctx);
|
||||
|
||||
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
|
||||
@@ -300,7 +300,7 @@ dIndexing_inst(struct tgsi_transform_context *ctx,
|
||||
dc->num_iterations = dc->num_samplers;
|
||||
|
||||
remove_dynamic_indexes(ctx, inst, src);
|
||||
indexing = TRUE;
|
||||
indexing = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1094,7 +1094,7 @@ tgsi_exec_machine_bind_shader(
|
||||
|
||||
mach->Inputs = inputs;
|
||||
mach->Outputs = outputs;
|
||||
mach->UsedGeometryShader = TRUE;
|
||||
mach->UsedGeometryShader = true;
|
||||
}
|
||||
|
||||
declarations = (struct tgsi_full_declaration *)
|
||||
@@ -5203,7 +5203,7 @@ exec_instruction(
|
||||
mach->SwitchStackTop = 0;
|
||||
mach->BreakStackTop = 0;
|
||||
*pc = -1;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(mach->CallStackTop > 0);
|
||||
@@ -5586,19 +5586,19 @@ exec_instruction(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_NONE, FALSE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_NONE, false);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE_B:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS, FALSE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS, false);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE_C:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_NONE, TRUE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_NONE, true);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE_C_LZ:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_LEVEL_ZERO, TRUE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_LEVEL_ZERO, true);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE_D:
|
||||
@@ -5606,11 +5606,11 @@ exec_instruction(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE_L:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, FALSE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, false);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_GATHER4:
|
||||
exec_sample(mach, inst, TEX_MODIFIER_GATHER, FALSE);
|
||||
exec_sample(mach, inst, TEX_MODIFIER_GATHER, false);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SVIEWINFO:
|
||||
@@ -5815,7 +5815,7 @@ exec_instruction(
|
||||
break;
|
||||
case TGSI_OPCODE_BARRIER:
|
||||
case TGSI_OPCODE_MEMBAR:
|
||||
return TRUE;
|
||||
return true;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_I64ABS:
|
||||
@@ -5940,7 +5940,7 @@ exec_instruction(
|
||||
default:
|
||||
assert( 0 );
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -36,7 +36,7 @@ tgsi_iterate_shader(
|
||||
struct tgsi_parse_context parse;
|
||||
|
||||
if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
ctx->processor = parse.FullHeader.Processor;
|
||||
|
||||
@@ -82,9 +82,9 @@ tgsi_iterate_shader(
|
||||
goto fail;
|
||||
|
||||
tgsi_parse_free( &parse );
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
fail:
|
||||
tgsi_parse_free( &parse );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "tgsi_iterate.h"
|
||||
|
||||
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", FALSE)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", false)
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -192,9 +192,9 @@ check_file_name(
|
||||
{
|
||||
if (file <= TGSI_FILE_NULL || file >= TGSI_FILE_COUNT) {
|
||||
report_error( ctx, "(%u): Invalid register file name", file );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -205,7 +205,7 @@ is_register_declared(
|
||||
void *data = cso_hash_find_data_from_template(
|
||||
&ctx->regs_decl, scan_register_key(reg),
|
||||
(void*)reg, sizeof(scan_register));
|
||||
return data ? TRUE : FALSE;
|
||||
return data ? true : false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -219,11 +219,11 @@ is_any_register_declared(
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
|
||||
if (reg->file == file)
|
||||
return TRUE;
|
||||
return true;
|
||||
iter = cso_hash_iter_next(iter);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -234,7 +234,7 @@ is_register_used(
|
||||
void *data = cso_hash_find_data_from_template(
|
||||
&ctx->regs_used, scan_register_key(reg),
|
||||
reg, sizeof(scan_register));
|
||||
return data ? TRUE : FALSE;
|
||||
return data ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ check_register_usage(
|
||||
{
|
||||
if (!check_file_name( ctx, reg->file )) {
|
||||
FREE(reg);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (indirect_access) {
|
||||
@@ -300,7 +300,7 @@ check_register_usage(
|
||||
else
|
||||
FREE(reg);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -322,7 +322,7 @@ iter_instruction(
|
||||
info = tgsi_get_opcode_info( inst->Instruction.Opcode );
|
||||
if (!info) {
|
||||
report_error( ctx, "(%u): Invalid instruction opcode", inst->Instruction.Opcode );
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (info->num_dst != inst->Instruction.NumDstRegs) {
|
||||
@@ -343,7 +343,7 @@ iter_instruction(
|
||||
ctx,
|
||||
reg,
|
||||
"destination",
|
||||
FALSE );
|
||||
false );
|
||||
if (!inst->Dst[i].Register.WriteMask) {
|
||||
report_error(ctx, "Destination register has empty writemask");
|
||||
}
|
||||
@@ -365,13 +365,13 @@ iter_instruction(
|
||||
ctx,
|
||||
ind_reg,
|
||||
"indirect",
|
||||
FALSE );
|
||||
false );
|
||||
}
|
||||
}
|
||||
|
||||
ctx->num_instructions++;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -406,7 +406,7 @@ iter_declaration(
|
||||
*/
|
||||
file = decl->Declaration.File;
|
||||
if (!check_file_name( ctx, file ))
|
||||
return TRUE;
|
||||
return true;
|
||||
for (i = decl->Range.First; i <= decl->Range.Last; i++) {
|
||||
/* declared TGSI_FILE_INPUT's for geometry and tessellation
|
||||
* have an implied second dimension */
|
||||
@@ -443,7 +443,7 @@ iter_declaration(
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -472,10 +472,10 @@ iter_immediate(
|
||||
imm->Immediate.DataType != TGSI_IMM_UINT32 &&
|
||||
imm->Immediate.DataType != TGSI_IMM_INT32) {
|
||||
report_error( ctx, "(%u): Invalid immediate data type", imm->Immediate.DataType );
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ iter_property(
|
||||
if (iter->processor.Processor == PIPE_SHADER_TESS_CTRL &&
|
||||
prop->Property.PropertyName == TGSI_PROPERTY_TCS_VERTICES_OUT)
|
||||
ctx->implied_out_array_size = prop->u[0].Data;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -503,7 +503,7 @@ prolog(struct tgsi_iterate_context *iter)
|
||||
if (iter->processor.Processor == PIPE_SHADER_TESS_CTRL ||
|
||||
iter->processor.Processor == PIPE_SHADER_TESS_EVAL)
|
||||
ctx->implied_array_size = 32;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -539,7 +539,7 @@ epilog(
|
||||
if (ctx->errors || ctx->warnings)
|
||||
debug_printf( "%u errors, %u warnings\n", ctx->errors, ctx->warnings );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -586,8 +586,8 @@ tgsi_sanity_check(
|
||||
regs_hash_destroy(&ctx.regs_decl);
|
||||
regs_hash_destroy(&ctx.regs_used);
|
||||
regs_hash_destroy(&ctx.regs_ind_used);
|
||||
if (retval == FALSE)
|
||||
return FALSE;
|
||||
if (retval == false)
|
||||
return false;
|
||||
|
||||
return ctx.errors == 0;
|
||||
}
|
||||
|
||||
@@ -191,26 +191,26 @@ scan_src_operand(struct tgsi_shader_info *info,
|
||||
case TGSI_INTERPOLATE_PERSPECTIVE:
|
||||
switch (info->input_interpolate_loc[input]) {
|
||||
case TGSI_INTERPOLATE_LOC_CENTER:
|
||||
info->uses_persp_center = TRUE;
|
||||
info->uses_persp_center = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_CENTROID:
|
||||
info->uses_persp_centroid = TRUE;
|
||||
info->uses_persp_centroid = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_SAMPLE:
|
||||
info->uses_persp_sample = TRUE;
|
||||
info->uses_persp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LINEAR:
|
||||
switch (info->input_interpolate_loc[input]) {
|
||||
case TGSI_INTERPOLATE_LOC_CENTER:
|
||||
info->uses_linear_center = TRUE;
|
||||
info->uses_linear_center = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_CENTROID:
|
||||
info->uses_linear_centroid = TRUE;
|
||||
info->uses_linear_centroid = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_SAMPLE:
|
||||
info->uses_linear_sample = TRUE;
|
||||
info->uses_linear_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -303,7 +303,7 @@ scan_src_operand(struct tgsi_shader_info *info,
|
||||
}
|
||||
|
||||
if (tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store) {
|
||||
info->writes_memory = TRUE;
|
||||
info->writes_memory = true;
|
||||
|
||||
if (src->Register.File == TGSI_FILE_IMAGE) {
|
||||
if (src->Register.Indirect)
|
||||
@@ -451,13 +451,13 @@ scan_instruction(struct tgsi_shader_info *info,
|
||||
case TGSI_INTERPOLATE_PERSPECTIVE:
|
||||
switch (fullinst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_INTERP_CENTROID:
|
||||
info->uses_persp_opcode_interp_centroid = TRUE;
|
||||
info->uses_persp_opcode_interp_centroid = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_OFFSET:
|
||||
info->uses_persp_opcode_interp_offset = TRUE;
|
||||
info->uses_persp_opcode_interp_offset = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_SAMPLE:
|
||||
info->uses_persp_opcode_interp_sample = TRUE;
|
||||
info->uses_persp_opcode_interp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -465,13 +465,13 @@ scan_instruction(struct tgsi_shader_info *info,
|
||||
case TGSI_INTERPOLATE_LINEAR:
|
||||
switch (fullinst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_INTERP_CENTROID:
|
||||
info->uses_linear_opcode_interp_centroid = TRUE;
|
||||
info->uses_linear_opcode_interp_centroid = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_OFFSET:
|
||||
info->uses_linear_opcode_interp_offset = TRUE;
|
||||
info->uses_linear_opcode_interp_offset = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_SAMPLE:
|
||||
info->uses_linear_opcode_interp_sample = TRUE;
|
||||
info->uses_linear_opcode_interp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -486,7 +486,7 @@ scan_instruction(struct tgsi_shader_info *info,
|
||||
fullinst->Instruction.Opcode == TGSI_OPCODE_D2I64 ||
|
||||
fullinst->Instruction.Opcode == TGSI_OPCODE_U642D ||
|
||||
fullinst->Instruction.Opcode == TGSI_OPCODE_I642D)
|
||||
info->uses_doubles = TRUE;
|
||||
info->uses_doubles = true;
|
||||
|
||||
for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) {
|
||||
scan_src_operand(info, fullinst, &fullinst->Src[i], i,
|
||||
@@ -566,7 +566,7 @@ scan_instruction(struct tgsi_shader_info *info,
|
||||
assert(fullinst->Instruction.Opcode == TGSI_OPCODE_STORE);
|
||||
|
||||
is_mem_inst = true;
|
||||
info->writes_memory = TRUE;
|
||||
info->writes_memory = true;
|
||||
|
||||
if (dst->Register.File == TGSI_FILE_IMAGE) {
|
||||
if (fullinst->Memory.Texture == TGSI_TEXTURE_2D_MSAA ||
|
||||
@@ -695,34 +695,34 @@ scan_declaration(struct tgsi_shader_info *info,
|
||||
|
||||
switch (semName) {
|
||||
case TGSI_SEMANTIC_INSTANCEID:
|
||||
info->uses_instanceid = TRUE;
|
||||
info->uses_instanceid = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_VERTEXID:
|
||||
info->uses_vertexid = TRUE;
|
||||
info->uses_vertexid = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_VERTEXID_NOBASE:
|
||||
info->uses_vertexid_nobase = TRUE;
|
||||
info->uses_vertexid_nobase = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_BASEVERTEX:
|
||||
info->uses_basevertex = TRUE;
|
||||
info->uses_basevertex = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_DRAWID:
|
||||
info->uses_drawid = TRUE;
|
||||
info->uses_drawid = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_PRIMID:
|
||||
info->uses_primid = TRUE;
|
||||
info->uses_primid = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_INVOCATIONID:
|
||||
info->uses_invocationid = TRUE;
|
||||
info->uses_invocationid = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_POSITION:
|
||||
info->reads_position = TRUE;
|
||||
info->reads_position = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_FACE:
|
||||
info->uses_frontface = TRUE;
|
||||
info->uses_frontface = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_SAMPLEMASK:
|
||||
info->reads_samplemask = TRUE;
|
||||
info->reads_samplemask = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_TESSINNER:
|
||||
case TGSI_SEMANTIC_TESSOUTER:
|
||||
|
||||
@@ -75,7 +75,7 @@ streq_nocase_uprcase(const char *str1,
|
||||
{
|
||||
while (*str1 && *str2) {
|
||||
if (*str1 != uprcase(*str2))
|
||||
return FALSE;
|
||||
return false;
|
||||
str1++;
|
||||
str2++;
|
||||
}
|
||||
@@ -97,9 +97,9 @@ static bool str_match_no_case( const char **pcur, const char *str )
|
||||
}
|
||||
if (*str == '\0') {
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Return TRUE if both strings match.
|
||||
@@ -115,9 +115,9 @@ static bool str_match_nocase_whole( const char **pcur, const char *str )
|
||||
if (str_match_no_case(&cur, str) &&
|
||||
!is_digit_alpha_underscore(cur)) {
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Return the array index that matches starting at *pcur, where the string at
|
||||
@@ -187,9 +187,9 @@ static bool parse_uint( const char **pcur, uint *val )
|
||||
while (is_digit( cur ))
|
||||
*val = *val * 10 + *cur++ - '0';
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool parse_int( const char **pcur, int *val )
|
||||
@@ -203,10 +203,10 @@ static bool parse_int( const char **pcur, int *val )
|
||||
if (parse_uint(&cur, (uint *)val)) {
|
||||
*val *= sign;
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool parse_identifier( const char **pcur, char *ret, size_t len )
|
||||
@@ -217,14 +217,14 @@ static bool parse_identifier( const char **pcur, char *ret, size_t len )
|
||||
ret[i++] = *cur++;
|
||||
while (is_alpha_underscore( cur ) || is_digit( cur )) {
|
||||
if (i == len - 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
ret[i++] = *cur++;
|
||||
}
|
||||
ret[i++] = '\0';
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Parse floating point.
|
||||
@@ -234,8 +234,8 @@ static bool parse_float( const char **pcur, float *val )
|
||||
const char *cur = *pcur;
|
||||
*val = _mesa_strtof(cur, (char**)pcur);
|
||||
if (*pcur == cur)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_double( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
@@ -248,12 +248,12 @@ static bool parse_double( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
|
||||
v.dval = _mesa_strtod(cur, (char**)pcur);
|
||||
if (*pcur == cur)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*val0 = v.uval[0];
|
||||
*val1 = v.uval[1];
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
@@ -266,12 +266,12 @@ static bool parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
|
||||
v.i64val = strtoll(cur, (char**)pcur, 0);
|
||||
if (*pcur == cur)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*val0 = v.uval[0];
|
||||
*val1 = v.uval[1];
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
@@ -284,12 +284,12 @@ static bool parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1)
|
||||
|
||||
v.u64val = strtoull(cur, (char**)pcur, 0);
|
||||
if (*pcur == cur)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*val0 = v.uval[0];
|
||||
*val1 = v.uval[1];
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct translate_ctx
|
||||
@@ -347,20 +347,20 @@ static bool parse_header( struct translate_ctx *ctx )
|
||||
processor = PIPE_SHADER_COMPUTE;
|
||||
else {
|
||||
report_error( ctx, "Unknown header" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ctx->tokens_cur >= ctx->tokens_end)
|
||||
return FALSE;
|
||||
return false;
|
||||
ctx->header = (struct tgsi_header *) ctx->tokens_cur++;
|
||||
*ctx->header = tgsi_build_header();
|
||||
|
||||
if (ctx->tokens_cur >= ctx->tokens_end)
|
||||
return FALSE;
|
||||
return false;
|
||||
*(struct tgsi_processor *) ctx->tokens_cur++ = tgsi_build_processor( processor, ctx->header );
|
||||
ctx->processor = processor;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_label( struct translate_ctx *ctx, uint *val )
|
||||
@@ -372,10 +372,10 @@ static bool parse_label( struct translate_ctx *ctx, uint *val )
|
||||
if (*cur == ':') {
|
||||
cur++;
|
||||
ctx->cur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -389,10 +389,10 @@ parse_file( const char **pcur, uint *file )
|
||||
if (str_match_nocase_whole( &cur, tgsi_file_name(i) )) {
|
||||
*pcur = cur;
|
||||
*file = i;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -427,7 +427,7 @@ parse_opt_writemask(
|
||||
|
||||
if (*writemask == TGSI_WRITEMASK_NONE) {
|
||||
report_error( ctx, "Writemask expected" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx->cur = cur;
|
||||
@@ -435,7 +435,7 @@ parse_opt_writemask(
|
||||
else {
|
||||
*writemask = TGSI_WRITEMASK_XYZW;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -448,15 +448,15 @@ parse_register_file_bracket(
|
||||
{
|
||||
if (!parse_file( &ctx->cur, file )) {
|
||||
report_error( ctx, "Unknown register file" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != '[') {
|
||||
report_error( ctx, "Expected `['" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <register_file_bracket_index> ::= <register_file_bracket> <uint>
|
||||
@@ -470,14 +470,14 @@ parse_register_file_bracket_index(
|
||||
uint uindex;
|
||||
|
||||
if (!parse_register_file_bracket( ctx, file ))
|
||||
return FALSE;
|
||||
return false;
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (!parse_uint( &ctx->cur, &uindex )) {
|
||||
report_error( ctx, "Expected literal unsigned integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
*index = (int) uindex;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Parse simple 1d register operand.
|
||||
@@ -489,14 +489,14 @@ parse_register_1d(struct translate_ctx *ctx,
|
||||
int *index )
|
||||
{
|
||||
if (!parse_register_file_bracket_index( ctx, file, index ))
|
||||
return FALSE;
|
||||
return false;
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != ']') {
|
||||
report_error( ctx, "Expected `]'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct parsed_bracket {
|
||||
@@ -525,7 +525,7 @@ parse_register_bracket(
|
||||
if (parse_file( &cur, &brackets->ind_file )) {
|
||||
if (!parse_register_1d( ctx, &brackets->ind_file,
|
||||
&brackets->ind_index ))
|
||||
return FALSE;
|
||||
return false;
|
||||
eat_opt_white( &ctx->cur );
|
||||
|
||||
if (*ctx->cur == '.') {
|
||||
@@ -547,7 +547,7 @@ parse_register_bracket(
|
||||
break;
|
||||
default:
|
||||
report_error(ctx, "Expected indirect register swizzle component `x', `y', `z' or `w'");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
eat_opt_white(&ctx->cur);
|
||||
@@ -561,7 +561,7 @@ parse_register_bracket(
|
||||
else {
|
||||
if (!parse_uint( &ctx->cur, &uindex )) {
|
||||
report_error( ctx, "Expected literal unsigned integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
brackets->index = (int) uindex;
|
||||
brackets->ind_file = TGSI_FILE_NULL;
|
||||
@@ -570,7 +570,7 @@ parse_register_bracket(
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != ']') {
|
||||
report_error( ctx, "Expected `]'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
if (*ctx->cur == '(') {
|
||||
@@ -578,16 +578,16 @@ parse_register_bracket(
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (!parse_uint( &ctx->cur, &brackets->ind_array )) {
|
||||
report_error( ctx, "Expected literal unsigned integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != ')') {
|
||||
report_error( ctx, "Expected `)'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -606,12 +606,12 @@ parse_opt_register_src_bracket(
|
||||
ctx->cur = cur;
|
||||
|
||||
if (!parse_register_bracket(ctx, brackets))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*parsed_brackets = 1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -629,11 +629,11 @@ parse_register_src(
|
||||
{
|
||||
brackets->ind_comp = TGSI_SWIZZLE_X;
|
||||
if (!parse_register_file_bracket( ctx, file ))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_register_bracket( ctx, brackets ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct parsed_dcl_bracket {
|
||||
@@ -660,7 +660,7 @@ parse_register_dcl_bracket(
|
||||
goto cleanup;
|
||||
}
|
||||
report_error( ctx, "Expected literal unsigned integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
bracket->first = uindex;
|
||||
|
||||
@@ -673,7 +673,7 @@ parse_register_dcl_bracket(
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (!parse_uint( &ctx->cur, &uindex )) {
|
||||
report_error( ctx, "Expected literal integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
bracket->last = (int) uindex;
|
||||
eat_opt_white( &ctx->cur );
|
||||
@@ -685,10 +685,10 @@ parse_register_dcl_bracket(
|
||||
cleanup:
|
||||
if (*ctx->cur != ']') {
|
||||
report_error( ctx, "Expected `]' or `..'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Parse register declaration.
|
||||
@@ -707,9 +707,9 @@ parse_register_dcl(
|
||||
*num_brackets = 0;
|
||||
|
||||
if (!parse_register_file_bracket( ctx, file ))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_register_dcl_bracket( ctx, &brackets[0] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*num_brackets = 1;
|
||||
|
||||
@@ -723,7 +723,7 @@ parse_register_dcl(
|
||||
++cur;
|
||||
ctx->cur = cur;
|
||||
if (!parse_register_dcl_bracket( ctx, &brackets[1] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
/* for geometry shader we don't really care about
|
||||
* the first brackets it's always the size of the
|
||||
* input primitive. so we want to declare just
|
||||
@@ -741,7 +741,7 @@ parse_register_dcl(
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -754,11 +754,11 @@ parse_register_dst(
|
||||
{
|
||||
brackets->ind_comp = TGSI_SWIZZLE_X;
|
||||
if (!parse_register_file_bracket( ctx, file ))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_register_bracket( ctx, brackets ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -773,15 +773,15 @@ parse_dst_operand(
|
||||
int parsed_opt_brackets;
|
||||
|
||||
if (!parse_register_dst( ctx, &file, &bracket[0] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
cur = ctx->cur;
|
||||
eat_opt_white( &cur );
|
||||
|
||||
if (!parse_opt_writemask( ctx, &writemask ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
dst->Register.File = file;
|
||||
if (parsed_opt_brackets) {
|
||||
@@ -808,7 +808,7 @@ parse_dst_operand(
|
||||
dst->Indirect.Swizzle = bracket[0].ind_comp;
|
||||
dst->Indirect.ArrayID = bracket[0].ind_array;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -820,7 +820,7 @@ parse_optional_swizzle(
|
||||
{
|
||||
const char *cur = ctx->cur;
|
||||
|
||||
*parsed_swizzle = FALSE;
|
||||
*parsed_swizzle = false;
|
||||
|
||||
eat_opt_white( &cur );
|
||||
if (*cur == '.') {
|
||||
@@ -839,14 +839,14 @@ parse_optional_swizzle(
|
||||
swizzle[i] = TGSI_SWIZZLE_W;
|
||||
else {
|
||||
report_error( ctx, "Expected register swizzle component `x', `y', `z' or `w'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur++;
|
||||
}
|
||||
*parsed_swizzle = TRUE;
|
||||
*parsed_swizzle = true;
|
||||
ctx->cur = cur;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -873,9 +873,9 @@ parse_src_operand(
|
||||
}
|
||||
|
||||
if (!parse_register_src(ctx, &file, &bracket[0]))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
src->Register.File = file;
|
||||
if (parsed_opt_brackets) {
|
||||
@@ -916,13 +916,13 @@ parse_src_operand(
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != '|') {
|
||||
report_error( ctx, "Expected `|'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -936,7 +936,7 @@ parse_texoffset_operand(
|
||||
struct parsed_bracket bracket;
|
||||
|
||||
if (!parse_register_src(ctx, &file, &bracket))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
src->File = file;
|
||||
src->Index = bracket.index;
|
||||
@@ -951,7 +951,7 @@ parse_texoffset_operand(
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -968,7 +968,7 @@ match_inst(const char **pcur,
|
||||
*pcur = cur;
|
||||
*saturate = 0;
|
||||
*precise = 0;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (str_match_no_case(&cur, mnemonic)) {
|
||||
@@ -984,10 +984,10 @@ match_inst(const char **pcur,
|
||||
}
|
||||
|
||||
if (!is_digit_alpha_underscore(cur))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1028,7 +1028,7 @@ parse_instruction(
|
||||
report_error( ctx, "Unknown opcode" );
|
||||
else
|
||||
report_error( ctx, "Expected `DCL', `IMM' or a label" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inst.Instruction.Opcode = i;
|
||||
@@ -1063,7 +1063,7 @@ parse_instruction(
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != ',') {
|
||||
report_error( ctx, "Expected `,'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
eat_opt_white( &ctx->cur );
|
||||
@@ -1071,11 +1071,11 @@ parse_instruction(
|
||||
|
||||
if (i < info->num_dst) {
|
||||
if (!parse_dst_operand( ctx, &inst.Dst[i] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (i < info->num_dst + info->num_src) {
|
||||
if (!parse_src_operand( ctx, &inst.Src[i - info->num_dst] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
uint j;
|
||||
@@ -1089,7 +1089,7 @@ parse_instruction(
|
||||
}
|
||||
if (j == TGSI_TEXTURE_COUNT) {
|
||||
report_error( ctx, "Expected texture target" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ parse_instruction(
|
||||
eat_opt_white( &cur );
|
||||
ctx->cur = cur;
|
||||
if (!parse_texoffset_operand( ctx, &inst.TexOffsets[i] ))
|
||||
return FALSE;
|
||||
return false;
|
||||
cur = ctx->cur;
|
||||
eat_opt_white( &cur );
|
||||
}
|
||||
@@ -1139,7 +1139,7 @@ parse_instruction(
|
||||
|
||||
ctx->cur = cur;
|
||||
report_error(ctx, "Expected memory qualifier, texture target, or format\n");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
cur = ctx->cur;
|
||||
@@ -1151,7 +1151,7 @@ parse_instruction(
|
||||
eat_opt_white( &cur );
|
||||
if (!parse_uint( &cur, &target )) {
|
||||
report_error( ctx, "Expected a label" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
inst.Instruction.Label = 1;
|
||||
inst.Label.Label = target;
|
||||
@@ -1164,10 +1164,10 @@ parse_instruction(
|
||||
ctx->header,
|
||||
(uint) (ctx->tokens_end - ctx->tokens_cur) );
|
||||
if (advance == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
ctx->tokens_cur += advance;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* parses a 4-touple of the form {x, y, z, w}
|
||||
@@ -1181,7 +1181,7 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type,
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != '{') {
|
||||
report_error( ctx, "Expected `{'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -1189,7 +1189,7 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type,
|
||||
if (i > 0) {
|
||||
if (*ctx->cur != ',') {
|
||||
report_error( ctx, "Expected `,'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
eat_opt_white( &ctx->cur );
|
||||
@@ -1219,23 +1219,23 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type,
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
report_error( ctx, "Expected immediate constant" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != '}') {
|
||||
report_error( ctx, "Expected `}'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ctx->cur++;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_declaration( struct translate_ctx *ctx )
|
||||
@@ -1251,12 +1251,12 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
|
||||
if (!eat_white( &ctx->cur )) {
|
||||
report_error( ctx, "Syntax error" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!parse_register_dcl( ctx, &file, brackets, &num_brackets))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (!parse_opt_writemask( ctx, &writemask ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = file;
|
||||
@@ -1286,18 +1286,18 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
int arrayid;
|
||||
if (*cur2 != '(') {
|
||||
report_error( ctx, "Expected `('" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur2++;
|
||||
eat_opt_white( &cur2 );
|
||||
if (!parse_int( &cur2, &arrayid )) {
|
||||
report_error( ctx, "Expected `,'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eat_opt_white( &cur2 );
|
||||
if (*cur2 != ')') {
|
||||
report_error( ctx, "Expected `)'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur2++;
|
||||
decl.Declaration.Array = 1;
|
||||
@@ -1320,7 +1320,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
}
|
||||
if (i == TGSI_TEXTURE_COUNT) {
|
||||
report_error(ctx, "Expected texture target");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
cur2 = cur;
|
||||
@@ -1356,12 +1356,12 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
}
|
||||
if (i == TGSI_TEXTURE_COUNT) {
|
||||
report_error(ctx, "Expected texture target");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eat_opt_white( &cur );
|
||||
if (*cur != ',') {
|
||||
report_error( ctx, "Expected `,'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
++cur;
|
||||
eat_opt_white( &cur );
|
||||
@@ -1390,7 +1390,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
if (i == TGSI_RETURN_TYPE_COUNT) {
|
||||
if (j == 0 || j > 2) {
|
||||
report_error(ctx, "Expected type name");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
@@ -1455,12 +1455,12 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
eat_opt_white( &cur2 );
|
||||
if (!parse_uint( &cur2, &index )) {
|
||||
report_error( ctx, "Expected literal integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eat_opt_white( &cur2 );
|
||||
if (*cur2 != ']') {
|
||||
report_error( ctx, "Expected `]'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur2++;
|
||||
|
||||
@@ -1492,7 +1492,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
eat_opt_white(&cur);
|
||||
if (*cur != '(') {
|
||||
report_error(ctx, "Expected '('");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur++;
|
||||
|
||||
@@ -1500,14 +1500,14 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
eat_opt_white(&cur);
|
||||
if (!parse_uint(&cur, &stream[i])) {
|
||||
report_error(ctx, "Expected literal integer");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
eat_opt_white(&cur);
|
||||
if (i < 3) {
|
||||
if (*cur != ',') {
|
||||
report_error(ctx, "Expected ','");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur++;
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
|
||||
if (*cur != ')') {
|
||||
report_error(ctx, "Expected ')'");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
cur++;
|
||||
|
||||
@@ -1573,7 +1573,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
ctx->cur = cur;
|
||||
} else {
|
||||
report_error( ctx, "Expected semantic, interpolate attribute, or invariant ");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,10 +1584,10 @@ static bool parse_declaration( struct translate_ctx *ctx )
|
||||
(uint) (ctx->tokens_end - ctx->tokens_cur) );
|
||||
|
||||
if (advance == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
ctx->tokens_cur += advance;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_immediate( struct translate_ctx *ctx )
|
||||
@@ -1604,18 +1604,18 @@ static bool parse_immediate( struct translate_ctx *ctx )
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (!parse_uint( &ctx->cur, &uindex )) {
|
||||
report_error( ctx, "Expected literal unsigned integer" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uindex != ctx->num_immediates) {
|
||||
report_error( ctx, "Immediates must be sorted" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (*ctx->cur != ']') {
|
||||
report_error( ctx, "Expected `]'" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx->cur++;
|
||||
@@ -1623,7 +1623,7 @@ static bool parse_immediate( struct translate_ctx *ctx )
|
||||
|
||||
if (!eat_white( &ctx->cur )) {
|
||||
report_error( ctx, "Syntax error" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
for (type = 0; type < ARRAY_SIZE(tgsi_immediate_type_names); ++type) {
|
||||
if (str_match_nocase_whole(&ctx->cur, tgsi_immediate_type_names[type]))
|
||||
@@ -1631,7 +1631,7 @@ static bool parse_immediate( struct translate_ctx *ctx )
|
||||
}
|
||||
if (type == ARRAY_SIZE(tgsi_immediate_type_names)) {
|
||||
report_error( ctx, "Expected immediate type" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
imm = tgsi_default_full_immediate();
|
||||
@@ -1645,12 +1645,12 @@ static bool parse_immediate( struct translate_ctx *ctx )
|
||||
ctx->header,
|
||||
(uint) (ctx->tokens_end - ctx->tokens_cur) );
|
||||
if (advance == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
ctx->tokens_cur += advance;
|
||||
|
||||
ctx->num_immediates++;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1664,10 +1664,10 @@ parse_primitive( const char **pcur, uint *primitive )
|
||||
if (str_match_nocase_whole( &cur, tgsi_primitive_names[i])) {
|
||||
*primitive = i;
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1681,10 +1681,10 @@ parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin )
|
||||
if (str_match_nocase_whole( &cur, tgsi_fs_coord_origin_names[i])) {
|
||||
*fs_coord_origin = i;
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1698,10 +1698,10 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
|
||||
if (str_match_nocase_whole( &cur, tgsi_fs_coord_pixel_center_names[i])) {
|
||||
*fs_coord_pixel_center = i;
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -1715,10 +1715,10 @@ parse_property_next_shader( const char **pcur, uint *next_shader )
|
||||
if (str_match_nocase_whole( &cur, tgsi_processor_type_names[i])) {
|
||||
*next_shader = i;
|
||||
*pcur = cur;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool parse_property( struct translate_ctx *ctx )
|
||||
@@ -1731,11 +1731,11 @@ static bool parse_property( struct translate_ctx *ctx )
|
||||
|
||||
if (!eat_white( &ctx->cur )) {
|
||||
report_error( ctx, "Syntax error" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!parse_identifier( &ctx->cur, id, sizeof(id) )) {
|
||||
report_error( ctx, "Syntax error" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
for (property_name = 0; property_name < TGSI_PROPERTY_COUNT;
|
||||
++property_name) {
|
||||
@@ -1745,7 +1745,7 @@ static bool parse_property( struct translate_ctx *ctx )
|
||||
}
|
||||
if (property_name >= TGSI_PROPERTY_COUNT) {
|
||||
debug_printf( "\nError: Unknown property : '%s'", id );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
eat_opt_white( &ctx->cur );
|
||||
@@ -1754,7 +1754,7 @@ static bool parse_property( struct translate_ctx *ctx )
|
||||
case TGSI_PROPERTY_GS_OUTPUT_PRIM:
|
||||
if (!parse_primitive(&ctx->cur, &values[0] )) {
|
||||
report_error( ctx, "Unknown primitive name as property!" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (property_name == TGSI_PROPERTY_GS_INPUT_PRIM &&
|
||||
ctx->processor == PIPE_SHADER_GEOMETRY) {
|
||||
@@ -1764,26 +1764,26 @@ static bool parse_property( struct translate_ctx *ctx )
|
||||
case TGSI_PROPERTY_FS_COORD_ORIGIN:
|
||||
if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) {
|
||||
report_error( ctx, "Unknown coord origin as property: must be UPPER_LEFT or LOWER_LEFT!" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
|
||||
if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) {
|
||||
report_error( ctx, "Unknown coord pixel center as property: must be HALF_INTEGER or INTEGER!" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case TGSI_PROPERTY_NEXT_SHADER:
|
||||
if (!parse_property_next_shader(&ctx->cur, &values[0] )) {
|
||||
report_error( ctx, "Unknown next shader property value." );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
|
||||
default:
|
||||
if (!parse_uint(&ctx->cur, &values[0] )) {
|
||||
report_error( ctx, "Expected unsigned integer as property!" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1798,10 +1798,10 @@ static bool parse_property( struct translate_ctx *ctx )
|
||||
ctx->header,
|
||||
(uint) (ctx->tokens_end - ctx->tokens_cur) );
|
||||
if (advance == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
ctx->tokens_cur += advance;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1809,7 +1809,7 @@ static bool translate( struct translate_ctx *ctx )
|
||||
{
|
||||
eat_opt_white( &ctx->cur );
|
||||
if (!parse_header( ctx ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (ctx->processor == PIPE_SHADER_TESS_CTRL ||
|
||||
ctx->processor == PIPE_SHADER_TESS_EVAL)
|
||||
@@ -1819,33 +1819,33 @@ static bool translate( struct translate_ctx *ctx )
|
||||
uint label_val = 0;
|
||||
if (!eat_white( &ctx->cur )) {
|
||||
report_error( ctx, "Syntax error" );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (*ctx->cur == '\0')
|
||||
break;
|
||||
if (parse_label( ctx, &label_val )) {
|
||||
if (!parse_instruction( ctx, TRUE ))
|
||||
return FALSE;
|
||||
if (!parse_instruction( ctx, true ))
|
||||
return false;
|
||||
}
|
||||
else if (str_match_nocase_whole( &ctx->cur, "DCL" )) {
|
||||
if (!parse_declaration( ctx ))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (str_match_nocase_whole( &ctx->cur, "IMM" )) {
|
||||
if (!parse_immediate( ctx ))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (str_match_nocase_whole( &ctx->cur, "PROPERTY" )) {
|
||||
if (!parse_property( ctx ))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (!parse_instruction( ctx, FALSE )) {
|
||||
return FALSE;
|
||||
else if (!parse_instruction( ctx, false )) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1863,7 +1863,7 @@ tgsi_text_translate(
|
||||
ctx.tokens_end = tokens + num_tokens;
|
||||
|
||||
if (!translate( &ctx ))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return tgsi_sanity_check( tokens );
|
||||
}
|
||||
|
||||
@@ -152,8 +152,8 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
uint initial_tokens_len,
|
||||
struct tgsi_transform_context *ctx)
|
||||
{
|
||||
bool first_instruction = TRUE;
|
||||
bool epilog_emitted = FALSE;
|
||||
bool first_instruction = true;
|
||||
bool epilog_emitted = false;
|
||||
int cond_stack = 0;
|
||||
int call_stack = 0;
|
||||
|
||||
@@ -244,7 +244,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
assert(cond_stack == 0);
|
||||
/* Emit caller's epilog */
|
||||
ctx->epilog(ctx);
|
||||
epilog_emitted = TRUE;
|
||||
epilog_emitted = true;
|
||||
}
|
||||
/* Emit END (or RET) */
|
||||
ctx->emit_instruction(ctx, fullinst);
|
||||
@@ -281,7 +281,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
ctx->emit_instruction(ctx, fullinst);
|
||||
}
|
||||
|
||||
first_instruction = FALSE;
|
||||
first_instruction = false;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ tgsi_transform_tex_inst(struct tgsi_transform_context *ctx,
|
||||
inst.Dst[0].Register.File = dst_file;
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
inst.Instruction.Texture = TRUE;
|
||||
inst.Instruction.Texture = true;
|
||||
inst.Texture.Texture = tex_target;
|
||||
tgsi_transform_src_reg_xyzw(&inst.Src[0], src_file, src_index);
|
||||
tgsi_transform_src_reg_xyzw(&inst.Src[1], TGSI_FILE_SAMPLER, sampler_index);
|
||||
|
||||
@@ -489,7 +489,7 @@ ureg_DECL_output_masked(struct ureg_program *ureg,
|
||||
{
|
||||
return ureg_DECL_output_layout(ureg, name, index, 0,
|
||||
ureg->nr_output_regs, usage_mask, array_id,
|
||||
array_size, FALSE);
|
||||
array_size, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -666,12 +666,12 @@ static struct ureg_dst alloc_temporary( struct ureg_program *ureg,
|
||||
|
||||
struct ureg_dst ureg_DECL_temporary( struct ureg_program *ureg )
|
||||
{
|
||||
return alloc_temporary(ureg, FALSE);
|
||||
return alloc_temporary(ureg, false);
|
||||
}
|
||||
|
||||
struct ureg_dst ureg_DECL_local_temporary( struct ureg_program *ureg )
|
||||
{
|
||||
return alloc_temporary(ureg, TRUE);
|
||||
return alloc_temporary(ureg, true);
|
||||
}
|
||||
|
||||
struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *ureg,
|
||||
@@ -853,17 +853,17 @@ match_or_expand_immediate64( const unsigned *v,
|
||||
*swizzle = 0;
|
||||
|
||||
for (i = 0; i < nr; i += 2) {
|
||||
bool found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
for (j = 0; j < nr2 && !found; j += 2) {
|
||||
if (v[i] == v2[j] && v[i + 1] == v2[j + 1]) {
|
||||
*swizzle |= (j << (i * 2)) | ((j + 1) << ((i + 1) * 2));
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if ((nr2) >= 4) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
v2[nr2] = v[i];
|
||||
@@ -877,7 +877,7 @@ match_or_expand_immediate64( const unsigned *v,
|
||||
/* Actually expand immediate only when fully succeeded.
|
||||
*/
|
||||
*pnr2 = nr2;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -899,18 +899,18 @@ match_or_expand_immediate( const unsigned *v,
|
||||
*swizzle = 0;
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
bool found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
for (j = 0; j < nr2 && !found; j++) {
|
||||
if (v[i] == v2[j]) {
|
||||
*swizzle |= j << (i * 2);
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
if (nr2 >= 4) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
v2[nr2] = v[i];
|
||||
@@ -922,7 +922,7 @@ match_or_expand_immediate( const unsigned *v,
|
||||
/* Actually expand immediate only when fully succeeded.
|
||||
*/
|
||||
*pnr2 = nr2;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1414,7 +1414,7 @@ ureg_insn(struct ureg_program *ureg,
|
||||
return;
|
||||
}
|
||||
|
||||
saturate = nr_dst ? dst[0].Saturate : FALSE;
|
||||
saturate = nr_dst ? dst[0].Saturate : false;
|
||||
|
||||
insn = ureg_emit_insn(ureg,
|
||||
opcode,
|
||||
@@ -1452,7 +1452,7 @@ ureg_tex_insn(struct ureg_program *ureg,
|
||||
return;
|
||||
}
|
||||
|
||||
saturate = nr_dst ? dst[0].Saturate : FALSE;
|
||||
saturate = nr_dst ? dst[0].Saturate : false;
|
||||
|
||||
insn = ureg_emit_insn(ureg,
|
||||
opcode,
|
||||
@@ -1493,7 +1493,7 @@ ureg_memory_insn(struct ureg_program *ureg,
|
||||
|
||||
insn = ureg_emit_insn(ureg,
|
||||
opcode,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
nr_dst,
|
||||
nr_src);
|
||||
@@ -1904,7 +1904,7 @@ static void emit_decls( struct ureg_program *ureg )
|
||||
0,
|
||||
TGSI_WRITEMASK_XYZW,
|
||||
ureg->input[i].array_id,
|
||||
FALSE);
|
||||
false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1917,7 +1917,7 @@ static void emit_decls( struct ureg_program *ureg )
|
||||
ureg->input[i].semantic_index +
|
||||
(j - ureg->input[i].first),
|
||||
0,
|
||||
TGSI_WRITEMASK_XYZW, 0, FALSE);
|
||||
TGSI_WRITEMASK_XYZW, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1931,7 +1931,7 @@ static void emit_decls( struct ureg_program *ureg )
|
||||
ureg->system_value[i].semantic_name,
|
||||
ureg->system_value[i].semantic_index,
|
||||
0,
|
||||
TGSI_WRITEMASK_XYZW, 0, FALSE);
|
||||
TGSI_WRITEMASK_XYZW, 0, false);
|
||||
}
|
||||
|
||||
/* While not required by TGSI spec, virglrenderer has a dependency on the
|
||||
|
||||
@@ -631,7 +631,7 @@ static inline void ureg_##op( struct ureg_program *ureg ) \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
insn = ureg_emit_insn(ureg, \
|
||||
opcode, \
|
||||
FALSE, \
|
||||
false, \
|
||||
0, \
|
||||
0, \
|
||||
0); \
|
||||
@@ -646,7 +646,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
insn = ureg_emit_insn(ureg, \
|
||||
opcode, \
|
||||
FALSE, \
|
||||
false, \
|
||||
0, \
|
||||
0, \
|
||||
1); \
|
||||
@@ -662,7 +662,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
insn = ureg_emit_insn(ureg, \
|
||||
opcode, \
|
||||
FALSE, \
|
||||
false, \
|
||||
0, \
|
||||
0, \
|
||||
0); \
|
||||
@@ -679,7 +679,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
insn = ureg_emit_insn(ureg, \
|
||||
opcode, \
|
||||
FALSE, \
|
||||
false, \
|
||||
0, \
|
||||
0, \
|
||||
1); \
|
||||
|
||||
@@ -472,8 +472,8 @@ tgsi_is_shadow_target(enum tgsi_texture_type target)
|
||||
case TGSI_TEXTURE_SHADOW2D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOWCUBE:
|
||||
case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,15 +767,15 @@ is_legal_int_format_combo(const struct util_format_description *src,
|
||||
for (i = 0; i < nr; i++) {
|
||||
/* The signs must match. */
|
||||
if (src->channel[i].type != dst->channel[i].type) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Integers must not lose precision at any point in the pipeline. */
|
||||
if (src->channel[i].size > dst->channel[i].size) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct translate *
|
||||
@@ -850,124 +850,124 @@ bool
|
||||
translate_generic_is_output_format_supported(enum pipe_format format)
|
||||
{
|
||||
switch(format) {
|
||||
case PIPE_FORMAT_R64G64B64A64_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R64G64B64_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R64G64_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R64_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R64G64B64A64_FLOAT: return true;
|
||||
case PIPE_FORMAT_R64G64B64_FLOAT: return true;
|
||||
case PIPE_FORMAT_R64G64_FLOAT: return true;
|
||||
case PIPE_FORMAT_R64_FLOAT: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R32_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_FLOAT: return true;
|
||||
case PIPE_FORMAT_R32G32B32_FLOAT: return true;
|
||||
case PIPE_FORMAT_R32G32_FLOAT: return true;
|
||||
case PIPE_FORMAT_R32_FLOAT: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R16_FLOAT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_FLOAT: return true;
|
||||
case PIPE_FORMAT_R16G16B16_FLOAT: return true;
|
||||
case PIPE_FORMAT_R16G16_FLOAT: return true;
|
||||
case PIPE_FORMAT_R16_FLOAT: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_USCALED: return true;
|
||||
case PIPE_FORMAT_R32G32B32_USCALED: return true;
|
||||
case PIPE_FORMAT_R32G32_USCALED: return true;
|
||||
case PIPE_FORMAT_R32_USCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_SSCALED: return true;
|
||||
case PIPE_FORMAT_R32G32B32_SSCALED: return true;
|
||||
case PIPE_FORMAT_R32G32_SSCALED: return true;
|
||||
case PIPE_FORMAT_R32_SSCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_UNORM: return true;
|
||||
case PIPE_FORMAT_R32G32B32_UNORM: return true;
|
||||
case PIPE_FORMAT_R32G32_UNORM: return true;
|
||||
case PIPE_FORMAT_R32_UNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_SNORM: return true;
|
||||
case PIPE_FORMAT_R32G32B32_SNORM: return true;
|
||||
case PIPE_FORMAT_R32G32_SNORM: return true;
|
||||
case PIPE_FORMAT_R32_SNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_USCALED: return true;
|
||||
case PIPE_FORMAT_R16G16B16_USCALED: return true;
|
||||
case PIPE_FORMAT_R16G16_USCALED: return true;
|
||||
case PIPE_FORMAT_R16_USCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_SSCALED: return true;
|
||||
case PIPE_FORMAT_R16G16B16_SSCALED: return true;
|
||||
case PIPE_FORMAT_R16G16_SSCALED: return true;
|
||||
case PIPE_FORMAT_R16_SSCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_UNORM: return true;
|
||||
case PIPE_FORMAT_R16G16B16_UNORM: return true;
|
||||
case PIPE_FORMAT_R16G16_UNORM: return true;
|
||||
case PIPE_FORMAT_R16_UNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_SNORM: return true;
|
||||
case PIPE_FORMAT_R16G16B16_SNORM: return true;
|
||||
case PIPE_FORMAT_R16G16_SNORM: return true;
|
||||
case PIPE_FORMAT_R16_SNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_USCALED: return true;
|
||||
case PIPE_FORMAT_R8G8B8_USCALED: return true;
|
||||
case PIPE_FORMAT_R8G8_USCALED: return true;
|
||||
case PIPE_FORMAT_R8_USCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_SSCALED: return true;
|
||||
case PIPE_FORMAT_R8G8B8_SSCALED: return true;
|
||||
case PIPE_FORMAT_R8G8_SSCALED: return true;
|
||||
case PIPE_FORMAT_R8_SSCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_UNORM: return true;
|
||||
case PIPE_FORMAT_R8G8B8_UNORM: return true;
|
||||
case PIPE_FORMAT_R8G8_UNORM: return true;
|
||||
case PIPE_FORMAT_R8_UNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_SNORM: return true;
|
||||
case PIPE_FORMAT_R8G8B8_SNORM: return true;
|
||||
case PIPE_FORMAT_R8G8_SNORM: return true;
|
||||
case PIPE_FORMAT_R8_SNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_A8R8G8B8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_A8R8G8B8_UNORM: return true;
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R32_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_UINT: return true;
|
||||
case PIPE_FORMAT_R32G32B32_UINT: return true;
|
||||
case PIPE_FORMAT_R32G32_UINT: return true;
|
||||
case PIPE_FORMAT_R32_UINT: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R16_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_UINT: return true;
|
||||
case PIPE_FORMAT_R16G16B16_UINT: return true;
|
||||
case PIPE_FORMAT_R16G16_UINT: return true;
|
||||
case PIPE_FORMAT_R16_UINT: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R8_UINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_UINT: return true;
|
||||
case PIPE_FORMAT_R8G8B8_UINT: return true;
|
||||
case PIPE_FORMAT_R8G8_UINT: return true;
|
||||
case PIPE_FORMAT_R8_UINT: return true;
|
||||
|
||||
case PIPE_FORMAT_R32G32B32A32_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R32_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R32G32B32A32_SINT: return true;
|
||||
case PIPE_FORMAT_R32G32B32_SINT: return true;
|
||||
case PIPE_FORMAT_R32G32_SINT: return true;
|
||||
case PIPE_FORMAT_R32_SINT: return true;
|
||||
|
||||
case PIPE_FORMAT_R16G16B16A16_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R16_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R16G16B16A16_SINT: return true;
|
||||
case PIPE_FORMAT_R16G16B16_SINT: return true;
|
||||
case PIPE_FORMAT_R16G16_SINT: return true;
|
||||
case PIPE_FORMAT_R16_SINT: return true;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R8_SINT: return TRUE;
|
||||
case PIPE_FORMAT_R8G8B8A8_SINT: return true;
|
||||
case PIPE_FORMAT_R8G8B8_SINT: return true;
|
||||
case PIPE_FORMAT_R8G8_SINT: return true;
|
||||
case PIPE_FORMAT_R8_SINT: return true;
|
||||
|
||||
case PIPE_FORMAT_B10G10R10A2_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_B10G10R10A2_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_B10G10R10A2_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_B10G10R10A2_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_B10G10R10A2_UNORM: return true;
|
||||
case PIPE_FORMAT_B10G10R10A2_USCALED: return true;
|
||||
case PIPE_FORMAT_B10G10R10A2_SNORM: return true;
|
||||
case PIPE_FORMAT_B10G10R10A2_SSCALED: return true;
|
||||
|
||||
case PIPE_FORMAT_R10G10B10A2_UNORM: return TRUE;
|
||||
case PIPE_FORMAT_R10G10B10A2_USCALED: return TRUE;
|
||||
case PIPE_FORMAT_R10G10B10A2_SNORM: return TRUE;
|
||||
case PIPE_FORMAT_R10G10B10A2_SSCALED: return TRUE;
|
||||
case PIPE_FORMAT_R10G10B10A2_UNORM: return true;
|
||||
case PIPE_FORMAT_R10G10B10A2_USCALED: return true;
|
||||
case PIPE_FORMAT_R10G10B10A2_SNORM: return true;
|
||||
case PIPE_FORMAT_R10G10B10A2_SSCALED: return true;
|
||||
|
||||
default: return FALSE;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,9 +232,9 @@ emit_load_sse2(struct translate_sse *p,
|
||||
sse2_movdqu(p->func, data, src);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
const struct util_format_description *output_desc =
|
||||
util_format_description(a->output_format);
|
||||
unsigned i;
|
||||
bool id_swizzle = TRUE;
|
||||
bool id_swizzle = true;
|
||||
unsigned swizzle[4] =
|
||||
{ PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE,
|
||||
PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE };
|
||||
@@ -490,26 +490,26 @@ translate_attr_convert(struct translate_sse *p,
|
||||
|
||||
if (a->output_format == PIPE_FORMAT_NONE
|
||||
|| a->input_format == PIPE_FORMAT_NONE)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (input_desc->channel[0].size & 7)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (input_desc->colorspace != output_desc->colorspace)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
for (i = 1; i < input_desc->nr_channels; ++i) {
|
||||
if (memcmp
|
||||
(&input_desc->channel[i], &input_desc->channel[0],
|
||||
sizeof(input_desc->channel[0])))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 1; i < output_desc->nr_channels; ++i) {
|
||||
if (memcmp
|
||||
(&output_desc->channel[i], &output_desc->channel[0],
|
||||
sizeof(output_desc->channel[0]))) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,14 +536,14 @@ translate_attr_convert(struct translate_sse *p,
|
||||
if (swizzle[i] < 4)
|
||||
needed_chans = MAX2(needed_chans, swizzle[i] + 1);
|
||||
if (swizzle[i] < PIPE_SWIZZLE_0 && swizzle[i] != i)
|
||||
id_swizzle = FALSE;
|
||||
id_swizzle = false;
|
||||
}
|
||||
|
||||
if (needed_chans > 0) {
|
||||
switch (input_desc->channel[0].type) {
|
||||
case UTIL_FORMAT_TYPE_UNSIGNED:
|
||||
if (!(x86_target_caps(p->func) & X86_SSE2))
|
||||
return FALSE;
|
||||
return false;
|
||||
emit_load_sse2(p, dataXMM, src,
|
||||
input_desc->channel[0].size *
|
||||
input_desc->nr_channels >> 3);
|
||||
@@ -575,7 +575,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
sse_andps(p->func, auxXMM, get_const(p, CONST_2147483648));
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
sse2_cvtdq2ps(p->func, dataXMM, dataXMM);
|
||||
if (input_desc->channel[0].size == 32)
|
||||
@@ -606,7 +606,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
break;
|
||||
case UTIL_FORMAT_TYPE_SIGNED:
|
||||
if (!(x86_target_caps(p->func) & X86_SSE2))
|
||||
return FALSE;
|
||||
return false;
|
||||
emit_load_sse2(p, dataXMM, src,
|
||||
input_desc->channel[0].size *
|
||||
input_desc->nr_channels >> 3);
|
||||
@@ -625,7 +625,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
case 32: /* we lose precision here */
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
sse2_cvtdq2ps(p->func, dataXMM, dataXMM);
|
||||
if (input_desc->channel[0].normalized) {
|
||||
@@ -656,7 +656,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
case UTIL_FORMAT_TYPE_FLOAT:
|
||||
if (input_desc->channel[0].size != 32
|
||||
&& input_desc->channel[0].size != 64) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (swizzle[3] == PIPE_SWIZZLE_1
|
||||
&& input_desc->nr_channels <= 3) {
|
||||
@@ -670,16 +670,16 @@ translate_attr_convert(struct translate_sse *p,
|
||||
break;
|
||||
case 64: /* we lose precision here */
|
||||
if (!(x86_target_caps(p->func) & X86_SSE2))
|
||||
return FALSE;
|
||||
return false;
|
||||
emit_load_float64to32(p, dataXMM, src, needed_chans,
|
||||
input_desc->nr_channels);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!id_swizzle) {
|
||||
@@ -751,7 +751,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ((x86_target_caps(p->func) & X86_SSE2)
|
||||
&& input_desc->channel[0].size == 8
|
||||
@@ -780,7 +780,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
if (swizzle[i] < 4)
|
||||
needed_chans = MAX2(needed_chans, swizzle[i] + 1);
|
||||
if (swizzle[i] < PIPE_SWIZZLE_0 && swizzle[i] != i)
|
||||
id_swizzle = FALSE;
|
||||
id_swizzle = false;
|
||||
}
|
||||
|
||||
if (needed_chans > 0) {
|
||||
@@ -909,7 +909,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (!memcmp(&output_desc->channel[0], &input_desc->channel[0],
|
||||
sizeof(output_desc->channel[0]))) {
|
||||
@@ -926,7 +926,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
x86_mov(p->func, tmp, src);
|
||||
x86_bswap(p->func, tmp);
|
||||
x86_mov(p->func, dst, tmp);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
for (i = 0; i < output_desc->nr_channels; ++i) {
|
||||
@@ -943,7 +943,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
v = output_desc->channel[0].normalized ? 0x7f : 1;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v);
|
||||
@@ -968,7 +968,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
v = 0x3c00;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v);
|
||||
@@ -996,7 +996,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
v = 0x3f800000;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v);
|
||||
@@ -1025,7 +1025,7 @@ translate_attr_convert(struct translate_sse *p,
|
||||
l = 0;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l);
|
||||
@@ -1048,10 +1048,10 @@ translate_attr_convert(struct translate_sse *p,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
/* special case for draw's EMIT_4UB (RGBA) and EMIT_4UB_BGRA */
|
||||
else if ((x86_target_caps(p->func) & X86_SSE2) &&
|
||||
@@ -1076,10 +1076,10 @@ translate_attr_convert(struct translate_sse *p,
|
||||
sse2_packuswb(p->func, dataXMM, dataXMM);
|
||||
sse2_movd(p->func, dst, dataXMM);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1090,7 +1090,7 @@ translate_attr(struct translate_sse *p,
|
||||
{
|
||||
if (a->input_format == a->output_format) {
|
||||
emit_memcpy(p, dst, src, util_format_get_stride(a->input_format, 1));
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return translate_attr_convert(p, a, src, dst);
|
||||
@@ -1185,7 +1185,7 @@ init_inputs(struct translate_sse *p, unsigned index_size)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1296,7 +1296,7 @@ incr_inputs(struct translate_sse *p, unsigned index_size)
|
||||
x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1420,7 +1420,7 @@ build_vertex_emit(struct translate_sse *p,
|
||||
if (!translate_attr(p, a,
|
||||
x86_make_disp(vb, a->input_offset),
|
||||
x86_make_disp(p->outbuf_EBX, a->output_offset)))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Next output vertex:
|
||||
@@ -1466,7 +1466,7 @@ build_vertex_emit(struct translate_sse *p,
|
||||
}
|
||||
x86_ret(p->func);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1534,7 +1534,7 @@ translate_sse2_create(const struct translate_key *key)
|
||||
MAX2(p->nr_buffers, key->element[i].input_buffer + 1);
|
||||
|
||||
if (key->element[i].instance_divisor) {
|
||||
p->use_instancing = TRUE;
|
||||
p->use_instancing = true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -96,10 +96,10 @@ util_bitmask_resize(struct util_bitmask *bm,
|
||||
|
||||
/* Check integer overflow */
|
||||
if (!minimum_size)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bm->size >= minimum_size)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0);
|
||||
new_size = bm->size;
|
||||
@@ -107,7 +107,7 @@ util_bitmask_resize(struct util_bitmask *bm,
|
||||
new_size *= 2;
|
||||
/* Check integer overflow */
|
||||
if (new_size < bm->size)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
assert(new_size);
|
||||
assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0);
|
||||
@@ -117,7 +117,7 @@ util_bitmask_resize(struct util_bitmask *bm,
|
||||
bm->size / UTIL_BITMASK_BITS_PER_BYTE,
|
||||
new_size / UTIL_BITMASK_BITS_PER_BYTE);
|
||||
if (!new_words)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD,
|
||||
0,
|
||||
@@ -126,7 +126,7 @@ util_bitmask_resize(struct util_bitmask *bm,
|
||||
bm->size = new_size;
|
||||
bm->words = new_words;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -261,18 +261,18 @@ util_bitmask_get(struct util_bitmask *bm,
|
||||
|
||||
if (index < bm->filled) {
|
||||
assert(bm->words[word] & mask);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (index >= bm->size)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bm->words[word] & mask) {
|
||||
util_bitmask_filled_set(bm, index);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -228,9 +228,9 @@ u_box_test_intersection_2d(const struct pipe_box *a,
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
if (a_l[i] > b_r[i] || a_r[i] < b_l[i])
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
||||
@@ -227,16 +227,16 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags)
|
||||
*/
|
||||
if (fbuf->has_sync_map && !map_sync) {
|
||||
debug_flush_alert("Recursive sync map detected.", "Map",
|
||||
2, fbuf->bt_depth, TRUE, TRUE, NULL);
|
||||
debug_flush_alert(NULL, "Previous map", 0, fbuf->bt_depth, FALSE,
|
||||
FALSE, fbuf->maps[fbuf->last_sync_map].frame);
|
||||
2, fbuf->bt_depth, true, true, NULL);
|
||||
debug_flush_alert(NULL, "Previous map", 0, fbuf->bt_depth, false,
|
||||
false, fbuf->maps[fbuf->last_sync_map].frame);
|
||||
}
|
||||
|
||||
fbuf->maps[fbuf->map_count].frame =
|
||||
debug_flush_capture_frame(1, fbuf->bt_depth);
|
||||
fbuf->maps[fbuf->map_count].persistent = persistent;
|
||||
if (!persistent) {
|
||||
fbuf->has_sync_map = TRUE;
|
||||
fbuf->has_sync_map = true;
|
||||
fbuf->last_sync_map = fbuf->map_count;
|
||||
}
|
||||
|
||||
@@ -255,9 +255,9 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags)
|
||||
|
||||
if (item && fctx->catch_map_of_referenced) {
|
||||
debug_flush_alert("Already referenced map detected.",
|
||||
"Map", 2, fbuf->bt_depth, TRUE, TRUE, NULL);
|
||||
"Map", 2, fbuf->bt_depth, true, true, NULL);
|
||||
debug_flush_alert(NULL, "Reference", 0, item->bt_depth,
|
||||
FALSE, FALSE, item->ref_frame);
|
||||
false, false, item->ref_frame);
|
||||
}
|
||||
}
|
||||
simple_mtx_unlock(&list_mutex);
|
||||
@@ -273,15 +273,15 @@ debug_flush_unmap(struct debug_flush_buf *fbuf)
|
||||
mtx_lock(&fbuf->mutex);
|
||||
if (--fbuf->map_count < 0) {
|
||||
debug_flush_alert("Unmap not previously mapped detected.", "Map",
|
||||
2, fbuf->bt_depth, FALSE, TRUE, NULL);
|
||||
2, fbuf->bt_depth, false, true, NULL);
|
||||
} else {
|
||||
if (fbuf->has_sync_map && fbuf->last_sync_map == fbuf->map_count) {
|
||||
int i = fbuf->map_count;
|
||||
|
||||
fbuf->has_sync_map = FALSE;
|
||||
fbuf->has_sync_map = false;
|
||||
while (i-- && !fbuf->has_sync_map) {
|
||||
if (!fbuf->maps[i].persistent) {
|
||||
fbuf->has_sync_map = TRUE;
|
||||
fbuf->has_sync_map = true;
|
||||
fbuf->last_sync_map = i;
|
||||
}
|
||||
}
|
||||
@@ -312,9 +312,9 @@ debug_flush_cb_reference(struct debug_flush_ctx *fctx,
|
||||
mtx_lock(&fbuf->mutex);
|
||||
if (fbuf->map_count && fbuf->has_sync_map) {
|
||||
debug_flush_alert("Reference of mapped buffer detected.", "Reference",
|
||||
2, fctx->bt_depth, TRUE, TRUE, NULL);
|
||||
debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, FALSE,
|
||||
FALSE, fbuf->maps[fbuf->last_sync_map].frame);
|
||||
2, fctx->bt_depth, true, true, NULL);
|
||||
debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, false,
|
||||
false, fbuf->maps[fbuf->last_sync_map].frame);
|
||||
}
|
||||
mtx_unlock(&fbuf->mutex);
|
||||
|
||||
@@ -352,11 +352,11 @@ debug_flush_might_flush_cb(UNUSED void *key, void *value, void *data)
|
||||
snprintf(message, sizeof(message),
|
||||
"%s referenced mapped buffer detected.", reason);
|
||||
|
||||
debug_flush_alert(message, reason, 3, item->bt_depth, TRUE, TRUE, NULL);
|
||||
debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, TRUE, FALSE,
|
||||
debug_flush_alert(message, reason, 3, item->bt_depth, true, true, NULL);
|
||||
debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, true, false,
|
||||
fbuf->maps[fbuf->last_sync_map].frame);
|
||||
debug_flush_alert(NULL, "First reference", 0, item->bt_depth, FALSE,
|
||||
FALSE, item->ref_frame);
|
||||
debug_flush_alert(NULL, "First reference", 0, item->bt_depth, false,
|
||||
false, item->ref_frame);
|
||||
}
|
||||
mtx_unlock(&fbuf->mutex);
|
||||
|
||||
|
||||
@@ -242,55 +242,55 @@ util_dump_format(FILE *stream, enum pipe_format format)
|
||||
static void
|
||||
util_dump_enum_blend_factor(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_blend_factor(value, TRUE));
|
||||
util_dump_enum(stream, util_str_blend_factor(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_blend_func(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_blend_func(value, TRUE));
|
||||
util_dump_enum(stream, util_str_blend_func(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_func(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_func(value, TRUE));
|
||||
util_dump_enum(stream, util_str_func(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_prim_mode(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_prim_mode(value, TRUE));
|
||||
util_dump_enum(stream, util_str_prim_mode(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_tex_target(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_tex_target(value, TRUE));
|
||||
util_dump_enum(stream, util_str_tex_target(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_tex_filter(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_tex_filter(value, TRUE));
|
||||
util_dump_enum(stream, util_str_tex_filter(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_tex_mipfilter(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_tex_mipfilter(value, TRUE));
|
||||
util_dump_enum(stream, util_str_tex_mipfilter(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_tex_wrap(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_tex_wrap(value, TRUE));
|
||||
util_dump_enum(stream, util_str_tex_wrap(value, true));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_enum_stencil_op(FILE *stream, unsigned value)
|
||||
{
|
||||
util_dump_enum(stream, util_str_stencil_op(value, TRUE));
|
||||
util_dump_enum(stream, util_str_stencil_op(value, true));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,31 +53,31 @@ util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst,
|
||||
|
||||
if (dst->width != src->width ||
|
||||
dst->height != src->height)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (dst->samples != src->samples ||
|
||||
dst->layers != src->layers)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (dst->nr_cbufs != src->nr_cbufs) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < src->nr_cbufs; i++) {
|
||||
if (dst->cbufs[i] != src->cbufs[i]) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (dst->zsbuf != src->zsbuf) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dst->resolve != src->resolve) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,12 +172,12 @@ util_framebuffer_min_size(const struct pipe_framebuffer_state *fb,
|
||||
if (w == ~0u) {
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
*width = w;
|
||||
*height = h;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,18 +69,18 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt,
|
||||
|
||||
/* nothing to do for stencil-only formats */
|
||||
if (is_zs && !has_depth)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* nothing to do for integer formats */
|
||||
if (!is_zs && util_format_is_pure_integer(format))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (!screen->is_format_supported(screen, format, pt->target,
|
||||
pt->nr_samples, pt->nr_storage_samples,
|
||||
PIPE_BIND_SAMPLER_VIEW |
|
||||
(is_zs ? PIPE_BIND_DEPTH_STENCIL :
|
||||
PIPE_BIND_RENDER_TARGET))) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The texture object should have room for the levels which we're
|
||||
@@ -124,5 +124,5 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt,
|
||||
|
||||
pipe->blit(pipe, &blit);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ util_get_offset(const struct pipe_rasterizer_state *templ,
|
||||
return templ->offset_tri;
|
||||
default:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,7 +645,7 @@ util_query_clear_result(union pipe_query_result *result, unsigned type)
|
||||
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
|
||||
case PIPE_QUERY_GPU_FINISHED:
|
||||
result->b = FALSE;
|
||||
result->b = false;
|
||||
break;
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_TIMESTAMP:
|
||||
|
||||
@@ -173,11 +173,11 @@ u_trim_pipe_prim(enum mesa_prim pipe_prim, unsigned *nr)
|
||||
if (count && *nr >= count->min) {
|
||||
if (count->incr > 1)
|
||||
*nr -= (*nr % count->incr);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
*nr = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,13 +109,13 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned
|
||||
{
|
||||
/* degenerate primitive: ignore */
|
||||
if (!u_trim_pipe_prim(mode, (unsigned*)&count))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (info->max == 0) {
|
||||
info->max = 10;
|
||||
info->draws = MALLOC(info->max * sizeof(struct pipe_draw_start_count_bias));
|
||||
if (!info->draws) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (info->count == info->max) {
|
||||
@@ -124,7 +124,7 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned
|
||||
info->max * sizeof(struct pipe_draw_start_count_bias),
|
||||
2 * info->max * sizeof(struct pipe_draw_start_count_bias));
|
||||
if (!info->draws) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
info->max *= 2;
|
||||
@@ -139,7 +139,7 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned
|
||||
info->count++;
|
||||
info->total_index_count += count;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct pipe_draw_start_count_bias *
|
||||
@@ -270,7 +270,7 @@ util_draw_vbo_without_prim_restart(struct pipe_context *context,
|
||||
if (src_transfer)
|
||||
pipe_buffer_unmap(context, src_transfer);
|
||||
|
||||
new_info.primitive_restart = FALSE;
|
||||
new_info.primitive_restart = false;
|
||||
new_info.index_bounds_valid = true;
|
||||
if (direct_draws)
|
||||
context->draw_vbo(context, &new_info, drawid_offset, NULL, direct_draws, num_draws);
|
||||
|
||||
@@ -354,7 +354,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
/* KILL_IF -texTemp; # if -texTemp < 0, kill fragment */
|
||||
tgsi_transform_kill_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, texTemp,
|
||||
TGSI_SWIZZLE_W, TRUE);
|
||||
TGSI_SWIZZLE_W, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ util_texture_is_array(enum pipe_texture_target target)
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
return TRUE;
|
||||
return true;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe,
|
||||
return NULL;
|
||||
|
||||
if (window_space)
|
||||
ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, TRUE);
|
||||
ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, true);
|
||||
|
||||
for (i = 0; i < num_attribs; i++) {
|
||||
struct ureg_src src;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user