mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-20 06:29:02 +00:00
Merge branch 'cl20_trunk'
This commit is contained in:
@@ -1327,14 +1327,19 @@ int test_min_max_constant_buffer_size(cl_device_id deviceID, cl_context context,
|
||||
|
||||
log_info("Reported max constant buffer size of %lld bytes.\n", maxSize);
|
||||
|
||||
// Limit test buffer size to 1/8 of CL_DEVICE_GLOBAL_MEM_SIZE
|
||||
error = clGetDeviceInfo(deviceID, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(maxGlobalSize), &maxGlobalSize, 0);
|
||||
test_error(error, "Unable to get CL_DEVICE_GLOBAL_MEM_SIZE");
|
||||
|
||||
if (maxSize > maxGlobalSize / 8)
|
||||
maxSize = maxGlobalSize / 8;
|
||||
|
||||
error = clGetDeviceInfo(deviceID, CL_DEVICE_MAX_MEM_ALLOC_SIZE , sizeof(maxAllocSize), &maxAllocSize, 0);
|
||||
test_error(error, "Unable to get CL_DEVICE_MAX_MEM_ALLOC_SIZE ");
|
||||
|
||||
if (maxSize > maxAllocSize)
|
||||
maxSize = maxAllocSize;
|
||||
|
||||
/* Create a kernel to test with */
|
||||
if( create_single_kernel_helper( context, &program, &kernel, 1, sample_const_arg_kernel, "sample_test" ) != 0 )
|
||||
{
|
||||
@@ -1426,7 +1431,7 @@ int test_min_max_constant_buffer_size(cl_device_id deviceID, cl_context context,
|
||||
|
||||
if (allocPassed) {
|
||||
if (currentSize < maxSize/PASSING_FRACTION) {
|
||||
log_error("Failed to allocate at least 1/4 of the reported constant size.\n");
|
||||
log_error("Failed to allocate at least 1/8 of the reported constant size.\n");
|
||||
return -1;
|
||||
} else if (currentSize != maxSize) {
|
||||
log_info("Passed at reduced size. (%lld of %lld bytes)\n", currentSize, maxSize);
|
||||
|
||||
Reference in New Issue
Block a user