diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-09-28 03:37:22 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-09-28 03:37:22 +0000 |
commit | 940158a6f2e98069a47293d713df674e16ad8a11 (patch) | |
tree | 2a30931edcadd9b53b108d1a7206a6bc21a9b083 /GL | |
parent | 806d74bc0640f4f3dcc034b36a36aea289b01685 (diff) |
Replace all uses of __glEvalComputeK (and the doubly redundant
EvalComputeK) with calls to one of __glMap[12][df]_size. This was
tested with progs/samples/eval (from Mesa).
Diffstat (limited to 'GL')
-rw-r--r-- | GL/apple/aglGlx.c | 30 | ||||
-rw-r--r-- | GL/apple/indirect.c | 30 | ||||
-rw-r--r-- | GL/glx/impsize.h | 1 | ||||
-rw-r--r-- | GL/glx/render2.c | 9 | ||||
-rw-r--r-- | GL/glx/render2swap.c | 9 | ||||
-rw-r--r-- | GL/glx/rensize.c | 8 | ||||
-rw-r--r-- | GL/glx/singlesize.c | 33 | ||||
-rw-r--r-- | GL/mesa/X/xf86glx.c | 30 | ||||
-rw-r--r-- | GL/mesa/X/xf86glxint.h | 1 | ||||
-rw-r--r-- | GL/windows/ChangeLog | 6 | ||||
-rwxr-xr-x | GL/windows/indirect.c | 30 |
11 files changed, 20 insertions, 167 deletions
diff --git a/GL/apple/aglGlx.c b/GL/apple/aglGlx.c index 3906d775f..be846be83 100644 --- a/GL/apple/aglGlx.c +++ b/GL/apple/aglGlx.c @@ -1343,36 +1343,6 @@ static void glAquaResetExtension(void) // Extra goodies for glx -GLint __glEvalComputeK(GLenum target) -{ - switch (target) { - case GL_MAP1_VERTEX_4: - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - return 4; - case GL_MAP1_VERTEX_3: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_NORMAL: - case GL_MAP2_VERTEX_3: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP1_INDEX: - case GL_MAP2_INDEX: - return 1; - default: - return 0; - } -} - GLuint __glFloorLog2(GLuint val) { int c = 0; diff --git a/GL/apple/indirect.c b/GL/apple/indirect.c index bbda59f8f..448b1f76a 100644 --- a/GL/apple/indirect.c +++ b/GL/apple/indirect.c @@ -1368,36 +1368,6 @@ static void glAquaResetExtension(void) // Extra goodies for glx -GLint __glEvalComputeK(GLenum target) -{ - switch (target) { - case GL_MAP1_VERTEX_4: - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - return 4; - case GL_MAP1_VERTEX_3: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_NORMAL: - case GL_MAP2_VERTEX_3: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP1_INDEX: - case GL_MAP2_INDEX: - return 1; - default: - return 0; - } -} - GLuint __glFloorLog2(GLuint val) { int c = 0; diff --git a/GL/glx/impsize.h b/GL/glx/impsize.h index a04f49cf3..0eaebb6d5 100644 --- a/GL/glx/impsize.h +++ b/GL/glx/impsize.h @@ -52,6 +52,5 @@ #include "indirect_size.h" extern int __glDrawPixels_size(GLenum format, GLenum type, GLsizei w,GLsizei h); -extern int __glEvalComputeK(GLenum target); #endif /* _impsize_h_ */ diff --git a/GL/glx/render2.c b/GL/glx/render2.c index bc49d4fdd..39d0c132a 100644 --- a/GL/glx/render2.c +++ b/GL/glx/render2.c @@ -44,7 +44,6 @@ #include "g_disptab.h" #include "g_disptab_EXT.h" -extern GLint __glEvalComputeK(GLenum target); void __glXDisp_Map1f(GLbyte *pc) { @@ -57,7 +56,7 @@ void __glXDisp_Map1f(GLbyte *pc) u1 = *(GLfloat *)(pc + 4); u2 = *(GLfloat *)(pc + 8); points = (GLfloat *)(pc + 16); - k = __glEvalComputeK(target); + k = __glMap1f_size(target); glMap1f(target, u1, u2, k, order, points); } @@ -77,7 +76,7 @@ void __glXDisp_Map2f(GLbyte *pc) v2 = *(GLfloat *)(pc + 20); points = (GLfloat *)(pc + 28); - k = __glEvalComputeK(target); + k = __glMap2f_size(target); ustride = vorder * k; vstride = k; @@ -95,7 +94,7 @@ void __glXDisp_Map1d(GLbyte *pc) target = *(GLenum*) (pc + 16); order = *(GLint*) (pc + 20); - k = __glEvalComputeK(target); + k = __glMap1d_size(target); #ifdef __GLX_ALIGN64 if (order < 0 || k < 0) { @@ -138,7 +137,7 @@ void __glXDisp_Map2d(GLbyte *pc) target = *(GLenum *)(pc + 32); uorder = *(GLint *)(pc + 36); vorder = *(GLint *)(pc + 40); - k = __glEvalComputeK(target); + k = __glMap2d_size(target); #ifdef __GLX_ALIGN64 if (vorder < 0 || uorder < 0 || k < 0) { diff --git a/GL/glx/render2swap.c b/GL/glx/render2swap.c index 64ba77e5a..65ac5e18a 100644 --- a/GL/glx/render2swap.c +++ b/GL/glx/render2swap.c @@ -44,7 +44,6 @@ #include "g_disptab.h" #include "g_disptab_EXT.h" -extern GLint __glEvalComputeK(GLenum target); void __glXDispSwap_Map1f(GLbyte *pc) { @@ -65,7 +64,7 @@ void __glXDispSwap_Map1f(GLbyte *pc) u1 = *(GLfloat *)(pc + 4); u2 = *(GLfloat *)(pc + 8); points = (GLfloat *)(pc + 16); - k = __glEvalComputeK(target); + k = __glMap1f_size(target); if (order <= 0 || k < 0) { /* Erroneous command. */ @@ -104,7 +103,7 @@ void __glXDispSwap_Map2f(GLbyte *pc) v2 = *(GLfloat *)(pc + 20); points = (GLfloat *)(pc + 28); - k = __glEvalComputeK(target); + k = __glMap2f_size(target); ustride = vorder * k; vstride = k; @@ -134,7 +133,7 @@ void __glXDispSwap_Map1d(GLbyte *pc) target = *(GLenum*) (pc + 16); order = *(GLint*) (pc + 20); - k = __glEvalComputeK(target); + k = __glMap1d_size(target); if (order <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; @@ -182,7 +181,7 @@ void __glXDispSwap_Map2d(GLbyte *pc) target = *(GLenum *)(pc + 32); uorder = *(GLint *)(pc + 36); vorder = *(GLint *)(pc + 40); - k = __glEvalComputeK(target); + k = __glMap2d_size(target); if (vorder <= 0 || uorder <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; diff --git a/GL/glx/rensize.c b/GL/glx/rensize.c index b49520ad5..f75122242 100644 --- a/GL/glx/rensize.c +++ b/GL/glx/rensize.c @@ -184,7 +184,7 @@ int __glXMap1dReqSize(GLbyte *pc, Bool swap ) target = SWAPL( target ); order = SWAPL( order ); } - k = __glEvalComputeK( target ); + k = __glMap1d_size( target ); return 8 * Map1Size( k, order ); } @@ -199,7 +199,7 @@ int __glXMap1fReqSize(GLbyte *pc, Bool swap ) target = SWAPL( target ); order = SWAPL( order ); } - k = __glEvalComputeK(target); + k = __glMap1f_size(target); return 4 * Map1Size(k, order); } @@ -222,7 +222,7 @@ int __glXMap2dReqSize(GLbyte *pc, Bool swap ) uorder = SWAPL( uorder ); vorder = SWAPL( vorder ); } - k = __glEvalComputeK( target ); + k = __glMap2d_size( target ); return 8 * Map2Size( k, uorder, vorder ); } @@ -239,7 +239,7 @@ int __glXMap2fReqSize(GLbyte *pc, Bool swap ) uorder = SWAPL( uorder ); vorder = SWAPL( vorder ); } - k = __glEvalComputeK( target ); + k = __glMap2f_size( target ); return 4 * Map2Size( k, uorder, vorder ); } diff --git a/GL/glx/singlesize.c b/GL/glx/singlesize.c index 04de960a9..d55871c1f 100644 --- a/GL/glx/singlesize.c +++ b/GL/glx/singlesize.c @@ -231,35 +231,6 @@ GLint __glGetLightiv_size(GLenum pname) return __glGetLightfv_size(pname); } -static GLint EvalComputeK(GLenum target) -{ - switch(target) { - case GL_MAP1_VERTEX_4: - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - return 4; - case GL_MAP1_VERTEX_3: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_NORMAL: - case GL_MAP2_VERTEX_3: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP1_INDEX: - case GL_MAP2_INDEX: - return 1; - } - return 0; -} - GLint __glGetMap_size(GLenum target, GLenum query) { GLint k, order=0, majorMinor[2]; @@ -279,7 +250,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) case GL_MAP1_VERTEX_4: switch (query) { case GL_COEFF: - k = EvalComputeK(target); + k = __glMap1d_size(target); glGetMapiv(target, GL_ORDER, &order); /* ** The query above might fail, but then order will be zero anyway. @@ -302,7 +273,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) case GL_MAP2_VERTEX_4: switch (query) { case GL_COEFF: - k = EvalComputeK(target); + k = __glMap2d_size(target); majorMinor[0] = majorMinor[1] = 0; glGetMapiv(target, GL_ORDER, majorMinor); /* diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c index 229e871fa..d39fafc28 100644 --- a/GL/mesa/X/xf86glx.c +++ b/GL/mesa/X/xf86glx.c @@ -900,36 +900,6 @@ void __MESA_endDispatchOverride(__GLcontext *gc) * in the OpenGL SI. */ -GLint __glEvalComputeK(GLenum target) -{ - switch (target) { - case GL_MAP1_VERTEX_4: - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - return 4; - case GL_MAP1_VERTEX_3: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_NORMAL: - case GL_MAP2_VERTEX_3: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP1_INDEX: - case GL_MAP2_INDEX: - return 1; - default: - return 0; - } -} - GLuint __glFloorLog2(GLuint val) { int c = 0; diff --git a/GL/mesa/X/xf86glxint.h b/GL/mesa/X/xf86glxint.h index 8b893af6d..5daf4354a 100644 --- a/GL/mesa/X/xf86glxint.h +++ b/GL/mesa/X/xf86glxint.h @@ -98,7 +98,6 @@ extern void __MESA_beginDispatchOverride(__GLcontext *gc); extern void __MESA_endDispatchOverride(__GLcontext *gc); extern GLint __glCallLists_size(GLsizei n, GLenum type); -extern GLint __glEvalComputeK(GLenum target); extern GLuint __glFloorLog2(GLuint val); extern GLint __glFogfv_size(GLenum pname); extern GLint __glFogiv_size(GLenum pname); diff --git a/GL/windows/ChangeLog b/GL/windows/ChangeLog index 0d58b2637..43a817d6a 100644 --- a/GL/windows/ChangeLog +++ b/GL/windows/ChangeLog @@ -1,3 +1,9 @@ +2005-09-27 Ian Romanick <idr@us.ibm.com> + + * indirect.c: + Remove __glEvalComputeK. It is no longer used. + + 2005-04-09 Alexander Gottwald <ago at freedesktop dot org> * indirect.c: diff --git a/GL/windows/indirect.c b/GL/windows/indirect.c index 0c7457aa0..5e12022f4 100755 --- a/GL/windows/indirect.c +++ b/GL/windows/indirect.c @@ -117,36 +117,6 @@ const char *glWinErrorMessage(void) * in the OpenGL SI. */ -GLint __glEvalComputeK(GLenum target) -{ - switch (target) { - case GL_MAP1_VERTEX_4: - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - return 4; - case GL_MAP1_VERTEX_3: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_NORMAL: - case GL_MAP2_VERTEX_3: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_NORMAL: - return 3; - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP1_INDEX: - case GL_MAP2_INDEX: - return 1; - default: - return 0; - } -} - GLuint __glFloorLog2(GLuint val) { int c = 0; |