mesa/es: Validate FBO target enum in Mesa code rather than the ES wrapper

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Ian Romanick
2011-09-20 15:10:50 -07:00
parent 7e4cb32d05
commit 6dd8e76869
2 changed files with 4 additions and 32 deletions

View File

@@ -194,9 +194,11 @@ get_framebuffer_target(struct gl_context *ctx, GLenum target)
{
switch (target) {
case GL_DRAW_FRAMEBUFFER:
return ctx->Extensions.EXT_framebuffer_blit ? ctx->DrawBuffer : NULL;
return ctx->Extensions.EXT_framebuffer_blit && ctx->API == API_OPENGL
? ctx->DrawBuffer : NULL;
case GL_READ_FRAMEBUFFER:
return ctx->Extensions.EXT_framebuffer_blit ? ctx->ReadBuffer : NULL;
return ctx->Extensions.EXT_framebuffer_blit && ctx->API == API_OPENGL
? ctx->ReadBuffer : NULL;
case GL_FRAMEBUFFER_EXT:
return ctx->DrawBuffer;
default: