diff options
author | Eric Anholt <[email protected]> | 2013-04-19 11:56:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-04-30 10:40:43 -0700 |
commit | 0a484f100615379482eb733d97757d7b24e377ef (patch) | |
tree | 3e40a12c7277b7068e1ac79dd837eb6249a070eb /src/mesa/drivers/dri/radeon/radeon_texture.c | |
parent | f709c31c6717f898ae8689af2eb25232309f0cba (diff) |
swrast: Move ImageOffsets allocation to shared code.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_texture.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index b6e551cd992..a953858d3bb 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -105,23 +105,12 @@ radeonAllocTextureImageBuffer(struct gl_context *ctx, struct gl_texture_image *timage) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - radeon_texture_image *image = get_radeon_texture_image(timage); struct gl_texture_object *texobj = timage->TexObject; - int slices; ctx->Driver.FreeTextureImageBuffer(ctx, timage); - switch (texobj->Target) { - case GL_TEXTURE_3D: - slices = timage->Depth; - break; - default: - slices = 1; - } - assert(!image->base.ImageOffsets); - image->base.ImageOffsets = malloc(slices * sizeof(GLuint)); - - _swrast_init_texture_image(timage); + if (!_swrast_init_texture_image(timage)) + return GL_FALSE; teximage_assign_miptree(rmesa, texobj, timage); |