break;
case midgard_word_type_alu:
- printf("alu%d/%X", midgard_word_size[tag], tag);
+ printf("alu%u/%X", midgard_word_size[tag], tag);
break;
default:
print_swizzle_helper_8(swizzle, false);
} else {
print_swizzle_helper_8(swizzle, rep_high & 1);
- print_swizzle_helper_8(swizzle, !rep_low & 1);
+ print_swizzle_helper_8(swizzle, !(rep_low & 1));
}
}
printf(".");
print_swizzle_helper(swizzle, rep_high & 1);
- print_swizzle_helper(swizzle, !rep_low & 1);
+ print_swizzle_helper(swizzle, !(rep_low & 1));
}
static void
/* Since we wrapped with a function-looking thing */
if (is_int && int_mod == midgard_int_shift)
- printf(") << %d", bits);
+ printf(") << %u", bits);
else if ((is_int && (int_mod != midgard_int_normal))
|| (!is_int && src->mod & MIDGARD_FLOAT_MOD_ABS))
printf(")");
print_immediate(uint16_t imm)
{
if (is_instruction_int)
- printf("#%d", imm);
+ printf("#%u", imm);
else
printf("#%g", _mesa_half_to_float(imm));
}
/* Shouldn't happen but with junk / out-of-spec shaders it
* would cause an infinite loop */
- printf("/* XXX: bits = %d */", bits);
+ printf("/* XXX: bits = %u */", bits);
return;
}
bool known = override != 0x3; /* Unused value */
if (!(modeable && known))
- printf("/* do%d */ ", override);
+ printf("/* do%u */ ", override);
}
print_mask(mask, dest_size, override);
}
static void
-print_branch_op(int op)
+print_branch_op(unsigned op)
{
switch (op) {
case midgard_jmp_writeout_op_branch_uncond:
break;
default:
- printf("unk%d.", op);
+ printf("unk%u.", op);
break;
}
}
printf("br.uncond ");
if (br_uncond.unknown != 1)
- printf("unknown:%d, ", br_uncond.unknown);
+ printf("unknown:%u, ", br_uncond.unknown);
if (br_uncond.offset >= 0)
printf("+");
printf("lut%X", br.cond);
if (br.unknown)
- printf(".unknown%d", br.unknown);
+ printf(".unknown%u", br.unknown);
printf(" ");
if ((control_word >> 25) & 1) {
print_vector_field("lut", word_ptr, *beginning_ptr, tabs);
- beginning_ptr += 1;
word_ptr += 3;
num_words += 3;
}
}
if (param.zero0 || param.zero1 || param.zero2)
- printf(" /* zero tripped, %d %d %d */ ", param.zero0, param.zero1, param.zero2);
+ printf(" /* zero tripped, %u %u %u */ ", param.zero0, param.zero1, param.zero2);
}
static bool
unsigned reg = REGISTER_LDST_BASE + sel.select;
char comp = components[sel.component];
- printf("r%d.%c", reg, comp);
+ printf("r%u.%c", reg, comp);
/* Only print a shift if it's non-zero. Shifts only make sense for the
* second index. For the first, we're not sure what it means yet */
if (index == 1) {
if (sel.shift)
- printf(" << %d", sel.shift);
+ printf(" << %u", sel.shift);
} else {
printf(" /* %X */", sel.shift);
}
midg_stats.attribute_count = -16;
}
- printf(" r%d", word->reg);
+ printf(" r%u", word->reg);
print_mask_4(word->mask);
if (!OP_IS_STORE(word->op))
address = (hi << 3) | lo;
}
- printf(", %d", address);
+ printf(", %u", address);
print_swizzle_vec4(word->swizzle, false, false);
printf(", ");
if (is_ubo) {
- printf("ubo%d", word->arg_1);
+ printf("ubo%u", word->arg_1);
update_stats(&midg_stats.uniform_buffer_count, word->arg_1);
} else
print_load_store_arg(word->arg_1, 0);
if (!sel.full)
printf("h");
- printf("r%d", REG_TEX_BASE + sel.select);
+ printf("r%u", REG_TEX_BASE + sel.select);
unsigned component = sel.component;
unsigned bottom = op & 0xF;
if (bottom != 0x2)
- printf("_unk%d", bottom);
+ printf("_unk%u", bottom);
printf(".%c", components[component]);
return;
/* Indirect, tut tut */
midg_stats.texture_count = -16;
} else {
- printf("texture%d, ", texture->texture_handle);
+ printf("texture%u, ", texture->texture_handle);
update_stats(&midg_stats.texture_count, texture->texture_handle);
}
midg_stats.sampler_count = -16;
} else {
- printf("%d", texture->sampler_handle);
+ printf("%u", texture->sampler_handle);
update_stats(&midg_stats.sampler_count, texture->sampler_handle);
}
if (texture->bias_int)
printf(" /* bias_int = 0x%X */ ", texture->bias_int);
- printf("lod = %d, ", texture->bias);
+ printf("lod = %u, ", texture->bias);
} else if (texture->bias || texture->bias_int) {
signed bias_int = texture->bias_int;
float bias_frac = texture->bias / 256.0f;