2 * Copyright © 2012 Blaž Tomažič <blaz.tomazic@gmail.com>
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 #include "piglit-util-cl.h"
27 piglit_cl_get_enum_name(cl_uint param
)
29 #define CASE(x) case x: return #x;
31 /* Enums are copied from cl.h header and then the bitfield
32 * and non-unique enums are commented out (only one group
33 * of intersecting groups of enums is left uncommented).
41 CASE(CL_DEVICE_NOT_FOUND) // -1
42 CASE(CL_DEVICE_NOT_AVAILABLE) // -2
43 CASE(CL_COMPILER_NOT_AVAILABLE) // -3
44 CASE(CL_MEM_OBJECT_ALLOCATION_FAILURE) // -4
45 CASE(CL_OUT_OF_RESOURCES) // -5
46 CASE(CL_OUT_OF_HOST_MEMORY) // -6
47 CASE(CL_PROFILING_INFO_NOT_AVAILABLE) // -7
48 CASE(CL_MEM_COPY_OVERLAP) // -8
49 CASE(CL_IMAGE_FORMAT_MISMATCH) // -9
50 CASE(CL_IMAGE_FORMAT_NOT_SUPPORTED) // -10
51 CASE(CL_BUILD_PROGRAM_FAILURE) // -11
52 CASE(CL_MAP_FAILURE) // -12
54 CASE(CL_MISALIGNED_SUB_BUFFER_OFFSET) // -13
55 CASE(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST) // -14
56 #endif //CL_VERSION_1_1
58 CASE(CL_COMPILE_PROGRAM_FAILURE) // -15
59 CASE(CL_LINKER_NOT_AVAILABLE) // -16
60 CASE(CL_LINK_PROGRAM_FAILURE) // -17
61 CASE(CL_DEVICE_PARTITION_FAILED) // -18
62 CASE(CL_KERNEL_ARG_INFO_NOT_AVAILABLE) // -19
63 #endif //CL_VERSION_1_2
65 CASE(CL_INVALID_VALUE) // -30
66 CASE(CL_INVALID_DEVICE_TYPE) // -31
67 CASE(CL_INVALID_PLATFORM) // -32
68 CASE(CL_INVALID_DEVICE) // -33
69 CASE(CL_INVALID_CONTEXT) // -34
70 CASE(CL_INVALID_QUEUE_PROPERTIES) // -35
71 CASE(CL_INVALID_COMMAND_QUEUE) // -36
72 CASE(CL_INVALID_HOST_PTR) // -37
73 CASE(CL_INVALID_MEM_OBJECT) // -38
74 CASE(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR) // -39
75 CASE(CL_INVALID_IMAGE_SIZE) // -40
76 CASE(CL_INVALID_SAMPLER) // -41
77 CASE(CL_INVALID_BINARY) // -42
78 CASE(CL_INVALID_BUILD_OPTIONS) // -43
79 CASE(CL_INVALID_PROGRAM) // -44
80 CASE(CL_INVALID_PROGRAM_EXECUTABLE) // -45
81 CASE(CL_INVALID_KERNEL_NAME) // -46
82 CASE(CL_INVALID_KERNEL_DEFINITION) // -47
83 CASE(CL_INVALID_KERNEL) // -48
84 CASE(CL_INVALID_ARG_INDEX) // -49
85 CASE(CL_INVALID_ARG_VALUE) // -50
86 CASE(CL_INVALID_ARG_SIZE) // -51
87 CASE(CL_INVALID_KERNEL_ARGS) // -52
88 CASE(CL_INVALID_WORK_DIMENSION) // -53
89 CASE(CL_INVALID_WORK_GROUP_SIZE) // -54
90 CASE(CL_INVALID_WORK_ITEM_SIZE) // -55
91 CASE(CL_INVALID_GLOBAL_OFFSET) // -56
92 CASE(CL_INVALID_EVENT_WAIT_LIST) // -57
93 CASE(CL_INVALID_EVENT) // -58
94 CASE(CL_INVALID_OPERATION) // -59
95 CASE(CL_INVALID_GL_OBJECT) // -60
96 CASE(CL_INVALID_BUFFER_SIZE) // -61
97 CASE(CL_INVALID_MIP_LEVEL) // -62
98 CASE(CL_INVALID_GLOBAL_WORK_SIZE) // -63
100 CASE(CL_INVALID_PROPERTY) // -64
101 #endif //CL_VERSION_1_1
102 #ifdef CL_VERSION_1_2
103 CASE(CL_INVALID_IMAGE_DESCRIPTOR) // -65
104 CASE(CL_INVALID_COMPILER_OPTIONS) // -66
105 CASE(CL_INVALID_LINKER_OPTIONS) // -67
106 CASE(CL_INVALID_DEVICE_PARTITION_COUNT) // -68
107 #endif //CL_VERSION_1_2
112 CASE(CL_VERSION_1_0) // 1
113 CASE(CL_VERSION_1_1) // 1
114 CASE(CL_VERSION_1_2) // 1
121 CASE(CL_BLOCKING) // CL_TRUE
122 CASE(CL_NON_BLOCKING) // CL_FALSE
125 /* cl_platform_info */
126 CASE(CL_PLATFORM_PROFILE
) // 0x0900
127 CASE(CL_PLATFORM_VERSION
) // 0x0901
128 CASE(CL_PLATFORM_NAME
) // 0x0902
129 CASE(CL_PLATFORM_VENDOR
) // 0x0903
130 CASE(CL_PLATFORM_EXTENSIONS
) // 0x0904
132 /* cl_device_type - bitfield */
134 CASE(CL_DEVICE_TYPE_DEFAULT) // (1 << 0)
135 CASE(CL_DEVICE_TYPE_CPU) // (1 << 1)
136 CASE(CL_DEVICE_TYPE_GPU) // (1 << 2)
137 CASE(CL_DEVICE_TYPE_ACCELERATOR) // (1 << 3)
138 CASE(CL_DEVICE_TYPE_CUSTOM) // (1 << 4)
139 CASE(CL_DEVICE_TYPE_ALL) // 0xFFFFFFFF
143 CASE(CL_DEVICE_TYPE
) // 0x1000
144 CASE(CL_DEVICE_VENDOR_ID
) // 0x1001
145 CASE(CL_DEVICE_MAX_COMPUTE_UNITS
) // 0x1002
146 CASE(CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
) // 0x1003
147 CASE(CL_DEVICE_MAX_WORK_GROUP_SIZE
) // 0x1004
148 CASE(CL_DEVICE_MAX_WORK_ITEM_SIZES
) // 0x1005
149 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
) // 0x1006
150 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
) // 0x1007
151 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
) // 0x1008
152 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
) // 0x1009
153 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
) // 0x100A
154 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
) // 0x100B
155 CASE(CL_DEVICE_MAX_CLOCK_FREQUENCY
) // 0x100C
156 CASE(CL_DEVICE_ADDRESS_BITS
) // 0x100D
157 CASE(CL_DEVICE_MAX_READ_IMAGE_ARGS
) // 0x100E
158 CASE(CL_DEVICE_MAX_WRITE_IMAGE_ARGS
) // 0x100F
159 CASE(CL_DEVICE_MAX_MEM_ALLOC_SIZE
) // 0x1010
160 CASE(CL_DEVICE_IMAGE2D_MAX_WIDTH
) // 0x1011
161 CASE(CL_DEVICE_IMAGE2D_MAX_HEIGHT
) // 0x1012
162 CASE(CL_DEVICE_IMAGE3D_MAX_WIDTH
) // 0x1013
163 CASE(CL_DEVICE_IMAGE3D_MAX_HEIGHT
) // 0x1014
164 CASE(CL_DEVICE_IMAGE3D_MAX_DEPTH
) // 0x1015
165 CASE(CL_DEVICE_IMAGE_SUPPORT
) // 0x1016
166 CASE(CL_DEVICE_MAX_PARAMETER_SIZE
) // 0x1017
167 CASE(CL_DEVICE_MAX_SAMPLERS
) // 0x1018
168 CASE(CL_DEVICE_MEM_BASE_ADDR_ALIGN
) // 0x1019
169 CASE(CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
) // 0x101A
170 CASE(CL_DEVICE_SINGLE_FP_CONFIG
) // 0x101B
171 CASE(CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
) // 0x101C
172 CASE(CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
) // 0x101D
173 CASE(CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
) // 0x101E
174 CASE(CL_DEVICE_GLOBAL_MEM_SIZE
) // 0x101F
175 CASE(CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
) // 0x1020
176 CASE(CL_DEVICE_MAX_CONSTANT_ARGS
) // 0x1021
177 CASE(CL_DEVICE_LOCAL_MEM_TYPE
) // 0x1022
178 CASE(CL_DEVICE_LOCAL_MEM_SIZE
) // 0x1023
179 CASE(CL_DEVICE_ERROR_CORRECTION_SUPPORT
) // 0x1024
180 CASE(CL_DEVICE_PROFILING_TIMER_RESOLUTION
) // 0x1025
181 CASE(CL_DEVICE_ENDIAN_LITTLE
) // 0x1026
182 CASE(CL_DEVICE_AVAILABLE
) // 0x1027
183 CASE(CL_DEVICE_COMPILER_AVAILABLE
) // 0x1028
184 CASE(CL_DEVICE_EXECUTION_CAPABILITIES
) // 0x1029
185 #ifdef CL_VERSION_2_0
186 CASE(CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
) // 0x102A
187 #else //CL_VERSION_2_0
188 CASE(CL_DEVICE_QUEUE_PROPERTIES
) // 0x102A
189 #endif //CL_VERSION_2_0
190 CASE(CL_DEVICE_NAME
) // 0x102B
191 CASE(CL_DEVICE_VENDOR
) // 0x102C
192 CASE(CL_DRIVER_VERSION
) // 0x102D
193 CASE(CL_DEVICE_PROFILE
) // 0x102E
194 CASE(CL_DEVICE_VERSION
) // 0x102F
195 CASE(CL_DEVICE_EXTENSIONS
) // 0x1030
196 CASE(CL_DEVICE_PLATFORM
) // 0x1031
197 #ifdef CL_VERSION_1_2
198 CASE(CL_DEVICE_DOUBLE_FP_CONFIG
) // 0x1032
199 #endif //CL_VERSION_1_2
200 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
201 #ifdef CL_VERSION_1_1
202 CASE(CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF
) // 0x1034
203 CASE(CL_DEVICE_HOST_UNIFIED_MEMORY
) // 0x1035
204 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR
) // 0x1036
205 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT
) // 0x1037
206 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_INT
) // 0x1038
207 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG
) // 0x1039
208 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT
) // 0x103A
209 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
) // 0x103B
210 CASE(CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF
) // 0x103C
211 CASE(CL_DEVICE_OPENCL_C_VERSION
) // 0x103D
212 #endif //CL_VERSION_1_1
213 #ifdef CL_VERSION_1_2
214 CASE(CL_DEVICE_LINKER_AVAILABLE
) // 0x103E
215 CASE(CL_DEVICE_BUILT_IN_KERNELS
) // 0x103F
216 CASE(CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
) // 0x1040
217 CASE(CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
) // 0x1041
218 CASE(CL_DEVICE_PARENT_DEVICE
) // 0x1042
219 CASE(CL_DEVICE_PARTITION_MAX_SUB_DEVICES
) // 0x1043
220 CASE(CL_DEVICE_PARTITION_PROPERTIES
) // 0x1044
221 CASE(CL_DEVICE_PARTITION_AFFINITY_DOMAIN
) // 0x1045
222 CASE(CL_DEVICE_PARTITION_TYPE
) // 0x1046
223 CASE(CL_DEVICE_REFERENCE_COUNT
) // 0x1047
224 CASE(CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
) // 0x1048
225 CASE(CL_DEVICE_PRINTF_BUFFER_SIZE
) // 0x1049
226 #endif //CL_VERSION_1_2
228 /* cl_device_fp_config - bitfield */
230 CASE(CL_FP_DENORM) // (1 << 0)
231 CASE(CL_FP_INF_NAN) // (1 << 1)
232 CASE(CL_FP_ROUND_TO_NEAREST) // (1 << 2)
233 CASE(CL_FP_ROUND_TO_ZERO) // (1 << 3)
234 CASE(CL_FP_ROUND_TO_INF) // (1 << 4)
235 CASE(CL_FP_FMA) // (1 << 5)
236 CASE(CL_FP_SOFT_FLOAT) // (1 << 6)
237 CASE(CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT) // (1 << 7)
240 /* cl_device_mem_cache_type */
243 CASE(CL_READ_ONLY_CACHE) // 0x1
244 CASE(CL_READ_WRITE_CACHE) // 0x2
247 /* cl_device_local_mem_type */
249 CASE(CL_LOCAL) // 0x1
250 CASE(CL_GLOBAL) // 0x2
253 /* cl_device_exec_capabilities - bitfield */
255 CASE(CL_EXEC_KERNEL) // (1 << 0)
256 CASE(CL_EXEC_NATIVE_KERNEL) // (1 << 1)
259 /* cl_command_queue_properties - bitfield */
261 CASE(CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) // (1 << 0)
262 CASE(CL_QUEUE_PROFILING_ENABLE) // (1 << 1)
263 CASE(CL_QUEUE_ON_DEVICE) // (1 << 2)
264 CASE(CL_QUEUE_ON_DEVICE_DEFAULT) // (1 << 3)
267 /* cl_context_info */
268 CASE(CL_CONTEXT_REFERENCE_COUNT
) // 0x1080
269 CASE(CL_CONTEXT_DEVICES
) // 0x1081
270 CASE(CL_CONTEXT_PROPERTIES
) // 0x1082
271 #ifdef CL_VERSION_1_1
272 CASE(CL_CONTEXT_NUM_DEVICES
) // 0x1083
273 #endif //CL_VERSION_1_1
275 /* cl_context_properties */
276 CASE(CL_CONTEXT_PLATFORM
) // 0x1084
277 #ifdef CL_VERSION_1_2
278 CASE(CL_CONTEXT_INTEROP_USER_SYNC
) // 0x1085
279 #endif //CL_VERSION_1_2
281 /* cl_device_partition_property */
282 #ifdef CL_VERSION_1_2
283 CASE(CL_DEVICE_PARTITION_EQUALLY
) // 0x1086
284 CASE(CL_DEVICE_PARTITION_BY_COUNTS
) // 0x1087
285 CASE(CL_DEVICE_PARTITION_BY_COUNTS_LIST_END
) // 0x0
286 CASE(CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
) // 0x1088
287 #endif //CL_VERSION_1_2
289 /* cl_device_affinity_domain */
291 CASE(CL_DEVICE_AFFINITY_DOMAIN_NUMA) // (1 << 0)
292 CASE(CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE) // (1 << 1)
293 CASE(CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE) // (1 << 2)
294 CASE(CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE) // (1 << 3)
295 CASE(CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE) // (1 << 4)
296 CASE(CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE) // (1 << 5)
299 /* cl_command_queue_info */
300 CASE(CL_QUEUE_CONTEXT
) // 0x1090
301 CASE(CL_QUEUE_DEVICE
) // 0x1091
302 CASE(CL_QUEUE_REFERENCE_COUNT
) // 0x1092
303 CASE(CL_QUEUE_PROPERTIES
) // 0x1093
304 #ifdef CL_VERSION_2_0
305 CASE(CL_QUEUE_SIZE
) // 0x1094
306 #endif //CL_VERSION_2_0
308 /* cl_mem_flags - bitfield */
310 CASE(CL_MEM_READ_WRITE) // (1 << 0)
311 CASE(CL_MEM_WRITE_ONLY) // (1 << 1)
312 CASE(CL_MEM_READ_ONLY) // (1 << 2)
313 CASE(CL_MEM_USE_HOST_PTR) // (1 << 3)
314 CASE(CL_MEM_ALLOC_HOST_PTR) // (1 << 4)
315 CASE(CL_MEM_COPY_HOST_PTR) // (1 << 5)
317 CASE(CL_MEM_HOST_WRITE_ONLY) // (1 << 7)
318 CASE(CL_MEM_HOST_READ_ONLY) // (1 << 8)
319 CASE(CL_MEM_HOST_NO_ACCESS) // (1 << 9)
322 /* cl_mem_migration_flags - bitfield */
324 CASE(CL_MIGRATE_MEM_OBJECT_HOST) // (1 << 0)
325 CASE(CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED) // (1 << 1)
328 /* cl_channel_order */
331 CASE(CL_RG
) // 0x10B2
332 CASE(CL_RA
) // 0x10B3
333 CASE(CL_RGB
) // 0x10B4
334 CASE(CL_RGBA
) // 0x10B5
335 CASE(CL_BGRA
) // 0x10B6
336 CASE(CL_ARGB
) // 0x10B7
337 CASE(CL_INTENSITY
) // 0x10B8
338 CASE(CL_LUMINANCE
) // 0x10B9
339 #ifdef CL_VERSION_1_1
340 CASE(CL_Rx
) // 0x10BA
341 CASE(CL_RGx
) // 0x10BB
342 CASE(CL_RGBx
) // 0x10BC
343 #endif //CL_VERSION_1_1
345 /* cl_channel_type */
346 CASE(CL_SNORM_INT8
) // 0x10D0
347 CASE(CL_SNORM_INT16
) // 0x10D1
348 CASE(CL_UNORM_INT8
) // 0x10D2
349 CASE(CL_UNORM_INT16
) // 0x10D3
350 CASE(CL_UNORM_SHORT_565
) // 0x10D4
351 CASE(CL_UNORM_SHORT_555
) // 0x10D5
352 CASE(CL_UNORM_INT_101010
) // 0x10D6
353 CASE(CL_SIGNED_INT8
) // 0x10D7
354 CASE(CL_SIGNED_INT16
) // 0x10D8
355 CASE(CL_SIGNED_INT32
) // 0x10D9
356 CASE(CL_UNSIGNED_INT8
) // 0x10DA
357 CASE(CL_UNSIGNED_INT16
) // 0x10DB
358 CASE(CL_UNSIGNED_INT32
) // 0x10DC
359 CASE(CL_HALF_FLOAT
) // 0x10DD
360 CASE(CL_FLOAT
) // 0x10DE
362 /* cl_mem_object_type */
363 CASE(CL_MEM_OBJECT_BUFFER
) // 0x10F0
364 CASE(CL_MEM_OBJECT_IMAGE2D
) // 0x10F1
365 CASE(CL_MEM_OBJECT_IMAGE3D
) // 0x10F2
366 #ifdef CL_VERSION_1_2
367 CASE(CL_MEM_OBJECT_IMAGE2D_ARRAY
) // 0x10F3
368 CASE(CL_MEM_OBJECT_IMAGE1D
) // 0x10F4
369 CASE(CL_MEM_OBJECT_IMAGE1D_ARRAY
) // 0x10F5
370 CASE(CL_MEM_OBJECT_IMAGE1D_BUFFER
) // 0x10F6
371 #endif //CL_VERSION_1_2
374 CASE(CL_MEM_TYPE
) // 0x1100
375 CASE(CL_MEM_FLAGS
) // 0x1101
376 CASE(CL_MEM_SIZE
) // 0x1102
377 CASE(CL_MEM_HOST_PTR
) // 0x1103
378 CASE(CL_MEM_MAP_COUNT
) // 0x1104
379 CASE(CL_MEM_REFERENCE_COUNT
) // 0x1105
380 CASE(CL_MEM_CONTEXT
) // 0x1106
381 #ifdef CL_VERSION_1_1
382 CASE(CL_MEM_ASSOCIATED_MEMOBJECT
) // 0x1107
383 CASE(CL_MEM_OFFSET
) // 0x1108
384 #endif //CL_VERSION_1_1
385 #ifdef CL_VERSION_2_0
386 CASE(CL_MEM_USES_SVM_POINTER
) // 0x1109
387 #endif //CL_VERSION_2_0
390 CASE(CL_IMAGE_FORMAT
) // 0x1110
391 CASE(CL_IMAGE_ELEMENT_SIZE
) // 0x1111
392 CASE(CL_IMAGE_ROW_PITCH
) // 0x1112
393 CASE(CL_IMAGE_SLICE_PITCH
) // 0x1113
394 CASE(CL_IMAGE_WIDTH
) // 0x1114
395 CASE(CL_IMAGE_HEIGHT
) // 0x1115
396 CASE(CL_IMAGE_DEPTH
) // 0x1116
397 #ifdef CL_VERSION_1_2
398 CASE(CL_IMAGE_ARRAY_SIZE
) // 0x1117
399 CASE(CL_IMAGE_BUFFER
) // 0x1118
400 CASE(CL_IMAGE_NUM_MIP_LEVELS
) // 0x1119
401 CASE(CL_IMAGE_NUM_SAMPLES
) // 0x111A
402 #endif //CL_VERSION_1_2
404 /* cl_addressing_mode */
405 CASE(CL_ADDRESS_NONE
) // 0x1130
406 CASE(CL_ADDRESS_CLAMP_TO_EDGE
) // 0x1131
407 CASE(CL_ADDRESS_CLAMP
) // 0x1132
408 CASE(CL_ADDRESS_REPEAT
) // 0x1133
409 #ifdef CL_VERSION_1_1
410 CASE(CL_ADDRESS_MIRRORED_REPEAT
) // 0x1134
411 #endif //CL_VERSION_1_1
414 CASE(CL_FILTER_NEAREST
) // 0x1140
415 CASE(CL_FILTER_LINEAR
) // 0x1141
417 /* cl_sampler_info */
418 CASE(CL_SAMPLER_REFERENCE_COUNT
) // 0x1150
419 CASE(CL_SAMPLER_CONTEXT
) // 0x1151
420 CASE(CL_SAMPLER_NORMALIZED_COORDS
) // 0x1152
421 CASE(CL_SAMPLER_ADDRESSING_MODE
) // 0x1153
422 CASE(CL_SAMPLER_FILTER_MODE
) // 0x1154
424 /* cl_map_flags - bitfield */
426 CASE(CL_MAP_READ) // (1 << 0)
427 CASE(CL_MAP_WRITE) // (1 << 1)
428 CASE(CL_MAP_WRITE_INVALIDATE_REGION) // (1 << 2)
431 /* cl_program_info */
432 CASE(CL_PROGRAM_REFERENCE_COUNT
) // 0x1160
433 CASE(CL_PROGRAM_CONTEXT
) // 0x1161
434 CASE(CL_PROGRAM_NUM_DEVICES
) // 0x1162
435 CASE(CL_PROGRAM_DEVICES
) // 0x1163
436 CASE(CL_PROGRAM_SOURCE
) // 0x1164
437 CASE(CL_PROGRAM_BINARY_SIZES
) // 0x1165
438 CASE(CL_PROGRAM_BINARIES
) // 0x1166
439 #ifdef CL_VERSION_1_2
440 CASE(CL_PROGRAM_NUM_KERNELS
) // 0x1167
441 CASE(CL_PROGRAM_KERNEL_NAMES
) // 0x1168
442 #endif //CL_VERSION_1_2
444 /* cl_program_build_info */
445 CASE(CL_PROGRAM_BUILD_STATUS
) // 0x1181
446 CASE(CL_PROGRAM_BUILD_OPTIONS
) // 0x1182
447 CASE(CL_PROGRAM_BUILD_LOG
) // 0x1183
448 #ifdef CL_VERSION_1_2
449 CASE(CL_PROGRAM_BINARY_TYPE
) // 0x1184
450 #endif //CL_VERSION_1_2
451 #ifdef CL_VERSION_2_0
452 CASE(CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
) // 0x1185
453 #endif //CL_VERSION_2_0
455 /* cl_program_binary_type */
457 CASE(CL_PROGRAM_BINARY_TYPE_NONE) // 0x0
458 CASE(CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT) // 0x1
459 CASE(CL_PROGRAM_BINARY_TYPE_LIBRARY) // 0x2
460 CASE(CL_PROGRAM_BINARY_TYPE_EXECUTABLE) // 0x4
463 /* cl_build_status */
465 CASE(CL_BUILD_SUCCESS) // 0
466 CASE(CL_BUILD_NONE) // -1
467 CASE(CL_BUILD_ERROR) // -2
468 CASE(CL_BUILD_IN_PROGRESS) // -3
472 CASE(CL_KERNEL_FUNCTION_NAME
) // 0x1190
473 CASE(CL_KERNEL_NUM_ARGS
) // 0x1191
474 CASE(CL_KERNEL_REFERENCE_COUNT
) // 0x1192
475 CASE(CL_KERNEL_CONTEXT
) // 0x1193
476 CASE(CL_KERNEL_PROGRAM
) // 0x1194
477 #ifdef CL_VERSION_1_2
478 CASE(CL_KERNEL_ATTRIBUTES
) // 0x1195
479 #endif //CL_VERSION_1_2
481 /* cl_kernel_arg_info */
482 #ifdef CL_VERSION_1_2
483 CASE(CL_KERNEL_ARG_ADDRESS_QUALIFIER
) // 0x1196
484 CASE(CL_KERNEL_ARG_ACCESS_QUALIFIER
) // 0x1197
485 CASE(CL_KERNEL_ARG_TYPE_NAME
) // 0x1198
486 CASE(CL_KERNEL_ARG_TYPE_QUALIFIER
) // 0x1199
487 CASE(CL_KERNEL_ARG_NAME
) // 0x119A
488 #endif //CL_VERSION_1_2
490 /* cl_kernel_arg_address_qualifier */
491 #ifdef CL_VERSION_1_2
492 CASE(CL_KERNEL_ARG_ADDRESS_GLOBAL
) // 0x119B
493 CASE(CL_KERNEL_ARG_ADDRESS_LOCAL
) // 0x119C
494 CASE(CL_KERNEL_ARG_ADDRESS_CONSTANT
) // 0x119D
495 CASE(CL_KERNEL_ARG_ADDRESS_PRIVATE
) // 0x119E
496 #endif //CL_VERSION_1_2
498 /* cl_kernel_arg_access_qualifier */
499 #ifdef CL_VERSION_1_2
500 CASE(CL_KERNEL_ARG_ACCESS_READ_ONLY
) // 0x11A0
501 CASE(CL_KERNEL_ARG_ACCESS_WRITE_ONLY
) // 0x11A1
502 CASE(CL_KERNEL_ARG_ACCESS_READ_WRITE
) // 0x11A2
503 CASE(CL_KERNEL_ARG_ACCESS_NONE
) // 0x11A3
504 #endif //CL_VERSION_1_2
506 /* cl_kernel_arg_type_qualifer */
508 CASE(CL_KERNEL_ARG_TYPE_NONE) // 0
509 CASE(CL_KERNEL_ARG_TYPE_CONST) // (1 << 0)
510 CASE(CL_KERNEL_ARG_TYPE_RESTRICT) // (1 << 1)
511 CASE(CL_KERNEL_ARG_TYPE_VOLATILE) // (1 << 2)
514 /* cl_kernel_work_group_info */
515 CASE(CL_KERNEL_WORK_GROUP_SIZE
) // 0x11B0
516 CASE(CL_KERNEL_COMPILE_WORK_GROUP_SIZE
) // 0x11B1
517 CASE(CL_KERNEL_LOCAL_MEM_SIZE
) // 0x11B2
518 #ifdef CL_VERSION_1_1
519 CASE(CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
) // 0x11B3
520 CASE(CL_KERNEL_PRIVATE_MEM_SIZE
) // 0x11B4
521 #endif //CL_VERSION_1_1
522 #ifdef CL_VERSION_1_2
523 CASE(CL_KERNEL_GLOBAL_WORK_SIZE
) // 0x11B5
524 #endif //CL_VERSION_1_2
527 CASE(CL_EVENT_COMMAND_QUEUE
) // 0x11D0
528 CASE(CL_EVENT_COMMAND_TYPE
) // 0x11D1
529 CASE(CL_EVENT_REFERENCE_COUNT
) // 0x11D2
530 CASE(CL_EVENT_COMMAND_EXECUTION_STATUS
) // 0x11D3
531 #ifdef CL_VERSION_1_1
532 CASE(CL_EVENT_CONTEXT
) // 0x11D4
533 #endif //CL_VERSION_1_1
535 /* cl_command_type */
536 CASE(CL_COMMAND_NDRANGE_KERNEL
) // 0x11F0
537 CASE(CL_COMMAND_TASK
) // 0x11F1
538 CASE(CL_COMMAND_NATIVE_KERNEL
) // 0x11F2
539 CASE(CL_COMMAND_READ_BUFFER
) // 0x11F3
540 CASE(CL_COMMAND_WRITE_BUFFER
) // 0x11F4
541 CASE(CL_COMMAND_COPY_BUFFER
) // 0x11F5
542 CASE(CL_COMMAND_READ_IMAGE
) // 0x11F6
543 CASE(CL_COMMAND_WRITE_IMAGE
) // 0x11F7
544 CASE(CL_COMMAND_COPY_IMAGE
) // 0x11F8
545 CASE(CL_COMMAND_COPY_IMAGE_TO_BUFFER
) // 0x11F9
546 CASE(CL_COMMAND_COPY_BUFFER_TO_IMAGE
) // 0x11FA
547 CASE(CL_COMMAND_MAP_BUFFER
) // 0x11FB
548 CASE(CL_COMMAND_MAP_IMAGE
) // 0x11FC
549 CASE(CL_COMMAND_UNMAP_MEM_OBJECT
) // 0x11FD
550 CASE(CL_COMMAND_MARKER
) // 0x11FE
551 CASE(CL_COMMAND_ACQUIRE_GL_OBJECTS
) // 0x11FF
552 CASE(CL_COMMAND_RELEASE_GL_OBJECTS
) // 0x1200
553 #ifdef CL_VERSION_1_1
554 CASE(CL_COMMAND_READ_BUFFER_RECT
) // 0x1201
555 CASE(CL_COMMAND_WRITE_BUFFER_RECT
) // 0x1202
556 CASE(CL_COMMAND_COPY_BUFFER_RECT
) // 0x1203
557 CASE(CL_COMMAND_USER
) // 0x1204
558 #endif //CL_VERSION_1_1
559 #ifdef CL_VERSION_1_2
560 CASE(CL_COMMAND_BARRIER
) // 0x1205
561 CASE(CL_COMMAND_MIGRATE_MEM_OBJECTS
) // 0x1206
562 CASE(CL_COMMAND_FILL_BUFFER
) // 0x1207
563 CASE(CL_COMMAND_FILL_IMAGE
) // 0x1208
564 #endif //CL_VERSION_1_2
566 /* command execution status */
568 CASE(CL_COMPLETE) // 0x0
569 CASE(CL_RUNNING) // 0x1
570 CASE(CL_SUBMITTED) // 0x2
571 CASE(CL_QUEUED) // 0x3
574 /* cl_buffer_create_type */
575 #ifdef CL_VERSION_1_1
576 CASE(CL_BUFFER_CREATE_TYPE_REGION
) // 0x1220
577 #endif //CL_VERSION_1_1
579 /* cl_profiling_info */
580 CASE(CL_PROFILING_COMMAND_QUEUED
) // 0x1280
581 CASE(CL_PROFILING_COMMAND_SUBMIT
) // 0x1281
582 CASE(CL_PROFILING_COMMAND_START
) // 0x1282
583 CASE(CL_PROFILING_COMMAND_END
) // 0x1283
586 return "(unrecognized enum)";
592 const char* piglit_cl_get_error_name(cl_int error
) {
593 #define CASE(x) case x: return #x;
596 CASE(CL_SUCCESS
) // 0
597 CASE(CL_DEVICE_NOT_FOUND
) // -1
598 CASE(CL_DEVICE_NOT_AVAILABLE
) // -2
599 CASE(CL_COMPILER_NOT_AVAILABLE
) // -3
600 CASE(CL_MEM_OBJECT_ALLOCATION_FAILURE
) // -4
601 CASE(CL_OUT_OF_RESOURCES
) // -5
602 CASE(CL_OUT_OF_HOST_MEMORY
) // -6
603 CASE(CL_PROFILING_INFO_NOT_AVAILABLE
) // -7
604 CASE(CL_MEM_COPY_OVERLAP
) // -8
605 CASE(CL_IMAGE_FORMAT_MISMATCH
) // -9
606 CASE(CL_IMAGE_FORMAT_NOT_SUPPORTED
) // -10
607 CASE(CL_BUILD_PROGRAM_FAILURE
) // -11
608 CASE(CL_MAP_FAILURE
) // -12
609 #ifdef CL_VERSION_1_1
610 CASE(CL_MISALIGNED_SUB_BUFFER_OFFSET
) // -13
611 CASE(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
) // -14
612 #endif //CL_VERSION_1_1
613 #ifdef CL_VERSION_1_2
614 CASE(CL_COMPILE_PROGRAM_FAILURE
) // -15
615 CASE(CL_LINKER_NOT_AVAILABLE
) // -16
616 CASE(CL_LINK_PROGRAM_FAILURE
) // -17
617 CASE(CL_DEVICE_PARTITION_FAILED
) // -18
618 CASE(CL_KERNEL_ARG_INFO_NOT_AVAILABLE
) // -19
619 #endif //CL_VERSION_1_2
621 CASE(CL_INVALID_VALUE
) // -30
622 CASE(CL_INVALID_DEVICE_TYPE
) // -31
623 CASE(CL_INVALID_PLATFORM
) // -32
624 CASE(CL_INVALID_DEVICE
) // -33
625 CASE(CL_INVALID_CONTEXT
) // -34
626 CASE(CL_INVALID_QUEUE_PROPERTIES
) // -35
627 CASE(CL_INVALID_COMMAND_QUEUE
) // -36
628 CASE(CL_INVALID_HOST_PTR
) // -37
629 CASE(CL_INVALID_MEM_OBJECT
) // -38
630 CASE(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
) // -39
631 CASE(CL_INVALID_IMAGE_SIZE
) // -40
632 CASE(CL_INVALID_SAMPLER
) // -41
633 CASE(CL_INVALID_BINARY
) // -42
634 CASE(CL_INVALID_BUILD_OPTIONS
) // -43
635 CASE(CL_INVALID_PROGRAM
) // -44
636 CASE(CL_INVALID_PROGRAM_EXECUTABLE
) // -45
637 CASE(CL_INVALID_KERNEL_NAME
) // -46
638 CASE(CL_INVALID_KERNEL_DEFINITION
) // -47
639 CASE(CL_INVALID_KERNEL
) // -48
640 CASE(CL_INVALID_ARG_INDEX
) // -49
641 CASE(CL_INVALID_ARG_VALUE
) // -50
642 CASE(CL_INVALID_ARG_SIZE
) // -51
643 CASE(CL_INVALID_KERNEL_ARGS
) // -52
644 CASE(CL_INVALID_WORK_DIMENSION
) // -53
645 CASE(CL_INVALID_WORK_GROUP_SIZE
) // -54
646 CASE(CL_INVALID_WORK_ITEM_SIZE
) // -55
647 CASE(CL_INVALID_GLOBAL_OFFSET
) // -56
648 CASE(CL_INVALID_EVENT_WAIT_LIST
) // -57
649 CASE(CL_INVALID_EVENT
) // -58
650 CASE(CL_INVALID_OPERATION
) // -59
651 CASE(CL_INVALID_GL_OBJECT
) // -60
652 CASE(CL_INVALID_BUFFER_SIZE
) // -61
653 CASE(CL_INVALID_MIP_LEVEL
) // -62
654 CASE(CL_INVALID_GLOBAL_WORK_SIZE
) // -63
655 #ifdef CL_VERSION_1_1
656 CASE(CL_INVALID_PROPERTY
) // -64
657 #endif //CL_VERSION_1_1
658 #ifdef CL_VERSION_1_2
659 CASE(CL_INVALID_IMAGE_DESCRIPTOR
) // -65
660 CASE(CL_INVALID_COMPILER_OPTIONS
) // -66
661 CASE(CL_INVALID_LINKER_OPTIONS
) // -67
662 CASE(CL_INVALID_DEVICE_PARTITION_COUNT
) // -68
663 #endif //CL_VERSION_1_2
666 return "(unrecognized error)";
673 #define PIGLIT_CL_DEFINE_ENUM(type, name, count10, count11, count12, count20) \
674 const unsigned int piglit_##name##_num_1_0 = count10; \
675 const unsigned int piglit_##name##_num_1_1 = count11; \
676 const unsigned int piglit_##name##_num_1_2 = count12; \
677 const unsigned int piglit_##name##_num_2_0 = count20; \
678 const type _piglit_##name[]
680 #define PIGLIT_CL_DEFINE_ENUM_2(name, count10, count11, count12, count20) \
681 PIGLIT_CL_DEFINE_ENUM(name, name, count10, count11, count12, count20)
683 #define PIGLIT_CL_DEFINE_ENUM_PTR(type, name) \
684 const type* piglit_##name = _piglit_##name;
686 #define PIGLIT_CL_DEFINE_ENUM_PTR_2(name) \
687 PIGLIT_CL_DEFINE_ENUM_PTR(name, name)
690 PIGLIT_CL_DEFINE_ENUM_2(cl_mem_flags
, 6, 6, 9, 9) = {
695 CL_MEM_ALLOC_HOST_PTR
, // 5
696 CL_MEM_COPY_HOST_PTR
,
697 #if defined(CL_VERSION_1_2)
698 CL_MEM_HOST_WRITE_ONLY
,
699 CL_MEM_HOST_READ_ONLY
,
700 CL_MEM_HOST_NO_ACCESS
,
701 #endif //CL_VERSION_1_2
703 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_mem_flags
);
705 PIGLIT_CL_DEFINE_ENUM_2(cl_device_type
, 5, 5, 6, 6) = {
708 CL_DEVICE_TYPE_ACCELERATOR
,
709 CL_DEVICE_TYPE_DEFAULT
,
710 CL_DEVICE_TYPE_ALL
, // 5
711 #if defined(CL_VERSION_1_2)
712 CL_DEVICE_TYPE_CUSTOM
,
715 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_device_type
);
717 PIGLIT_CL_DEFINE_ENUM_2(cl_program_info
, 7, 7, 9, 9) = {
718 CL_PROGRAM_REFERENCE_COUNT
,
720 CL_PROGRAM_NUM_DEVICES
,
722 CL_PROGRAM_SOURCE
, // 5
723 CL_PROGRAM_BINARY_SIZES
,
725 #ifdef CL_VERSION_1_2
726 CL_PROGRAM_NUM_KERNELS
,
727 CL_PROGRAM_KERNEL_NAMES
,
728 #endif //CL_VERSION_1_2
730 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_program_info
);
732 PIGLIT_CL_DEFINE_ENUM_2(cl_program_build_info
, 3, 3, 4, 5) = {
733 CL_PROGRAM_BUILD_STATUS
,
734 CL_PROGRAM_BUILD_OPTIONS
,
735 CL_PROGRAM_BUILD_LOG
,
736 #ifdef CL_VERSION_1_2
737 CL_PROGRAM_BINARY_TYPE
,
738 #endif //CL_VERSION_1_2
739 #ifdef CL_VERSION_2_0
740 CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
,
741 #endif //CL_VERSION_2_0
743 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_program_build_info
);
745 PIGLIT_CL_DEFINE_ENUM_2(cl_mem_info
, 7, 9, 9, 10) = {
750 CL_MEM_MAP_COUNT
, // 5
751 CL_MEM_REFERENCE_COUNT
,
753 #ifdef CL_VERSION_1_1
754 CL_MEM_ASSOCIATED_MEMOBJECT
,
756 #endif //CL_VERSION_1_1
757 #ifdef CL_VERSION_2_0
758 CL_MEM_USES_SVM_POINTER
,
759 #endif //CL_VERSION_2_0
761 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_mem_info
);
763 PIGLIT_CL_DEFINE_ENUM_2(cl_kernel_info
, 5, 5, 6, 6) = {
764 CL_KERNEL_FUNCTION_NAME
,
766 CL_KERNEL_REFERENCE_COUNT
,
768 CL_KERNEL_PROGRAM
, // 5
769 #ifdef CL_VERSION_1_2
770 CL_KERNEL_ATTRIBUTES
,
771 #endif //CL_VERSION_1_2
773 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_kernel_info
);
775 #ifdef CL_VERSION_1_2
776 PIGLIT_CL_DEFINE_ENUM_2(cl_kernel_arg_info
, 0, 0, 5, 5) = {
777 CL_KERNEL_ARG_ADDRESS_QUALIFIER
,
778 CL_KERNEL_ARG_ACCESS_QUALIFIER
,
779 CL_KERNEL_ARG_TYPE_NAME
,
780 CL_KERNEL_ARG_TYPE_QUALIFIER
,
781 CL_KERNEL_ARG_NAME
, //5
783 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_kernel_arg_info
);
784 #endif //CL_VERSION_1_2
786 PIGLIT_CL_DEFINE_ENUM_2(cl_kernel_work_group_info
, 3, 5, 6, 6) = {
787 CL_KERNEL_WORK_GROUP_SIZE
,
788 CL_KERNEL_COMPILE_WORK_GROUP_SIZE
,
789 CL_KERNEL_LOCAL_MEM_SIZE
,
790 #ifdef CL_VERSION_1_1
791 CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
,
792 CL_KERNEL_PRIVATE_MEM_SIZE
, // 5
793 #endif //CL_VERSION_1_1
794 #ifdef CL_VERSION_1_2
795 CL_KERNEL_GLOBAL_WORK_SIZE
,
796 #endif //CL_VERSION_1_2
798 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_kernel_work_group_info
);
800 PIGLIT_CL_DEFINE_ENUM_2(cl_event_info
, 4, 5, 5, 5) = {
801 CL_EVENT_COMMAND_QUEUE
,
802 CL_EVENT_COMMAND_TYPE
,
803 CL_EVENT_REFERENCE_COUNT
,
804 CL_EVENT_COMMAND_EXECUTION_STATUS
,
805 #ifdef CL_VERSION_1_1
806 CL_EVENT_CONTEXT
, // 5
807 #endif //CL_VERSION_1_1
809 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_event_info
);
811 PIGLIT_CL_DEFINE_ENUM_2(cl_image_info
, 7, 7, 11, 11) = {
813 CL_IMAGE_ELEMENT_SIZE
,
815 CL_IMAGE_SLICE_PITCH
,
819 #ifdef CL_VERSION_1_2
821 CL_IMAGE_NUM_SAMPLES
,
822 CL_IMAGE_NUM_MIP_LEVELS
, // 10
823 CL_IMAGE_BUFFER
, // Deprecated in 2.0
824 #endif //CL_VERSION_1_2
826 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_image_info
);
828 PIGLIT_CL_DEFINE_ENUM_2(cl_command_queue_info
, 4, 4, 4, 5) = {
831 CL_QUEUE_REFERENCE_COUNT
,
833 #ifdef CL_VERSION_2_0
835 #endif //CL_VERSION_2_0
837 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_command_queue_info
);
839 PIGLIT_CL_DEFINE_ENUM_2(cl_context_info
, 3, 4, 4, 4) = {
840 CL_CONTEXT_REFERENCE_COUNT
,
842 CL_CONTEXT_PROPERTIES
,
843 #if defined(CL_VERSION_1_1)
844 CL_CONTEXT_NUM_DEVICES
,
845 #endif //CL_VERSION_1_1
847 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_context_info
);
849 PIGLIT_CL_DEFINE_ENUM_2(cl_platform_info
, 5, 5, 5, 5) = {
854 CL_PLATFORM_EXTENSIONS
// 5
856 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_platform_info
);
858 PIGLIT_CL_DEFINE_ENUM_2(cl_device_info
, 50, 60, 73, 74) = {
863 CL_DRIVER_VERSION
, // 5
866 CL_DEVICE_MAX_CLOCK_FREQUENCY
,
867 CL_DEVICE_MAX_COMPUTE_UNITS
,
868 CL_DEVICE_IMAGE_SUPPORT
, // 10
869 CL_DEVICE_EXTENSIONS
,
870 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
,
871 CL_DEVICE_MAX_WORK_GROUP_SIZE
,
872 CL_DEVICE_MAX_WORK_ITEM_SIZES
,
873 CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
, // 15
874 CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
,
875 CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
,
876 CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
,
877 CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
,
878 CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
, // 20
879 CL_DEVICE_ADDRESS_BITS
,
880 CL_DEVICE_MAX_READ_IMAGE_ARGS
,
881 CL_DEVICE_MAX_WRITE_IMAGE_ARGS
,
882 CL_DEVICE_GLOBAL_MEM_SIZE
,
883 CL_DEVICE_MAX_MEM_ALLOC_SIZE
, // 25
884 CL_DEVICE_IMAGE2D_MAX_WIDTH
,
885 CL_DEVICE_IMAGE2D_MAX_HEIGHT
,
886 CL_DEVICE_IMAGE3D_MAX_WIDTH
,
887 CL_DEVICE_IMAGE3D_MAX_HEIGHT
,
888 CL_DEVICE_IMAGE3D_MAX_DEPTH
, // 30
889 CL_DEVICE_MAX_PARAMETER_SIZE
,
890 CL_DEVICE_MAX_SAMPLERS
,
891 CL_DEVICE_MEM_BASE_ADDR_ALIGN
,
892 CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
,
893 CL_DEVICE_SINGLE_FP_CONFIG
, //35
894 CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
,
895 CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
,
896 CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
,
897 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
,
898 CL_DEVICE_MAX_CONSTANT_ARGS
, // 40
899 CL_DEVICE_LOCAL_MEM_TYPE
,
900 CL_DEVICE_LOCAL_MEM_SIZE
,
901 CL_DEVICE_ERROR_CORRECTION_SUPPORT
,
902 CL_DEVICE_PROFILING_TIMER_RESOLUTION
,
903 CL_DEVICE_ENDIAN_LITTLE
, // 45
905 CL_DEVICE_COMPILER_AVAILABLE
,
906 CL_DEVICE_EXECUTION_CAPABILITIES
,
907 CL_DEVICE_QUEUE_PROPERTIES
, // Deprecated in 2.0
908 CL_DEVICE_PLATFORM
, // 50
909 #if defined(CL_VERSION_1_1)
910 CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF
,
911 CL_DEVICE_HOST_UNIFIED_MEMORY
, // Deprecated in 2.0
912 CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR
,
913 CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT
,
914 CL_DEVICE_NATIVE_VECTOR_WIDTH_INT
, // 55
915 CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG
,
916 CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT
,
917 CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
,
918 CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF
,
919 CL_DEVICE_OPENCL_C_VERSION
, // 60
920 #endif //CL_VERSION_1_1
921 #if defined(CL_VERSION_1_2)
922 CL_DEVICE_DOUBLE_FP_CONFIG
,
923 CL_DEVICE_LINKER_AVAILABLE
,
924 CL_DEVICE_BUILT_IN_KERNELS
,
925 CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
,
926 CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
, // 65
927 CL_DEVICE_PARENT_DEVICE
,
928 CL_DEVICE_PARTITION_MAX_SUB_DEVICES
,
929 CL_DEVICE_PARTITION_PROPERTIES
,
930 CL_DEVICE_PARTITION_AFFINITY_DOMAIN
,
931 CL_DEVICE_PARTITION_TYPE
, // 70
932 CL_DEVICE_REFERENCE_COUNT
,
933 CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
,
934 CL_DEVICE_PRINTF_BUFFER_SIZE
, // 73
935 #endif //CL_VERSION_1_2
936 #if defined(CL_VERSION_2_0)
937 CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
,
938 #endif //CL_VERSION_2_0
940 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_device_info
);
942 PIGLIT_CL_DEFINE_ENUM_2(cl_command_queue_properties
, 2, 2, 2, 4) = {
943 CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
,
944 CL_QUEUE_PROFILING_ENABLE
,
945 #if defined(CL_VERSION_2_0)
947 CL_QUEUE_ON_DEVICE_DEFAULT
,
948 #endif //CL_VERSION_2_0
950 PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_command_queue_properties
);
953 PIGLIT_CL_DEFINE_ENUM(cl_mem_flags
, cl_mem_flags_mutexes
, 5, 5, 8, 8) = {
954 CL_MEM_READ_WRITE
| CL_MEM_READ_ONLY
,
955 CL_MEM_READ_WRITE
| CL_MEM_WRITE_ONLY
,
956 CL_MEM_READ_ONLY
| CL_MEM_WRITE_ONLY
,
957 CL_MEM_ALLOC_HOST_PTR
| CL_MEM_USE_HOST_PTR
,
958 CL_MEM_COPY_HOST_PTR
| CL_MEM_USE_HOST_PTR
, // 5
959 #if defined(CL_VERSION_1_2)
960 CL_MEM_HOST_WRITE_ONLY
| CL_MEM_HOST_READ_ONLY
,
961 CL_MEM_HOST_WRITE_ONLY
| CL_MEM_HOST_NO_ACCESS
,
962 CL_MEM_HOST_READ_ONLY
| CL_MEM_HOST_NO_ACCESS
,
963 #endif //CL_VERSION_1_2
965 PIGLIT_CL_DEFINE_ENUM_PTR(cl_mem_flags
, cl_mem_flags_mutexes
);
967 PIGLIT_CL_DEFINE_ENUM(cl_command_queue_properties
, cl_command_queue_properties_mutexes
, 0, 0, 0, 8) = {
968 #if defined(CL_VERSION_2_0)
969 // CL_QUEUE_ON_DEVICE requires CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
971 CL_QUEUE_ON_DEVICE
| CL_QUEUE_PROFILING_ENABLE
,
972 // CL_QUEUE_ON_DEVICE_DEFAULT requires CL_QUEUE_ON_DEVICE
973 CL_QUEUE_ON_DEVICE_DEFAULT
,
974 CL_QUEUE_ON_DEVICE_DEFAULT
| CL_QUEUE_ON_DEVICE
,
975 CL_QUEUE_ON_DEVICE_DEFAULT
| CL_QUEUE_PROFILING_ENABLE
,
976 CL_QUEUE_ON_DEVICE_DEFAULT
| CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
,
977 CL_QUEUE_ON_DEVICE_DEFAULT
| CL_QUEUE_PROFILING_ENABLE
| CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
,
978 CL_QUEUE_ON_DEVICE_DEFAULT
| CL_QUEUE_ON_DEVICE
| CL_QUEUE_PROFILING_ENABLE
,
979 #endif //CL_VERSION_2_0
981 PIGLIT_CL_DEFINE_ENUM_PTR(cl_command_queue_properties
, cl_command_queue_properties_mutexes
);
984 #undef PIGLIT_CL_DEFINE_ENUM
985 #undef PIGLIT_CL_DEFINE_ENUM_2
986 #undef PIGLIT_CL_DEFINE_ENUM_PTR
987 #undef PIGLIT_CL_DEFINE_ENUM_PTR_2