struct prog_instruction *vpi, GLuint * inst,
struct prog_src_register src[3])
{
- unsigned long hw_op;
-
#if 1
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = ONE_SRC_0;
inst[1] = t_src(vp, &src[0]);
inst[2] = t_src(vp, &src[1]);
inst[3] = ZERO_SRC_1;
-
#endif
return inst;
struct prog_instruction *vpi, GLuint * inst,
struct prog_src_register src[3])
{
- unsigned long hw_op;
-
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = t_src(vp, &src[0]);
inst[2] = ZERO_SRC_0;
inst[3] = ZERO_SRC_0;
#else
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = t_src(vp, &src[0]);
struct prog_instruction *vpi, GLuint * inst,
struct prog_src_register src[3])
{
- unsigned long hw_op;
-
- // HW mul can take third arg but appears to have some other limitations.
-
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = t_src(vp, &src[0]);
struct prog_instruction *vpi, GLuint * inst,
struct prog_src_register src[3])
{
- unsigned long hw_op;
-
//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
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = t_src(vp, &src[0]);
inst[2] = ZERO_SRC_0;
inst[3] = ZERO_SRC_0;
#else
- if (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY) {
- hw_op = R300_VPI_OUT_OP_MAD_2;
- } else {
- hw_op = VE_MULTIPLY_ADD;
- }
-
inst[0] =
- PVS_VECTOR_OPCODE(hw_op, t_dst_index(vp, &vpi->DstReg),
+ PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
t_dst_mask(vpi->DstReg.WriteMask),
t_dst_class(vpi->DstReg.File));
inst[1] = t_src(vp, &src[0]);
{
/* mul r0, r1.yzxw, r2.zxyw
mad r0, -r2.yzxw, r1.zxyw, r0
- NOTE: might need MAD_2
*/
inst[0] =