memcpy(st->state.poly_stipple, ctx->PolygonStipple, sz);
- if (_mesa_is_user_fbo(ctx->DrawBuffer)) {
+ if (ctx->DrawBuffer->FlipY) {
memcpy(newStipple.stipple, ctx->PolygonStipple, sizeof(newStipple.stipple));
} else {
invert_stipple(newStipple.stipple, ctx->PolygonStipple,
struct st_context *st = st_context(ctx);
struct st_renderbuffer *strb = st_renderbuffer(rb);
struct pipe_context *pipe = st->pipe;
- const GLboolean invert = rb->Name == 0;
+ const GLboolean invert = flip_y;
GLuint y2;
GLubyte *map;
- /* driver does not support GL_FRAMEBUFFER_FLIP_Y_MESA */
- assert((rb->Name == 0) == flip_y);
-
if (strb->software) {
/* software-allocated renderbuffer (probably an accum buffer) */
if (strb->data) {
extensions->ATI_fragment_shader = GL_TRUE;
extensions->ATI_texture_env_combine3 = GL_TRUE;
+ extensions->MESA_framebuffer_flip_y = GL_TRUE;
extensions->MESA_pack_invert = GL_TRUE;
extensions->NV_fog_distance = GL_TRUE;
static inline GLuint
st_fb_orientation(const struct gl_framebuffer *fb)
{
- if (fb && _mesa_is_winsys_fbo(fb)) {
+ if (fb && fb->FlipY) {
/* Drawing into a window (on-screen buffer).
*
* Negate Y scale to flip image vertically.