diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp index 2ab4014e58..6389d11971 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp @@ -24,10 +24,6 @@ #include "device/device.hpp" -/* The pixel internal format for DOPP texture defined in gl_enum.h */ -#define GL_BGR8_ATI 0x8083 -#define GL_BGRA8_ATI 0x8088 - #include #include @@ -1089,14 +1085,6 @@ CL_FLOAT switch(gliInternalFormat) { - case GL_BGR8_ATI: - case GL_BGRA8_ATI: - pclImageFormat->image_channel_order = CL_BGRA; - pclImageFormat->image_channel_data_type = CL_UNORM_INT8;//CL_UNSIGNED_INT8; - *piBytesPerPixel = 4; - bRetVal = true; - break; - case GL_ALPHA8: pclImageFormat->image_channel_order = CL_A; pclImageFormat->image_channel_data_type = CL_UNORM_INT8;//CL_UNSIGNED_INT8; diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp index 62fc51e980..241c6e2239 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp @@ -1041,63 +1041,53 @@ RUNTIME_ENTRY(cl_int, clSetKernelExecInfo, ( return CL_INVALID_KERNEL; } + if (param_name != CL_KERNEL_EXEC_INFO_SVM_PTRS && + param_name != CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM) { + return CL_INVALID_VALUE; + } + if (param_value == NULL) { return CL_INVALID_VALUE; } const amd::Kernel* amdKernel = as_amd(kernel); - switch (param_name) { - case CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM: + if (param_name == CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM) { if (param_value_size != sizeof(cl_bool)) { return CL_INVALID_VALUE; } - else { - const bool flag = *(static_cast(param_value)); - const amd::Context* amdContext = &amdKernel->program().context(); - bool foundFineGrainedSystemDevice = false; - const std::vector& devices = amdContext->devices(); - std::vector::const_iterator it; - for (it = devices.begin(); it != devices.end(); ++it) { - if ((*it)->info().svmCapabilities_ & - CL_DEVICE_SVM_FINE_GRAIN_SYSTEM) { - foundFineGrainedSystemDevice = true; - break; - } - } - if (flag && !foundFineGrainedSystemDevice) { - return CL_INVALID_OPERATION; - } - amdKernel->parameters().setSvmSystemPointersSupport(flag ? FGS_YES : FGS_NO); + + const bool flag = *(static_cast(param_value)); + const amd::Context* amdContext = &amdKernel->program().context(); + bool foundFineGrainedSystemDevice = false; + const std::vector& devices = amdContext->devices(); + std::vector::const_iterator it; + for (it = devices.begin(); it != devices.end(); ++it) { + if ((*it)->info().svmCapabilities_ & + CL_DEVICE_SVM_FINE_GRAIN_SYSTEM) { + foundFineGrainedSystemDevice = true; + break; + } } - break; - case CL_KERNEL_EXEC_INFO_SVM_PTRS: + if (flag && !foundFineGrainedSystemDevice) { + return CL_INVALID_OPERATION; + } + amdKernel->parameters().setSvmSystemPointersSupport(flag ? FGS_YES : FGS_NO); + } + else { if (param_value_size == 0 || !amd::isMultipleOf(param_value_size, - sizeof(void*))) { + sizeof(void*))) { return CL_INVALID_VALUE; } - else { - size_t count = param_value_size/sizeof(void*); - void* const* execInfoArray = reinterpret_cast(param_value); - for (size_t i = 0; i < count; i++) { - if (NULL == execInfoArray[i]) { - return CL_INVALID_VALUE; - } + + size_t count = param_value_size/sizeof(void*); + void* const* execInfoArray = reinterpret_cast(param_value); + for (size_t i = 0; i < count; i++) { + if (NULL == execInfoArray[i]) { + return CL_INVALID_VALUE; } - amdKernel->parameters().addSvmPtr(execInfoArray, count); } - break; - case CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD: - if (param_value_size != sizeof(cl_bool)) { - return CL_INVALID_VALUE; - } - else { - const bool newVcopFlag = (*(reinterpret_cast(param_value))) ? true: false; - amdKernel->parameters().setExecNewVcop(newVcopFlag); - } - break; - default: - return CL_INVALID_VALUE; + amdKernel->parameters().addSvmPtr(execInfoArray, count); } return CL_SUCCESS; diff --git a/projects/clr/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h b/projects/clr/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h index fbfd56e1f3..8d46a40c58 100644 --- a/projects/clr/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h +++ b/projects/clr/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h @@ -266,9 +266,6 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *); **************************/ #define CL_QUEUE_THREAD_HANDLE_AMD 0x403E -/* cl_kernel_exec_info for DVR DOPP texture support */ -#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 - /*************************************** * cl-gl depth buffer interop extension * ****************************************/ diff --git a/projects/clr/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h b/projects/clr/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h index 8a9a773679..5c90d688c3 100644 --- a/projects/clr/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h +++ b/projects/clr/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h @@ -230,9 +230,6 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *); **************************/ #define CL_QUEUE_THREAD_HANDLE_AMD 0x403E -/* cl_kernel_exec_info for DVR DOPP texture support */ -#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 - /*************************************** * cl-gl depth buffer interop extension * ****************************************/ diff --git a/projects/clr/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h b/projects/clr/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h index 9e73a69dda..139a22d002 100644 --- a/projects/clr/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h +++ b/projects/clr/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h @@ -229,9 +229,6 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *); **************************/ #define CL_QUEUE_THREAD_HANDLE_AMD 0x403E -/* cl_kernel_exec_info for DVR DOPP texture support */ -#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 - /*************************************** * cl-gl depth buffer interop extension * ****************************************/