summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/eg_debug.c6
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c6
-rw-r--r--src/gallium/drivers/r600/r600_isa.c6
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h2
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c5
-rw-r--r--src/gallium/drivers/r600/r600_test_dma.c2
6 files changed, 13 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/eg_debug.c b/src/gallium/drivers/r600/eg_debug.c
index ceb7c1672c4..56195df2964 100644
--- a/src/gallium/drivers/r600/eg_debug.c
+++ b/src/gallium/drivers/r600/eg_debug.c
@@ -78,7 +78,7 @@ static void print_named_value(FILE *file, const char *name, uint32_t value,
static void eg_dump_reg(FILE *file, unsigned offset, uint32_t value,
uint32_t field_mask)
{
- int r, f;
+ unsigned r, f;
for (r = 0; r < ARRAY_SIZE(egd_reg_table); r++) {
const struct eg_reg *reg = &egd_reg_table[r];
@@ -134,7 +134,7 @@ static void ac_parse_set_reg_packet(FILE *f, uint32_t *ib, unsigned count,
unsigned reg_offset)
{
unsigned reg = (ib[1] << 2) + reg_offset;
- int i;
+ unsigned i;
for (i = 0; i < count; i++)
eg_dump_reg(f, reg + i*4, ib[2+i], ~0);
@@ -149,7 +149,7 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
unsigned op = PKT3_IT_OPCODE_G(ib[0]);
const char *predicate = PKT3_PREDICATE(ib[0]) ? "(predicate)" : "";
const char *compute_mode = (ib[0] & 0x2) ? "(C)" : "";
- int i;
+ unsigned i;
/* Print the name first. */
for (i = 0; i < ARRAY_SIZE(packet3_table); i++)
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 7718a658655..d100cfab1d1 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3970,7 +3970,7 @@ static void evergreen_set_hw_atomic_buffers(struct pipe_context *ctx,
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_atomic_buffer_state *astate;
- int i, idx;
+ unsigned i, idx;
astate = &rctx->atomic_buffer_state;
@@ -4006,7 +4006,7 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
struct r600_tex_color_info color;
struct eg_buf_res_params buf_params;
struct r600_resource *resource;
- int i, idx;
+ unsigned i, idx;
unsigned old_mask;
if (shader != PIPE_SHADER_FRAGMENT &&
@@ -4100,7 +4100,7 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
const struct pipe_image_view *images)
{
struct r600_context *rctx = (struct r600_context *)ctx;
- int i;
+ unsigned i;
struct r600_image_view *rview;
struct pipe_resource *image;
struct r600_resource *resource;
diff --git a/src/gallium/drivers/r600/r600_isa.c b/src/gallium/drivers/r600/r600_isa.c
index 611b370bf58..57b0e044f9d 100644
--- a/src/gallium/drivers/r600/r600_isa.c
+++ b/src/gallium/drivers/r600/r600_isa.c
@@ -558,7 +558,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {
for (i = 0; i < ARRAY_SIZE(r600_alu_op_table); ++i) {
const struct alu_op_info *op = &r600_alu_op_table[i];
- unsigned opc;
+ int opc;
if (op->flags & AF_LDS || op->slots[isa->hw_class] == 0)
continue;
opc = op->opcode[isa->hw_class >> 1];
@@ -571,7 +571,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {
for (i = 0; i < ARRAY_SIZE(fetch_op_table); ++i) {
const struct fetch_op_info *op = &fetch_op_table[i];
- unsigned opc = op->opcode[isa->hw_class];
+ int opc = op->opcode[isa->hw_class];
if ((op->flags & FF_GDS) || ((opc & 0xFF) != opc))
continue; /* ignore GDS ops and INST_MOD versions for now */
isa->fetch_map[opc] = i + 1;
@@ -579,7 +579,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {
for (i = 0; i < ARRAY_SIZE(cf_op_table); ++i) {
const struct cf_op_info *op = &cf_op_table[i];
- unsigned opc = op->opcode[isa->hw_class];
+ int opc = op->opcode[isa->hw_class];
if (opc == -1)
continue;
/* using offset for CF_ALU_xxx opcodes because they overlap with other
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 99be2f9ce66..08d9e6b0264 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -579,7 +579,7 @@ struct r600_context {
bool gs_tri_strip_adj_fix;
boolean dual_src_blend;
unsigned zwritemask;
- int ps_iter_samples;
+ unsigned ps_iter_samples;
/* The list of all texture buffer objects in this context.
* This list is walked when a buffer is invalidated/reallocated and
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 939a14654e0..402d95838f0 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1310,7 +1310,7 @@ void r600_update_driver_const_buffers(struct r600_context *rctx, bool compute_on
}
static void *r600_alloc_buf_consts(struct r600_context *rctx, int shader_type,
- int array_size, uint32_t *base_offset)
+ unsigned array_size, uint32_t *base_offset)
{
struct r600_shader_driver_constants_info *info = &rctx->driver_consts[shader_type];
if (array_size + R600_UCP_SIZE > info->alloc_size) {
@@ -1433,14 +1433,13 @@ void eg_setup_buffer_constants(struct r600_context *rctx, int shader_type)
/* set sample xy locations as array of fragment shader constants */
void r600_set_sample_locations_constant_buffer(struct r600_context *rctx)
{
- int i;
struct pipe_context *ctx = &rctx->b.b;
assert(rctx->framebuffer.nr_samples < R600_UCP_SIZE);
assert(rctx->framebuffer.nr_samples <= ARRAY_SIZE(rctx->sample_positions)/4);
memset(rctx->sample_positions, 0, 4 * 4 * 16);
- for (i = 0; i < rctx->framebuffer.nr_samples; i++) {
+ for (unsigned i = 0; i < rctx->framebuffer.nr_samples; i++) {
ctx->get_sample_position(ctx, rctx->framebuffer.nr_samples, i, &rctx->sample_positions[4*i]);
/* Also fill in center-zeroed positions used for interpolateAtSample */
rctx->sample_positions[4*i + 2] = rctx->sample_positions[4*i + 0] - 0.5f;
diff --git a/src/gallium/drivers/r600/r600_test_dma.c b/src/gallium/drivers/r600/r600_test_dma.c
index 9e1ff9e5fe0..af86ad386f6 100644
--- a/src/gallium/drivers/r600/r600_test_dma.c
+++ b/src/gallium/drivers/r600/r600_test_dma.c
@@ -57,7 +57,7 @@ static void set_random_pixels(struct pipe_context *ctx,
{
struct pipe_transfer *t;
uint8_t *map;
- int x,y,z;
+ unsigned x,y,z;
map = pipe_transfer_map_3d(ctx, tex, 0, PIPE_TRANSFER_WRITE,
0, 0, 0, tex->width0, tex->height0,