diff options
author | Edward O'Callaghan <[email protected]> | 2016-01-05 21:07:21 +1100 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-01-06 08:04:03 -0700 |
commit | 76a7d6f412f976b7bee57ff7e691fefd90e912ee (patch) | |
tree | a843ce271e18f6dd6421be5e265d8232d8b424c4 /src/gallium/drivers/ilo/shader | |
parent | 5071c192ccbfac92c53d93aea049bf981ae9e442 (diff) |
gallium/drivers/ilo: Use unsigned for loop index
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/shader')
-rw-r--r-- | src/gallium/drivers/ilo/shader/ilo_shader_fs.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/ilo_shader_vs.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_legalize_ra.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c index 5250115a893..f46126e8427 100644 --- a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c +++ b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c @@ -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++) { diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c index 46a7e6f69d0..0df0afc706b 100644 --- a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c +++ b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c @@ -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]; diff --git a/src/gallium/drivers/ilo/shader/toy_legalize_ra.c b/src/gallium/drivers/ilo/shader/toy_legalize_ra.c index b725375fb67..1874faa6be3 100644 --- a/src/gallium/drivers/ilo/shader/toy_legalize_ra.c +++ b/src/gallium/drivers/ilo/shader/toy_legalize_ra.c @@ -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]; |