glsl_to_tgsi: support DDY (ir_unop_dFdy)
authorBryan Cain <bryancain3@gmail.com>
Sun, 1 May 2011 16:55:03 +0000 (11:55 -0500)
committerBryan Cain <bryancain3@gmail.com>
Mon, 1 Aug 2011 22:59:07 +0000 (17:59 -0500)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 08c6a7b2dd327a1c5ef4210ba67a28d461fd8bff..eed9bb0819e0119e3188823dd1ffaa62865701cd 100644 (file)
@@ -1271,6 +1271,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
       emit(ir, OPCODE_DDX, result_dst, op[0]);
       break;
    case ir_unop_dFdy:
+      op[0].negate = ~op[0].negate;
       emit(ir, OPCODE_DDY, result_dst, op[0]);
       break;
 
@@ -3487,12 +3488,6 @@ compile_tgsi_instruction(struct st_translate *t,
    case OPCODE_NOISE4:
       assert(!"OPCODE_NOISE should have been lowered\n");
       break;
-                
-   case OPCODE_DDY:
-      // TODO: copy emit_ddy() function from st_mesa_to_tgsi.c
-      assert(!"OPCODE_DDY");
-      //emit_ddy( t, dst[0], &inst->src[0] );
-      break;
 
    default:
       ureg_insn( ureg,