Skip to content

Commit

Permalink
Skip testing mipmaps if extension is not available
Browse files Browse the repository at this point in the history
'./test_image_streams test_mipmaps CL_FILTER_NEAREST' already
skips many tests, but doesn't do so for cl_ext_image_raw10_raw12,
causing it to fail.
Add a check similar to how it is done in the other tests already.
  • Loading branch information
JorWag committed Sep 17, 2024
1 parent c083a87 commit c687ab5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test_conformance/images/kernel_read_write/test_loops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ int test_read_image_formats(cl_device_id device, cl_context context,
bool flipFlop[2] = { false, true };
int normalizedIdx, floatCoordIdx;

if (gTestMipmaps)
{
if (0 == is_extension_available(device, "cl_khr_mipmap_image"))
{
log_info("-----------------------------------------------------\n");
log_info("This device does not support "
"cl_khr_mipmap_image.\nSkipping mipmapped image test. \n");
log_info(
"-----------------------------------------------------\n\n");
return 0;
}
}

// Use this run if we were told to only run a certain filter mode
if (gFilterModeToUse != (cl_filter_mode)-1
Expand Down

0 comments on commit c687ab5

Please sign in to comment.