diff options
author | Eric Anholt <[email protected]> | 2013-04-13 01:37:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-04-21 12:28:04 -0700 |
commit | 1842dd08b83269816fe8eb8f2dcc1252f606fe48 (patch) | |
tree | 61d1cca575fe3be59af5ad5c79d0a45e85479701 /src/mesa/swrast | |
parent | e86170c2b88f9970a124479bbf47b5a7cd43d628 (diff) |
mesa: Generalize TexStorage allocator between swrast and intel.
This should be reusable for other non-gallium drivers, so we can make the
extension always be available.
v2: Add a more detailed comment than the old function had (recommended
by Brian).
Reviewed-by: Brian Paul <[email protected]> (v1)
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 27 | ||||
-rw-r--r-- | src/mesa/swrast/swrast.h | 8 |
2 files changed, 0 insertions, 35 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 8ae3d5bd0e6..51048be9b63 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -322,30 +322,3 @@ _swrast_unmap_textures(struct gl_context *ctx) enabledUnits &= ~(1 << unit); } } - - -/** - * Called via ctx->Driver.AllocTextureStorage() - * Just have to allocate memory for the texture images. - */ -GLboolean -_swrast_AllocTextureStorage(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLsizei levels, GLsizei width, - GLsizei height, GLsizei depth) -{ - const GLint numFaces = (texObj->Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; - GLint face, level; - - for (face = 0; face < numFaces; face++) { - for (level = 0; level < levels; level++) { - struct gl_texture_image *texImage = texObj->Image[face][level]; - if (!_swrast_alloc_texture_image_buffer(ctx, texImage)) { - return GL_FALSE; - } - } - } - - return GL_TRUE; -} - diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h index 82555ae6a88..0f74bb91a87 100644 --- a/src/mesa/swrast/swrast.h +++ b/src/mesa/swrast/swrast.h @@ -272,14 +272,6 @@ _swrast_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att); - -extern GLboolean -_swrast_AllocTextureStorage(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLsizei levels, GLsizei width, - GLsizei height, GLsizei depth); - - /** * The driver interface for the software rasterizer. * XXX this may go away. |