• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NV_texture_shader
4
5Name Strings
6
7    GL_NV_texture_shader
8
9Contact
10
11    Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com)
12
13Notice
14
15    Copyright NVIDIA Corporation, 1999, 2000, 2001, 2002, 2004.
16
17IP Status
18
19    NVIDIA Proprietary.
20
21Status
22
23    Shipping (since GeForce3)
24
25Version
26
27    NVIDIA Date:  March 13, 2007
28    Version:      30
29
30Number
31
32    230
33
34Dependencies
35
36    Written based on the wording of the OpenGL 1.2.1 specification.
37
38    Requires support for the ARB_multitexture extension.
39
40    Requires support for the ARB_texture_cube_map extension.
41
42    NV_register_combiners affects the definition of this extension.
43
44    EXT_texture_lod_bias trivially affects the definition of this
45    extension.
46
47    ARB_texture_env_combine and/or EXT_texture_env_combine affect the
48    definition of this extension.
49
50    NV_texture_env_combine4 affects the definition of this extension.
51
52    ARB_texture_env_add and/or EXT_texture_env_add affect the definition
53    of this extension.
54
55    NV_texture_rectangle affects the definition of this extension.
56
57    NV_texture_shader2 depends on the definition of this extension.
58
59    ARB_color_buffer_float affects the definiton of this extension.
60
61Overview
62
63    Standard OpenGL and the ARB_multitexture extension define a
64    straightforward direct mechanism for mapping sets of texture
65    coordinates to filtered colors.  This extension provides a more
66    functional mechanism.
67
68    OpenGL's standard texturing mechanism defines a set of texture
69    targets.  Each texture target defines how the texture image
70    is specified and accessed via a set of texture coordinates.
71    OpenGL 1.0 defines the 1D and 2D texture targets.  OpenGL 1.2
72    (and/or the EXT_texture3D extension) defines the 3D texture target.
73    The ARB_texture_cube_map extension defines the cube map texture
74    target.  Each texture unit's texture coordinate set is mapped to a
75    color using the unit's highest priority enabled texture target.
76
77    This extension introduces texture shader stages.  A sequence of
78    texture shader stages provides a more flexible mechanism for mapping
79    sets of texture coordinates to texture unit RGBA results than standard
80    OpenGL.
81
82    When the texture shader enable is on, the extension replaces the
83    conventional OpenGL mechanism for mapping sets of texture coordinates
84    to filtered colors with this extension's sequence of texture shader
85    stages.
86
87    Each texture shader stage runs one of 21 canned texture shader
88    programs.  These programs support conventional OpenGL texture
89    mapping but also support dependent texture accesses, dot product
90    texture programs, and special modes.  (3D texture mapping
91    texture shader operations are NOT provided by this extension;
92    3D texture mapping texture shader operations are added by the
93    NV_texture_shader2 extension that is layered on this extension.
94    See the NV_texture_shader2 specification.)
95
96    To facilitate the new texture shader programs, this extension
97    introduces several new texture formats and variations on existing
98    formats.  Existing color texture formats are extended by introducing
99    new signed variants.  Two new types of texture formats (beyond colors)
100    are also introduced.  Texture offset groups encode two signed offsets,
101    and optionally a magnitude or a magnitude and an intensity.  The new
102    HILO (pronounced high-low) formats provide possibly signed, high
103    precision (16-bit) two-component textures.
104
105    Each program takes as input the stage's interpolated texture
106    coordinate set (s,t,r,q).  Each program generates two results:
107    a shader stage result that may be used as an input to subsequent
108    shader stage programs, and a texture unit RGBA result that becomes the
109    texture color used by the texture unit's texture environment function
110    or becomes the initial value for the corresponding texture register
111    for register combiners. The texture unit RGBA result is always
112    an RGBA color, but the shader stage result may be one of an RGBA
113    color, a HILO value, a texture offset group, a floating-point value,
114    or an invalid result.  When both results are RGBA colors, the shader
115    stage result and the texture unit RGBA result are usually identical
116    (though not in all cases).
117
118    Additionally, certain programs have a side-effect such as culling
119    the fragment or replacing the fragment's depth value.
120
121    The twenty-one programs are briefly described:
122
123    <none>
124
125    1.   NONE - Always generates a (0,0,0,0) texture unit RGBA result.
126         Equivalent to disabling all texture targets in conventional
127         OpenGL.
128
129    <conventional textures>
130
131    2.   TEXTURE_1D - Accesses a 1D texture via (s/q).
132
133    3.   TEXTURE_2D - Accesses a 2D texture via (s/q,t/q).
134
135    4.   TEXTURE_RECTANGLE_NV - Accesses a rectangular texture via (s/q,t/q).
136
137    5.   TEXTURE_CUBE_MAP_ARB - Accesses a cube map texture via (s,t,r).
138
139    <special modes>
140
141    6.   PASS_THROUGH_NV - Converts a texture coordinate (s,t,r,q)
142         directly to a [0,1] clamped (r,g,b,a) texture unit RGBA result.
143
144    7.   CULL_FRAGMENT_NV - Culls the fragment based on the whether each
145         (s,t,r,q) is "greater than or equal to zero" or "less than zero".
146
147    <offset textures>
148
149    8.   OFFSET_TEXTURE_2D_NV - Transforms the signed (ds,dt) components
150         of a previous texture unit by a 2x2 floating-point matrix and
151         then uses the result to offset the stage's texture coordinates
152         for a 2D non-projective texture.
153
154    9.   OFFSET_TEXTURE_2D_SCALE_NV - Same as above except the magnitude
155         component of the previous texture unit result scales the red,
156         green, and blue components of the unsigned RGBA texture 2D
157         access.
158
159    10.  OFFSET_TEXTURE_RECTANGLE_NV - Similar to OFFSET_TEXTURE_2D_NV
160         except that the texture access is into a rectangular
161         non-projective texture.
162
163    11.  OFFSET_TEXTURE_RECTANGLE_SCALE_NV - Similar to
164         OFFSET_TEXTURE_2D_SCALE_NV except that the texture access is
165         into a rectangular non-projective texture.
166
167    <dependent textures>
168
169    12.  DEPENDENT_AR_TEXTURE_2D_NV - Converts the alpha and red
170         components of a previous shader result into an (s,t) texture
171         coordinate set to access a 2D non-projective texture.
172
173    13.  DEPENDENT_GB_TEXTURE_2D_NV - Converts the green and blue
174         components of a previous shader result into an (s,t) texture
175         coordinate set to access a 2D non-projective texture.
176
177    <dot product textures>
178
179    14.  DOT_PRODUCT_NV - Computes the dot product of the texture
180         shader's texture coordinate set (s,t,r) with some mapping of the
181         components of a previous texture shader result.  The component
182         mapping depends on the type (RGBA or HILO) and signedness of
183         the stage's previous texture input.  Other dot product texture
184         programs use the result of this program to compose a texture
185         coordinate set for a dependent texture access.  The color result
186         is undefined.
187
188    15.  DOT_PRODUCT_TEXTURE_2D_NV - When preceded by a DOT_PRODUCT_NV
189         program in the previous texture shader stage, computes a second
190         similar dot product and composes the two dot products into (s,t)
191         texture coordinate set to access a 2D non-projective texture.
192
193    16.  DOT_PRODUCT_TEXTURE_RECTANGLE_NV - Similar to
194         DOT_PRODUCT_TEXTURE_2D_NV except that the texture acces is into
195         a rectangular non-projective texture.
196
197    17.  DOT_PRODUCT_TEXTURE_CUBE_MAP_NV - When preceded by two
198         DOT_PRODUCT_NV programs in the previous two texture shader
199         stages, computes a third similar dot product and composes the
200         three dot products into (s,t,r) texture coordinate set to access
201         a cube map texture.
202
203    18.  DOT_PRODUCT_REFLECT_CUBE_MAP_NV - When preceded by two
204         DOT_PRODUCT_NV programs in the previous two texture shader
205         stages, computes a third similar dot product and composes the
206         three dot products into a normal vector (Nx,Ny,Nz).  An eye
207         vector (Ex,Ey,Ez) is composed from the q texture coordinates of
208         the three stages.  A reflection vector (Rx,Ry,Rz) is computed
209         based on the normal and eye vectors.  The reflection vector
210         forms an (s,t,r) texture coordinate set to access a cube map
211         texture.
212
213    19.  DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV - Operates like
214         DOT_PRODUCT_REFLECT_CUBE_MAP_NV except that the eye vector
215         (Ex,Ey,Ez) is a user-defined constant rather than composed from
216         the q coordinates of the three stages.
217
218    20.  DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV - When used instead of the second
219         DOT_PRODUCT_NV program preceding
220         a DOT_PRODUCT_REFLECT_CUBE_MAP_NV or
221         DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV stage, the normal
222         vector forms an (s,t,r) texture  coordinate set to access a
223         cube map texture.
224
225    <dot product depth replace>
226
227    21.  DOT_PRODUCT_DEPTH_REPLACE_NV - When preceded by a DOT_PRODUCT_NV
228         program in the previous texture shader stage, computes a second
229         similar dot product and replaces the fragment's window-space
230         depth value with the first dot product results divided by
231         the second.  The texture unit RGBA result is (0,0,0,0).
232
233Issues
234
235    What should this extension be called?  How does the functionality
236    compare with DirectX 8's pixel shaders?
237
238      RESOLUTION:  This extension is called NV_texture_shader.
239
240      DirectX 8 refers to its similar functionality as "pixel shaders".
241      However, DirectX 8 lumps both the functionality described in this
242      extension and additional functionality similar to the functionality
243      in the NV_register_combiners extension together into what DirectX
244      8 calls pixel shaders.  This is confusing in two ways.
245
246      1)  Pixels are not being shaded.  In fact, the DirectX 8 pixel
247          shaders functionality is, taken as a whole, shading only
248          fragments (though Direct3D tends not to make the same
249          clear distinction between fragments and pixels that OpenGL
250          consistently makes).
251
252      2)  There are two very distinct tasks being performed.
253
254          First, there is the task of interpolated texture coordinate
255          mapping.  This per-fragment task maps from interpolated
256          floating-point texture coordinate sets to (typically
257          fixed-point) texture unit RGBA results.  In conventional OpenGL,
258          this mapping is performed by accessing the highest priority
259          enabled texture target using the fragment's corresponding
260          interpolated texture coordinate set.  This NV_texture_shader
261          extension provides a significantly more powerful mechanism
262          for performing this mapping.
263
264          Second, there is the task of fragment coloring.  Fragment
265          coloring is process of combining (typically fixed-point) RGBA
266          colors to generate a final fragment color that, assuming the
267          fragment is not discarded by subsequent per-fragment tests,
268          is used to update the fragment's corresponding pixel in the
269          frame buffer.  In conventional OpenGL, fragment coloring is
270          performed by the enabled texture environment functions, fog, and
271          color sum operations.  NVIDIA's register combiners functionality
272          (see the NV_register_combiners and NV_register_combiners2
273          extensions) provides a substantially more powerful alternative
274          to conventional OpenGL fragment coloring.
275
276      DirectX 8 has two types of opcodes for pixel shaders.  Texture
277      address opcodes correspond to the first task listed above.  Texture
278      register opcodes correspond to the second task listed above.
279
280      NVIDIA OpenGL extensions maintain a clear distinction between
281      these two tasks.  The texture shaders functionality described in
282      this specification corresponds to the first task listed above.
283
284      Here is the conceptual framework that NVIDIA OpenGL extensions use
285      to describe shading:  Shading is the process of assigning colors
286      to pixels, fragments, or texels.  The texture shaders functionality
287      assigns colors to texture unit results (essentially texture
288      shading).  These texture unit RGBA results can be used by fragment
289      coloring (fragment shading).  The resulting fragments are used to
290      update pixels (pixel shading) possibly via blending and/or multiple
291      rendering passes.
292
293      The goal of these individual shading operations is per-pixel
294      shading.  Per-pixel shading is accomplished by combining the
295      texture shading, fragment shading, and pixel shading operations,
296      possibly with multiple rendering passes.
297
298      Programmable shading is a style of per-pixel shading where the
299      shading operations are expressed in a higher level of abstraction
300      than "raw" OpenGL texture, fragment, and pixel shading operations.
301      In our view, programmable shading does not necessarily require a
302      "pixel program" to be downloaded and executed per-pixel by graphics
303      hardware.  Indeed, there are many disadvantages to such an approach
304      in practice.  An alternative view of programmable shading (the
305      one that we are promoting) treats the OpenGL primitive shading
306      operations as a SIMD machine and decomposes per-pixel shading
307      programs into one or more OpenGL rendering passes that map to "raw"
308      OpenGL shading operations.  We believe that conventional OpenGL
309      combined with NV_register_combiners and NV_texture_shader (and
310      further augmented by programmable geometry via NV_vertex_program
311      and higher-order surfaces via NV_evaluators) can become the hardware
312      basis for a powerful programmable shading system.
313
314      The roughly equivalent functionality to DirectX 8's pixel
315      shaders in OpenGL is the combination of NV_texture_shader with
316      NV_register_combiners.
317
318    Is anyone working on programmable shading using the NV_texture_shader
319    functionality?
320
321      Yes.  The Stanford Shading Group is actively working on
322      support for programmable shading using NV_texture_shader,
323      NV_register_combiners, and other extensions as the hardware basis
324      for such a system.
325
326    What terms are important to this specification?
327
328      texture shaders - A series of texture shader stages that map texture
329      coordinate sets to texture unit RGBA results.  An alternative to
330      conventional OpenGL texturing.
331
332      texture coordinate set - The interpolated (s,t,r,q) value for a
333      particular texture unit of a particular fragment.
334
335      conventional OpenGL texturing - The conventional mechanism used by
336      OpenGL to map texture coordinate sets to texture unit RGBA results
337      whereby a given texture unit's texture coordinate set is used to
338      access the highest priority enabled texture target to generate
339      the texture unit's RGBA result.  Conventional OpenGL texturing
340      supports 1D, 2D, 3D, and cube map texture targets.  In conventional
341      OpenGL texturing each texture unit operates independently.
342
343      texture target type - One of the four texture target types:  1D, 2D,
344      3D, and cube map.  (Note that NV_texture_shader does NOT provide
345      support for 3D textures; the NV_texture_shader2 extension adds
346      texture shader operations for 3D texture targets.)
347
348      texture internal format - The internal format of a particular
349      texture object.  For example, GL_RGBA8, GL_SIGNED_RGBA8, or
350      GL_SIGNED_HILO16_NV.
351
352      texture format type - One of the three texture format types:  RGBA,
353      HILO, or texture offset group.
354
355      texture component signedness - Whether or not a given component
356      of a texture's texture internal format is signed or not.
357      Signed components are clamped to the range [-1,1] while unsigned
358      components are clamped to the range [0,1].
359
360      texture shader enable - The OpenGL enable that determines whether
361      the texture shader functionality (if enabled) or conventional
362      OpenGL texturing functionality (if disabled) is used to map texture
363      coordinate sets to texture unit RGBA results.  The enable's initial
364      state is disabled.
365
366      texture shader stage - Each texture unit has a corresponding texture
367      shader stage that can be loaded with one of 21 texture shader
368      operations.  Depending on the stage's texture shader operation,
369      a texture shader stage uses the texture unit's corresponding
370      texture coordinate set and other state including the texture shader
371      results of previous texture shader stages to generate the stage's
372      particular texture shader result and texture unit RGBA result.
373
374      texture unit RGBA result - A (typically fixed-point) color result
375      generated by either a texture shader or conventional OpenGL
376      texturing.  This is the color that becomes the texture unit's
377      texture environment function texture input or the initial value
378      of the texture unit's corresponding texture register in the case
379      of register combiners.
380
381      texture shader result - The result of a texture shader stage that
382      may be used as an input to a subsequent texture shader stage.
383      This result is distinct from the texture unit RGBA result.
384      The texture shader result may be one of four types:  an RGBA
385      color value, a HILO value, a texture offset group value, or a
386      floating-point value.  A few texture shader operations are defined
387      to always generate an invalid texture shader result.
388
389      texture shader result type - One of the four texture shader result
390      types: RGBA color, HILO, texture offset group, or floating-point.
391
392      texture shader operation - One of 21 fixed programs that maps a
393      texture unit's texture coordinate set to a texture shader result
394      and a texture unit RGBA result.
395
396      texture consistency - Whether or not the texture object for a
397      given texture target is consistent.  The rules for determining
398      consistency depend on the texture target and the texture object's
399      filtering state.  For example, a mipmapped texture is inconsistent
400      if its texture levels do not form a consistent mipmap pyramid.
401      Also, a cube map texture is inconsistent if its (filterable)
402      matching cube map faces do not have matching dimensions.
403
404      texture shader stage consistency - Whether or not a texture
405      shader stage is consistent or not.  The rules for determining
406      texture shader stage consistency depend on the texture shader
407      stage operation and the inputs upon which the texture shader
408      operation depends.  For example, texture shader operations that
409      depend on accessing a given texture target are not consistent
410      if the given texture target is not consistent.  Also, a texture
411      shader operation that depends on a particular texture shader
412      result type for a previous texture shader result is not consistent
413      if the previous texture shader result type is not appropriate
414      or the previous texture shader stage itself is not consistent.
415      If a texture shader stage is not consistent, it operates as if
416      the operation is the GL_NONE operation.
417
418      previous texture input - Some texture shader operations depend
419      on a texture shader result from a specific previous texture input
420      designated by the GL_PREVIOUS_TEXTURE_INPUT_NV state.
421
422    What should the default state be?
423
424      RESOLUTION: Texture shaders disabled with all stages set to GL_NONE.
425
426    How is the mipmap lambda parameter computed for dependent texture fetches?
427
428      RESOLUTION:  Very carefully.  NVIDIA's implementation details are
429      NVIDIA proprietary, but mipmapping of dependent texture fetches
430      is supported.
431
432    Does this extension support so-called "bump environment mapping"?
433
434      Something similar to DirectX 6 so-called bump environment mapping
435      can be emulated with the GL_OFFSET_TEXTURE_2D_NV texture shader.
436
437      A more correct form of bump environment mapping can be implemented
438      by using the following texture shaders:
439
440        texture unit 0: GL_TEXTURE_2D
441        texture unit 1: GL_DOT_PRODUCT_NV
442        texture unit 2: GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV
443        texture unit 3: GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV
444
445      Texture unit 0 should use a normal map for its 2D texture.
446      A GL_SIGNED_RGB texture can encode signed tangent-space normal
447      perturbations.  Or for more precision, a GL_SIGNED_HILO_NV texture
448      can encode the normal perturbations in hemisphere fashion.
449
450      The tangent (Tx,Ty,Tz), binormal (Bx,By,Bz), and normal (Nx,Ny,Nz)
451      that together map tangent-space normals to cube map-space normals
452      should be sent as texture coordinates s1, t1, r1, s2, t2, r2, s3,
453      t3, and r3 respectively.  Typically, cube map space is aligned to
454      match world space.
455
456      The (unnormalized) cube map-space eye vector (Ex,Ey,Ez) should be
457      sent as texture coordinates q1, q2, and q3 respectively.
458
459      A vertex programs (using the NV_vertex_program extension) can
460      compute and assign the required tangent, binormal, normal, and
461      eye vectors to the appropriate texture coordinates.  Conventional
462      OpenGL evaluators (or the NV_evaluators extension) can be used to
463      evaluate the tangent and normal automatically for Bezier patches.
464      The binormal is the cross product of the normal and tangent.
465
466      Texture units 1, 2, and 3, should also all specify GL_TEXTURE0_ARB
467      (the texture unit accessing the normal map) for their
468      GL_PREVIOUS_TEXTURE_INPUT_NV parameter.
469
470      The three dot product texture shader operations performed by the
471      texture shaders for texture units 1, 2, and 3 form a 3x3 matrix
472      that transforms the tangent-space normal (the result of the texture
473      shader for texture unit 0).  This rotates the tangent-space normal
474      into a cube map-space.
475
476      Texture unit 2's cube map texture should encode a pre-computed
477      diffuse lighting solution.  Texture unit 3's cube map texture should
478      encode a pre-computed specular lighting solution.  The specular
479      lighting solution can be an environment map.
480
481      Texture unit 2 is accessed using the cube map-space normal
482      vector resulting from the three dot product results
483      of the texture shaders for texture units 1, 2, and 3.
484      (While normally texture shader operations are executed
485      in order, preceding GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV by
486      GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV is a special case where a dot
487      product result from texture unit 3 influences the cube map access
488      of texture unit 2.)
489
490      Texture unit 3 is accessed using the cube map-space reflection
491      vector computed using the cube map-space normal vector from the
492      three dot product results of the texture shaders for texture units
493      1, 2, and 3 and the cube-map space eye-vector (q1,q2,q3).
494
495      Note that using cube maps to access the diffuse and specular
496      illumination obviates the need for an explicit normalization of
497      the typically unnormalized cube map-space normal and reflection
498      vectors.
499
500      The register combiners (using the NV_register_combiners extension)
501      can combine the diffuse and specular contribution available in
502      the GL_TEXTURE2_ARB and GL_TEXTURE3_ARB registers respectively.
503      A constant ambient contribution can be stored in a register combiner
504      constant.  The ambient contribution could also be folded into the
505      diffuse cube map.
506
507      If desired, the diffuse and ambient contribution can be modulated
508      by a diffuse material parameter encoded in the RGB components of
509      the primary color.
510
511      If desired, the specular contribution can be modulated by a specular
512      material parameter encoded in the RGB components of the secondary
513      color.
514
515      Yes, this is all quite complicated, but the result is a true
516      bump environment mapping technique with excellent accounting for
517      normalization and per-vertex interpolated diffuse and specular
518      materials.  An environment and/or an arbitrary number of distant
519      or infinite lights can be encoded into the diffuse and specular
520      cube maps.
521
522    Why must GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV be used only in
523    conjunction with GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV?  Why does the
524    GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV stage rely on a result computed
525    in the following stage?
526
527      Think of the GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV and
528      GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV operations as forming a compound
529      operation.  The idea is to generate two cube map accesses based
530      on a perturbed normal and reflection vector where the reflection
531      vector is a function of the perturbed normal vector.  To minimize
532      the number of stages (three stages only) and reuse the internal
533      computations involved, this is treated as a compound operation.
534
535      Note that the GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV
536      vector can be preceded by two GL_DOT_PRODUCT_NV
537      operations instead of a GL_DOT_PRODUCT_NV operation then a
538      GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV operation.  This may be more
539      efficient when only the cube map access using the reflection vector
540      is required (a shiny object without any diffuse reflectance).
541
542      Also note that if only the diffuse reflectance cube map
543      access is required, this can be accomplished by simply using
544      the GL_DOT_PRODUCT_CUBE_MAP_NV operation preceded by two
545      GL_DOT_PRODUCT_NV operations.
546
547    How do texture shader stages map to register combiner texture registers?
548
549      RESOLUTION:  If GL_TEXTURE_SHADER_NV is enabled, the texture unit
550      RGBA result for a each texture stage is used to initialize the
551      respective texture register in the register combiners.
552
553      So if a texture shader generates a texture unit RGBA result for
554      texture unit 2, use GL_TEXTURE2_ARB for the name of the register
555      value in register combiners.
556
557    Should the number of shader stages be settable?
558
559      RESOLUTION: No, unused stages can be set to GL_NONE.
560
561    How do signed RGBA texture components show up in the register
562    combiners texture registers?
563
564      RESOLUTION: As signed values.  You can use GL_SIGNED_IDENTITY_NV
565      and get to the signed value directly.
566
567    How does the texture unit RGBA result of a
568    GL_NONE, GL_CULL_FRAGMENT_NV, DOT_PRODUCT_NV, or
569    GL_DOT_PRODUCT_DEPTH_REPLACE_NV texture shader operation show up in
570    the register combiners texture registers?
571
572      RESOLUTION: Always as the value (0,0,0,0).
573
574      How the texture RGBA result of the GL_NONE, GL_CULL_FRAGMENT_NV,
575      GL_DOT_PRODUCT_NV, and GL_DOT_PRODUCT_DEPTH_REPLACE_NV texture
576      shader operations shows up in the texture environment is not
577      an issue, because the texture environment operation is always
578      assumed to be GL_NONE when the corresponding texture shader
579      is one of GL_NONE, GL_CULL_FRAGMENT_NV, GL_DOT_PRODUCT_NV, or
580      GL_DOT_PRODUCT_DEPTH_REPLACE_NV when GL_TEXTURE_SHADER_NV is
581      enabled.
582
583    Why introduce new pixel groups (the HILO and texture offset groups)?
584
585      RESOLUTION:  In core OpenGL, texture image data is transferred and
586      stored as sets of color components.  Such color data can always
587      be promoted to RGBA data.
588
589      In addition to color components, there are other types of image
590      data in OpenGL including depth components, stencil components,
591      and color indices.  Depth and stencil components can be used by
592      glReadPixels, glDrawPixels, and glCopyPixels, but are not useful
593      for storing texture data in core OpenGL.  The EXT_paletted_texture
594      and EXT_index_texture extensions extend the contents of textures to
595      include indices (even though in the case of EXT_paletted_texture,
596      texel fetches are always eventually expanded into color components
597      by the texture palette).
598
599      However this these existing pixel groups are not sufficient for
600      all the texture shader operations introduced by this extension.
601      Certain texture shader operations require texture data that
602      is not merely a set of color components.  The dot product
603      (GL_DOT_PRODUCT_NV, etc) operations both can
604      utilize high-precision hi and lo components.  The
605      offset texture operations (GL_OFFSET_TEXTURE_2D_NV,
606      GL_OFFSET_TEXTURE_2D_SCALE_NV, GL_OFFSET_TEXTURE_RECTANGLE_NV,
607      and GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV) require
608      textures containing signed offsets used to displace
609      texture coordinates.  The GL_OFFSET_TEXTURE_2D_SCALE_NV and
610      GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV also require an unsigned
611      magnitude for the scaling operation.
612
613      To facilitate these new texture representations, this extension
614      introduces several new (external) formats, pixel groups, and
615      internal texture formats.  An (external) format is the external
616      representation used by an application to specify pixel data
617      for use by OpenGL.  A pixel group is a grouping of components
618      that are transformed by OpenGL's pixel transfer mechanism is a
619      particular manner.  For example, RGBA components for colors are
620      transformed differently than stencil components when passed through
621      OpenGL's pixel transfer mechanism.  An internal texture format is
622      the representation of texture data within OpenGL.  Note that the
623      (external) format used to specify the data by the application may
624      be different than the internal texture format used to store the
625      texture data internally to OpenGL.  For example, core OpenGL permits
626      an application to specify data for a texture as GL_LUMINANCE_ALPHA
627      data stored in GLfloats even though the data is to be store in
628      a GL_RGBA8 texture.  OpenGL's pixel unpacking and pixel transfer
629      operations perform an appropriate transformation of the data when
630      such a texture download is performed.  Also note that data from
631      one pixel group (say stencil components) cannot be supplied as
632      data for a different pixel group (say RGBA components).
633
634      This extension introduces four new (external) formats for
635      texture data:  GL_HILO_NV, GL_DSDT_NV, GL_DSDT_MAG_NV, and
636      GL_DSDT_MAG_VIB_NV.
637
638      GL_HILO_NV is for specifying high-precision hi and lo components.
639      The other three formats are used to specify texture offset groups.
640      These new formats can only be used for specifying textures (not
641      copying, reading, or writing pixels).
642
643      Each of these four pixel formats belong to one of two pixel groups.
644      Pixels specified with the GL_HILO_NV format are transformed as HILO
645      components.  Pixels specified with the DSDT_NV, DSDT_MAG_NV, and
646      DSDT_MAG_VIB_NV formats are transformed as texture offset groups.
647
648      The HILO component and texture offset group pixel groups have
649      independent scale and bias operations for each component type.
650      Various pixel transfer operations that are performed on the RGBA
651      components pixel group are NOT performed on these two new pixel
652      groups.  OpenGL's pixel map, color table, convolution, color matrix,
653      histogram, and min/max are NOT performed on the HILO components
654      or texture offset group pixel groups.
655
656      There are four internal texture formats for texture data specified
657      as HILO components:  GL_HILO_NV, GL_HILO16_NV, GL_SIGNED_HILO_NV,
658      and GL_SIGNED_HILO16_NV.  The HILO data can be stored as either
659      unsigned [0,1] value or [-1,1] signed values.  There are also
660      enumerants for both explicitly sized component precision (16-bit
661      components) and unsized component precision.  OpenGL implementations
662      are expected to keep HILO components are high precision even if
663      an unsized internal texture format is used.
664
665      The expectation with HILO textures is that applications will
666      specify HILO data using a type of GL_UNSIGNED_SHORT or GL_SHORT or
667      larger data types.  Specifying HILO data with GL_UNSIGNED_BYTE or
668      GL_BYTE works but does not exploit the full available precision
669      of the HILO internal texture formats.
670
671      There are six internal texture formats for texture data
672      specified as texture offset groups: GL_DSDT_NV, GL_DSDT8_NV,
673      GL_DSDT_MAG_NV, GL_DSDT8_MAG8_NV, GL_DSDT_MAG_INTENSITY_NV and
674      GL_DSDT8_MAG8_INTENSITY8_NV.  The GL_DSDT_NV formats specify two
675      signed [-1,1] components, ds and dt, used to offset s and t texture
676      coordinates.  The GL_DSDT_MAG_NV formats specify an additional
677      third unsigned [0,1] component that is a magnitude to scale an
678      unsigned RGBA texture fetch by.  The GL_DSDT_MAG_INTENSITY_NV
679      formats specify an additional fourth [0,1] unsigned component,
680      intensity, that becomes the intensity of the fetched texture for
681      use in the texture environment or register combiners.  There are
682      also enumerants for both explicitly sized (8-bit components)
683      and unsized component precision.
684
685      Note that the vibrance (VIB) component of the
686      GL_DSDT_MAG_VIB_NV format becomes the intensity component of
687      the GL_DSDT_MAG_INTENSITY_NV internal texture format.  Vibrance
688      becomes intensity in the GL_DSDT_MAG_INTENSITY_NV texture format.
689      The introduction of vibrance is because core OpenGL has no notion
690      of an intensity component in the pixel transfer mechanism or as
691      an external format (instead the red component of an RGBA value
692      becomes the intensity component of intensity textures).
693
694    How does the texture unit RGBA result of a texture shader that fetches
695    a texture with a base internal format of GL_HILO_NV, GL_DSDT_NV, or
696    GL_DSDT_MAG_NV show up in the register combiners texture registers?
697
698      RESOLUTION: Always as the value (0,0,0,0).
699
700      How the texture RGBA result of a texture shader that fetches a
701      texture with a base internal format of GL_HILO_NV, GL_DSDT_NV,
702      or GL_DSDT_MAG_NV the GL_DOT_PRODUCT_NV texture shader shows up
703      in the texture environment is not an issue, because the texture
704      environment operation is always assumed to be GL_NONE in this case
705      when GL_TEXTURE_SHADER_NV is enabled.
706
707    Does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV program replace the
708    eye-distance Z or window-space depth?
709
710      RESOLUTION:  Window-space depth.  And if the window-space depth
711      value is outside of the near and far depth range values, the
712      fragment is rejected.
713
714    The GL_CULL_FRAGMENT_NV operation always compares against all four
715    texture coordinates.  What if I want only one, two, or three
716    comparisons?
717
718      RESOLUTION:  To compare against a single value, replicate that value
719      in all the coordinates and set the comparison for all components to
720      be identical.  Or you can set uninteresting coordinates to zero and
721      use the GL_GEQUAL comparison which will never cull for the value zero.
722
723    What is GL_CULL_FRAGMENT_NV good for?
724
725      The GL_CULL_FRAGMENT_NV operation provides a mechanism to implement
726      per-fragment clip planes.  If a texture coordinate is assigned a
727      signed distance to a plane, the cull fragment test can discard
728      fragments on the wrong side of the plane.  Each texture shader
729      stage provides up to four such clip planes.  An eye-space clip
730      plane can be established using the GL_EYE_LINEAR texture coordinate
731      generation mode where the clip plane equation is specified via
732      the GL_EYE_PLANE state.
733
734      Clip planes are one application for GL_CULL_FRAGMENT_NV, but
735      other clipping approaches are possible too.  For example, by
736      computing and assigning appropriate texture coordinates (perhaps
737      with NV_vertex_program), fragments beyond a certain distance from
738      a point can be culled (assuming that it is acceptable to linearly
739      interpolate a distance between vertices).
740
741    The texture border color is supposed to be an RGBA value clamped to
742    the range [0,1].  How does the texture border color work in conjunction
743    with signed RGBA color components, HILO components, and texture offset
744    component groups?
745
746      RESOLUTION:  The per-texture object GL_TEXTURE_BORDER_COLOR
747      is superceded by a GL_TEXTURE_BORDER_VALUES symbolic token.
748      The texture border values are four floats (not clamped to
749      [0,1] when specified).  When a texture border is required for
750      a texture, the components for the border texel are determined
751      by the GL_TEXTURE_BORDER_VALUES state.  For color components,
752      the GL_TEXTURE_BORDER_VALUES state is treated as a set of RGBA
753      color components.  For HILO components, the first value is treated
754      as hi and the second value is treated as lo.  For texture offset
755      components, the ds, dt, mag, and vib values correspond to the first,
756      second, third, and fourth texture border values respectively.
757      The particular texture border components are clamped to the range
758      of the component determined by the texture's internal format.  So a
759      signed component is clamped to the [-1,1] range and an unsigned
760      component is clamped to the [0,1] range.
761
762      For backward compatibility, the GL_TEXTURE_BORDER_COLOR can
763      still be specified and queried.  When specified, the values are
764      clamped to [0,1] and used to update the texture border values.
765      When GL_TEXTURE_BORDER_COLOR is queried, there is no clamping of
766      the returned values.
767
768    With signed texture components, does the texture environment function
769    discussion need to be amended?
770
771      RESOLUTION:  Yes.  We do not want texture environment results to
772      exceed the range [-1,1].
773
774      The GL_DECAL and GL_BLEND operations perform linear interpolations
775      of various components of the form
776
777        A * B + (1-A) * C
778
779      The value of A should not be allowed to be negative otherwise,
780      the value of (1-A) may exceed 1.0.  These linear interpolations
781      should be written in the form
782
783        max(0,A) * B + (1-max(0,A)) * C
784
785      The GL_ADD operation clamps its result to 1.0, but if negative
786      components are permitted, the result should be clamped to the range
787      [-1,1].
788
789      The GL_COMBINE_ARB (and GL_COMBINE_EXT) and GL_COMBINE4_NV
790      operations do explicit clamping of all result to [0,1].
791      In addition, NV_texture_shader adds requirements to clamp
792      inputs to [0,1] too.  This is because the GL_ONE_MINUS_SRC_COLOR
793      and GL_ONE_MINUS_SRC_ALPHA operands should really be computing
794      1-max(0,C).  For completeness, GL_SRC_COLOR and GL_SRC_ALPHA should
795      be computing max(0,C).
796
797    With signed texture components, does the color sum discussion need
798    to be amended?
799
800      RESOLUTION:  Yes.  The primary and secondary color should both be
801      clamped to the range [0,1] before they are summed.
802
803      The unextended OpenGL 1.2 description of color sum does not
804      require a clamp of the primary and secondary colors to the [0,1]
805      range before they are summed.  Before signed texture components,
806      the standard texture environment modes either could not generate
807      results outside the [0,1] range or explicitly clamped their
808      results to this range (as in the case of GL_ADD, GL_COMBINE_EXT,
809      and GL_COMBINE4_NV).  Now with signed texture components, negative
810      values can be generated by texture environment functions.
811
812      We do not want to clamp the intermediate results of texture
813      environment stages since negative results may be useful in
814      subsequent stages, but clamping should be applied to the primary
815      color immediately before the color sum.  For symmetry, clamping of
816      the secondary color is specified as well (though there is currently
817      no way to generate a negative secondary color).
818
819    Why vibrance?
820
821      Vibrance is the fourth component of the external representation of a
822      texture offset group.  During pixel transfer, vibrance is scaled and
823      biased based on the GL_VIBRANCE_SCALE and GL_VIBRANCE_BIAS state.
824      Once transformed, the vibrance component becomes the intensity
825      component for textures with a DSDT_MAG_INTENSITY base internal
826      format.  Vibrance is meaningful only when specifying texture images
827      with the DS_DT_MAG_VIB_NV external format (and is not supported
828      when reading, drawing, or copying pixels).
829
830    There are lots of reasons that a texture shader stage is inconsistent,
831    and in which case, the stage operates as if the operation is NONE.
832    For debugging sanity, is there a way to determine whether a particular
833    texture shader stage is consistent?
834
835      RESOLUTION:  Yes.  Query the shader consistency of a particular
836      texture unit with:
837
838        GLint consistent;
839
840        glActiveTextureARB(stage_to_check);
841        glGetTexEnviv(GL_TEXTURE_SHADER_NV, GL_SHADER_CONSISTENT_NV,
842          &consistent);
843
844      consistent is one or zero depending on whether the shader stage
845      is consistent or not.
846
847    Should there be signed components with sub 8-bit precision?
848
849      RESOLUTION:  No.
850
851    Should packed pixel formats for texture offset groups be supported?
852
853      RESOLUTION:  Yes, but they are limited to UNSIGNED_INT_S8_S8_8_8_NV
854      and UNSIGNED_INT_8_8_S8_S8_REV_NV for use with the DSDT_MAG_VIB_NV
855      format.
856
857      Note that these two new packed pixel formats are only for the
858      DSDT_MAG_VIB_NV and cannot be used with RGBA or BGRA formats.
859      Likewise, the RGBA and BGRA formats cannot be used with the new
860      UNSIGNED_INT_S8_S8_8_8_NV and UNSIGNED_INT_8_8_S8_S8_REV_NV types.
861
862    What should be said about signed fixed-point precision and range of
863    actual implementations?
864
865      RESOLUTION:  The core OpenGL specification typically specifies
866      fixed-point numerical computations without regard to the specific
867      precision of the computations.  This practice is intentional because
868      it permits implementations to vary in the degree of precision used
869      for internal OpenGL computations.  When mapping unsigned fixed-point
870      values to a [0,1] range, the mapping is straightforward.
871
872      However, this extension supports signed texture components in
873      the range [-1,1].  This presents some awkward choices for how to
874      map [-1,1] to a fixed-point representation.  Assuming a binary
875      fixed-point representation with an even distribution of precision,
876      there is no way to exactly represent -1, 0, and 1 and avoid
877      representing values outside the [-1,1] range.
878
879      This is not a unique issue for this extension.  In core OpenGL,
880      table 2.6 describes mappings from unsigned integer types (GLbyte,
881      GLshort, and GLint) that preclude the exact specification of 0.0.
882      NV_register_combiners supports signed fixed-point values that have
883      similar representation issues.
884
885      NVIDIA's solution to this representation problem is to use 8-, 9-,
886      and 16-bit fixed-point representations for signed values in the
887      [-1,1] range such that
888
889   floating-point   8-bit fixed-point   9-bit fixed-point  16 bit fixed-point
890   --------------   -----------------   -----------------  ------------------
891    1.0              n/a                 255                n/a
892    0.99996...       n/a                 n/a                32767
893    0.99218...      127                  n/a                n/a
894    0.0              0                   0                  0
895   -1.0            -128                 -255               -32768
896   -1.00392...      n/a                 -256                n/a
897
898      The 8-bit and 16-bit signed fixed-point types are used for signed
899      internal texture formats, while the 9-bit signed fixed-point type
900      is used for register combiners computations.
901
902      The 9-bit signed fixed-point type has the disadvantage that a
903      number slightly more negative than -1 can be represented and this
904      particular value is different dependent on the number of bits of
905      fixed-point precision.  The advantage of this approach is that 1,
906      0, and -1 can all be represented exactly.
907
908      The 8-bit and 16-bit signed fixed-point types have the disadvantage
909      that 1.0 cannot be exactly represented (though -1.0 and zero can
910      be exactly represented).
911
912      The specification however is written using the conventional
913      OpenGL practice (table 2.6) of mapping signed values evenly over
914      the range [-1,1] so that zero cannot be precisely represented.
915      This is done to keep this specification consistent with OpenGL's
916      existing conventions and to avoid the ugliness of specifying
917      a precision-dependent range.  We expect leeway in how signed
918      fixed-point values are represented.
919
920      The spirit of this extension is that an implicit allowance is
921      made for signed fixed-point representations that cannot exactly
922      represent 1.0.
923
924    How should NV_texture_rectangle interact with NV_texture_shader?
925
926      NV_texture_rectangle introduces a new texture target similar
927      to GL_TEXTURE_2D but that supports non-power-of-two texture
928      dimensions and several usage restrictions (no mipmapping, etc).
929      Also the imaged texture coordinate range for rectangular textures
930      is [0,width]x[0,height] rather than [0,1]x[0,1].
931
932      Four texture shader operations will operate like their 2D texture
933      counter-parts, but will access the rectangular texture
934      target rather than the 2D texture target.  These are:
935
936        GL_TEXTURE_RECTANGLE_NV
937        GL_OFFSET_TEXTURE_RECTANGLE_NV
938        GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV
939        GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV
940
941      A few 2D texture shader operations, namely
942      GL_DEPENDENT_AR_TEXTURE_2D_NV and GL_DEPENDENT_GB_TEXTURE_2D_NV,
943      do not support rectangular textures because turning colors in the
944      [0,1] range into texture coordinates would only access a single
945      corner texel in a rectangular texture.  The offset and dot product
946      rectangular texture shader operations support scaling of the
947      dependent texture coordinates so these operations can access the
948      entire image of a rectangular texture.  Note however that it is the
949      responsibility of the application to perform the proper scaling.
950
951      Note that the 2D and rectangular "offset texture" shaders both
952      use the same matrix, scale, and bias state.
953
954    Does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV operation happen before or
955    after polygon offset?
956
957      RESOLUTION:  After.  The window Z (w_z) is computed during
958      rasterization and polygon offset occurs at this point.  The depth
959      replace operation occurs after rasterization (at the point that
960      conventional OpenGL calls "texturing") so when the depth value
961      is replaced, the effect of polygon offset (and normal depth
962      interpolation) is lost when using the depth replace operation.
963
964    How does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV operation interact with
965    ARB_multisample?
966
967      RESOLUTION:  The depth value for all covered samples of a
968      multisampled fragment are replaced with the _same_ single depth
969      value computed by the depth replace operation.  Without depth
970      replace, the depth values of each sample of a fragment may have
971      slightly different depth values because of the polygon's depth
972      gradient.
973
974    How should the clamping work for GL_OFFSET_TEXTURE_2D_SCALE?
975
976       RESOLUTION:  The scale factor should be clamped to [0,1] prior
977       to scaling red, green, and blue.
978
979       Red, green, and blue are guaranteed to be unsigned RGB values
980       so the [0,1] scale factor times the [0,1] RGB values results in
981       [0,1] values so no output clamping need be specified.
982
983New Procedures and Functions
984
985    None.
986
987New Tokens
988
989    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
990    and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
991    and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv,
992    TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv:
993
994        TEXTURE_SHADER_NV                         0x86DE
995
996    When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
997    GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
998    of <pname> may be:
999
1000        RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV      0x86D9
1001        SHADER_OPERATION_NV                       0x86DF
1002        OFFSET_TEXTURE_SCALE_NV                   0x86E2
1003        OFFSET_TEXTURE_BIAS_NV                    0x86E3
1004        OFFSET_TEXTURE_2D_SCALE_NV                alias for OFFSET_TEXTURE_SCALE_NV
1005        OFFSET_TEXTURE_2D_BIAS_NV                 deprecated alias for OFFSET_TEXTURE_BIAS_NV
1006        PREVIOUS_TEXTURE_INPUT_NV                 0x86E4
1007
1008    When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
1009    GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:
1010
1011        CULL_MODES_NV                             0x86E0
1012        OFFSET_TEXTURE_MATRIX_NV                  0x86E1
1013        OFFSET_TEXTURE_2D_MATRIX_NV               deprecated alias for OFFSET_TEXTURE_MATRIX_NV
1014        CONST_EYE_NV                              0x86E5
1015
1016    When the <target> parameter GetTexEnvfv and GetTexEnviv is
1017    TEXTURE_SHADER_NV, then the value of <pname> may be:
1018
1019        SHADER_CONSISTENT_NV                      0x86DD
1020
1021    When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
1022    TexEnvi, and TexEnviv are TEXTURE_ENV and TEXTURE_ENV_MODE
1023    respectively, then the value of <param> or the value pointed to by
1024    <params> may be:
1025
1026        NONE
1027
1028    When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
1029    TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
1030    respectively, then the value of <param> or the value pointed to by
1031    <params> may be:
1032
1033        NONE
1034
1035        TEXTURE_1D
1036        TEXTURE_2D
1037        TEXTURE_RECTANGLE_NV                      (see NV_texture_rectangle)
1038        TEXTURE_CUBE_MAP_ARB                      (see ARB_texture_cube_map)
1039
1040        PASS_THROUGH_NV                           0x86E6
1041        CULL_FRAGMENT_NV                          0x86E7
1042
1043        OFFSET_TEXTURE_2D_NV                      0x86E8
1044        OFFSET_TEXTURE_2D_SCALE_NV                see above, note aliasing
1045        OFFSET_TEXTURE_RECTANGLE_NV               0x864C
1046        OFFSET_TEXTURE_RECTANGLE_SCALE_NV         0x864D
1047        DEPENDENT_AR_TEXTURE_2D_NV                0x86E9
1048        DEPENDENT_GB_TEXTURE_2D_NV                0x86EA
1049
1050        DOT_PRODUCT_NV                            0x86EC
1051        DOT_PRODUCT_DEPTH_REPLACE_NV              0x86ED
1052        DOT_PRODUCT_TEXTURE_2D_NV                 0x86EE
1053        DOT_PRODUCT_TEXTURE_RECTANGLE_NV          0x864E
1054        DOT_PRODUCT_TEXTURE_CUBE_MAP_NV           0x86F0
1055        DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV           0x86F1
1056        DOT_PRODUCT_REFLECT_CUBE_MAP_NV           0x86F2
1057        DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
1058
1059    When the <target> and <pname> parameters of TexEnvfv and TexEnviv
1060    are TEXTURE_SHADER_NV and CULL_MODES_NV respectively, then the value
1061    of <param> or the value pointed to by <params> may be:
1062
1063        LESS
1064        GEQUAL
1065
1066    When the <target> and <pname> parameters of TexEnvf,
1067    TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and
1068    RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV respectively, then the value
1069    of <param> or the value pointed to by <params> may be:
1070
1071        UNSIGNED_IDENTITY_NV                      (see NV_register_combiners)
1072        EXPAND_NORMAL_NV                          (see NV_register_combiners)
1073
1074    When the <target> and <pname> parameters of TexEnvf,
1075    TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and
1076    PREVIOUS_TEXTURE_INPUT_NV respectively, then the value of <param>
1077    or the value pointed to by <params> may be:
1078
1079        TEXTURE0_ARB
1080        TEXTURE1_ARB
1081        TEXTURE2_ARB
1082        TEXTURE3_ARB
1083        TEXTURE4_ARB
1084        TEXTURE5_ARB
1085        TEXTURE6_ARB
1086        TEXTURE7_ARB
1087
1088    Accepted by the <format> parameter of GetTexImage, TexImage1D,
1089    TexImage2D, TexSubImage1D, and TexSubImage2D:
1090
1091        HILO_NV                                   0x86F4
1092        DSDT_NV                                   0x86F5
1093        DSDT_MAG_NV                               0x86F6
1094        DSDT_MAG_VIB_NV                           0x86F7
1095
1096    Accepted by the <type> parameter of GetTexImage, TexImage1D,
1097    TexImage2D, TexSubImage1D, and TexSubImage2D:
1098
1099        UNSIGNED_INT_S8_S8_8_8_NV                 0x86DA
1100        UNSIGNED_INT_8_8_S8_S8_REV_NV             0x86DB
1101
1102    Accepted by the <internalformat> parameter of CopyTexImage1D,
1103    CopyTexImage2D, TexImage1D, and TexImage2D:
1104
1105        SIGNED_RGBA_NV                            0x86FB
1106        SIGNED_RGBA8_NV                           0x86FC
1107        SIGNED_RGB_NV                             0x86FE
1108        SIGNED_RGB8_NV                            0x86FF
1109        SIGNED_LUMINANCE_NV                       0x8701
1110        SIGNED_LUMINANCE8_NV                      0x8702
1111        SIGNED_LUMINANCE_ALPHA_NV                 0x8703
1112        SIGNED_LUMINANCE8_ALPHA8_NV               0x8704
1113        SIGNED_ALPHA_NV                           0x8705
1114        SIGNED_ALPHA8_NV                          0x8706
1115        SIGNED_INTENSITY_NV                       0x8707
1116        SIGNED_INTENSITY8_NV                      0x8708
1117        SIGNED_RGB_UNSIGNED_ALPHA_NV              0x870C
1118        SIGNED_RGB8_UNSIGNED_ALPHA8_NV            0x870D
1119
1120    Accepted by the <internalformat> parameter of TexImage1D and
1121    TexImage2D:
1122
1123        HILO_NV
1124        HILO16_NV                                 0x86F8
1125        SIGNED_HILO_NV                            0x86F9
1126        SIGNED_HILO16_NV                          0x86FA
1127        DSDT_NV
1128        DSDT8_NV                                  0x8709
1129        DSDT_MAG_NV
1130        DSDT8_MAG8_NV                             0x870A
1131        DSDT_MAG_INTENSITY_NV                     0x86DC
1132        DSDT8_MAG8_INTENSITY8_NV                  0x870B
1133
1134    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
1135    GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi:
1136
1137        HI_SCALE_NV                               0x870E
1138        LO_SCALE_NV                               0x870F
1139        DS_SCALE_NV                               0x8710
1140        DT_SCALE_NV                               0x8711
1141        MAGNITUDE_SCALE_NV                        0x8712
1142        VIBRANCE_SCALE_NV                         0x8713
1143        HI_BIAS_NV                                0x8714
1144        LO_BIAS_NV                                0x8715
1145        DS_BIAS_NV                                0x8716
1146        DT_BIAS_NV                                0x8717
1147        MAGNITUDE_BIAS_NV                         0x8718
1148        VIBRANCE_BIAS_NV                          0x8719
1149
1150    Accepted by the <pname> parameter of TexParameteriv, TexParameterfv,
1151    GetTexParameterfv and GetTexParameteriv:
1152
1153        TEXTURE_BORDER_VALUES_NV                  0x871A
1154
1155    Accepted by the <pname> parameter of GetTexLevelParameterfv and
1156    GetTexLevelParameteriv:
1157
1158        TEXTURE_HI_SIZE_NV                        0x871B
1159        TEXTURE_LO_SIZE_NV                        0x871C
1160        TEXTURE_DS_SIZE_NV                        0x871D
1161        TEXTURE_DT_SIZE_NV                        0x871E
1162        TEXTURE_MAG_SIZE_NV                       0x871F
1163
1164Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
1165
1166     None
1167
1168Additions to Chapter 3 of the 1.2 Specification (Rasterization)
1169
1170 --  Section 3.6 "Pixel Rectangles"
1171
1172     Add four new rows to table 3.2:
1173
1174     Parameter Name      Type   Initial Value  Valid Range
1175     ------------------  -----  -------------  -----------
1176     HI_SCALE_NV         float  1.0            (-Inf,+Inf)
1177     LO_SCALE_NV         float  1.0            (-Inf,+Inf)
1178     DS_SCALE_NV         float  1.0            (-Inf,+Inf)
1179     DT_SCALE_NV         float  1.0            (-Inf,+Inf)
1180     MAGNITUDE_SCALE_NV  float  1.0            (-Inf,+Inf)
1181     VIBRANCE_SCALE_NV   float  1.0            (-Inf,+Inf)
1182
1183     HI_BIAS_NV          float  0.0            (-Inf,+Inf)
1184     LO_BIAS_NV          float  0.0            (-Inf,+Inf)
1185     DS_BIAS_NV          float  0.0            (-Inf,+Inf)
1186     DT_BIAS_NV          float  0.0            (-Inf,+Inf)
1187     MAGNITUDE_BIAS_NV   float  0.0            (-Inf,+Inf)
1188     VIBRANCE_BIAS_NV    float  0.0            (-Inf,+Inf)
1189
1190 --  Section 3.6.4 "Rasterization of Pixel Rectangles"
1191
1192     Add before the subsection titled "Unpacking":
1193
1194     "The HILO_NV, DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV formats
1195     are described in this section and section 3.6.5 even though these
1196     formats are supported only for texture images.  Textures with
1197     the HILO_NV format are intended for use with certain dot product
1198     texture and dependent texture shader operations (see section 3.8.13).
1199     Textures with the DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV format
1200     are intended for use with certain offset texture 2D texture shader
1201     operations (see section 3.8.13).
1202
1203     The error INVALID_ENUM occurs if HILO_NV, DSDT_NV, DSDT_MAG_NV, or
1204     DSDT_MAG_VIB_NV is used as the format for DrawPixels, ReadPixels,
1205     or other commands that specify or query an image with a format and
1206     type parameter though the image is not a texture image.  The HILO_NV,
1207     DSDT_NV, DSDT_MAG_NV, or DSDT_MAG_VIB_NV formats are intended for
1208     use with the TexImage and TexSubImage commands.
1209
1210     The HILO_NV format consists of two components, hi and lo, in the hi
1211     then lo order.  The hi and lo components maintain at least 16 bits
1212     of storage per component (at least 16 bits of magnitude for unsigned
1213     components and at least 15 bits of magnitude for signed components).
1214
1215     The DSDT_NV format consists of two signed components ds and dt,
1216     in the ds then dt order.  The DSDT_MAG_NV format consists of
1217     three components: the signed ds and dt components and an unsigned
1218     magnitude component (mag for short), in the ds, then dt, then mag
1219     order.  The DSDT_MAG_VIB_NV format consists of four components:
1220     the signed ds and dt components, an unsigned magnitude component
1221     (mag for short), and an unsigned vibrance component (vib for short),
1222     in the ds, then dt, then mag, then vib order."
1223
1224     Add a new row to table 3.8:
1225
1226type Parameter                 GL Data  Number of   Matching
1227Token Name                     Type     Components  Pixel Formats
1228-----------------------------  -------  ----------  ----------------
1229UNSIGNED_INT_S8_S8_8_8_NV       uint     4           DSDT_MAG_VIB_NV
1230UNSIGNED_INT_8_8_S8_S8_REV_NV   uint     4           DSDT_MAG_VIB_NV
1231
1232     Add to table 3.11:
1233
1234UNSIGNED_INT_S8_S8_8_8_NV:
1235
1236 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
1237+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1238| 1st component         |             2nd       |           3rd         |         4th           |
1239+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1240
1241UNSIGNED_INT_8_8_S8_S8_REV_NV:
1242
1243 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
1244+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1245|          4th          |             3rd       |           2nd         | 1st component         |
1246+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1247
1248     Replace the fifth paragraph in the subsection titled "Unpacking"
1249     with the following:
1250
1251     "Calling DrawPixels with a type of UNSIGNED_BYTE_3_3_2,
1252     UNSIGNED_BYTE_2_3_3_REV, UNSIGNED_SHORT_5_6_5,
1253     UNSIGNED_SHORT_5_6_5_REV, UNSIGNED_SHORT_4_4_4_4,
1254     UNSIGNED_SHORT_4_4_4_4_REV, UNSIGNED_SHORT_5_5_5_1,
1255     UNSIGNED_SHORT_1_5_5_5_REV, UNSIGNED_INT_8_8_8_8,
1256     UNSIGNED_INT_8_8_8_8_REV, UNSIGNED_INT_10_10_10_2, or
1257     UNSIGNED_INT_2_10_10_10_REV is a special case in which all
1258     the components of each group are packed into a single unsigned
1259     byte, unsigned short, or unsigned int, depending on the type.
1260     When packing or unpacking texture images (for example, using
1261     TexImage2D or GetTexImage), the type parameter may also be either
1262     UNSIGNED_INT_S8_S8_8_8_NV or UNSIGNED_INT_8_8_S8_S8_REV though
1263     neither symbolic token is permitted for DrawPixels, ReadPixels,
1264     or other commands that specify or query an image with a format
1265     and type parameter though the image is not a texture image.
1266     The error INVALID_ENUM occurs when UNSIGNED_INT_S8_S8_8_8_NV is
1267     used when it is not permitted.  When UNSIGNED_INT_S8_S8_8_8_NV
1268     or UNSIGNED_INT_8_8_S8_S8_REV_NV is used, the first and second
1269     components are treated as signed components.  The number of
1270     components per packed pixel is fixed by the type, and must match the
1271     number of components per group indicated by the format parameter,
1272     as listed in table 3.8.  The format must also be one of the formats
1273     listed in the Matching Pixel Formats column of table 3.8 for the
1274     specified packed type.  The error INVALID_OPERATION is generated
1275     if a mismatch occurs.  This constraint also holds for all other
1276     functions that accept or return pixel data using type and format
1277     parameters to define the type and format of the data."
1278
1279     Amend the second sentence in the sixth paragraph in the subsection
1280     titled "Unpacking" to read:
1281
1282     "Each bitfield is interpreted as an unsigned integer value unless
1283     it has been explicitly been stated that the bitfield contains a
1284     signed component.  Signed bitfields are treated as two's complement
1285     numbers."
1286
1287     Add a new row to table 3.12:
1288
1289                      First      Second     Third       Fourth
1290     Format           Component  Component  Component   Component
1291     ---------------  ---------  ---------  ----------  ---------
1292     DSDT_MAG_VIB_NV   ds         dt         magnitude   vibrance
1293
1294     Change the last sentence in the first paragraph in the subsection
1295     titled "Conversion to floating-point" to read:
1296
1297     "For packed pixel types, each unsigned element in the group is
1298     converted by computing c / (2^N-1), where c is the unsigned integer
1299     value of the bitfield containing the element and N is the number of
1300     bits in the bitfield.  In the case of signed elements of a packed
1301     pixel type, the signed element is converted by computing 2*c+1 /
1302     (2^N-1), where c is the signed integer value of the bitfield
1303     containing the element and N is the number of bits in the bitfield."
1304
1305     Change the first sentence in the subsection "Final Expansion to RGBA"
1306     to read:
1307
1308     "This step is performed only for groups other than HILO component,
1309     depth component, and texture offset groups."
1310
1311     Add the following additional enumeration to the kind of pixel groups
1312     in section 3.6.5:
1313
1314     "5.  HILO component:  Each group comprises two components: hi and lo.
1315
1316      6.  Texture offset group:  Each group comprises four components:
1317      a ds and dt pair, a magnitude, and a vibrance."
1318
1319     Change the subsection "Arithmetic on Components" in section 3.6.5
1320     to read:
1321
1322     "This step applies only to RGBA component, depth component, and HILO
1323     component, and texture offset groups.  Each component is multiplied
1324     by an appropriate signed scale factor:  RED_SCALE for an R component,
1325     GREEN_SCALE for a G component, BLUE_SCALE for a B component,
1326     ALPHA_SCALE, for an A component, HI_SCALE_NV for a HI component,
1327     LO_SCALE_NV for a LO component, DS_SCALE_NV for a DS component,
1328     DT_SCALE_NV for a DT component, MAGNITUDE_SCALE_NV for a MAG
1329     component, VIBRANCE_SCALE_NV for a VIB component, or DEPTH_SCALE
1330     for a depth component.
1331
1332     Then the result is added to the appropriate signed bias: RED_BIAS,
1333     GREEN_BIAS, BLUE_BIAS, ALPHA_BIAS, HI_BIAS_NV, LO_BIAS_NV,
1334     DS_BIAS_NV, DT_BIAS_NV, MAGNITUDE_BIAS_NV, VIBRANCE_BIAS_NV, or
1335     DEPTH_BIAS."
1336
1337 --  Section 3.8 "Texturing"
1338
1339     Replace the first paragraph with the following:
1340
1341     "The GL provides two mechanisms for mapping sets of (s,t,r,q)
1342     texture coordinates to RGBA colors: conventional texturing and
1343     texture shaders.
1344
1345     Conventional texturing maps a portion of a specified image onto
1346     each primitive for each enabled texture unit.  Conventional
1347     texture mapping is accomplished by using the color of an image
1348     at the location indicated by a fragment's non-homogeneous (s,t,r)
1349     coordinates for a given texture unit.
1350
1351     The alternative to conventional texturing is the texture shaders
1352     mechanism.  When texture shaders are enabled, each texture unit
1353     uses one of twenty-one texture shader operations.  Eighteen of the
1354     twenty-one shader operations map an (s,t,r,q) texture coordinate
1355     set to an RGBA color.  Of these, three texture shader operations
1356     directly correspond to the 1D, 2D, and cube map conventional
1357     texturing operations.  Depending on the texture shader operation,
1358     the mapping from the (s,t,r,q) texture coordinate set to an RGBA
1359     color may depend on the given texture unit's currently bound
1360     texture object state and/or the results of previous texture
1361     shader operations.  The three remaining texture shader operations
1362     respectively provide a fragment culling mechanism based on texture
1363     coordinates, a means to replace the fragment depth value, and a dot
1364     product operation that computes a floating-point value for use by
1365     subsequent texture shaders.  The specifics of each texture shader
1366     operation are described in section 3.8.12.
1367
1368     Texture shading is enabled or disabled using the generic Enable
1369     and Disable commands, respectively, with the symbolic constant
1370     TEXTURE_SHADER_NV.  When texture shading is disabled, conventional
1371     texturing generates an RGBA color for each enabled textures unit
1372     as described in Sections 3.8.10.
1373
1374     After RGBA colors are assigned to each texture unit, either by
1375     conventional texturing or texture shaders, the GL proceeds with
1376     fragment coloring, either using the texture environment, fog,
1377     and color sum operations, or using register combiners extension if
1378     supported.
1379
1380     Neither conventional texturing nor texture shaders affects the
1381     secondary color."
1382
1383 --  Section 3.8.1 "Texture Image Specification"
1384
1385     Add the following sentence to the first paragraph:
1386
1387     "The formats HILO_NV, DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV
1388     are allowed for specifying texture images."
1389
1390     Replace the fourth paragraph with:
1391
1392     "The selected groups are processed exactly as for DrawPixels,
1393     stopping just before conversion.  Each R, G, B, A, HI, LO, DS, DT,
1394     and MAG value so generated is clamped to [0,1] if the corresponding
1395     component is unsigned, or if the corresponding component is signed,
1396     is clamped to [-1,1].  The signedness of components depends on the
1397     internal format (see table 3.16).  The signedness of components
1398     for unsized internal formats matches the signedness of components
1399     for any respective sized version of the internal format."
1400
1401     Replace table 3.15 with the following table:
1402
1403     Base Internal Format   Component Values     Internal Components  Format Type
1404     ---------------------  -------------------  -------------------  -------------------------
1405     ALPHA                  A                    A                    RGBA
1406     LUMINANCE              R                    L                    RGBA
1407     LUMINANCE_ALPHA        R,A                  L,A                  RGBA
1408     INTENSITY              R                    I                    RGBA
1409     RGB                    R,G,B                R,G,B                RGBA
1410     RGBA                   R,G,B,A              R,G,B,A              RGBA
1411     HILO_NV                HI,LO                HI,LO                HILO
1412     DSDT_NV                DS,DT                DS,DT                texture offset group
1413     DSDT_MAG_NV            DS,DT,MAG            DS,DT,MAG            texture offset group
1414     DSDT_MAG_INTENSITY_NV  DS,DT,MAG,VIB        DS,DT,MAG,I          RGBA/texture offset group
1415
1416     Re-caption table 3.15 as:
1417
1418     "Conversion from RGBA, HILO, and texture offset pixel components to
1419     internal texture table, or filter components.  See section 3.8.9
1420     for a description of the texture components R, G, B, A, L, and I.
1421     See section 3.8.13 for an explanation of the handling of the texture
1422     components HI, LO, DS, DT, MAG, and VIB."
1423
1424     Add five more columns to table 3.16 labeled "HI bits", "LO bits", "DS
1425     bits", "DT bits", and "MAG bits".  Existing table rows should have
1426     these column entries blank.  Add the following rows to the table:
1427
1428Sized                          Base                  R    G    B    A    L    I    HI   LO   DS   DT   MAG
1429Internal Format                Internal Format       bits bits bits bits bits bits bits bits bits bits bits
1430------------------------------ --------------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
1431HILO16_NV                      HILO                                                16   16
1432SIGNED_HILO16_NV               HILO                                                16*  16*
1433SIGNED_RGBA8_NV                RGBA                  8*   8*   8*   8*
1434SIGNED_RGB8_UNSIGNED_ALPHA8_NV RGBA                  8*   8*   8*   8
1435SIGNED_RGB8_NV                 RGB                   8*   8*   8*
1436SIGNED_LUMINANCE8_NV           LUMINANCE                                8*
1437SIGNED_LUMINANCE8_ALPHA8_NV    LUMINANCE_ALPHA                      8*  8*
1438SIGNED_ALPHA8_NV               ALPHA                                8*
1439SIGNED_INTENSITY8_NV           INTENSITY                                      8*
1440DSDT8_NV                       DSDT_NV                                                       8*   8*
1441DSDT8_MAG8_NV                  DSDT_MAG_NV                                                   8*   8*   8
1442DSDT8_MAG8_INTENSITY8_NV       DSDT_MAG_INTENSITY_NV                          8              8*   8*   8
1443
1444     Add to the caption for table 3.16:
1445
1446     "An asterisk (*) following a component size indicates that the
1447     corresponding component is signed (the sign bit is included in
1448     specified component resolution size)."
1449
1450     Change the first sentences of the fifth paragraph to read:
1451
1452     "Components are then selected from the resulting R, G, B, A, HI, LO,
1453     DS, DT, and MAG values to obtain a texture with the base internal
1454     format specified by (or derived from) internalformat.  Table 3.15
1455     summarizes the mapping of R, G, B, A, HI, LO, DS, DT, and MAG values
1456     to texture components, as a function of the base internal format of
1457     the texture image.  internalformat may be specified as one of the
1458     ten base internal format symbolic constants listed in table 3.15,
1459     or as one of the sized internal format symbolic constants listed
1460     in table 3.16."
1461
1462     Add these sentences before the last sentence in the fifth paragraph:
1463
1464     "The error INVALID_OPERATION is generated if the format is
1465     HILO_NV and the internalformat is not one of HILO_NV, HILO16_NV,
1466     SIGNED_HILO_NV, SIGNED_HILO16_NV; or if the internalformat is one
1467     of HILO_NV, HILO16_NV, SIGNED_HILO_NV, or SIGNED_HILO16_NV and the
1468     format is not HILO_NV.
1469
1470     The error INVALID_OPERATION is generated if the format is DSDT_NV
1471     and the internalformat is not either DSDT_NV or DSDT8_NV; or if
1472     the internal format is either DSDT_NV or DSDT8_NV and the format
1473     is not DSDT_NV.
1474
1475     The error INVALID_OPERATION is generated if the format is DSDT_MAG_NV
1476     and the internalformat is not either DSDT_MAG_NV or DSDT8_MAG8_NV;
1477     or if the internal format is either DSDT_MAG_NV or DSDT8_MAG8_NV
1478     and the format is not DSDT_MAG_NV.
1479
1480     The error INVALID_OPERATION is generated if the format
1481     is DSDT_MAG_VIB_NV and the internalformat is not either
1482     DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV; or if the internal
1483     format is either DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV
1484     and the format is not DSDT_MAG_VIB_NV."
1485
1486     Change the first sentence of the sixth paragraph to read:
1487
1488     "The internal component resolution is the number of bits allocated
1489     to each value in a texture image (and includes the sign bit if the
1490     component is signed)."
1491
1492     Change the third sentence of the sixth paragraph to read:
1493
1494     "If a sized internal format is specified, the mapping of the R,
1495     G, B, A, HI, LO, DS, DT, and MAG values to texture components
1496     is equivalent to the mapping of the corresponding base internal
1497     format's components, as specified in table 3.15, and the memory
1498     allocations per texture component is assigned by the GL to match
1499     the allocations listed in table 3.16 as closely as possible."
1500
1501 --  Section 3.8.2 "Alternate Texture Image Specification Commands"
1502
1503     In the second paragraph (describing CopyTexImage2D), change the
1504     third to the last sentence to:
1505
1506     "Parameters level, internalformat, and border are specified using the
1507     same values, with the same meanings, as the equivalent arguments of
1508     TexImage2D, except that internalformat may not be specified as 1, 2,
1509     3, 4, HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV,
1510     DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or
1511     DSDT8_MAG8_INTENSITY8_NV."
1512
1513     In the third paragraph (describing CopyTexImage1D), change the
1514     second to the last sentence to:
1515
1516     "level, internalformat, and border are specified using the same
1517     values, with the same meanings, as the equivalent arguments of
1518     TexImage1D, except that internalformat may not be specified as 1, 2,
1519     3, 4, HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV,
1520     DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or
1521     DSDT8_MAG8_INTENSITY8_NV."
1522
1523     Insert the following text after the six paragraph reading:
1524
1525     "CopyTexSubImage2D and CopyTexSubImage1D generate the error
1526     INVALID_OPERATION if the internal format of the texture array to
1527     which the pixels are to be copied is one of HILO_NV, HILO16_NV,
1528     SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV,
1529     DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV.
1530
1531     TexSubImage2D and TexSubImage1D generate the error INVALID_OPERATION
1532     if the internal format of the texture array to which the texels are
1533     to be copied has a different format type (according to table 3.15)
1534     than the format type of the texels being specified.  Specifically, if
1535     the base internal format is not one of HILO_NV, DSDT_NV, DSDT_MAG_NV,
1536     or DSDT_INTENSITY_NV, then the format parameter must be one of
1537     COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or
1538     LUMINANCE_ALPHA; if the base internal format is HILO_NV, then the
1539     format parameter must be HILO_NV; if the base internal format is
1540     DSDT_NV, then the format parameter must be DSDT_NV; if the base
1541     internal format is DSDT_MAG_NV, then the format parameter must be
1542     DSDT_MAG_NV; if the base internal format is DSDT_MAG_INTENSITY_NV,
1543     the format parameter must be DSDT_MAG_VIB_NV."
1544
1545 --  Section 3.8.3 "Texture Parameters"
1546
1547     Change the TEXTURE_BORDER_COLOR line in table 3.17 to read:
1548
1549     Name                      Type      Legal Values
1550     ------------------------  --------  ------------
1551     TEXTURE_BORDER_VALUES     4 floats  any value
1552
1553     Add the last two sentences to read:
1554
1555     "The TEXTURE_BORDER_VALUES state can also be specified with the
1556     TEXTURE_BORDER_COLOR symbolic constant.  When the state is specified
1557     via TEXTURE_BORDER_COLOR, each of the four values specified are
1558     first clamped to lie in [0,1].  However, if the texture border
1559     values state is specified using TEXTURE_BORDER_VALUES, no clamping
1560     occurs.  In either case, if the values are specified as integers,
1561     the conversion for signed integers from table 2.6 is applied to
1562     convert the values to floating-point."
1563
1564 --  Section 3.8.5 "Texture Minification"
1565
1566     Change the last paragraph to read:
1567
1568     "If any of the selected tauijk, tauij, or taui in the above equations
1569     refer to a border texel with i < -bs, j < bs, k < -bs, i >= ws-bs, j
1570     >= hs-bs, or k >= ds-bs, then the border values given by the current
1571     setting of TEXTURE_BORDER_VALUES is used instead of the unspecified
1572     value or values.  If the texture contains color components, the
1573     components of the TEXTURE_BORDER_VALUES vector are interpreted as
1574     an RGBA color to match the texture's internal format in a manner
1575     consistent with table 3.15.  If the texture contains HILO components,
1576     the first and second components of the TEXTURE_BORDER_VALUES vector
1577     are interpreted as the hi and lo components respectively.  If the
1578     texture contains texture offset group components, the first, second,
1579     third, and fourth components of the TEXTURE_BORDER_VALUES vector
1580     are interpreted as ds, dt, mag, and vib components respectively.
1581     Additionally, the texture border values are clamped appropriately
1582     depending on the signedness of each particular component.  Unsigned
1583     components are clamped to [0,1]; signed components are clamped to
1584     [-1,1]."
1585
1586 --  Section 3.8.9 "Texture Environment and Texture Functions"
1587
1588     Augment the list of supported texture functions in the first
1589     paragraph to read:
1590
1591     "TEXTURE_ENV_MODE may be set to one of REPLACE, MODULATE, DECAL,
1592     BLEND, ADD, COMBINE_ARB (or COMBINE_EXT), COMBINE4_NV, or NONE;"
1593
1594     Insert this paragraph between the first and second paragraphs:
1595
1596     "When texture shaders are enabled (see section 3.8.13), a given
1597     texture unit's texture shader result may be intended for use as
1598     an input to another texture shader stage rather than generating
1599     a texture unit RGBA result for use in the given texture unit's
1600     texture environment function.  Additionally, several texture shader
1601     operations and texture format types are intended only to generate
1602     texture shader results for subsequent texture shaders or perform a
1603     side effect (such as culling the fragment or replacing the fragment's
1604     depth value) rather than supplying a useful texture unit RGBA result
1605     for use in the texture environment function.  For this reason,
1606     the NONE texture environment ignores the texture unit RGBA result
1607     and passes through its input fragment color unchanged."
1608
1609     Change the third sentence of the second paragraph to read:
1610
1611     "If the TEXTURE_SHADER_NV mode is disabled, the precise form of
1612     the texture environment function depends on the base internal
1613     format of the texture object bound to the given texture unit's
1614     highest-precedence enabled texture target.  Otherwise if the
1615     TEXTURE_SHADER_NV mode is enabled, then the form of the function
1616     depends on the texture unit's texture shader operation.
1617
1618     If a texture shader operation requires fetching a filtered
1619     texture color value (though not a HILO or texture offset value;
1620     see the subsequent HILO and texture offset discussion), the texture
1621     environment function depends on the base internal format of the
1622     texture shader operation's respective texture target used for
1623     fetching by the texture shader operation.
1624
1625     The PASS_THROUGH_NV texture shader operation does not fetch from any
1626     texture target, but it generates an RGBA color and therefore always
1627     operates as if the base internal format is RGBA for determining
1628     what texture environment function to apply.
1629
1630     If the TEXTURE_SHADER_NV mode is enabled and the texture shader
1631     operation for a given texture unit is one of NONE, CULL_FRAGMENT_NV,
1632     DOT_PRODUCT_NV, or DOT_PRODUCT_DEPTH_REPLACE_NV, then the given
1633     texture unit's texture function always operates as if the texture
1634     function is NONE.
1635
1636     If the base internal format of the texture is HILO_NV, DSDT_NV,
1637     or DSDT_MAG_NV (independent of whether or not the TEXTURE_SHADER_NV
1638     mode is enabled or disabled), then corresponding the texture function
1639     always operates as if the texture function is NONE.
1640
1641     If the base internal format of the texture is DSDT_MAG_INTENSITY_NV
1642     (independent of whether or not the TEXTURE_SHADER_NV mode is enabled
1643     or disabled), then the corresponding texture function operates
1644     as if the base internal format is INTENSITY for the purposes of
1645     determining the appropriate function using the vibrance component
1646     as the intensity value."
1647
1648     Change the phrase in the fourth sentence of the second paragraph
1649     describing how Rt, Gt, Bt, At, Lt, and It are assigned to:
1650
1651     "when TEXTURE_SHADER_NV is disabled, Rt, Gt, Bt, At, Lt, and It are
1652     the filtered texture values; when TEXTURE_SHADER_NV is enabled, Rt,
1653     Gt, Bt, and At are the respective components of the texture unit
1654     RGBA result of the texture unit's texture shader stage, and Lt and
1655     It are any red, green, or blue component of the texture unit RGBA
1656     result (the three components should be the same);"
1657
1658     Change the second to last sentence of the second paragraph to read:
1659
1660     "The initial primary color and texture environment color component
1661     values are in the range [0,1].  The filtered texture color and
1662     texture function result color component values are in the range
1663     [-1,1].  Negative filtered texture color component values are
1664     generated by texture internal formats with signed components such
1665     as SIGNED_RGBA."
1666
1667     Also amend tables 3.18 and 3.19 based on the following updated columns:
1668
1669Base               DECAL                                 BLEND                                 ADD
1670Internal Format    Texture Function                      Texture Function                      Texture Function
1671=================  ===================================== ===================================== ==========================
1672 ALPHA              Rv = Rf (no longer undefined)         Rv = Rf                               Rv = Rf
1673                    Gv = Gf                               Gv = Gf                               Gv = Gf
1674                    Bv = Bf                               Bv = Bf                               Bv = Rf
1675                    Av = Af                               Av = Af*At                            Av = Af*Av = At
1676-----------------  ------------------------------------- ------------------------------------- --------------------------
1677 LUMINANCE          Rv = Rf (no longer undefined)         Rv = Rf*(1-max(0,Lt)) + Rc*max(0,Lt)  Rv = max(-1,min(1,Rf+Lt))
1678 (or 1)             Gv = Gf                               Gv = Gf*(1-max(0,Lt)) + Gc*max(0,Lt)  Gv = max(-1,min(1,Gf+Lt))
1679                    Bv = Bf                               Bv = Bf*(1-max(0,Lt)) + Bc*max(0,Lt)  Bv = max(-1,min(1,Bf+Lt))
1680                    Av = Af                               Av = Af                               Av = Af
1681-----------------  ------------------------------------- ------------------------------------- --------------------------
1682 LUMINANCE_ALPHA    Rv = Rf (no longer undefined)         Rv = Rf*(1-max(0,Lt)) + Rc*max(0,Lt)  Rv = max(-1,min(1,Rf+Lt))
1683 (or 2)             Gv = Gf                               Gv = Gf*(1-max(0,Lt)) + Gc*max(0,Lt)  Gv = max(-1,min(1,Gf+Lt))
1684                    Bv = Bf                               Bv = Bf*(1-max(0,Lt)) + Bc*max(0,Lt)  Bv = max(-1,min(1,Bf+Lt))
1685                    Av = Af                               Av = Af*At                            Av = Af*At
1686-----------------  ------------------------------------- ------------------------------------- --------------------------
1687 INTENSITY          Rv = Rf (no longer undefined)         Rv = Rf*(1-max(0,It)) + Rc*max(0,It)  Rv = max(-1,min(1,Rf+It))
1688                    Gv = Gf                               Gv = Gf*(1-max(0,It)) + Gc*max(0,It)  Gv = max(-1,min(1,Gf+It))
1689                    Bv = Bf                               Bv = Bf*(1-max(0,It)) + Bc*max(0,It)  Bv = max(-1,min(1,Bf+It))
1690                    Av = Af                               Av = Af*(1-max(0,It)) + Ac*max(0,It)  Av = max(-1,min(1,Af+It))
1691-----------------  ------------------------------------- ------------------------------------- --------------------------
1692 RGB                Rv = Rt                               Rv = Rf*(1-max(0,Rt)) + Rc*max(0,Rt)  Rv = max(-1,min(1,Rf+Rt))
1693 (or 3)             Gv = Gt                               Gv = Gf*(1-max(0,Gt)) + Gc*max(0,Gt)  Gv = max(-1,min(1,Gf+Gt))
1694                    Bv = Bt                               Bv = Bf*(1-max(0,Bt)) + Bc*max(0,Bt)  Bv = max(-1,min(1,Bf+Bt))
1695                    Av = Af                               Av = Af                               Av = Af
1696-----------------  ------------------------------------- ------------------------------------- --------------------------
1697 RGBA               Rv = Rf*(1-max(0,At)) + Rt*max(0,At)  Rv = Rf*(1-max(0,Rt)) + Rc*max(0,Rt)  Rv = max(-1,min(1,Rf+Rt))
1698 (or 4)             Gv = Gf*(1-max(0,At)) + Gt*max(0,At)  Gv = Gf*(1-max(0,Gt)) + Gc*max(0,Gt)  Gv = max(-1,min(1,Gf+Gt))
1699                    Bv = Bf*(1-max(0,At)) + Bt*max(0,At)  Bv = Bf*(1-max(0,Bt)) + Bc*max(0,Bt)  Bv = max(-1,min(1,Bf+Bt))
1700                    Av = Af                               Av = Af*At                            Av = Af*At
1701-----------------  ------------------------------------- ------------------------------------- --------------------------
1702
1703     Also augment table 3.18 or 3.19 with the following column:
1704
1705     Base               NONE
1706     Internal Format    Texture Function
1707     =================  ================
1708      ALPHA              Rv = Rf
1709                         Gv = Gf
1710                         Bv = Bf
1711                         Av = Af
1712     -----------------  ----------------
1713      LUMINANCE          Rv = Rf
1714      (or 1)             Gv = Gf
1715                         Bv = Bf
1716                         Av = Af
1717     -----------------  ----------------
1718      LUMINANCE_ALPHA    Rv = Rf
1719      (or 2)             Gv = Gf
1720                         Bv = Bf
1721                         Av = Af
1722     -----------------  ----------------
1723      INTENSITY          Rv = Rf
1724                         Gv = Gf
1725                         Bv = Bf
1726                         Av = Af
1727     -----------------  ----------------
1728      RGB                Rv = Rf
1729      (or 3)             Gv = Gf
1730                         Bv = Bf
1731                         Av = Af
1732     -----------------  ----------------
1733      RGBA               Rv = Rf
1734      (or 4)             Gv = Gf
1735                         Bv = Bf
1736                         Av = Af
1737     -----------------  ----------------
1738
1739     Amend tables 3.21 and 3.22 in the ARB_texture_env_combine
1740     specification (or EXT_texture_env_combine specification) to require
1741     inputs to be clamped positive (the TEXTURE<n>_ARB entries apply
1742     only if NV_texture_env_combine4 is supported):
1743
1744        SOURCE<n>_RGB_EXT       OPERAND<n>_RGB_EXT      Argument
1745        -----------------       --------------          --------
1746        TEXTURE                 SRC_COLOR               max(0,Ct)
1747                                ONE_MINUS_SRC_COLOR     (1-max(0,Ct))
1748                                SRC_ALPHA               max(0,At)
1749                                ONE_MINUS_SRC_ALPHA     (1-max(0,At))
1750        CONSTANT_EXT            SRC_COLOR               max(0,Cc
1751                                ONE_MINUS_SRC_COLOR     (1-max(0,Cc)
1752                                SRC_ALPHA               max(0,Ac
1753                                ONE_MINUS_SRC_ALPHA     (1-max(0,Ac)
1754        PRIMARY_COLOR_EXT       SRC_COLOR               max(0,Cf
1755                                ONE_MINUS_SRC_COLOR     (1-max(0,Cf)
1756                                SRC_ALPHA               max(0,Af
1757                                ONE_MINUS_SRC_ALPHA     (1-max(0,Af)
1758        PREVIOUS_EXT            SRC_COLOR               max(0,Cp
1759                                ONE_MINUS_SRC_COLOR     (1-max(0,Cp)
1760                                SRC_ALPHA               max(0,Ap
1761                                ONE_MINUS_SRC_ALPHA     (1-max(0,Ap)
1762        TEXTURE<n>_ARB          SRC_COLOR               max(0,Ct<n>)
1763                                ONE_MINUS_SRC_COLOR     (1-max(0,Ct<n>))
1764                                SRC_ALPHA               max(0,At<n>)
1765                                ONE_MINUS_SRC_ALPHA     (1-max(0,At<n>))
1766
1767        Table 3.21: Arguments for COMBINE_RGB_ARB (or COMBINE_RGB_EXT)
1768        functions
1769
1770        SOURCE<n>_ALPHA_EXT     OPERAND<n>_ALPHA_EXT    Argument
1771        -----------------       --------------          --------
1772        TEXTURE                 SRC_ALPHA               max(0,At)
1773                                ONE_MINUS_SRC_ALPHA     (1-max(0,At))
1774        CONSTANT_EXT            SRC_ALPHA               max(0,Ac)
1775                                ONE_MINUS_SRC_ALPHA     (1-max(0,Ac))
1776        PRIMARY_COLOR_EXT       SRC_ALPHA               max(0,Af)
1777                                ONE_MINUS_SRC_ALPHA     (1-max(0,Af))
1778        PREVIOUS_EXT            SRC_ALPHA               max(0,Ap)
1779                                ONE_MINUS_SRC_ALPHA     (1-max(0,Ap))
1780        TEXTURE<n>_ARB          SRC_ALPHA               max(0,At<n>)
1781                                ONE_MINUS_SRC_ALPHA     (1-max(0,At<n>))
1782
1783        Table 3.22: Arguments for COMBINE_ALPHA_ARB (or COMBINE_ALPHA_EXT)
1784        functions
1785
1786 --  Section 3.9 "Color Sum"
1787
1788     Update the first paragraph to read:
1789
1790     "At the beginning of color sum, a fragment has two RGBA colors: a
1791     primary color cpri (which texturing, if enabled, may have modified)
1792     and a secondary color csec.  The components of these two colors are
1793     clamped to [0,1] and then summed to produce a single post-texturing
1794     RGBA color c.  The components of c are then clamped to the range
1795     [0,1]."
1796
1797 --  NEW Section 3.8.13 "Texture Shaders"
1798
1799     "Each texture unit is configured with one of twenty-one
1800     texture shader operations.  Several texture shader operations
1801     require additional state.  All per-texture shader stage state
1802     is specified using the TexEnv commands with the target specified
1803     as TEXTURE_SHADER_NV.  The per-texture shader state is replicated
1804     per texture unit so the texture unit selected by ActiveTextureARB
1805     determines which texture unit's environment is modified by TexEnv
1806     calls.
1807
1808     When calling TexEnv with a target of TEXTURE_SHADER_NV,
1809     pname must be one of SHADER_OPERATION_NV, CULL_MODES_NV,
1810     OFFSET_TEXTURE_MATRIX_NV, OFFSET_TEXTURE_SCALE_NV,
1811     OFFSET_TEXTURE_BIAS_NV, PREVIOUS_TEXTURE_INPUT_NV, or CONST_EYE_NV.
1812
1813     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1814     SHADER_OPERATION_NV may be set to one of NONE,
1815     TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP_ARB,
1816     PASS_THROUGH_NV, CULL_FRAGMENT_NV, OFFSET_TEXTURE_2D_NV,
1817     OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV,
1818     OFFSET_TEXTURE_RECTANGLE_SCALE_NV, DEPENDENT_AR_TEXTURE_2D_NV,
1819     DEPENDENT_GB_TEXTURE_2D_NV, DOT_PRODUCT_NV,
1820     DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV,
1821     DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
1822     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, or
1823     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.  The semantics of each of
1824     these shader operations is described in section 3.8.13.1.  Not every
1825     operation is supported in every texture unit.  The restrictions for
1826     how these shader operations can be configured in various texture
1827     units are described in section 3.8.13.2.
1828
1829     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1830     CULL_MODES_NV is set to a vector of four cull comparisons by
1831     providing four symbolic tokens, each being either LESS or GEQUAL.
1832     These cull modes are used by the CULL_FRAGMENT_NV operation (see
1833     section 3.8.13.1.7).
1834
1835     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1836     RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV may be set to either
1837     UNSIGNED_IDENTITY_NV or EXPAND_NORMAL_NV.  This RGBA unsigned dot
1838     product mapping mode is used by the DOT_PRODUCT_NV operation (see
1839     section 3.8.13.1.14) and other operations that compute dot products.
1840
1841     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1842     PREVIOUS_TEXTURE_INPUT_NV may be set to TEXTUREi_ARB where i is
1843     between 0 and n-1 where n is the implementation-dependent number of
1844     texture units supported.  The INVALID_OPERATION error is generated
1845     if i is greater than or equal to the current active texture unit.
1846
1847     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1848     OFFSET_TEXTURE_MATRIX_NV may be set to a 2x2 matrix of floating-point
1849     values stored in column-major order as 4 consecutive floating-point
1850     values, i.e. as:
1851
1852          [ a1 a3 ]
1853          [ a2 a4 ]
1854
1855     This matrix is used by the OFFSET_TEXTURE_2D_NV,
1856     OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV, and
1857     OFFSET_TEXTURE_RECTANGLE_SCALE_NV operations (see sections 3.8.13.1.8
1858     through 3.8.13.1.11).
1859
1860     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1861     OFFSET_TEXTURE_SCALE_NV may be set to a floating-point value.
1862     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1863     OFFSET_TEXTURE_BIAS_NV may be set to a floating-point value.  These
1864     scale and bias values are used by the OFFSET_TEXTURE_2D_SCALE_NV
1865     and OFFSET_TEXTURE_RECTANGLE_SCALE_NV operations (see section
1866     3.8.13.1.9 and 3.8.13.1.11).
1867
1868     When TexEnv is called with the target of TEXTURE_SHADER_NV,
1869     CONST_EYE_NV is set to a vector of three floating-point
1870     values used as the constant eye vector in the
1871     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV texture shader (see
1872     section 3.8.13.1.19).
1873
1874     3.8.13.1  Texture Shader Operations
1875
1876     The texture enables described in section 3.8.10 only affect
1877     conventional texturing mode; these enables are ignored when
1878     TEXTURE_SHADER_NV is enabled.  Instead, the texture shader operation
1879     determines how texture coordinates are mapped to filtered texture
1880     values.
1881
1882     Tables 3.A, 3.B, 3.C, and 3.D specify inter-stage dependencies,
1883     texture target dependencies, relevant inputs, and result types and
1884     values respectively for each texture shader operation.  Table 3.E
1885     specifies how the components of an accessed texture are mapped to
1886     the components of the texture unit RGBA result based on the base
1887     internal format of the accessed texture.  The following discussion
1888     describes each possible texture shader operation in detail.
1889
1890                                                                                               texture shader
1891texture shader operation i         previous texture input     texture shader operation i-1     operation i-2     texture shader operation i+1
1892=================================  =========================  ===============================  ================  ================================
1893NONE                               -                          -                                -                 -
1894---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1895TEXTURE_1D                         -                          -                                -                 -
1896TEXTURE_2D                         -                          -                                -                 -
1897TEXTURE_RECTANGLE_NV               -                          -                                -                 -
1898TEXTURE_CUBE_MAP_ARB               -                          -                                -                 -
1899---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1900PASS_THROUGH_NV                    -                          -                                -                 -
1901CULL_FRAGMENT_NV                   -                          -                                -                 -
1902---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1903OFFSET_TEXTURE_2D_NV               base internal texture      -                                -                 -
1904                                    format must be one of
1905                                    DSDT_NV, DSDT_MAG_NV, or
1906                                    DSDT_MAG_INTENSITY_NV
1907OFFSET_TEXTURE_2D_SCALE_NV         base internal texture      -                                -                 -
1908                                    format must be either
1909                                    DSDT_MAG_NV or
1910                                    DSDT_MAG_INTENSITY_NV
1911OFFSET_TEXTURE_RECTANGLE_NV        base internal texture      -                                -                 -
1912                                    format must be one of
1913                                    DSDT_NV, DSDT_MAG_NV, or
1914                                    DSDT_MAG_INTENSITY_NV
1915OFFSET_TEXTURE_RECTANGLE_SCALE_NV  base internal texture      -                                -                 -
1916                                    format must be either
1917                                    DSDT_MAG_NV or
1918                                    DSDT_MAG_INTENSITY_NV
1919---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1920DEPENDENT_AR_TEXTURE_2D_NV         shader result type must    -                                -                 -
1921                                    all be unsigned RGBA
1922DEPENDENT_GB_TEXTURE_2D_NV         shader result type must    -                                -                 -
1923                                    all be unsigned RGBA
1924---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1925DOT_PRODUCT_NV                     shader result type must    -                                -                 -
1926                                    be one of signed HILO,
1927                                    unsigned HILO, all
1928                                    signed RGBA, or all
1929                                    unsigned RGBA
1930DOT_PRODUCT_TEXTURE_2D_NV          shader result type must    shader operation must be         -                 -
1931                                    be one of signed HILO,     DOT_PRODUCT_NV
1932                                    unsigned HILO, all
1933                                    signed RGBA, or all
1934                                    unsigned RGBA
1935DOT_PRODUCT_TEXTURE_RECTANGLE_NV   shader result type must    shader operation must be         -                 -
1936                                    be one of signed HILO,     DOT_PRODUCT_NV
1937                                    unsigned HILO, all
1938                                    signed RGBA, all
1939                                    unsigned RGBA
1940DOT_PRODUCT_TEXTURE_CUBE_MAP_NV    shader result type must    shader operation                 shader operation  -
1941                                    be one of signed HILO,     must be                          must be
1942                                    unsigned HILO, all         DOT_PRODUCT_NV                   DOT_PRODUCT_NV
1943                                    signed RGBA, or all
1944                                    unsigned RGBA
1945DOT_PRODUCT_REFLECT_CUBE_MAP_NV    shader result type must    shader operation must be         shader operation  -
1946                                    be one of signed HILO,     DOT_PRODUCT_NV or                must be
1947                                    unsigned HILO, all         DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV  DOT_PRODUCT_NV
1948                                    signed RGBA, or all
1949                                    unsigned RGBA; previous
1950                                    texture input must not
1951                                    be unit i-1
1952DOT_PRODUCT_CONST_EYE_-            shader result type must    shader operation                 shader operation  -
1953 REFLECT_CUBE_MAP_NV                be one of signed HILO,     must be                          must be
1954                                    unsigned HILO, all         DOT_PRODUCT_NV or                DOT_PRODUCT_NV
1955                                    signed RGBA, or all        DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV
1956                                    unsigned RGBA
1957DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV    shader result type must    shader operation must be         -                 shader operation must be
1958                                    be one of signed HILO,     DOT_PRODUCT_NV                                     DOT_PRODUCT_REFLECT_CUBE_MAP_NV
1959                                    unsigned HILO, all                                                            or DOT_PRODUCT_CONST_EYE_-
1960                                    signed RGBA, or all                                                           REFLECT_CUBE_MAP_NV
1961                                    unsigned RGBA
1962---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1963DOT_PRODUCT_DEPTH_REPLACE_NV       shader result type must    shader operation                 -                 -
1964                                    be one of signed HILO,     must be
1965                                    unsigned HILO, all         DOT_PRODUCT_NV
1966                                    signed RGBA, or all
1967                                    unsigned RGBA
1968---------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
1969
1970Table 3.A:  Texture shader inter-stage dependencies for each operation.
1971If any one of the dependencies listed above is not met, the texture
1972shader stage is considered inconsistent.  Further texture shader target
1973dependencies are listed in table X.Y.  Additionally, if any one of the
1974texture shader stages that a particular texture shader stage depends on is
1975inconsistent, then the dependent texture shader stage is also considered
1976inconsistent.  When a texture shader stage is considered inconsistent,
1977the inconsistent stage operates as if the stage's operation is NONE.
1978
1979texture shader operation i         texture unit i
1980=================================  =======================================
1981NONE                               -
1982---------------------------------  ---------------------------------------
1983TEXTURE_1D                         1D target must be consistent
1984TEXTURE_2D                         2D target must be consistent
1985TEXTURE_RECTANGLE_NV               rectangle target must be consistent
1986TEXTURE_CUBE_MAP_ARB               cube map target must be consistent
1987---------------------------------  ---------------------------------------
1988PASS_THROUGH_NV                    -
1989CULL_FRAGMENT_NV                   -
1990---------------------------------  ---------------------------------------
1991OFFSET_TEXTURE_2D_NV               2D target must be consistent
1992OFFSET_TEXTURE_2D_SCALE_NV         2D target must be consistent
1993                                    and 2D texture target type must
1994                                    be unsigned RGBA
1995OFFSET_TEXTURE_RECTANGLE_NV        rectangle target must be consistent
1996OFFSET_TEXTURE_RECTANGLE_SCALE_NV  rectangle target must be consistent
1997                                    and rectangle texture target type must
1998                                    be unsigned RGBA
1999---------------------------------  ---------------------------------------
2000DEPENDENT_AR_TEXTURE_2D_NV         2D target must be consistent
2001DEPENDENT_GB_TEXTURE_2D_NV         2D target must be consistent
2002---------------------------------  ---------------------------------------
2003DOT_PRODUCT_NV                     -
2004DOT_PRODUCT_TEXTURE_2D_NV          2D target must be consistent
2005DOT_PRODUCT_TEXTURE_RECTANGLE_NV   rectangle target must be consistent
2006DOT_PRODUCT_TEXTURE_CUBE_MAP_NV    cube map target must be consistent
2007DOT_PRODUCT_REFLECT_CUBE_MAP_NV    cube map target must be consistent
2008DOT_PRODUCT_CONST_EYE_-            cube map target must be consistent
2009 REFLECT_CUBE_MAP_NV
2010DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV    cube map target must be consistent
2011---------------------------------  ---------------------------------------
2012DOT_PRODUCT_DEPTH_REPLACE_NV       -
2013---------------------------------  ---------------------------------------
2014
2015Table 3.B:  Texture shader target dependencies for each operation.
2016If the dependency listed above is not met, the texture shader stage is
2017considered inconsistent.
2018
2019                                                          uses    uses    uses    uses             uses       offset    uses
2020                                   texture                stage   stage   stage   previous  uses   offset     texture   const
2021                                   coordinate  texture    result  result  result  texture   cull   texture    2D scale  eye
2022texture shader operation i         set usage   target     i-1     i-2     i+1     input     modes  2D matrix  and bias  vector
2023=================================  ==========  =========  ======  ======  ======  ========  =====  =========  ========  ======
2024NONE                               -           -          -       -       -       -         -      -          -         -
2025---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2026TEXTURE_1D                         s,q         1D         -       -       -       -         -      -          -         -
2027TEXTURE_2D                         s,t,q       2D         -       -       -       -         -      -          -         -
2028TEXTURE_RECTANGLE_NV               s,t,q       rectangle  -       -       -       -         -      -          -         -
2029TEXTURE_CUBE_MAP_ARB               s,t,r       cube map   -       -       -       -         -      -          -         -
2030---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2031PASS_THROUGH_NV                    s,t,r,q     -          -       -       -       -         -      -          -         -
2032CULL_FRAGMENT_NV                   s,t,r,q     -          -       -       -       -         y      -          -         -
2033---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2034OFFSET_TEXTURE_2D_NV               s,t         2D         -       -       -       y         -      y          -         -
2035OFFSET_TEXTURE_2D_SCALE_NV         s,t         2D         -       -       -       y         -      y          y         -
2036OFFSET_TEXTURE_RECTANGLE_NV        s,t         rectangle  -       -       -       y         -      y          -         -
2037OFFSET_TEXTURE_RECTANGLE_SCALE_NV  s,t         rectangle  -       -       -       y         -      y          y         -
2038---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2039DEPENDENT_AR_TEXTURE_2D_NV         -           2D         -       -       -       y         -      -          -         -
2040DEPENDENT_GB_TEXTURE_2D_NV         -           2D         -       -       -       y         -      -          -         -
2041---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2042DOT_PRODUCT_NV                     s,t,r (q*)  -          -       -       -       y         -      -          -         -
2043DOT_PRODUCT_TEXTURE_2D_NV          s,t,r       2D         y       -       -       y         -      -          -         -
2044DOT_PRODUCT_TEXTURE_RECTANGLE_NV   s,t,r       rectangle  y       -       -       y         -      -          -         -
2045DOT_PRODUCT_TEXTURE_CUBE_MAP_NV    s,t,r       cube map   y       y       -       y         -      -          -         -
2046DOT_PRODUCT_REFLECT_CUBE_MAP_NV    s,t,r,q     cube map   y       y       -       y         -      -          -         -
2047DOT_PRODUCT_CONST_EYE_-            s,t,r       cube map   y       y       -       y         -      -          -         y
2048 REFLECT_CUBE_MAP_NV
2049DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV    s,t,r (q*)  cube map   y       y       y       y         -      -          -         -
2050---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2051DOT_PRODUCT_DEPTH_REPLACE_NV       s,t,r       -          y       -       -       y         -      -          -         -
2052---------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
2053
2054Table 3.C:  Relevant texture shader computation inputs for each
2055operation.  The (q*) for the texture coordinate set usage indicates
2056that the q texture coordinate is used only when the DOT_PRODUCT_NV and
2057DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV operations are used in conjunction with
2058DOT_PRODUCT_REFLECT_CUBE_MAP_NV.
2059
2060texture shader operation i         shader stage result type       shader stage result                  texture unit RGBA color result
2061=================================  =============================  ===================================  ======================================
2062NONE                               unsigned RGBA                  invalid                              (0,0,0,0)
2063---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
2064TEXTURE_1D                         matches 1D target type         filtered 1D target texel             if 1D target texture type is RGBA,
2065                                                                                                        filtered 1D target texel,
2066                                                                                                        else (0,0,0,0)
2067TEXTURE_2D                         matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
2068                                                                                                        filtered 2D target texel,
2069                                                                                                        else (0,0,0,0)
2070TEXTURE_RECTANGLE_NV               matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
2071                                                                                                        RGBA, filtered rectangle target
2072                                                                                                        texel, else (0,0,0,0)
2073TEXTURE_CUBE_MAP_ARB               matches cube map target type   filtered cube map target texel       if cube map target texture type is
2074                                                                                                        RGBA,  filtered cube map target
2075                                                                                                        texel, else (0,0,0,0)
2076---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
2077PASS_THROUGH_NV                    unsigned RGBA                  (max(0,min(1,s)), max(0,min(1,t)),   (max(0,min(1,s)), max(0,min(1,t)),
2078                                                                   max(0,min(1,r)), max(0,min(1,q)))    max(0,min(1,r)), max(0,min(1,q)))
2079CULL_FRAGMENT_NV                   unsigned RGBA                  invalid                              (0,0,0,0)
2080---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
2081OFFSET_TEXTURE_2D_NV               matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
2082                                                                                                        filtered 2D target texel,
2083                                                                                                        else (0,0,0,0)
2084OFFSET_TEXTURE_2D_SCALE_NV         unsigned RGBA                  filtered 2D target texel             scaled filtered 2D target texel
2085OFFSET_TEXTURE_RECTANGLE_NV        matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
2086                                                                                                        RGBA, filtered rectangle target
2087                                                                                                        texel, else (0,0,0,0)
2088OFFSET_TEXTURE_RECTANGLE_SCALE_NV  unsigned RGBA                  filtered rectangle target texel      scaled filtered rectangle target texel
2089---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
2090DEPENDENT_AR_TEXTURE_2D_NV         matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
2091                                                                                                        filtered 2D target texel,
2092                                                                                                        else (0,0,0,0)
2093DEPENDENT_GB_TEXTURE_2D_NV         matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
2094                                                                                                        filtered 2D target texel,
2095                                                                                                        else (0,0,0,0)
2096---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
2097DOT_PRODUCT_NV                     float                          dot product                          (0,0,0,0)
2098DOT_PRODUCT_TEXTURE_2D_NV          matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
2099                                                                                                        filtered 2D target texel,
2100                                                                                                        else (0,0,0,0)
2101DOT_PRODUCT_TEXTURE_RECTANGLE_NV   matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
2102                                                                                                        RGBA, filtered rectangle target
2103                                                                                                        texel, else (0,0,0,0)
2104DOT_PRODUCT_TEXTURE_CUBE_MAP_NV    matches cube map target type   filtered cube map target texel       if cube map target texture type is
2105                                                                                                        RGBA,  filtered cube map target
2106                                                                                                        texel, else (0,0,0,0)
2107DOT_PRODUCT_REFLECT_CUBE_MAP_NV    matches cube map target type   filtered cube map target texel       if cube map target texture type is
2108                                                                                                        RGBA, filtered cube map target
2109                                                                                                        texel, else (0,0,0,0)
2110DOT_PRODUCT_CONST_EYE_-            matches cube map target type   filtered cube map target texel       if cube map target texture type is
2111 REFLECT_CUBE_MAP_NV                                                                                    RGBA, filtered cube map target
2112                                                                                                        texel, else (0,0,0,0)
2113DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV    matches cube map target type   filtered cube map target texel       if cube map target texture type is
2114                                                                                                        RGBA,  filtered cube map target
2115                                                                                                        texel, else (0,0,0,0)
2116-------------------------------    -----------------------------  -----------------------------------  --------------------------------------
2117DOT_PRODUCT_DEPTH_REPLACE_NV       unsigned RGBA                  invalid                              (0,0,0,0)
2118-------------------------------    -----------------------------  -----------------------------------  --------------------------------------
2119
2120Table 3.D:  Texture shader stage results for each operation.
2121
2122Base internal format  Red  Green  Blue  Alpha
2123--------------------  ---  -----  ----  -----
2124ALPHA                 1    1      1     At
2125LUMINANCE             Lt   Lt     Lt    1
2126INTENSITY             It   It     It    It
2127LUMINANCE_ALPHA       Lt   Lt     Lt    At
2128RGB                   Rt   Gt     Bt    1
2129RGBA                  Rt   Gt     Bt    At
2130
2131Table 3.E:  How base internal formats components are mapped to RGBA values
2132for texture shaders (note that the mapping for ALPHA is different from
2133the mapping in Table 3.23 in the EXT_texture_env_combine extension).
2134
2135     3.8.13.1.1  None
2136
2137     The NONE texture shader operation ignores the texture unit's texture
2138     coordinate set and always generates the texture unit RGBA result
2139     (0,0,0,0) for its filtered texel value.  The texture shader result
2140     is invalid.  This texture shader stage is always consistent.
2141
2142     When a texture unit is not needed while texture shaders are enabled,
2143     it is most efficient to set the texture unit's texture shader
2144     operation to NONE.
2145
2146     3.8.13.1.2  1D Projective Texturing
2147
2148     The TEXTURE_1D texture shader operation accesses the texture unit's
2149     1D texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6)
2150     using (s/q) for the 1D texture coordinate where s and q are the
2151     homogeneous texture coordinates for the texture unit.  The result
2152     of the texture access becomes both the shader result and texture
2153     unit RGBA result (see table 3.E).  The type of the shader result
2154     depends on the format type of the accessed texture.  This mode is
2155     equivalent to conventional texturing's 1D texture target.
2156
2157     If the texture unit's 1D texture object is not consistent, then
2158     this texture shader stage is not consistent.
2159
2160     If this texture shader stage is not consistent, it operates as if
2161     it is the NONE operation.
2162
2163     3.8.13.1.3  2D Projective Texturing
2164
2165     The TEXTURE_2D texture shader operation accesses the texture unit's
2166     2D texture object (as described in sections 3.8.4, 3.8.5, and
2167     3.8.6) using (s/q,t/q) for the 2D texture coordinates where s, t,
2168     and q are the homogeneous texture coordinates for the texture unit.
2169     The result of the texture access becomes both the shader result and
2170     texture unit RGBA result (see table 3.E).  The type of the shader
2171     result depends on the format type of the accessed texture.  This mode
2172     is equivalent to conventional texturing's 2D texture target.
2173
2174     If the texture unit's 2D texture object is not consistent, then
2175     this texture shader stage is not consistent.
2176
2177     If this texture shader stage is not consistent, it operates as if
2178     it is the NONE operation.
2179
2180     3.8.13.1.4  Rectangle Projective Texturing
2181
2182     The TEXTURE_RECTANGLE_NV texture shader operation accesses
2183     the texture unit's rectangle texture object (as described in
2184     sections 3.8.4, 3.8.5, and 3.8.6) using (s/q,t/q) for the 2D texture
2185     coordinates where s, t, and q are the homogeneous texture coordinates
2186     for the texture unit.  The result of the texture access becomes both
2187     the shader result and texture unit RGBA result (see table 3.E).
2188     The type of the shader result depends on the format type of the
2189     accessed texture.  This mode is equivalent to NV_texture_rectangle's
2190     rectangle texture target.
2191
2192     If the texture unit's rectangle texture object is not consistent,
2193     then this texture shader stage is not consistent.
2194
2195     If this texture shader stage is not consistent, it operates as if
2196     it is the NONE operation.
2197
2198     3.8.13.1.5  Cube Map Texturing
2199
2200     The TEXTURE_CUBE_MAP_ARB texture shader operation accesses
2201     the texture unit's cube map texture object (as described in the
2202     ARB_texture_cube_map specification) using (s,t,r) for the 3D texture
2203     coordinate where s, t, and r are the homogeneous texture coordinates
2204     for the texture unit.  The result of the texture access becomes
2205     both the shader result and texture unit RGBA result (see table
2206     3.E).  The type of the shader result depends on the format type
2207     of the accessed texture.  This mode is equivalent to conventional
2208     texturing's cube map texture target.
2209
2210     If the texture unit's cube map texture object is not consistent, then
2211     this texture shader stage is not consistent.
2212
2213     If this texture shader stage is not consistent, it operates as if
2214     it is the NONE operation.
2215
2216     3.8.13.1.6  Pass Through
2217
2218     The PASS_THROUGH_NV texture shader operation converts an (s,t,r,q)
2219     texture coordinate set into an RGBA color result (r,g,b,a).
2220     Each texture coordinate is first clamped to [0,1] before being
2221     mapped to its corresponding color component. The texture shader
2222     result and texture unit RGBA result of this operation are both
2223     assigned the clamped RGBA color result.
2224
2225     This operation in no way depends on any of the texture unit's
2226     texture objects.
2227
2228     3.8.13.1.7  Cull Fragment
2229
2230     The CULL_FRAGMENT_NV texture shader operation compares each
2231     component of the texture coordinate set (s,t,r,q) to zero based
2232     on the texture shader's corresponding cull mode.  For the LESS
2233     cull mode to succeed, the corresponding component must be less
2234     than zero; otherwise the comparison fails.  For the GEQUAL cull
2235     mode to succeed, the corresponding component must be greater or
2236     equal to zero; otherwise the comparison fails.  If any of the four
2237     comparisons fails, the fragment is discarded.
2238
2239     The texture unit RGBA result generated is always (0,0,0,0).
2240     The texture shader result is invalid.  This texture shader stage
2241     is always consistent.
2242
2243     This operation in no way depends on any of the texture unit's
2244     texture objects.
2245
2246     3.8.13.1.8  Offset Texture 2D
2247
2248     The OFFSET_TEXTURE_2D_NV texture shader operation uses the
2249     transformed result of a previous texture shader stage to perturb
2250     the current texture shader stage's (s,t) texture coordinates
2251     (without a projective division by q).  The resulting perturbed
2252     texture coordinates (s',t') are used to access the texture unit's 2D
2253     texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6).
2254
2255     The result of the texture access becomes both the shader result and
2256     texture unit RGBA result (see table 3.E).  The type of the shader
2257     result depends on the format type of the accessed texture.
2258
2259     The perturbed texture coordinates s' and t' are computed with
2260     floating-point math as follows:
2261
2262       s' = s + a1 * DSprev + a3 * DTprev
2263       t' = t + a2 * DSprev + a4 * DTprev
2264
2265     where a1, a2, a3, and a4 are the texture shader stage's
2266     OFFSET_TEXTURE_MATRIX_NV values, and DSprev and DTprev are the
2267     (signed) DS and DT components of a previous texture shader unit's
2268     texture shader result specified by the current texture shader
2269     stage's PREVIOUS_TEXTURE_INPUT_NV value.
2270
2271     If the texture unit's 2D texture object is not consistent, then
2272     this texture shader stage is not consistent.
2273
2274     If the previous texture input texture object specified by the
2275     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2276     has a base internalformat that is not one of DSDT_NV, DSDT_MAG_NV
2277     or DSDT_MAG_INTENSITY_NV, then this texture shader stage is not
2278     consistent.
2279
2280     If the previous texture input texture shader operation specified by
2281     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2282     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2283
2284     If the previous texture input texture shader result specified by
2285     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2286     is invalid, then this texture shader stage is not consistent.
2287
2288     If the previous texture input shader stage specified by the current
2289     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2290     consistent, then this texture shader stage is not consistent.
2291
2292     If this texture shader stage is not consistent, it operates as if
2293     it is the NONE operation.
2294
2295     3.8.13.1.9  Offset Texture 2D and Scale
2296
2297     The OFFSET_TEXTURE_2D_SCALE_NV texture shader operation extends the
2298     functionality of the OFFSET_TEXTURE_2D_NV texture shader operation.
2299     The texture unit's 2D texture object is accessed by the same
2300     perturbed s' and t' coordinates used by the OFFSET_TEXTURE_2D_NV
2301     operation.  The red, green, and blue components (but not alpha)
2302     of the RGBA result of the texture access are further scaled by
2303     the value Scale and clamped to the range [0,1].  This RGBA result
2304     is this shader's texture unit RGBA result.  This shader's texture
2305     shader result is the RGBA result of the texture access prior to
2306     scaling and clamping.
2307
2308     Scale is computed with floating-point math as follows:
2309
2310       Scale = max(0.0, min(1.0, textureOffsetBias + textureOffsetScale * MAGprev))
2311
2312     where textureOffsetBias is the texture shader stage's
2313     OFFSET_TEXTURE_BIAS_NV value, textureOffsetScale is the texture
2314     shader stage's OFFSET_TEXTURE_SCALE_NV value, and MAGprev
2315     is the magnitude component of the a previous texture shader
2316     unit's result specified by the current texture shader stage's
2317     PREVIOUS_TEXTURE_INPUT_NV value.
2318
2319     The texture unit RGBA result (red',green',blue',alpha') is computed
2320     as follows:
2321
2322       red'   = Scale * red
2323       green' = Scale * green
2324       blue'  = Scale * blue
2325       alpha' = alpha
2326
2327     where red, green, blue, and alpha are the texture access components.
2328
2329     If the unit's 2D texture object has any signed components, then this
2330     texture shader stage is not consistent.
2331
2332     If the texture unit's 2D texture object is has a format type other
2333     than RGBA (the DSDT_MAG_INTENSITY_NV base internal format does not
2334     count as an RGBA format type in this context), then this texture
2335     shader stage is not consistent.
2336
2337     If the texture unit's 2D texture object is not consistent, then
2338     this texture shader stage is not consistent.
2339
2340     If the previous texture input texture object specified by the
2341     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2342     has a base internalformat that is not either DSDT_MAG_NV
2343     or DSDT_MAG_INTENSITY_NV, then this texture shader stage is not
2344     consistent.
2345
2346     If the previous texture input texture shader operation specified by
2347     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2348     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2349
2350     If the previous texture input texture shader result specified by
2351     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2352     is invalid, then this texture shader stage is not consistent.
2353
2354     If the previous texture input shader stage specified by the current
2355     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2356     consistent, then this texture shader stage is not consistent.
2357
2358     If this texture shader stage is not consistent, it operates as if
2359     it is the NONE operation.
2360
2361     3.8.13.1.10  Offset Texture Rectangle
2362
2363     The OFFSET_TEXTURE_RECTANGLE_NV shader operation operates
2364     identically to the OFFSET_TEXTURE_2D_NV shader operation except
2365     that the rectangle texture target is accessed rather than the 2D
2366     texture target.
2367
2368     If the texture unit's rectangle texture object (rather than the 2D
2369     texture object) is not consistent, then this texture shader stage
2370     is not consistent.
2371
2372     3.8.13.1.11  Offset Texture Rectangle Scale
2373
2374     The OFFSET_TEXTURE_RECTANGLE_SCALE_NV shader operation operates
2375     identically to the OFFSET_TEXTURE_2D_SCALE_NV shader operation
2376     except that the rectangle texture target is accessed rather than
2377     the 2D texture target.
2378
2379     If the texture unit's rectangle texture object (rather than the 2D
2380     texture object) is not consistent, then this texture shader stage
2381     is not consistent.
2382
2383     3.8.13.1.12  Dependent Alpha-Red Texturing
2384
2385     The DEPENDENT_AR_TEXTURE_2D_NV texture shader operation accesses
2386     the texture unit's 2D texture object (as described in section 3.8.4,
2387     3.8.5, and 3.8.6) using (Aprev, Rprev) for the 2D texture coordinates
2388     where Aprev and Rprev are the are the alpha and red components of
2389     a previous texture input's RGBA texture shader result specified by
2390     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value.
2391     The result of the texture access becomes both the shader result and
2392     texture unit RGBA result (see table 3.E).  The type of the shader
2393     result depends on the format type of the accessed texture.
2394
2395     If the texture unit's 2D texture object is not consistent, then
2396     this texture shader stage is not consistent.
2397
2398     If the previous texture input's texture shader result specified
2399     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
2400     value has a texture shader result type other than RGBA (the
2401     DSDT_MAG_INTENSITY_NV base internal format does not count as an
2402     RGBA format type in this context), then this texture shader stage
2403     is not consistent.
2404
2405     If the previous texture input's texture shader result specified
2406     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
2407     value has a texture shader result type of RGBA but any of the
2408     RGBA components are signed, then this texture shader stage is not
2409     consistent.
2410
2411     If the previous texture input texture shader operation specified by
2412     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2413     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2414
2415     If the previous texture input texture shader result specified by
2416     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2417     is invalid, then this texture shader stage is not consistent.
2418
2419     If the previous texture input shader stage specified by the current
2420     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2421     consistent, then this texture shader stage is not consistent.
2422
2423     If this texture shader stage is not consistent, it operates as if
2424     it is the NONE operation.
2425
2426     3.8.13.1.13  Dependent Green-Blue Texturing
2427
2428     The DEPENDENT_GB_TEXTURE_2D_NV texture shader operation accesses
2429     the texture unit's 2D texture object (as described in section 3.8.4,
2430     3.8.5, and 3.8.6) using (Gprev, Bprev) for the 2D texture coordinates
2431     where Gprev and Bprev are the are the green and blue components
2432     of a previous texture input's RGBA texture shader result specified by the
2433     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value.
2434     The result of the texture access becomes both the shader result and
2435     texture unit RGBA result (see table 3.E).  The type of the shader
2436     result depends on the format type of the accessed texture.
2437
2438     If the texture unit's 2D texture object is not consistent, then
2439     this texture shader stage is not consistent.
2440
2441     If the previous texture input's texture shader result specified
2442     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
2443     value has a texture shader result type other than RGBA (the
2444     DSDT_MAG_INTENSITY_NV base internal format does not count as an
2445     RGBA format type in this context), then this texture shader stage
2446     is not consistent.
2447
2448     If the previous texture input's texture shader result specified
2449     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
2450     value has a texture shader result type of RGBA but any of the
2451     RGBA components are signed, then this texture shader stage is not
2452     consistent.
2453
2454     If the previous texture input texture shader operation specified by
2455     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2456     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2457
2458     If the previous texture input texture shader result specified by
2459     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2460     is invalid, then this texture shader stage is not consistent.
2461
2462     If the previous texture input shader stage specified by the current
2463     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2464     consistent, then this texture shader stage is not consistent.
2465
2466     If this texture shader stage is not consistent, it operates as if
2467     it is the NONE operation.
2468
2469     3.8.13.1.14  Dot Product
2470
2471     The DOT_PRODUCT_NV texture shader operation computes a
2472     floating-point texture shader result.  The texture shader result
2473     is the floating-point dot product of the texture unit's (s,t,r)
2474     texture coordinates and a remapped version of the RGBA or HILO
2475     texture shader result from a specified previous texture shader stage.
2476     The RGBA color result of this shader is always (0,0,0,0).
2477
2478     The re-mapping depends on the specified previous texture shader
2479     stage's texture shader result type.  Specifically, the re-mapping
2480     depends on whether this texture shader result type has all signed
2481     components or all unsigned components, and whether it has RGBA
2482     components or HILO components, and, in the case of unsigned RGBA
2483     texture shader results, the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV
2484     state.
2485
2486     If the specified previous texture unit's texture shader result
2487     type is HILO and all the type components are unsigned, then the
2488     floating-point result is computed by
2489
2490       result = s * HI + t * LO + r
2491
2492     where HI and LO are the (unsigned) hi and lo components respectively
2493     of the previous texture unit's HILO texture shader result.
2494
2495     If the specified previous texture unit's texture shader result
2496     type is HILO and all the type components are signed, then the
2497     floating-point result is computed by
2498
2499       result = s * HI + t * LO + r * sqrt(max(0, 1.0 - HI*HI - LO*LO))
2500
2501     where HI and LO are the (signed) hi and lo components respectively
2502     of the previous texture unit's texture shader result.
2503
2504     If the specified previous texture unit's texture shader result
2505     contains only signed RGBA components, then the floating-point result
2506     is computed by
2507
2508       result = s * Rprev + t * Gprev + r * Bprev
2509
2510     where Rprev, Gprev, and Bprev are the (signed) red, green, and blue
2511     components respectively of the previous texture unit's RGBA texture
2512     shader result.
2513
2514     If the specified previous texture unit's texture shader result
2515     contains only unsigned RGBA components, then the dot product
2516     computation depends on the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV
2517     state.  When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is
2518     UNSIGNED_IDENTITY_NV, then the floating-point result for unsigned
2519     RGBA components is computed by
2520
2521       result = s * Rprev + t * Gprev + r * Bprev
2522
2523     where Rprev, Gprev, and Bprev are the (unsigned) red, green, and
2524     blue components respectively of the previous texture unit's RGBA
2525     texture shader result.
2526
2527     When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is EXPAND_NORMAL_NV,
2528     then the floating-point result for unsigned RGBA components is
2529     computed by
2530
2531       result = s * (2.0*Rprev-1.0) + t * (2.0*Gprev-1.0) + r * (2.0*Bprev-1.0)
2532
2533     where Rprev, Gprev, and Bprev are the (unsigned) red, green, and
2534     blue components respectively of the previous texture unit's RGBA
2535     texture shader result.
2536
2537     If the previous texture input texture object specified by the
2538     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2539     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2540     base internal format does not count as an RGBA format type in this
2541     context), then this texture shader stage is not consistent.
2542
2543     If the components of the previous texture input texture
2544     object specified by the current texture shader stage's
2545     PREVIOUS_TEXTURE_INPUT_NV value have mixed signedness, then
2546     this texture shader stage is not consistent.  For example,
2547     the SIGNED_RGB_UNSIGNED_ALPHA_NV base internal format has mixed
2548     signedness.
2549
2550     If the previous texture input texture shader operation specified by
2551     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2552     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2553
2554     If the previous texture input texture shader result specified by
2555     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2556     is invalid, then this texture shader stage is not consistent.
2557
2558     If the previous texture input shader stage specified by the current
2559     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2560     consistent, then this texture shader stage is not consistent.
2561
2562     If this texture shader stage is not consistent, it operates as if
2563     it is the NONE operation.
2564
2565     This operation in no way depends on any of the texture unit's
2566     texture objects.
2567
2568     3.8.13.1.15  Dot Product Texture 2D
2569
2570     The DOT_PRODUCT_TEXTURE_2D_NV texture shader operation accesses the
2571     texture unit's 2D texture object (as described in sections 3.8.4,
2572     3.8.5, and 3.8.6) using (dotP,dotC) for the 2D texture coordinates.
2573     The result of the texture access becomes both the shader result and
2574     texture unit RGBA result (see table 3.E).  The type of the shader
2575     result depends on the format type of the accessed texture.
2576
2577     Assuming that i is the current texture shader stage, dotP is the
2578     floating-point dot product result from the i-1 texture shader stage,
2579     assuming the i-1 texture shader stage's operation is DOT_PRODUCT_NV.
2580     dotC is the floating-point dot product result from the current
2581     texture shader stage.  dotC is computed in the identical manner
2582     used to compute the floating-point result of the DOT_PRODUCT_NV
2583     texture shader described in section 3.8.13.1.14.
2584
2585     If the previous texture input texture object specified by the
2586     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2587     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2588     base internal format does not count as an RGBA format type in this
2589     context), then this texture shader stage is not consistent.
2590
2591     If the previous texture input texture shader operation specified by
2592     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2593     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2594
2595     If the previous texture input texture shader result specified by
2596     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2597     is invalid, then this texture shader stage is not consistent.
2598
2599     If the previous texture input shader stage specified by the current
2600     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2601     consistent, then this texture shader stage is not consistent.
2602
2603     If the i-1 texture shader stage operation is not DOT_PRODUCT_NV,
2604     then this texture shader stage is not consistent.
2605
2606     If the i-1 texture shader stage is not consistent, then
2607     this texture shader stage is not consistent.
2608
2609     If the texture unit's 2D texture object is not consistent, then
2610     this texture shader stage is not consistent.
2611
2612     If this texture shader stage is not consistent, it operates as if
2613     it is the NONE operation.
2614
2615     3.8.13.1.16  Dot Product Texture Rectangle
2616
2617     The DOT_PRODUCT_TEXTURE_RECTANGLE_NV shader operation operates
2618     identically to the DOT_PRODUCT_TEXTURE_2D_NV shader operation except
2619     that the rectangle texture target is accessed rather than the 2D
2620     texture target.
2621
2622     If the texture unit's rectangle texture object (rather than the 2D
2623     texture object) is not consistent, then this texture shader stage
2624     is not consistent.
2625
2626     3.8.13.1.17  Dot Product Texture Cube Map
2627
2628     The DOT_PRODUCT_TEXTURE_CUBE_MAP_NV texture shader operation
2629     accesses the texture unit's cube map texture object (as described
2630     in the ARB_texture_cube_map specification) using (dotPP,dotP,dotC)
2631     for the 3D texture coordinates.  The result of the texture access
2632     becomes both the shader result and texture unit RGBA result (see
2633     table 3.E).  The type of the shader result depends on the format
2634     type of the accessed texture.
2635
2636     Assuming that i is the current texture shader stage, dotPP is the
2637     floating-point dot product texture shader result from the i-2
2638     texture shader stage, assuming the i-2 texture shader stage's
2639     operation is DOT_PRODUCT_NV.  dotP is the floating-point dot
2640     product texture shader result from the i-1 texture shader stage,
2641     assuming the i-1 texture shader stage's operation is DOT_PRODUCT_NV.
2642     dotC is the floating-point dot product result from the current
2643     texture shader stage.  dotC is computed in the identical manner
2644     used to compute the floating-point result of the DOT_PRODUCT_NV
2645     texture shader described in section 3.8.13.1.14.
2646
2647     If the previous texture input texture object specified by the
2648     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2649     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2650     base internal format does not count as an RGBA format type in this
2651     context), then this texture shader stage is not consistent.
2652
2653     If the previous texture input texture shader operation specified by
2654     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2655     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2656
2657     If the previous texture input texture shader result specified by
2658     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2659     is invalid, then this texture shader stage is not consistent.
2660
2661     If the previous texture input shader stage specified by the current
2662     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2663     consistent, then this texture shader stage is not consistent.
2664
2665     If either the i-1 or i-2 texture shader stage operation is not
2666     DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2667
2668     If either the i-1 or i-2 texture shader stage is not consistent, then
2669     this texture shader stage is not consistent.
2670
2671     If the texture unit's cube map texture object is not consistent,
2672     then this texture shader stage is not consistent.
2673
2674     If this texture shader stage is not consistent, it operates as if
2675     it is the NONE operation.
2676
2677     3.8.13.1.18  Dot Product Reflect Cube Map
2678
2679     The DOT_PRODUCT_REFLECT_CUBE_MAP_NV and
2680     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV (described in the section
2681     3.8.13.1.20) texture shader operations are typically used together.
2682
2683     The DOT_PRODUCT_REFLECT_CUBE_MAP_NV texture shader operation
2684     accesses the texture unit's cube map texture object (as described
2685     in the ARB_texture_cube_map specification) using (rx,ry,rz) for
2686     the 3D texture coordinates.  The result of the texture access becomes
2687     both the shader result and texture unit RGBA result (see table 3.E).
2688     The type of the shader result depends on the format type of the
2689     accessed texture.
2690
2691     Let R = (rx,ry,rz), N = (dotPP,dotP,dotC), and E = (qPP,qP,qC),
2692     then
2693
2694       R = 2 * (N dot E) / (N dot N) * N - E
2695
2696     Assuming that i is the current texture shader stage, dotPP is
2697     the floating-point dot product texture shader result from the
2698     i-2 texture shader stage, assuming the i-2 texture shader stage's
2699     operation is DOT_PRODUCT_NV.  dotP is the floating-point dot product
2700     texture shader result from the i-1 texture shader stage, assuming
2701     the i-1 texture shader stage's operation is either DOT_PRODUCT_NV
2702     or DOT_PRODUCT_DIFFUSE_NV.  dotC is the floating-point dot product
2703     result from the current texture shader stage.  dotC is computed in
2704     the identical manner used to compute the floating-point result of
2705     the DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14.
2706
2707     qPP is the q component of the i-2 texture shader stage's texture
2708     coordinate set.  qP is the q component of the i-1 texture shader
2709     stage's texture coordinate set.  qC is the q component of the
2710     current texture shader stage's texture coordinate set.
2711
2712     If the previous texture input texture object specified by the
2713     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2714     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2715     base internal format does not count as an RGBA format type in this
2716     context), then this texture shader stage is not consistent.
2717
2718     If the previous texture input texture shader operation specified by
2719     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2720     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2721
2722     If the previous texture input texture shader result specified by
2723     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2724     is invalid, then this texture shader stage is not consistent.
2725
2726     If this texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2727     refers to texture unit i-2 or i-1, then this texture shader stage
2728     is not consistent.
2729
2730     If the previous texture input shader stage specified by the current
2731     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2732     consistent, then this texture shader stage is not consistent.
2733
2734     If the i-2 texture shader stage operation is not
2735     DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2736
2737     If the i-1 texture shader stage operation is not DOT_PRODUCT_NV or
2738     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, then this texture shader stage is
2739     not consistent.
2740
2741     If either the i-1 or i-2 texture shader stage is not consistent, then
2742     this texture shader stage is not consistent.
2743
2744     If the texture unit's cube map texture object is not consistent,
2745     then this texture shader stage is not consistent.
2746
2747     If this texture shader stage is not consistent, it operates as if
2748     it is the NONE operation.
2749
2750     3.8.13.1.19  Dot Product Constant Eye Reflect Cube Map
2751
2752     The DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV texture shader
2753     operation operates the same as the DOT_PRODUCT_REFLECT_CUBE_MAP_NV
2754     operation except that the eye vector E is equal to the three
2755     floating-point values assigned to the texture shader's eye
2756     constant (rather than the three q components of the given texture
2757     unit and the previous two texture units).
2758
2759     The DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV operation
2760     has the same texture shader consistency rules as the
2761     DOT_PRODUCT_REFLECT_CUBE_MAP_NV operation.
2762
2763     3.8.13.1.20  Dot Product Diffuse Cube Map
2764
2765     The DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV texture shader operation
2766     accesses the texture unit's cube map texture object (as described
2767     in the ARB_texture_cube_map specification) using (dotP,dotC,dotN)
2768     for the 3D texture coordinates.  The result of the texture access
2769     becomes both the shader result and texture unit RGBA result (see
2770     table 3.E).  The type of the shader result depends on the format
2771     type of the accessed texture.
2772
2773     Assuming that i is the current texture shader stage, dotP is the
2774     floating-point dot product texture shader result from the i-1 texture
2775     shader stage, assuming the i-1 texture shader stage's operation
2776     is DOT_PRODUCT_NV.  dotC is the floating-point dot product result
2777     from the current texture shader stage.  dotC is computed in the
2778     identical manner used to compute the floating-point result of the
2779     DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14.
2780     dotN is the floating-point dot product texture shader result from
2781     the i+1 texture shader stage, assuming the next texture shader
2782     stage's operation is either DOT_PRODUCT_REFLECT_CUBE_MAP_NV or
2783     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.
2784
2785     If the texture unit's cube map texture object is not consistent,
2786     then this operation operates as if it is the NONE operation.
2787     If the previous texture unit's texture shader operation is
2788     not DOT_PRODUCT_NV, then this operation operates as if it
2789     is the NONE operation.  If the next texture unit's texture
2790     shader operation is neither DOT_PRODUCT_REFLECT_CUBE_MAP_NV nor
2791     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, then this operation
2792     operates as if it is the NONE operation.  If the next texture unit's
2793     texture shader operation is either DOT_PRODUCT_REFLECT_CUBE_MAP_NV
2794     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, but the next texture
2795     unit operation is operating as if it is the NONE operation, then
2796     this operation operates as if it is the NONE operation.  If the
2797     specified previous input texture unit is inconsistent or uses
2798     the DOT_PRODUCT_NV texture shader operation, then this operation
2799     operates as if it is the NONE operation.
2800
2801     If the previous texture input texture object specified by the
2802     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2803     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2804     base internal format does not count as an RGBA format type in this
2805     context), then this texture shader stage is not consistent.
2806
2807     If the previous texture input texture shader operation specified by
2808     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2809     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2810
2811     If the previous texture input texture shader result specified by
2812     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2813     is invalid, then this texture shader stage is not consistent.
2814
2815     If the previous texture input shader stage specified by the current
2816     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2817     consistent, then this texture shader stage is not consistent.
2818
2819     If the i-1 texture shader stage operation is not
2820     DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2821
2822     If the i+1 texture shader stage operation
2823     is not DOT_PRODUCT_REFLECT_CUBE_MAP_NV or
2824     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, then this texture shader
2825     stage is not consistent.
2826
2827     If either the i-1 or i+1 texture shader stage is not consistent,
2828     then this texture shader stage is not consistent.
2829
2830     If the texture unit's cube map texture object is not consistent,
2831     then this texture shader stage is not consistent.
2832
2833     If this texture shader stage is not consistent, it operates as if
2834     it is the NONE operation.
2835
2836     3.8.13.1.21  Dot Product Depth Replace
2837
2838     The DOT_PRODUCT_DEPTH_REPLACE_NV texture shader operation replaces
2839     the incoming fragments depth (in window coordinates, after polygon
2840     offset and before conversion to fixed-point, i.e. in the [0,1]
2841     range) with a new depth value.  The new depth is computed as follows:
2842
2843       depth = dotP / dotC
2844
2845     Assuming that i is the current texture shader stage, dotP is the
2846     floating-point dot product texture shader result from the i-1 texture
2847     shader stage, assuming the i-1 texture shader stage's operation
2848     is DOT_PRODUCT_NV.  dotC is the floating-point dot product result
2849     from the current texture shader stage.  dotC is computed in the
2850     identical manner used to compute the floating-point result of the
2851     DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14.
2852
2853     If the new depth value is outside of the range of the near and far
2854     depth range values, the fragment is rejected.
2855
2856     The texture unit RGBA result generated is always (0,0,0,0).
2857     The texture shader result is invalid.
2858
2859     If the previous texture input texture object specified by the
2860     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
2861     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
2862     base internal format does not count as an RGBA format type in this
2863     context), then this texture shader stage is not consistent.
2864
2865     If the previous texture input texture shader operation specified by
2866     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2867     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
2868
2869     If the previous texture input texture shader result specified by
2870     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
2871     is invalid, then this texture shader stage is not consistent.
2872
2873     If the previous texture input shader stage specified by the current
2874     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
2875     consistent, then this texture shader stage is not consistent.
2876
2877     If the i-1 texture shader stage operation is not DOT_PRODUCT_NV,
2878     then this texture shader stage is not consistent.
2879
2880     If the i-1 texture shader stage is not consistent, then
2881     this texture shader stage is not consistent.
2882
2883     If any previous texture shader stage operation is
2884     DOT_PRODUCT_DEPTH_REPLACE_NV and that previous stage is consistent,
2885     then this texture shader stage is not consistent.  (This eliminates
2886     the potential for two stages to each be performing a depth replace
2887     operation.)
2888
2889     If this texture shader stage is not consistent, it operates as if
2890     it is the NONE operation.
2891
2892     This operation in no way depends on any of the texture unit's
2893     texture objects.
2894
2895     3.8.13.2  Texture Shader Restrictions
2896
2897     There are various restrictions on possible texture shader
2898     configurations.  These restrictions are described in this section.
2899
2900     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
2901     parameter for texture unit 0 is assigned one of OFFSET_TEXTURE_2D_NV,
2902     OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV,
2903     OFFSET_TEXTURE_RECTANGLE_SCALE_NV, DEPENDENT_AR_TEXTURE_2D_NV,
2904     DEPENDENT_GB_TEXTURE_2D_NV, DOT_PRODUCT_NV,
2905     DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV,
2906     DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
2907     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
2908     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.  Each of these
2909     texture shaders requires a previous texture shader result that
2910     is not possible for texture unit 0.  Therefore these shaders are
2911     disallowed for texture unit 0.
2912
2913     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
2914     parameter for texture unit 1 is assigned one of
2915     DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV,
2916     DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
2917     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
2918     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.  Each of these texture
2919     shaders requires either two previous texture shader results or
2920     a dot product result that cannot be generated by texture unit 0.
2921     Therefore these shaders are disallowed for texture unit 1.
2922
2923     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
2924     parameter for texture unit 2 is assigned one of
2925     DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
2926     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.  Each of these texture
2927     shaders requires three previous texture shader results.  Therefore
2928     these shaders are disallowed for texture unit 2.
2929
2930     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
2931     parameter for texture unit n-1 (where n is the number of
2932     supported texture units) is assigned either DOT_PRODUCT_NV or
2933     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV.  DOT_PRODUCT_NV is invalid for the
2934     final texture shader stage because it is only useful as an input to
2935     a successive texture shader stage.  DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV
2936     is invalid for the final texture shader stage because it must be
2937     followed by the DOT_PRODUCT_REFLECT_CUBE_MAP_NV operation in the
2938     immediately successive stage.  Therefore these shaders are disallowed
2939     for texture unit n-1.
2940
2941     3.8.13.3  Required State
2942
2943     The state required for texture shaders consists of a single bit to
2944     indicate whether or not texture shaders are enabled, a vector of
2945     three floating-point values for the constant eye vector, and n sets
2946     of per-texture unit state where n is the implementation-dependent
2947     number of supported texture units.  The set of per-texture unit
2948     texture shader state consists of the twenty-one-valued integer
2949     indicating the texture shader operation, four two-valued integers
2950     indicating the cull modes, an integer indicating the previous texture
2951     unit input, a two-valued integer indicating the RGBA unsigned dot
2952     product mapping mode, a 2x2 floating-point matrix indicating the
2953     texture offset transform, a floating-point value indicating the
2954     texture offset scale, a floating-point value indicating the texture
2955     offset bias, and a bit to indicate whether or not the texture shader
2956     stage is consistent.
2957
2958     In the initial state, the texture shaders state is set as follows:
2959     the texture shaders enable is disabled; the constant eye vector
2960     is (0,0,-1); all the texture shader operations are NONE; the RGBA
2961     unsigned dot product mapping mode is UNSIGNED_IDENTITY_NV; all the
2962     cull mode values are GEQUAL; all the previous texture units are
2963     TEXTURE0_ARB; each texture offset matrix is an identity matrix;
2964     all texture offset scales are 1.0; and all texture offset biases
2965     are 0.0."
2966
2967Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
2968and the Frame Buffer)
2969
2970     None
2971
2972Additions to Chapter 5 of the 1.2 Specification (Special Functions)
2973
2974     None
2975
2976Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
2977
2978 --  Section 6.1.3 "Texture Environments and Texture Functions"
2979
2980     Change the third sentence of the third paragraph to read:
2981
2982     "The env argument to GetTexEnv must be one of TEXTURE_ENV,
2983     TEXTURE_FILTER_CONTROL_EXT, or TEXTURE_SHADER_NV."
2984
2985     Add to the end of the third paragraph:
2986
2987     "For GetTexEnv, when the target is TEXTURE_SHADER_NV, the texture
2988     shader stage consistency can be queried with SHADER_CONSISTENT_NV."
2989
2990     Change the following sentence in the fouth paragraph to include
2991     sizes for the newly introduced component:
2992
2993     "Queries of TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE,
2994     TEXTURE_ALPHA_SIZE, TEXTURE_LUMINANCE_SIZE, TEXTURE_DS_SIZE_EXT,
2995     TEXTURE_DT_SIZE_EXT, TEXTURE_HI_SIZE_EXT, TEXTURE_LO_SIZE_EXT,
2996     TEXTURE_MAG_SIZE_EXT, and TEXTURE_INTENSITY_SIZE return the actual
2997     resolutions of the stored image array components, not the resolutions
2998     specified when the image array was defined."
2999
3000     Add the following to the end of the fourth paragraph:
3001
3002     "Queries of TEXTURE_BORDER_COLOR return the same values as the
3003     TEXTURE_BORDER_VALUES query."
3004
3005 --  Section 6.1.4 "Texture Queries"
3006
3007      Add the following to the end of the fourth paragraph:
3008
3009      "Calling GetTexImage with a color format (one of RED, GREEN,
3010      BLUE, ALPHA, RGB, RGBA, BGR, BGRA, LUMINANCE, or LUMINANCE_ALPHA)
3011      when the texture image is of a format type (see table 3.15)
3012      other than RGBA (the DSDT_MAG_INTENSITY_NV base internal format
3013      does not count as an RGBA format type in this context) causes the
3014      error INVALID_OPERATION.  Calling GetTexImage with a format of
3015      HILO_NV when the texture image is of a format type (see table
3016      3.15) other than HILO_NV causes the error INVALID_OPERATION.
3017      Calling GetTexImage with a format of DSDT_NV when the texture image
3018      is of a base internal format other than DSDT_NV causes the error
3019      INVALID_OPERATION.  Calling GetTexImage with a format of DSDT_MAG_NV
3020      when the texture image is of a base internal format other than
3021      DSDT_MAG_NV causes the error INVALID_OPERATION.  Calling GetTexImage
3022      with a format of DSDT_MAG_VIB_NV when the texture image is of a
3023      base internal format other than DSDT_MAG_INTENSITY_NV causes the
3024      error INVALID_OPERATION."
3025
3026Additions to the GLX Specification
3027
3028     None
3029
3030Dependencies on ARB_texture_env_add or EXT_texture_env_add
3031
3032     If neither ARB_texture_env_add nor EXT_texture_env_add are
3033     implemented, then the references to ADD are invalid and should be
3034     ignored.
3035
3036Dependencies on ARB_texture_env_combine or EXT_texture_env_combine
3037
3038     If neither ARB_texture_env_combine nor EXT_texture_env_combine are
3039     implemented, then the references to COMBINE_ARB and COMBINE_EXT
3040     are invalid and should be ignored.
3041
3042Dependencies on EXT_texture_lod_bias
3043
3044     If EXT_texture_lod_bias is not implemented, then the references to
3045     TEXTURE_FILTER_CONTROL_EXT are invalid and should be ignored.
3046
3047Dependencies on NV_texture_env_combine4
3048
3049     If NV_texture_env_combine4 is not implemented, then the references
3050     to COMBINE4_NV are invalid and should be ignored.
3051
3052Dependencies on NV_texture_rectangle
3053
3054     If NV_texture_rectangle is not implemented, then the references
3055     to TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_NV,
3056     OFFSET_TEXTURE_RECTANGLE_SCALE_NV, and
3057     DOT_PRODUCT_TEXTURE_RECTANGLE_NV are invalid and should be ignored.
3058
3059Dependencies on ARB_color_buffer_float
3060
3061     If ARB_color_buffer_float is also implemented, then the "max(0,x)",
3062     "max(-1,x)" and "min(1,x)" functions for clamping in tables 3.18
3063     and 3.19 simply return "x" without applying the maximum or minimum
3064     function when CLAMP_FRAGMENT_COLOR_ARB is either FIXED_ONLY_ARB
3065     when rendering to a floating-point color framebuffer or FALSE.
3066
3067     However clamping operations for texture shader operations
3068     (specifically PASS_THROUGH_NV and OFFSET_TEXTURE_2D_SCALE_NV)
3069     are performed independent of the CLAMP_FRAGMENT_COLOR_ARB state.
3070
3071     The intent of these interactions is to eliminate the specified
3072     clamping behavior of texture environment functions when
3073     CLAMP_FRAGMENT_COLOR_ARB indicates clamping should not be performed.
3074
3075Errors
3076
3077     INVALID_ENUM is generated if one of HILO_NV, DSDT_NV, DSDT_MAG_NV,
3078     or DSDT_MAG_VIBRANCE_NV is used as the format for DrawPixels,
3079     ReadPixels, ColorTable, ColorSubTable, ConvolutionFilter1D,
3080     ConvolutionFilter2D, SeparableFilter2D, GetColorTable,
3081     GetConvolutionFilter, GetSeparableFilter, GetHistogram, or
3082     GetMinmax.
3083
3084     INVALID_ENUM is generated if either UNSIGNED_INT_S8_S8_8_8_NV or
3085     UNSIGNED_INT_8_8_S8_S8_REV is used as the type for DrawPixels,
3086     ReadPixels, ColorTable, ColorSubTable, ConvolutionFilter1D,
3087     ConvolutionFilter2D, SeparableFilter2D, GetColorTable,
3088     GetConvolutionFilter, GetSeparableFilter, GetHistogram, or
3089     GetMinmax.
3090
3091     INVALID_OPERATION is generated if a packed pixel format type listed
3092     in table 3.8 is used with DrawPixels, ReadPixels, ColorTable,
3093     ColorSubTable, ConvolutionFilter1D, ConvolutionFilter2D,
3094     SeparableFilter2D, GetColorTable, GetConvolutionFilter,
3095     GetSeparableFilter, GetHistogram, GetMinmax, TexImage1D, TexImage2D,
3096     TexSubImage1D, TexSubImage2D, TexSubImage3d, or
3097     GetTexImage but the format parameter does not match on of the allowed
3098     Matching Pixel Formats listed in table 3.8 for the specified packed
3099     type parameter.
3100
3101     INVALID_OPERATION is generated when TexImage1D or TexImage2D are
3102     called and the format is HILO_NV and the internalformat is not
3103     one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV; or if
3104     the internalformat is one of HILO_NV, HILO16_NV, SIGNED_HILO_NV,
3105     or SIGNED_HILO16_NV and the format is not HILO_NV.
3106
3107     INVALID_OPERATION is generated when TexImage2D, or TexImage1D is
3108     called and if the format is DSDT_NV and the internalformat is not
3109     either DSDT_NV or DSDT8_NV; or if the internal format is either
3110     DSDT_NV or DSDT8_NV and the format is not DSDT_NV.
3111
3112     INVALID_OPERATION is generated when TexImage2D, or TexImage1D is
3113     called and if the format is DSDT_MAG_NV and the internalformat
3114     is not either DSDT_MAG_NV or DSDT8_MAG8_NV; or if the internal
3115     format is either DSDT_MAG_NV or DSDT8_MAG8_NV and the format is
3116     not DSDT_MAG_NV.
3117
3118     INVALID_OPERATION is generated when TexImage2D or TexImage1D is
3119     called and if the format is DSDT_MAG_VIB_NV and the internalformat
3120     is not either DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV;
3121     or if the internal format is either DSDT_MAG_INTENSITY_NV or
3122     DSDT8_MAG8_INTENSITY8_NV and the format is not DSDT_MAG_VIB_NV.
3123
3124     INVALID_OPERATION is generated when CopyTexImage2D, CopyTexImage1D,
3125     CopyTexSubImage2D, or CopyTexSubImage1D is called and the internal
3126     format of the texture array to which the pixels are to be copied
3127     is one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
3128     DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV,
3129     or DSDT8_MAG8_INTENSITY8_NV.
3130
3131     INVALID_OPERATION is generated when TexSubImage2D or
3132     TexSubImage1D is called and the texture array's base internal format
3133     is not one of HILO_NV, DSDT_NV, DSDT_MAG_NV, or DSDT_INTENSITY_NV,
3134     and the format parameter is not one of COLOR_INDEX, RED,
3135     GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or
3136     LUMINANCE_ALPHA
3137
3138     INVALID_OPERATION is generated when TexSubImage2D or
3139     TexSubImage1D is called and the texture array's base internal format
3140     is HILO_NV and the format parameter is not HILO_NV.
3141
3142     INVALID_OPERATION is generated when TexSubImage2D or
3143     TexSubImage1D is called and the texture array's base internal format
3144     is DSDT_NV and the format parameter is not DSDT_NV.
3145
3146     INVALID_OPERATION is generated when TexSubImage2D or
3147     TexSubImage1D is called and the texture array's base internal format
3148     is DSDT_MAG_NV and the format parameter is not DSDT_MAG_NV.
3149
3150     INVALID_OPERATION is generated when TexSubImage2D
3151     or TexSubImage1D is called and the texture array's base internal
3152     format is DSDT_MAG_INTENSITY_NV and the format parameter is not
3153     DSDT_MAG_VIRBANCE_NV.
3154
3155     INVALID_OPERATION is generated when TexEnv is called and the
3156     PREVIOUS_TEXTURE_INPUT_NV parameter for texture unit i is assigned
3157     the value TEXTUREi_ARB where f i is greater than or equal to the
3158     current active texture unit.
3159
3160     INVALID_OPERATION is generated when TexEnv is called and the
3161     SHADER_OPERATION_NV parameter for texture unit 0 is assigned
3162     one of OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
3163     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
3164     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
3165     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
3166     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
3167     DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
3168     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV.
3169     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.
3170
3171     INVALID_OPERATION is generated when TexEnv is called
3172     and the SHADER_OPERATION_NV parameter for texture
3173     unit 1 is assigned one of DOT_PRODUCT_DEPTH_REPLACE_NV,
3174     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
3175     DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
3176     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
3177     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.
3178
3179     INVALID_OPERATION is generated when TexEnv is called
3180     and the SHADER_OPERATION_NV parameter for texture
3181     unit 2 is assigned one of
3182     DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
3183     or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV.
3184
3185     INVALID_OPERATION is generated when TexEnv is called and the
3186     SHADER_OPERATION_NV parameter for texture unit n-1 (where n is the
3187     number of supported texture units) is assigned either DOT_PRODUCT_NV
3188     or DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV.
3189
3190     INVALID_OPERATION is generated when GetTexImage is called with a
3191     color format (one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, BGR, BGRA,
3192     LUMINANCE, or LUMINANCE_ALPHA) when the texture image is of a format
3193     type (see table 3.15) other than RGBA (the DSDT_MAG_INTENSITY_NV
3194     base internal format does not count as an RGBA format type in this
3195     context).
3196
3197     INVALID_OPERATION is generated when GetTexImage is called with a
3198     format of HILO_NV when the texture image is of a format type (see
3199     table 3.15) other than HILO_NV.
3200
3201     INVALID_OPERATION is generated when GetTexImage is called with a
3202     format of DSDT_NV when the texture image is of a base internal
3203     format other than DSDT_NV.
3204
3205     INVALID_OPERATION is generated when GetTexImage is called with a
3206     format of DSDT_MAG_NV when the texture image is of a base internal
3207     format other than DSDT_MAG_NV.
3208
3209     INVALID_OPERATION is generated when GetTexImage is called with a
3210     format of DSDT_MAG_VIBRANCE_NV when the texture image is of a base
3211     internal format other than DSDT_MAG_INTENSITY_NV causes the error
3212     INVALID_OPERATION."
3213
3214New State
3215
3216Add the following entries to table 6.12:
3217
3218Get Value             Type    Get Command           Initial Value  Description            Sec  Attribute
3219--------------------  ------  --------------------  -------------  ---------------------  ---  ---------
3220TEXTURE_HI_SIZE_NV    nxZ+    GetTexLevelParameter  0              xD texture image i's   3.8  texture
3221                                                                   hi resolution
3222TEXTURE_LO_SIZE_NV    nxZ+    GetTexLevelParameter  0              xD texture image i's   3.8  texture
3223                                                                   lo resolution
3224TEXTURE_DS_SIZE_NV    nxZ+    GetTexLevelParameter  0              xD texture image i's   3.8  texture
3225                                                                   ds resolution
3226TEXTURE_DT_SIZE_NV    nxZ+    GetTexLevelParameter  0              xD texture image i's   3.8  texture
3227                                                                   dt resolution
3228TEXTURE_MAG_SIZE_NV   nxZ+    GetTexLevelParameter  0              xD texture image i's   3.8  texture
3229                                                                   mag resolution
3230
3231Change the TEXTURE_BORDER_COLOR line in table 6.13 to read:
3232
3233Get Value                 Type    Get Command      Initial Value  Description            Sec  Attribute
3234------------------------  ------  ---------------  -------------  ---------------------  ---  ---------
3235TEXTURE_BORDER_VALUES_NV  4xR     GetTexParameter  (0,0,0,0)      Texture border values  3.8  texture
3236(TEXTURE_BORDER_COLOR)
3237
3238Table 6.TextureShaders.  Texture Shaders.
3239
3240Get Value                    Type    Get Command  Initial Value         Description          Sec     Attribute
3241---------------------------  ------  -----------  --------------------  -------------------  ------  --------------
3242HI_BIAS_NV                   R       GetFloatv    0.0                   Hi bias for HILO     3.6.3   pixel
3243LO_BIAS_NV                   R       GetFloatv    0.0                   Lo bias for HILO     3.6.3   pixel
3244DS_BIAS_NV                   R       GetFloatv    0.0                   Ds bias              3.6.3   pixel
3245DT_BIAS_NV                   R       GetFloatv    0.0                   Dt bias              3.6.3   pixel
3246MAGNITUDE_BIAS_NV            R       GetFloatv    0.0                   Magnitude bias       3.6.3   pixel
3247VIBRANCE_BIAS_NV             R       GetFloatv    0.0                   Vibrance bias        3.6.3   pixel
3248HI_SCALE_NV                  R       GetFloatv    1.0                   Hi scale             3.6.3   pixel
3249LO_SCALE_NV                  R       GetFloatv    1.0                   Lo scale             3.6.3   pixel
3250DS_SCALE_NV                  R       GetFloatv    1.0                   Ds scale             3.6.3   pixel
3251DT_SCALE_NV                  R       GetFloatv    1.0                   Dt scale             3.6.3   pixel
3252MAGNITUDE_SCALE_NV           R       GetFloatv    1.0                   Magnitude scale      3.6.3   pixel
3253VIBRANCE_SCALE_NV            R       GetFloatv    1.0                   Vibrance scale       3.6.3   pixel
3254
3255TEXTURE_SHADER_NV            B       IsEnabled    False                 Texture shaders      3.8     texture/enable
3256                                                                        enable
3257
3258SHADER_OPERATION_NV          TxZ21   GetTexEnviv  NONE                  Texture shader       3.8.13  texture
3259                                                                        operation
3260CULL_MODES_NV                Tx4xZ2  GetTexEnviv  GEQUAL,GEQUAL,        Texture shader       3.8.13  texture
3261                                                  GEQUAL,GEQUAL         cull fragment modes
3262RGBA_UNSIGNED_-              TxZ2    GetTexEnviv  UNSIGNED_IDENTITY_NV  Texture shader RGBA  3.8.13  texture
3263  DOT_PRODUCT_MAPPING_NV                                                dot product mapping
3264PREVIOUS_TEXTURE_INPUT_NV    TxZn    GetTexEnviv  TEXTURE0_ARB          Texture shader       3.8.13  texture
3265                                                                        previous tex input
3266CONST_EYE_NV                 TxRx3   GetTexEnvfv  (0,0,-1)              Shader constant      3.8.13  texture
3267                                                                        eye vector
3268OFFSET_TEXTURE_MATRIX_NV     TxM2    GetTexEnvfv  (1,0,0,1)             2x2 texture offset   3.8.13  texture
3269                                                                        matrix
3270OFFSET_TEXTURE_SCALE_NV      TxR     GetTexEnvfv  1                     Texture offset       3.8.13  texture
3271                                                                        scale
3272OFFSET_TEXTURE_BIAS_NV       TxR     GetTexEnvfv  0                     Texture offset       3.8.13  texture
3273                                                                        bias
3274SHADER_CONSISTENT_NV         TxB     GetTexEnviv  True                  Texture shader       3.8.13  texture
3275                                                                        stage consistency
3276
3277[ The "Tx" type prefix means that the state is per-texture unit. ]
3278
3279[ The "Zn" type is an n-valued integer where n is the
3280  implementation-dependent number of texture units supported.]
3281
3282New Implementation State
3283
3284     None
3285
3286Revision History
3287
3288     March 29, 2001 - document that using signed HILO with a dot product
3289     shader forces the square root to zero if the 1.0-HI*HI-LO*LO value
3290     is negative.
3291
3292     November 15, 2001 - document that depth replace is after polygon
3293     offset; add polygon offset issue and multisample issue.
3294
3295     November 26, 2001 - Properly document the various TEXTURE_*_SIZE_NV
3296     texture resolution query tokens.  Add table 6.12 entries.
3297
3298     June 5, 2002 - Driver implementations before this date
3299     incorrectly swap the HI and LO components when specifying
3300     GL_TEXTURE_BORDER_VALUES_NV when rendering via hardware.  Drivers
3301     after this date have fixed the problem and match the specified
3302     behavior.
3303
3304     July 2, 2003 - CULL_MODES_NV, OFFSET_TEXTURE_MATRIX_NV,
3305     OFFSET_TEXTURE_2D_MATRIX_NV, and CONST_EYE_NV should not be specified
3306     to work with glTexEnvi & glTexEnvf (they can only be used with
3307     glTexEnviv & glTexEnvfv).
3308
3309     October 19, 2006 - Add interaction with ARB_color_buffer_float to
3310     document how ths extension behaves when ARB_color_buffer_float is
3311     also supported and when its CLAMP_FRAGMENT_COLOR_ARB state is either
3312     FIXED_ONLY_ARB when rendering to a floating-point color framebuffer
3313     or FALSE.
3314
3315     March 13, 2007 - Fix OFFSET_TEXTURE_2D_SCALE_NV operation to clamp
3316     the scale factor to [0,1] before multiplying it by red, green,
3317     and blue to match the hardware's actual behavior.
3318