Warning: That file was not part of the compilation database. It may have many parsing errors.

1//===-- OpenCLImageTypes.def - Metadata about BuiltinTypes ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// This file extends builtin types database with OpenCL image singleton types.
10// Custom code should define one of those three macros:
11// GENERIC_IMAGE_TYPE(Type, Id) - a generic image with its Id without an
12// access type
13// IMAGE_TYPE(Type, Id, SingletonId, AccessType, CGSuffix) - an image type
14// with given ID, singleton ID access type and a codegen suffix
15// GENERIC_IMAGE_TYPE_EXT(Type, Id, Ext) - a generic image with its Id and
16// required extension without an access type
17
18#ifdef GENERIC_IMAGE_TYPE
19
20#define IMAGE_READ_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE(Type, Id)
21#define IMAGE_WRITE_TYPE(Type, Id, Ext)
22#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext)
23
24#elif defined(GENERIC_IMAGE_TYPE_EXT)
25#define IMAGE_READ_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##ROTy, Ext)
26#define IMAGE_WRITE_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##WOTy, Ext)
27#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##RWTy, Ext)
28
29#else
30#ifndef IMAGE_READ_TYPE
31#define IMAGE_READ_TYPE(Type, Id, Ext) \
32 IMAGE_TYPE(Type, Id##RO, Id##ROTy, read_only, ro)
33#endif
34#ifndef IMAGE_WRITE_TYPE
35#define IMAGE_WRITE_TYPE(Type, Id, Ext) \
36 IMAGE_TYPE(Type, Id##WO, Id##WOTy, write_only, wo)
37#endif
38#ifndef IMAGE_READ_WRITE_TYPE
39#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext) \
40 IMAGE_TYPE(Type, Id##RW, Id##RWTy, read_write, rw)
41#endif
42
43#endif
44
45IMAGE_READ_TYPE(image1d, OCLImage1d, "")
46IMAGE_READ_TYPE(image1d_array, OCLImage1dArray, "")
47IMAGE_READ_TYPE(image1d_buffer, OCLImage1dBuffer, "")
48IMAGE_READ_TYPE(image2d, OCLImage2d, "")
49IMAGE_READ_TYPE(image2d_array, OCLImage2dArray, "")
50IMAGE_READ_TYPE(image2d_depth, OCLImage2dDepth, "")
51IMAGE_READ_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
52IMAGE_READ_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
53IMAGE_READ_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
54IMAGE_READ_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
55IMAGE_READ_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
56IMAGE_READ_TYPE(image3d, OCLImage3d, "")
57
58IMAGE_WRITE_TYPE(image1d, OCLImage1d, "")
59IMAGE_WRITE_TYPE(image1d_array, OCLImage1dArray, "")
60IMAGE_WRITE_TYPE(image1d_buffer, OCLImage1dBuffer, "")
61IMAGE_WRITE_TYPE(image2d, OCLImage2d, "")
62IMAGE_WRITE_TYPE(image2d_array, OCLImage2dArray, "")
63IMAGE_WRITE_TYPE(image2d_depth, OCLImage2dDepth, "")
64IMAGE_WRITE_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
65IMAGE_WRITE_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
66IMAGE_WRITE_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
67IMAGE_WRITE_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
68IMAGE_WRITE_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
69IMAGE_WRITE_TYPE(image3d, OCLImage3d, "cl_khr_3d_image_writes")
70
71IMAGE_READ_WRITE_TYPE(image1d, OCLImage1d, "")
72IMAGE_READ_WRITE_TYPE(image1d_array, OCLImage1dArray, "")
73IMAGE_READ_WRITE_TYPE(image1d_buffer, OCLImage1dBuffer, "")
74IMAGE_READ_WRITE_TYPE(image2d, OCLImage2d, "")
75IMAGE_READ_WRITE_TYPE(image2d_array, OCLImage2dArray, "")
76IMAGE_READ_WRITE_TYPE(image2d_depth, OCLImage2dDepth, "")
77IMAGE_READ_WRITE_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
78IMAGE_READ_WRITE_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
79IMAGE_READ_WRITE_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
80IMAGE_READ_WRITE_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
81IMAGE_READ_WRITE_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
82IMAGE_READ_WRITE_TYPE(image3d, OCLImage3d, "")
83
84#undef IMAGE_TYPE
85#undef GENERIC_IMAGE_TYPE
86#undef IMAGE_READ_TYPE
87#undef IMAGE_WRITE_TYPE
88#undef IMAGE_READ_WRITE_TYPE
89

Warning: That file was not part of the compilation database. It may have many parsing errors.