amd: Fix warnings around variable sizes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
This commit is contained in:
@@ -167,7 +167,7 @@ match_mask(nir_intrinsic_instr *intrin,
|
||||
intrin->intrinsic != nir_intrinsic_store_per_vertex_output)
|
||||
slot -= VARYING_SLOT_PATCH0;
|
||||
|
||||
return (1UL << slot) & mask;
|
||||
return (UINT64_C(1) << slot) & mask;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -10228,7 +10228,7 @@ static void export_vs_varying(isel_context *ctx, int slot, bool is_pos, int *nex
|
||||
int offset = (ctx->stage.has(SWStage::TES) && !ctx->stage.has(SWStage::GS))
|
||||
? ctx->program->info->tes.outinfo.vs_output_param_offset[slot]
|
||||
: ctx->program->info->vs.outinfo.vs_output_param_offset[slot];
|
||||
uint64_t mask = ctx->outputs.mask[slot];
|
||||
unsigned mask = ctx->outputs.mask[slot];
|
||||
if (!is_pos && !mask)
|
||||
return;
|
||||
if (!is_pos && offset == AC_EXP_PARAM_UNDEFINED)
|
||||
|
@@ -1413,11 +1413,11 @@ static LLVMValueRef ac_ufN_to_float(struct ac_llvm_context *ctx, LLVMValueRef sr
|
||||
LLVMValueRef result;
|
||||
|
||||
tmp = LLVMBuildICmp(ctx->builder, LLVMIntUGE, src,
|
||||
LLVMConstInt(ctx->i32, ((1 << exp_bits) - 1) << mant_bits, false), "");
|
||||
LLVMConstInt(ctx->i32, ((1ULL << exp_bits) - 1) << mant_bits, false), "");
|
||||
result = LLVMBuildSelect(ctx->builder, tmp, naninf, normal, "");
|
||||
|
||||
tmp = LLVMBuildICmp(ctx->builder, LLVMIntUGE, src, LLVMConstInt(ctx->i32, 1 << mant_bits, false),
|
||||
"");
|
||||
tmp = LLVMBuildICmp(ctx->builder, LLVMIntUGE, src,
|
||||
LLVMConstInt(ctx->i32, 1ULL << mant_bits, false), "");
|
||||
result = LLVMBuildSelect(ctx->builder, tmp, result, denormal, "");
|
||||
|
||||
tmp = LLVMBuildICmp(ctx->builder, LLVMIntNE, src, ctx->i32_0, "");
|
||||
|
Reference in New Issue
Block a user