mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 08:49:02 +00:00
Check command-buffer extension version for equality (#2215)
As described in Issue https://github.com/KhronosGroup/OpenCL-CTS/issues/2152 we currently check the provisional extension version supported by a vendor is the same or older than a test specified version. However, it was discussed in the WG that this should be a check for equality to avoid hitting issues when a implementation tests against an older version of the CTS using a lower extension version, with API breaking changes having occurred since. The tests for the command-buffer family of extensions are the only provisional KHR tests using this versioning check, so this PR updates all those cases to equality.
This commit is contained in:
@@ -104,11 +104,10 @@ int MakeAndRunTest(cl_device_id device, cl_context context,
|
|||||||
cl_version extension_version =
|
cl_version extension_version =
|
||||||
get_extension_version(device, "cl_khr_command_buffer");
|
get_extension_version(device, "cl_khr_command_buffer");
|
||||||
|
|
||||||
if (extension_version < CL_MAKE_VERSION(0, 9, 5))
|
if (extension_version != CL_MAKE_VERSION(0, 9, 5))
|
||||||
{
|
{
|
||||||
|
|
||||||
log_info("cl_khr_command_buffer version 0.9.5 or later is required "
|
log_info("cl_khr_command_buffer version 0.9.5 is required to run "
|
||||||
"to run "
|
|
||||||
"the test, skipping.\n ");
|
"the test, skipping.\n ");
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,17 +80,21 @@ struct BasicMutableCommandBufferTest : BasicCommandBufferTest
|
|||||||
"cl_khr_command_buffer_mutable_dispatch")
|
"cl_khr_command_buffer_mutable_dispatch")
|
||||||
== true;
|
== true;
|
||||||
|
|
||||||
if (extension_avaliable) {
|
if (extension_avaliable)
|
||||||
// API breaking changes occur at revision 0.9.2, check implementation
|
{
|
||||||
// matches tested API
|
|
||||||
Version device_version = get_device_cl_version(device);
|
Version device_version = get_device_cl_version(device);
|
||||||
if ((device_version >= Version(3, 0))
|
if ((device_version >= Version(3, 0))
|
||||||
|| is_extension_available(device, "cl_khr_extended_versioning")) {
|
|| is_extension_available(device, "cl_khr_extended_versioning"))
|
||||||
|
{
|
||||||
|
|
||||||
cl_version extension_version =
|
cl_version extension_version = get_extension_version(
|
||||||
get_extension_version(device, "cl_khr_command_buffer_mutable_dispatch");
|
device, "cl_khr_command_buffer_mutable_dispatch");
|
||||||
|
|
||||||
if (extension_version < CL_MAKE_VERSION(0, 9, 2)) {
|
if (extension_version != CL_MAKE_VERSION(0, 9, 3))
|
||||||
|
{
|
||||||
|
log_info("cl_khr_command_buffer_mutable_dispatch version "
|
||||||
|
"0.9.3 is "
|
||||||
|
"required to run the test, skipping.\n ");
|
||||||
extension_avaliable = false;
|
extension_avaliable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,8 +127,10 @@ struct PropertiesArray : public InfoMutableCommandBufferTest
|
|||||||
cl_version extension_version = get_extension_version(
|
cl_version extension_version = get_extension_version(
|
||||||
device, "cl_khr_command_buffer_mutable_dispatch");
|
device, "cl_khr_command_buffer_mutable_dispatch");
|
||||||
|
|
||||||
if (extension_version < CL_MAKE_VERSION(0, 9, 3))
|
if (extension_version != CL_MAKE_VERSION(0, 9, 3))
|
||||||
{
|
{
|
||||||
|
log_info("cl_khr_command_buffer_mutable_dispatch version 0.9.3 "
|
||||||
|
"is required to run the test, skipping.\n ");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user