[Mesa-dev] [PATCH 33/37] intel: Drop our custom glGetTexImage() code.
Eric Anholt
eric at anholt.net
Mon Aug 15 11:54:03 PDT 2011
The mesa core code uses MapTextureImage() like we need now.
---
src/mesa/drivers/dri/intel/intel_tex_image.c | 61 --------------------------
1 files changed, 0 insertions(+), 61 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index b061680..2201c58 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -653,66 +653,6 @@ intelCompressedTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
0, 0, data, &ctx->Unpack, texObj, texImage, imageSize, GL_TRUE);
}
-static void
-intelGetTexImage(struct gl_context * ctx, GLenum target, GLint level,
- GLenum format, GLenum type, GLvoid * pixels,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
-{
- struct intel_context *intel = intel_context(ctx);
- struct intel_texture_image *intelImage = intel_texture_image(texImage);
-
- /* If we're reading from a texture that has been rendered to, need to
- * make sure rendering is complete.
- * We could probably predicate this on texObj->_RenderToTexture
- */
- intel_flush(ctx);
-
- /* Map */
- if (intelImage->mt) {
- /* Image is stored in hardware format in a buffer managed by the
- * kernel. Need to explicitly map and unmap it.
- */
- intelImage->base.Data =
- intel_miptree_image_map(intel,
- intelImage->mt,
- intelImage->base.Face,
- intelImage->base.Level,
- &intelImage->base.RowStride,
- intelImage->base.ImageOffsets);
- intelImage->base.RowStride /= intelImage->mt->cpp;
- }
- else {
- /* Otherwise, the image should actually be stored in
- * intelImage->base.Data. This is pretty confusing for
- * everybody, I'd much prefer to separate the two functions of
- * texImage->Data - storage for texture images in main memory
- * and access (ie mappings) of images. In other words, we'd
- * create a new texImage->Map field and leave Data simply for
- * storage.
- */
- assert(intelImage->base.Data);
- }
-
- if (intelImage->stencil_rb) {
- /*
- * The texture has packed depth/stencil format, but uses separate
- * stencil. The texture's embedded stencil buffer contains the real
- * stencil data, so copy that into the miptree.
- */
- intel_tex_image_s8z24_gather(intel, intelImage);
- }
-
- _mesa_get_teximage(ctx, target, level, format, type, pixels,
- texObj, texImage);
-
- /* Unmap */
- if (intelImage->mt) {
- intel_miptree_image_unmap(intel, intelImage->mt);
- intelImage->base.Data = NULL;
- }
-}
-
void
intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format,
@@ -849,7 +789,6 @@ intelInitTextureImageFuncs(struct dd_function_table *functions)
functions->TexImage1D = intelTexImage1D;
functions->TexImage2D = intelTexImage2D;
functions->TexImage3D = intelTexImage3D;
- functions->GetTexImage = intelGetTexImage;
functions->CompressedTexImage2D = intelCompressedTexImage2D;
--
1.7.5.4
More information about the mesa-dev
mailing list