r300g: EXT_provoking_vertex.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 27 Jun 2009 04:48:09 +0000 (21:48 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 27 Jun 2009 04:48:09 +0000 (21:48 -0700)
src/gallium/drivers/r300/r300_reg.h
src/gallium/drivers/r300/r300_state.c

index 229afc6635e620e1ce4740f59a7b410229155227..e57535fe9e1113635ecb092cd41aaddca41ae9f6 100644 (file)
@@ -1064,8 +1064,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
         R300_GA_COLOR_CONTROL_RGB2_SHADING_FLAT | \
         R300_GA_COLOR_CONTROL_ALPHA2_SHADING_FLAT | \
         R300_GA_COLOR_CONTROL_RGB3_SHADING_FLAT | \
-        R300_GA_COLOR_CONTROL_ALPHA3_SHADING_FLAT | \
-        R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST )
+        R300_GA_COLOR_CONTROL_ALPHA3_SHADING_FLAT )
 
 #       define R300_SHADE_MODEL_SMOOTH ( \
         R300_GA_COLOR_CONTROL_RGB0_SHADING_GOURAUD | \
@@ -1075,8 +1074,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
         R300_GA_COLOR_CONTROL_RGB2_SHADING_GOURAUD | \
         R300_GA_COLOR_CONTROL_ALPHA2_SHADING_GOURAUD | \
         R300_GA_COLOR_CONTROL_RGB3_SHADING_GOURAUD | \
-        R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD | \
-        R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST )
+        R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD )
 
 /* Specifies red & green components of fill color -- S312 format -- Backwards comp. */
 #define R300_GA_SOLID_RG                         0x427c
index d70ef6ba28f3a6719093351abc8d363fa5c78cba..163b14ef8e6ad9e41268eea5cf528c7b4e160030 100644 (file)
@@ -421,6 +421,10 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
         rs->color_control = R300_SHADE_MODEL_SMOOTH;
     }
 
+    if (!state->flatshade_first) {
+        rs->color_control |= R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST;
+    }
+
     return (void*)rs;
 }