aco: Fix warnings about unsafe integer/bool mix

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>
This commit is contained in:
James Park
2020-11-26 21:31:30 -08:00
committed by Marge Bot
parent fcd53bebe6
commit e352ebf88e
2 changed files with 3 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ struct wait_ctx {
for (unsigned i = 0; i < storage_count; i++) {
changed |= barrier_imm[i].combine(other->barrier_imm[i]);
changed |= other->barrier_events[i] & ~barrier_events[i];
changed |= (other->barrier_events[i] & ~barrier_events[i]) != 0;
barrier_events[i] |= other->barrier_events[i];
}

View File

@@ -6991,7 +6991,7 @@ void ngg_visit_emit_vertex_with_counter(isel_context *ctx, nir_intrinsic_instr *
if (nir_src_is_const(instr->src[1])) {
uint8_t current_vtx_per_prim = nir_src_as_uint(instr->src[1]);
uint8_t completes_prim = (current_vtx_per_prim >= (total_vtx_per_prim - 1)) ? 1 : 0;
uint8_t odd = calc_odd & current_vtx_per_prim;
uint8_t odd = (uint8_t)calc_odd & current_vtx_per_prim;
uint8_t flag = completes_prim | (odd << 1) | (1 << 2);
prim_flag = bld.copy(bld.def(v1b), Operand(flag));
} else if (!instr->src[1].ssa->divergent) {
@@ -9314,7 +9314,7 @@ void visit_phi(isel_context *ctx, nir_phi_instr *instr)
assert(instr->dest.ssa.bit_size != 1 || dst.regClass() == ctx->program->lane_mask);
bool logical = !dst.is_linear() || nir_dest_is_divergent(instr->dest);
logical |= ctx->block->kind & block_kind_merge;
logical |= (ctx->block->kind & block_kind_merge) != 0;
aco_opcode opcode = logical ? aco_opcode::p_phi : aco_opcode::p_linear_phi;
/* we want a sorted list of sources, since the predecessor list is also sorted */