aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFritz Koenig <[email protected]>2019-07-30 14:40:33 -0700
committerFritz Koenig <[email protected]>2019-10-08 13:53:01 -0700
commit63f24c3c016bec14bc549b71475ea0f7f7fdf893 (patch)
tree028afbf262c85f3c72026d30962f4a5879305565 /src/mesa
parent66937abe2b089ae897197f748bd358c018dc52f7 (diff)
gallium: Enable MESA_framebuffer_flip_y
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_stipple.c2
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c5
-rw-r--r--src/mesa/state_tracker/st_extensions.c1
-rw-r--r--src/mesa/state_tracker/st_util.h2
4 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_stipple.c b/src/mesa/state_tracker/st_atom_stipple.c
index 87599f94d50..3437553c154 100644
--- a/src/mesa/state_tracker/st_atom_stipple.c
+++ b/src/mesa/state_tracker/st_atom_stipple.c
@@ -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,
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 55546f9fab3..7cb4a3e1650 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -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) {
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 3f8230a22fb..c9a99b06f4b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_util.h b/src/mesa/state_tracker/st_util.h
index b6454e5a958..bae85974f0e 100644
--- a/src/mesa/state_tracker/st_util.h
+++ b/src/mesa/state_tracker/st_util.h
@@ -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.