From 33b534355a6cf3b76daa072e04e526444e05d80a Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Wed, 12 Nov 2025 13:02:15 -0400 Subject: [PATCH] OpenCL minimum version is 1.2 We use CL_MAP_WRITE_INVALIDATE, and I think one other feature which both require v1.2 minimum --- stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp | 6 +++--- stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp index 1e23a5a..3ac5a66 100644 --- a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp +++ b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp @@ -55,7 +55,7 @@ bool OpenClCollatingAndMeshingEngine::setup() } cl_int err; - cl_queue_properties queueProps[] = {CL_QUEUE_PROPERTIES, 0, 0}; + cl_command_queue_properties queueProps = 0; // Get platform cl_uint numPlatforms; @@ -85,8 +85,8 @@ bool OpenClCollatingAndMeshingEngine::setup() goto cleanup; } - // Create command queue - commandQueue = clCreateCommandQueueWithProperties( + // Create command queue (OpenCL 1.2 API) + commandQueue = clCreateCommandQueue( context, device, queueProps, &err); if (err != CL_SUCCESS || !commandQueue) diff --git a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.h b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.h index f6b6b7a..e53c17a 100644 --- a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.h +++ b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.h @@ -8,7 +8,7 @@ #include #include #include -#define CL_TARGET_OPENCL_VERSION 300 +#define CL_TARGET_OPENCL_VERSION 120 #include #include #include