Fix use of deprecated OpenCL function
Also specify use of OpenCL 3.0 instead of depending on default.
This commit is contained in:
parent
1d27fd3b21
commit
d551c9da3b
2 changed files with 5 additions and 1 deletions
|
@ -40,3 +40,6 @@ target_link_libraries(DitheringProject PUBLIC
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${FFMPEG_LIBAVCODEC_LINK_LIBRARIES}
|
${FFMPEG_LIBAVCODEC_LINK_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(DitheringProject PRIVATE
|
||||||
|
CL_TARGET_OPENCL_VERSION=300)
|
||||||
|
|
|
@ -780,7 +780,8 @@ OpenCLContext::OpenCLContext() : context_(nullptr), queue_(nullptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// uses first available device
|
// uses first available device
|
||||||
queue_ = clCreateCommandQueue(context_, devices.at(0), 0, &err_num);
|
queue_ = clCreateCommandQueueWithProperties(context_, devices.at(0), nullptr,
|
||||||
|
&err_num);
|
||||||
if (err_num != CL_SUCCESS) {
|
if (err_num != CL_SUCCESS) {
|
||||||
std::cout << "ERROR: OpenCLContext: Failed to create command queue"
|
std::cout << "ERROR: OpenCLContext: Failed to create command queue"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
Loading…
Reference in a new issue