aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/texstate.c')
-rw-r--r--mesalib/src/mesa/main/texstate.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index 40282eabf..35ab1ad4e 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -30,6 +30,7 @@
#include "glheader.h"
#include "mfeatures.h"
+#include "bufferobj.h"
#include "colormac.h"
#include "colortab.h"
#include "context.h"
@@ -692,7 +693,8 @@ alloc_proxy_textures( struct gl_context *ctx )
GL_TEXTURE_CUBE_MAP_ARB,
GL_TEXTURE_RECTANGLE_NV,
GL_TEXTURE_1D_ARRAY_EXT,
- GL_TEXTURE_2D_ARRAY_EXT
+ GL_TEXTURE_2D_ARRAY_EXT,
+ GL_TEXTURE_BUFFER
};
GLint tgt;
@@ -793,6 +795,10 @@ _mesa_init_texture(struct gl_context *ctx)
if (!alloc_proxy_textures( ctx ))
return GL_FALSE;
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject,
+ ctx->Shared->NullBufferObj);
+
return GL_TRUE;
}
@@ -818,6 +824,9 @@ _mesa_free_texture_data(struct gl_context *ctx)
/* Free proxy texture objects */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
+
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL);
}