1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
/*
* This is a modified version of the original header as provided by
* NVidia; original copyright appears below.
*
* Modified by Christopher Kline, May 2003: Stripped down and hacked to get
* around macro interpretation problems.
*/
/*
*
* Copyright (c) 2002-2004, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software.
*
*
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA�s copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
* The following macro invocations define error codes returned by various cg
* API functions.
*
* The macros have the form :
*
* CG_ERROR_MACRO(code, enum_name, message)
*
* code : The integer error code associated with the error.
* enum_name : The name of enumerant of the error code in the API.
* message : A description string associated with the error.
*
*/
CG_NO_ERROR=
/*CG_ERROR_MACRO(*/0,/*
CG_NO_ERROR,
"No error has occurred.")*/
CG_COMPILER_ERROR=
/*CG_ERROR_MACRO(*/1,/*
CG_COMPILER_ERROR,
"The compile returned an error.")*/
CG_INVALID_PARAMETER_ERROR=
/*CG_ERROR_MACRO(*/2,/*
CG_INVALID_PARAMETER_ERROR,
"The parameter used is invalid.")*/
CG_INVALID_PROFILE_ERROR=
/*CG_ERROR_MACRO(*/3,/*
CG_INVALID_PROFILE_ERROR,
"The profile is not supported.")*/
CG_PROGRAM_LOAD_ERROR=
/*CG_ERROR_MACRO(*/4,/*
CG_PROGRAM_LOAD_ERROR,
"The program could not load.")*/
CG_PROGRAM_BIND_ERROR=
/*CG_ERROR_MACRO(*/5,/*
CG_PROGRAM_BIND_ERROR,
"The program could not bind.")*/
CG_PROGRAM_NOT_LOADED_ERROR=
/*CG_ERROR_MACRO(*/6,/*
CG_PROGRAM_NOT_LOADED_ERROR,
"The program must be loaded before this operation may be used.")*/
CG_UNSUPPORTED_GL_EXTENSION_ERROR=
/*CG_ERROR_MACRO(*/7,/*
CG_UNSUPPORTED_GL_EXTENSION_ERROR,
"An unsupported GL extension was required to perform this operation.")*/
CG_INVALID_VALUE_TYPE_ERROR=
/*CG_ERROR_MACRO(*/8,/*
CG_INVALID_VALUE_TYPE_ERROR,
"An unknown value type was assigned to a parameter.")*/
CG_NOT_MATRIX_PARAM_ERROR=
/*CG_ERROR_MACRO(*/9,/*
CG_NOT_MATRIX_PARAM_ERROR,
"The parameter is not of matrix type.")*/
CG_INVALID_ENUMERANT_ERROR=
/*CG_ERROR_MACRO(*/10,/*
CG_INVALID_ENUMERANT_ERROR,
"The enumerant parameter has an invalid value.")*/
CG_NOT_4x4_MATRIX_ERROR=
/*CG_ERROR_MACRO(*/11,/*
CG_NOT_4x4_MATRIX_ERROR,
"The parameter must be a 4x4 matrix type.")*/
CG_FILE_READ_ERROR=
/*CG_ERROR_MACRO(*/12,/*
CG_FILE_READ_ERROR,
"The file could not be read.")*/
CG_FILE_WRITE_ERROR=
/*CG_ERROR_MACRO(*/13,/*
CG_FILE_WRITE_ERROR,
"The file could not be written.")*/
CG_NVPARSE_ERROR=
/*CG_ERROR_MACRO(*/14,/*
CG_NVPARSE_ERROR,
"nvparse could not successfully parse the output from the Cg "
"compiler backend.")*/
CG_MEMORY_ALLOC_ERROR=
/*CG_ERROR_MACRO(*/15,/*
CG_MEMORY_ALLOC_ERROR,
"Memory allocation failed.")*/
CG_INVALID_CONTEXT_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/16,/*
CG_INVALID_CONTEXT_HANDLE_ERROR,
"Invalid context handle.")*/
CG_INVALID_PROGRAM_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/17,/*
CG_INVALID_PROGRAM_HANDLE_ERROR,
"Invalid program handle.")*/
CG_INVALID_PARAM_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/18,/*
CG_INVALID_PARAM_HANDLE_ERROR,
"Invalid parameter handle.")*/
CG_UNKNOWN_PROFILE_ERROR=
/*CG_ERROR_MACRO(*/19,/*
CG_UNKNOWN_PROFILE_ERROR,
"The specified profile is unknown.")*/
CG_VAR_ARG_ERROR=
/*CG_ERROR_MACRO(*/20,/*
CG_VAR_ARG_ERROR,
"The variable arguments were specified incorrectly.")*/
CG_INVALID_DIMENSION_ERROR=
/*CG_ERROR_MACRO(*/21,/*
CG_INVALID_DIMENSION_ERROR,
"The dimension value is invalid.")*/
CG_ARRAY_PARAM_ERROR=
/*CG_ERROR_MACRO(*/22,/*
CG_ARRAY_PARAM_ERROR,
"The parameter must be an array.")*/
CG_OUT_OF_ARRAY_BOUNDS_ERROR=
/*CG_ERROR_MACRO(*/23,/*
CG_OUT_OF_ARRAY_BOUNDS_ERROR,
"Index into the array is out of bounds.")*/
CG_CONFLICTING_TYPES_ERROR=
/*CG_ERROR_MACRO(*/24,/*
CG_CONFLICTING_TYPES_ERROR,
"A type being added to the context conflicts with an "
"existing type.")*/
CG_CONFLICTING_PARAMETER_TYPES_ERROR=
/*CG_ERROR_MACRO(*/25,/*
CG_CONFLICTING_PARAMETER_TYPES_ERROR,
"The parameters being bound have conflicting types.")*/
CG_PARAMETER_IS_NOT_SHARED_ERROR=
/*CG_ERROR_MACRO(*/26,/*
CG_PARAMETER_IS_NOT_SHARED_ERROR,
"The parameter must be global.")*/
CG_INVALID_PARAMETER_VARIABILITY_ERROR=
/*CG_ERROR_MACRO(*/27,/*
CG_INVALID_PARAMETER_VARIABILITY_ERROR,
"The parameter could not be changed to the given variability.")*/
CG_CANNOT_DESTROY_PARAMETER_ERROR=
/*CG_ERROR_MACRO(*/28,/*
CG_CANNOT_DESTROY_PARAMETER_ERROR,
"Cannot destroy the parameter. It is bound to other parameters "
"or is not a root parameter.")*/
CG_NOT_ROOT_PARAMETER_ERROR=
/*CG_ERROR_MACRO(*/29,/*
CG_NOT_ROOT_PARAMETER_ERROR,
"The parameter is not a root parameter.")*/
CG_PARAMETERS_DO_NOT_MATCH_ERROR=
/*CG_ERROR_MACRO(*/30,/*
CG_PARAMETERS_DO_NOT_MATCH_ERROR,
"The two parameters being bound do not match.")*/
CG_IS_NOT_PROGRAM_PARAMETER_ERROR=
/*CG_ERROR_MACRO(*/31,/*
CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
"The parameter is not a program parameter.")*/
CG_INVALID_PARAMETER_TYPE_ERROR=
/*CG_ERROR_MACRO(*/32,/*
CG_INVALID_PARAMETER_TYPE_ERROR,
"The type of the parameter is invalid.")*/
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR=
/*CG_ERROR_MACRO(*/33,/*
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
"The parameter must be a resizable array.")*/
CG_INVALID_SIZE_ERROR=
/*CG_ERROR_MACRO(*/34,/*
CG_INVALID_SIZE_ERROR,
"The size value is invalid.")*/
CG_BIND_CREATES_CYCLE_ERROR=
/*CG_ERROR_MACRO(*/35,/*
CG_BIND_CREATES_CYCLE_ERROR,
"Cannot bind the given parameters. Binding will form a cycle.")*/
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR=
/*CG_ERROR_MACRO(*/36,/*
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. Array types do not match.")*/
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR=
/*CG_ERROR_MACRO(*/37,/*
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. "
"Array dimensions do not match.")*/
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR=
/*CG_ERROR_MACRO(*/38,/*
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
"The array is has the wrong dimension.")*/
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR=
/*CG_ERROR_MACRO(*/39,/*
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
"Connecting the parameters failed because The type of the "
"source parameter is not defined within the given program "
"or does not match the type with the same name in the program.")*/
CG_INVALID_EFFECT_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/40,/*
CG_INVALID_EFFECT_HANDLE_ERROR,
"Invalid effect handle.")*/
CG_INVALID_STATE_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/41,/*
CG_INVALID_STATE_HANDLE_ERROR,
"Invalid state handle.")*/
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/42,/*
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR,
"Invalid stateassignment handle.")*/
CG_INVALID_PASS_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/43,/*
CG_INVALID_PASS_HANDLE_ERROR,
"Invalid pass handle.")*/
CG_INVALID_ANNOTATION_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/44,/*
CG_INVALID_ANNOTATION_HANDLE_ERROR,
"Invalid annotation handle.")*/
CG_INVALID_TECHNIQUE_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/45,/*
CG_INVALID_TECHNIQUE_HANDLE_ERROR,
"Invalid technique handle.")*/
CG_INVALID_PARAMETER_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/46,/*
CG_INVALID_PARAMETER_HANDLE_ERROR,
"Invalid parameter handle.")*/
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR=
/*CG_ERROR_MACRO(*/47,/*
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR,
"Invalid parameter handle.")*/
CG_INVALID_FUNCTION_HANDLE_ERROR=
/*CG_ERROR_MACRO(*/48,/*
CG_INVALID_FUNCTION_HANDLE_ERROR,
"Invalid function handle.")*/
CG_INVALID_TECHNIQUE_ERROR=
/*CG_ERROR_MACRO(*/49,/*
CG_INVALID_TECHNIQUE_ERROR,
"Technique did not pass validation.")*/
CG_INVALID_POINTER_ERROR=
/*CG_ERROR_MACRO(*/50,/*
CG_INVALID_POINTER_ERROR,
"The supplied pointer is NULL.")*/
CG_NOT_ENOUGH_DATA_ERROR=
/*CG_ERROR_MACRO(*/51,/*
CG_NOT_ENOUGH_DATA_ERROR,
"Not enough data was provided.")*/
CG_NON_NUMERIC_PARAMETER_ERROR=
/*CG_ERROR_MACRO(*/52,/*
CG_NON_NUMERIC_PARAMETER_ERROR,
"The parameter is not of a numeric type.")*/
CG_ARRAY_SIZE_MISMATCH_ERROR=
/*CG_ERROR_MACRO(*/53,/*
CG_ARRAY_SIZE_MISMATCH_ERROR,
"The specified array sizes are not compatible with the given array.")*/
//#undef CG_ERROR_MACRO
|