NAME
    gp4vp - OpenGL vertex profile for G8x (GeForce 8xxx Series, G8x-based
    Quadro FX, etc.)

SYNOPSIS
      gp4vp

DESCRIPTION
    This OpenGL profile corresponds to the per-vertex functionality
    introduced by the GeForce 8800 and other G8x-based NVIDIA GPUs.

    The compiler output for this profile conforms to the assembly format
    defined by NV_gpu_program4 and ARB_vertex_program.

    Note that the NV_gpu_program4 extension has its vertex domain-specific
    aspects documented in the NV_vertex_program4 specification.

    Data-dependent loops and branching *are* allowed.

    Relative indexing of uniform arrays *is* supported.

    Texture accesses are supported. While the prior vp40 profile has
    substantial limitations on vertex texturing, the gp4vp profile
    eliminates all the limitations.

    Texture accesses include support for texture arrays (see the
    EXT_texture_array OpenGL extension for more details) and texture buffer
    objects (see the EXT_texture_buffer_object extension for details).
    Texture results can be either conventional floating-point vectors or
    integer vectors (see the EXT_texture_integer extension for details).

3D API DEPENDENCIES
    Requires OpenGL support for the NV_gpu_program4 extension. This
    extension was introduced by the GeForce 8800 and other G8x-based GPUs.

    Programmability:

     http://www.opengl.org/registry/specs/NV/gpu_program4.txt 
     http://www.opengl.org/registry/specs/NV/vertex_program4.txt 

    New texture samplers:

     http://www.opengl.org/registry/specs/EXT/texture_array.txt 
     http://www.opengl.org/registry/specs/EXT/texture_buffer_object.txt 

    New integer texture formats:

     http://www.opengl.org/registry/specs/EXT/texture_integer.txt 

PROFILE OPTIONS
  Common GP4 Options

    fastimul
        Assume integer multiply inputs have at most 24 significant bits.
        Example: "-po fastimul"

