X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_atom_stipple.c;h=86a4247f3269d4327b8c52c3f015b4912ba999f9;hb=d94bec5c49d926069f97a4b12fb2532611a9080c;hp=b059ca97776a63e8d27505387278ad27f45a1261;hpb=53bc28920a8524d7bc795c3ce6398dc34a8e2152;p=mesa.git diff --git a/src/mesa/state_tracker/st_atom_stipple.c b/src/mesa/state_tracker/st_atom_stipple.c index b059ca97776..86a4247f326 100644 --- a/src/mesa/state_tracker/st_atom_stipple.c +++ b/src/mesa/state_tracker/st_atom_stipple.c @@ -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,20 +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 = { - { /* dirty */ - (_NEW_POLYGONSTIPPLE | - _NEW_BUFFERS), /* mesa */ - 0, /* st */ - }, - update_stipple /* update */ -};