Download Users Manual

Transcript
Cg Language Toolkit
automatically determine the value for the MaxDrawBuffers profile option that is appropriate for the graphics hardware on the target machine.
Resource Limits
The ARB_fragment_profile specifications allows an OpenGL implementation to place limits on the numbers and types of resources that a fragment program may use. If these resource limits must be exceeded to compile a Cg program, the compilation will fail. Resources that may be limited include the number of instructions, the number of registers, and the number of dependent texture reads.
The arbfp1 profile supports a number of options that allow these limits to be specified on the compiler command line; see “Options” on page 262 for details. These limits may also be values appropriate for the host computerʹs GPU, which are set using the cgGLSetOptimalOptions() Cg runtime call. Language Constructs and Support
Data Types
This profile implements data types as follows:
‰
float data type is implemented as IEEE 32‐bit single precision.
‰
half, fixed, and double data types are treated as float.
‰
int data type is supported using floating point operations.
‰
sampler* types are supported to specify sampler objects used for texture fetches.
Statements and Operators
With the ARB fragment program profiles while, do, and for statements are allowed only if the loops they define can be unrolled because there is no dynamic branching in ARB fragment program 1.
Comparison operators are allowed (>, <, >=, <=, ==, !=) and Boolean operators (||, &&, ?:) are allowed. However, the logic operators (&, |, ^, ~) are not.
Using Arrays and Structures
Variable indexing of arrays is not allowed. Array and structure data is not packed. 264
NVIDIA
808-00504-0000-006