summaryrefslogtreecommitdiff
path: root/tests/cl
AgeCommit message (Collapse)AuthorFilesLines
2017-05-01cl: Add input dependent test for global_offsetJan Vesely1-0/+18
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-05-01cl: Add array of structures to program-scope-arrays testJan Vesely1-0/+60
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-04-05cl: OCL1.1 allows pointers to NULL as valid kernel argsJan Vesely1-9/+12
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-04-05cl: Unmap mapped cl buffer in buffer-flags testJan Vesely1-0/+5
v2: compare to out_data add comment style Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-02-09cl: Add sign_extend_inreg testMatt Arsenault1-0/+387
v2: Rename test file Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-01-27cl: Add tests for stored fnegMatt Arsenault2-23/+55
Make sure fneg that can't be folded into a use operand is executed correctly. v2: Merge with other test v3: Remove other test Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-01-27cl: Add tests for fdiv with neg/abs inputsMatt Arsenault2-0/+519
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-12-09cl: Add test for negative index + small offset for privateMatt Arsenault1-0/+101
v2(jan) : Remove dead code Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-12-08cl: Add tests for 24-bit div / rem optimizationMatt Arsenault1-0/+1657
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-12-08cl: Add f32 immediate testsMatt Arsenault1-0/+230
v2(Jan): drop redundant pragma cl_khr_fp64 add -cl-denorms-are-zero to build cmdline fix whitespace error Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-12-06cl: Add test for clz optimizationsMatt Arsenault1-0/+389
v2: Rename test (Jan) rename config name too Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-12-06cl: Add test for f64 inline immediatesMatt Arsenault1-0/+270
v2: Require cl_khr_fp64 Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-11-10cl: add clGetExtensionFunctionAddressForPlatformSerge Martin2-0/+102
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-11-07cl: Use HAVE_LIBRT to determine linking with rt.Vinson Lee1-1/+1
Fix build error on Mac OS X. Linking C executable ../../../../../bin/cl-custom-use-sub-buffer-in-kernel ld: library not found for -lrt Fixes: e34b54672cbb ("cl: Fix build on systems where clock_gettime is only avaiable in librt") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-10-19cl: Add a test for the predefined macrosNiels Ole Salscheider2-0/+464
v7(jan): return skip instead of pass if OpenCL C version string API was not availabel at build time print version string if parsing fails set subtests to fail instead of merging to global result fix format string to include whitespace (for cl c version) v6: Fix OpenCL C version test if test is compiled against OpenCL 1.0 v5: Use sscanf, fix CL_DEVICE_OPENCL_C_VERSION include guard, fix logic v4: Test against env->version instead of opencl_version and never report PIGLIT_SKIP for the values of IMAGE_SUPPORT and ENDIAN_LITTLE v3: Fix alignment and typos v2: Check the values of the defines and add more checks Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-08-24cl: Use right comparison function for doubleMatt Arsenault1-6/+6
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-08-24cl: Fix use of uninitialized variable valgrind errorMatt Arsenault1-1/+1
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-08-17cl: Add vstore test generatorJan Vesely1-126/+0
The tests try to use target mem type aligned access. Generated tests pass (except vstore-half which skips) on intel(cpu), beignet, nvidia CUDA v2: Move code to main function, update copyright Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-08-17cl: Add support for cl_half to program testerJan Vesely1-4/+27
Use explicit conversion from regexp matched array values v2: distance between two half numbers is 8192 single float ulps no need to place converted float in the middle of single precision range Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Tom Stellard <thomas.stellard@amd.com>
2016-06-22cl: Add global atomic_xchg testsJan Vesely2-0/+175
Passes on CUDA, beignet, clover on kaveri, and intel CPU. v2: fix threads float test name Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by : Serge Martin <edb+piglit@sigluy.net>
2016-06-22cl: Add global atomic_cmpxchg testsJan Vesely2-0/+142
Passes on CUDA, beignet, clover on kaveri, intel CPU. v2: fixup whitespace Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by : Serge Martin <edb+piglit@sigluy.net>
2016-05-17tests/cl: Fix pointer warningDylan Baker1-1/+2
clCreatProgramWithBinary expects a "const unsigned char **", but the code passes an "unsighed char **". This is a particular kind of messiness that is hard to fix, so just cast when passing into clCreateProgramWithBinary. Thanks to idr and Matt for help getting this right. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-05-17cl: add global offset testJan Vesely1-0/+85
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-05-17cl: add support for global offsetJan Vesely9-13/+47
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-05-09cl: check for image support using util/ functionsSerge Martin5-79/+5
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-05-06cl: Fix cl_khr_fp64 checksJan Vesely2-3/+6
v2: fix sizeof test v3: OCL1.0 is OK with extension : enable Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-05-02cl: skip get image info test if there's no image supportJan Vesely1-2/+23
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-04-29cl: Initialize result variable.Jan Vesely1-1/+1
Fixes Unknown status "Unknown result" python exception. Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-04-26cl: Fix image support when built on CL<1.2Jan Vesely1-1/+1
Provide our own image_desc structure since it's too tangled to remove. Tests that require OCL 1.2 result in WARN: Piglit was compiled with lower OpenCL version (1.1) than version_min: 12. OCL 1.1 image tests pass on Intel CPU OCL when compiled in 1.1 environment. Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-03-14cl: Split setKernelArg into subtestsJan Vesely1-24/+31
v2: coalesce input checks into one subtest Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2016-03-05cl: clSetKernelArg test more args kindSerge Martin1-3/+27
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-03-05cl: clSetKernelArg check for image supportSerge Martin1-14/+37
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-03-03cl: add image attribute testZoltan Gilian1-0/+31
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: add image reading testsZoltan Gilian2-0/+151
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: add image writing testsZoltan Gilian1-0/+81
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: do not allow mismatching types for in-out argsZoltan Gilian1-3/+19
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: reword arg_out value errorZoltan Gilian1-1/+1
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: add image and sampler argument support to program-testerZoltan Gilian1-32/+574
Only 2D images are supported yet. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-03-03cl: rename buffer_arg to mem_argZoltan Gilian1-47/+47
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-02-23CL: Add tests to make sure that ilogb(0.0 or nan) returns FP_ILOGB0|FP_ILOGBNANAaron Watry1-0/+31
Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-02-14cl: improve clLinkProgramSerge Martin1-7/+31
skip the test if there is no linker available fix CL_LINKER_NOT_AVAILABLE detection by testing device one by one print the build log in case of error
2016-01-27cl: Extend program scope arrays with more typesJan Vesely1-4/+98
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-01-27cl: Don't warn when using deprecated functions.Jan Vesely1-10/+4
Deprecated features are required to be supported until they are removed. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2016-01-27cl: Add scalar to constant load testJan Vesely1-4/+14
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2015-11-29cl-api-enqueue-fill-image: Fix memory leaks.Vinson Lee1-1/+3
Fixes Coverity "resource leak" defects. Suggested-by: Serge Martin <edb+piglit@sigluy.net> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2015-10-26cl-api-create-context: Remove unused variables.Vinson Lee1-3/+0
create-context.c:141:15: warning: unused variable 'num_platform_ids' [-Wunused-variable] unsigned int num_platform_ids; ^ create-context.c:139:7: warning: unused variable 'found_invalid_platform' [-Wunused-variable] bool found_invalid_platform = false; ^ create-context.c:140:18: warning: unused variable 'platform_ids' [-Wunused-variable] cl_platform_id* platform_ids; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
2015-10-06cl: Update integer/long limit tests to detect incorrect storage sizesAaron Watry1-6/+6
The tests for the integer/long minimums do not properly check that the value is stored in the correct type. E.g. (-2147483648) actually gets parsed as a long by the preprocessor, and therefore INT_MIN is actually stored as long and can't be automatically vectorized. By subtracting a vector with value of 0 from the given defined *_MIN and then grabbing the first element of the resulting vector, we can make sure that the values are actually stored in the correct type. v2: Remove char/short modifications. Test *_MAX vectorization as well as _MIN for int/long Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reported-By: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> Signed-off-by: Aaron Watry <awatry@gmail.com>
2015-10-04cl: add printf builtinSerge Martin1-0/+9
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-09-30cl: fix get-kernel-arg-info indentationSerge Martin1-208/+208
2015-09-30cl: add clEnqueueFillImageSerge Martin2-0/+335