mesa: fix _mesa_Texture/Render/BufferObjectUnpurgeable() return values
authorBrian Paul <brianp@vmware.com>
Wed, 14 Jul 2010 21:11:32 +0000 (15:11 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 14 Jul 2010 21:13:55 +0000 (15:13 -0600)
Fixes piglit object_purgeable-api-pbo, object_purgeable-api-vbo
and object_purgeable-api-texture failures with swrast.

NOTE: This is a candidate for the 7.8 branch.

src/mesa/main/bufferobj.c

index 235cafcf1ed15579700d8047fe8f4beaaba99fdf..6115ff0680f08583ec749d59a3eca42cddd0ba4b 100644 (file)
@@ -1924,7 +1924,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
 
    bufObj->Purgeable = GL_FALSE;
 
-   retval = GL_RETAINED_APPLE;
+   retval = option;
    if (ctx->Driver.BufferObjectUnpurgeable)
       retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option);
 
@@ -1954,7 +1954,7 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
 
    bufObj->Purgeable = GL_FALSE;
 
-   retval = GL_RETAINED_APPLE;
+   retval = option;
    if (ctx->Driver.RenderObjectUnpurgeable)
       retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option);
 
@@ -1984,7 +1984,7 @@ _mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
 
    bufObj->Purgeable = GL_FALSE;
 
-   retval = GL_RETAINED_APPLE;
+   retval = option;
    if (ctx->Driver.TextureObjectUnpurgeable)
       retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option);