[Beignet] [PATCH v5 3/3] Fix out-of-date math macros

Homer Hsing homer.xing at intel.com
Wed May 15 19:54:17 PDT 2013


Gen math function "tan" was replaced by "fdiv", and "sincos" was removed.

Signed-off-by: Homer Hsing <homer.xing at intel.com>
---
 backend/src/backend/gen/gen_mesa_disasm.c | 3 +--
 backend/src/backend/gen_defs.hpp          | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/backend/src/backend/gen/gen_mesa_disasm.c b/backend/src/backend/gen/gen_mesa_disasm.c
index fa52f8c..420cd62 100644
--- a/backend/src/backend/gen/gen_mesa_disasm.c
+++ b/backend/src/backend/gen/gen_mesa_disasm.c
@@ -329,8 +329,7 @@ static const char *math_function[16] = {
   [GEN_MATH_FUNCTION_RSQ] = "rsq",
   [GEN_MATH_FUNCTION_SIN] = "sin",
   [GEN_MATH_FUNCTION_COS] = "cos",
-  [GEN_MATH_FUNCTION_SINCOS] = "sincos",
-  [GEN_MATH_FUNCTION_TAN] = "tan",
+  [GEN_MATH_FUNCTION_FDIV] = "fdiv",
   [GEN_MATH_FUNCTION_POW] = "pow",
   [GEN_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER] = "intdivmod",
   [GEN_MATH_FUNCTION_INT_DIV_QUOTIENT] = "intdiv",
diff --git a/backend/src/backend/gen_defs.hpp b/backend/src/backend/gen_defs.hpp
index 187224a..c7a1581 100644
--- a/backend/src/backend/gen_defs.hpp
+++ b/backend/src/backend/gen_defs.hpp
@@ -350,8 +350,6 @@ enum GenMessageTarget {
 #define GEN_MATH_FUNCTION_RSQ                              5
 #define GEN_MATH_FUNCTION_SIN                              6 /* was 7 */
 #define GEN_MATH_FUNCTION_COS                              7 /* was 8 */
-#define GEN_MATH_FUNCTION_SINCOS                           8 /* was 6 */
-#define GEN_MATH_FUNCTION_TAN                              9 /* gen4 */
 #define GEN_MATH_FUNCTION_FDIV                             9 /* gen6+ */
 #define GEN_MATH_FUNCTION_POW                              10
 #define GEN_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER   11
-- 
1.8.1.2



More information about the Beignet mailing list