<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="pname" type="GLenum" />
- <param name="param" type="const GLint *" />
+ <param name="param" type="const GLint *" count="_mesa_texenv_enum_to_count(pname)"/>
</function>
<function name="MultiTexEnvfEXT">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="pname" type="GLenum" />
- <param name="param" type="const GLfloat *" />
+ <param name="param" type="const GLfloat *" count="_mesa_texenv_enum_to_count(pname)"/>
</function>
<function name="GetMultiTexEnvivEXT">
<param name="texunit" type="GLenum" />
<param name="coord" type="GLenum" />
<param name="pname" type="GLenum" />
- <param name="param" type="const GLdouble*" />
+ <param name="param" type="const GLdouble*" count="_mesa_texgen_enum_to_count(pname)"/>
</function>
<function name="MultiTexGenfEXT">
<param name="texunit" type="GLenum" />
<param name="coord" type="GLenum" />
<param name="pname" type="GLenum" />
- <param name="param" type="const GLfloat *" />
+ <param name="param" type="const GLfloat *" count="_mesa_texgen_enum_to_count(pname)"/>
</function>
<function name="MultiTexGeniEXT">
<param name="texunit" type="GLenum" />
<param name="coord" type="GLenum" />
<param name="pname" type="GLenum" />
- <param name="param" type="const GLint *" />
+ <param name="param" type="const GLint *" count="_mesa_texgen_enum_to_count(pname)"/>
</function>
<function name="GetMultiTexGendvEXT">
<function name="TexGenxvOES" es1="1.0" desktop="false">
<param name="coord" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfixed *" variable_param="pname"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"
+ marshal_count="_mesa_texgen_enum_to_count(pname)"/>
</function>
</category>
<function name="Fogfv" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"
+ marshal_count="_mesa_fog_enum_to_count(pname)"/>
<glx rop="81"/>
</function>
<function name="Fogiv" deprecated="3.1">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLint *" variable_param="pname"/>
+ <param name="params" type="const GLint *" variable_param="pname"
+ marshal_count="_mesa_fog_enum_to_count(pname)"/>
<glx rop="83"/>
</function>
<function name="Lightfv" es1="1.0" deprecated="3.1">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"
+ marshal_count="_mesa_light_enum_to_count(pname)"/>
<glx rop="87"/>
</function>
<function name="Lightiv" deprecated="3.1">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLint *" variable_param="pname"/>
+ <param name="params" type="const GLint *" variable_param="pname"
+ marshal_count="_mesa_light_enum_to_count(pname)"/>
<glx rop="89"/>
</function>
<function name="LightModelfv" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"
+ marshal_count="_mesa_light_model_enum_to_count(pname)"/>
<glx rop="91"/>
</function>
<function name="LightModeliv" deprecated="3.1">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLint *" variable_param="pname"/>
+ <param name="params" type="const GLint *" variable_param="pname"
+ marshal_count="_mesa_light_model_enum_to_count(pname)"/>
<glx rop="93"/>
</function>
<function name="TexEnvfv" es1="1.0" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"
+ marshal_count="_mesa_texenv_enum_to_count(pname)"/>
<glx rop="112"/>
</function>
<function name="TexEnviv" es1="1.1" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLint *" variable_param="pname"/>
+ <param name="params" type="const GLint *" variable_param="pname"
+ marshal_count="_mesa_texenv_enum_to_count(pname)"/>
<glx rop="114"/>
</function>
<function name="TexGendv" deprecated="3.1">
<param name="coord" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLdouble *" variable_param="pname"/>
+ <param name="params" type="const GLdouble *" variable_param="pname"
+ marshal_count="_mesa_texgen_enum_to_count(pname)"/>
<glx rop="116"/>
</function>
<function name="TexGenfv" deprecated="3.1">
<param name="coord" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"
+ marshal_count="_mesa_texgen_enum_to_count(pname)"/>
<glx rop="118"/>
</function>
<function name="TexGeniv" deprecated="3.1">
<param name="coord" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLint *" variable_param="pname"/>
+ <param name="params" type="const GLint *" variable_param="pname"
+ marshal_count="_mesa_texgen_enum_to_count(pname)"/>
<glx rop="120"/>
</function>
<function name="Fogxv" es1="1.0" desktop="false">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfixed *" variable_param="pname"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"
+ marshal_count="_mesa_fog_enum_to_count(pname)"/>
</function>
<function name="Frustumx" es1="1.0" desktop="false">
<function name="LightModelxv" es1="1.0" desktop="false">
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfixed *" variable_param="pname"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"
+ marshal_count="_mesa_light_model_enum_to_count(pname)"/>
</function>
<function name="Lightx" es1="1.0" desktop="false">
<function name="Lightxv" es1="1.0" desktop="false">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfixed *" variable_param="pname"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"
+ marshal_count="_mesa_light_enum_to_count(pname)"/>
</function>
<function name="LineWidthx" es1="1.0" desktop="false">
<function name="TexEnvxv" es1="1.0" desktop="false">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="params" type="const GLfixed *" variable_param="pname"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"
+ marshal_count="_mesa_texenv_enum_to_count(pname)"/>
</function>
<function name="TexParameterx" es1="1.0" desktop="false">
}
}
+static inline unsigned
+_mesa_fog_enum_to_count(GLenum pname)
+{
+ switch (pname) {
+ case GL_FOG_MODE:
+ case GL_FOG_DENSITY:
+ case GL_FOG_START:
+ case GL_FOG_END:
+ case GL_FOG_INDEX:
+ case GL_FOG_COORDINATE_SOURCE_EXT:
+ case GL_FOG_DISTANCE_MODE_NV:
+ return 1;
+ case GL_FOG_COLOR:
+ return 4;
+ default:
+ return 0;
+ }
+}
+
+static inline unsigned
+_mesa_light_enum_to_count(GLenum pname)
+{
+ switch (pname) {
+ case GL_AMBIENT:
+ case GL_DIFFUSE:
+ case GL_SPECULAR:
+ case GL_POSITION:
+ return 4;
+ case GL_SPOT_DIRECTION:
+ return 3;
+ case GL_SPOT_EXPONENT:
+ case GL_SPOT_CUTOFF:
+ case GL_CONSTANT_ATTENUATION:
+ case GL_LINEAR_ATTENUATION:
+ case GL_QUADRATIC_ATTENUATION:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static inline unsigned
+_mesa_light_model_enum_to_count(GLenum pname)
+{
+ switch (pname) {
+ case GL_LIGHT_MODEL_AMBIENT:
+ return 4;
+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
+ case GL_LIGHT_MODEL_TWO_SIDE:
+ case GL_LIGHT_MODEL_COLOR_CONTROL:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static inline unsigned
+_mesa_texenv_enum_to_count(GLenum pname)
+{
+ switch (pname) {
+ case GL_TEXTURE_ENV_MODE:
+ case GL_COMBINE_RGB:
+ case GL_COMBINE_ALPHA:
+ case GL_SOURCE0_RGB:
+ case GL_SOURCE1_RGB:
+ case GL_SOURCE2_RGB:
+ case GL_SOURCE3_RGB_NV:
+ case GL_SOURCE0_ALPHA:
+ case GL_SOURCE1_ALPHA:
+ case GL_SOURCE2_ALPHA:
+ case GL_SOURCE3_ALPHA_NV:
+ case GL_OPERAND0_RGB:
+ case GL_OPERAND1_RGB:
+ case GL_OPERAND2_RGB:
+ case GL_OPERAND3_RGB_NV:
+ case GL_OPERAND0_ALPHA:
+ case GL_OPERAND1_ALPHA:
+ case GL_OPERAND2_ALPHA:
+ case GL_OPERAND3_ALPHA_NV:
+ case GL_RGB_SCALE:
+ case GL_ALPHA_SCALE:
+ case GL_TEXTURE_LOD_BIAS_EXT:
+ case GL_COORD_REPLACE_NV:
+ return 1;
+ case GL_TEXTURE_ENV_COLOR:
+ return 4;
+ default:
+ return 0;
+ }
+}
+
+static inline unsigned
+_mesa_texgen_enum_to_count(GLenum pname)
+{
+ switch (pname) {
+ case GL_TEXTURE_GEN_MODE:
+ return 1;
+ case GL_OBJECT_PLANE:
+ case GL_EYE_PLANE:
+ return 4;
+ default:
+ return 0;
+ }
+}
+
#endif /* MARSHAL_H */