glsl: lower mediump temporaries to 16 bits except structures (v2)
[mesa.git] / src / mesa / state_tracker / st_atom_stipple.c
index a30215ff326ab4163fbdb1f66ac277a45763a888..86a4247f3269d4327b8c52c3f015b4912ba999f9 100644 (file)
@@ -60,9 +60,9 @@ invert_stipple(GLuint dest[32], const GLuint src[32], GLuint winHeight)
 }
 
 
-
-static void 
-update_stipple( struct st_context *st )
+/** Update the stipple when the pattern or window height changes */
+void
+st_update_polygon_stipple( struct st_context *st )
 {
    const struct gl_context *ctx = st->ctx;
    const GLuint sz = sizeof(st->state.poly_stipple);
@@ -74,15 +74,13 @@ update_stipple( struct st_context *st )
 
       memcpy(st->state.poly_stipple, ctx->PolygonStipple, sz);
 
-      invert_stipple(newStipple.stipple, ctx->PolygonStipple,
-                     ctx->DrawBuffer->Height);
+      if (!ctx->DrawBuffer->FlipY) {
+         memcpy(newStipple.stipple, ctx->PolygonStipple, sizeof(newStipple.stipple));
+      } else {
+         invert_stipple(newStipple.stipple, ctx->PolygonStipple,
+                        ctx->DrawBuffer->Height);
+      }
 
       st->pipe->set_polygon_stipple(st->pipe, &newStipple);
    }
 }
-
-
-/** Update the stipple when the pattern or window height changes */
-const struct st_tracked_state st_update_polygon_stipple = {
-   update_stipple                                      /* update */
-};