diff options
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r500_fragprog.c | 7 |
3 files changed, 2 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 53882b6750..4cca4a8093 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -814,16 +814,6 @@ struct r500_fragment_program { } inst[512]; /* TODO: This is magic! */ - struct { - int tex_offset; - int tex_end; - int alu_offset; - int alu_end; - int flags; - } node[4]; - int cur_node; - int first_node_has_tex; - int temp_reg_offset; int inst_offset; diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 32ea7c9f5a..df63f32d1d 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -2538,7 +2538,7 @@ static void r500SetupPixelShader(r300ContextPtr rmesa) R300_STATECHANGE(rmesa, r500fp); /* Emit our shader... */ - for (i = 0; i < fp->cs->nrslots; i++) { + for (i = 0; i < fp->inst_end+1; i++) { rmesa->hw.r500fp.cmd[i*6+1] = fp->inst[i].inst0; rmesa->hw.r500fp.cmd[i*6+2] = fp->inst[i].inst1; rmesa->hw.r500fp.cmd[i*6+3] = fp->inst[i].inst2; @@ -2547,8 +2547,7 @@ static void r500SetupPixelShader(r300ContextPtr rmesa) rmesa->hw.r500fp.cmd[i*6+6] = fp->inst[i].inst5; } - bump_r500fp_count(rmesa->hw.r500fp.cmd, fp->cs->nrslots * 6); - + bump_r500fp_count(rmesa->hw.r500fp.cmd, (fp->inst_end + 1) * 6); R300_STATECHANGE(rmesa, r500fp_const); for (i = 0; i < fp->const_nr; i++) { diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c index 0e85a2d7fb..911e6ae81e 100644 --- a/src/mesa/drivers/dri/r300/r500_fragprog.c +++ b/src/mesa/drivers/dri/r300/r500_fragprog.c @@ -1191,15 +1191,11 @@ static void init_program(r300ContextPtr r300, struct r500_fragment_program *fp) fp->translated = GL_FALSE; fp->error = GL_FALSE; fp->cs = cs = &(R300_CONTEXT(fp->ctx)->state.pfs_compile); - fp->cur_node = 0; - fp->first_node_has_tex = 0; fp->const_nr = 0; /* Size of pixel stack, plus 1. */ fp->max_temp_idx = 1; /* Temp register offset. */ fp->temp_reg_offset = 0; - fp->node[0].alu_end = -1; - fp->node[0].tex_end = -1; _mesa_memset(cs, 0, sizeof(*fp->cs)); for (i = 0; i < PFS_MAX_ALU_INST; i++) { @@ -1402,9 +1398,6 @@ void r500TranslateFragmentShader(r300ContextPtr r300, r300UpdateStateParameters(fp->ctx, _NEW_PROGRAM); - } else { - fp->inst_offset = 0; - fp->inst_end = fp->cs->nrslots - 1; } update_params(fp); |