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/state_tracker | |
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/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index b851db64886..698c7046c1a 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -770,7 +770,8 @@ st_MapRenderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint x, GLuint y, GLuint w, GLuint h, GLbitfield mode, - GLubyte **mapOut, GLint *rowStrideOut) + GLubyte **mapOut, GLint *rowStrideOut, + bool flip_y) { struct st_context *st = st_context(ctx); struct st_renderbuffer *strb = st_renderbuffer(rb); @@ -779,6 +780,9 @@ st_MapRenderbuffer(struct gl_context *ctx, 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) { |