diff options
author | Aapo Tahkola <[email protected]> | 2005-06-16 11:57:45 +0000 |
---|---|---|
committer | Aapo Tahkola <[email protected]> | 2005-06-16 11:57:45 +0000 |
commit | 4e7df2746638e67c09c5e5d0e5157345f9470122 (patch) | |
tree | 938c4fa2db6f6247f44f8208cb4137c6c9f11aa7 | |
parent | 3c6f17be3274d6a137fb52b0aacba81259bbb188 (diff) |
Fix gloss breakage when using hw tnl.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertexprog.c | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index fd1b006601d..0e2652a3703 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1146,7 +1146,7 @@ void r300_setup_rs_unit(GLcontext *ctx) | interp_magic[i]; if (InputsRead & (FRAG_BIT_TEX0<<i)) { - assert(r300->state.texture.tc_count != 0); + //assert(r300->state.texture.tc_count != 0); r300->hw.rr.cmd[R300_RR_ROUTE_0 + fp_reg] = 0 | R300_RS_ROUTE_ENABLE | i /* source INTERP */ diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index 8a10931538c..178ca7635dc 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -673,6 +673,25 @@ void translate_vertex_shader(struct r300_vertex_program *vp) goto next; case VP_OPCODE_SUB://ADD RESULT 1.X Y Z W TMP 0{} {X Y Z W} PARAM 1{X Y Z W } {X Y Z W} neg Xneg Yneg Zneg W +#if 1 + hw_op=(src[0].File == PROGRAM_TEMPORARY && + src[1].File == PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 : R300_VPI_OUT_OP_MAD; + + o_inst->op=MAKE_VSF_OP(hw_op, t_dst_index(vp, &vpi->DstReg), + t_dst_mask(vpi->DstReg.WriteMask), t_dst_class(vpi->DstReg.File)); + o_inst->src1=t_src(vp, &src[0]); + o_inst->src2=MAKE_VSF_SOURCE(t_src_index(vp, &src[0]), + SWIZZLE_ONE, SWIZZLE_ONE, + SWIZZLE_ONE, SWIZZLE_ONE, + t_src_class(src[0].File), VSF_FLAG_NONE); + o_inst->src3=MAKE_VSF_SOURCE(t_src_index(vp, &src[1]), + t_swizzle(GET_SWZ(src[1].Swizzle, 0)), + t_swizzle(GET_SWZ(src[1].Swizzle, 1)), + t_swizzle(GET_SWZ(src[1].Swizzle, 2)), + t_swizzle(GET_SWZ(src[1].Swizzle, 3)), + t_src_class(src[1].File), + (!src[1].Negate) ? VSF_FLAG_ALL : VSF_FLAG_NONE); +#else o_inst->op=MAKE_VSF_OP(R300_VPI_OUT_OP_ADD, t_dst_index(vp, &vpi->DstReg), t_dst_mask(vpi->DstReg.WriteMask), t_dst_class(vpi->DstReg.File)); @@ -685,6 +704,7 @@ void translate_vertex_shader(struct r300_vertex_program *vp) t_src_class(src[1].File), (!src[1].Negate) ? VSF_FLAG_ALL : VSF_FLAG_NONE); o_inst->src3=0; +#endif goto next; case VP_OPCODE_ABS://MAX RESULT 1.X Y Z W PARAM 0{} {X Y Z W} PARAM 0{X Y Z W } {X Y Z W} neg Xneg Yneg Zneg W |