mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 14:59:02 +00:00
Use highest OpenCL C version (#1081)
* Set the highest supported OpenCL C version. * Remove gDeviceLt20 variable - not used anymore. * Fix formatting issues
This commit is contained in:
committed by
GitHub
parent
f02cbad2e3
commit
2597027737
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2017 The Khronos Group Inc.
|
||||
//
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -213,14 +213,15 @@ cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeSt
|
||||
return -1;
|
||||
}
|
||||
bool extensions_supported = true;
|
||||
for (auto extension : extensions_list)
|
||||
for (auto extension : extensions_list)
|
||||
{
|
||||
if (!is_extension_available(devices[i], extension.c_str()))
|
||||
{
|
||||
log_error("Required extension not found - device id %d - %s\n", i, extension.c_str());
|
||||
extensions_supported = false;
|
||||
break;
|
||||
}
|
||||
if (!is_extension_available(devices[i], extension.c_str()))
|
||||
{
|
||||
log_error("Required extension not found - device id %d - %s\n", i,
|
||||
extension.c_str());
|
||||
extensions_supported = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if((caps & required_svm_caps) == required_svm_caps && extensions_supported)
|
||||
{
|
||||
@@ -249,10 +250,11 @@ cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeSt
|
||||
test_error(error, "clCreateCommandQueue failed");
|
||||
}
|
||||
|
||||
if(ppCodeString)
|
||||
if (ppCodeString)
|
||||
{
|
||||
error = create_single_kernel_helper(*context, program, 0, 1, ppCodeString, 0, "-cl-std=CL2.0");
|
||||
test_error( error, "failed to create program" );
|
||||
error =
|
||||
create_single_kernel_helper(*context, program, 0, 1, ppCodeString, 0);
|
||||
test_error(error, "failed to create program");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user