summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-09-20 15:10:50 -0700
committerIan Romanick <[email protected]>2011-10-04 12:25:56 -0700
commit6dd8e7686955e9fdb56f13a1511133d9ed2d7604 (patch)
tree498c09a7e8ebf5266057fd64fa1a1ef145ab9ef2 /src/mesa/main/fbobject.c
parent7e4cb32d05cdf948a60632270e75b5513e780b28 (diff)
mesa/es: Validate FBO target enum in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 2e0af97f4d3..6e54c09d7c7 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -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: