mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
Test api fix - sampler properties is 0 in compatibility mode (#1106)
This commit is contained in:
committed by
GitHub
parent
03a0989998
commit
0d74b3f926
@@ -231,9 +231,23 @@ int test_sampler_params(cl_device_id deviceID, cl_context context,
|
|||||||
error,
|
error,
|
||||||
"clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES size.");
|
"clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES size.");
|
||||||
|
|
||||||
if (set_size != test_properties.size() * sizeof(cl_sampler_properties))
|
if (is_compatibility)
|
||||||
{
|
{
|
||||||
log_error("ERROR: CL_SAMPLER_PROPERTIES size is %d, expected %d.\n",
|
if (set_size != 0)
|
||||||
|
{
|
||||||
|
log_error(
|
||||||
|
"ERROR: CL_SAMPLER_PROPERTIES size is %d, expected 0\n",
|
||||||
|
set_size);
|
||||||
|
return TEST_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (set_size
|
||||||
|
!= test_properties.size() * sizeof(cl_sampler_properties))
|
||||||
|
{
|
||||||
|
log_error(
|
||||||
|
"ERROR: CL_SAMPLER_PROPERTIES size is %d, expected %d.\n",
|
||||||
set_size,
|
set_size,
|
||||||
test_properties.size() * sizeof(cl_sampler_properties));
|
test_properties.size() * sizeof(cl_sampler_properties));
|
||||||
return TEST_FAIL;
|
return TEST_FAIL;
|
||||||
@@ -243,12 +257,14 @@ int test_sampler_params(cl_device_id deviceID, cl_context context,
|
|||||||
check_properties.resize(number_of_props);
|
check_properties.resize(number_of_props);
|
||||||
error = clGetSamplerInfo(sampler, CL_SAMPLER_PROPERTIES, set_size,
|
error = clGetSamplerInfo(sampler, CL_SAMPLER_PROPERTIES, set_size,
|
||||||
check_properties.data(), 0);
|
check_properties.data(), 0);
|
||||||
test_error(error,
|
test_error(
|
||||||
|
error,
|
||||||
"clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES.");
|
"clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES.");
|
||||||
|
|
||||||
error = compareProperties(check_properties, test_properties);
|
error = compareProperties(check_properties, test_properties);
|
||||||
test_error(error, "checkProperties mismatch.");
|
test_error(error, "checkProperties mismatch.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user