DATA TYPES
  Samplers

    This profile has additional samplers for texture arrays (1D and 2D) and
    texture buffers.

    Standard OpenGL textures formats (GL_RGBA8, etc.) return floating-point
    sampled results, but new signed and unsigned integer texture formats
    require samplers the return signed and unsigned integer vectors
    respectively. Sampler variants for fetching signed and unsigned integer
    vectors are prefixed by i and u respectively. Your application is
    required to make sure the bound textures have the appropriate texture
    format. So a 3D texture specified with the GL_RGBA32UI_EXT internal
    format (see the EXT_texture_integer OpenGL extension) must be used with
    a usampler3D sampler. Otherwise, texture sampling returns undefined
    results.

    sampler1D
            1D texture unit corresponding to OpenGL's GL_TEXTURE_1D target.
            Sampling returns float vectors.

    isampler1D
            1D texture unit corresponding to OpenGL's GL_TEXTURE_1D target.
            Sampling returns int vectors.

    usampler1D
            1D texture unit corresponding to OpenGL's GL_TEXTURE_1D target.
            Sampling returns unsigned int vectors.

    sampler1DARRAY
            1D array texture unit corresponding to OpenGL's
            GL_TEXTURE_1D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns float vectors.

    isampler1DARRAY
            1D array texture unit corresponding to OpenGL's
            GL_TEXTURE_1D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns int vectors.

    usampler1DARRAY
            1D array texture unit corresponding to OpenGL's
            GL_TEXTURE_1D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns unsigned int vectors.

    sampler2D
            2D texture unit corresponding to OpenGL's GL_TEXTURE_2D target.
            Sampling returns float vectors.

    isampler2D
            2D texture unit corresponding to OpenGL's GL_TEXTURE_2D target.
            Sampling returns int vectors.

    usampler2D
            2D texture unit corresponding to OpenGL's GL_TEXTURE_2D target.
            Sampling returns unsigned int vectors.

    sampler2DARRAY
            2D array texture unit corresponding to OpenGL's
            GL_TEXTURE_2D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns float vectors.

    isampler2DARRAY
            2D array texture unit corresponding to OpenGL's
            GL_TEXTURE_2D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns int vectors.

    usampler2DARRAY
            2D array texture unit corresponding to OpenGL's
            GL_TEXTURE_2D_ARRAY_EXT target provided by the EXT_texture_array
            extension. Sampling returns unsigned int vectors.

    sampler3D
            3D texture unit corresponding to OpenGL's GL_TEXTURE_3D target.
            Sampling returns float vectors.

    isampler3D
            3D texture unit corresponding to OpenGL's GL_TEXTURE_3D target.
            Sampling returns int vectors.

    usampler3D
            3D texture unit corresponding to OpenGL's GL_TEXTURE_3D target.
            Sampling returns unsigned int vectors.

    samplerCUBE
            Cube map texture unit corresponding to OpenGL's
            GL_TEXTURE_CUBE_MAP target. Sampling returns float vectors.

    isamplerCUBE
            Cube map texture unit corresponding to OpenGL's
            GL_TEXTURE_CUBE_MAP target. Sampling returns int vectors.

    usamplerCUBE
            Cube map texture unit corresponding to OpenGL's
            GL_TEXTURE_CUBE_MAP target. Sampling returns unsigned int
            vectors.

    samplerRECT
            Rectangle texture unit corresponding to OpenGL's
            GL_TEXTURE_RECTANGLE_ARB target. Sampling returns float vectors.

    isamplerRECT
            Rectangle texture unit corresponding to OpenGL's
            GL_TEXTURE_RECTANGLE_ARB target. Sampling returns int vectors.

    isamplerRECT
            Rectangle texture unit corresponding to OpenGL's
            GL_TEXTURE_RECTANGLE_ARB target. Sampling returns unsigned int
            vectors.

    samplerBUF
            Buffer texture unit corresponding to OpenGL's
            GL_TEXTURE_BUFFER_EXT target provided by the
            EXT_texture_buffer_object extension. Sampling returns float
            vectors.

    isamplerBUF
            Buffer texture unit corresponding to OpenGL's
            GL_TEXTURE_BUFFER_EXT target provided by the
            EXT_texture_buffer_object extension. Sampling returns int
            vectors.

    usamplerBUF
            Buffer texture unit corresponding to OpenGL's
            GL_TEXTURE_BUFFER_EXT target provided by the
            EXT_texture_buffer_object extension. Sampling returns unsigned
            int vectors.

  Floating-point

    float   32-bit IEEE floating-point

    half    32-bit IEEE floating-point

    double  32-bit IEEE floating-point

    fixed   Floating-point restricted to [-2,2) range.

  Integer

    This profile supports "true" integer data types. Shifting and bitwise
    operators are supported for integer data types.

    int     32-bit signed integer

    unsigned int
            32-bit unsigned integer

    short   16-bit signed integer

    unsigned short
            16-bit unsigned integer

    char    8-bit signed integer

    unsigned char
            8-bit unsigned integer

