summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@localhost.localdomain>2008-08-07 11:19:15 +1000
committerBen Skeggs <skeggsb@localhost.localdomain>2008-08-07 11:19:15 +1000
commit4b1c508f49a070f113929393423d6704f1ff18b6 (patch)
tree76803b434b75b438c44829ed55e1a19b208dde01 /src/mesa/main
parent7fde9febd6f212494730ebef916fe25c95d30be9 (diff)
parentbe66a8f43172327e3cdde27281e40377cacbb121 (diff)
Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c3
-rw-r--r--src/mesa/main/fbobject.c14
2 files changed, 14 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 279880cf40..27e5e2fcce 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -711,7 +711,8 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData)
{
struct gl_renderbuffer *rb = (struct gl_renderbuffer *) data;
rb->RefCount = 0; /* see comment for FBOs above */
- rb->Delete(rb);
+ if (rb->Delete)
+ rb->Delete(rb);
}
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 0ae69bdce7..960cc6da22 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1525,7 +1525,12 @@ _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 && 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,
@@ -1534,7 +1539,12 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
if (att->Type == GL_TEXTURE) {
- *params = att->Zoffset;
+ if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) {
+ *params = att->Zoffset;
+ }
+ else {
+ *params = 0;
+ }
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,