summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-07-25 12:40:16 -0700
committerEric Anholt <[email protected]>2008-07-25 12:40:49 -0700
commite5022c3fdf9888857f22f9a1690035ff3f90d36b (patch)
tree3fdd89db627c46b3d32c1a50bf57c9b02c0965db
parentff60e3fa031504b403766324b1fae3ccacec6650 (diff)
mesa: Return 0 for cube map face of non-cubemap framebuffer attachments.
Fixes some oglconform fbo testcases.
-rw-r--r--src/mesa/main/fbobject.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 8e9948cb45d..cecc89ac38d 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1493,7 +1493,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
if (att->Type == GL_TEXTURE) {
- *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace;
+ if (att->Texture->Target == GL_TEXTURE_CUBE_MAP)
+ *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace;
+ else
+ *params = 0;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,