[Piglit] [PATCH 2/2 v2] The return code of the function isnan is -1 for vector types.

Yi Sun yi.sun at intel.com
Thu Oct 31 17:20:47 CET 2013


According to the OpenCL spec version 1.2/1.1 chacpter 6.12.6:
The functions isequal, isnotequal, isgreater, isgreaterequal, isless,
islessequal, islessgreater, isfinite, isinf, isnan, isnormal,
isordered, isunordered and signbit described in table 6.14 shall
return a 0 if the specified relation is false and a 1 if the specified
relation is true for scalar argument types. These functions shall return a 0
if the specified relation is false and a –1 (i.e. all bits set)
if the specified relation is true for vector argument types.

Signed-off-by: Yi Sun <yi.sun at intel.com>

diff --git a/generated_tests/generate-cl-relational-builtins.py b/generated_tests/generate-cl-relational-builtins.py
old mode 100644
new mode 100755
index af6849f..457c5bc
--- a/generated_tests/generate-cl-relational-builtins.py
+++ b/generated_tests/generate-cl-relational-builtins.py
@@ -45,9 +45,9 @@ I = {
 tests = {
     'isnan' : {
         'arg_types': [I, F],
-        'function_type': 'ttt',
+        'function_type': 'vvv',
         'values': [
-            [0,   1,            0,   0],            # Result
+            [0,   -1,            0,   0],            # Result
             [0.0, float("nan"), 1.0, float("inf") ] # Arg0
         ]
     }
-- 
1.7.6.4



More information about the Piglit mailing list