mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
gallium/drivers/ilo: Use unsigned for loop index
Found-by: Coccinelle Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
5071c192cc
commit
76a7d6f412
4 changed files with 16 additions and 16 deletions
|
|
@ -333,7 +333,7 @@ ilo_builder_init(struct ilo_builder *builder,
|
|||
const struct ilo_dev *dev,
|
||||
struct intel_winsys *winsys)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
assert(ilo_is_zeroed(builder, sizeof(*builder)));
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ ilo_builder_init(struct ilo_builder *builder,
|
|||
void
|
||||
ilo_builder_reset(struct ilo_builder *builder)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < ILO_BUILDER_WRITER_COUNT; i++)
|
||||
ilo_builder_writer_reset(builder, i);
|
||||
|
|
@ -382,7 +382,7 @@ ilo_builder_reset(struct ilo_builder *builder)
|
|||
bool
|
||||
ilo_builder_begin(struct ilo_builder *builder)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < ILO_BUILDER_WRITER_COUNT; i++) {
|
||||
if (!ilo_builder_writer_alloc_and_map(builder, i)) {
|
||||
|
|
@ -407,7 +407,7 @@ struct intel_bo *
|
|||
ilo_builder_end(struct ilo_builder *builder, unsigned *used)
|
||||
{
|
||||
struct ilo_builder_writer *bat;
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
ilo_builder_batch_patch_sba(builder);
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ fs_lower_opcode_tgsi_indirect_const(struct fs_compile_context *fcc,
|
|||
struct toy_inst *inst;
|
||||
struct toy_src desc, real_src[4];
|
||||
struct toy_dst tmp, real_dst[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
tsrc_transpose(idx, real_src);
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ fs_lower_opcode_tgsi_const_pcb(struct fs_compile_context *fcc,
|
|||
const int grf_subreg = (idx.val32 & 1) * 16;
|
||||
struct toy_src src;
|
||||
struct toy_dst real_dst[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
if (!fcc->variant->use_pcb || dim != 0 || idx.file != TOY_FILE_IMM ||
|
||||
grf >= fcc->first_attr_grf)
|
||||
|
|
@ -350,7 +350,7 @@ fs_lower_opcode_tgsi_const_gen6(struct fs_compile_context *fcc,
|
|||
struct toy_inst *inst;
|
||||
struct toy_src desc;
|
||||
struct toy_dst tmp, real_dst[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
if (fs_lower_opcode_tgsi_const_pcb(fcc, dst, dim, idx))
|
||||
return;
|
||||
|
|
@ -396,7 +396,7 @@ fs_lower_opcode_tgsi_const_gen7(struct fs_compile_context *fcc,
|
|||
struct toy_src desc;
|
||||
struct toy_inst *inst;
|
||||
struct toy_dst tmp, real_dst[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
if (fs_lower_opcode_tgsi_const_pcb(fcc, dst, dim, idx))
|
||||
return;
|
||||
|
|
@ -1168,7 +1168,7 @@ fs_lower_opcode_derivative(struct toy_compiler *tc, struct toy_inst *inst)
|
|||
{
|
||||
struct toy_dst dst[4];
|
||||
struct toy_src src[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
tdst_transpose(inst->dst, dst);
|
||||
tsrc_transpose(inst->src[0], src);
|
||||
|
|
@ -1257,7 +1257,7 @@ fs_lower_opcode_kil(struct toy_compiler *tc, struct toy_inst *inst)
|
|||
}
|
||||
else {
|
||||
struct toy_src src[4];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
tsrc_transpose(inst->src[0], src);
|
||||
/* mask out killed pixels */
|
||||
|
|
@ -1583,7 +1583,7 @@ fs_write_fb(struct fs_compile_context *fcc)
|
|||
static void
|
||||
fs_setup_shader_out(struct ilo_shader *sh, const struct toy_tgsi *tgsi)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
sh->out.count = tgsi->num_outputs;
|
||||
for (i = 0; i < tgsi->num_outputs; i++) {
|
||||
|
|
@ -1603,7 +1603,7 @@ static void
|
|||
fs_setup_shader_in(struct ilo_shader *sh, const struct toy_tgsi *tgsi,
|
||||
bool flatshade)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
sh->in.count = tgsi->num_inputs;
|
||||
for (i = 0; i < tgsi->num_inputs; i++) {
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ vs_prepare_tgsi_sampling(struct vs_compile_context *vcc,
|
|||
if (num_coords >= 3) {
|
||||
struct toy_dst tmp, max;
|
||||
struct toy_src abs_coords[3];
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
tmp = tc_alloc_tmp(tc);
|
||||
max = tdst_writemask(tmp, TOY_WRITEMASK_W);
|
||||
|
|
@ -804,7 +804,7 @@ static int
|
|||
vs_collect_outputs(struct vs_compile_context *vcc, struct toy_src *outs)
|
||||
{
|
||||
const struct toy_tgsi *tgsi = &vcc->tgsi;
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < vcc->shader->out.count; i++) {
|
||||
const int slot = vcc->output_map[i];
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ struct linear_scan {
|
|||
static void
|
||||
linear_scan_free_regs(struct linear_scan *ls, int reg, int count)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
ls->free_regs[ls->num_free_regs++] = reg + count - 1 - i;
|
||||
|
|
@ -221,7 +221,7 @@ linear_scan_spill(struct linear_scan *ls,
|
|||
static void
|
||||
linear_scan_spill_range(struct linear_scan *ls, int first, int count)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct linear_scan_live_interval *interval = &ls->intervals[first + i];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue