summaryrefslogtreecommitdiff
path: root/GL/glx/singlesize.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-10-01 22:25:13 +0000
committerIan Romanick <idr@us.ibm.com>2005-10-01 22:25:13 +0000
commit2c82429f8957ed0268c0e4e4fe5aed9093f33960 (patch)
tree79c450c575ba3577f1e14042482d4e4371a1c95c /GL/glx/singlesize.c
parente27b3e4ea1ddf9b2e9c2d63a0e60400b523a8a94 (diff)
Refactors __glXImageSize and __glXImage3DSize into a single function. It
replaces all calls to the old functions with calls to __glXImageSize with the new parameter list. I have also added 'target' as a parameter. This is a stepping stone to the code in patch #2410. Basically, if the texture target is one of GL_PROXY_*, the image size is always zero. This gathers all the checks for that into a single place. I have *not* modified the existing callers to take this into account. They still do their own checks for GL_PROXY_*. However, when the generated versions of those functions are added to the tree, they *will* rely on that. The code growth is mainly due to the new 40 line comment before __glXImageSize. I have tested this with a few of the texture using demos and tests from Mesa, including tunnel, texdown, and drawpix. Reviewed by: Adam Jackson, Eric Anholt, and Brian Paul.
Diffstat (limited to 'GL/glx/singlesize.c')
-rw-r--r--GL/glx/singlesize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/GL/glx/singlesize.c b/GL/glx/singlesize.c
index d55871c1f..7ed5fe3ef 100644
--- a/GL/glx/singlesize.c
+++ b/GL/glx/singlesize.c
@@ -51,7 +51,7 @@
GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h)
{
- return __glXImage3DSize( format, type, w, h, 1, 0, 0, 0, 0, 4 );
+ return __glXImageSize( format, type, 0, w, h, 1, 0, 0, 0, 0, 4 );
}
/**
@@ -1127,8 +1127,8 @@ GLint __glGetTexLevelParameteriv_size(GLenum pname)
GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format,
GLenum type, GLint width, GLint height, GLint depth)
{
- return __glXImage3DSize( format, type, width, height, depth,
- 0, 0, 0, 0, 4 );
+ return __glXImageSize( format, type, target, width, height, depth,
+ 0, 0, 0, 0, 4 );
}
GLint __glGetConvolutionParameteriv_size(GLenum pname)