OSDN Git Service

modified: utilsrc/src/Admin/Makefile
[eos/others.git] / utiltools / X86MAC64 / cuda / include / texture_types.h
1 /*
2  * Copyright 1993-2012 NVIDIA Corporation.  All rights reserved.
3  *
4  * NOTICE TO LICENSEE:
5  *
6  * This source code and/or documentation ("Licensed Deliverables") are
7  * subject to NVIDIA intellectual property rights under U.S. and
8  * international Copyright laws.
9  *
10  * These Licensed Deliverables contained herein is PROPRIETARY and
11  * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12  * conditions of a form of NVIDIA software license agreement by and
13  * between NVIDIA and Licensee ("License Agreement") or electronically
14  * accepted by Licensee.  Notwithstanding any terms or conditions to
15  * the contrary in the License Agreement, reproduction or disclosure
16  * of the Licensed Deliverables to any third party without the express
17  * written consent of NVIDIA is prohibited.
18  *
19  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE.  IT IS
22  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23  * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32  * OF THESE LICENSED DELIVERABLES.
33  *
34  * U.S. Government End Users.  These Licensed Deliverables are a
35  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36  * 1995), consisting of "commercial computer software" and "commercial
37  * computer software documentation" as such terms are used in 48
38  * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39  * only as a commercial end item.  Consistent with 48 C.F.R.12.212 and
40  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41  * U.S. Government End Users acquire the Licensed Deliverables with
42  * only those rights set forth herein.
43  *
44  * Any use of the Licensed Deliverables in individual and commercial
45  * software must include, in the user documentation and internal
46  * comments to the code, the above Disclaimer and U.S. Government End
47  * Users Notice.
48  */
49
50 #if !defined(__TEXTURE_TYPES_H__)
51 #define __TEXTURE_TYPES_H__
52
53 /*******************************************************************************
54 *                                                                              *
55 *                                                                              *
56 *                                                                              *
57 *******************************************************************************/
58
59 #include "driver_types.h"
60
61 /**
62  * \addtogroup CUDART_TYPES
63  *
64  * @{
65  */
66
67 /*******************************************************************************
68 *                                                                              *
69 *                                                                              *
70 *                                                                              *
71 *******************************************************************************/
72
73 #define cudaTextureType1D              0x01
74 #define cudaTextureType2D              0x02
75 #define cudaTextureType3D              0x03
76 #define cudaTextureTypeCubemap         0x0C
77 #define cudaTextureType1DLayered       0xF1
78 #define cudaTextureType2DLayered       0xF2
79 #define cudaTextureTypeCubemapLayered  0xFC
80
81 /**
82  * CUDA texture address modes
83  */
84 enum __device_builtin__ cudaTextureAddressMode
85 {
86     cudaAddressModeWrap   = 0,    /**< Wrapping address mode */
87     cudaAddressModeClamp  = 1,    /**< Clamp to edge address mode */
88     cudaAddressModeMirror = 2,    /**< Mirror address mode */
89     cudaAddressModeBorder = 3     /**< Border address mode */
90 };
91
92 /**
93  * CUDA texture filter modes
94  */
95 enum __device_builtin__ cudaTextureFilterMode
96 {
97     cudaFilterModePoint  = 0,     /**< Point filter mode */
98     cudaFilterModeLinear = 1      /**< Linear filter mode */
99 };
100
101 /**
102  * CUDA texture read modes
103  */
104 enum __device_builtin__ cudaTextureReadMode
105 {
106     cudaReadModeElementType     = 0,  /**< Read texture as specified element type */
107     cudaReadModeNormalizedFloat = 1   /**< Read texture as normalized float */
108 };
109
110 /**
111  * CUDA texture reference
112  */
113 struct __device_builtin__ textureReference
114 {
115     /**
116      * Indicates whether texture reads are normalized or not
117      */
118     int                          normalized;
119     /**
120      * Texture filter mode
121      */
122     enum cudaTextureFilterMode   filterMode;
123     /**
124      * Texture address mode for up to 3 dimensions
125      */
126     enum cudaTextureAddressMode  addressMode[3];
127     /**
128      * Channel descriptor for the texture reference
129      */
130     struct cudaChannelFormatDesc channelDesc;
131     /**
132      * Perform sRGB->linear conversion during texture read
133      */
134     int                          sRGB;
135     /**
136      * Limit to the anisotropy ratio
137      */
138     unsigned int                 maxAnisotropy;
139     /**
140      * Mipmap filter mode
141      */
142     enum cudaTextureFilterMode   mipmapFilterMode;
143     /**
144      * Offset applied to the supplied mipmap level
145      */
146     float                        mipmapLevelBias;
147     /**
148      * Lower end of the mipmap level range to clamp access to
149      */
150     float                        minMipmapLevelClamp;
151     /**
152      * Upper end of the mipmap level range to clamp access to
153      */
154     float                        maxMipmapLevelClamp;
155     int                          __cudaReserved[15];
156 };
157
158 /**
159  * CUDA texture descriptor
160  */
161 struct __device_builtin__ cudaTextureDesc
162 {
163     /**
164      * Texture address mode for up to 3 dimensions
165      */
166     enum cudaTextureAddressMode addressMode[3];
167     /**
168      * Texture filter mode
169      */
170     enum cudaTextureFilterMode  filterMode;
171     /**
172      * Texture read mode
173      */
174     enum cudaTextureReadMode    readMode;
175     /**
176      * Perform sRGB->linear conversion during texture read
177      */
178     int                         sRGB;
179     /**
180      * Indicates whether texture reads are normalized or not
181      */
182     int                         normalizedCoords;
183     /**
184      * Limit to the anisotropy ratio
185      */
186     unsigned int                maxAnisotropy;
187     /**
188      * Mipmap filter mode
189      */
190     enum cudaTextureFilterMode  mipmapFilterMode;
191     /**
192      * Offset applied to the supplied mipmap level
193      */
194     float                       mipmapLevelBias;
195     /**
196      * Lower end of the mipmap level range to clamp access to
197      */
198     float                       minMipmapLevelClamp;
199     /**
200      * Upper end of the mipmap level range to clamp access to
201      */
202     float                       maxMipmapLevelClamp;
203 };
204
205 /**
206  * CUDA texture object
207  */
208 typedef __device_builtin__ unsigned long long cudaTextureObject_t;
209
210 /** @} */
211 /** @} */ /* END CUDART_TYPES */
212
213 #endif /* !__TEXTURE_TYPES_H__ */