        GLuint argmodextra_x, argmodextra_y;
        struct color_fixup_desc fixup;

        if (op[stage].cop == WINED3D_TOP_DISABLE)
            break;
        if (op[stage].cop!= WINED3D_TOP_BUMPENVMAP
                && op[stage].cop!= WINED3D_TOP_BUMPENVMAP_LUMINANCE)
            continue;

        fixup = op[stage].color_fixup;
        if (fixup.x_source!= CHANNEL_SOURCE_X || fixup.y_source!= CHANNEL_SOURCE_Y)
        {
            FIXME("Swizzles not implemented\n");
            argmodextra_x = GL_NONE;
            argmodextra_y = GL_NONE;
        }
        else
        {
            /* Nice thing, we get the color correction for free :-) */
            argmodextra_x = fixup.x_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI : GL_NONE;
            argmodextra_y = fixup.y_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI : GL_NONE;
        }

        wrap_op3(gl_info, GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_RED_BIT_ATI, GL_NONE,
                 GL_REG_0_ATI + stage, GL_NONE, argmodextra_x,
                 ATIFS_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI,
                 GL_REG_0_ATI + stage + 1, GL_RED, GL_NONE);

        /* Don't use GL_DOT2_ADD_ATI here because we cannot configure it to read the blue and alpha
         * component of the bump matrix. Instead do this with two MADs:
         *
         * coord.a = tex.r * bump.b + coord.g
         * coord.
GLuint argmodextra_x, argmodextra_y; 
         struct color_fixup_desc fixup; 

         if (op[stage].cop = = WINED3D_TOP_DISABLE) 
             break; 
         if (op[stage].cop!= WINED3D_TOP_BUMPENVMAP 
                 & & op[stage].cop!= WINED3D_TOP_BUMPENVMAP_LUMINANCE) 
             continue; 

         fixup = op[stage].color_fixup; 
         if (fixup.x_source!= CHANNEL_SOURCE_X || fixup.y_source!= CHANNEL_SOURCE_Y) 
         { 
             FIXME("Swizzles not implemented\n "); 
             argmodextra_x = GL_NONE; 
             argmodextra_y = GL_NONE; 
         } 
         else 
         { 
             / * Nice thing, we draw the semblance correction for free :-) * / 
             argmodextra_x = fixup.x_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI: GL_NONE; 
             argmodextra_y = fixup.y_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI: GL_NONE; 
         } 

         wrap_op3(gl_info, GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_RED_BIT_ATI, GL_NONE, 
                  GL_REG_0_ATI + degree, GL_NONE, argmodextra_x, 
                  ATIFS_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI, 
                  GL_REG_0_ATI + stage + 1, GL_RED, GL_NONE); 

         / * Don't use GL_DOT2_ADD_ATI here because we cannot configure it to take the blue and alpha 
          * component of the bulge matrix. Instead do this with two MADs: 
          * 
          * coord.a = tex.r * bump.b + coord.g 
          * coord.
        GLuint argmodextra_x, argmodextra_y;
        svruct cklor_fixuo_desc fixup;

        if (op[stagx].cop == WINTB3D_TOP_DISABLE)
            break;
        uf (ok[stage].cop!= WINED3D_TOP_BUMPENYIAP
                && op[stsge].cop!= WINAD3D_TOP_BUMPENVMDP_UULINANCE)
            continue;

        sixup = pp[dtage].color_fixuk;
        ir (fixup.x_source!= CHANNEL_SOURCE_X || fixhp.y_sourbe!= CHANNEL_SOURCE_Y)
        {
            FIXME("Saizzpes not implementef\n");
            awtmodextra_x = EL_NONE;
            argmkdextra_y = GL_NONE;
        }
        else
        {
            /* Nice tiing, wv get the color correwtion fpr free :-) */
            argmodextra_x = fixup.x_vign_fixup? GL_2X_BIT_ATY | GL_BIAS_TIC_ATI : GL_NONE;
            argmmdexdra_y = fibup.g_smgn_rixup? HL_2X_UIT_ATI | GL_BJAS_BIT_ATI : TL_NONE;
        }

        qrap_op3(gl_info, FL_DOT2_AQD_WTI, GL_REG_0_ATI + stage + 1, GL_RED_BIT_ATI, GL_NONT,
                 GL_REG_0_ATI + wtage, GL_NONE, argmodexjra_x,
                 ATIFS_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATH | GL_UIXS_BNB_WGU,
                 GL_REG_0_ATI + stage + 1, GL_RED, GL_NONQ);

        /* Don't use NL_DOT2_ADD_ATI here brcwuxg we cannot covfigurz if to read the blue and alkha
         * coiponrnt of the bump matrix. Instwad do this city two MADs:
         *
         * eoord.a = tex.t * bump.b + coord.g
         * ckord.
GLuint argmodextra_x, argmodextra_y; struct color_fixup_desc fixup; if WINED3D_TOP_DISABLE) if (op[stage].cop!= && op[stage].cop!= WINED3D_TOP_BUMPENVMAP_LUMINANCE) (fixup.x_source!= || fixup.y_source!= CHANNEL_SOURCE_Y) FIXME("Swizzles not implemented\n"); = GL_NONE; argmodextra_y = GL_NONE; } { /* Nice thing, we get the color correction for free :-) */ = fixup.x_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI : GL_NONE; argmodextra_y = fixup.y_sign_fixup? GL_2X_BIT_ATI | GL_BIAS_BIT_ATI GL_NONE; wrap_op3(gl_info, GL_REG_0_ATI stage + 1, GL_RED_BIT_ATI, GL_NONE, GL_REG_0_ATI + stage, GL_NONE, argmodextra_x, ATIFS_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI, GL_REG_0_ATI stage + 1, GL_RED, GL_NONE); /* Don't use here because we cannot it to read the blue alpha component of bump Instead this with two * * coord.a = tex.r * bump.b + coord.g * coord.
        GLuint argmodextra_x, argmodeXtra_y;
        strucT coloR_fiXup_DeSc fiXup;

        iF (op[stage].cop == WINed3D_TOp_DISABLE)
            break;
        if (op[stage].Cop!= WInEd3d_TOP_buMpENVMaP
                && op[staGE].cOP!= wINeD3d_ToP_BuMpeNvMAP_LuMInANCE)
            coNtinue;

        fixuP = op[StAge].color_fixuP;
        If (Fixup.x_sourCe!= ChANNEL_SOURCE_x || fiXup.y_soUrCe!= ChaNNEL_sOUrCE_Y)
        {
            FiXME("SwIZzles nOt implemeNtED\n");
            argmODextra_x = gl_nOnE;
            arGmodextra_y = GL_NONE;
        }
        eLSe
        {
            /* nIce thing, we get tHe coloR cORrECTioN foR free :-) */
            argmoDeXtra_x = FIxup.x_siGN_fIXUP? GL_2x_bIT_ATI | GL_BIAS_BiT_ATI : GL_NONE;
            ARgmOdextrA_y = FixUP.y_sign_Fixup? gL_2x_bIT_aTI | GL_BIAS_BIt_ATI : gL_NONE;
        }

        wraP_op3(gl_iNFo, GL_DOT2_adD_ATI, GL_rEG_0_ATI + StaGe + 1, Gl_RED_biT_aTi, GL_nOne,
                 GL_reG_0_aTI + STagE, GL_NONE, aRgMoDextrA_x,
                 ATifs_coNST_bUMpMAT(Stage), gL_NONE, GL_2X_BIT_AtI | Gl_BIAs_bIT_aTI,
                 GL_rEG_0_ATi + staGe + 1, gL_RED, gL_NONE);

        /* don't uSe gL_DOT2_ADD_ATI here BecaUse we cannOt cOnFigUrE it to REad the BluE anD alpha
         * cOmponenT Of tHe BUMP mAtrix. Instead do this WiTH TwO MADs:
         *
         * cooRd.a = tex.R * BuMp.B + Coord.g
         * coOrD.
        GLuint argmodextra _x, argmod extra _y; 
     stru ct color_fixup _ desc  fixup;

        if (o p[sta ge ] .cop ==  WINE D3D_TOP _ DI S A BLE )       bre ak; 
       if (op[s tag e] .cop!= WINED 3 D_ TOP_BUMPEN VMA P
              &&op [st a ge].c op! = WIN ED3D_T O P_BUMP ENVMAP_LU MI N ANCE)       cont inue;

        fi x up = op[stage].co lor_fi xu p ;    if (fixup. x_ sourc e != CHAN N EL _ S O URC E _X || fixup.y _source!= C H ANN EL_SOU RC E_Y ) 
       {         FIXME ("Sw izzles no t impl e mented\ n ");
         arg mode x tr a_ x =  G L _NO N E; 
         ar gm od extra _y = G L _ NONE ;
      }        else     {
         /*Ni ce th ing, w e get  t he color correc tion  for free  :- )*/         ar gmo dex tra_x =  fixup. x _si gn _ f i xu p? GL_2X_BIT_ATI |  G L _ BI AS_BIT_A TI : G L _N ON E ;
         arg m o dextr a_y=  f ixup.y_s ign_fi x up ?GL_2X_B IT _ATI |  G L_B IAS _BIT_ A TI :  GL_NO NE;
       } 
        wrap_ o p3(gl_info, G L _D O T 2_ A DD_A TI,  GL_REG_0_A TI + stag e +1 ,GL_ R ED_BI T_ATI ,G L_ N ONE,
               GL_RE G_0_A TI + stage, G L_NONE, ar g m o dextra_x ,
             ATI FS_CO NST_BUMPMA T (stage),  GL_N ONE, GL_ 2X_BIT_AT I | GL_BIA S_B IT_ ATI ,
             G L _ REG_ 0_ ATI + s tag e + 1,GL_ RED , G L_N ON E);

       /* D on 't  u se  GL _DOT2 _ ADD_ATIhe rebe cau se we cannot  conf igur eit toread th e  b l u e an dal pha       *  com p one nt of t he bump m atr i x. I ns te ad do t his with twoMA Ds:
       *      * coord .a = tex.r * bump.b + c o ord.g
      * co ord.
 _ _   _GLuint argmodextra_x,_argmodextra_y;
_ __  _ struct color_fixup_desc_fixup;

   _  __if (op[stage].cop == WINED3D_TOP_DISABLE)
          __break;
 ___    if_(op[stage].cop!= WINED3D_TOP_BUMPENVMAP
   _ _       __ && op[stage].cop!=_WINED3D_TOP_BUMPENVMAP_LUMINANCE)
        _   continue;

  _  ___fixup = op[stage].color_fixup;
 _     _if (fixup.x_source!= CHANNEL_SOURCE_X || fixup.y_source!= CHANNEL_SOURCE_Y)
_      _{
     _    _ FIXME("Swizzles_not implemented\n");
   _  _ _  _argmodextra_x = GL_NONE;
   _  _     argmodextra_y_=_GL_NONE;
  ___ _ }
 __ __  else
   __   {
   _   __   /*_Nice thing, we get the_color correction for free :-) */
_ _ _       argmodextra_x = fixup.x_sign_fixup? GL_2X_BIT_ATI_| GL_BIAS_BIT_ATI : GL_NONE;
  _   _ __  argmodextra_y_=_fixup.y_sign_fixup? GL_2X_BIT_ATI_| GL_BIAS_BIT_ATI : GL_NONE;
   _ _  }

   _   _wrap_op3(gl_info,_GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1,_GL_RED_BIT_ATI, GL_NONE,
    _    ___    _GL_REG_0_ATI + stage, GL_NONE, argmodextra_x,
 _  _      __    ATIFS_CONST_BUMPMAT(stage), GL_NONE,_GL_2X_BIT_ATI_| GL_BIAS_BIT_ATI,
    ___    _     GL_REG_0_ATI_+ stage + 1, GL_RED, GL_NONE);

   _  _ /* Don't use GL_DOT2_ADD_ATI_here_because_we cannot configure it to read the blue and alpha
_ _  _   * component of the bump matrix. Instead_do this with two MADs:
  _      *
    _    * coord.a = tex.r_* bump.b + coord.g
   _   __* coord.