aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-06-03 08:18:04 +0200
committermarha <marha@users.sourceforge.net>2011-06-03 08:18:04 +0200
commitcda19b1d226d565f1ca4327aeae827c621b3dfd6 (patch)
tree8a511d718c888b17c257a905607068613359f9a6 /mesalib/src/mesa/main/fbobject.c
parent4d7ec99788d8a1d56ff4bccea279ae8186b18cdc (diff)
downloadvcxsrv-cda19b1d226d565f1ca4327aeae827c621b3dfd6.tar.gz
vcxsrv-cda19b1d226d565f1ca4327aeae827c621b3dfd6.tar.bz2
vcxsrv-cda19b1d226d565f1ca4327aeae827c621b3dfd6.zip
xserver xkeyboard-config mesa git update 3 Jun 2011
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 739d03e93..d4400709a 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -2161,6 +2161,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
if (att->Type == GL_TEXTURE) {
*params = att->TextureLevel;
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
@@ -2175,6 +2179,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
*params = 0;
}
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
@@ -2189,6 +2197,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
*params = 0;
}
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
@@ -2199,6 +2211,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else {
if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) {
*params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
@@ -2216,6 +2232,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
return;
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else {
gl_format format = att->Renderbuffer->Format;
if (format == MESA_FORMAT_CI8 || format == MESA_FORMAT_S8) {
@@ -2237,6 +2257,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
+ else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
else if (att->Texture) {
const struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, att->Texture, att->Texture->Target,
@@ -2254,7 +2278,8 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
att->Renderbuffer->Format);
}
else {
- *params = 0;
+ _mesa_problem(ctx, "glGetFramebufferAttachmentParameterivEXT:"
+ " invalid FBO attachment structure");
}
return;
default: