diff options
author | Dave Airlie <airlied@redhat.com> | 2008-05-27 18:15:14 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-05-27 18:15:14 +1000 |
commit | eee53dfb22e0c950b11a466ebcd5d764864229cd (patch) | |
tree | dd37c476b4a7ea67e21feffc7d425a3e1af92a89 /src/mesa/drivers/dri/r300/r300_state.c | |
parent | 7278266612fe6be91b30b084de666a1ac4f2c20b (diff) |
r500: the cs is shared per context - doh so don't use for program upload.
Also remove some unused bits of the r500 fragprog struct
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 5 |
1 files changed, 2 insertions, 3 deletions
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++) { |