• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NV_texture_shader3
4
5Name Strings
6
7    GL_NV_texture_shader3
8
9Contact
10
11    Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com)
12
13Notice
14
15    Copyright NVIDIA Corporation, 2001.
16
17IP Status
18
19    NVIDIA Proprietary.
20
21Version
22
23    NVIDIA Date:  March 5, 2007
24    Version:      11
25
26Number
27
28    265
29
30Dependencies
31
32    Written based on the wording of the OpenGL 1.2.1 specification,
33    augmented by the NV_texture_shader and NV_texture_shader2 extension
34    specifications.
35
36    Requires support for the NV_texture_shader extension.
37
38    Requires support for the NV_texture_shader2 extension.
39
40Overview
41
42    NV_texture_shader3 extends the NV_texture_shader functionality by
43    adding several new texture shader operations, extending several
44    existing texture shader operations, adding a new HILO8 internal
45    format, and adding new and more flexible re-mapping modes for dot
46    product and dependent texture shader operations.
47
48    See the NV_texture_shader extension for information about the
49    texture shader operational model.
50
51    The fourteen new texture shader operations are:
52
53    <offset textures>
54
55    24.  OFFSET_PROJECTIVE_TEXTURE_2D_NV - Transforms the signed (ds,dt)
56         components of a previous texture unit by a 2x2 floating-point
57         matrix and then uses the result to offset the stage's texture
58         coordinates for a 2D non-projective texture.
59
60    25.  OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV - Same as above except
61         the magnitude component of the previous texture unit result
62         scales the red, green, and blue components of the unsigned RGBA
63         texture 2D access.
64
65    26.  OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV - Similar to
66         OFFSET_TEXTURE_2D_NV except that the texture access is into a
67         rectangular non-projective texture.
68
69    27.  OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV - Similar to
70         OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV except that the texture
71         access is into a rectangular non-projective texture.
72
73    28.  OFFSET_HILO_TEXTURE_2D_NV - Similar to OFFSET_TEXTURE_2D_NV
74         but uses a (higher-precision) HILO base format texture rather
75         than a DSDT-type base format.
76
77    29.  OFFSET_HILO_TEXTURE_RECTANGLE_NV - Similar to
78         OFFSET_TEXTURE_RECTANGLE_NV but uses a (higher-precision)
79         HILO base format texture rather than a DSDT-type base format.
80
81    30.  OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV - Similar to
82         OFFSET_PROJECTIVE_TEXTURE_2D_NV but uses a (higher-precision)
83         HILO base format texture rather than a DSDT-type base format.
84
85    31.  OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV - Similar to
86         OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV but uses a
87         (higher-precision) HILO base format texture rather than a
88         DSDT-type base format.
89
90         (There are no "offset HILO texture scale" operations because
91         HILO textures have only two components with no third component
92         for scaling.)
93
94    <dependent textures>
95
96    32.  DEPENDENT_HILO_TEXTURE_2D_NV - Converts the hi and lo components
97         of a previous shader HILO result into an (s,t) texture coordinate
98         set to access a 2D non-projective texture.
99
100    33.  DEPENDENT_RGB_TEXTURE_3D_NV - Converts the red, green, and
101         blue components of a previous shader RGBA result into an (s,t,r)
102         texture coordinate set to access a 3D non-projective texture.
103
104    34.  DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV - Converts the red, green,
105         and blue components of a previous shader RGBA result into an
106         (s,t,r) texture coordinate set to access a cube map texture.
107
108    <dot product pass through>
109
110    35.  DOT_PRODUCT_PASS_THROUGH_NV - Computes a dot product in the
111         manner of the DOT_PRODUCT_NV operation and the result is [0,1]
112         clamped and smeared to generate the texture unit RGBA result.
113
114    <dot product textures>
115
116    36.  DOT_PRODUCT_TEXTURE_1D_NV - Computes a dot product in the manner
117         of the DOT_PRODUCT_NV operation and uses the result as the s
118         texture coordinate to access a 2D non-projective texture.
119
120    <dot product depth replace>
121
122    37.  DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV - Computes a dot product
123         in the manner of the DOT_PRODUCT_NV operation and the result
124         is [0,1] clamped and replaces the fragment's window-space
125         depth value.  The texture unit RGBA result is (0,0,0,0).
126
127    Two new internal texture formats have been added: HILO8_NV and
128    SIGNED_HILO8_NV.  These texture formats allow HILO textures to be
129    stored in half the space; still the filtering for these internal
130    texture formats is done with 16-bit precision.
131
132    One new unsigned RGBA dot product mapping mode (FORCE_BLUE_TO_ONE_NV)
133    forces the blue component to be 1.0 before computing a dot product.
134
135Issues
136
137    Should a HILO8_NV internal format be added?
138
139      RESOLUTION:  Yes.  The HILO8_NV format allows HILO textures to
140      take up half the space (16-bit HILO8_NV versus 32-bit HILO16_NV).
141      Even though the texture is stored with 8-bit components, the
142      interpolated precision can be assumed to be 16-bit.
143
144    Should we generalize existing OFFSET_TEXTURE-style operations to
145    support HILO textures and projective texturing, or should we just
146    add more texture shader operations?
147
148      RESOLUTION:  Add more texture shader operations for each distinct
149      configuration.
150
151      NV_texture_shader had consistency rules for OFFSET_TEXTURE
152      operations that preclude consistency when used with HILO textures.
153      Consistency is a defined behavior that should stay defined even with
154      future extensions.  Adding specific new texture shader operation
155      for HILO textures avoids having to redefine the consistency rules
156      for DSDT-using OFFSET_TEXTURE operations.
157
158      Rather than add a separate state that decides when OFFSET_TEXTURE
159      is projective or not, we just add new operations.
160
161New Procedures and Functions
162
163    None.
164
165New Tokens
166
167    When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
168    TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
169    respectively, then the value of <param> or the value pointed to by
170    <params> may be:
171
172        OFFSET_PROJECTIVE_TEXTURE_2D_NV                0x8850
173        OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV          0x8851
174        OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV         0x8852
175        OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV   0x8853
176        OFFSET_HILO_TEXTURE_2D_NV                      0x8854
177        OFFSET_HILO_TEXTURE_RECTANGLE_NV               0x8855
178        OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV           0x8856
179        OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV    0x8857
180        DEPENDENT_HILO_TEXTURE_2D_NV                   0x8858
181        DEPENDENT_RGB_TEXTURE_3D_NV                    0x8859
182        DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV              0x885A
183        DOT_PRODUCT_PASS_THROUGH_NV                    0x885B
184        DOT_PRODUCT_TEXTURE_1D_NV                      0x885C
185        DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV            0x885D
186
187    Accepted by the <internalformat> parameter of TexImage1D, TexImage2D,
188    and TexImage3D:
189
190        HILO8_NV                                       0x885E
191        SIGNED_HILO8_NV                                0x885F
192
193    When the <target> and <pname> parameters of TexEnvf,
194    TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and
195    RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV respectively, then the value
196    of <param> or the value pointed to by <params> may be:
197
198        FORCE_BLUE_TO_ONE_NV                           0x8860
199
200Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
201
202     None
203
204Additions to Chapter 3 of the 1.2 Specification (Rasterization)
205
206 --  Section 3.8 "Texturing"
207
208     Replace the third paragraph (amended by the NV_texture_shader
209     extension) with the following that includes new texture shader
210     references:
211
212     "The alternative to conventional texturing is the texture shaders
213     mechanism.  When texture shaders are enabled, each texture unit uses
214     one of thirty-seven texture shader operations.  Thirty-three of the
215     thirty-seven shader operations map an (s,t,r,q) texture coordinate
216     set to an RGBA color.  Of these, four texture shader operations
217     directly correspond to the 1D, 2D, 3D, and cube map conventional
218     texturing operations.  Depending on the texture shader operation, the
219     mapping from the (s,t,r,q) texture coordinate set to an RGBA color
220     may depend on the given texture unit's currently bound texture object
221     state and/or the results of previous texture shader operations.
222     The four remaining texture shader operations respectively provide
223     a fragment culling mechanism based on texture coordinates, a dot
224     product operation that computes a floating-point value for use by
225     subsequent texture shaders.  and two means to replace the fragment
226     depth value, The specifics of each texture shader operation are
227     described in section 3.8.12."
228
229 --  Section 3.8.1 "Texture Image Specification"
230
231     Add two more rows to table 3.16:
232
233Sized                          Base                  R    G    B    A    L    I    HI   LO   DS   DT   MAG
234Internal Format                Internal Format       bits bits bits bits bits bits bits bits bits bits bits
235------------------------------ --------------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
236HILO8_NV                       HILO                                                8    8
237SIGNED_HILO8_NV                HILO                                                8*   8*
238
239     Update this paragraph inserted by NV_texture_shader before the last
240     sentence in the fifth paragraph to read:
241
242     "The error INVALID_OPERATION is generated if the format is
243     HILO_NV and the internalformat is not one of HILO_NV, HILO16_NV,
244     HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, SIGNED_HILO8_NV;
245     or if the internalformat is one of HILO_NV, HILO16_NV, HILO8_NV,
246     SIGNED_HILO_NV, SIGNED_HILO16_NV, or SIGNED_HILO8_NV and the format
247     is not HILO_NV.
248
249 --  Section 3.8.2 "Alternate Texture Image Specification Commands"
250
251     In the second paragraph (describing CopyTexImage2D), change the
252     third to the last sentence (previously amended by NV_texture_shader) to:
253
254     "Parameters level, internalformat, and border are specified using the
255     same values, with the same meanings, as the equivalent arguments of
256     TexImage2D, except that internalformat may not be specified as 1, 2,
257     3, 4, HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
258     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
259     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
260
261     In the third paragraph (describing CopyTexImage1D), change the second
262     to the last sentence (previously amended by NV_texture_shader) to:
263
264     "level, internalformat, and border are specified using the same
265     values, with the same meanings, as the equivalent arguments of
266     TexImage1D, except that internalformat may not be specified as 1, 2,
267     3, 4, HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
268     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
269     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
270
271     Amend the following text inserted by NV_texture_shader after the
272     six paragraph to include the HILO8 and UNSIGNED_HILO8 internal
273     texture formats:
274
275     "CopyTexSubImage3D, CopyTexSubImage2D, and CopyTexSubImage1D
276     generate the error INVALID_OPERATION if the internal format of
277     the texture array to which the pixels are to be copied is one of
278     HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
279     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
280     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
281
282 --  Section 3.8.13 "Texture Shaders"
283
284     Amend the designated paragraphs of the NV_texture_shader
285     specification to include discussion of new texture shader
286     operations.
287
288     1st paragraph (update number of operations):
289
290     "Each texture unit is configured with one of thirty-seven
291     texture shader operations.  Several texture shader operations
292     require additional state.  All per-texture shader stage state
293     is specified using the TexEnv commands with the target specified
294     as TEXTURE_SHADER_NV.  The per-texture shader state is replicated
295     per texture unit so the texture unit selected by ActiveTextureARB
296     determines which texture unit's environment is modified by TexEnv
297     calls."
298
299     3rd paragraph (add fourteen new texture shader operations):
300
301     "When TexEnv is called with the target of TEXTURE_SHADER_NV,
302     SHADER_OPERATION_NV may be set to one of NONE, TEXTURE_1D,
303     TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_ARB, PASS_THROUGH_NV,
304     CULL_FRAGMENT_NV, OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
305     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
306     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
307     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
308     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
309     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
310     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
311     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
312     OFFSET_PROJECTIVE_TEXTURE_2D_NV,
313     OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV,
314     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV,
315     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV,
316     OFFSET_HILO_TEXTURE_2D_NV, OFFSET_HILO_TEXTURE_RECTANGLE_NV,
317     OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV,
318     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV,
319     DEPENDENT_HILO_TEXTURE_2D_NV, DEPENDENT_RGB_TEXTURE_3D_NV,
320     DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_PASS_THROUGH_NV,
321     DOT_PRODUCT_TEXTURE_1D_NV, or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV.
322     The semantics of each of these shader operations is described
323     in section 3.8.13.1.  Not every operation is supported in every
324     texture unit.  The restrictions for how these shader operations
325     can be configured in various texture units are described in section
326     3.8.13.2."
327
328     5th paragraph (add FORCE_BLUE_TO_ONE_NV):
329
330     "When TexEnv is called with the target of TEXTURE_SHADER_NV,
331     RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV may be set to one of
332     UNSIGNED_IDENTITY_NV, EXPAND_NORMAL_NV, or FORCE_BLUE_TO_ONE_NV.
333     This RGBA unsigned dot product mapping mode is used by the
334     DOT_PRODUCT_NV operation (see section 3.8.13.1.14) and other
335     operations that compute dot products."
336
337     3.8.13.1  Texture Shader Operations
338
339     Amend tables 3.A, 3.B, 3.C, and 3.D in the NV_texture_shader
340     specification to include these new entries:
341
342     Table 3.A:
343                                                                                                          texture shader
344texture shader operation i                    previous texture input     texture shader operation i-1     operation i-2     texture shader operation i+1
345============================================  =========================  ===============================  ================  ================================
346OFFSET_PROJECTIVE_TEXTURE_2D_NV               base internal texture      -                                -                 -
347                                               format must be one of
348                                               DSDT_NV, DSDT_MAG_NV, or
349                                               DSDT_MAG_INTENSITY_NV
350OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV         base internal texture      -                                -                 -
351                                               format must be either
352                                               DSDT_MAG_NV or
353                                               DSDT_MAG_INTENSITY_NV
354OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV        base internal texture      -                                -                 -
355                                               format must be one of
356                                               DSDT_NV, DSDT_MAG_NV, or
357                                               DSDT_MAG_INTENSITY_NV
358OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV  base internal texture      -                                -                 -
359                                               format must be either
360                                               DSDT_MAG_NV or
361                                               DSDT_MAG_INTENSITY_NV
362--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
363OFFSET_HILO_TEXTURE_2D_NV                     base internal texture      -                                -                 -
364                                               format must be HILO
365OFFSET_HILO_TEXTURE_RECTANGLE_NV              base internal texture      -                                -                 -
366                                               format must be HILO
367OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV          base internal texture      -                                -                 -
368                                               format must be HILO
369OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV   base internal texture      -                                -                 -
370                                               format must be HILO
371--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
372DEPENDENT_HILO_TEXTURE_2D_NV                  base internal texture      -                                -                 -
373                                               format must be HILO
374DEPENDENT_RGB_TEXTURE_3D_NV                   shader result type must    -                                -                 -
375                                               all be unsigned RGBA
376DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV             shader result type must    -                                -                 -
377                                               all be RGB or RGBA
378                                               (signed RGB components
379                                               are allowed)
380--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
381DOT_PRODUCT_PASS_THROUGH_NV                   shader result type must    -                                -                 -
382                                               be one of signed HILO,
383                                               unsigned HILO, all
384                                               signed RGBA, or all
385                                               unsigned RGBA
386--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
387DOT_PRODUCT_TEXTURE_1D_NV                     shader result type must    -                                -                 -
388                                               be one of signed HILO,
389                                               unsigned HILO, all
390                                               signed RGBA, or all
391                                               unsigned RGBA
392--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
393DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV           shader result type must    -                                -                 -
394                                               be one of signed HILO,
395                                               unsigned HILO, all
396                                               signed RGBA, or all
397                                               unsigned RGBA
398--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
399
400     Table 3.B:
401
402texture shader operation i                    texture unit i
403============================================  =======================================
404OFFSET_PROJECTIVE_TEXTURE_2D_NV               2D target must be consistent
405OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV         2D target must be consistent
406                                               and 2D texture target type must
407                                               be unsigned RGBA
408OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV        rectangle target must be consistent
409OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV  rectangle target must be consistent
410                                               and rectangle texture target type must
411                                               be unsigned RGBA
412--------------------------------------------  ---------------------------------------
413OFFSET_HILO_TEXTURE_2D_NV                     2D target must be consistent
414OFFSET_HILO_TEXTURE_RECTANGLE_NV              rectangle target must be consistent
415OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV          2D target must be consistent
416OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV   rectangle target must be consistent
417--------------------------------------------  ---------------------------------------
418DEPENDENT_HILO_TEXTURE_2D_NV                  2D target must be consistent
419DEPENDENT_RGB_TEXTURE_3D_NV                   3D target must be consistent
420DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV             cube map target must be consistent
421--------------------------------------------  ---------------------------------------
422DOT_PRODUCT_PASS_THROUGH_NV                   -
423--------------------------------------------  ---------------------------------------
424DOT_PRODUCT_TEXTURE_1D_NV                     1D target must be consistent
425--------------------------------------------  ---------------------------------------
426DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV           -
427--------------------------------------------  ---------------------------------------
428
429
430     Table 3.C:
431
432                                                            uses    uses    uses    uses             uses       offset    uses
433                                     texture                stage   stage   stage   previous  uses   offset     texture   const
434                                     coordinate  texture    result  result  result  texture   cull   texture    2D scale  eye
435texture shader operation i           set usage   target     i-1     i-2     i+1     input     modes  2D matrix  and bias  vector
436===================================  ==========  =========  ======  ======  ======  ========  =====  =========  ========  ======
437OFFSET_PROJECTIVE_TEXTURE_2D_NV      s,t,q       2D         -       -       -       y         -      y          -         -
438OFFSET_PROJECTIVE_-                  s,t,q       2D         -       -       -       y         -      y          y         -
439  TEXTURE_2D_SCALE_NV
440OFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          -         -
441  TEXTURE_RECTANGLE_NV
442OFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          y         -
443  TEXTURE_RECTANGLE_SCALE_NV
444-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
445OFFSET_HILO_TEXTURE_2D_NV            s,t         2D         -       -       -       y         -      y          -         -
446OFFSET_HILO_TEXTURE_RECTANGLE_NV     s,t         rectangle  -       -       -       y         -      y          -         -
447OFFSET_PROJECTIVE_-                  s,t,q       2D         -       -       -       y         -      y          -         -
448  HILO_TEXTURE_2D_NV
449OFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          -         -
450  HILO_TEXTURE_RECTANGLE_NV
451-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
452DEPENDENT_HILO_TEXTURE_2D_NV         -           2D         -       -       -       y         -      -          -         -
453DEPENDENT_RGB_TEXTURE_3D_NV          -           3D         -       -       -       y         -      -          -         -
454DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV    -           cube map   -       -       -       y         -      -          -         -
455-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
456DOT_PRODUCT_PASS_THROUGH_NV          s,t,r       -          -       -       -       y         -      -          -         -
457-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
458DOT_PRODUCT_TEXTURE_1D_NV            s,t,r       1D         -       -       -       y         -      -          -         -
459-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
460DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV  s,t,r       -          -       -       -       y         -      -          -         -
461-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
462
463     Table 3.D:
464
465texture shader operation i         shader stage result type       shader stage result                  texture unit RGBA color result
466=================================  =============================  ===================================  ======================================
467OFFSET_TEXTURE_2D_NV               matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
468                                                                                                        filtered 2D target texel,
469                                                                                                        else (0,0,0,0)
470OFFSET_TEXTURE_2D_SCALE_NV         unsigned RGBA                  filtered 2D target texel             scaled filtered 2D target texel
471OFFSET_TEXTURE_RECTANGLE_NV        matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
472                                                                                                        RGBA, filtered rectangle target
473                                                                                                        texel, else (0,0,0,0)
474OFFSET_TEXTURE_RECTANGLE_SCALE_NV  unsigned RGBA                  filtered rectangle target texel      scaled filtered rectangle target texel
475OFFSET_PROJECTIVE_TEXTURE_2D_NV    matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
476                                                                                                        filtered 2D target texel,
477                                                                                                        else (0,0,0,0)
478OFFSET_PROJECTIVE_-                unsigned RGBA                  filtered 2D target texel             scaled filtered 2D target texel
479  TEXTURE_2D_SCALE_NV
480OFFSET_PROJECTIVE_-                matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
481  TEXTURE_RECTANGLE_NV                                                                                  RGBA, filtered rectangle target
482                                                                                                        texel, else (0,0,0,0)
483OFFSET_PROJECTIVE_-                unsigned RGBA                  filtered rectangle target texel      scaled filtered rectangle target texel
484  TEXTURE_RECTANGLE_SCALE_NV
485---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
486DEPENDENT_HILO_TEXTURE_2D_NV       matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
487                                                                                                        filtered 2D target texel,
488                                                                                                        else (0,0,0,0)
489DEPENDENT_RGB_TEXTURE_3D_NV        matches 3D target type         filtered 3D target texel             if 3D target texture type is RGBA,
490                                                                                                        filtered 3D target texel,
491                                                                                                        else (0,0,0,0)
492DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV  matches cube map target type   filtered cube map target texel       if cube map target texture type is
493                                                                                                        RGBA,  filtered cube map target
494                                                                                                        texel, else (0,0,0,0)
495---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
496DOT_PRODUCT_PASS_THROUGH_NV        unsigned RGBA                  (max(0,min(1,[s,t,r]dot[a,b,c])),    (max(0,min(1,[s,t,r]dot[a,b,c])),
497                                                                   max(0,min(1,[s,t,r]dot[a,b,c])),     max(0,min(1,[s,t,r]dot[a,b,c])),
498                                                                   max(0,min(1,[s,t,r]dot[a,b,c])),     max(0,min(1,[s,t,r]dot[a,b,c])),
499                                                                   max(0,min(1,[s,t,r]dot[a,b,c])))     max(0,min(1,[s,t,r]dot[a,b,c])))
500---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
501DOT_PRODUCT_TEXTURE_1D_NV          matches 1D target type         filtered 1D target texel             if 1D target texture type is RGBA,
502                                                                                                        filtered 1D target texel,
503                                                                                                        else (0,0,0,0)
504---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
505DOT_PRODUCT_-                      unsigned RGBA                  invalid                              (0,0,0,0)
506  AFFINE_DEPTH_REPLACE_NV
507---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
508
509     3.8.13.1.14  Dot Product
510
511     Add this description of FORCE_BLUE_TO_ONE_NV after the description
512     of EXPAND_NORMAL_NV:
513
514     "When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is
515     FORCE_BLUE_TO_ONE_NV, then the floating-point result for unsigned
516     RGBA components is computed by
517
518       result = s * Rprev + t * Gprev + r
519
520     where Rprev and Gprev are the (unsigned) red and green components
521     respectively of the previous texture unit's RGBA texture shader
522     result (the previous blue component can be assumed forced to 1.0
523     for the purposes of the dot product computation)."
524
525     3.8.13.1.21  Dot Product Depth Replace
526
527     Amend the paragraph meant to avoid multiple depth replaces to read:
528
529     "If any previous texture shader stage operation is
530     DOT_PRODUCT_DEPTH_REPLACE_NV or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV
531     and that previous stage is consistent, then this texture shader
532     stage is not consistent.  (This eliminates the potential for two
533     stages to each be performing a depth replace operation.)"
534
535     Add the following new sections specifying new texture shader
536     operations:
537
538     Add the following new texture shader operation descriptions:
539
540     "3.8.13.1.24  Offset Projective Texture 2D
541
542     The OFFSET_PROJECTIVE_TEXTURE_2D_NV shader operation operates
543     identically to the OFFSET_TEXTURE_2D_NV shader operation except
544     that the perturbed texture coordinates s' and t' are computed with
545     floating-point math as follows:
546
547       s' = s/q + a1 * DSprev + a3 * DTprev
548       t' = t/q + a2 * DSprev + a4 * DTprev
549
550     Note the division of s and t by the current texture shader stage's
551     q texture coordinate.
552
553     3.8.13.1.25  Offset Projective Texture 2D Scale
554
555     The OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV shader operation operates
556     identically to the OFFSET_TEXTURE_2D_SCALE_NV shader operation except
557     that the perturbed texture coordinates s' and t' are computed with
558     floating-point math as follows:
559
560       s' = s/q + a1 * DSprev + a3 * DTprev
561       t' = t/q + a2 * DSprev + a4 * DTprev
562
563     Note the division of s and t by the current texture shader stage's
564     q texture coordinate.
565
566     3.8.13.1.26  Offset Projective Texture Rectangle
567
568     The OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV shader operation
569     operates identically to the OFFSET_TEXTURE_RECTANGLE_NV shader
570     operation except that the perturbed texture coordinates s' and t'
571     are computed with floating-point math as follows:
572
573       s' = s/q + a1 * DSprev + a3 * DTprev
574       t' = t/q + a2 * DSprev + a4 * DTprev
575
576     Note the division of s and t by the current texture shader stage's
577     q texture coordinate.
578
579     3.8.13.1.27  Offset Projective Texture Rectangle Scale
580
581     The OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV shader operation
582     operates identically to the OFFSET_TEXTURE_RECTANGLE_SCALE_NV shader
583     operation except that the perturbed texture coordinates s' and t'
584     are computed with floating-point math as follows:
585
586       s' = s/q + a1 * DSprev + a3 * DTprev
587       t' = t/q + a2 * DSprev + a4 * DTprev
588
589     Note the division of s and t by the current texture shader stage's
590     q texture coordinate.
591
592     3.8.13.1.28  Offset HILO Texture 2D
593
594     The OFFSET_HILO_TEXTURE_2D_NV texture shader operation uses the
595     transformed result of a previous texture shader stage to perturb
596     the current texture shader stage's (s,t) texture coordinates
597     (without a projective division by q).  The resulting perturbed
598     texture coordinates (s',t') are used to access the texture unit's 2D
599     texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6).
600
601     The result of the texture access becomes both the shader result and
602     texture unit RGBA result (see table 3.E).  The type of the shader
603     result depends on the format type of the accessed texture.
604
605     The perturbed texture coordinates s' and t' are computed with
606     floating-point math as follows:
607
608       s' = s + a1 * HIprev + a3 * LOprev
609       t' = t + a2 * HIprev + a4 * LOprev
610
611     where a1, a2, a3, and a4 are the texture shader stage's
612     OFFSET_TEXTURE_MATRIX_NV values, and HIprev and LOprev are the
613     (signed) HI and LO components of a previous texture shader unit's
614     texture shader result specified by the current texture shader
615     stage's PREVIOUS_TEXTURE_INPUT_NV value.
616
617     If the texture unit's 2D texture object is not consistent, then
618     this texture shader stage is not consistent.
619
620     If the previous texture input texture object specified by the
621     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
622     has a base internalformat that is not HILO with signed components,
623     then this texture shader stage is not consistent.
624
625     If the previous texture input texture shader operation specified by
626     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
627     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
628
629     If the previous texture input texture shader result specified by
630     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
631     is invalid, then this texture shader stage is not consistent.
632
633     If the previous texture input shader stage specified by the current
634     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
635     consistent, then this texture shader stage is not consistent.
636
637     If this texture shader stage is not consistent, it operates as if
638     it is the NONE operation.
639
640     3.8.13.1.29  Offset HILO Texture Rectangle
641
642     The OFFSET_HILO_TEXTURE_RECTANGLE_NV shader operation operates
643     identically to the OFFSET_HILO_TEXTURE_2D_NV shader operation except
644     that the rectangle texture target is accessed rather than the 2D
645     texture target.
646
647     If the texture unit's rectangle texture object (rather than the 2D
648     texture object) is not consistent, then this texture shader stage
649     is not consistent.
650
651     3.8.13.1.30  Offset Projective HILO Texture 2D
652
653     The OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV shader operation operates
654     identically to the OFFSET_HILO_TEXTURE_2D_NV shader operation except
655     that the perturbed texture coordinates s' and t' are computed with
656     floating-point math as follows:
657
658       s' = s/q + a1 * HIprev + a3 * LOprev
659       t' = t/q + a2 * HIprev + a4 * LOprev
660
661     Note the division of s and t by the current texture shader stage's
662     q texture coordinate.
663
664     3.8.13.1.31  Offset Projective HILO Texture Rectangle
665
666     The OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV shader operation
667     operates identically to the OFFSET_HILO_TEXTURE_RECTANGLE_NV shader
668     operation except that the perturbed texture coordinates s' and t'
669     are computed with floating-point math as follows:
670
671       s' = s/q + a1 * HIprev + a3 * LOprev
672       t' = t/q + a2 * HIprev + a4 * LOprev
673
674     Note the division of s and t by the current texture shader stage's
675     q texture coordinate.
676
677     3.8.13.1.32  Dependent HILO Texture 2D
678
679     The DEPENDENT_HILO_TEXTURE_2D_NV texture shader operation accesses
680     the texture unit's 2D texture object (as described in section
681     3.8.4, 3.8.5, and 3.8.6) using (HIprev, LOprev) for the 2D texture
682     coordinates where HIprev and LOprev are the are the hi and lo
683     components of a previous texture input's unsigned HILO texture
684     shader result specified by the current texture shader stage's
685     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
686     becomes both the shader result and texture unit RGBA result (see
687     table 3.E).  The type of the shader result depends on the format
688     type of the accessed texture.
689
690     If the texture unit's 2D texture object is not consistent, then
691     this texture shader stage is not consistent.
692
693     If the previous texture input's texture shader result specified by
694     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
695     has a texture shader result type other than HILO with unsigned
696     components, then this texture shader stage is not consistent.
697
698     If the previous texture input texture shader operation specified by
699     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
700     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
701
702     If the previous texture input texture shader result specified by
703     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
704     is invalid, then this texture shader stage is not consistent.
705
706     If the previous texture input shader stage specified by the current
707     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
708     consistent, then this texture shader stage is not consistent.
709
710     If this texture shader stage is not consistent, it operates as if
711     it is the NONE operation.
712
713     3.8.13.1.33  Dependent Texture 3D
714
715     The DEPENDENT_RGB_TEXTURE_3D_NV texture shader operation accesses
716     the texture unit's 3D texture object (as described in section
717     3.8.4, 3.8.5, and 3.8.6) using (Rprev, Gprev, Bprev) for the 3D
718     texture coordinates where Rprev, Gprev, and Bprev are the are the
719     red, green, and blue components of a previous texture input's RGBA
720     texture shader result specified by the current texture shader stage's
721     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
722     becomes both the shader result and texture unit RGBA result (see
723     table 3.E).  The type of the shader result depends on the format
724     type of the accessed texture.
725
726     If the texture unit's 3D texture object is not consistent, then
727     this texture shader stage is not consistent.
728
729     If the previous texture input's texture shader result specified
730     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
731     value has a texture shader result type other than RGBA (the
732     DSDT_MAG_INTENSITY_NV base internal format does not count as an
733     RGBA format type in this context), then this texture shader stage
734     is not consistent.
735
736     If the previous texture input's texture shader result specified
737     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
738     value has a texture shader result type of RGBA but any of the
739     RGBA components are signed, then this texture shader stage is not
740     consistent.
741
742     If the previous texture input texture shader operation specified by
743     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
744     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
745
746     If the previous texture input texture shader result specified by
747     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
748     is invalid, then this texture shader stage is not consistent.
749
750     If the previous texture input shader stage specified by the current
751     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
752     consistent, then this texture shader stage is not consistent.
753
754     If this texture shader stage is not consistent, it operates as if
755     it is the NONE operation.
756
757     3.8.13.1.34  Dependent Texture Cube Map
758
759     The DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV texture shader operation
760     accesses the texture unit's cube map texture object (as described
761     in section 3.8.4, 3.8.5, and 3.8.6) using (s',t',r').
762
763     When the RGB components of the previous texture input's RGBA texture
764     shader result are all unsigned, s', t', and r' are computed as:
765
766       s' = 2*(Rprev - 0.5)
767       t' = 2*(Gprev - 0.5)
768       r' = 2*(Bprev - 0.5)
769
770     When the RGB components of the previous texture input's RGBA texture
771     shader result are all signed, s', t', and r' are computed as:
772
773       s' = Rprev
774       t' = Gprev
775       r' = Bprev
776
777     where Rprev, Gprev, and Bprev are the are the red, green,
778     and blue components of a previous texture input's RGBA texture
779     shader result specified by the current texture shader stage's
780     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
781     becomes both the shader result and texture unit RGBA result (see
782     table 3.E).  The type of the shader result depends on the format
783     type of the accessed texture.
784
785     If the texture unit's cube map texture object is not consistent,
786     then this texture shader stage is not consistent.
787
788     If the previous texture input's texture shader result specified
789     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
790     value has a texture shader result type other than RGBA (the
791     DSDT_MAG_INTENSITY_NV base internal format does not count as an
792     RGBA format type in this context), then this texture shader stage
793     is not consistent.
794
795     If the previous texture input texture shader operation specified by
796     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
797     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
798
799     If the previous texture input texture shader result specified by
800     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
801     is invalid, then this texture shader stage is not consistent.
802
803     If the previous texture input shader stage specified by the current
804     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
805     consistent, then this texture shader stage is not consistent.
806
807     If this texture shader stage is not consistent, it operates as if
808     it is the NONE operation.
809
810     3.8.13.1.35  Dot Product Pass Through
811
812     The DOT_PRODUCT_PASS_THROUGH_NV texture shader operation converts a
813     dot product result dotC into an RGBA color result (x,x,x,x) where
814     x is dotC clamped to [0,1].  The texture shader result and texture
815     unit RGBA result of this operation are both
816     assigned the clamped RGBA color result.
817
818     dotC is the floating-point dot product result from the current
819     texture shader stage.  dotC is computed in the identical manner
820     used to compute the floating-point result of the DOT_PRODUCT_NV
821     texture shader described in section 3.8.13.1.14.
822
823     This operation in no way depends on any of the texture unit's
824     texture objects.
825
826     3.8.13.1.36  Dot Product Texture 1D
827
828     The DOT_PRODUCT_TEXTURE_1D_NV texture shader operation accesses the
829     texture unit's 1D texture object (as described in sections 3.8.4,
830     3.8.5, and 3.8.6) using dotC for the 1D texture coordinate.
831     The result of the texture access becomes both the shader result and
832     texture unit RGBA result (see table 3.E).  The type of the shader
833     result depends on the format type of the accessed texture.
834
835     dotC is the floating-point dot product result from the current
836     texture shader stage.  dotC is computed in the identical manner
837     used to compute the floating-point result of the DOT_PRODUCT_NV
838     texture shader described in section 3.8.13.1.14.
839
840     If the previous texture input texture object specified by the
841     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
842     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
843     base internal format does not count as an RGBA format type in this
844     context), then this texture shader stage is not consistent.
845
846     If the previous texture input texture shader operation specified by
847     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
848     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
849
850     If the previous texture input texture shader result specified by
851     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
852     is invalid, then this texture shader stage is not consistent.
853
854     If the previous texture input shader stage specified by the current
855     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
856     consistent, then this texture shader stage is not consistent.
857
858     If the texture unit's 1D texture object is not consistent, then
859     this texture shader stage is not consistent.
860
861     If this texture shader stage is not consistent, it operates as if
862     it is the NONE operation.
863
864     3.8.13.1.37  Dot Product Affine Depth Replace
865
866     The DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV texture shader operation
867     replaces the incoming fragments depth (in window coordinates, after
868     polygon offset and before conversion to fixed-point, i.e. in the
869     [0,1] range) with a new depth value.  The new depth is computed
870     as follows:
871
872       depth = dotC
873
874     dotC is the floating-point dot product result from the current
875     texture shader stage.  dotC is computed in the identical manner
876     used to compute the floating-point result of the DOT_PRODUCT_NV
877     texture shader described in section 3.8.13.1.14.  Note that there
878     is no divide to project the depth value as is the case with the
879     projective DOT_PRODUCT_DEPTH_REPLACE_NV operation.
880
881     If the new depth value is outside of the range of the near and far
882     depth range values, the fragment is rejected.
883
884     The texture unit RGBA result generated is always (0,0,0,0).
885     The texture shader result is invalid.
886
887     If the previous texture input texture object specified by the
888     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
889     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
890     base internal format does not count as an RGBA format type in this
891     context), then this texture shader stage is not consistent.
892
893     If the previous texture input texture shader operation specified by
894     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
895     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
896
897     If the previous texture input texture shader result specified by
898     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
899     is invalid, then this texture shader stage is not consistent.
900
901     If the previous texture input shader stage specified by the current
902     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
903     consistent, then this texture shader stage is not consistent.
904
905     If any previous texture shader stage operation is
906     DOT_PRODUCT_DEPTH_REPLACE_NV or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV
907     and that previous stage is consistent, then this texture shader
908     stage is not consistent.  (This eliminates the potential for two
909     stages to each be performing a depth replace operation.)
910
911     If this texture shader stage is not consistent, it operates as if
912     it is the NONE operation.
913
914     This operation in no way depends on any of the texture unit's
915     texture objects."
916
917     3.8.13.2  Texture Shader Restrictions
918
919     Amend the first two paragraphs in this section to include the new
920     texture shader operations:
921
922     "There are various restrictions on possible texture shader
923     configurations.  These restrictions are described in this section.
924
925     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
926     parameter for texture unit 0 is assigned one of
927     OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
928     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
929     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
930     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
931     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
932     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
933     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
934     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
935     OFFSET_PROJECTIVE_TEXTURE_2D, OFFSET_PROJECTIVE_TEXTURE_2D_SCALE,
936     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE,
937     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE, OFFSET_HILO_TEXTURE_2D,
938     OFFSET_HILO_TEXTURE_RECTANGLE, OFFSET_HILO_PROJECTIVE_TEXTURE_2D,
939     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE, DEPENDENT_HILO_TEXTURE_2D,
940     DEPENDENT_RGB_TEXTURE_3D, DEPENDENT_RGB_TEXTURE_CUBE_MAP,
941     DOT_PRODUCT_PASS_THROUGH, DOT_PRODUCT_TEXTURE_1D, or
942     DOT_PRODUCT_AFFINE_DEPTH_REPLACE.  Each of these texture shaders
943     requires a previous texture shader result that is not possible for
944     texture unit 0.  Therefore these shaders are disallowed for texture
945     unit 0."
946
947     3.8.13.3  Required State
948
949     Amend the first paragraph in this section to account for the 9 new
950     texture shader operations and the new "dot product third component"
951     state:
952
953     "The state required for texture shaders consists of a single bit to
954     indicate whether or not texture shaders are enabled, a vector of
955     three floating-point values for the constant eye vector, and n sets
956     of per-texture unit state where n is the implementation-dependent
957     number of supported texture units.  The set of per-texture unit
958     texture shader state consists of the thirty-seven-valued integer
959     indicating the texture shader operation, four two-valued integers
960     indicating the cull modes, an integer indicating the previous texture
961     unit input, a two-valued integer indicating the RGBA unsigned dot
962     product mapping mode, a 2x2 floating-point matrix indicating the
963     texture offset transform, a floating-point value indicating the
964     texture offset scale, a floating-point value indicating the texture
965     offset bias, and a bit to indicate whether or not the texture shader
966     stage is consistent."
967
968Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
969and the Frame Buffer)
970
971     None
972
973Additions to Chapter 5 of the 1.2 Specification (Special Functions)
974
975     None
976
977Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
978
979     None
980
981Additions to the GLX Specification
982
983     None
984
985Dependencies on other specifications
986
987     Same as the NV_texture_shader extension.
988
989Errors
990
991     INVALID_OPERATION is generated when TexImage1D, TexImage2D,
992     or TexImage3D are called and the format is HILO_NV and the
993     internalformat is not one of HILO_NV, HILO8_NV, HILO16_NV,
994     SIGNED_HILO_NV, SIGNED_HILO8_NV, SIGNED_HILO16_NV; or if
995     the internalformat is one of HILO_NV, HILO8_NV, HILO16_NV,
996     SIGNED_HILO_NV, SIGNED_HILO8_NV or SIGNED_HILO16_NV and the format
997     is not HILO_NV.
998
999     INVALID_OPERATION is generated when CopyTexImage2D, CopyTexImage1D,
1000     CopyTexSubImage3D, CopyTexSubImage2D, or CopyTexSubImage1D is called
1001     and the internal format of the texture array to which the pixels are
1002     to be copied is one of HILO_NV, HILO8_NV, HILO16_NV, SIGNED_HILO_NV,
1003     SIGNED_HILO8_NV, SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV,
1004     DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV.
1005
1006     INVALID_OPERATION is generated when TexEnv is called and the
1007     SHADER_OPERATION_NV parameter for texture unit 0 is assigned
1008     one of OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
1009     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
1010     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
1011     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
1012     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
1013     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
1014     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV.
1015     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
1016     OFFSET_PROJECTIVE_TEXTURE_2D_NV,
1017     OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV,
1018     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV,
1019     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV,
1020     OFFSET_HILO_TEXTURE_2D_NV, OFFSET_HILO_TEXTURE_RECTANGLE_NV,
1021     OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV,
1022     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV,
1023     DEPENDENT_HILO_TEXTURE_2D_NV, DEPENDENT_RGB_TEXTURE_3D_NV,
1024     DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_PASS_THROUGH_NV,
1025     DOT_PRODUCT_TEXTURE_1D_NV, or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV."
1026
1027New State
1028
1029UPDATE lines in Table 6.TextureShaders.
1030
1031Get Value                Type    Get Command  Initial Value         Description          Sec     Attribute
1032-----------------------  ------  -----------  --------------------  -------------------  ------  ---------
1033SHADER_OPERATION_NV      TxZ37   GetTexEnviv  NONE                  Texture shader       3.8.13  texture
1034                                                                    operation
1035RGBA_UNSIGNED_-          TxZ3    GetTexEnviv  UNSIGNED_IDENTITY_NV  Texture shader RGBA  3.8.13  texture
1036  DOT_PRODUCT_MAPPING_NV                                            dot product mapping
1037
1038* SHADER_OPERATION_NV: Z21 in NV_texture_shader (and Z23 in
1039  NV_texture_shader2) is now Z37 with NV_texture_shader3.
1040
1041* RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV: Z2 in NV_texture_shader is now
1042  Z3 with NV_texture_shader3.
1043
1044[ The "Tx" type prefix means that the state is per-texture unit. ]
1045
1046[ The "Zn" type is an n-valued integer where n is the
1047  implementation-dependent number of texture units supported.]
1048
1049New Implementation State
1050
1051     None
1052
1053Revision History
1054
1055     November 15, 2001 - document that depth replace is after polygon
1056     offset.
1057
1058     June 5, 2002 - Driver implementations before this date incorrectly
1059     swap the HI and LO components of GL_HILO8_NV and GL_SIGNED_HILO8_NV
1060     textures.  Drivers after this date have fixed the problem and match
1061     the specified behavior.
1062
1063     March 5, 2007 - Corrected some enum names.
1064
1065