diff --git a/CMakeLists.txt b/CMakeLists.txt index 6939390..32eaa03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,3 +40,6 @@ target_link_libraries(DitheringProject PUBLIC ${PNG_LIBRARIES} ${FFMPEG_LIBAVCODEC_LINK_LIBRARIES} ) + +target_compile_definitions(DitheringProject PRIVATE + CL_TARGET_OPENCL_VERSION=300) diff --git a/src/opencl_handle.cc b/src/opencl_handle.cc index 60ee73e..d4baaca 100644 --- a/src/opencl_handle.cc +++ b/src/opencl_handle.cc @@ -780,7 +780,8 @@ OpenCLContext::OpenCLContext() : context_(nullptr), queue_(nullptr) { } // 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) { std::cout << "ERROR: OpenCLContext: Failed to create command queue" << std::endl;