4 #include "api_loopback.h"
16 #include "multisample.h"
17 #include "pixelstore.h"
27 #include "main/drawtex.h"
30 #include "main/es1_conversion.h"
33 _mesa_AlphaFuncx(GLenum func
, GLclampx ref
)
35 _mesa_AlphaFunc(func
, (GLclampf
) (ref
/ 65536.0f
));
39 _mesa_ClearColorx(GLclampx red
, GLclampx green
, GLclampx blue
, GLclampx alpha
)
41 _mesa_ClearColor((GLclampf
) (red
/ 65536.0f
),
42 (GLclampf
) (green
/ 65536.0f
),
43 (GLclampf
) (blue
/ 65536.0f
),
44 (GLclampf
) (alpha
/ 65536.0f
));
48 _mesa_ClearDepthx(GLclampx depth
)
50 _mesa_ClearDepthf((GLclampf
) (depth
/ 65536.0f
));
54 _mesa_ClipPlanef(GLenum plane
, const GLfloat
*equation
)
57 GLdouble converted_equation
[4];
59 for (i
= 0; i
< ARRAY_SIZE(converted_equation
); i
++) {
60 converted_equation
[i
] = (GLdouble
) (equation
[i
]);
63 _mesa_ClipPlane(plane
, converted_equation
);
67 _mesa_ClipPlanex(GLenum plane
, const GLfixed
*equation
)
70 GLdouble converted_equation
[4];
72 for (i
= 0; i
< ARRAY_SIZE(converted_equation
); i
++) {
73 converted_equation
[i
] = (GLdouble
) (equation
[i
] / 65536.0);
76 _mesa_ClipPlane(plane
, converted_equation
);
80 _es_Color4ub(GLubyte red
, GLubyte green
, GLubyte blue
, GLubyte alpha
)
82 _es_Color4f((GLfloat
) (red
/ 255.0f
),
83 (GLfloat
) (green
/ 255.0f
),
84 (GLfloat
) (blue
/ 255.0f
),
85 (GLfloat
) (alpha
/ 255.0f
));
89 _mesa_Color4x(GLfixed red
, GLfixed green
, GLfixed blue
, GLfixed alpha
)
91 _es_Color4f((GLfloat
) (red
/ 65536.0f
),
92 (GLfloat
) (green
/ 65536.0f
),
93 (GLfloat
) (blue
/ 65536.0f
),
94 (GLfloat
) (alpha
/ 65536.0f
));
98 _mesa_DepthRangex(GLclampx zNear
, GLclampx zFar
)
100 _mesa_DepthRangef((GLclampf
) (zNear
/ 65536.0f
),
101 (GLclampf
) (zFar
/ 65536.0f
));
105 _mesa_DrawTexxOES(GLfixed x
, GLfixed y
, GLfixed z
, GLfixed w
, GLfixed h
)
108 _mesa_DrawTexfOES((GLfloat
) (x
/ 65536.0f
),
109 (GLfloat
) (y
/ 65536.0f
),
110 (GLfloat
) (z
/ 65536.0f
),
111 (GLfloat
) (w
/ 65536.0f
),
112 (GLfloat
) (h
/ 65536.0f
));
116 _mesa_DrawTexxvOES(const GLfixed
*coords
)
119 GLfloat converted_coords
[5];
121 for (i
= 0; i
< ARRAY_SIZE(converted_coords
); i
++) {
122 converted_coords
[i
] = (GLfloat
) (coords
[i
] / 65536.0f
);
125 _mesa_DrawTexfvOES(converted_coords
);
129 _mesa_Fogx(GLenum pname
, GLfixed param
)
131 if (pname
!= GL_FOG_MODE
) {
132 _mesa_Fogf(pname
, (GLfloat
) (param
/ 65536.0f
));
134 _mesa_Fogf(pname
, (GLfloat
) param
);
140 _mesa_Fogxv(GLenum pname
, const GLfixed
*params
)
143 unsigned int n_params
= 4;
144 GLfloat converted_params
[4];
145 bool convert_params_value
= true;
149 convert_params_value
= false;
161 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
162 "glFogxv(pname=0x%x)", pname
);
166 if (convert_params_value
) {
167 for (i
= 0; i
< n_params
; i
++) {
168 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
171 for (i
= 0; i
< n_params
; i
++) {
172 converted_params
[i
] = (GLfloat
) params
[i
];
176 _mesa_Fogfv(pname
, converted_params
);
180 _mesa_Frustumf(GLfloat left
, GLfloat right
, GLfloat bottom
, GLfloat top
,
181 GLfloat zNear
, GLfloat zFar
)
183 _mesa_Frustum((GLdouble
) (left
),
192 _mesa_Frustumx(GLfixed left
, GLfixed right
, GLfixed bottom
, GLfixed top
,
193 GLfixed zNear
, GLfixed zFar
)
195 _mesa_Frustum((GLdouble
) (left
/ 65536.0),
196 (GLdouble
) (right
/ 65536.0),
197 (GLdouble
) (bottom
/ 65536.0),
198 (GLdouble
) (top
/ 65536.0),
199 (GLdouble
) (zNear
/ 65536.0),
200 (GLdouble
) (zFar
/ 65536.0));
204 _mesa_GetClipPlanef(GLenum plane
, GLfloat
*equation
)
207 GLdouble converted_equation
[4];
209 _mesa_GetClipPlane(plane
, converted_equation
);
210 for (i
= 0; i
< ARRAY_SIZE(converted_equation
); i
++) {
211 equation
[i
] = (GLfloat
) (converted_equation
[i
]);
216 _mesa_GetClipPlanex(GLenum plane
, GLfixed
*equation
)
219 GLdouble converted_equation
[4];
221 _mesa_GetClipPlane(plane
, converted_equation
);
222 for (i
= 0; i
< ARRAY_SIZE(converted_equation
); i
++) {
223 equation
[i
] = (GLfixed
) (converted_equation
[i
] * 65536);
228 _mesa_GetLightxv(GLenum light
, GLenum pname
, GLfixed
*params
)
231 unsigned int n_params
= 4;
232 GLfloat converted_params
[4];
234 if (light
< GL_LIGHT0
|| light
> GL_LIGHT7
) {
235 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
236 "glGetLightxv(light=0x%x)", light
);
246 case GL_SPOT_DIRECTION
:
249 case GL_SPOT_EXPONENT
:
251 case GL_CONSTANT_ATTENUATION
:
252 case GL_LINEAR_ATTENUATION
:
253 case GL_QUADRATIC_ATTENUATION
:
257 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
258 "glGetLightxv(pname=0x%x)", pname
);
262 _mesa_GetLightfv(light
, pname
, converted_params
);
263 for (i
= 0; i
< n_params
; i
++) {
264 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
269 _mesa_GetMaterialxv(GLenum face
, GLenum pname
, GLfixed
*params
)
272 unsigned int n_params
= 4;
273 GLfloat converted_params
[4];
280 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
281 "glGetMaterialxv(face=0x%x)", face
);
295 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
296 "glGetMaterialxv(pname=0x%x)", pname
);
300 _mesa_GetMaterialfv(face
, pname
, converted_params
);
301 for (i
= 0; i
< n_params
; i
++) {
302 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
307 _mesa_GetTexEnvxv(GLenum target
, GLenum pname
, GLfixed
*params
)
310 unsigned int n_params
= 4;
311 GLfloat converted_params
[4];
312 bool convert_params_value
= true;
315 case GL_POINT_SPRITE
:
316 if (pname
!= GL_COORD_REPLACE
) {
317 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
318 "glGetTexEnvxv(target=0x%x)", target
);
322 case GL_TEXTURE_FILTER_CONTROL_EXT
:
323 if (pname
!= GL_TEXTURE_LOD_BIAS_EXT
) {
324 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
325 "glGetTexEnvxv(target=0x%x)", target
);
330 if (pname
!= GL_TEXTURE_ENV_COLOR
&&
331 pname
!= GL_RGB_SCALE
&&
332 pname
!= GL_ALPHA_SCALE
&&
333 pname
!= GL_TEXTURE_ENV_MODE
&&
334 pname
!= GL_COMBINE_RGB
&&
335 pname
!= GL_COMBINE_ALPHA
&&
336 pname
!= GL_SRC0_RGB
&&
337 pname
!= GL_SRC1_RGB
&&
338 pname
!= GL_SRC2_RGB
&&
339 pname
!= GL_SRC0_ALPHA
&&
340 pname
!= GL_SRC1_ALPHA
&&
341 pname
!= GL_SRC2_ALPHA
&&
342 pname
!= GL_OPERAND0_RGB
&&
343 pname
!= GL_OPERAND1_RGB
&&
344 pname
!= GL_OPERAND2_RGB
&&
345 pname
!= GL_OPERAND0_ALPHA
&&
346 pname
!= GL_OPERAND1_ALPHA
&&
347 pname
!= GL_OPERAND2_ALPHA
) {
348 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
349 "glGetTexEnvxv(target=0x%x)", target
);
354 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
355 "glGetTexEnvxv(target=0x%x)", target
);
359 case GL_COORD_REPLACE
:
360 convert_params_value
= false;
363 case GL_TEXTURE_LOD_BIAS_EXT
:
366 case GL_TEXTURE_ENV_COLOR
:
373 case GL_TEXTURE_ENV_MODE
:
375 case GL_COMBINE_ALPHA
:
382 case GL_OPERAND0_RGB
:
383 case GL_OPERAND1_RGB
:
384 case GL_OPERAND2_RGB
:
385 case GL_OPERAND0_ALPHA
:
386 case GL_OPERAND1_ALPHA
:
387 case GL_OPERAND2_ALPHA
:
388 convert_params_value
= false;
392 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
393 "glGetTexEnvxv(pname=0x%x)", pname
);
397 _mesa_GetTexEnvfv(target
, pname
, converted_params
);
398 if (convert_params_value
) {
399 for (i
= 0; i
< n_params
; i
++) {
400 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
403 for (i
= 0; i
< n_params
; i
++) {
404 params
[i
] = (GLfixed
) converted_params
[i
];
410 _check_GetTexGenivOES(GLenum coord
, GLenum pname
, GLint
*params
)
412 _mesa_GetTexGeniv(coord
, pname
, params
);
416 _mesa_GetTexGenxvOES(GLenum coord
, GLenum pname
, GLfixed
*params
)
418 _mesa_GetTexGeniv(coord
, pname
, (GLint
*) params
);
422 _mesa_GetTexParameterxv(GLenum target
, GLenum pname
, GLfixed
*params
)
425 unsigned int n_params
= 4;
426 GLfloat converted_params
[4];
427 bool convert_params_value
= true;
431 case GL_TEXTURE_CUBE_MAP
:
432 case GL_TEXTURE_EXTERNAL_OES
:
435 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
436 "glGetTexParameterxv(target=0x%x)", target
);
440 case GL_TEXTURE_WRAP_S
:
441 case GL_TEXTURE_WRAP_T
:
442 case GL_TEXTURE_MIN_FILTER
:
443 case GL_TEXTURE_MAG_FILTER
:
444 case GL_GENERATE_MIPMAP
:
445 convert_params_value
= false;
448 case GL_TEXTURE_CROP_RECT_OES
:
452 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
453 "glGetTexParameterxv(pname=0x%x)", pname
);
457 _mesa_GetTexParameterfv(target
, pname
, converted_params
);
458 if (convert_params_value
) {
459 for (i
= 0; i
< n_params
; i
++) {
460 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
463 for (i
= 0; i
< n_params
; i
++) {
464 params
[i
] = (GLfixed
) converted_params
[i
];
470 _mesa_LightModelx(GLenum pname
, GLfixed param
)
472 _mesa_LightModelf(pname
, (GLfloat
) param
);
476 _mesa_LightModelxv(GLenum pname
, const GLfixed
*params
)
479 unsigned int n_params
= 4;
480 GLfloat converted_params
[4];
481 bool convert_params_value
= true;
484 case GL_LIGHT_MODEL_AMBIENT
:
487 case GL_LIGHT_MODEL_TWO_SIDE
:
488 convert_params_value
= false;
492 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
493 "glLightModelxv(pname=0x%x)", pname
);
497 if (convert_params_value
) {
498 for (i
= 0; i
< n_params
; i
++) {
499 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
502 for (i
= 0; i
< n_params
; i
++) {
503 converted_params
[i
] = (GLfloat
) params
[i
];
507 _mesa_LightModelfv(pname
, converted_params
);
511 _mesa_Lightx(GLenum light
, GLenum pname
, GLfixed param
)
513 _mesa_Lightf(light
, pname
, (GLfloat
) (param
/ 65536.0f
));
517 _mesa_Lightxv(GLenum light
, GLenum pname
, const GLfixed
*params
)
520 unsigned int n_params
= 4;
521 GLfloat converted_params
[4];
523 if (light
< GL_LIGHT0
|| light
> GL_LIGHT7
) {
524 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
525 "glLightxv(light=0x%x)", light
);
535 case GL_SPOT_DIRECTION
:
538 case GL_SPOT_EXPONENT
:
540 case GL_CONSTANT_ATTENUATION
:
541 case GL_LINEAR_ATTENUATION
:
542 case GL_QUADRATIC_ATTENUATION
:
546 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
547 "glLightxv(pname=0x%x)", pname
);
551 for (i
= 0; i
< n_params
; i
++) {
552 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
555 _mesa_Lightfv(light
, pname
, converted_params
);
559 _mesa_LineWidthx(GLfixed width
)
561 _mesa_LineWidth((GLfloat
) (width
/ 65536.0f
));
565 _mesa_LoadMatrixx(const GLfixed
*m
)
568 GLfloat converted_m
[16];
570 for (i
= 0; i
< ARRAY_SIZE(converted_m
); i
++) {
571 converted_m
[i
] = (GLfloat
) (m
[i
] / 65536.0f
);
574 _mesa_LoadMatrixf(converted_m
);
578 _mesa_Materialx(GLenum face
, GLenum pname
, GLfixed param
)
580 if (face
!= GL_FRONT_AND_BACK
) {
581 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
582 "glMaterialx(face=0x%x)", face
);
586 if (pname
!= GL_SHININESS
) {
587 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
588 "glMaterialx(pname=0x%x)", pname
);
592 _es_Materialf(face
, pname
, (GLfloat
) (param
/ 65536.0f
));
596 _mesa_Materialxv(GLenum face
, GLenum pname
, const GLfixed
*params
)
599 unsigned int n_params
= 4;
600 GLfloat converted_params
[4];
602 if (face
!= GL_FRONT_AND_BACK
) {
603 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
604 "glMaterialxv(face=0x%x)", face
);
611 case GL_AMBIENT_AND_DIFFUSE
:
620 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
621 "glMaterialxv(pname=0x%x)", pname
);
625 for (i
= 0; i
< n_params
; i
++) {
626 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
629 _es_Materialfv(face
, pname
, converted_params
);
633 _mesa_MultMatrixx(const GLfixed
*m
)
636 GLfloat converted_m
[16];
638 for (i
= 0; i
< ARRAY_SIZE(converted_m
); i
++) {
639 converted_m
[i
] = (GLfloat
) (m
[i
] / 65536.0f
);
642 _mesa_MultMatrixf(converted_m
);
646 _mesa_MultiTexCoord4x(GLenum texture
, GLfixed s
, GLfixed t
, GLfixed r
, GLfixed q
)
648 _es_MultiTexCoord4f(texture
,
649 (GLfloat
) (s
/ 65536.0f
),
650 (GLfloat
) (t
/ 65536.0f
),
651 (GLfloat
) (r
/ 65536.0f
),
652 (GLfloat
) (q
/ 65536.0f
));
656 _mesa_Normal3x(GLfixed nx
, GLfixed ny
, GLfixed nz
)
658 _es_Normal3f((GLfloat
) (nx
/ 65536.0f
),
659 (GLfloat
) (ny
/ 65536.0f
),
660 (GLfloat
) (nz
/ 65536.0f
));
664 _mesa_Orthof(GLfloat left
, GLfloat right
, GLfloat bottom
, GLfloat top
,
665 GLfloat zNear
, GLfloat zFar
)
667 _mesa_Ortho((GLdouble
) (left
),
676 _mesa_Orthox(GLfixed left
, GLfixed right
, GLfixed bottom
, GLfixed top
,
677 GLfixed zNear
, GLfixed zFar
)
679 _mesa_Ortho((GLdouble
) (left
/ 65536.0),
680 (GLdouble
) (right
/ 65536.0),
681 (GLdouble
) (bottom
/ 65536.0),
682 (GLdouble
) (top
/ 65536.0),
683 (GLdouble
) (zNear
/ 65536.0),
684 (GLdouble
) (zFar
/ 65536.0));
688 _mesa_PointParameterx(GLenum pname
, GLfixed param
)
690 _mesa_PointParameterf(pname
, (GLfloat
) (param
/ 65536.0f
));
694 _mesa_PointParameterxv(GLenum pname
, const GLfixed
*params
)
697 unsigned int n_params
= 3;
698 GLfloat converted_params
[3];
701 case GL_POINT_SIZE_MIN
:
702 case GL_POINT_SIZE_MAX
:
703 case GL_POINT_FADE_THRESHOLD_SIZE
:
706 case GL_POINT_DISTANCE_ATTENUATION
:
710 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
711 "glPointParameterxv(pname=0x%x)", pname
);
715 for (i
= 0; i
< n_params
; i
++) {
716 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
719 _mesa_PointParameterfv(pname
, converted_params
);
723 _mesa_PointSizex(GLfixed size
)
725 _mesa_PointSize((GLfloat
) (size
/ 65536.0f
));
729 _mesa_PolygonOffsetx(GLfixed factor
, GLfixed units
)
731 _mesa_PolygonOffset((GLfloat
) (factor
/ 65536.0f
),
732 (GLfloat
) (units
/ 65536.0f
));
736 _mesa_Rotatex(GLfixed angle
, GLfixed x
, GLfixed y
, GLfixed z
)
738 _mesa_Rotatef((GLfloat
) (angle
/ 65536.0f
),
739 (GLfloat
) (x
/ 65536.0f
),
740 (GLfloat
) (y
/ 65536.0f
),
741 (GLfloat
) (z
/ 65536.0f
));
745 _mesa_SampleCoveragex(GLclampx value
, GLboolean invert
)
747 _mesa_SampleCoverage((GLclampf
) (value
/ 65536.0f
),
752 _mesa_Scalex(GLfixed x
, GLfixed y
, GLfixed z
)
754 _mesa_Scalef((GLfloat
) (x
/ 65536.0f
),
755 (GLfloat
) (y
/ 65536.0f
),
756 (GLfloat
) (z
/ 65536.0f
));
760 _mesa_TexEnvx(GLenum target
, GLenum pname
, GLfixed param
)
763 case GL_POINT_SPRITE
:
764 case GL_TEXTURE_FILTER_CONTROL_EXT
:
768 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
769 "glTexEnvx(target=0x%x)", target
);
774 case GL_COORD_REPLACE
:
775 case GL_TEXTURE_ENV_MODE
:
777 case GL_COMBINE_ALPHA
:
784 case GL_OPERAND0_RGB
:
785 case GL_OPERAND1_RGB
:
786 case GL_OPERAND2_RGB
:
787 case GL_OPERAND0_ALPHA
:
788 case GL_OPERAND1_ALPHA
:
789 case GL_OPERAND2_ALPHA
:
790 _mesa_TexEnvf(target
, pname
, (GLfloat
) param
);
792 case GL_TEXTURE_LOD_BIAS_EXT
:
795 _mesa_TexEnvf(target
, pname
, (GLfloat
) (param
/ 65536.0f
));
798 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
799 "glTexEnvx(pname=0x%x)", pname
);
805 _mesa_TexEnvxv(GLenum target
, GLenum pname
, const GLfixed
*params
)
808 case GL_POINT_SPRITE
:
809 case GL_TEXTURE_FILTER_CONTROL_EXT
:
813 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
814 "glTexEnvxv(target=0x%x)", target
);
819 case GL_COORD_REPLACE
:
820 case GL_TEXTURE_ENV_MODE
:
822 case GL_COMBINE_ALPHA
:
829 case GL_OPERAND0_RGB
:
830 case GL_OPERAND1_RGB
:
831 case GL_OPERAND2_RGB
:
832 case GL_OPERAND0_ALPHA
:
833 case GL_OPERAND1_ALPHA
:
834 case GL_OPERAND2_ALPHA
:
835 _mesa_TexEnvf(target
, pname
, (GLfloat
) params
[0]);
837 case GL_TEXTURE_LOD_BIAS_EXT
:
840 _mesa_TexEnvf(target
, pname
, (GLfloat
) (params
[0] / 65536.0f
));
842 case GL_TEXTURE_ENV_COLOR
: {
844 GLfloat converted_params
[4];
846 for (i
= 0; i
< ARRAY_SIZE(converted_params
); i
++) {
847 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
850 _mesa_TexEnvfv(target
, pname
, converted_params
);
854 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
855 "glTexEnvxv(pname=0x%x)", pname
);
861 _check_TexGeniOES(GLenum coord
, GLenum pname
, GLint param
)
863 _es_TexGenf(coord
, pname
, (GLfloat
) param
);
867 _check_TexGenivOES(GLenum coord
, GLenum pname
, const GLint
*params
)
869 _es_TexGenf(coord
, pname
, (GLfloat
) params
[0]);
873 _mesa_TexGenxOES(GLenum coord
, GLenum pname
, GLfixed param
)
875 _es_TexGenf(coord
, pname
, (GLfloat
) param
);
879 _mesa_TexGenxvOES(GLenum coord
, GLenum pname
, const GLfixed
*params
)
881 _es_TexGenf(coord
, pname
, (GLfloat
) params
[0]);
885 _mesa_TexParameterx(GLenum target
, GLenum pname
, GLfixed param
)
887 if (pname
== GL_TEXTURE_MAX_ANISOTROPY_EXT
) {
888 _mesa_TexParameterf(target
, pname
, (GLfloat
) (param
/ 65536.0f
));
890 _mesa_TexParameterf(target
, pname
, (GLfloat
) param
);
895 _mesa_TexParameterxv(GLenum target
, GLenum pname
, const GLfixed
*params
)
898 unsigned int n_params
= 4;
899 GLfloat converted_params
[4];
900 bool convert_params_value
= true;
904 case GL_TEXTURE_CUBE_MAP
:
905 case GL_TEXTURE_EXTERNAL_OES
:
908 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
909 "glTexParameterxv(target=0x%x)", target
);
913 case GL_TEXTURE_WRAP_S
:
914 case GL_TEXTURE_WRAP_T
:
915 convert_params_value
= false;
918 case GL_TEXTURE_MIN_FILTER
:
919 case GL_TEXTURE_MAG_FILTER
:
920 case GL_GENERATE_MIPMAP
:
921 convert_params_value
= false;
924 case GL_TEXTURE_MAX_ANISOTROPY_EXT
:
927 case GL_TEXTURE_CROP_RECT_OES
:
931 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
932 "glTexParameterxv(pname=0x%x)", pname
);
936 if (convert_params_value
) {
937 for (i
= 0; i
< n_params
; i
++) {
938 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
941 for (i
= 0; i
< n_params
; i
++) {
942 converted_params
[i
] = (GLfloat
) params
[i
];
946 _mesa_TexParameterfv(target
, pname
, converted_params
);
950 _mesa_Translatex(GLfixed x
, GLfixed y
, GLfixed z
)
952 _mesa_Translatef((GLfloat
) (x
/ 65536.0f
),
953 (GLfloat
) (y
/ 65536.0f
),
954 (GLfloat
) (z
/ 65536.0f
));