mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
images: Stop checking gDeviceType != CL_DEVICE_TYPE_GPU (#1418)
* images: Stop checking gDeviceType != CL_DEVICE_TYPE_GPU If the device type also advertises CL_DEVICE_TYPE_DEFAULT (which should be valid), this causes it to be considered a CPU device and the tests enforce different precision and rounding expectations. * Fix clang-format * Drop redundant NORM_OFFSET checks
This commit is contained in:
@@ -557,7 +557,7 @@ int test_read_image(cl_context context, cl_command_queue queue,
|
||||
// Apple requires its CPU implementation to do
|
||||
// correctly rounded address arithmetic in all
|
||||
// modes
|
||||
|| gDeviceType != CL_DEVICE_TYPE_GPU
|
||||
|| !(gDeviceType & CL_DEVICE_TYPE_GPU)
|
||||
#endif
|
||||
)
|
||||
offset = 0.0f; // Loop only once
|
||||
@@ -875,7 +875,7 @@ int test_read_image(cl_context context, cl_command_queue queue,
|
||||
// Apple requires its CPU implementation to do
|
||||
// correctly rounded address arithmetic in all
|
||||
// modes
|
||||
|| gDeviceType != CL_DEVICE_TYPE_GPU
|
||||
|| !(gDeviceType & CL_DEVICE_TYPE_GPU)
|
||||
#endif
|
||||
)
|
||||
offset = 0.0f; // Loop only once
|
||||
@@ -1214,7 +1214,8 @@ int test_read_image(cl_context context, cl_command_queue queue,
|
||||
// offsets (0.0, 0.0) E.g., test one
|
||||
// pixel.
|
||||
if (!imageSampler->normalized_coords
|
||||
|| gDeviceType != CL_DEVICE_TYPE_GPU
|
||||
|| !(gDeviceType
|
||||
& CL_DEVICE_TYPE_GPU)
|
||||
|| NORM_OFFSET == 0)
|
||||
{
|
||||
norm_offset_x = 0.0f;
|
||||
@@ -1396,7 +1397,8 @@ int test_read_image(cl_context context, cl_command_queue queue,
|
||||
// offsets (0.0, 0.0) E.g., test one
|
||||
// pixel.
|
||||
if (!imageSampler->normalized_coords
|
||||
|| gDeviceType != CL_DEVICE_TYPE_GPU
|
||||
|| !(gDeviceType
|
||||
& CL_DEVICE_TYPE_GPU)
|
||||
|| NORM_OFFSET == 0)
|
||||
{
|
||||
norm_offset_x = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user