diff --git a/test_conformance/allocations/allocation_fill.cpp b/test_conformance/allocations/allocation_fill.cpp index a7558942..b4ea3798 100644 --- a/test_conformance/allocations/allocation_fill.cpp +++ b/test_conformance/allocations/allocation_fill.cpp @@ -200,8 +200,10 @@ int fill_image_with_data(cl_context context, cl_device_id device_id, cl_command_ result = clFinish(*queue); if (result != SUCCEEDED) { - print_error(error, "clFinish failed after successful enquing filling buffer with data."); - return result; + print_error(error, + "clFinish failed after successful enqueuing filling " + "buffer with data."); + return result; } } else { error = clEnqueueWriteImage(*queue, mem, CL_FALSE, origin, region, 0, 0, data, 0, NULL, &event); diff --git a/test_conformance/allocations/allocation_functions.cpp b/test_conformance/allocations/allocation_functions.cpp index 7182c727..827ee104 100644 --- a/test_conformance/allocations/allocation_functions.cpp +++ b/test_conformance/allocations/allocation_functions.cpp @@ -37,8 +37,8 @@ int find_good_image_size(cl_device_id device_id, size_t size_to_allocate, size_t } if (size_to_allocate == 0) { - log_error("Trying to allcoate a zero sized image.\n"); - return FAILED_ABORT; + log_error("Trying to allocate a zero sized image.\n"); + return FAILED_ABORT; } error = clGetDeviceInfo( device_id, CL_DEVICE_IMAGE2D_MAX_WIDTH, sizeof( max_width ), &max_width, NULL ); diff --git a/test_conformance/allocations/main.cpp b/test_conformance/allocations/main.cpp index 0dec4c6d..43e81277 100644 --- a/test_conformance/allocations/main.cpp +++ b/test_conformance/allocations/main.cpp @@ -112,6 +112,8 @@ int doTest( cl_device_id device, cl_context context, cl_command_queue queue, All int number_of_mems_used; cl_ulong max_individual_allocation_size = g_max_individual_allocation_size; cl_ulong global_mem_size = g_global_mem_size ; + const bool allocate_image = + (alloc_type != BUFFER) && (alloc_type != BUFFER_NON_BLOCKING); static const char* alloc_description[] = { "buffer(s)", @@ -123,7 +125,7 @@ int doTest( cl_device_id device, cl_context context, cl_command_queue queue, All }; // Skip image tests if we don't support images on the device - if( alloc_type > BUFFER && checkForImageSupport( device ) ) + if (allocate_image && checkForImageSupport(device)) { log_info( "Can not test image allocation because device does not support images.\n" ); return 0; @@ -132,7 +134,7 @@ int doTest( cl_device_id device, cl_context context, cl_command_queue queue, All // This section was added in order to fix a bug in the test // If CL_DEVICE_MAX_MEM_ALLOC_SIZE is much grater than CL_DEVICE_IMAGE2D_MAX_WIDTH * CL_DEVICE_IMAGE2D_MAX_HEIGHT // The test will fail in image allocations as the size requested for the allocation will be much grater than the maximum size allowed for image - if( ( alloc_type != BUFFER ) && ( alloc_type != BUFFER_NON_BLOCKING ) ) + if (allocate_image) { size_t max_width, max_height;