SEMANTICS
  VARYING INPUT SEMANTICS

   Vertex Attribute Input Semantics

    For geometry shader profiles such as gp4gp, varying parameters with
    vertex attribute input semantics must be declared with the AttribArray
    template-style syntax because a geometry shader accepts an attribute
    array of vertex attributes (rather than individual vertex attributes as
    a vertex shader does).

    Example defining a varying parameter for the position vertex attribute:

      AttribArray<float4> position : POSITION

    The set of binding semantics for varying input vertex attributes to
    gp4gp consists of POSITION, BLENDWEIGHT, NORMAL, COLOR0, COLOR1,
    TESSFACTOR, PSIZE, BLENDINDICES, and TEXCOORD0-TEXCOORD7. One can also
    use TANGENT and BINORMAL instead of TEXCOORD6 and TEXCOORD7.

    Additionally, a set of binding semantics ATTR0-ATTR15 can be used. These
    binding semantics map to NV_gpu_program4 input attribute parameters as
    described in the NV_geometry_program4 document.

    The two sets act as aliases to each other on NVIDIA GPUs excluding Apple
    Macs. ATI GPUs and NVIDIA Mac GPUs do *not* alias the conventional
    vertex attributes with the generic attributes.

      Binding Semantics Name       Corresponding Data
  
      POSITION, ATTR0              Input Vertex, Generic Attribute 0 
  
      BLENDWEIGHT, ATTR1           Input vertex weight, Generic Attribute 1 
  
      NORMAL, ATTR2                Input normal, Generic Attribute 2
  
      DIFFUSE, COLOR0, ATTR3       Input primary color, Generic Attribute 3
  
      SPECULAR, COLOR1, ATTR4      Input secondary color, Generic Attribute 4
  
      TESSFACTOR, FOGCOORD, ATTR5  Input fog coordinate, Generic Attribute 5
  
      PSIZE, ATTR6                 Input point size, Generic Attribute 6
  
      BLENDINDICES, ATTR7          Generic Attribute 7
    
      TEXCOORD0-TEXCOORD7,         Input texture coordinates (texcoord0-texcoord7)
      ATTR8-ATTR15                 Generic Attributes 8-15
  
      TANGENT, ATTR14              Generic Attribute 14
  
      BINORMAL, ATTR15             Generic Attribute 15

    These vertex attribute semantics should match with the semantics of the
    outputs of the vertex shader feeding the geometry shader.

  UNIFORM INPUT SEMANTICS

   Buffer Semantics

    the gp4 manpage profiles can specify that uniforms be specified to
    reside within binable buffers.

    Example of automatic, compiler-determined specification of a uniform's
    location within a buffer:

      uniform float2 location   : BUFFER[3];  // compiler positions within buffer 3
      uniform float4 brickColor : BUFFER[3];  // compiler positions within buffer 3

    Example of absolute byte offset specification of a uniform's locaiton
    within a buffer:

      uniform float4 mustBeHere : BUFFER[7][20];  // locate 20 bytes into buffer 7

   Constant Register Semantics

      C0-C255           Constant register [0..255].
                        The aliases c0-c255 (lowercase) are also accepted.

    If used with a variable that requires more than one constant register
    (e.g. a matrix), the semantic specifies the first register that is used.

    Example:

      uniform float4 array[20] : C14;  // uses c14 through c33

   Texture Unit Semantics

      TEXUNIT0-TEXUNIT15  Texture unit (but only 4 distinct texture units
                          are allowed)

    Example:

      uniform sampler2DARRAY texArray : TEXUNIT7;

  OUTPUT SEMANTICS

    These vertex attribute output semantics match the output semantics for
    gp4vp.

      Binding Semantics Name        Corresponding Data
  
      POSITION, HPOS                Output position
  
      PSIZE, PSIZ                   Output point size
  
      FOG, FOGC                     Output fog coordinate
  
      COLOR0, COL0                  Output primary color 
  
      COLOR1, COL1                  Output secondary color
  
      BCOL0                         Output backface primary color
  
      BCOL1                         Output backface secondary color
  
      TEXCOORD0-TEXCOORD7,          Output texture coordinates
      TEX0-TEX7
  
      CLP0-CL5                      Output Clip distances

STANDARD LIBRARY ISSUES
  Raw Cast from Floating-point to Integer Functions

    It is possible to convert the raw bit patterns of IEEE single-precision
    floating-point to 32-bit unsigned integer.

    the floatToRawIntBits manpage, the floatToIntBits manpage, the
    intBitsToFloat manpage

  Texture Array Functions

    New sampler data types for texture arrays and texture buffers lead to
    new standard library routines to access these samplers.

    New standard library functions are used to access 1D texture array
    samplers (sampler1DARRAY).

    the tex1DARRAY manpage, the tex1DARRAYbias manpage, the
    tex1DARRAYcmpbias manpage, the tex1DARRAYlod manpage, the
    tex1DARRAYcmplod manpage, and the tex1DARRAYproj manpage

    The dimensions of a texture array level can be determined.

    the tex1DARRAYsize manpage

    New standard library functions are used to access 2D texture array
    samplers (sampler2DARRAY).

    the tex2DARRAY manpage, the tex2DARRAYbias manpage, the
    tex2DARRAYcmpbias manpage, the tex2DARRAYlod manpage, the
    tex2DARRAYcmplod manpage, and the tex2DARRAYproj manpage

    The dimensions of a texture array level can be determined.

    the tex2DARRAYsize manpage

SEE ALSO
    the gp4fp manpage, the gp4gp manpage, the texBUF manpage, the texBUFsize
    manpage, the floatToRawIntBits manpage, the floatToIntBits manpage, the
    intBitsToFloat manpage

    the tex1DARRAY manpage, the tex1DARRAYbias manpage, the
    tex1DARRAYcmpbias manpage, the tex1DARRAYlod manpage, the
    tex1DARRAYcmplod manpage, the tex1DARRAYproj manpage, the tex1DARRAYsize
    manpage

    the tex2DARRAY manpage, the tex2DARRAYbias manpage, the
    tex2DARRAYcmpbias manpage, the tex2DARRAYlod manpage, the
    tex2DARRAYcmplod manpage, the tex2DARRAYproj manpage, the tex2DARRAYsize
    manpage

