Commit 63f24c3c authored by Fritz Koenig's avatar Fritz Koenig

gallium: Enable MESA_framebuffer_flip_y

Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian H. Kristensen's avatarKristian H. Kristensen <hoegsberg@google.com>
parent 66937abe
......@@ -74,7 +74,7 @@ st_update_polygon_stipple( struct st_context *st )
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,
......
......@@ -863,13 +863,10 @@ st_MapRenderbuffer(struct gl_context *ctx,
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) {
......
......@@ -1024,6 +1024,7 @@ void st_init_extensions(struct pipe_screen *screen,
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;
......
......@@ -71,7 +71,7 @@ st_invalidate_readpix_cache(struct st_context *st)
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment