intel / DRI2: When available, use DRI2GetBuffersWithFormat
[mesa.git] / src / mesa / state_tracker / st_atom_rasterizer.c
index 5eef4ebe92e58caa21b63927c70f6914531f8994..61687fbc3e285c7049691517133e28532452ec1b 100644 (file)
@@ -79,8 +79,6 @@ static void update_raster_state( struct st_context *st )
 
    memset(raster, 0, sizeof(*raster));
 
-   raster->origin_lower_left = 1; /* Always true for OpenGL */
-   
    /* _NEW_POLYGON, _NEW_BUFFERS
     */
    {
@@ -107,12 +105,15 @@ static void update_raster_state( struct st_context *st )
    /* _NEW_LIGHT | _NEW_PROGRAM
     *
     * Back-face colors can come from traditional lighting (when
-    * GL_LIGHT_MODEL_TWO_SIDE is set) or from vertex programs (when
+    * GL_LIGHT_MODEL_TWO_SIDE is set) or from vertex programs/shaders (when
     * GL_VERTEX_PROGRAM_TWO_SIDE is set).  Note the logic here.
     */
    if (ctx->VertexProgram._Current) {
-      if (ctx->VertexProgram._Enabled) {
-         /* user-defined program */
+      if (ctx->VertexProgram._Enabled ||
+          (ctx->Shader.CurrentProgram &&
+           ctx->Shader.CurrentProgram->VertexProgram &&
+           ctx->Shader.CurrentProgram->LinkStatus)) {
+         /* user-defined vertex program or shader */
          raster->light_twoside = ctx->VertexProgram.TwoSideEnabled;
       }
       else {