15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_register_combiners 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_register_combiners 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright NVIDIA Corporation, 1999, 2000, 2001, 2002, 2003. 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciIP Status 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci NVIDIA Proprietary. 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciStatus 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Shipping (version 1.6) 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciVersion 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci NVIDIA Date: February 1, 2007 (version 1.7) 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciNumber 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci 191 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciDependencies 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci ARB_multitexture, assuming the value of MAX_TEXTURE_UNITS_ARB is 365bd8deadSopenharmony_ci at least 2. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci Written based on the wording of the OpenGL 1.2 specification with 395bd8deadSopenharmony_ci the ARB_multitexture appendix E. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci NV_texture_shader affects the definition of this extension. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci ARB_depth_texture and ARB_shadow -or- SGIX_depth_texture and 445bd8deadSopenharmony_ci SGIX_shadow affect the definition of this extension. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci ARB_color_buffer_float affects the definiton of this extension. 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciOverview 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci NVIDIA's next-generation graphics processor and its derivative 515bd8deadSopenharmony_ci designs support an extremely configurable mechanism know as "register 525bd8deadSopenharmony_ci combiners" for computing fragment colors. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci The register combiner mechanism is a significant redesign of NVIDIA's 555bd8deadSopenharmony_ci original TNT combiner mechanism as introduced by NVIDIA's RIVA 565bd8deadSopenharmony_ci TNT graphics processor. Familiarity with the TNT combiners will 575bd8deadSopenharmony_ci help the reader appreciate the greatly enhanced register combiners 585bd8deadSopenharmony_ci functionality (see the NV_texture_env_combine4 OpenGL extension 595bd8deadSopenharmony_ci specification for this background). The register combiner mechanism 605bd8deadSopenharmony_ci has the following enhanced functionality: 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci The numeric range of combiner computations is from [-1,1] 635bd8deadSopenharmony_ci (instead of TNT's [0,1] numeric range), 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci The set of available combiner inputs is expanded to include the 665bd8deadSopenharmony_ci secondary color, fog color, fog factor, and a second combiner 675bd8deadSopenharmony_ci constant color (TNT's available combiner inputs consist of 685bd8deadSopenharmony_ci only zero, a single combiner constant color, the primary color, 695bd8deadSopenharmony_ci texture 0, texture 1, and, in the case of combiner 1, the result 705bd8deadSopenharmony_ci of combiner 0). 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Each combiner variable input can be independently scaled and 735bd8deadSopenharmony_ci biased into several possible numeric ranges (TNT can only 745bd8deadSopenharmony_ci complement combiner inputs). 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci Each combiner stage computes three distinct outputs (instead 775bd8deadSopenharmony_ci TNT's single combiner output). 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci The output operations include support for computing dot products 805bd8deadSopenharmony_ci (TNT has no support for computing dot products). 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci After each output operation, there is a configurable scale and bias 835bd8deadSopenharmony_ci applied (TNT's combiner operations builds in a scale and/or bias 845bd8deadSopenharmony_ci into some of its combiner operations). 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Each input variable for each combiner stage is fetched from any 875bd8deadSopenharmony_ci entry in a combiner register set. Moreover, the outputs of each 885bd8deadSopenharmony_ci combiner stage are written into the register set of the subsequent 895bd8deadSopenharmony_ci combiner stage (TNT could only use the result from combiner 0 as 905bd8deadSopenharmony_ci a possible input to combiner 1; TNT lacks the notion of an 915bd8deadSopenharmony_ci input/output register set). 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci The register combiner mechanism supports at least two general 945bd8deadSopenharmony_ci combiner stages and then a special final combiner stage appropriate 955bd8deadSopenharmony_ci for applying a color sum and fog computation (TNT provides two 965bd8deadSopenharmony_ci simpler combiner stages, and TNT's color sum and fog stages are 975bd8deadSopenharmony_ci hard-wired and not subsumed by the combiner mechanism as in register 985bd8deadSopenharmony_ci combiners). 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci The register combiners fit into the OpenGL pipeline as a rasterization 1015bd8deadSopenharmony_ci processing stage operating in parallel to the traditional OpenGL 1025bd8deadSopenharmony_ci texture environment, color sum, AND fog application. Enabling this 1035bd8deadSopenharmony_ci extension bypasses OpenGL's existing texture environment, color 1045bd8deadSopenharmony_ci sum, and fog application processing and instead use the register 1055bd8deadSopenharmony_ci combiners. The combiner and texture environment state is orthogonal 1065bd8deadSopenharmony_ci so modifying combiner state does not change the traditional OpenGL 1075bd8deadSopenharmony_ci texture environment state and the texture environment state is 1085bd8deadSopenharmony_ci ignored when combiners are enabled. 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci OpenGL application developers can use the register combiner mechanism 1115bd8deadSopenharmony_ci for very sophisticated shading techniques. For example, an 1125bd8deadSopenharmony_ci approximation of Blinn's bump mapping technique can be achieved with 1135bd8deadSopenharmony_ci the combiner mechanism. Additionally, multi-pass shading models 1145bd8deadSopenharmony_ci that require several passes with unextended OpenGL 1.2 functionality 1155bd8deadSopenharmony_ci can be implemented in several fewer passes with register combiners. 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ciIssues 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci Should we expose the full register combiners mechanism? 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci RESOLUTION: NO. We ignore small bits of NV10 hardware 1225bd8deadSopenharmony_ci functionality. The texture LOD input is ignored. We also ignore 1235bd8deadSopenharmony_ci the inverts on input to the EF product. 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci Do we provide full gets for all the combiner state? 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci RESOLUTION: YES. 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci Do we parameterize combiner input and output updates to avoid 1305bd8deadSopenharmony_ci enumerant explosions? 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci RESOLUTION: YES. To update a combiner stage input variable, you 1335bd8deadSopenharmony_ci need to specify the <stage>, <portion>, and <variable>. To update a 1345bd8deadSopenharmony_ci combiner stage output operation, you need to specify the <stage> and 1355bd8deadSopenharmony_ci <portion>. This does mean that we need to add special Get routines 1365bd8deadSopenharmony_ci that are likewise parameterized. Hence, GetCombinerInputParameter*, 1375bd8deadSopenharmony_ci GetCombinerOutputParameter*, and GetFinalCombinerInputParameter*. 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci Is the register combiner functionality a super-set of the TNT combiner 1405bd8deadSopenharmony_ci functionality? 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci Yes, but only in the sense of being a computational super-set. 1435bd8deadSopenharmony_ci All computations performed with the TNT combiners can be performed 1445bd8deadSopenharmony_ci with the register combiners, but the sequence of operations necessary 1455bd8deadSopenharmony_ci to configure an identical computational result can be quite 1465bd8deadSopenharmony_ci different. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci For example, the TNT combiners have an operation that includes 1495bd8deadSopenharmony_ci a final complement operation. The register combiners can perform 1505bd8deadSopenharmony_ci range mappings only on inputs, but not on outputs. The register 1515bd8deadSopenharmony_ci combiners can mimic the TNT operation with a post-operation 1525bd8deadSopenharmony_ci complement only by taking pains to complement on input any uses 1535bd8deadSopenharmony_ci of the output in later combiner stages. 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci What this does mean is that NV10's hardware functionality 1565bd8deadSopenharmony_ci will permit support for both the NV_register_combiners AND 1575bd8deadSopenharmony_ci NV_texture_env_combine4 extensions. 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci Note the existance of an "speclit" input complement bit supported 1605bd8deadSopenharmony_ci by NV10 (but not accessible through the NV_register_combiners 1615bd8deadSopenharmony_ci extensions). 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci Should we say anything about the precision of the combiner 1645bd8deadSopenharmony_ci computations? 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci RESOLUTION: NO. The spec is written as if the computations are 1675bd8deadSopenharmony_ci done on floating point values ranging from -1.0 to 1.0 (clamping is 1685bd8deadSopenharmony_ci specified where this range is exceeded). The fact that NV10 does 1695bd8deadSopenharmony_ci the computations as 9-bit signed fixed point is not mentioned in 1705bd8deadSopenharmony_ci the spec. This permits a future design to support more precision 1715bd8deadSopenharmony_ci or use a floating pointing representation. 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci What should the initial combiner state be? 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci RESOLUTION: See tables NV_register_combiners.5 and 1765bd8deadSopenharmony_ci NV_register_combiners.6. The default state has one general combiner 1775bd8deadSopenharmony_ci stage active that modulates the incoming color with texture 0. 1785bd8deadSopenharmony_ci The final combiner is setup initially to implement OpenGL 1.2's 1795bd8deadSopenharmony_ci standard color sum and fog stages. 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci What should happen to the TEXTURE0_ARB and TEXTUER1_ARB inputs if 1825bd8deadSopenharmony_ci one or both textures are disabled? 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci RESOLUTION: The value of these inputs is undefined. 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci What do the TEXTURE0_ARB and TEXTURE1_ARB inputs correspond to? 1875bd8deadSopenharmony_ci Does the number correspond to the absolute texture unit number 1885bd8deadSopenharmony_ci or is the number based on how many textures are enabled (ie, 1895bd8deadSopenharmony_ci TEXTURE_ARB0 would correspond to the 2nd texture unit if the 1905bd8deadSopenharmony_ci 2nd unit is enabled, but the 1st is disabled). 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci RESOLUTION: The absolute texture unit. 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci This should be a lot less confusing to the programmer than having 1955bd8deadSopenharmony_ci the texture inputs switch textures if texture 0 is disabled. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci Note that the proposed hardware actually determines the TEXTURE0 1985bd8deadSopenharmony_ci and TEXTURE1 input based on which texture is enabled. This means 1995bd8deadSopenharmony_ci it is up to the ICD to properly update the combiner state when just 2005bd8deadSopenharmony_ci one texture is enabled. Since we will already have to do this to 2015bd8deadSopenharmony_ci track the standard OpenGL texture environment for ARB_multitexture, 2025bd8deadSopenharmony_ci we can do it for this extension too. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci Should the combiners state be PushAttrib/PopAttrib'ed along with 2055bd8deadSopenharmony_ci the texture state? 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci RESOLUTION: YES. 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci Should we advertise the LOD fractional input to the combiners? 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci RESOLUTION: NO. 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci There will be a performance impact when two combiner stages are 2145bd8deadSopenharmony_ci enabled versus just one stage. Should we mention that somewhere? 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci RESOLUTION: NO. (But it is worth mentioning in this issues 2175bd8deadSopenharmony_ci section.) 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci Should the scale and bias for the CombinerOutputNV be indicated 2205bd8deadSopenharmony_ci by enumerants or specified outright as floats? 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci RESOLUTION: ENUMERANTS. While some future combiners might 2235bd8deadSopenharmony_ci support an arbitrary scale & bias specified as floats, NV10 just 2245bd8deadSopenharmony_ci does the enumerated options. 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Should a dot product be computed in parralel with the sum of 2275bd8deadSopenharmony_ci products? 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci RESOLUTION: YES (changed for version 1.6). The hardware is 2305bd8deadSopenharmony_ci capable of summing the two dot products. 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci Versions of this specification prior to version 1.6 documented that 2335bd8deadSopenharmony_ci an INVALID_OPERATION should be generated if either <abDotProduct> 2345bd8deadSopenharmony_ci or <cdDotProduct> is true and then <sumOutput> is not GL_DISCARD. 2355bd8deadSopenharmony_ci However, this check was never added to the driver and some 2365bd8deadSopenharmony_ci applications found the mode useful. 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci Does the GL_E_TIMES_F_NV token for the final combiner perform any 2395bd8deadSopenharmony_ci mapping on E or F before the mapping? Is the multiply signed? 2405bd8deadSopenharmony_ci Can the result be negative? 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci RESOLUTION: Input mappings and component usage is applied to E or 2435bd8deadSopenharmony_ci F before their product is computed. Yes, the product is a signed 2445bd8deadSopenharmony_ci multiplication. The result can be negative, but the two allowed 2455bd8deadSopenharmony_ci final combiner input mapping modes (GL_UNSIGNED_IDENTITY_NV and 2465bd8deadSopenharmony_ci GL_UNSIGNED_INVERT_NV) both effectively clamp their results to 2475bd8deadSopenharmony_ci [0,1]. 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci A negative value resulting from the "E times F" product with the 2505bd8deadSopenharmony_ci GL_UNSIGNED_IDENTITY_NV mapping mode would be clamped to zero. 2515bd8deadSopenharmony_ci 2525bd8deadSopenharmony_ci A negative value resulting from the "E times F" product with the 2535bd8deadSopenharmony_ci GL_UNSIGNED_INVERT_NV mpaping mode would be clamped to zero but 2545bd8deadSopenharmony_ci then one minus that clamped result (zero) would generate one. 2555bd8deadSopenharmony_ci 2565bd8deadSopenharmony_ciNew Procedures and Functions 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci void CombinerParameterfvNV(GLenum pname, 2595bd8deadSopenharmony_ci const GLfloat *params); 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci void CombinerParameterivNV(GLenum pname, 2625bd8deadSopenharmony_ci const GLint *params); 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci void CombinerParameterfNV(GLenum pname, 2655bd8deadSopenharmony_ci GLfloat param); 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci void CombinerParameteriNV(GLenum pname, 2685bd8deadSopenharmony_ci GLint param); 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci void CombinerInputNV(GLenum stage, 2715bd8deadSopenharmony_ci GLenum portion, 2725bd8deadSopenharmony_ci GLenum variable, 2735bd8deadSopenharmony_ci GLenum input, 2745bd8deadSopenharmony_ci GLenum mapping, 2755bd8deadSopenharmony_ci GLenum componentUsage); 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci void CombinerOutputNV(GLenum stage, 2785bd8deadSopenharmony_ci GLenum portion, 2795bd8deadSopenharmony_ci GLenum abOutput, 2805bd8deadSopenharmony_ci GLenum cdOutput, 2815bd8deadSopenharmony_ci GLenum sumOutput, 2825bd8deadSopenharmony_ci GLenum scale, 2835bd8deadSopenharmony_ci GLenum bias, 2845bd8deadSopenharmony_ci GLboolean abDotProduct, 2855bd8deadSopenharmony_ci GLboolean cdDotProduct, 2865bd8deadSopenharmony_ci GLboolean muxSum); 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci void FinalCombinerInputNV(GLenum variable, 2895bd8deadSopenharmony_ci GLenum input, 2905bd8deadSopenharmony_ci GLenum mapping, 2915bd8deadSopenharmony_ci GLenum componentUsage); 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci void GetCombinerInputParameterfvNV(GLenum stage, 2945bd8deadSopenharmony_ci GLenum portion, 2955bd8deadSopenharmony_ci GLenum variable, 2965bd8deadSopenharmony_ci GLenum pname, 2975bd8deadSopenharmony_ci GLfloat *params); 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci void GetCombinerInputParameterivNV(GLenum stage, 3005bd8deadSopenharmony_ci GLenum portion, 3015bd8deadSopenharmony_ci GLenum variable, 3025bd8deadSopenharmony_ci GLenum pname, 3035bd8deadSopenharmony_ci GLint *params); 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci void GetCombinerOutputParameterfvNV(GLenum stage, 3065bd8deadSopenharmony_ci GLenum portion, 3075bd8deadSopenharmony_ci GLenum pname, 3085bd8deadSopenharmony_ci GLfloat *params); 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci void GetCombinerOutputParameterivNV(GLenum stage, 3115bd8deadSopenharmony_ci GLenum portion, 3125bd8deadSopenharmony_ci GLenum pname, 3135bd8deadSopenharmony_ci GLint *params); 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci void GetFinalCombinerInputParameterfvNV(GLenum variable, 3165bd8deadSopenharmony_ci GLenum pname, 3175bd8deadSopenharmony_ci GLfloat *params); 3185bd8deadSopenharmony_ci 3195bd8deadSopenharmony_ci void GetFinalCombinerInputParameterivNV(GLenum variable, 3205bd8deadSopenharmony_ci GLenum pname, 3215bd8deadSopenharmony_ci GLint *params); 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ciNew Tokens 3245bd8deadSopenharmony_ci 3255bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, 3265bd8deadSopenharmony_ci and by the <pname> parameter of GetBooleanv, GetIntegerv, 3275bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci REGISTER_COMBINERS_NV 0x8522 3305bd8deadSopenharmony_ci 3315bd8deadSopenharmony_ci Accepted by the <stage> parameter of CombinerInputNV, 3325bd8deadSopenharmony_ci CombinerOutputNV, GetCombinerInputParameterfvNV, 3335bd8deadSopenharmony_ci GetCombinerInputParameterivNV, GetCombinerOutputParameterfvNV, 3345bd8deadSopenharmony_ci and GetCombinerOutputParameterivNV: 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci COMBINER0_NV 0x8550 3375bd8deadSopenharmony_ci COMBINER1_NV 0x8551 3385bd8deadSopenharmony_ci COMBINER2_NV 0x8552 3395bd8deadSopenharmony_ci COMBINER3_NV 0x8553 3405bd8deadSopenharmony_ci COMBINER4_NV 0x8554 3415bd8deadSopenharmony_ci COMBINER5_NV 0x8555 3425bd8deadSopenharmony_ci COMBINER6_NV 0x8556 3435bd8deadSopenharmony_ci COMBINER7_NV 0x8557 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ci Accepted by the <variable> parameter of CombinerInputNV, 3465bd8deadSopenharmony_ci GetCombinerInputParameterfvNV, and GetCombinerInputParameterivNV: 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci VARIABLE_A_NV 0x8523 3495bd8deadSopenharmony_ci VARIABLE_B_NV 0x8524 3505bd8deadSopenharmony_ci VARIABLE_C_NV 0x8525 3515bd8deadSopenharmony_ci VARIABLE_D_NV 0x8526 3525bd8deadSopenharmony_ci 3535bd8deadSopenharmony_ci Accepted by the <variable> parameter of FinalCombinerInputNV, 3545bd8deadSopenharmony_ci GetFinalCombinerInputParameterfvNV, and 3555bd8deadSopenharmony_ci GetFinalCombinerInputParameterivNV: 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci VARIABLE_A_NV 3585bd8deadSopenharmony_ci VARIABLE_B_NV 3595bd8deadSopenharmony_ci VARIABLE_C_NV 3605bd8deadSopenharmony_ci VARIABLE_D_NV 3615bd8deadSopenharmony_ci VARIABLE_E_NV 0x8527 3625bd8deadSopenharmony_ci VARIABLE_F_NV 0x8528 3635bd8deadSopenharmony_ci VARIABLE_G_NV 0x8529 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ci Accepted by the <input> parameter of CombinerInputNV: 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci ZERO (not new) 3685bd8deadSopenharmony_ci CONSTANT_COLOR0_NV 0x852A 3695bd8deadSopenharmony_ci CONSTANT_COLOR1_NV 0x852B 3705bd8deadSopenharmony_ci FOG (not new) 3715bd8deadSopenharmony_ci PRIMARY_COLOR_NV 0x852C 3725bd8deadSopenharmony_ci SECONDARY_COLOR_NV 0x852D 3735bd8deadSopenharmony_ci SPARE0_NV 0x852E 3745bd8deadSopenharmony_ci SPARE1_NV 0x852F 3755bd8deadSopenharmony_ci TEXTURE0_ARB (see ARB_multitexture) 3765bd8deadSopenharmony_ci TEXTURE1_ARB (see ARB_multitexture) 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci Accepted by the <mapping> parameter of CombinerInputNV: 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV 0x8536 3815bd8deadSopenharmony_ci UNSIGNED_INVERT_NV 0x8537 3825bd8deadSopenharmony_ci EXPAND_NORMAL_NV 0x8538 3835bd8deadSopenharmony_ci EXPAND_NEGATE_NV 0x8539 3845bd8deadSopenharmony_ci HALF_BIAS_NORMAL_NV 0x853A 3855bd8deadSopenharmony_ci HALF_BIAS_NEGATE_NV 0x853B 3865bd8deadSopenharmony_ci SIGNED_IDENTITY_NV 0x853C 3875bd8deadSopenharmony_ci SIGNED_NEGATE_NV 0x853D 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci Accepted by the <input> parameter of FinalCombinerInputNV: 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci ZERO (not new) 3925bd8deadSopenharmony_ci CONSTANT_COLOR0_NV 3935bd8deadSopenharmony_ci CONSTANT_COLOR1_NV 3945bd8deadSopenharmony_ci FOG (not new) 3955bd8deadSopenharmony_ci PRIMARY_COLOR_NV 3965bd8deadSopenharmony_ci SECONDARY_COLOR_NV 3975bd8deadSopenharmony_ci SPARE0_NV 3985bd8deadSopenharmony_ci SPARE1_NV 3995bd8deadSopenharmony_ci TEXTURE0_ARB (see ARB_multitexture) 4005bd8deadSopenharmony_ci TEXTURE1_ARB (see ARB_multitexture) 4015bd8deadSopenharmony_ci E_TIMES_F_NV 0x8531 4025bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ci Accepted by the <mapping> parameter of FinalCombinerInputNV: 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV 4075bd8deadSopenharmony_ci UNSIGNED_INVERT_NV 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci Accepted by the <scale> parameter of CombinerOutputNV: 4105bd8deadSopenharmony_ci 4115bd8deadSopenharmony_ci NONE (not new) 4125bd8deadSopenharmony_ci SCALE_BY_TWO_NV 0x853E 4135bd8deadSopenharmony_ci SCALE_BY_FOUR_NV 0x853F 4145bd8deadSopenharmony_ci SCALE_BY_ONE_HALF_NV 0x8540 4155bd8deadSopenharmony_ci 4165bd8deadSopenharmony_ci Accepted by the <bias> parameter of CombinerOutputNV: 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci NONE (not new) 4195bd8deadSopenharmony_ci BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 4205bd8deadSopenharmony_ci 4215bd8deadSopenharmony_ci Accepted by the <abOutput>, <cdOutput>, and <sumOutput> parameter 4225bd8deadSopenharmony_ci of CombinerOutputNV: 4235bd8deadSopenharmony_ci 4245bd8deadSopenharmony_ci DISCARD_NV 0x8530 4255bd8deadSopenharmony_ci PRIMARY_COLOR_NV 4265bd8deadSopenharmony_ci SECONDARY_COLOR_NV 4275bd8deadSopenharmony_ci SPARE0_NV 4285bd8deadSopenharmony_ci SPARE1_NV 4295bd8deadSopenharmony_ci TEXTURE0_ARB (see ARB_multitexture) 4305bd8deadSopenharmony_ci TEXTURE1_ARB (see ARB_multitexture) 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetCombinerInputParameterfvNV 4335bd8deadSopenharmony_ci and GetCombinerInputParameterivNV: 4345bd8deadSopenharmony_ci 4355bd8deadSopenharmony_ci COMBINER_INPUT_NV 0x8542 4365bd8deadSopenharmony_ci COMBINER_MAPPING_NV 0x8543 4375bd8deadSopenharmony_ci COMBINER_COMPONENT_USAGE_NV 0x8544 4385bd8deadSopenharmony_ci 4395bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetCombinerOutputParameterfvNV 4405bd8deadSopenharmony_ci and GetCombinerOutputParameterivNV: 4415bd8deadSopenharmony_ci 4425bd8deadSopenharmony_ci COMBINER_AB_DOT_PRODUCT_NV 0x8545 4435bd8deadSopenharmony_ci COMBINER_CD_DOT_PRODUCT_NV 0x8546 4445bd8deadSopenharmony_ci COMBINER_MUX_SUM_NV 0x8547 4455bd8deadSopenharmony_ci COMBINER_SCALE_NV 0x8548 4465bd8deadSopenharmony_ci COMBINER_BIAS_NV 0x8549 4475bd8deadSopenharmony_ci COMBINER_AB_OUTPUT_NV 0x854A 4485bd8deadSopenharmony_ci COMBINER_CD_OUTPUT_NV 0x854B 4495bd8deadSopenharmony_ci COMBINER_SUM_OUTPUT_NV 0x854C 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci Accepted by the <pname> parameter of CombinerParameterfvNV, 4525bd8deadSopenharmony_ci CombinerParameterivNV, GetBooleanv, GetDoublev, GetFloatv, and 4535bd8deadSopenharmony_ci GetIntegerv: 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci CONSTANT_COLOR0_NV 4565bd8deadSopenharmony_ci CONSTANT_COLOR1_NV 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci Accepted by the <pname> parameter of CombinerParameterfvNV, 4595bd8deadSopenharmony_ci CombinerParameterivNV, CombinerParameterfNV, CombinerParameteriNV, 4605bd8deadSopenharmony_ci GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv: 4615bd8deadSopenharmony_ci 4625bd8deadSopenharmony_ci NUM_GENERAL_COMBINERS_NV 0x854E 4635bd8deadSopenharmony_ci COLOR_SUM_CLAMP_NV 0x854F 4645bd8deadSopenharmony_ci 4655bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetFinalCombinerInputParameterfvNV 4665bd8deadSopenharmony_ci and GetFinalCombinerInputParameterivNV: 4675bd8deadSopenharmony_ci 4685bd8deadSopenharmony_ci COMBINER_INPUT_NV 4695bd8deadSopenharmony_ci COMBINER_MAPPING_NV 4705bd8deadSopenharmony_ci COMBINER_COMPONENT_USAGE_NV 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetDoublev, 4735bd8deadSopenharmony_ci GetFloatv, and GetIntegerv: 4745bd8deadSopenharmony_ci 4755bd8deadSopenharmony_ci MAX_GENERAL_COMBINERS_NV 0x854D 4765bd8deadSopenharmony_ci 4775bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 4785bd8deadSopenharmony_ci 4795bd8deadSopenharmony_ci None 4805bd8deadSopenharmony_ci 4815bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 4825bd8deadSopenharmony_ci 4835bd8deadSopenharmony_ci -- Figure 3.1 "Rasterization" (page 58) 4845bd8deadSopenharmony_ci 4855bd8deadSopenharmony_ci + Change the "Texturing" block to say "Texture Fetching". 4865bd8deadSopenharmony_ci 4875bd8deadSopenharmony_ci + Insert a new block between "Texture Fetching" and "Color Sum". 4885bd8deadSopenharmony_ci Name the new block "Texture Environment Application". 4895bd8deadSopenharmony_ci 4905bd8deadSopenharmony_ci + Insert a new block after "Texture Fetching". Name the new block 4915bd8deadSopenharmony_ci "Register Combiners Application". 4925bd8deadSopenharmony_ci 4935bd8deadSopenharmony_ci + The output of the "Texture Fetching" stage feeds to both "Texture 4945bd8deadSopenharmony_ci Environment Application" and "Register Combiners Application". 4955bd8deadSopenharmony_ci 4965bd8deadSopenharmony_ci + The input for "Color Sum" comes from "Texture Environment 4975bd8deadSopenharmony_ci Application". 4985bd8deadSopenharmony_ci 4995bd8deadSopenharmony_ci + The output to "Fragments" is switched (controlled by 5005bd8deadSopenharmony_ci Disable/Enable REGISTER_COMBINERS_NV) between the output of "Fog" 5015bd8deadSopenharmony_ci and "Register Combiners Application". 5025bd8deadSopenharmony_ci 5035bd8deadSopenharmony_ci Essentially, when register combiners are enabled, the entire standard 5045bd8deadSopenharmony_ci texture environment application, color sum, and fog blocks are 5055bd8deadSopenharmony_ci replaced with the single register combiners block. [Note that this 5065bd8deadSopenharmony_ci is different from how the NV_texture_env_combine4 extension works; 5075bd8deadSopenharmony_ci that extension controls the texture environment application 5085bd8deadSopenharmony_ci block, but still uses the standard color sum and fog blocks.] 5095bd8deadSopenharmony_ci 5105bd8deadSopenharmony_ci -- NEW Section 3.8.12 "Register Combiners Application" 5115bd8deadSopenharmony_ci 5125bd8deadSopenharmony_ci "In parallel to the texture application, color sum, and fog processes 5135bd8deadSopenharmony_ci described in sections 3.8.10, 3.9, and 3.10, register combiners 5145bd8deadSopenharmony_ci provide a means of computing fcoc, the final combiner output color, 5155bd8deadSopenharmony_ci for each fragment generated by rasterization. 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci The register combiners consist of two or more general combiner stages 5185bd8deadSopenharmony_ci arranged in a fixed sequence ordered by each combiner stage's number. 5195bd8deadSopenharmony_ci An implementation supports a maximum number of general combiners 5205bd8deadSopenharmony_ci stages, which may be queried by calling GetIntegerv with the symbolic 5215bd8deadSopenharmony_ci constant MAX_GENERAL_COMBINERS_NV. Implementations must 5225bd8deadSopenharmony_ci support at least two general combiner stages. The general combiner 5235bd8deadSopenharmony_ci stages are named COMBINER0_NV, COMBINER1_NV, and so on. 5245bd8deadSopenharmony_ci 5255bd8deadSopenharmony_ci Each general combiner in the sequence receives its inputs and 5265bd8deadSopenharmony_ci computes its outputs in an identical manner. At the end of the 5275bd8deadSopenharmony_ci sequence of general combiner stages, there is a final combiner stage 5285bd8deadSopenharmony_ci that operates in a different manner than the general combiner stages. 5295bd8deadSopenharmony_ci The general combiner operation is described first, followed by a 5305bd8deadSopenharmony_ci description of the final combiner operation. 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci Each combiner stage (the general combiner stages and the final 5335bd8deadSopenharmony_ci combiner stage) has an associated combiner register set. Each 5345bd8deadSopenharmony_ci combiner register set contains <n> RGBA vectors with components 5355bd8deadSopenharmony_ci ranging from -1.0 to 1.0 where <n> is 8 plus the maximum number 5365bd8deadSopenharmony_ci of active textures supported (that is, the implementation's value 5375bd8deadSopenharmony_ci for MAX_TEXTURE_UNITS_ARB). The combiner register set entries 5385bd8deadSopenharmony_ci are listed in the table NV_register_combiners.1. 5395bd8deadSopenharmony_ci 5405bd8deadSopenharmony_ci [ Table NV_register_combiners.1 ] 5415bd8deadSopenharmony_ci 5425bd8deadSopenharmony_ci Initial Output 5435bd8deadSopenharmony_ci Register Name Value Reference Status 5445bd8deadSopenharmony_ci --------------------- ---------- ---------------- --------- 5455bd8deadSopenharmony_ci ZERO 0 - read only 5465bd8deadSopenharmony_ci CONSTANT_COLOR0_NV ccc0 Section 3.8.12.1 read only 5475bd8deadSopenharmony_ci CONSTANT_COLOR1_NV ccc1 Section 3.8.12.1 read only 5485bd8deadSopenharmony_ci FOG Cf Section 3.10 read only 5495bd8deadSopenharmony_ci PRIMARY_COLOR_NV cpri Section 2.13.1 read/write 5505bd8deadSopenharmony_ci SECONDARY_COLOR_NV csec Section 2.13.1 read/write 5515bd8deadSopenharmony_ci SPARE0_NV see below Section 3.8.12 read/write 5525bd8deadSopenharmony_ci SPARE1_NV undefined Section 3.8.12 read/write 5535bd8deadSopenharmony_ci TEXTURE0_ARB CT0 Figure E.2 read/write 5545bd8deadSopenharmony_ci TEXTURE1_ARB CT1 Figure E.2 read/write 5555bd8deadSopenharmony_ci TEXTURE<i>_ARB CT<i> Figure E.2 read/write 5565bd8deadSopenharmony_ci 5575bd8deadSopenharmony_ci The register set of COMBINER0_NV, the first combiner stage, 5585bd8deadSopenharmony_ci is initialized as described in table NV_register_combiners.1. 5595bd8deadSopenharmony_ci 5605bd8deadSopenharmony_ci The initial value of the alpha portion of register SECONDARY_COLOR_NV 5615bd8deadSopenharmony_ci is undefined. The initial value of the alpha portion of register 5625bd8deadSopenharmony_ci SPARE0_NV is the alpha component of texture 0 if texturing is 5635bd8deadSopenharmony_ci enabled for texture 0; however, the initial value of the RGB portion 5645bd8deadSopenharmony_ci SPARE0_NV is undefined. The initial value of the SPARE1_NV register 5655bd8deadSopenharmony_ci is undefined. The initial of registers TEXTURE0_ARB, TEXTURE1_ARB, 5665bd8deadSopenharmony_ci and TEXTURE<i>_ARB are undefined if texturing is not enabled for 5675bd8deadSopenharmony_ci textures 0, 1, and <i>, respectively. 5685bd8deadSopenharmony_ci 5695bd8deadSopenharmony_ci The mapping of texture components to components of texture registers 5705bd8deadSopenharmony_ci is summarized in Table NV_register_combiners.2. In the following 5715bd8deadSopenharmony_ci table, At, Lt, It, Rt, Gt, Bt, and Dt, are the filtered texel 5725bd8deadSopenharmony_ci values. 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci [Table NV_register_combiners.2]: Correspondence of texture components 5755bd8deadSopenharmony_ci to register components for texture registers. 5765bd8deadSopenharmony_ci 5775bd8deadSopenharmony_ci Base Internal Format RGB Values Alpha Value 5785bd8deadSopenharmony_ci -------------------- ---------- ----------- 5795bd8deadSopenharmony_ci ALPHA 0, 0, 0 At 5805bd8deadSopenharmony_ci LUMINANCE Lt, Lt, Lt 1 5815bd8deadSopenharmony_ci LUMINANCE_ALPHA Lt, Lt, Lt At 5825bd8deadSopenharmony_ci INTENSITY It, It, It It 5835bd8deadSopenharmony_ci RGB Rt, Gt, Bt 1 5845bd8deadSopenharmony_ci RGBA Rt, Gt, Bt At 5855bd8deadSopenharmony_ci 5865bd8deadSopenharmony_ci DEPTH_COMPONENT 0, 0, 0, Lt 5875bd8deadSopenharmony_ci (when TEXTURE_COMPARE_MODE_ARB is NONE -or- 5885bd8deadSopenharmony_ci TEXTURE_COMPARE_SGIX is false) 5895bd8deadSopenharmony_ci DEPTH_COMPONENT Lt, Lt, Lt, Lt 5905bd8deadSopenharmony_ci (when TEXTURE_COMPARE_MODE_ARB is COMPARE_R_TO_TEXTURE -or- 5915bd8deadSopenharmony_ci TEXTURE_COMPARE_SGIX is true) 5925bd8deadSopenharmony_ci 5935bd8deadSopenharmony_ci HILO_NV 0, 0, 0, 0 5945bd8deadSopenharmony_ci DSDT_NV 0, 0, 0, 0 5955bd8deadSopenharmony_ci DSDT_MAG_NV 0, 0, 0, 0 5965bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 0, 0, 0, It 5975bd8deadSopenharmony_ci 5985bd8deadSopenharmony_ci Note that the ALPHA, DEPTH_COMPONENT, and DSDT_MAG_INTENSITY_NV 5995bd8deadSopenharmony_ci base internal formats are mapped to components differently than 6005bd8deadSopenharmony_ci one could infer from the standard texture environment operations 6015bd8deadSopenharmony_ci with this formats. A texture's DEPTH_TEXTURE_MODE_ARB state (see 6025bd8deadSopenharmony_ci the ARB_depth_texture extension) is irrelevant for determining the 6035bd8deadSopenharmony_ci correspondence of texture components to register components for 6045bd8deadSopenharmony_ci texture registers when REGISTER_COMBINERS_NV is enabled. 6055bd8deadSopenharmony_ci 6065bd8deadSopenharmony_ci 3.8.12.1 Combiner Parameters 6075bd8deadSopenharmony_ci 6085bd8deadSopenharmony_ci Combiner parameters are specified by 6095bd8deadSopenharmony_ci 6105bd8deadSopenharmony_ci CombinerParameterfvNV(GLenum pname, const GLfloat *params); 6115bd8deadSopenharmony_ci CombinerParameterivNV(GLenum pname, const GLint *params); 6125bd8deadSopenharmony_ci CombinerParameterfNV(GLenum pname, GLfloat param); 6135bd8deadSopenharmony_ci CombinerParameteriNV(GLenum pname, GLint param); 6145bd8deadSopenharmony_ci 6155bd8deadSopenharmony_ci <pname> is a symbolic constant indicating which parameter is to be 6165bd8deadSopenharmony_ci set as described in the table NV_register_combiners.3: 6175bd8deadSopenharmony_ci 6185bd8deadSopenharmony_ci [ Table NV_register_combiners.3 ] 6195bd8deadSopenharmony_ci Number 6205bd8deadSopenharmony_ci Parameter Name of values Type 6215bd8deadSopenharmony_ci --------- ------------------------- --------- --------------- 6225bd8deadSopenharmony_ci ccc0 CONSTANT_COLOR0_NV 4 color 6235bd8deadSopenharmony_ci ccc1 CONSTANT_COLOR1_NV 4 color 6245bd8deadSopenharmony_ci ngc NUM_GENERAL_COMBINERS_NV 1 positive integer 6255bd8deadSopenharmony_ci csc COLOR_SUM_CLAMP_NV 1 boolean 6265bd8deadSopenharmony_ci 6275bd8deadSopenharmony_ci <params> is a pointer to a group of values to which to set the 6285bd8deadSopenharmony_ci indicated parameter. <param> is simply the indicated parameter. 6295bd8deadSopenharmony_ci The number of values pointed to depends on the parameter being 6305bd8deadSopenharmony_ci set as shown in the table above. Color parameters specified with 6315bd8deadSopenharmony_ci CombinerParameter*NV are converted to floating-point values (if 6325bd8deadSopenharmony_ci specified as integers) as indicated by Table 2.6 for signed integers. 6335bd8deadSopenharmony_ci The floating-point color values are then clamped to the range [0,1]. 6345bd8deadSopenharmony_ci 6355bd8deadSopenharmony_ci The values ccc0 and ccc1 named by CONSTANT_COLOR0_NV and 6365bd8deadSopenharmony_ci CONSTANT_COLOR1_NV are constant colors available for inputs to the 6375bd8deadSopenharmony_ci combiner stages. The value ngc named by NUM_GENERAL_COMBINERS_NV 6385bd8deadSopenharmony_ci is a positive integer indicating how many general combiner stages are 6395bd8deadSopenharmony_ci active, that is, how many general combiner stages a fragment should 6405bd8deadSopenharmony_ci be processed by. Setting ngc to a value less than one or 6415bd8deadSopenharmony_ci greater than the value of MAX_GENERAL_COMBINERS_NV generates an 6425bd8deadSopenharmony_ci INVALID_VALUE error. The value csc named by COLOR_SUM_CLAMP_NV 6435bd8deadSopenharmony_ci is a boolean described in section 3.8.12.3. 6445bd8deadSopenharmony_ci 6455bd8deadSopenharmony_ci 3.8.12.2 General Combiner Stage Operation 6465bd8deadSopenharmony_ci 6475bd8deadSopenharmony_ci The command 6485bd8deadSopenharmony_ci 6495bd8deadSopenharmony_ci CombinerInputNV(GLenum stage, 6505bd8deadSopenharmony_ci GLenum portion, 6515bd8deadSopenharmony_ci GLenum variable, 6525bd8deadSopenharmony_ci GLenum input, 6535bd8deadSopenharmony_ci GLenum mapping, 6545bd8deadSopenharmony_ci GLenum componentUsage); 6555bd8deadSopenharmony_ci 6565bd8deadSopenharmony_ci controls the assignment of all the general combiner input variables. 6575bd8deadSopenharmony_ci For the RGB combiner portion, these are Argb, Brgb, Crgb, and 6585bd8deadSopenharmony_ci Drgb; and for the combiner alpha portion, these are Aa, Ba, Ca, 6595bd8deadSopenharmony_ci and Da. The <stage> parameter is a symbolic constant of the form 6605bd8deadSopenharmony_ci COMBINER<i>_NV, indicating that general combiner stage <i> is to 6615bd8deadSopenharmony_ci be updated. The constant COMBINER<i>_NV = COMBINER0_NV + <i> 6625bd8deadSopenharmony_ci where <i> is in the range 0 to <k>-1 and <k> is the implementation 6635bd8deadSopenharmony_ci dependent value of MAX_COMBINERS_NV. The <portion> parameter 6645bd8deadSopenharmony_ci may be either RGB or ALPHA and determines whether the RGB color 6655bd8deadSopenharmony_ci vector or alpha scalar portion of the specified combiner stage is 6665bd8deadSopenharmony_ci updated. The <variable> parameter may be one of VARIABLE_A_NV, 6675bd8deadSopenharmony_ci VARIABLE_B_NV, VARIABLE_C_NV, or VARIABLE_D_NV and determines 6685bd8deadSopenharmony_ci which respective variable of the specified combiner stage and 6695bd8deadSopenharmony_ci combiner stage portion is updated. 6705bd8deadSopenharmony_ci 6715bd8deadSopenharmony_ci The <input>, <mapping>, and <componentUsage> parameters specify 6725bd8deadSopenharmony_ci the assignment of a value for the input variable indicated by 6735bd8deadSopenharmony_ci <stage>, <portion>, and <variable>. The <input> parameter may be 6745bd8deadSopenharmony_ci one of the register names from table NV_register_combiners.1. 6755bd8deadSopenharmony_ci 6765bd8deadSopenharmony_ci The <componentUsage> parameter may be one of RGB, ALPHA, or BLUE. 6775bd8deadSopenharmony_ci 6785bd8deadSopenharmony_ci When the <portion> parameter is RGB, a <componentUsage> parameter 6795bd8deadSopenharmony_ci of RGB indicates that the RGB portion of the indicated register 6805bd8deadSopenharmony_ci should be assigned to the RGB portion of the combiner input variable, 6815bd8deadSopenharmony_ci while an ALPHA <componentUsage> parameter indicates that the 6825bd8deadSopenharmony_ci alpha portion of the indicated register should be replicated across 6835bd8deadSopenharmony_ci the RGB portion of the combiner input variable. 6845bd8deadSopenharmony_ci 6855bd8deadSopenharmony_ci When the <portion> parameter is ALPHA, the <componentUsage> 6865bd8deadSopenharmony_ci parameter of ALPHA indicates that the alpha portion of the indicated 6875bd8deadSopenharmony_ci register should be assigned to the alpha portion of the combiner 6885bd8deadSopenharmony_ci input variable, while a BLUE <componentUsage> parameter indicates 6895bd8deadSopenharmony_ci that the blue component of the indicated register should be assigned 6905bd8deadSopenharmony_ci to the alpha portion of the combiner input variable. 6915bd8deadSopenharmony_ci 6925bd8deadSopenharmony_ci When the <portion> parameter is ALPHA, a <componentUsage> parameter 6935bd8deadSopenharmony_ci of RGB generates an INVALID_OPERATION error. When the <portion> 6945bd8deadSopenharmony_ci parameter is RGB, a <componentUsage> parameter of BLUE generates 6955bd8deadSopenharmony_ci an INVALID_OPERATION error. 6965bd8deadSopenharmony_ci 6975bd8deadSopenharmony_ci When the <componentUsage> parameter is ALPHA, an <input> parameter 6985bd8deadSopenharmony_ci of FOG generates an INVALID_OPERATION error. The alpha component of 6995bd8deadSopenharmony_ci the fog register is only available in the final combiner. The alpha 7005bd8deadSopenharmony_ci component of the fog register is the fragment's fog factor when fog 7015bd8deadSopenharmony_ci is enabled; otherwise, the alpha component of the fog register is 7025bd8deadSopenharmony_ci one. 7035bd8deadSopenharmony_ci 7045bd8deadSopenharmony_ci Before the value in the register named by <input> is assigned to the 7055bd8deadSopenharmony_ci specified input variable, a range mapping is performed based on 7065bd8deadSopenharmony_ci <mapping>. The mapping may be one of the tokens from the table 7075bd8deadSopenharmony_ci NV_register_combiners.4. 7085bd8deadSopenharmony_ci 7095bd8deadSopenharmony_ci [ Table NV_register_combiners.4 ] 7105bd8deadSopenharmony_ci 7115bd8deadSopenharmony_ci Mapping Name Mapping Function 7125bd8deadSopenharmony_ci ----------------------- ------------------------------------- 7135bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV max(0.0, e) 7145bd8deadSopenharmony_ci UNSIGNED_INVERT_NV 1.0 - min(max(e, 0.0), 1.0) 7155bd8deadSopenharmony_ci EXPAND_NORMAL_NV 2.0 * max(0.0, e) - 1.0 7165bd8deadSopenharmony_ci EXPAND_NEGATE_NV -2.0 * max(0.0, e) + 1.0 7175bd8deadSopenharmony_ci HALF_BIAS_NORMAL_NV max(0.0, e) - 0.5 7185bd8deadSopenharmony_ci HALF_BIAS_NEGATE_NV -max(0.0, e) + 0.5 7195bd8deadSopenharmony_ci SIGNED_IDENTITY_NV e 7205bd8deadSopenharmony_ci SIGNED_NEGATE_NV -e 7215bd8deadSopenharmony_ci 7225bd8deadSopenharmony_ci Based on the <mapping> parameter, the mapping function in the table 7235bd8deadSopenharmony_ci above is evaluated for each element <e> of the input vector before 7245bd8deadSopenharmony_ci assigning the result to the specified input variable. Note that 7255bd8deadSopenharmony_ci the mapping for the RGB and alpha portion of each input variable 7265bd8deadSopenharmony_ci is distinct. 7275bd8deadSopenharmony_ci 7285bd8deadSopenharmony_ci Each general combiner stage computes the following ten expressions 7295bd8deadSopenharmony_ci based on the values assigned to the variables Argb, Brgb, Crgb, 7305bd8deadSopenharmony_ci Drgb, Aa, Ba, Ca, and Da as determined by the combiner state set 7315bd8deadSopenharmony_ci by CombinerInputNV. 7325bd8deadSopenharmony_ci 7335bd8deadSopenharmony_ci ["gcc" stands for general combiner computation.] 7345bd8deadSopenharmony_ci 7355bd8deadSopenharmony_ci gcc1rgb = [ Argb[r]*Brgb[r], Argb[g]*Brgb[g], Argb[b]*Brgb[b] ] 7365bd8deadSopenharmony_ci 7375bd8deadSopenharmony_ci gcc2rgb = [ Argb[r]*Brgb[r] + Argb[g]*Brgb[g] + Argb[b]*Brgb[b], 7385bd8deadSopenharmony_ci Argb[r]*Brgb[r] + Argb[g]*Brgb[g] + Argb[b]*Brgb[b], 7395bd8deadSopenharmony_ci Argb[r]*Brgb[r] + Argb[g]*Brgb[g] + Argb[b]*Brgb[b] ] 7405bd8deadSopenharmony_ci 7415bd8deadSopenharmony_ci gcc3rgb = [ Crgb[r]*Drgb[r], Crgb[g]*Drgb[g], Crgb[b]*Drgb[b] ] 7425bd8deadSopenharmony_ci 7435bd8deadSopenharmony_ci gcc4rgb = [ Crgb[r]*Drgb[r] + Crgb[g]*Drgb[g] + Crgb[b]*Drgb[b], 7445bd8deadSopenharmony_ci Crgb[r]*Drgb[r] + Crgb[g]*Drgb[g] + Crgb[b]*Drgb[b], 7455bd8deadSopenharmony_ci Crgb[r]*Drgb[r] + Crgb[g]*Drgb[g] + Crgb[b]*Drgb[b] ] 7465bd8deadSopenharmony_ci 7475bd8deadSopenharmony_ci gcc5rgb = gcc1rgb + gcc3rgb 7485bd8deadSopenharmony_ci 7495bd8deadSopenharmony_ci gcc6rgb = gcc1rgb or gcc3rgb [see below] 7505bd8deadSopenharmony_ci 7515bd8deadSopenharmony_ci gcc1a = Aa * Ba 7525bd8deadSopenharmony_ci 7535bd8deadSopenharmony_ci gcc2a = Ca * Da 7545bd8deadSopenharmony_ci 7555bd8deadSopenharmony_ci gcc3a = gcc1a + gcc2a 7565bd8deadSopenharmony_ci 7575bd8deadSopenharmony_ci gcc4a = gcc1a or gcc2a [see below] 7585bd8deadSopenharmony_ci 7595bd8deadSopenharmony_ci The computation of gcc6rgb and gcc4a involves a special "or" 7605bd8deadSopenharmony_ci operation. This operation evaluates to the left-hand operand if 7615bd8deadSopenharmony_ci the alpha component of the combiner's SPARE0_NV register is less than 7625bd8deadSopenharmony_ci 0.5; otherwise, the operation evaluates to the right-hand operand. 7635bd8deadSopenharmony_ci 7645bd8deadSopenharmony_ci The command 7655bd8deadSopenharmony_ci 7665bd8deadSopenharmony_ci CombinerOutputNV(GLenum stage, 7675bd8deadSopenharmony_ci GLenum portion, 7685bd8deadSopenharmony_ci GLenum abOutput, 7695bd8deadSopenharmony_ci GLenum cdOutput, 7705bd8deadSopenharmony_ci GLenum sumOutput, 7715bd8deadSopenharmony_ci GLenum scale, 7725bd8deadSopenharmony_ci GLenum bias, 7735bd8deadSopenharmony_ci GLboolean abDotProduct, 7745bd8deadSopenharmony_ci GLboolean cdDotProduct, 7755bd8deadSopenharmony_ci GLboolean muxSum); 7765bd8deadSopenharmony_ci 7775bd8deadSopenharmony_ci controls the general combiner output operation including designating 7785bd8deadSopenharmony_ci the register set locations where results of the general combiner's 7795bd8deadSopenharmony_ci three computations are written. The <stage> and <portion> 7805bd8deadSopenharmony_ci parameters take the same values as the respective parameters for 7815bd8deadSopenharmony_ci CombinerInputNV. 7825bd8deadSopenharmony_ci 7835bd8deadSopenharmony_ci If the <portion> parameter is ALPHA, specifying a non-FALSE value 7845bd8deadSopenharmony_ci for either of the parameters <abDotProduct> or <cdDotProduct>, 7855bd8deadSopenharmony_ci generates an INVALID_VALUE error. 7865bd8deadSopenharmony_ci 7875bd8deadSopenharmony_ci The <scale> parameter must be one of NONE, SCALE_BY_TWO_NV, 7885bd8deadSopenharmony_ci SCALE_BY_FOUR_NV, or SCALE_BY_ONE_HALF_NV and specifies the 7895bd8deadSopenharmony_ci value of the combiner stage's portion scale, either cscalergb or 7905bd8deadSopenharmony_ci cscalea depending on the <portion> parameter, to 1.0, 2.0, 4.0, 7915bd8deadSopenharmony_ci or 0.5, respectively. 7925bd8deadSopenharmony_ci 7935bd8deadSopenharmony_ci The <bias> parameter must be either NONE or 7945bd8deadSopenharmony_ci BIAS_BY_NEGATIVE_ONE_HALF_NV and specifies the value of the 7955bd8deadSopenharmony_ci combiner stage's portion bias, either cbiasrgb or cbiasa depending 7965bd8deadSopenharmony_ci on the <portion> parameter, to 0.0 or -0.5, respectively. If <scale> 7975bd8deadSopenharmony_ci is either SCALE_BY_ONE_HALF_NV or SCALE_BY_FOUR_NV, a <bias> of 7985bd8deadSopenharmony_ci BIAS_BY_NEGATIVE_ONE_HALF_NV generates an INVALID_OPERATION error. 7995bd8deadSopenharmony_ci 8005bd8deadSopenharmony_ci If the <abDotProduct> parameter is FALSE, then 8015bd8deadSopenharmony_ci 8025bd8deadSopenharmony_ci if <portion> is RGB, out1rgb = max(min(gcc1rgb + cbiasrgb) * cscalergb, 1), -1) 8035bd8deadSopenharmony_ci if <portion> is ALPHA, out1a = max(min((gcc1a + cbiasa) * cscalea, 1), -1) 8045bd8deadSopenharmony_ci 8055bd8deadSopenharmony_ci otherwise <portion> must be RGB and 8065bd8deadSopenharmony_ci 8075bd8deadSopenharmony_ci out1rgb = max(min((gcc2rgb + cbiasrgb) * cscalergb, 1), -1) 8085bd8deadSopenharmony_ci 8095bd8deadSopenharmony_ci If the <cdDotProduct> parameter is FALSE, then 8105bd8deadSopenharmony_ci 8115bd8deadSopenharmony_ci if <portion> is RGB, out2rgb = max(min((gcc3rgb + cbiasrgb) * cscalergb, 1), -1) 8125bd8deadSopenharmony_ci if <portion> is ALPHA, out2a = max(min((gcc2a + cbiasa) * cscalea, 1), -1) 8135bd8deadSopenharmony_ci 8145bd8deadSopenharmony_ci otherwise <portion> must be RGB so 8155bd8deadSopenharmony_ci 8165bd8deadSopenharmony_ci out2rgb = max(min((gcc4rgb + cbiasrgb) * cscalergb, 1), -1) 8175bd8deadSopenharmony_ci 8185bd8deadSopenharmony_ci If the <muxSum> parameter is FALSE, then 8195bd8deadSopenharmony_ci 8205bd8deadSopenharmony_ci if <portion> is RGB, out3rgb = max(min((gcc5rgb + cbiasrgb) * cscalergb, 1), -1) 8215bd8deadSopenharmony_ci if <portion> is ALPHA, out3a = max(min((gcc3a + cbiasa) * cscalea, 1), -1) 8225bd8deadSopenharmony_ci 8235bd8deadSopenharmony_ci otherwise 8245bd8deadSopenharmony_ci 8255bd8deadSopenharmony_ci if <portion> is RGB, out3rgb = max(min((gcc6rgb + cbiasrgb) * cscalergb, 1), -1) 8265bd8deadSopenharmony_ci if <portion> is ALPHA, out3a = max(min((gcc4a + cbiasa) * cscalea, 1), -1) 8275bd8deadSopenharmony_ci 8285bd8deadSopenharmony_ci out1rgb, out2rgb, and out3rgb are written to the RGB portion of 8295bd8deadSopenharmony_ci combiner stage's registers named by <abOutput>, <cdOutput>, and 8305bd8deadSopenharmony_ci <sumOutput> respectively. out1a, out2a, and out3a are written to 8315bd8deadSopenharmony_ci the alpha portion of combiner stage's registers named by <abOutput>, 8325bd8deadSopenharmony_ci <cdOutput>, and <sumOutput> respectively. The parameters <abOutput>, 8335bd8deadSopenharmony_ci <cdOutput>, and <sumOutput> must be either DISCARD_NV or one of 8345bd8deadSopenharmony_ci the register names from table NV_register_combiners.1 that has an output 8355bd8deadSopenharmony_ci status of read/write. If an output is set to DISCARD_NV, that 8365bd8deadSopenharmony_ci output is not written to any register. The error INVALID_OPERATION 8375bd8deadSopenharmony_ci is generated if <abOutput>, <cdOutput>, and <sumOutput> do not all 8385bd8deadSopenharmony_ci name unique register names (though multiple outputs to DISCARD_NV 8395bd8deadSopenharmony_ci are legal). 8405bd8deadSopenharmony_ci 8415bd8deadSopenharmony_ci When the general combiner stage's register set is written based on 8425bd8deadSopenharmony_ci the computed outputs, the updated register set is copied to the 8435bd8deadSopenharmony_ci register set of the subsequent combiner stage in the combiner 8445bd8deadSopenharmony_ci sequence. Copied undefined values are likewise undefined. 8455bd8deadSopenharmony_ci The subsequent combiner stage following the last active general 8465bd8deadSopenharmony_ci combiner stage, indicated by the general combiner stage's number 8475bd8deadSopenharmony_ci being equal to ngc-1, in the sequence is the final combiner 8485bd8deadSopenharmony_ci stage. In other words, the number of general combiner stages 8495bd8deadSopenharmony_ci each fragment is transformed by is determined by the value of 8505bd8deadSopenharmony_ci NUM_GENERAL_COMBINERS_NV. 8515bd8deadSopenharmony_ci 8525bd8deadSopenharmony_ci 3.8.12.3 Final Combiner Stage Operation 8535bd8deadSopenharmony_ci 8545bd8deadSopenharmony_ci The final combiner stage operates differently from the general 8555bd8deadSopenharmony_ci combiner stages. While a general combiner stage updates its register 8565bd8deadSopenharmony_ci set and passes the register set to the next combiner stage, the final 8575bd8deadSopenharmony_ci combiner outputs an RGBA color fcoc, the final combiner output color. 8585bd8deadSopenharmony_ci The final combiner stage is capable of applying the standard OpenGL 8595bd8deadSopenharmony_ci color sum and fog operations, but has the configurability to be 8605bd8deadSopenharmony_ci used for other purposes. 8615bd8deadSopenharmony_ci 8625bd8deadSopenharmony_ci The command 8635bd8deadSopenharmony_ci 8645bd8deadSopenharmony_ci FinalCombinerInputNV(GLenum variable, 8655bd8deadSopenharmony_ci GLenum input, 8665bd8deadSopenharmony_ci GLenum mapping, 8675bd8deadSopenharmony_ci GLenum componentUsage); 8685bd8deadSopenharmony_ci 8695bd8deadSopenharmony_ci controls the assignment of all the final combiner input variables. 8705bd8deadSopenharmony_ci The variables A, B, C, D, E, and F are RGB vectors. The variable 8715bd8deadSopenharmony_ci G is an alpha scalar. The <variable> parameter may be one of 8725bd8deadSopenharmony_ci VARIABLE_A_NV, VARIABLE_B_NV, VARIABLE_C_NV, VARIABLE_D_NV, 8735bd8deadSopenharmony_ci VARIABLE_E_NV, VARIABLE_F_NV, and VARIABLE_G_NV, and determines 8745bd8deadSopenharmony_ci which respective variable of the final combiner stage is updated. 8755bd8deadSopenharmony_ci 8765bd8deadSopenharmony_ci The <input>, <mapping>, and <componentUsage> parameters specify 8775bd8deadSopenharmony_ci the assignment of a value for the input variable indicated by 8785bd8deadSopenharmony_ci <variable>. 8795bd8deadSopenharmony_ci 8805bd8deadSopenharmony_ci The <input> parameter may be any one of the register names from 8815bd8deadSopenharmony_ci table NV_register_combiners.1 or be one of two pseudo-register 8825bd8deadSopenharmony_ci names, either E_TIMES_F_NV or SPARE0_PLUS_SECONDARY_COLOR_NV. 8835bd8deadSopenharmony_ci The value of E_TIMES_F_NV is the product of the value of 8845bd8deadSopenharmony_ci variable E times the value of variable F. The value of 8855bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV is the value the SPARE0_NV 8865bd8deadSopenharmony_ci register mapped using the UNSIGNED_IDENITY_NV input mapping plus 8875bd8deadSopenharmony_ci the value of the SECONDARY_COLOR_NV register mapped using the 8885bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV input mapping. If csc, the color sum clamp, 8895bd8deadSopenharmony_ci is non-FALSE, the value of SPARE0_PLUS_SECONDARY_COLOR_NV is first 8905bd8deadSopenharmony_ci clamped to the range [0,1]. The alpha component of E_TIMES_F_NV 8915bd8deadSopenharmony_ci and SPARE0_PLUS_SECONDARY_COLOR_NV is always zero. 8925bd8deadSopenharmony_ci 8935bd8deadSopenharmony_ci When <variable> is one of VARIABLE_E_NV, VARIABLE_F_NV, 8945bd8deadSopenharmony_ci or VARIABLE_G_NV and <input> is either E_TIMES_F_NV or 8955bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV, generate an INVALID_OPERATION 8965bd8deadSopenharmony_ci error. When <variable> is VARIABLE_A_NV and <input> is 8975bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV, generate an INVALID_OPERATION 8985bd8deadSopenharmony_ci error. 8995bd8deadSopenharmony_ci 9005bd8deadSopenharmony_ci The <componentUsage> parameter may be one of RGB, BLUE, ALPHA 9015bd8deadSopenharmony_ci (with certain restrictions depending on the <variable> and <input> 9025bd8deadSopenharmony_ci as described below). 9035bd8deadSopenharmony_ci 9045bd8deadSopenharmony_ci When the <variable> parameter is not VARIABLE_G_NV, a 9055bd8deadSopenharmony_ci <componentUsage> parameter of RGB indicates that the RGB portion of 9065bd8deadSopenharmony_ci the indicated register should be assigned to the RGB portion of the 9075bd8deadSopenharmony_ci combiner input variable, while an ALPHA <componentUsage> parameter 9085bd8deadSopenharmony_ci indicates that the alpha portion of the indicated register should 9095bd8deadSopenharmony_ci be replicated across the RGB portion of the combiner input variable. 9105bd8deadSopenharmony_ci 9115bd8deadSopenharmony_ci When the <variable> parameter is VARIABLE_G_NV, a <componentUsage> 9125bd8deadSopenharmony_ci parameter of ALPHA indicates that the alpha component of the 9135bd8deadSopenharmony_ci indicated register should be assigned to the alpha portion of the 9145bd8deadSopenharmony_ci G input variable, while a BLUE <componentUsage> parameter indicates 9155bd8deadSopenharmony_ci that the blue component of the indicated register should be assigned 9165bd8deadSopenharmony_ci to the alpha portion of the G input variable. 9175bd8deadSopenharmony_ci 9185bd8deadSopenharmony_ci The INVALID_OPERATION error is generated when <componentUsage> is 9195bd8deadSopenharmony_ci BLUE and <variable> is not VARIABLE_G_NV. The INVALID_OPERATION 9205bd8deadSopenharmony_ci error is generated when <componentUsage> is RGB and <variable> 9215bd8deadSopenharmony_ci is VARIABLE_G_NV. 9225bd8deadSopenharmony_ci 9235bd8deadSopenharmony_ci The INVALID_OPERATION error is generated when both the <input> 9245bd8deadSopenharmony_ci parameter is either E_TIMES_F_NV or SPARE0_PLUS_SECONDARY_COLOR_NV 9255bd8deadSopenharmony_ci and the <componentUsage> parameter is ALPHA or BLUE. 9265bd8deadSopenharmony_ci 9275bd8deadSopenharmony_ci Before the value in the register named by <input> is assigned to 9285bd8deadSopenharmony_ci the specified input variable, a range mapping is performed based 9295bd8deadSopenharmony_ci on <mapping>. The mapping may be either UNSIGNED_IDENTITY_NV 9305bd8deadSopenharmony_ci or UNSIGNED_INVERT_NV and operates as specified in table 9315bd8deadSopenharmony_ci NV_register_combiners.4. 9325bd8deadSopenharmony_ci 9335bd8deadSopenharmony_ci The final combiner stage computes the following expression based 9345bd8deadSopenharmony_ci on the values assigned to the variables A, B, C, D, E, F, and G as 9355bd8deadSopenharmony_ci determined by the combiner state set by FinalCombinerInputNV 9365bd8deadSopenharmony_ci 9375bd8deadSopenharmony_ci fcoc = [ min(ab[r] + iac[r] + D[r], 1.0), 9385bd8deadSopenharmony_ci min(ab[g] + iac[g] + D[g], 1.0), 9395bd8deadSopenharmony_ci min(ab[b] + iac[b] + D[b], 1.0), 9405bd8deadSopenharmony_ci G ] 9415bd8deadSopenharmony_ci 9425bd8deadSopenharmony_ci where 9435bd8deadSopenharmony_ci 9445bd8deadSopenharmony_ci ab = [ A[r]*B[r], A[g]*B[g], A[b]*B[b] ] 9455bd8deadSopenharmony_ci iac = [ (1.0 -A [r])*C[r], (1.0 - A[g])*C[g], (1.0 - A[b])*C[b] ] 9465bd8deadSopenharmony_ci 9475bd8deadSopenharmony_ci 3.8.12.4 Required State 9485bd8deadSopenharmony_ci 9495bd8deadSopenharmony_ci The state required for the register combiners is a bit indicating 9505bd8deadSopenharmony_ci whether register combiners are enabled or disabled, an integer 9515bd8deadSopenharmony_ci indicating how many general combiners are active, a bit indicating 9525bd8deadSopenharmony_ci whether or not the color sum clamp to 1 should be performed, two 9535bd8deadSopenharmony_ci RGBA constant colors, <n> sets of general combiner stage state where 9545bd8deadSopenharmony_ci <n> is the value of MAX_GENERAL_COMBINERS_NV, and the final 9555bd8deadSopenharmony_ci combiner stage state. The per-stage general combiner state consists 9565bd8deadSopenharmony_ci of the RGB input portion state and the alpha input portion state. 9575bd8deadSopenharmony_ci Each portion (RGB and alpha) of the per-stage general combiner 9585bd8deadSopenharmony_ci state consists of: four integers indicating the input register for 9595bd8deadSopenharmony_ci the four variables A, B, C, and D; four integers to indicate each 9605bd8deadSopenharmony_ci variable's range mapping; four bits to indicate whether to use the 9615bd8deadSopenharmony_ci alpha component of the input for each variable; a bit indicating 9625bd8deadSopenharmony_ci whether the AB dot product should be output; a bit indicating 9635bd8deadSopenharmony_ci whether the CD dot product should be output; a bit indicating 9645bd8deadSopenharmony_ci whether the sum or mux output should be output; two integers to 9655bd8deadSopenharmony_ci maintain the output scale and bias enumerants; three integers to 9665bd8deadSopenharmony_ci maintain the output register set names. The final combiner stage 9675bd8deadSopenharmony_ci state consists of seven integers to indicate the input register 9685bd8deadSopenharmony_ci for the seven variables A, B, C, D, E, F, and G; seven integers to 9695bd8deadSopenharmony_ci indicate each variable's range mapping; and seven bits to indicate 9705bd8deadSopenharmony_ci whether to use the alpha component of the input for each variable. 9715bd8deadSopenharmony_ci 9725bd8deadSopenharmony_ci The general combiner per-stage state is initialized as described 9735bd8deadSopenharmony_ci in table NV_register_combiners.5. 9745bd8deadSopenharmony_ci 9755bd8deadSopenharmony_ci [ Table NV_register_combiners.5 ] 9765bd8deadSopenharmony_ci 9775bd8deadSopenharmony_ci Component 9785bd8deadSopenharmony_ci Portion Variable Input Usage Mapping 9795bd8deadSopenharmony_ci ------- -------- ------------------ --------- ---------------------- 9805bd8deadSopenharmony_ci RGB A PRIMARY_COLOR_NV RGB UNSIGNED_IDENTITY_NV 9815bd8deadSopenharmony_ci RGB B ZERO RGB UNSIGNED_INVERT_NV 9825bd8deadSopenharmony_ci RGB C ZERO RGB UNSIGNED_IDENTITY_NV 9835bd8deadSopenharmony_ci RGB D ZERO RGB UNSIGNED_IDENTITY_NV 9845bd8deadSopenharmony_ci alpha A PRIMARY_COLOR_NV ALPHA UNSIGNED_IDENTITY_NV 9855bd8deadSopenharmony_ci alpha B ZERO ALPHA UNSIGNED_INVERT_NV 9865bd8deadSopenharmony_ci alpha C ZERO ALPHA UNSIGNED_IDENTITY_NV 9875bd8deadSopenharmony_ci alpha D ZERO ALPHA UNSIGNED_IDENTITY_NV 9885bd8deadSopenharmony_ci 9895bd8deadSopenharmony_ci The final combiner stage state is initialized as described in table 9905bd8deadSopenharmony_ci NV_register_combiners.6. 9915bd8deadSopenharmony_ci 9925bd8deadSopenharmony_ci [ Table NV_register_combiners.6 ] 9935bd8deadSopenharmony_ci 9945bd8deadSopenharmony_ci Component 9955bd8deadSopenharmony_ci Variable Input Usage Mapping 9965bd8deadSopenharmony_ci -------- -------------------------------- --------- ---------------------- 9975bd8deadSopenharmony_ci A FOG ALPHA UNSIGNED_IDENTITY_NV 9985bd8deadSopenharmony_ci B SPARE0_PLUS_SECONDARY_COLOR_NV RGB UNSIGNED_IDENTITY_NV 9995bd8deadSopenharmony_ci C FOG RGB UNSIGNED_IDENTITY_NV 10005bd8deadSopenharmony_ci D ZERO RGB UNSIGNED_IDENTITY_NV 10015bd8deadSopenharmony_ci E ZERO RGB UNSIGNED_IDENTITY_NV 10025bd8deadSopenharmony_ci F ZERO RGB UNSIGNED_IDENTITY_NV 10035bd8deadSopenharmony_ci G SPARE0_NV ALPHA UNSIGNED_IDENTITY_NV" 10045bd8deadSopenharmony_ci 10055bd8deadSopenharmony_ci -- NEW Section 3.8.11 "Antialiasing Application" 10065bd8deadSopenharmony_ci 10075bd8deadSopenharmony_ci Insert the following paragraph BEFORE the section's first paragraph: 10085bd8deadSopenharmony_ci 10095bd8deadSopenharmony_ci "Register combiners are enabled or disabled using the generic Enable 10105bd8deadSopenharmony_ci and Disable commands, respectively, with the symbolic constant 10115bd8deadSopenharmony_ci REGISTER_COMBINERS_NV. If the register combiners are enabled (and not in color 10125bd8deadSopenharmony_ci index mode), the fragment's color value is replaced with fcoc, the 10135bd8deadSopenharmony_ci final combiner output color, computed in section 3.8.12; otherwise, 10145bd8deadSopenharmony_ci the fragment's color value is the result of the fog application 10155bd8deadSopenharmony_ci in section 3.10." 10165bd8deadSopenharmony_ci 10175bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 10185bd8deadSopenharmony_ciand the Frame Buffer) 10195bd8deadSopenharmony_ci 10205bd8deadSopenharmony_ci None 10215bd8deadSopenharmony_ci 10225bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 10235bd8deadSopenharmony_ci 10245bd8deadSopenharmony_ci None 10255bd8deadSopenharmony_ci 10265bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 10275bd8deadSopenharmony_ci 10285bd8deadSopenharmony_ci -- Section 6.1.3 "Enumerated Queries" 10295bd8deadSopenharmony_ci 10305bd8deadSopenharmony_ci Change the first two sentences (page 182) to say: 10315bd8deadSopenharmony_ci 10325bd8deadSopenharmony_ci "Other commands exist to obtain state variables that are identified by 10335bd8deadSopenharmony_ci a category (clip plane, light, material, combiners, etc.) as well as 10345bd8deadSopenharmony_ci a symbolic constant. These are" 10355bd8deadSopenharmony_ci 10365bd8deadSopenharmony_ci Add to the bottom of the list of function prototypes (page 183): 10375bd8deadSopenharmony_ci 10385bd8deadSopenharmony_ci void GetCombinerInputParameterfvNV(GLenum stage, GLenum portion, GLenum variable, 10395bd8deadSopenharmony_ci GLenum pname, const GLfloat *params); 10405bd8deadSopenharmony_ci void GetCombinerInputParameterivNV(GLenum stage, GLenum portion, GLenum variable, 10415bd8deadSopenharmony_ci GLenum pname, const GLint *params); 10425bd8deadSopenharmony_ci void GetCombinerOutputParameterfvNV(GLenum stage, GLenum portion, GLenum pname, const GLfloat *params); 10435bd8deadSopenharmony_ci void GetCombinerOutputParameterivNV(GLenum stage, GLenum portion, GLenum pname, GLint *params); 10445bd8deadSopenharmony_ci void GetFinalCombinerInputParameterfvNV(GLenum variable, GLenum pname, const GLfloat *params); 10455bd8deadSopenharmony_ci void GetFinalCombinerInputParameterivNV(GLenum variable, GLenum pname, const GLfloat *params); 10465bd8deadSopenharmony_ci 10475bd8deadSopenharmony_ci Add the following paragraph to the end of the section (page 184): 10485bd8deadSopenharmony_ci 10495bd8deadSopenharmony_ci "The GetCombinerInputParameterfvNV, 10505bd8deadSopenharmony_ci GetCombinerInputParameterivNV, GetCombinerOutputParameterfvNV, 10515bd8deadSopenharmony_ci and GetCombinerOutputParameterivNV parameter <stage> may be one of 10525bd8deadSopenharmony_ci COMBINER0_NV, COMBINER1_NV, and so on, indicating which general 10535bd8deadSopenharmony_ci combiner stage to query. The GetCombinerInputParameterfvNV, 10545bd8deadSopenharmony_ci GetCombinerInputParameterivNV, GetCombinerOutputParameterfvNV, 10555bd8deadSopenharmony_ci and GetCombinerOutputParameterivNV parameter <portion> may be 10565bd8deadSopenharmony_ci either RGB or ALPHA, indicating which portion of the general 10575bd8deadSopenharmony_ci combiner stage to query. The GetCombinerInputParameterfvNV 10585bd8deadSopenharmony_ci and GetCombinerInputParameterivNV parameter <variable> may 10595bd8deadSopenharmony_ci be one of VARIABLE_A_NV, VARIABLE_B_NV, VARIABLE_C_NV, 10605bd8deadSopenharmony_ci or VARIABLE_D_NV, indicating which variable of the general 10615bd8deadSopenharmony_ci combiner stage to query. The GetFinalCombinerInputParameterfvNV 10625bd8deadSopenharmony_ci and GetFinalCombinerInputParameterivNV parameter <variable> may be one 10635bd8deadSopenharmony_ci of VARIABLE_A_NV, VARIABLE_B_NV, VARIABLE_C_NV, VARIABLE_D_NV, 10645bd8deadSopenharmony_ci VARIABLE_E_NV, VARIABLE_F_NV, or VARIABLE_G_NV." 10655bd8deadSopenharmony_ci 10665bd8deadSopenharmony_ciAdditions to the GLX Specification 10675bd8deadSopenharmony_ci 10685bd8deadSopenharmony_ci None. 10695bd8deadSopenharmony_ci 10705bd8deadSopenharmony_ciGLX Protocol 10715bd8deadSopenharmony_ci 10725bd8deadSopenharmony_ci Thirteen new GL commands are added. 10735bd8deadSopenharmony_ci 10745bd8deadSopenharmony_ci The following seven rendering commands are sent to the sever as part 10755bd8deadSopenharmony_ci of a glXRender request: 10765bd8deadSopenharmony_ci 10775bd8deadSopenharmony_ci CombinerParameterfNV 10785bd8deadSopenharmony_ci 2 12 rendering command length 10795bd8deadSopenharmony_ci 2 4136 rendering command opcode 10805bd8deadSopenharmony_ci 4 ENUM pname 10815bd8deadSopenharmony_ci 4 FLOAT32 param 10825bd8deadSopenharmony_ci 10835bd8deadSopenharmony_ci CombinerParameterfvNV 10845bd8deadSopenharmony_ci 2 8+4*n rendering command length 10855bd8deadSopenharmony_ci 2 4137 rendering command opcode 10865bd8deadSopenharmony_ci 4 ENUM pname 10875bd8deadSopenharmony_ci 0x852A n=4 GL_CONSANT_COLOR0_NV 10885bd8deadSopenharmony_ci 0x852B n=4 GL_CONSANT_COLOR1_NV 10895bd8deadSopenharmony_ci 0x854E n=1 GL_NUM_GENERAL_COMBINERS_NV 10905bd8deadSopenharmony_ci 0x854F n=1 GL_COLOR_SUM_CLAMP_NV 10915bd8deadSopenharmony_ci else n=0 10925bd8deadSopenharmony_ci 4*n LISTofFLOAT32 params 10935bd8deadSopenharmony_ci 10945bd8deadSopenharmony_ci CombinerParameteriNV 10955bd8deadSopenharmony_ci 2 12 rendering command length 10965bd8deadSopenharmony_ci 2 4138 rendering command opcode 10975bd8deadSopenharmony_ci 4 ENUM pname 10985bd8deadSopenharmony_ci 4 INT32 param 10995bd8deadSopenharmony_ci 11005bd8deadSopenharmony_ci CombinerParameterivNV 11015bd8deadSopenharmony_ci 2 8+4*n rendering command length 11025bd8deadSopenharmony_ci 2 4139 rendering command opcode 11035bd8deadSopenharmony_ci 4 ENUM pname 11045bd8deadSopenharmony_ci 0x852A n=4 GL_CONSANT_COLOR0_NV 11055bd8deadSopenharmony_ci 0x852B n=4 GL_CONSANT_COLOR1_NV 11065bd8deadSopenharmony_ci 0x854E n=1 GL_NUM_GENERAL_COMBINERS_NV 11075bd8deadSopenharmony_ci 0x854F n=1 GL_COLOR_SUM_CLAMP_NV 11085bd8deadSopenharmony_ci else n=0 11095bd8deadSopenharmony_ci 4*n LISTofINT32 params 11105bd8deadSopenharmony_ci 11115bd8deadSopenharmony_ci CombinerInputNV 11125bd8deadSopenharmony_ci 2 28 rendering command length 11135bd8deadSopenharmony_ci 2 4140 rendering command opcode 11145bd8deadSopenharmony_ci 4 ENUM stage 11155bd8deadSopenharmony_ci 4 ENUM portion 11165bd8deadSopenharmony_ci 4 ENUM variable 11175bd8deadSopenharmony_ci 4 ENUM input 11185bd8deadSopenharmony_ci 4 ENUM mapping 11195bd8deadSopenharmony_ci 4 ENUM componentUsage 11205bd8deadSopenharmony_ci 11215bd8deadSopenharmony_ci CombinerOutputNV 11225bd8deadSopenharmony_ci 2 36 rendering command length 11235bd8deadSopenharmony_ci 2 4141 rendering command opcode 11245bd8deadSopenharmony_ci 4 ENUM stage 11255bd8deadSopenharmony_ci 4 ENUM portion 11265bd8deadSopenharmony_ci 4 ENUM abOutput 11275bd8deadSopenharmony_ci 4 ENUM cdOutput 11285bd8deadSopenharmony_ci 4 ENUM sumOutput 11295bd8deadSopenharmony_ci 4 ENUM scale 11305bd8deadSopenharmony_ci 4 ENUM bias 11315bd8deadSopenharmony_ci 1 BOOL abDotProduct 11325bd8deadSopenharmony_ci 1 BOOL cdDotProduct 11335bd8deadSopenharmony_ci 1 BOOL muxSum 11345bd8deadSopenharmony_ci 1 BOOL unused 11355bd8deadSopenharmony_ci 11365bd8deadSopenharmony_ci FinalCombinerInputNV 11375bd8deadSopenharmony_ci 2 20 rendering command length 11385bd8deadSopenharmony_ci 2 4142 rendering command opcode 11395bd8deadSopenharmony_ci 4 ENUM variable 11405bd8deadSopenharmony_ci 4 ENUM input 11415bd8deadSopenharmony_ci 4 ENUM mapping 11425bd8deadSopenharmony_ci 4 ENUM componentUsage 11435bd8deadSopenharmony_ci 11445bd8deadSopenharmony_ci The remaining six commands are non-rendering commands. These commands 11455bd8deadSopenharmony_ci are sent separately (i.e., not as part of a glXRender or glXRenderLarge 11465bd8deadSopenharmony_ci request), using the glXVendorPrivateWithReply request: 11475bd8deadSopenharmony_ci 11485bd8deadSopenharmony_ci GetCombinerInputParameterfvNV 11495bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 11505bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 11515bd8deadSopenharmony_ci 2 7 request length 11525bd8deadSopenharmony_ci 4 1270 vendor specific opcode 11535bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 11545bd8deadSopenharmony_ci 4 ENUM stage 11555bd8deadSopenharmony_ci 4 ENUM portion 11565bd8deadSopenharmony_ci 4 ENUM variable 11575bd8deadSopenharmony_ci 4 ENUM pname 11585bd8deadSopenharmony_ci => 11595bd8deadSopenharmony_ci 1 1 reply 11605bd8deadSopenharmony_ci 1 unused 11615bd8deadSopenharmony_ci 2 CARD16 sequence number 11625bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 11635bd8deadSopenharmony_ci 4 unused 11645bd8deadSopenharmony_ci 4 CARD32 unused 11655bd8deadSopenharmony_ci 11665bd8deadSopenharmony_ci if (n=1) this follows: 11675bd8deadSopenharmony_ci 11685bd8deadSopenharmony_ci 4 FLOAT32 params 11695bd8deadSopenharmony_ci 12 unused 11705bd8deadSopenharmony_ci 11715bd8deadSopenharmony_ci otherwise this follows: 11725bd8deadSopenharmony_ci 11735bd8deadSopenharmony_ci 16 unused 11745bd8deadSopenharmony_ci n*4 LISTofFLOAT32 params 11755bd8deadSopenharmony_ci 11765bd8deadSopenharmony_ci GetCombinerInputParameterivNV 11775bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 11785bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 11795bd8deadSopenharmony_ci 2 7 request length 11805bd8deadSopenharmony_ci 4 1271 vendor specific opcode 11815bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 11825bd8deadSopenharmony_ci 4 ENUM stage 11835bd8deadSopenharmony_ci 4 ENUM portion 11845bd8deadSopenharmony_ci 4 ENUM variable 11855bd8deadSopenharmony_ci 4 ENUM pname 11865bd8deadSopenharmony_ci => 11875bd8deadSopenharmony_ci 1 1 reply 11885bd8deadSopenharmony_ci 1 unused 11895bd8deadSopenharmony_ci 2 CARD16 sequence number 11905bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 11915bd8deadSopenharmony_ci 4 unused 11925bd8deadSopenharmony_ci 4 CARD32 unused 11935bd8deadSopenharmony_ci 11945bd8deadSopenharmony_ci if (n=1) this follows: 11955bd8deadSopenharmony_ci 11965bd8deadSopenharmony_ci 4 INT32 params 11975bd8deadSopenharmony_ci 12 unused 11985bd8deadSopenharmony_ci 11995bd8deadSopenharmony_ci otherwise this follows: 12005bd8deadSopenharmony_ci 12015bd8deadSopenharmony_ci 16 unused 12025bd8deadSopenharmony_ci n*4 LISTofINT32 params 12035bd8deadSopenharmony_ci 12045bd8deadSopenharmony_ci GetCombinerOutputParameterfvNV 12055bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 12065bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 12075bd8deadSopenharmony_ci 2 6 request length 12085bd8deadSopenharmony_ci 4 1272 vendor specific opcode 12095bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 12105bd8deadSopenharmony_ci 4 ENUM stage 12115bd8deadSopenharmony_ci 4 ENUM portion 12125bd8deadSopenharmony_ci 4 ENUM pname 12135bd8deadSopenharmony_ci => 12145bd8deadSopenharmony_ci 1 1 reply 12155bd8deadSopenharmony_ci 1 unused 12165bd8deadSopenharmony_ci 2 CARD16 sequence number 12175bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 12185bd8deadSopenharmony_ci 4 unused 12195bd8deadSopenharmony_ci 4 CARD32 unused 12205bd8deadSopenharmony_ci 12215bd8deadSopenharmony_ci if (n=1) this follows: 12225bd8deadSopenharmony_ci 12235bd8deadSopenharmony_ci 4 FLOAT32 params 12245bd8deadSopenharmony_ci 12 unused 12255bd8deadSopenharmony_ci 12265bd8deadSopenharmony_ci otherwise this follows: 12275bd8deadSopenharmony_ci 12285bd8deadSopenharmony_ci 16 unused 12295bd8deadSopenharmony_ci n*4 LISTofFLOAT32 params 12305bd8deadSopenharmony_ci 12315bd8deadSopenharmony_ci GetCombinerOutputParameterivNV 12325bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 12335bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 12345bd8deadSopenharmony_ci 2 6 request length 12355bd8deadSopenharmony_ci 4 1273 vendor specific opcode 12365bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 12375bd8deadSopenharmony_ci 4 ENUM stage 12385bd8deadSopenharmony_ci 4 ENUM portion 12395bd8deadSopenharmony_ci 4 ENUM pname 12405bd8deadSopenharmony_ci => 12415bd8deadSopenharmony_ci 1 1 reply 12425bd8deadSopenharmony_ci 1 unused 12435bd8deadSopenharmony_ci 2 CARD16 sequence number 12445bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 12455bd8deadSopenharmony_ci 4 unused 12465bd8deadSopenharmony_ci 4 CARD32 unused 12475bd8deadSopenharmony_ci 12485bd8deadSopenharmony_ci if (n=1) this follows: 12495bd8deadSopenharmony_ci 12505bd8deadSopenharmony_ci 4 INT32 params 12515bd8deadSopenharmony_ci 12 unused 12525bd8deadSopenharmony_ci 12535bd8deadSopenharmony_ci otherwise this follows: 12545bd8deadSopenharmony_ci 12555bd8deadSopenharmony_ci 16 unused 12565bd8deadSopenharmony_ci n*4 LISTofINT32 params 12575bd8deadSopenharmony_ci 12585bd8deadSopenharmony_ci GetFinalCombinerInputParameterfvNV 12595bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 12605bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 12615bd8deadSopenharmony_ci 2 5 request length 12625bd8deadSopenharmony_ci 4 1274 vendor specific opcode 12635bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 12645bd8deadSopenharmony_ci 4 ENUM variable 12655bd8deadSopenharmony_ci 4 ENUM pname 12665bd8deadSopenharmony_ci => 12675bd8deadSopenharmony_ci 1 1 reply 12685bd8deadSopenharmony_ci 1 unused 12695bd8deadSopenharmony_ci 2 CARD16 sequence number 12705bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 12715bd8deadSopenharmony_ci 4 unused 12725bd8deadSopenharmony_ci 4 CARD32 unused 12735bd8deadSopenharmony_ci 12745bd8deadSopenharmony_ci if (n=1) this follows: 12755bd8deadSopenharmony_ci 12765bd8deadSopenharmony_ci 4 FLOAT32 params 12775bd8deadSopenharmony_ci 12 unused 12785bd8deadSopenharmony_ci 12795bd8deadSopenharmony_ci otherwise this follows: 12805bd8deadSopenharmony_ci 12815bd8deadSopenharmony_ci 16 unused 12825bd8deadSopenharmony_ci n*4 LISTofFLOAT32 params 12835bd8deadSopenharmony_ci 12845bd8deadSopenharmony_ci GetFinalCombinerInputParameterivNV 12855bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 12865bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 12875bd8deadSopenharmony_ci 2 5 request length 12885bd8deadSopenharmony_ci 4 1275 vendor specific opcode 12895bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 12905bd8deadSopenharmony_ci 4 ENUM variable 12915bd8deadSopenharmony_ci 4 ENUM pname 12925bd8deadSopenharmony_ci => 12935bd8deadSopenharmony_ci 1 1 reply 12945bd8deadSopenharmony_ci 1 unused 12955bd8deadSopenharmony_ci 2 CARD16 sequence number 12965bd8deadSopenharmony_ci 4 m reply length, m = (n==1 ? 0 : n) 12975bd8deadSopenharmony_ci 4 unused 12985bd8deadSopenharmony_ci 4 CARD32 unused 12995bd8deadSopenharmony_ci 13005bd8deadSopenharmony_ci if (n=1) this follows: 13015bd8deadSopenharmony_ci 13025bd8deadSopenharmony_ci 4 INT32 params 13035bd8deadSopenharmony_ci 12 unused 13045bd8deadSopenharmony_ci 13055bd8deadSopenharmony_ci otherwise this follows: 13065bd8deadSopenharmony_ci 13075bd8deadSopenharmony_ci 16 unused 13085bd8deadSopenharmony_ci n*4 LISTofINT32 params 13095bd8deadSopenharmony_ci 13105bd8deadSopenharmony_ciDependencies on NV_texture_shader 13115bd8deadSopenharmony_ci 13125bd8deadSopenharmony_ci If NV_texture_shader is not supported, references to HILO_NV, 13135bd8deadSopenharmony_ci DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_INTENSITY_NV base internal 13145bd8deadSopenharmony_ci formats in this document are invalid and should be ignored. 13155bd8deadSopenharmony_ci 13165bd8deadSopenharmony_ciDependencies on ARB_depth_texture and ARB_shadow -or- SGIX_depth_texture 13175bd8deadSopenharmony_ciand SGIX_shadow 13185bd8deadSopenharmony_ci 13195bd8deadSopenharmony_ci If ARB_depth_texture and ARB_shadow -or- SGIX_depth_texture and 13205bd8deadSopenharmony_ci SGIX_shadow are not supported, references to the DEPTH_COMPONENT base 13215bd8deadSopenharmony_ci internal format in this document are invalid and should be ignored. 13225bd8deadSopenharmony_ci 13235bd8deadSopenharmony_ci If ARB_depth_texture and ARB_shadow are not supported, references 13245bd8deadSopenharmony_ci to the DEPTH_TEXTURE_MODE_ARB state in this document are invalid 13255bd8deadSopenharmony_ci and should be ignored. 13265bd8deadSopenharmony_ci 13275bd8deadSopenharmony_ciDependencies on ARB_color_buffer_float 13285bd8deadSopenharmony_ci 13295bd8deadSopenharmony_ci If ARB_color_buffer_float is also implemented, then the "max(0,x)", 13305bd8deadSopenharmony_ci "max(-1,x)" "min(1,x)", "min(x,1)", and "max(x,-1)" functions used 13315bd8deadSopenharmony_ci in Table NV_register_combiners.4 and the formulas for computing 13325bd8deadSopenharmony_ci out1rgb, out1a, out2rgb, out2a, out3rgb, out3a, and fcoc when 13335bd8deadSopenharmony_ci CLAMP_FRAGMENT_COLOR_ARB is either FIXED_ONLY_ARB when rendering 13345bd8deadSopenharmony_ci to a floating-point color framebuffer or FALSE. 13355bd8deadSopenharmony_ci 13365bd8deadSopenharmony_ci Also when CLAMP_FRAGMENT_COLOR_ARB is either FIXED_ONLY_ARB when 13375bd8deadSopenharmony_ci rendering to a floating-point color framebuffer or FALSE, the 13385bd8deadSopenharmony_ci COLOR COLOR_SUM_CLAMP_NV state operates as if TRUE regardless of 13395bd8deadSopenharmony_ci its actual state. 13405bd8deadSopenharmony_ci 13415bd8deadSopenharmony_ci The intent of these interactions is to eliminate the specified 13425bd8deadSopenharmony_ci clamping behavior of register combiners when CLAMP_FRAGMENT_COLOR_ARB 13435bd8deadSopenharmony_ci indicates clamping should not be performed. 13445bd8deadSopenharmony_ci 13455bd8deadSopenharmony_ciErrors 13465bd8deadSopenharmony_ci 13475bd8deadSopenharmony_ci INVALID_VALUE is generated when CombinerParameterfvNV 13485bd8deadSopenharmony_ci or CombinerParameterivNV is called with <pname> set to 13495bd8deadSopenharmony_ci NUM_GENERAL_COMBINERS and the value pointed to by <params> 13505bd8deadSopenharmony_ci is less than one or greater or equal to the value of 13515bd8deadSopenharmony_ci MAX_GENERAL_COMBINERS_NV. 13525bd8deadSopenharmony_ci 13535bd8deadSopenharmony_ci INVALID_OPERATION is generated when CombinerInputNV is called 13545bd8deadSopenharmony_ci with a <componentUsage> parameter of RGB and a <portion> parameter 13555bd8deadSopenharmony_ci of ALPHA. 13565bd8deadSopenharmony_ci 13575bd8deadSopenharmony_ci INVALID_OPERATION is generated when CombinerInputNV is called 13585bd8deadSopenharmony_ci with a <componentUsage> parameter of BLUE and a <portion> parameter 13595bd8deadSopenharmony_ci of RGB. 13605bd8deadSopenharmony_ci 13615bd8deadSopenharmony_ci INVALID_OPERATION is generated When CombinerInputNV is called with a 13625bd8deadSopenharmony_ci <componentUsage> parameter of ALPHA and an <input> parameter of FOG. 13635bd8deadSopenharmony_ci 13645bd8deadSopenharmony_ci INVALID_VALUE is generated when CombinerOutputNV is called with 13655bd8deadSopenharmony_ci a <portion> parameter of ALPHA, but a non-FALSE value for either 13665bd8deadSopenharmony_ci of the parameters <abDotProduct> or <cdDotProduct>. 13675bd8deadSopenharmony_ci 13685bd8deadSopenharmony_ci INVALID_OPERATION is generated when CombinerOutputNV is called with 13695bd8deadSopenharmony_ci a <scale> of either SCALE_BY_ONE_HALF_NV or SCALE_BY_FOUR_NV and 13705bd8deadSopenharmony_ci a <bias> of BIAS_BY_NEGATIVE_ONE_HALF_NV. 13715bd8deadSopenharmony_ci 13725bd8deadSopenharmony_ci INVALID_OPERATION is generated when CombinerOutputNV is called such 13735bd8deadSopenharmony_ci that <abOutput>, <cdOutput>, and <sumOutput> do not all name unique 13745bd8deadSopenharmony_ci register names (though multiple outputs to DISCARD_NV are legal). 13755bd8deadSopenharmony_ci 13765bd8deadSopenharmony_ci INVALID_OPERATION is generated when FinalCombinerInputNV 13775bd8deadSopenharmony_ci is called where <variable> is one of VARIABLE_E_NV, 13785bd8deadSopenharmony_ci VARIABLE_F_NV, or VARIABLE_G_NV and <input> is E_TIMES_F_NV or 13795bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV. 13805bd8deadSopenharmony_ci 13815bd8deadSopenharmony_ci INVALID_OPERATION is generated when FinalCombinerInputNV 13825bd8deadSopenharmony_ci is called where <variable> is VARIABLE_A_NV and <input> is 13835bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV. 13845bd8deadSopenharmony_ci 13855bd8deadSopenharmony_ci INVALID_OPERATION is generated when FinalCombinerInputNV is called 13865bd8deadSopenharmony_ci with VARIABLE_G_NV for <variable> and RGB for <componentUsage>. 13875bd8deadSopenharmony_ci 13885bd8deadSopenharmony_ci INVALID_OPERATION is generated when FinalCombinerInputNV is called 13895bd8deadSopenharmony_ci with a value other than VARIABLE_G_NV for <variable> and BLUE for 13905bd8deadSopenharmony_ci <componentUsage>. 13915bd8deadSopenharmony_ci 13925bd8deadSopenharmony_ci INVALID_OPERATION is generated when FinalCombinerInputNV is 13935bd8deadSopenharmony_ci called where the <input> parameter is either E_TIMES_F_NV or 13945bd8deadSopenharmony_ci SPARE0_PLUS_SECONDARY_COLOR_NV and the <componentUsage> parameter 13955bd8deadSopenharmony_ci is ALPHA. 13965bd8deadSopenharmony_ci 13975bd8deadSopenharmony_ciNew State 13985bd8deadSopenharmony_ci 13995bd8deadSopenharmony_ci -- (NEW table 6.29, after p217) 14005bd8deadSopenharmony_ci 14015bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 14025bd8deadSopenharmony_ci--------- -------- ---------------------------------- ---------------------- ---------------- -------- -------------- 14035bd8deadSopenharmony_ciREGISTER_COMBINERS_NV B IsEnabled False register 3.8.11 texture/enable 14045bd8deadSopenharmony_ci combiners enable 14055bd8deadSopenharmony_ciNUM_GENERAL_COMBINERS_NV Z+ GetIntegerv 1 number of active 3.8.12.1 texture 14065bd8deadSopenharmony_ci combiner stages 14075bd8deadSopenharmony_ciCOLOR_SUM_CLAMP_NV B GetBooleanv True whether or not 3.8.12.1 texture 14085bd8deadSopenharmony_ci SPARE0_PLUS_ 14095bd8deadSopenharmony_ci SECONDARY_ 14105bd8deadSopenharmony_ci COLOR_NV clamps 14115bd8deadSopenharmony_ci combiner stages 14125bd8deadSopenharmony_ciCONSTANT_COLOR0_NV C GetFloatv 0,0,0,0 combiner constant 3.8.12.1 texture 14135bd8deadSopenharmony_ci color zero 14145bd8deadSopenharmony_ciCONSTANT_COLOR1_NV C GetFloatv 0,0,0,0 combiner constant 3.8.12.1 texture 14155bd8deadSopenharmony_ci color one 14165bd8deadSopenharmony_ciCOMBINER_INPUT_NV Z8x#x2x4 GetCombinerInputParameter*NV see 3.8.12.4 combiner input 3.8.12.2 texture 14175bd8deadSopenharmony_ci variables 14185bd8deadSopenharmony_ciCOMBINER_COMPONENT_USAGE_NV Z3x#x2x4 GetCombinerInputParameter*NV see 3.8.12.4 use alpha for 3.8.12.2 texture 14195bd8deadSopenharmony_ci combiner input 14205bd8deadSopenharmony_ciCOMBINER_MAPPING_NV Z8x#x2x4 GetCombinerInputParameter*NV see 3.8.12.4 complement 3.8.12.2 texture 14215bd8deadSopenharmony_ci combiner input 14225bd8deadSopenharmony_ciCOMBINER_AB_DOT_PRODUCT_NV Bx#x2 GetCombinerOutputParameter*NV False output AB dot 3.8.12.3 texture 14235bd8deadSopenharmony_ci product 14245bd8deadSopenharmony_ciCOMBINER_CD_DOT_PRODUCT_NV Bx#x2 GetCombinerOutputParameter*NV False output CD dot 3.8.12.3 texture 14255bd8deadSopenharmony_ci product 14265bd8deadSopenharmony_ciCOMBINER_MUX_SUM_NV Bx#x2 GetCombinerOutputParameter*NV False output mux sum 3.8.12.3 texture 14275bd8deadSopenharmony_ciCOMBINER_SCALE_NV Z2x#x2 GetCombinerOutputParameter*NV NONE output scale 3.8.12.3 texture 14285bd8deadSopenharmony_ciCOMBINER_BIAS_NV Z2x#x2 GetCombinerOutputParameter*NV NONE output bias 3.8.12.3 texture 14295bd8deadSopenharmony_ciCOMBINER_AB_OUTPUT_NV Z7x#x2 GetCombinerOutputParameter*NV DISCARD_NV AB output 3.8.12.3 texture 14305bd8deadSopenharmony_ci register 14315bd8deadSopenharmony_ciCOMBINER_CD_OUTPUT_NV Z7x#x2 GetCombinerOutputParameter*NV DISCARD_NV CD output 3.8.12.3 texture 14325bd8deadSopenharmony_ci register 14335bd8deadSopenharmony_ciCOMBINER_SUM_OUTPUT_NV Z7x#x2 GetCombinerOutputParameter*NV SPARE0_NV sum output 3.8.12.3 texture 14345bd8deadSopenharmony_ci register 14355bd8deadSopenharmony_ciCOMBINER_INPUT_NV Z10x7 GetFinalCombinerInputParameter*NV see 3.8.12.4 final combiner 3.8.12.4 texture 14365bd8deadSopenharmony_ci input 14375bd8deadSopenharmony_ciCOMBINER_MAPPING_NV Z2x7 GetFinalCombinerInputParameter*NV UNSIGNED_IDENTITY_NV final combiner 3.8.12.4 texture 14385bd8deadSopenharmony_ci input mapping 14395bd8deadSopenharmony_ciCOMBINER_COMPONENT_USAGE_NV Z2x7 GetFinalCombinerInputParameter*NV see 3.8.12.4 use alpha for 3.8.12.4 texture 14405bd8deadSopenharmony_ci final combiner 14415bd8deadSopenharmony_ci input mapping 14425bd8deadSopenharmony_ci 14435bd8deadSopenharmony_ci[ where # is the value of MAX_GENERAL_COMBINERS_NV ] 14445bd8deadSopenharmony_ci 14455bd8deadSopenharmony_ciNew Implementation Dependent State 14465bd8deadSopenharmony_ci 14475bd8deadSopenharmony_ci(table 6.24, p214) add the following entry: 14485bd8deadSopenharmony_ci 14495bd8deadSopenharmony_ci Get Value Type Get Command Minimum Value Description Sec Attribute 14505bd8deadSopenharmony_ci -------------------------- ---- ----------- ------------- ---------------- ------ -------------- 14515bd8deadSopenharmony_ci MAX_GENERAL_COMBINERS_NV Z+ GetIntegerv 2 Maximum num of 3.8.12 - 14525bd8deadSopenharmony_ci general combiner 14535bd8deadSopenharmony_ci 14545bd8deadSopenharmony_ciNVIDIA Implementation Details 14555bd8deadSopenharmony_ci 14565bd8deadSopenharmony_ci The effective range of the RGB portion of the final combiner should 14575bd8deadSopenharmony_ci be [0,4] if the color sum clamp is false. Exercising this range 14585bd8deadSopenharmony_ci requires assigning SPARE0_PLUS_SECONDARY_COLOR_NV to the D variable 14595bd8deadSopenharmony_ci and either B or C or both B and C. In practice this is a very 14605bd8deadSopenharmony_ci unlikely configuration. 14615bd8deadSopenharmony_ci 14625bd8deadSopenharmony_ci However due to a bug in the GeForce 256 and Quadro hardware, values 14635bd8deadSopenharmony_ci generated above 2 in the RGB portion of the final combiner will be 14645bd8deadSopenharmony_ci computed incorrectly. GeForce2 GTS and subsequent NVIDIA GPUs have 14655bd8deadSopenharmony_ci fixed this bug. 14665bd8deadSopenharmony_ci 14675bd8deadSopenharmony_ci The behavior of the SIGNED_NEGATE_NV mapping mode is undefined on 14685bd8deadSopenharmony_ci GeForce3 GPUs (NV20) when used to map the initial value of a texture 14695bd8deadSopenharmony_ci register corresponding to an enabled texture with a base internal 14705bd8deadSopenharmony_ci format of GL_DEPTH_COMPONENT and a GL_TEXTURE_COMPARE_MODE_ARB mode of 14715bd8deadSopenharmony_ci GL_COMPARE_R_TO_TEXTURE (or for SGIX_shadow, GL_TEXTURE_COMPARE_SGIX 14725bd8deadSopenharmony_ci mode of true) mode when multiple enabled textures have different 14735bd8deadSopenharmony_ci values for GL_TEXTURE_COMPARE_FUNC_ARB (or for SGIX_shadow, 14745bd8deadSopenharmony_ci GL_TEXTURE_COMPARE_OPERATOR_SGIX). Values subsequently assigned 14755bd8deadSopenharmony_ci to such registers and then mapped with SIGNED_NEGATIE_NV operate 14765bd8deadSopenharmony_ci as expected. This issue does not affect GeForce4 Ti (NV25) and 14775bd8deadSopenharmony_ci subsequent GPUs. 14785bd8deadSopenharmony_ci 14795bd8deadSopenharmony_ciRevision History 14805bd8deadSopenharmony_ci 14815bd8deadSopenharmony_ci April 4, 2000 - Document that alpha component of the FOG register 14825bd8deadSopenharmony_ci should be zero when fog is disabled. The Release 4 NVIDIA drivers 14835bd8deadSopenharmony_ci have a bug where this is not always true (though it often still is). 14845bd8deadSopenharmony_ci The bug is fixed in the Release 5 NVIDIA drivers. 14855bd8deadSopenharmony_ci 14865bd8deadSopenharmony_ci June 8, 2000 - The alpha component of the FOG register is not 14875bd8deadSopenharmony_ci available for use until the final combiner. The specification 14885bd8deadSopenharmony_ci previously incorrectly stated: 14895bd8deadSopenharmony_ci 14905bd8deadSopenharmony_ci "INVALID_OPERATION is generated When CombinerInputNV is called with 14915bd8deadSopenharmony_ci a <portion> parameter of ALPHA and an <input> parameter of FOG." 14925bd8deadSopenharmony_ci 14935bd8deadSopenharmony_ci It is actually the <componentUsage> (not the <portion>) that should 14945bd8deadSopenharmony_ci not be allowed to be ALPHA. The Release 4 NVIDIA drivers implemented 14955bd8deadSopenharmony_ci the above incorrect error check. The Release 5 (and later) NVIDIA 14965bd8deadSopenharmony_ci drivers (after June 8, 2000) have fixed this bug and correctly 14975bd8deadSopenharmony_ci implement the error based on <componentUsage>. 14985bd8deadSopenharmony_ci 14995bd8deadSopenharmony_ci The specification previously did not allow BLUE for the 15005bd8deadSopenharmony_ci <componentUsage> of the G variable in the final combiner. This is 15015bd8deadSopenharmony_ci now allowed in the Release 5 (and later) NVIDIA drivers (after June 15025bd8deadSopenharmony_ci 8, 2000). The Release 4 NVIDIA drivers do not permit BLUE for the 15035bd8deadSopenharmony_ci <componentUsage> of the G variable and generate an INVALID_OPERATION 15045bd8deadSopenharmony_ci error if this is attempted. The Release 5 NVIDIA drivers (after June 15055bd8deadSopenharmony_ci 8, 2000) have fixed this bug and permit BLUE for the <componentUsage> 15065bd8deadSopenharmony_ci of the G variable. 15075bd8deadSopenharmony_ci 15085bd8deadSopenharmony_ci August 11, 2000 - The "mux" operation was incorrectly documented in 15095bd8deadSopenharmony_ci previous versions of this specification. The correct mux behave is 15105bd8deadSopenharmony_ci as follows: 15115bd8deadSopenharmony_ci 15125bd8deadSopenharmony_ci spare0_alpha >= 0.5 ? C*D : A*B 15135bd8deadSopenharmony_ci 15145bd8deadSopenharmony_ci or 15155bd8deadSopenharmony_ci 15165bd8deadSopenharmony_ci spare0_alpha < 0.5 ? A*B : C*D 15175bd8deadSopenharmony_ci 15185bd8deadSopenharmony_ci Previous versions of this specification had the mux sense reversed. 15195bd8deadSopenharmony_ci 15205bd8deadSopenharmony_ci October 31, 2000 - The initial general combiner state 15215bd8deadSopenharmony_ci was misdocumented for the B variable. Previously, Table 15225bd8deadSopenharmony_ci NV_register_combiners.5 said that the RGB and alpha inputs for B 15235bd8deadSopenharmony_ci were GL_TEXTURE#_ARB and the RGB and alpha input mappings for B 15245bd8deadSopenharmony_ci were GL_UNSIGNED_IDENTITY_NV. The table is now updated so that the 15255bd8deadSopenharmony_ci RGB and alpha inputs for B are GL_ZERO and the RGB and alpha input 15265bd8deadSopenharmony_ci mappings for B are GL_UNSIGNED_INVERT_NV. The implementation has 15275bd8deadSopenharmony_ci always behaved in the manner described by the updated specification. 15285bd8deadSopenharmony_ci 15295bd8deadSopenharmony_ci December 13, 2000 - Added a new table NV_register_combiners.2 15305bd8deadSopenharmony_ci describing the correspondence of texture components to register 15315bd8deadSopenharmony_ci components for texture registers. This table is based on the 15325bd8deadSopenharmony_ci table in the EXT_texture_env_combine extension. The table includes 15335bd8deadSopenharmony_ci correspondences for HILO, DSDT, DSDT_MAG, DSDT_MAG_INTENSITY, and 15345bd8deadSopenharmony_ci DEPTH_COMPONENT formatted textures when supported in conjunction 15355bd8deadSopenharmony_ci with the NV_texture_shader, SGIX_depth_texture, and SGIX_shadow 15365bd8deadSopenharmony_ci extensions. 15375bd8deadSopenharmony_ci 15385bd8deadSopenharmony_ci Because a new table 2 was inserted, all the tables beyond it are 15395bd8deadSopenharmony_ci renumbered. 15405bd8deadSopenharmony_ci 15415bd8deadSopenharmony_ci Document the behavior of SIGNED_NEGATE_NV in conjunction with shadow 15425bd8deadSopenharmony_ci mapping in the "NVIDIA Implementation Details" section. 15435bd8deadSopenharmony_ci 15445bd8deadSopenharmony_ci June 28, 2002 - Properly document NV_register_combiners interactions 15455bd8deadSopenharmony_ci with the ARB_depth_texture and ARB_shadow extensions (previously, 15465bd8deadSopenharmony_ci the extension just addressed the SGIX versions of these extensions). 15475bd8deadSopenharmony_ci 15485bd8deadSopenharmony_ci September 30, 2003 - Remove an error (not implemented in early NVIDIA 15495bd8deadSopenharmony_ci drivers prior to Release 4x.xx drivers; implemented in Relase 15505bd8deadSopenharmony_ci 4x.xx drivers; and again removed for Release 5x.xx drivers and up) 15515bd8deadSopenharmony_ci that was meant to restrict the API to not allow the summing of dot 15525bd8deadSopenharmony_ci product outputs. NVIDIA hardware handles this case correctly however 15535bd8deadSopenharmony_ci so the functionality might as well be supported; some applications 15545bd8deadSopenharmony_ci found it useful. The deleted error read: 15555bd8deadSopenharmony_ci 15565bd8deadSopenharmony_ci If the <abDotProduct> or <cdDotProduct> parameter is non-FALSE, 15575bd8deadSopenharmony_ci the value of the <sumOutput> parameter must be GL_DISCARD_NV; 15585bd8deadSopenharmony_ci otherwise, generate an INVALID_OPERATION error. 15595bd8deadSopenharmony_ci 15605bd8deadSopenharmony_ci October 19, 2006 - Add interaction with ARB_color_buffer_float to 15615bd8deadSopenharmony_ci document how ths extension behaves when ARB_color_buffer_float is 15625bd8deadSopenharmony_ci also supported and when its CLAMP_FRAGMENT_COLOR_ARB state is either 15635bd8deadSopenharmony_ci FIXED_ONLY_ARB when rendering to a floating-point color framebuffer 15645bd8deadSopenharmony_ci or FALSE. 1565