[Beignet] [PATCH] fix the relational built-in vector function regression.

Song, Ruiling ruiling.song at intel.com
Thu Aug 7 00:02:59 PDT 2014


The patch LGTM.

Thanks!
Ruiling

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of xionghu.luo at intel.com
Sent: Wednesday, August 06, 2014 9:37 AM
To: beignet at lists.freedesktop.org
Cc: Luo, Xionghu
Subject: [Beignet] [PATCH] fix the relational built-in vector function regression.

From: Luo Xionghu <xionghu.luo at intel.com>

the relational vector function need return -1 instead of 1 according to the spec.

Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
 backend/src/gen_builtin_vector.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/src/gen_builtin_vector.py b/backend/src/gen_builtin_vector.py
index 15dbaf4..5f1c4b7 100755
--- a/backend/src/gen_builtin_vector.py
+++ b/backend/src/gen_builtin_vector.py
@@ -301,7 +301,10 @@ class builtinProto():
             for n in range(0, self.paramCount):
               formatStr = self.append(formatStr, '  usrc{0}.pv{1} = param{2};'.format(n, ptype[1], n))
             formatStr = self.append(formatStr, '  for(int i =0; i < {0}; i++)'.format(ptype[1]))
-            formatStr = self.append(formatStr, '    uret.va[i] = {0}('.format(self.functionName))
+            formatStr += '\n    uret.va[i] = '
+            if self.prefix == 'relational' and self.functionName != 'bitselect' and self.functionName != 'select':
+              formatStr += '-'
+            formatStr += '{0}('.format(self.functionName)
 
             for n in range(0, self.paramCount):
               formatStr += 'usrc{0}.pa[i]'.format(n)
--
1.8.3.2

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list