diff options
author | Eric Anholt <eric@anholt.net> | 2010-09-09 19:37:15 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-09-23 13:25:45 -0700 |
commit | a62efdf82c20747feb11dfd7756f0579aa914b57 (patch) | |
tree | bec6c2cfa1e9bb626fb90ecadb2b288dc5daa2a1 /src/mesa/drivers/dri | |
parent | 73578ba9c4938db3a23198c3a2ddf843cfc4f700 (diff) |
mesa: Remove EXT_convolution.
More optional code.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_extensions.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/savage/savagetex.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_tex.c | 22 |
5 files changed, 17 insertions, 46 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 4b6229ffe6..2edd6d21b4 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -208,8 +208,6 @@ intelInitExtensions(GLcontext *ctx) { struct intel_context *intel = intel_context(ctx); - /* Disable imaging extension until convolution is working in teximage paths. - */ driInitExtensions(ctx, card_extensions, GL_FALSE); _mesa_map_function_array(GL_VERSION_2_1_functions); diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index b1ed7ee5e7..f8cb50797e 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -4,7 +4,6 @@ #include "main/mtypes.h" #include "main/enums.h" #include "main/bufferobj.h" -#include "main/convolve.h" #include "main/context.h" #include "main/formats.h" #include "main/texcompress.h" @@ -320,8 +319,6 @@ intelTexImage(GLcontext * ctx, struct intel_context *intel = intel_context(ctx); struct intel_texture_object *intelObj = intel_texture_object(texObj); struct intel_texture_image *intelImage = intel_texture_image(texImage); - GLint postConvWidth = width; - GLint postConvHeight = height; GLint texelBytes, sizeInBytes; GLuint dstRowStride = 0, srcRowStride = texImage->RowStride; @@ -331,11 +328,6 @@ intelTexImage(GLcontext * ctx, intelImage->face = target_to_face(target); intelImage->level = level; - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dims, &postConvWidth, - &postConvHeight); - } - if (_mesa_is_format_compressed(texImage->TexFormat)) { texelBytes = 0; } @@ -343,13 +335,13 @@ intelTexImage(GLcontext * ctx, texelBytes = _mesa_get_format_bytes(texImage->TexFormat); /* Minimum pitch of 32 bytes */ - if (postConvWidth * texelBytes < 32) { - postConvWidth = 32 / texelBytes; - texImage->RowStride = postConvWidth; + if (width * texelBytes < 32) { + width = 32 / texelBytes; + texImage->RowStride = width; } if (!intelImage->mt) { - assert(texImage->RowStride == postConvWidth); + assert(texImage->RowStride == width); } } @@ -502,8 +494,8 @@ intelTexImage(GLcontext * ctx, assert(dims != 3); } else { - dstRowStride = postConvWidth * texelBytes; - sizeInBytes = depth * dstRowStride * postConvHeight; + dstRowStride = width * texelBytes; + sizeInBytes = depth * dstRowStride * height; } texImage->Data = _mesa_alloc_texmemory(sizeInBytes); diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 8c6a50d2f0..bf30e0cab8 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -32,7 +32,6 @@ #include "main/glheader.h" #include "main/imports.h" #include "main/context.h" -#include "main/convolve.h" #include "main/enums.h" #include "main/mipmap.h" #include "main/texcompress.h" @@ -773,8 +772,6 @@ static void radeon_teximage( radeonContextPtr rmesa = RADEON_CONTEXT(ctx); radeonTexObj* t = radeon_tex_obj(texObj); radeon_texture_image* image = get_radeon_texture_image(texImage); - GLint postConvWidth = width; - GLint postConvHeight = height; GLuint face = _mesa_tex_target_to_face(target); radeon_print(RADEON_TEXTURE, RADEON_NORMAL, @@ -795,20 +792,15 @@ static void radeon_teximage( t->validated = GL_FALSE; - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dims, &postConvWidth, - &postConvHeight); - } - if (!_mesa_is_format_compressed(texImage->TexFormat)) { GLuint texelBytes = _mesa_get_format_bytes(texImage->TexFormat); /* Minimum pitch of 32 bytes */ - if (postConvWidth * texelBytes < 32) { - postConvWidth = 32 / texelBytes; - texImage->RowStride = postConvWidth; + if (width * texelBytes < 32) { + width = 32 / texelBytes; + texImage->RowStride = width; } if (!image->mt) { - assert(texImage->RowStride == postConvWidth); + assert(texImage->RowStride == width); } } diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index 1523af4065..89090da5c6 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -28,7 +28,6 @@ #include "main/macros.h" #include "main/texstore.h" #include "main/texobj.h" -#include "main/convolve.h" #include "main/colormac.h" #include "main/simple_list.h" #include "main/enums.h" @@ -586,7 +585,6 @@ _savage_texstore_a1114444(TEXSTORE_PARAMS) if (!tempImage) return GL_FALSE; - _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); for (img = 0; img < srcDepth; img++) { GLuint texelBytes = _mesa_get_format_bytes(dstFormat); GLubyte *dstRow = (GLubyte *) dstAddr @@ -626,7 +624,6 @@ _savage_texstore_a1118888(TEXSTORE_PARAMS) if (!tempImage) return GL_FALSE; - _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); for (img = 0; img < srcDepth; img++) { GLuint texelBytes = _mesa_get_format_bytes(dstFormat); GLubyte *dstRow = (GLubyte *) dstAddr diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index a64f093326..01cb3ebbc8 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -32,7 +32,6 @@ #include "main/enums.h" #include "main/formats.h" #include "main/colortab.h" -#include "main/convolve.h" #include "main/context.h" #include "main/mipmap.h" #include "main/mm.h" @@ -664,8 +663,6 @@ static void viaTexImage(GLcontext *ctx, struct gl_texture_image *texImage) { struct via_context *vmesa = VIA_CONTEXT(ctx); - GLint postConvWidth = width; - GLint postConvHeight = height; GLint texelBytes, sizeInBytes; struct via_texture_object *viaObj = (struct via_texture_object *)texObj; struct via_texture_image *viaImage = (struct via_texture_image *)texImage; @@ -676,11 +673,6 @@ static void viaTexImage(GLcontext *ctx, via_release_pending_textures(vmesa); } - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dims, &postConvWidth, - &postConvHeight); - } - /* choose the texture format */ texImage->TexFormat = viaChooseTexFormat(ctx, internalFormat, format, type); @@ -690,13 +682,13 @@ static void viaTexImage(GLcontext *ctx, texelBytes = _mesa_get_format_bytes(texImage->TexFormat); /* Minimum pitch of 32 bytes */ - if (postConvWidth * texelBytes < 32) { - postConvWidth = 32 / texelBytes; - texImage->RowStride = postConvWidth; + if (width * texelBytes < 32) { + width = 32 / texelBytes; + texImage->RowStride = width; } - assert(texImage->RowStride == postConvWidth); - viaImage->pitchLog2 = logbase2(postConvWidth * texelBytes); + assert(texImage->RowStride == width); + viaImage->pitchLog2 = logbase2(width * texelBytes); /* allocate memory */ if (_mesa_is_format_compressed(texImage->TexFormat)) @@ -705,7 +697,7 @@ static void viaTexImage(GLcontext *ctx, texImage->Height, texImage->Depth); else - sizeInBytes = postConvWidth * postConvHeight * texelBytes; + sizeInBytes = width * height * texelBytes; /* Attempt to allocate texture memory directly, otherwise use main @@ -786,7 +778,7 @@ static void viaTexImage(GLcontext *ctx, dstRowStride = _mesa_format_row_stride(texImage->TexFormat, width); } else { - dstRowStride = postConvWidth * _mesa_get_format_bytes(texImage->TexFormat); + dstRowStride = width * _mesa_get_format_bytes(texImage->TexFormat); } success = _mesa_texstore(ctx, dims, texImage->_BaseFormat, |