diff options
author | Kenneth Graunke <[email protected]> | 2012-11-17 23:23:06 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-11-19 11:48:56 -0800 |
commit | c6ed42a89ede459e72b18cd8890cc3aba39905f5 (patch) | |
tree | 6a888cfb5bf06782e98bd9db432304aa3228a9bf /src/mesa/main | |
parent | f399a707c80e5d89f404c1bfacc73d16a32a88c3 (diff) |
mesa: Support EXT_framebuffer_blit targets in ES 3.0 as well.
GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are valid targets in ES 3.
Fixes 23 es3conform framebuffer_blit tests. Two more go from fail to
crash, but that appears to be because they actually run now.
Reviewed-and-tested-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/fbobject.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index ef739c162c4..223aef18ddd 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -31,6 +31,7 @@ * Brian Paul */ +#include <stdbool.h> #include "buffers.h" #include "context.h" @@ -162,13 +163,13 @@ invalidate_framebuffer(struct gl_framebuffer *fb) static struct gl_framebuffer * get_framebuffer_target(struct gl_context *ctx, GLenum target) { + bool have_fb_blit = _mesa_is_gles3(ctx) || + (ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx)); switch (target) { case GL_DRAW_FRAMEBUFFER: - return ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx) - ? ctx->DrawBuffer : NULL; + return have_fb_blit ? ctx->DrawBuffer : NULL; case GL_READ_FRAMEBUFFER: - return ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx) - ? ctx->ReadBuffer : NULL; + return have_fb_blit ? ctx->ReadBuffer : NULL; case GL_FRAMEBUFFER_EXT: return ctx->DrawBuffer; default: |