summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_asm.c25
-rw-r--r--src/gallium/drivers/r600/r600_hw_states.c3
-rw-r--r--src/gallium/drivers/r600/r600_state.c1
3 files changed, 14 insertions, 15 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 4664105263a..9e5406f45e1 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -220,6 +220,7 @@ static int init_gpr(struct r600_bc_alu *alu)
return 0;
}
+#if 0
static int reserve_gpr(struct r600_bc_alu *alu, unsigned sel, unsigned chan, unsigned cycle)
{
if (alu->hw_gpr[cycle][chan] < 0)
@@ -299,14 +300,7 @@ static int cycle_for_vector_bank_swizzle(const int swiz, const int sel, unsigned
return ret;
}
-static int is_const(int sel)
-{
- if (sel > 255 && sel < 512)
- return 1;
- if (sel >= V_SQ_ALU_SRC_0 && sel <= V_SQ_ALU_SRC_LITERAL)
- return 1;
- return 0;
-}
+
static void update_chan_counter(struct r600_bc_alu *alu, int *chan_counter)
{
@@ -323,7 +317,6 @@ static void update_chan_counter(struct r600_bc_alu *alu, int *chan_counter)
}
}
-#if 0
/* we need something like this I think - but this is bogus */
int check_read_slots(struct r600_bc *bc, struct r600_bc_alu *alu_first)
{
@@ -348,13 +341,22 @@ int check_read_slots(struct r600_bc *bc, struct r600_bc_alu *alu_first)
}
#endif
+static int is_const(int sel)
+{
+ if (sel > 255 && sel < 512)
+ return 1;
+ if (sel >= V_SQ_ALU_SRC_0 && sel <= V_SQ_ALU_SRC_LITERAL)
+ return 1;
+ return 0;
+}
+
static int check_scalar(struct r600_bc *bc, struct r600_bc_alu *alu)
{
unsigned swizzle_key;
if (alu->bank_swizzle_force) {
alu->bank_swizzle = alu->bank_swizzle_force;
- return;
+ return 0;
}
swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
(is_const(alu->src[1].sel) ? 2 : 0 ) +
@@ -370,7 +372,7 @@ static int check_vector(struct r600_bc *bc, struct r600_bc_alu *alu)
if (alu->bank_swizzle_force) {
alu->bank_swizzle = alu->bank_swizzle_force;
- return;
+ return 0;
}
swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
(is_const(alu->src[1].sel) ? 2 : 0 ) +
@@ -408,7 +410,6 @@ int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int
{
struct r600_bc_alu *nalu = r600_bc_alu();
struct r600_bc_alu *lalu;
- struct r600_bc_alu *curr_bs_head;
int i, r;
if (nalu == NULL)
diff --git a/src/gallium/drivers/r600/r600_hw_states.c b/src/gallium/drivers/r600/r600_hw_states.c
index 3d3e87d7234..768202ab388 100644
--- a/src/gallium/drivers/r600/r600_hw_states.c
+++ b/src/gallium/drivers/r600/r600_hw_states.c
@@ -1084,10 +1084,9 @@ void r600_set_constant_buffer_mem(struct pipe_context *ctx,
{
struct r600_screen *rscreen = r600_screen(ctx->screen);
struct r600_context *rctx = r600_context(ctx);
- unsigned nconstant = 0, i, type, shader_class, size;
+ unsigned nconstant = 0, type, shader_class, size;
struct radeon_state *rstate, *rstates;
struct r600_resource *rbuffer = (struct r600_resource*)buffer;
- u32 *ptr;
type = R600_STATE_CBUF;
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 9203f4408c1..8816592511d 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -108,7 +108,6 @@ static void r600_sampler_view_destroy(struct pipe_context *ctx,
{
struct r600_context_state *rstate = (struct r600_context_state *)state;
struct r600_context *rctx = r600_context(ctx);
- int i;
/* need to search list of vs/ps sampler views and remove it from any - uggh */
r600_remove_sampler_view(&rctx->ps_sampler, rstate);