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:
@@ -74,7 +74,7 @@ st_update_polygon_stipple( struct st_context *st )
|
|||||||
|
|
||||||
memcpy(st->state.poly_stipple, ctx->PolygonStipple, sz);
|
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));
|
memcpy(newStipple.stipple, ctx->PolygonStipple, sizeof(newStipple.stipple));
|
||||||
} else {
|
} else {
|
||||||
invert_stipple(newStipple.stipple, ctx->PolygonStipple,
|
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_context *st = st_context(ctx);
|
||||||
struct st_renderbuffer *strb = st_renderbuffer(rb);
|
struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
const GLboolean invert = rb->Name == 0;
|
const GLboolean invert = flip_y;
|
||||||
GLuint y2;
|
GLuint y2;
|
||||||
GLubyte *map;
|
GLubyte *map;
|
||||||
|
|
||||||
/* driver does not support GL_FRAMEBUFFER_FLIP_Y_MESA */
|
|
||||||
assert((rb->Name == 0) == flip_y);
|
|
||||||
|
|
||||||
if (strb->software) {
|
if (strb->software) {
|
||||||
/* software-allocated renderbuffer (probably an accum buffer) */
|
/* software-allocated renderbuffer (probably an accum buffer) */
|
||||||
if (strb->data) {
|
if (strb->data) {
|
||||||
|
@@ -1024,6 +1024,7 @@ void st_init_extensions(struct pipe_screen *screen,
|
|||||||
extensions->ATI_fragment_shader = GL_TRUE;
|
extensions->ATI_fragment_shader = GL_TRUE;
|
||||||
extensions->ATI_texture_env_combine3 = GL_TRUE;
|
extensions->ATI_texture_env_combine3 = GL_TRUE;
|
||||||
|
|
||||||
|
extensions->MESA_framebuffer_flip_y = GL_TRUE;
|
||||||
extensions->MESA_pack_invert = GL_TRUE;
|
extensions->MESA_pack_invert = GL_TRUE;
|
||||||
|
|
||||||
extensions->NV_fog_distance = GL_TRUE;
|
extensions->NV_fog_distance = GL_TRUE;
|
||||||
|
@@ -71,7 +71,7 @@ st_invalidate_readpix_cache(struct st_context *st)
|
|||||||
static inline GLuint
|
static inline GLuint
|
||||||
st_fb_orientation(const struct gl_framebuffer *fb)
|
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).
|
/* Drawing into a window (on-screen buffer).
|
||||||
*
|
*
|
||||||
* Negate Y scale to flip image vertically.
|
* Negate Y scale to flip image vertically.
|
||||||
|
Reference in New Issue
Block a user