2 #include "main/mfeatures.h"
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 _es_AlphaFuncx(GLenum func
, GLclampx ref
)
35 _mesa_AlphaFunc(func
, (GLclampf
) (ref
/ 65536.0f
));
39 _es_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 _es_ClearDepthx(GLclampx depth
)
50 _mesa_ClearDepthf((GLclampf
) (depth
/ 65536.0f
));
54 _es_ClipPlanef(GLenum plane
, const GLfloat
*equation
)
57 GLdouble converted_equation
[4];
59 for (i
= 0; i
< Elements(converted_equation
); i
++) {
60 converted_equation
[i
] = (GLdouble
) (equation
[i
]);
63 _mesa_ClipPlane(plane
, converted_equation
);
67 _es_ClipPlanex(GLenum plane
, const GLfixed
*equation
)
70 GLdouble converted_equation
[4];
72 for (i
= 0; i
< Elements(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 _es_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 _es_DepthRangex(GLclampx zNear
, GLclampx zFar
)
100 _mesa_DepthRangef((GLclampf
) (zNear
/ 65536.0f
),
101 (GLclampf
) (zFar
/ 65536.0f
));
105 _es_DrawTexxOES(GLfixed x
, GLfixed y
, GLfixed z
, GLfixed w
, GLfixed h
)
108 _mesa_DrawTexf((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 _es_DrawTexxvOES(const GLfixed
*coords
)
119 GLfloat converted_coords
[5];
121 for (i
= 0; i
< Elements(converted_coords
); i
++) {
122 converted_coords
[i
] = (GLfloat
) (coords
[i
] / 65536.0f
);
125 _mesa_DrawTexfv(converted_coords
);
129 _es_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 _es_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 _es_Frustumf(GLfloat left
, GLfloat right
, GLfloat bottom
, GLfloat top
,
181 GLfloat zNear
, GLfloat zFar
)
183 _mesa_Frustum((GLdouble
) (left
),
192 _es_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 _es_GetClipPlanef(GLenum plane
, GLfloat
*equation
)
207 GLdouble converted_equation
[4];
209 _mesa_GetClipPlane(plane
, converted_equation
);
210 for (i
= 0; i
< Elements(converted_equation
); i
++) {
211 equation
[i
] = (GLfloat
) (converted_equation
[i
]);
216 _es_GetClipPlanex(GLenum plane
, GLfixed
*equation
)
219 GLdouble converted_equation
[4];
221 _mesa_GetClipPlane(plane
, converted_equation
);
222 for (i
= 0; i
< Elements(converted_equation
); i
++) {
223 equation
[i
] = (GLfixed
) (converted_equation
[i
] * 65536);
228 _es_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 _es_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 _es_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
&& pname
!= GL_RGB_SCALE
&& pname
!= GL_ALPHA_SCALE
&& pname
!= GL_TEXTURE_ENV_MODE
&& pname
!= GL_COMBINE_RGB
&& pname
!= GL_COMBINE_ALPHA
&& pname
!= GL_SRC0_RGB
&& pname
!= GL_SRC1_RGB
&& pname
!= GL_SRC2_RGB
&& pname
!= GL_SRC0_ALPHA
&& pname
!= GL_SRC1_ALPHA
&& pname
!= GL_SRC2_ALPHA
&& pname
!= GL_OPERAND0_RGB
&& pname
!= GL_OPERAND1_RGB
&& pname
!= GL_OPERAND2_RGB
&& pname
!= GL_OPERAND0_ALPHA
&& pname
!= GL_OPERAND1_ALPHA
&& pname
!= GL_OPERAND2_ALPHA
) {
331 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
332 "glGetTexEnvxv(target=0x%x)", target
);
337 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
338 "glGetTexEnvxv(target=0x%x)", target
);
342 case GL_COORD_REPLACE
:
343 convert_params_value
= false;
346 case GL_TEXTURE_LOD_BIAS_EXT
:
349 case GL_TEXTURE_ENV_COLOR
:
356 case GL_TEXTURE_ENV_MODE
:
358 case GL_COMBINE_ALPHA
:
365 case GL_OPERAND0_RGB
:
366 case GL_OPERAND1_RGB
:
367 case GL_OPERAND2_RGB
:
368 case GL_OPERAND0_ALPHA
:
369 case GL_OPERAND1_ALPHA
:
370 case GL_OPERAND2_ALPHA
:
371 convert_params_value
= false;
375 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
376 "glGetTexEnvxv(pname=0x%x)", pname
);
380 _mesa_GetTexEnvfv(target
, pname
, converted_params
);
381 if (convert_params_value
) {
382 for (i
= 0; i
< n_params
; i
++) {
383 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
386 for (i
= 0; i
< n_params
; i
++) {
387 params
[i
] = (GLfixed
) converted_params
[i
];
393 _check_GetTexGenivOES(GLenum coord
, GLenum pname
, GLint
*params
)
395 _mesa_GetTexGeniv(coord
, pname
, params
);
399 _check_GetTexGenxvOES(GLenum coord
, GLenum pname
, GLfixed
*params
)
401 _mesa_GetTexGeniv(coord
, pname
, (GLint
*) params
);
405 _es_GetTexParameterxv(GLenum target
, GLenum pname
, GLfixed
*params
)
408 unsigned int n_params
= 4;
409 GLfloat converted_params
[4];
410 bool convert_params_value
= true;
414 case GL_TEXTURE_CUBE_MAP
:
415 case GL_TEXTURE_EXTERNAL_OES
:
418 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
419 "glGetTexParameterxv(target=0x%x)", target
);
423 case GL_TEXTURE_WRAP_S
:
424 case GL_TEXTURE_WRAP_T
:
425 case GL_TEXTURE_MIN_FILTER
:
426 case GL_TEXTURE_MAG_FILTER
:
427 case GL_GENERATE_MIPMAP
:
428 convert_params_value
= false;
431 case GL_TEXTURE_CROP_RECT_OES
:
435 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
436 "glGetTexParameterxv(pname=0x%x)", pname
);
440 _mesa_GetTexParameterfv(target
, pname
, converted_params
);
441 if (convert_params_value
) {
442 for (i
= 0; i
< n_params
; i
++) {
443 params
[i
] = (GLint
) (converted_params
[i
] * 65536);
446 for (i
= 0; i
< n_params
; i
++) {
447 params
[i
] = (GLfixed
) converted_params
[i
];
453 _es_LightModelx(GLenum pname
, GLfixed param
)
455 _mesa_LightModelf(pname
, (GLfloat
) param
);
459 _es_LightModelxv(GLenum pname
, const GLfixed
*params
)
462 unsigned int n_params
= 4;
463 GLfloat converted_params
[4];
464 bool convert_params_value
= true;
467 case GL_LIGHT_MODEL_AMBIENT
:
470 case GL_LIGHT_MODEL_TWO_SIDE
:
471 convert_params_value
= false;
475 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
476 "glLightModelxv(pname=0x%x)", pname
);
480 if (convert_params_value
) {
481 for (i
= 0; i
< n_params
; i
++) {
482 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
485 for (i
= 0; i
< n_params
; i
++) {
486 converted_params
[i
] = (GLfloat
) params
[i
];
490 _mesa_LightModelfv(pname
, converted_params
);
494 _es_Lightx(GLenum light
, GLenum pname
, GLfixed param
)
496 _mesa_Lightf(light
, pname
, (GLfloat
) (param
/ 65536.0f
));
500 _es_Lightxv(GLenum light
, GLenum pname
, const GLfixed
*params
)
503 unsigned int n_params
= 4;
504 GLfloat converted_params
[4];
506 if (light
< GL_LIGHT0
|| light
> GL_LIGHT7
) {
507 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
508 "glLightxv(light=0x%x)", light
);
518 case GL_SPOT_DIRECTION
:
521 case GL_SPOT_EXPONENT
:
523 case GL_CONSTANT_ATTENUATION
:
524 case GL_LINEAR_ATTENUATION
:
525 case GL_QUADRATIC_ATTENUATION
:
529 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
530 "glLightxv(pname=0x%x)", pname
);
534 for (i
= 0; i
< n_params
; i
++) {
535 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
538 _mesa_Lightfv(light
, pname
, converted_params
);
542 _es_LineWidthx(GLfixed width
)
544 _mesa_LineWidth((GLfloat
) (width
/ 65536.0f
));
548 _es_LoadMatrixx(const GLfixed
*m
)
551 GLfloat converted_m
[16];
553 for (i
= 0; i
< Elements(converted_m
); i
++) {
554 converted_m
[i
] = (GLfloat
) (m
[i
] / 65536.0f
);
557 _mesa_LoadMatrixf(converted_m
);
561 _es_Materialx(GLenum face
, GLenum pname
, GLfixed param
)
563 if (face
!= GL_FRONT_AND_BACK
) {
564 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
565 "glMaterialx(face=0x%x)", face
);
569 if (pname
!= GL_SHININESS
) {
570 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
571 "glMaterialx(pname=0x%x)", pname
);
575 _es_Materialf(face
, pname
, (GLfloat
) (param
/ 65536.0f
));
579 _es_Materialxv(GLenum face
, GLenum pname
, const GLfixed
*params
)
582 unsigned int n_params
= 4;
583 GLfloat converted_params
[4];
585 if (face
!= GL_FRONT_AND_BACK
) {
586 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
587 "glMaterialxv(face=0x%x)", face
);
594 case GL_AMBIENT_AND_DIFFUSE
:
603 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
604 "glMaterialxv(pname=0x%x)", pname
);
608 for (i
= 0; i
< n_params
; i
++) {
609 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
612 _es_Materialfv(face
, pname
, converted_params
);
616 _es_MultMatrixx(const GLfixed
*m
)
619 GLfloat converted_m
[16];
621 for (i
= 0; i
< Elements(converted_m
); i
++) {
622 converted_m
[i
] = (GLfloat
) (m
[i
] / 65536.0f
);
625 _mesa_MultMatrixf(converted_m
);
629 _es_MultiTexCoord4x(GLenum texture
, GLfixed s
, GLfixed t
, GLfixed r
, GLfixed q
)
631 _es_MultiTexCoord4f(texture
,
632 (GLfloat
) (s
/ 65536.0f
),
633 (GLfloat
) (t
/ 65536.0f
),
634 (GLfloat
) (r
/ 65536.0f
),
635 (GLfloat
) (q
/ 65536.0f
));
639 _es_Normal3x(GLfixed nx
, GLfixed ny
, GLfixed nz
)
641 _es_Normal3f((GLfloat
) (nx
/ 65536.0f
),
642 (GLfloat
) (ny
/ 65536.0f
),
643 (GLfloat
) (nz
/ 65536.0f
));
647 _es_Orthof(GLfloat left
, GLfloat right
, GLfloat bottom
, GLfloat top
,
648 GLfloat zNear
, GLfloat zFar
)
650 _mesa_Ortho((GLdouble
) (left
),
659 _es_Orthox(GLfixed left
, GLfixed right
, GLfixed bottom
, GLfixed top
,
660 GLfixed zNear
, GLfixed zFar
)
662 _mesa_Ortho((GLdouble
) (left
/ 65536.0),
663 (GLdouble
) (right
/ 65536.0),
664 (GLdouble
) (bottom
/ 65536.0),
665 (GLdouble
) (top
/ 65536.0),
666 (GLdouble
) (zNear
/ 65536.0),
667 (GLdouble
) (zFar
/ 65536.0));
671 _es_PointParameterx(GLenum pname
, GLfixed param
)
673 _mesa_PointParameterf(pname
, (GLfloat
) (param
/ 65536.0f
));
677 _es_PointParameterxv(GLenum pname
, const GLfixed
*params
)
680 unsigned int n_params
= 3;
681 GLfloat converted_params
[3];
684 case GL_POINT_SIZE_MIN
:
685 case GL_POINT_SIZE_MAX
:
686 case GL_POINT_FADE_THRESHOLD_SIZE
:
689 case GL_POINT_DISTANCE_ATTENUATION
:
693 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
694 "glPointParameterxv(pname=0x%x)", pname
);
698 for (i
= 0; i
< n_params
; i
++) {
699 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
702 _mesa_PointParameterfv(pname
, converted_params
);
706 _es_PointSizex(GLfixed size
)
708 _mesa_PointSize((GLfloat
) (size
/ 65536.0f
));
712 _es_PolygonOffsetx(GLfixed factor
, GLfixed units
)
714 _mesa_PolygonOffset((GLfloat
) (factor
/ 65536.0f
),
715 (GLfloat
) (units
/ 65536.0f
));
719 _es_Rotatex(GLfixed angle
, GLfixed x
, GLfixed y
, GLfixed z
)
721 _mesa_Rotatef((GLfloat
) (angle
/ 65536.0f
),
722 (GLfloat
) (x
/ 65536.0f
),
723 (GLfloat
) (y
/ 65536.0f
),
724 (GLfloat
) (z
/ 65536.0f
));
728 _es_SampleCoveragex(GLclampx value
, GLboolean invert
)
730 _mesa_SampleCoverageARB((GLclampf
) (value
/ 65536.0f
),
735 _es_Scalex(GLfixed x
, GLfixed y
, GLfixed z
)
737 _mesa_Scalef((GLfloat
) (x
/ 65536.0f
),
738 (GLfloat
) (y
/ 65536.0f
),
739 (GLfloat
) (z
/ 65536.0f
));
743 _es_TexEnvx(GLenum target
, GLenum pname
, GLfixed param
)
746 case GL_POINT_SPRITE
:
747 case GL_TEXTURE_FILTER_CONTROL_EXT
:
751 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
752 "glTexEnvx(target=0x%x)", target
);
757 case GL_COORD_REPLACE
:
758 case GL_TEXTURE_ENV_MODE
:
760 case GL_COMBINE_ALPHA
:
767 case GL_OPERAND0_RGB
:
768 case GL_OPERAND1_RGB
:
769 case GL_OPERAND2_RGB
:
770 case GL_OPERAND0_ALPHA
:
771 case GL_OPERAND1_ALPHA
:
772 case GL_OPERAND2_ALPHA
:
773 _mesa_TexEnvf(target
, pname
, (GLfloat
) param
);
775 case GL_TEXTURE_LOD_BIAS_EXT
:
778 _mesa_TexEnvf(target
, pname
, (GLfloat
) (param
/ 65536.0f
));
781 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
782 "glTexEnvx(pname=0x%x)", pname
);
788 _es_TexEnvxv(GLenum target
, GLenum pname
, const GLfixed
*params
)
791 case GL_POINT_SPRITE
:
792 case GL_TEXTURE_FILTER_CONTROL_EXT
:
796 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
797 "glTexEnvxv(target=0x%x)", target
);
802 case GL_COORD_REPLACE
:
803 case GL_TEXTURE_ENV_MODE
:
805 case GL_COMBINE_ALPHA
:
812 case GL_OPERAND0_RGB
:
813 case GL_OPERAND1_RGB
:
814 case GL_OPERAND2_RGB
:
815 case GL_OPERAND0_ALPHA
:
816 case GL_OPERAND1_ALPHA
:
817 case GL_OPERAND2_ALPHA
:
818 _mesa_TexEnvf(target
, pname
, (GLfloat
) params
[0]);
820 case GL_TEXTURE_LOD_BIAS_EXT
:
823 _mesa_TexEnvf(target
, pname
, (GLfloat
) (params
[0] / 65536.0f
));
825 case GL_TEXTURE_ENV_COLOR
: {
827 GLfloat converted_params
[4];
829 for (i
= 0; i
< Elements(converted_params
); i
++) {
830 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
833 _mesa_TexEnvfv(target
, pname
, converted_params
);
837 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
838 "glTexEnvxv(pname=0x%x)", pname
);
844 _check_TexGeniOES(GLenum coord
, GLenum pname
, GLint param
)
846 _es_TexGenf(coord
, pname
, (GLfloat
) param
);
850 _check_TexGenivOES(GLenum coord
, GLenum pname
, const GLint
*params
)
852 _es_TexGenf(coord
, pname
, (GLfloat
) params
[0]);
856 _check_TexGenxOES(GLenum coord
, GLenum pname
, GLfixed param
)
858 _es_TexGenf(coord
, pname
, (GLfloat
) param
);
862 _check_TexGenxvOES(GLenum coord
, GLenum pname
, const GLfixed
*params
)
864 _es_TexGenf(coord
, pname
, (GLfloat
) params
[0]);
868 _es_TexParameterx(GLenum target
, GLenum pname
, GLfixed param
)
870 if (pname
== GL_TEXTURE_MAX_ANISOTROPY_EXT
) {
871 _mesa_TexParameterf(target
, pname
, (GLfloat
) (param
/ 65536.0f
));
873 _mesa_TexParameterf(target
, pname
, (GLfloat
) param
);
878 _es_TexParameterxv(GLenum target
, GLenum pname
, const GLfixed
*params
)
881 unsigned int n_params
= 4;
882 GLfloat converted_params
[4];
883 bool convert_params_value
= true;
887 case GL_TEXTURE_CUBE_MAP
:
888 case GL_TEXTURE_EXTERNAL_OES
:
891 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
892 "glTexParameterxv(target=0x%x)", target
);
896 case GL_TEXTURE_WRAP_S
:
897 case GL_TEXTURE_WRAP_T
:
898 convert_params_value
= false;
901 case GL_TEXTURE_MIN_FILTER
:
902 case GL_TEXTURE_MAG_FILTER
:
903 case GL_GENERATE_MIPMAP
:
904 convert_params_value
= false;
907 case GL_TEXTURE_MAX_ANISOTROPY_EXT
:
910 case GL_TEXTURE_CROP_RECT_OES
:
914 _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM
,
915 "glTexParameterxv(pname=0x%x)", pname
);
919 if (convert_params_value
) {
920 for (i
= 0; i
< n_params
; i
++) {
921 converted_params
[i
] = (GLfloat
) (params
[i
] / 65536.0f
);
924 for (i
= 0; i
< n_params
; i
++) {
925 converted_params
[i
] = (GLfloat
) params
[i
];
929 _mesa_TexParameterfv(target
, pname
, converted_params
);
933 _es_Translatex(GLfixed x
, GLfixed y
, GLfixed z
)
935 _mesa_Translatef((GLfloat
) (x
/ 65536.0f
),
936 (GLfloat
) (y
/ 65536.0f
),
937 (GLfloat
) (z
/ 65536.0f
));