unsigned long hw_op;
#if 1
- hw_op = (src[0].File == PROGRAM_TEMPORARY
- && src[1].File ==
- PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 :
- VE_MULTIPLY_ADD;
+ 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),
{
unsigned long hw_op;
- hw_op = (src[0].File == PROGRAM_TEMPORARY
- && src[1].File == PROGRAM_TEMPORARY
- && src[2].File ==
- PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 :
- VE_MULTIPLY_ADD;
+ 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),
inst[2] = ZERO_SRC_0;
inst[3] = ZERO_SRC_0;
#else
- hw_op =
- (src[0].File ==
- PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 :
- VE_MULTIPLY_ADD;
+ 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),
// HW mul can take third arg but appears to have some other limitations.
- hw_op = (src[0].File == PROGRAM_TEMPORARY
- && src[1].File ==
- PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 :
- VE_MULTIPLY_ADD;
+ 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),
//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 :
- VE_MULTIPLY_ADD;
+ 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),
inst[2] = ZERO_SRC_0;
inst[3] = ZERO_SRC_0;
#else
- hw_op =
- (src[0].File ==
- PROGRAM_TEMPORARY) ? R300_VPI_OUT_OP_MAD_2 :
- VE_MULTIPLY_ADD;
+ 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),