Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check command-buffer extension version for equality #2215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ int MakeAndRunTest(cl_device_id device, cl_context context,
cl_version extension_version =
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 "
"to run "
log_info("cl_khr_command_buffer version 0.9.5 is required to run "
"the test, skipping.\n ");
return TEST_SKIPPED_ITSELF;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,24 @@ struct BasicMutableCommandBufferTest : BasicCommandBufferTest
"cl_khr_command_buffer_mutable_dispatch")
== true;

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);
if ((device_version >= Version(3, 0))
|| is_extension_available(device, "cl_khr_extended_versioning")) {

cl_version extension_version =
get_extension_version(device, "cl_khr_command_buffer_mutable_dispatch");

if (extension_version < CL_MAKE_VERSION(0, 9, 2)) {
extension_avaliable = false;
}
}
if (extension_avaliable)
{
Version device_version = get_device_cl_version(device);
if ((device_version >= Version(3, 0))
|| is_extension_available(device, "cl_khr_extended_versioning"))
{

cl_version extension_version = get_extension_version(
device, "cl_khr_command_buffer_mutable_dispatch");

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;
}
}
}

cl_mutable_dispatch_fields_khr mutable_capabilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ struct PropertiesArray : public InfoMutableCommandBufferTest
cl_version extension_version = get_extension_version(
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;
}
}
Expand Down
Loading