Determines whether its valid to skip this test based on the driver version and the features it optionally supports. Whether the test should be skipped is writen into the out paramter skip. The check returns an error code for the clDeviceInfo query.
| 1980 | // Whether the test should be skipped is writen into the out paramter skip. |
| 1981 | // The check returns an error code for the clDeviceInfo query. |
| 1982 | static cl_int should_skip(cl_device_id device, cl_bool& skip) |
| 1983 | { |
| 1984 | // Assume we can't skip to begin with. |
| 1985 | skip = CL_FALSE; |
| 1986 | |
| 1987 | // Progvar tests are already skipped for OpenCL < 2.0, so here we only need |
| 1988 | // to test for 3.0 since that is when program scope global variables become |
| 1989 | // optional. |
| 1990 | if (get_device_cl_version(device) >= Version(3, 0)) |
| 1991 | { |
| 1992 | size_t max_global_variable_size{}; |
| 1993 | test_error(clGetDeviceInfo(device, CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, |
| 1994 | sizeof(max_global_variable_size), |
| 1995 | &max_global_variable_size, nullptr), |
| 1996 | "clGetDeviceInfo failed"); |
| 1997 | skip = (max_global_variable_size != 0) ? CL_FALSE : CL_TRUE; |
| 1998 | } |
| 1999 | return CL_SUCCESS; |
| 2000 | } |
| 2001 | |
| 2002 | //////////////////// |
| 2003 | // Global functions |
no test coverage detected