Change Behaviour of C11 Atomic Tests for OpenCL-3.0 (#944)

* Change setup code in `KernelCode()` to use `_explicit` builtin
variants that are common to both OpenCL-2.X and OpenCL-3.0.

* Only test optional supported builtin variants (`_explicit` signature
 memory_order/scope) for OpenCL-3.0.

* Disable program scope global variable and generic address space tests
for a OpenCL-3.0 driver which does not optionally support these
features.
This commit is contained in:
Jack Frankland
2020-09-22 18:08:32 +02:00
committed by GitHub
parent f7a0936879
commit 9178524d02
5 changed files with 179 additions and 48 deletions

View File

@@ -62,7 +62,15 @@
return TEST_FAIL; \
}
#define test_error(errCode,msg) test_error_ret(errCode,msg,errCode)
#define test_error_ret(errCode,msg,retValue) { if( errCode != CL_SUCCESS ) { print_error( errCode, msg ); return retValue ; } }
#define test_error_ret(errCode, msg, retValue) \
{ \
auto errCodeResult = errCode; \
if (errCodeResult != CL_SUCCESS) \
{ \
print_error(errCodeResult, msg); \
return retValue; \
} \
}
#define print_error(errCode,msg) log_error( "ERROR: %s! (%s from %s:%d)\n", msg, IGetErrorString( errCode ), __FILE__, __LINE__ );
#define test_missing_feature(errCode, msg) test_missing_feature_ret(errCode, msg, errCode)