mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-15 03:28:12 +02:00
include: update CL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
This commit is contained in:
parent
dd97257209
commit
9e673e5773
18 changed files with 199 additions and 44 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
@ -121,6 +121,9 @@ typedef cl_uint cl_khronos_vendor_id;
|
|||
typedef cl_properties cl_mem_properties;
|
||||
#endif
|
||||
typedef cl_uint cl_version;
|
||||
#ifdef CL_VERSION_3_1
|
||||
typedef cl_bitfield cl_device_integer_dot_product_capabilities;
|
||||
#endif
|
||||
|
||||
typedef struct _cl_image_format {
|
||||
cl_channel_order image_channel_order;
|
||||
|
|
@ -171,6 +174,19 @@ typedef struct _cl_name_version {
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef CL_VERSION_3_1
|
||||
|
||||
typedef struct _cl_device_integer_dot_product_acceleration_properties {
|
||||
cl_bool signed_accelerated;
|
||||
cl_bool unsigned_accelerated;
|
||||
cl_bool mixed_signedness_accelerated;
|
||||
cl_bool accumulating_saturating_signed_accelerated;
|
||||
cl_bool accumulating_saturating_unsigned_accelerated;
|
||||
cl_bool accumulating_saturating_mixed_signedness_accelerated;
|
||||
} cl_device_integer_dot_product_acceleration_properties;
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
|
|
@ -290,7 +306,10 @@ typedef struct _cl_name_version {
|
|||
#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
|
||||
#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
|
||||
#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
|
||||
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
|
||||
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 /* deprecated */
|
||||
#ifdef CL_VERSION_3_1
|
||||
#define CL_DEVICE_MAX_WORK_GROUP_SIZES 0x1005
|
||||
#endif
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
|
||||
|
|
@ -344,7 +363,7 @@ typedef struct _cl_name_version {
|
|||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
|
||||
#ifdef CL_VERSION_1_1
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
|
||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
|
||||
|
|
@ -404,12 +423,28 @@ typedef struct _cl_name_version {
|
|||
#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067
|
||||
#define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068
|
||||
#define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069
|
||||
/* 0x106A to 0x106E - Reserved for upcoming KHR extension */
|
||||
#endif
|
||||
#ifdef CL_VERSION_3_1
|
||||
#define CL_DEVICE_UUID 0x106A
|
||||
#define CL_DRIVER_UUID 0x106B
|
||||
#define CL_DEVICE_LUID_VALID 0x106C
|
||||
#define CL_DEVICE_LUID 0x106D
|
||||
#define CL_DEVICE_NODE_MASK 0x106E
|
||||
#endif
|
||||
#ifdef CL_VERSION_3_0
|
||||
#define CL_DEVICE_OPENCL_C_FEATURES 0x106F
|
||||
#define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070
|
||||
#define CL_DEVICE_PIPE_SUPPORT 0x1071
|
||||
#define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072
|
||||
#endif
|
||||
#ifdef CL_VERSION_3_1
|
||||
#define CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES 0x1073
|
||||
#define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT 0x1074
|
||||
#define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED 0x1075
|
||||
#define CL_DEVICE_SPIRV_EXTENDED_INSTRUCTION_SETS 0x12B9
|
||||
#define CL_DEVICE_SPIRV_EXTENSIONS 0x12BA
|
||||
#define CL_DEVICE_SPIRV_CAPABILITIES 0x12BB
|
||||
#endif
|
||||
|
||||
/* cl_device_fp_config - bitfield */
|
||||
#define CL_FP_DENORM (1 << 0)
|
||||
|
|
@ -918,6 +953,18 @@ typedef struct _cl_name_version {
|
|||
(((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \
|
||||
((patch) & CL_VERSION_PATCH_MASK))
|
||||
|
||||
#ifdef CL_VERSION_3_1
|
||||
|
||||
/* Size Constants */
|
||||
#define CL_UUID_SIZE 16
|
||||
#define CL_LUID_SIZE 8
|
||||
|
||||
/* cl_device_integer_dot_product_capabilities - bitfield */
|
||||
#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED (1 << 0)
|
||||
#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT (1 << 1)
|
||||
|
||||
#endif
|
||||
|
||||
/********************************************************************************************************/
|
||||
|
||||
/* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */
|
||||
|
|
@ -1812,6 +1859,18 @@ clEnqueueSVMMigrateMem(cl_command_queue command_queue,
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef CL_VERSION_3_1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelSuggestedLocalWorkSize(cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint work_dim,
|
||||
const size_t * global_work_offset,
|
||||
const size_t * global_work_size,
|
||||
size_t * suggested_local_work_size) CL_API_SUFFIX__VERSION_3_1;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
/* Extension function access
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
@ -883,7 +883,7 @@ clLogMessagesToStderrAPPLE(
|
|||
"cl_khr_icd"
|
||||
|
||||
|
||||
#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 0)
|
||||
#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 1)
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
|
@ -944,6 +944,19 @@ clIcdSetPlatformDispatchDataKHR(
|
|||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
/***************************************************************
|
||||
* cl_khr_icd_unloadable
|
||||
***************************************************************/
|
||||
#define cl_khr_icd_unloadable 1
|
||||
#define CL_KHR_ICD_UNLOADABLE_EXTENSION_NAME \
|
||||
"cl_khr_icd_unloadable"
|
||||
|
||||
|
||||
#define CL_KHR_ICD_UNLOADABLE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_UNLOADABLE_KHR 0x0921
|
||||
|
||||
/***************************************************************
|
||||
* cl_khr_il_program
|
||||
***************************************************************/
|
||||
|
|
@ -4658,6 +4671,28 @@ typedef cl_bitfield cl_context_safety_properties_img;
|
|||
|
||||
#endif /* defined(CL_ENABLE_BETA_EXTENSIONS) */
|
||||
|
||||
/***************************************************************
|
||||
* cl_intel_kernel_allocations_info
|
||||
***************************************************************/
|
||||
#define cl_intel_kernel_allocations_info 1
|
||||
#define CL_INTEL_KERNEL_ALLOCATIONS_INFO_EXTENSION_NAME \
|
||||
"cl_intel_kernel_allocations_info"
|
||||
|
||||
|
||||
#define CL_INTEL_KERNEL_ALLOCATIONS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
|
||||
|
||||
/* type cl_unified_shared_memory_type_intel */
|
||||
|
||||
typedef struct _cl_kernel_allocation_info_intel {
|
||||
void* base;
|
||||
size_t size;
|
||||
cl_unified_shared_memory_type_intel type;
|
||||
cl_int arg_index;
|
||||
} cl_kernel_allocation_info_intel;
|
||||
|
||||
/* cl_kernel_workgroup_info */
|
||||
#define CL_KERNEL_ALLOCATIONS_INFO_INTEL 0x425A
|
||||
|
||||
/***************************************************************
|
||||
* cl_qcom_perf_hint
|
||||
***************************************************************/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2023-2026 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.
|
||||
|
|
@ -1181,4 +1181,19 @@ clCreateImageWithProperties_fn CL_API_SUFFIX__VERSION_3_0;
|
|||
|
||||
#endif /* CL_VERSION_3_0 */
|
||||
|
||||
#ifdef CL_VERSION_3_1
|
||||
|
||||
typedef cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSize_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint work_dim,
|
||||
const size_t* global_work_offset,
|
||||
const size_t* global_work_size,
|
||||
size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_1;
|
||||
|
||||
typedef clGetKernelSuggestedLocalWorkSize_t *
|
||||
clGetKernelSuggestedLocalWorkSize_fn CL_API_SUFFIX__VERSION_3_1;
|
||||
|
||||
#endif /* CL_VERSION_3_1 */
|
||||
|
||||
#endif /* OPENCL_CL_FUNCTION_TYPES_H_ */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2021 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2019-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2019-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2019-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2019-2026 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.
|
||||
|
|
@ -329,6 +329,13 @@ typedef struct _cl_icd_dispatch {
|
|||
void *clSetContextDestructorCallback;
|
||||
#endif
|
||||
|
||||
/* OpenCL 3.1 */
|
||||
#ifdef CL_VERSION_3_1
|
||||
clGetKernelSuggestedLocalWorkSize_t *clGetKernelSuggestedLocalWorkSize;
|
||||
#else
|
||||
void *clGetKernelSuggestedLocalWorkSize;
|
||||
#endif
|
||||
|
||||
} cl_icd_dispatch;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
@ -54,10 +54,11 @@ extern "C" {
|
|||
"cl_loader_layers"
|
||||
|
||||
|
||||
#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
|
||||
#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 1)
|
||||
|
||||
typedef cl_uint cl_layer_info;
|
||||
typedef cl_uint cl_layer_api_version;
|
||||
typedef cl_properties cl_layer_properties;
|
||||
|
||||
/* cl_layer_info */
|
||||
#define CL_LAYER_API_VERSION 0x4240
|
||||
|
|
@ -65,6 +66,7 @@ typedef cl_uint cl_layer_api_version;
|
|||
|
||||
/* Misc API enums */
|
||||
#define CL_LAYER_API_VERSION_100 100
|
||||
#define CL_LAYER_PROPERTIES_LIST_END ((cl_layer_properties)0)
|
||||
|
||||
|
||||
typedef cl_int CL_API_CALL
|
||||
|
|
@ -87,6 +89,24 @@ clInitLayer_t(
|
|||
typedef clInitLayer_t *
|
||||
clInitLayer_fn ;
|
||||
|
||||
typedef cl_int CL_API_CALL
|
||||
clInitLayerWithProperties_t(
|
||||
cl_uint num_entries,
|
||||
const cl_icd_dispatch* target_dispatch,
|
||||
cl_uint* num_entries_ret,
|
||||
const cl_icd_dispatch** layer_dispatch_ret,
|
||||
const cl_layer_properties* properties);
|
||||
|
||||
typedef clInitLayerWithProperties_t *
|
||||
clInitLayerWithProperties_fn ;
|
||||
|
||||
typedef cl_int CL_API_CALL
|
||||
clDeinitLayer_t(
|
||||
void );
|
||||
|
||||
typedef clDeinitLayer_t *
|
||||
clDeinitLayer_fn ;
|
||||
|
||||
/*
|
||||
** The function pointer typedefs prefixed with "pfn_" are provided for
|
||||
** compatibility with earlier versions of the headers. New code is
|
||||
|
|
@ -100,6 +120,12 @@ pfn_clGetLayerInfo ;
|
|||
typedef clInitLayer_t *
|
||||
pfn_clInitLayer ;
|
||||
|
||||
typedef clInitLayerWithProperties_t *
|
||||
pfn_clInitLayerWithProperties ;
|
||||
|
||||
typedef clDeinitLayer_t *
|
||||
pfn_clDeinitLayer ;
|
||||
|
||||
#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
|
|
@ -116,6 +142,18 @@ clInitLayer(
|
|||
cl_uint* num_entries_ret,
|
||||
const cl_icd_dispatch** layer_dispatch_ret) ;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clInitLayerWithProperties(
|
||||
cl_uint num_entries,
|
||||
const cl_icd_dispatch* target_dispatch,
|
||||
cl_uint* num_entries_ret,
|
||||
const cl_icd_dispatch** layer_dispatch_ret,
|
||||
const cl_layer_properties* properties) ;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clDeinitLayer(
|
||||
void ) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
@ -23,24 +23,20 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if !defined(CL_API_ENTRY)
|
||||
#define CL_API_ENTRY
|
||||
#endif
|
||||
#if !defined(CL_API_CALL)
|
||||
#define CL_API_CALL __stdcall
|
||||
#endif
|
||||
#if !defined(CL_CALLBACK)
|
||||
#define CL_CALLBACK __stdcall
|
||||
#endif
|
||||
#else
|
||||
#if !defined(CL_API_ENTRY)
|
||||
#define CL_API_ENTRY
|
||||
#endif
|
||||
#if !defined(CL_API_CALL)
|
||||
#if !defined(CL_API_ENTRY)
|
||||
#define CL_API_ENTRY
|
||||
#endif
|
||||
#if !defined(CL_API_CALL)
|
||||
#if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
|
||||
#define CL_API_CALL __stdcall
|
||||
#else
|
||||
#define CL_API_CALL
|
||||
#endif
|
||||
#if !defined(CL_CALLBACK)
|
||||
#endif
|
||||
#if !defined(CL_CALLBACK)
|
||||
#if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
|
||||
#define CL_CALLBACK __stdcall
|
||||
#else
|
||||
#define CL_CALLBACK
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -71,6 +67,7 @@ extern "C" {
|
|||
#define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON
|
||||
#define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON
|
||||
#define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON
|
||||
#define CL_API_SUFFIX__VERSION_3_1 CL_API_SUFFIX_COMMON
|
||||
#define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018-2020 The Khronos Group Inc.
|
||||
* Copyright (c) 2018-2026 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.
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
|
||||
#define CL_TARGET_OPENCL_VERSION 300
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 310 (OpenCL 3.1)")
|
||||
#define CL_TARGET_OPENCL_VERSION 310
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
|
|
@ -28,14 +28,18 @@
|
|||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220 && \
|
||||
CL_TARGET_OPENCL_VERSION != 300
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)")
|
||||
CL_TARGET_OPENCL_VERSION != 300 && \
|
||||
CL_TARGET_OPENCL_VERSION != 310
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300, 310). Defaulting to 310 (OpenCL 3.1)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 300
|
||||
#define CL_TARGET_OPENCL_VERSION 310
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 310 && !defined(CL_VERSION_3_1)
|
||||
#define CL_VERSION_3_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0)
|
||||
#define CL_VERSION_3_0 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2021 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2026 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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue