gallium: Enable MESA_framebuffer_flip_y
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
66937abe2b
commit
63f24c3c01
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue