[Piglit] [PATCH 1/2] cl: check for cl_khr_fp64 in generated double store tests

Jan Vesely jan.vesely at rutgers.edu
Fri Nov 29 18:57:54 PST 2013


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generated_tests/generate-cl-store-tests.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/generated_tests/generate-cl-store-tests.py b/generated_tests/generate-cl-store-tests.py
index 58aa3a2..5a09985 100644
--- a/generated_tests/generate-cl-store-tests.py
+++ b/generated_tests/generate-cl-store-tests.py
@@ -39,15 +39,21 @@ if not os.path.exists(dirName):
 def gen_array(size):
     return ' '.join([str(i) for i in xrange(size * 8)])
 
+def ext_req(type_name):
+    if type_name[:6] == "double":
+        return "require_device_extensions: cl_khr_fp64"
+    return ""
+
 
 def print_config(f, type_name, addr_space):
-    f.write(textwrap.dedent("""
+    f.write(textwrap.dedent(("""
     [config]
     name: Store {type_name}
     program_source_file: store-kernels-{addr_space}.inc
     build_options: -D TYPE={type_name}
     dimensions: 1
-    """.format(type_name=type_name, addr_space=addr_space)))
+    """ + ext_req(type_name))
+    .format(type_name=type_name, addr_space=addr_space)))
 
 
 def begin_test(type_name, addr_space):
-- 
1.8.3.1



More information about the Piglit mailing list