mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-15 19:22:22 +00:00
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.
This commit is contained in:
parent
e27b3e4ea1
commit
2c82429f89
5 changed files with 99 additions and 45 deletions
|
|
@ -301,8 +301,9 @@ void __glXDisp_SeparableFilter2D(GLbyte *pc)
|
|||
/* XXX check this usage - internal code called
|
||||
** a version without the packing parameters
|
||||
*/
|
||||
image1len = __glXImageSize(hdr->format, hdr->type, hdr->width, 1,
|
||||
hdr->rowLength, hdr->skipRows, hdr->alignment);
|
||||
image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1,
|
||||
0, hdr->rowLength, 0, hdr->skipRows,
|
||||
hdr->alignment);
|
||||
image1len = __GLX_PAD(image1len);
|
||||
|
||||
glSeparableFilter2D(hdr->target, hdr->internalformat,
|
||||
|
|
|
|||
Loading…
Reference in a new issue