diff options
author | Fritz Koenig <[email protected]> | 2018-07-23 10:10:54 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2018-07-27 12:32:25 -0700 |
commit | 318c265160ed33a2d9f7d664e1b247cbbc38203f (patch) | |
tree | 161a55c710b3e7764602afe676a58d75e5f44a8c /src/mesa/drivers/dri/radeon/radeon_span.c | |
parent | 7953399e599862769bc29f5f98322adbcf6c3951 (diff) |
mesa: GL_MESA_framebuffer_flip_y extension [v4]
Adds an extension to glFramebufferParameteri
that will specify if the framebuffer is vertically
flipped. Historically system framebuffers are
vertically flipped and user framebuffers are not.
Checking to see the state was done by looking at
the name field. This adds an explicit field.
v2:
* updated spec language [for chadv]
* correctly specifying ES 3.1 [for chadv]
* refactor access to rb->Name [for jason]
* handle GetFramebufferParameteriv [for chadv]
v3:
* correct _mesa_GetMultisamplefv [for kusmabite]
v4:
* update spec language [for chadv]
* s/GLboolean/bool/g [for chadv]
* s/InvertedY/FlipY/g [for chadv]
* s/inverted_y/flip_y/g [for chadv]
* assert changes [for chadv]
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_span.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_span.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index 648df5cc146..fa5b2d98ff4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -53,7 +53,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static void -radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb) +radeon_renderbuffer_map(struct gl_context *ctx, + struct gl_renderbuffer *rb, + bool flip_y) { struct radeon_renderbuffer *rrb = radeon_renderbuffer(rb); GLubyte *map; @@ -64,7 +66,7 @@ radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb) ctx->Driver.MapRenderbuffer(ctx, rb, 0, 0, rb->Width, rb->Height, GL_MAP_READ_BIT | GL_MAP_WRITE_BIT, - &map, &stride); + &map, &stride, flip_y); rrb->base.Map = map; rrb->base.RowStride = stride; @@ -96,7 +98,8 @@ radeon_map_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) /* check for render to textures */ for (i = 0; i < BUFFER_COUNT; i++) - radeon_renderbuffer_map(ctx, fb->Attachment[i].Renderbuffer); + radeon_renderbuffer_map(ctx, fb->Attachment[i].Renderbuffer, + fb->FlipY); if (_mesa_is_front_buffer_drawing(fb)) RADEON_CONTEXT(ctx)->front_buffer_dirty = true; |