[Beignet] [PATCH] fix the relational built-in vector function regression.
xionghu.luo at intel.com
xionghu.luo at intel.com
Tue Aug 5 18:36:31 PDT 2014
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
More information about the Beignet
mailing list