diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-13 22:09:37 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-14 04:11:21 +0200 |
commit | e2aa45c2f9584ff76151a99b4fcd0ecb56260473 (patch) | |
tree | 8913d28e43dd313291b50ae6fbc5985130a3c73c /src | |
parent | caeabb1ebea33828e956efed19dce46767a068b4 (diff) |
r300: Do not include r300_fragprog.h from r300_context.h and other cleanups
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_fragprog.c | 34 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_render.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 1 |
5 files changed, 11 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 05efb813e5..a9b3b061f4 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -73,7 +73,6 @@ typedef struct r300_context *r300ContextPtr; } #include "r300_vertprog.h" -#include "r300_fragprog.h" #include "r500_fragprog.h" /** diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 819615c141..9d7a8c6570 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -445,8 +445,8 @@ static int get_hw_temp(struct r300_pfs_compile_state *cs, int slot) cs->hwtemps[r].vector_valid = 0; cs->hwtemps[r].scalar_valid = 0; - if (r > fp->code.max_temp_idx) - fp->code.max_temp_idx = r; + if (r > code->max_temp_idx) + code->max_temp_idx = r; return r; } @@ -1029,11 +1029,11 @@ static void emit_tex(struct r300_pfs_compile_state *cs, tokens[2] = unit; factor_index = - _mesa_add_state_reference(cs->fp->mesa_program.Base. + _mesa_add_state_reference(fp->mesa_program.Base. Parameters, tokens); factorreg = emit_const4fv(cs, - cs->fp->mesa_program.Base.Parameters-> + fp->mesa_program.Base.Parameters-> ParameterValues[factor_index]); tempreg = keep(get_temp_reg(cs)); @@ -1264,10 +1264,10 @@ static int find_and_prepare_slot(struct r300_pfs_compile_state *cs, return -1; } - fp->code.alu.inst[pos].inst0 = NOP_INST0; - fp->code.alu.inst[pos].inst1 = NOP_INST1; - fp->code.alu.inst[pos].inst2 = NOP_INST2; - fp->code.alu.inst[pos].inst3 = NOP_INST3; + code->alu.inst[pos].inst0 = NOP_INST0; + code->alu.inst[pos].inst1 = NOP_INST1; + code->alu.inst[pos].inst2 = NOP_INST2; + code->alu.inst[pos].inst3 = NOP_INST3; cs->nrslots++; } @@ -1518,24 +1518,6 @@ static void emit_arith(struct r300_pfs_compile_state *cs, return; } -#if 0 -static GLuint get_attrib(struct r300_fragment_program *fp, GLuint attr) -{ - struct gl_fragment_program *mp = &fp->mesa_program; - GLuint r = undef; - - if (!(mp->Base.InputsRead & (1 << attr))) { - ERROR("Attribute %d was not provided!\n", attr); - return undef; - } - - REG_SET_TYPE(r, REG_TYPE_INPUT); - REG_SET_INDEX(r, attr); - REG_SET_VALID(r, GL_TRUE); - return r; -} -#endif - static GLfloat SinCosConsts[2][4] = { { 1.273239545, // 4/PI diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 6af23300f2..71821a01ea 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -54,6 +54,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r300_vertprog.h" #include "radeon_reg.h" #include "r300_emit.h" +#include "r300_fragprog.h" #include "vblank.h" diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index fc07105c56..8f74f9d785 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -74,6 +74,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r300_reg.h" #include "r300_tex.h" #include "r300_emit.h" +#include "r300_fragprog.h" extern int future_hw_tcl_on; /** diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 1dcf9e0cab..e82c3d9681 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -60,6 +60,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r300_state.h" #include "r300_reg.h" #include "r300_emit.h" +#include "r300_fragprog.h" #include "r300_tex.h" #include "drirenderbuffer.h" |