i965: support for sin() and cos() in vertex shaders.
authorSam Hocevar <sam@zoy.org>
Thu, 25 Sep 2008 08:49:05 +0000 (10:49 +0200)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 25 Sep 2008 15:49:36 +0000 (09:49 -0600)
src/mesa/drivers/dri/i965/brw_vs_emit.c

index b0b0449f99c46799179321f64971463d1904700f..9de05408ba901dc5fa57ea8775fd14b546bb6980 100644 (file)
@@ -1024,6 +1024,9 @@ void brw_vs_emit(struct brw_vs_compile *c )
       case OPCODE_ADD:
         brw_ADD(p, dst, args[0], args[1]);
         break;
+      case OPCODE_COS:
+        emit_math1(c, BRW_MATH_FUNCTION_COS, dst, args[0], BRW_MATH_PRECISION_FULL);
+        break;
       case OPCODE_DP3:
         brw_DP3(p, dst, args[0], args[1]);
         break;
@@ -1089,6 +1092,9 @@ void brw_vs_emit(struct brw_vs_compile *c )
       case OPCODE_SEQ:
          emit_seq(p, dst, args[0], args[1]);
          break;
+      case OPCODE_SIN:
+        emit_math1(c, BRW_MATH_FUNCTION_SIN, dst, args[0], BRW_MATH_PRECISION_FULL);
+        break;
       case OPCODE_SNE:
          emit_sne(p, dst, args[0], args[1]);
          break;