diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-10 15:46:52 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-10 15:46:52 +0000 |
commit | 60909388ab136d849d99eab49e782a53772a618f (patch) | |
tree | 84a981ea2e79b5e6477d05991119a23efa4429a5 /src/mesa/drivers/dri/tdfx | |
parent | f00d7edd746e4d1eec2d497419f21fb3b04f8bd4 (diff) |
GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpacking
and ignored for 1D and 2D images.
Need to pass in image dimensions (1,2,3) to the _mesa_image_address() function.
This change gets propogated to some other routines.
Also added new _mesa_image_address[123]d() convenience functions.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_pixels.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c index aaee401d7a..7ec6302cf1 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c @@ -264,10 +264,10 @@ tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py, for (row = 0; row < height; row++) { const GLubyte *src = - (const GLubyte *) _mesa_image_address(finalUnpack, - bitmap, width, height, - GL_COLOR_INDEX, - GL_BITMAP, 0, row, 0); + (const GLubyte *) _mesa_image_address2d(finalUnpack, + bitmap, width, height, + GL_COLOR_INDEX, + GL_BITMAP, row, 0); if (finalUnpack->LsbFirst) { /* least significan bit first */ GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); @@ -423,10 +423,10 @@ tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py, /* compute dest address of bottom-left pixel in bitmap */ for (row = 0; row < height; row++) { const GLubyte *src = - (const GLubyte *) _mesa_image_address(finalUnpack, - bitmap, width, height, - GL_COLOR_INDEX, - GL_BITMAP, 0, row, 0); + (const GLubyte *) _mesa_image_address2d(finalUnpack, + bitmap, width, height, + GL_COLOR_INDEX, + GL_BITMAP, row, 0); if (finalUnpack->LsbFirst) { /* least significan bit first */ GLubyte mask = 1U << (finalUnpack->SkipPixels & 0x7); @@ -512,8 +512,8 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2); const GLushort *src = (const GLushort *) info.lfbPtr + scrY * srcStride + scrX; - GLubyte *dst = (GLubyte *) _mesa_image_address(packing, - dstImage, width, height, format, type, 0, 0, 0); + GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, + dstImage, width, height, format, type, 0, 0); const GLint dstStride = _mesa_image_row_stride(packing, width, format, type); @@ -573,8 +573,8 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, + scrY * srcStride + scrX; const GLint dstStride = _mesa_image_row_stride(packing, width, format, type); - GLubyte *dst = (GLubyte *) _mesa_image_address(packing, - dstImage, width, height, format, type, 0, 0, 0); + GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, + dstImage, width, height, format, type, 0, 0); const GLint widthInBytes = width * 4; { @@ -667,8 +667,8 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, + scrY * dstStride + scrX * 4; const GLint srcStride = _mesa_image_row_stride(unpack, width, format, type); - const GLubyte *src = (GLubyte *) _mesa_image_address(unpack, - pixels, width, height, format, type, 0, 0, 0); + const GLubyte *src = (GLubyte *) _mesa_image_address2d(unpack, + pixels, width, height, format, type, 0, 0); const GLint widthInBytes = width * 4; if ((format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) || |