r600c: only colors can be flat shaded
authorAndre Maasikas <amaasikas@gmail.com>
Mon, 24 Jan 2011 08:17:46 +0000 (10:17 +0200)
committerAndre Maasikas <amaasikas@gmail.com>
Mon, 24 Jan 2011 08:23:19 +0000 (10:23 +0200)
fixes stellarium text and menu display

src/mesa/drivers/dri/r600/evergreen_fragprog.c
src/mesa/drivers/dri/r600/r700_fragprog.c

index cfb923efdd542f90cc1ad6841539f447fd30d2fc..e527c379b6203448818a6e3a33608ae67abd3016 100644 (file)
@@ -624,10 +624,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
 
     unBit = 1 << VERT_RESULT_COL0;
@@ -663,10 +660,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
 
     for(i=0; i<8; i++)
@@ -694,10 +688,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
     unBit = 1 << FRAG_ATTRIB_PNTC;
     if(mesa_fp->Base.InputsRead & unBit)
@@ -706,10 +697,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
     }
 
@@ -725,10 +713,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
             SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                             SEMANTIC_shift, SEMANTIC_mask);
-            if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                       SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                       CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
         }
     }
 
index 0323e32d70537236ee32bc3d497a2a609ccccf38..40494cd6af087f9297de0c532b7779147e9c0ad0 100644 (file)
@@ -657,10 +657,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
             SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (r700->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
 
     unBit = 1 << VERT_RESULT_COL0;
@@ -696,10 +693,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
             SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (r700->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
 
     for(i=0; i<8; i++)
@@ -728,10 +722,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
             SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                      SEMANTIC_shift, SEMANTIC_mask);
-            if (r700->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                    SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                    CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
     }
     unBit = 1 << FRAG_ATTRIB_PNTC;
     if(mesa_fp->Base.InputsRead & unBit)
@@ -759,10 +750,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
             SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
             SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
                             SEMANTIC_shift, SEMANTIC_mask);
-            if (r700->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
-                       SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
-            else
-                       CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+            CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
         }
     }