3 * Copyright (c) 2002-2010, NVIDIA Corporation.
7 * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
8 * of your agreement to the following terms, and your use, installation,
9 * modification or redistribution of this NVIDIA software constitutes
10 * acceptance of these terms. If you do not agree with these terms, please do
11 * not use, install, modify or redistribute this NVIDIA software.
15 * In consideration of your agreement to abide by the following terms, and
16 * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
17 * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
18 * Software"), to use, reproduce, modify and redistribute the NVIDIA
19 * Software, with or without modifications, in source and/or binary forms;
20 * provided that if you redistribute the NVIDIA Software, you must retain the
21 * copyright notice of NVIDIA, this notice and the following text and
22 * disclaimers in all such redistributions of the NVIDIA Software. Neither the
23 * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
24 * to endorse or promote products derived from the NVIDIA Software without
25 * specific prior written permission from NVIDIA. Except as expressly stated
26 * in this notice, no other rights or licenses express or implied, are granted
27 * by NVIDIA herein, including but not limited to any patent rights that may be
28 * infringed by your derivative works or by other works in which the NVIDIA
29 * Software may be incorporated. No hardware is licensed hereunder.
33 * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
34 * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
35 * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
37 * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
41 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
42 * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
43 * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
44 * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
45 * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
46 * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
47 * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
48 * OF THE POSSIBILITY OF SUCH DAMAGE.
53 * The following macro invocations define error codes returned by various cg
56 * The macros have the form :
58 * CG_ERROR_MACRO(code, enum_name, message)
60 * code : The integer error code associated with the error.
61 * enum_name : The name of enumerant of the error code in the API.
62 * message : A description string associated with the error.
69 "No error has occurred.")
73 "The compile returned an error.")
76 CG_INVALID_PARAMETER_ERROR
,
77 "The parameter used is invalid.")
80 CG_INVALID_PROFILE_ERROR
,
81 "The profile is not supported.")
84 CG_PROGRAM_LOAD_ERROR
,
85 "The program could not load.")
88 CG_PROGRAM_BIND_ERROR
,
89 "The program could not bind.")
92 CG_PROGRAM_NOT_LOADED_ERROR
,
93 "The program must be loaded before this operation may be used.")
96 CG_UNSUPPORTED_GL_EXTENSION_ERROR
,
97 "An unsupported GL extension was required to perform this operation.")
100 CG_INVALID_VALUE_TYPE_ERROR
,
101 "An unknown value type was assigned to a parameter.")
104 CG_NOT_MATRIX_PARAM_ERROR
,
105 "The parameter is not of matrix type.")
108 CG_INVALID_ENUMERANT_ERROR
,
109 "The enumerant parameter has an invalid value.")
112 CG_NOT_4x4_MATRIX_ERROR
,
113 "The parameter must be a 4x4 matrix type.")
117 "The file could not be read.")
121 "The file could not be written.")
125 "nvparse could not successfully parse the output from the Cg "
129 CG_MEMORY_ALLOC_ERROR
,
130 "Memory allocation failed.")
133 CG_INVALID_CONTEXT_HANDLE_ERROR
,
134 "Invalid context handle.")
137 CG_INVALID_PROGRAM_HANDLE_ERROR
,
138 "Invalid program handle.")
141 CG_INVALID_PARAM_HANDLE_ERROR
,
142 "Invalid parameter handle.")
145 CG_UNKNOWN_PROFILE_ERROR
,
146 "The specified profile is unknown.")
150 "The variable arguments were specified incorrectly.")
153 CG_INVALID_DIMENSION_ERROR
,
154 "The dimension value is invalid.")
157 CG_ARRAY_PARAM_ERROR
,
158 "The parameter must be an array.")
161 CG_OUT_OF_ARRAY_BOUNDS_ERROR
,
162 "Index into the array is out of bounds.")
165 CG_CONFLICTING_TYPES_ERROR
,
166 "A type being added to the context conflicts with an "
170 CG_CONFLICTING_PARAMETER_TYPES_ERROR
,
171 "The parameters being bound have conflicting types.")
174 CG_PARAMETER_IS_NOT_SHARED_ERROR
,
175 "The parameter must be global.")
178 CG_INVALID_PARAMETER_VARIABILITY_ERROR
,
179 "The parameter could not be changed to the given variability.")
182 CG_CANNOT_DESTROY_PARAMETER_ERROR
,
183 "Cannot destroy the parameter. It is bound to other parameters "
184 "or is not a root parameter.")
188 CG_NOT_ROOT_PARAMETER_ERROR
,
189 "The parameter is not a root parameter.")
192 CG_PARAMETERS_DO_NOT_MATCH_ERROR
,
193 "The two parameters being bound do not match.")
196 CG_IS_NOT_PROGRAM_PARAMETER_ERROR
,
197 "The parameter is not a program parameter.")
200 CG_INVALID_PARAMETER_TYPE_ERROR
,
201 "The type of the parameter is invalid.")
204 CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR
,
205 "The parameter must be a resizable array.")
208 CG_INVALID_SIZE_ERROR
,
209 "The size value is invalid.")
212 CG_BIND_CREATES_CYCLE_ERROR
,
213 "Cannot bind the given parameters. Binding will form a cycle.")
216 CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR
,
217 "Cannot bind the given parameters. Array types do not match.")
220 CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR
,
221 "Cannot bind the given parameters. "
222 "Array dimensions do not match.")
225 CG_ARRAY_HAS_WRONG_DIMENSION_ERROR
,
226 "The array has the wrong dimension.")
229 CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR
,
230 "Connecting the parameters failed because The type of the "
231 "source parameter is not defined within the given program "
232 "or does not match the type with the same name in the program.")
235 CG_INVALID_EFFECT_HANDLE_ERROR
,
236 "Invalid effect handle.")
239 CG_INVALID_STATE_HANDLE_ERROR
,
240 "Invalid state handle.")
243 CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR
,
244 "Invalid stateassignment handle.")
247 CG_INVALID_PASS_HANDLE_ERROR
,
248 "Invalid pass handle.")
251 CG_INVALID_ANNOTATION_HANDLE_ERROR
,
252 "Invalid annotation handle.")
255 CG_INVALID_TECHNIQUE_HANDLE_ERROR
,
256 "Invalid technique handle.")
258 /* Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead. */
261 CG_INVALID_PARAMETER_HANDLE_ERROR
,
262 "Invalid parameter handle.")
265 CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR
,
266 "Operation is not valid for this type of stateassignment.")
269 CG_INVALID_FUNCTION_HANDLE_ERROR
,
270 "Invalid function handle.")
273 CG_INVALID_TECHNIQUE_ERROR
,
274 "Technique did not pass validation.")
277 CG_INVALID_POINTER_ERROR
,
278 "The supplied pointer is NULL.")
281 CG_NOT_ENOUGH_DATA_ERROR
,
282 "Not enough data was provided.")
285 CG_NON_NUMERIC_PARAMETER_ERROR
,
286 "The parameter is not of a numeric type.")
289 CG_ARRAY_SIZE_MISMATCH_ERROR
,
290 "The specified array sizes are not compatible with the given array.")
293 CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR
,
294 "Cannot set the value of a non-uniform parameter.")
297 CG_DUPLICATE_NAME_ERROR
,
298 "This name is already in use.")
301 CG_INVALID_OBJ_HANDLE_ERROR
,
302 "Invalid object handle.")
305 CG_INVALID_BUFFER_HANDLE_ERROR
,
306 "Invalid buffer handle.")
309 CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR
,
310 "Buffer index is out of bounds.")
313 CG_BUFFER_ALREADY_MAPPED_ERROR
,
314 "The buffer is already mapped.")
317 CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR
,
318 "The buffer cannot be updated.")
321 CG_GLSLG_UNCOMBINED_LOAD_ERROR
,
322 "The GLSL geometry program can not load without being combined with a vertex program.")
324 #undef CG_ERROR_MACRO