aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/APIspec.dtd52
-rw-r--r--mesalib/src/mesa/main/APIspec.py617
-rw-r--r--mesalib/src/mesa/main/APIspec.xml4332
-rw-r--r--mesalib/src/mesa/main/APIspecutil.py272
-rw-r--r--mesalib/src/mesa/main/accum.h7
-rw-r--r--mesalib/src/mesa/main/api_exec.c183
-rw-r--r--mesalib/src/mesa/main/api_exec.h12
-rw-r--r--mesalib/src/mesa/main/api_loopback.c174
-rw-r--r--mesalib/src/mesa/main/api_validate.c147
-rw-r--r--mesalib/src/mesa/main/api_validate.h10
-rw-r--r--mesalib/src/mesa/main/arbprogram.c940
-rw-r--r--mesalib/src/mesa/main/arbprogram.h131
-rw-r--r--mesalib/src/mesa/main/arrayobj.h2
-rw-r--r--mesalib/src/mesa/main/atifragshader.c794
-rw-r--r--mesalib/src/mesa/main/atifragshader.h149
-rw-r--r--mesalib/src/mesa/main/attrib.c2
-rw-r--r--mesalib/src/mesa/main/attrib.h2
-rw-r--r--mesalib/src/mesa/main/bufferobj.c108
-rw-r--r--mesalib/src/mesa/main/bufferobj.h2
-rw-r--r--mesalib/src/mesa/main/clear.c1
-rw-r--r--mesalib/src/mesa/main/clear.h2
-rw-r--r--mesalib/src/mesa/main/clip.h2
-rw-r--r--mesalib/src/mesa/main/colormac.h2
-rw-r--r--mesalib/src/mesa/main/colortab.h9
-rw-r--r--mesalib/src/mesa/main/compiler.h28
-rw-r--r--mesalib/src/mesa/main/config.h18
-rw-r--r--mesalib/src/mesa/main/context.c272
-rw-r--r--mesalib/src/mesa/main/context.h18
-rw-r--r--mesalib/src/mesa/main/convolve.c1
-rw-r--r--mesalib/src/mesa/main/convolve.h8
-rw-r--r--mesalib/src/mesa/main/core.h66
-rw-r--r--mesalib/src/mesa/main/dd.h165
-rw-r--r--mesalib/src/mesa/main/debug.c7
-rw-r--r--mesalib/src/mesa/main/debug.h3
-rw-r--r--mesalib/src/mesa/main/depthstencil.c26
-rw-r--r--mesalib/src/mesa/main/depthstencil.h1
-rw-r--r--mesalib/src/mesa/main/dlist.c293
-rw-r--r--mesalib/src/mesa/main/dlist.h15
-rw-r--r--mesalib/src/mesa/main/dlopen.c15
-rw-r--r--mesalib/src/mesa/main/drawpix.h9
-rw-r--r--mesalib/src/mesa/main/drawtex.c131
-rw-r--r--mesalib/src/mesa/main/drawtex.h60
-rw-r--r--mesalib/src/mesa/main/enable.c115
-rw-r--r--mesalib/src/mesa/main/enums.c6651
-rw-r--r--mesalib/src/mesa/main/es_generator.py743
-rw-r--r--mesalib/src/mesa/main/extensions.c253
-rw-r--r--mesalib/src/mesa/main/fbobject.c196
-rw-r--r--mesalib/src/mesa/main/fbobject.h16
-rw-r--r--mesalib/src/mesa/main/feedback.h7
-rw-r--r--mesalib/src/mesa/main/ffvertex_prog.c20
-rw-r--r--mesalib/src/mesa/main/fog.c1
-rw-r--r--mesalib/src/mesa/main/formats.c186
-rw-r--r--mesalib/src/mesa/main/formats.h38
-rw-r--r--mesalib/src/mesa/main/framebuffer.c58
-rw-r--r--mesalib/src/mesa/main/framebuffer.h4
-rw-r--r--mesalib/src/mesa/main/get.c9932
-rw-r--r--mesalib/src/mesa/main/get.h5
-rw-r--r--mesalib/src/mesa/main/getstring.c59
-rw-r--r--mesalib/src/mesa/main/glheader.h58
-rw-r--r--mesalib/src/mesa/main/histogram.c1
-rw-r--r--mesalib/src/mesa/main/image.c512
-rw-r--r--mesalib/src/mesa/main/image.h8
-rw-r--r--mesalib/src/mesa/main/imports.c46
-rw-r--r--mesalib/src/mesa/main/imports.h106
-rw-r--r--mesalib/src/mesa/main/light.c12
-rw-r--r--mesalib/src/mesa/main/light.h2
-rw-r--r--mesalib/src/mesa/main/macros.h38
-rw-r--r--mesalib/src/mesa/main/mfeatures.h128
-rw-r--r--mesalib/src/mesa/main/mipmap.c48
-rw-r--r--mesalib/src/mesa/main/mm.c5
-rw-r--r--mesalib/src/mesa/main/mm.h3
-rw-r--r--mesalib/src/mesa/main/mtypes.h365
-rw-r--r--mesalib/src/mesa/main/multisample.h1
-rw-r--r--mesalib/src/mesa/main/nvprogram.c919
-rw-r--r--mesalib/src/mesa/main/nvprogram.h115
-rw-r--r--mesalib/src/mesa/main/pixelstore.h1
-rw-r--r--mesalib/src/mesa/main/querymatrix.c216
-rw-r--r--mesalib/src/mesa/main/queryobj.c130
-rw-r--r--mesalib/src/mesa/main/queryobj.h17
-rw-r--r--mesalib/src/mesa/main/rastpos.h7
-rw-r--r--mesalib/src/mesa/main/rbadaptors.c565
-rw-r--r--mesalib/src/mesa/main/readpix.c6
-rw-r--r--mesalib/src/mesa/main/remap.c64
-rw-r--r--mesalib/src/mesa/main/remap.h77
-rw-r--r--mesalib/src/mesa/main/remap_helper.h3288
-rw-r--r--mesalib/src/mesa/main/renderbuffer.c46
-rw-r--r--mesalib/src/mesa/main/renderbuffer.h5
-rw-r--r--mesalib/src/mesa/main/restart.c68
-rw-r--r--mesalib/src/mesa/main/restart.h41
-rw-r--r--mesalib/src/mesa/main/shaderapi.c1642
-rw-r--r--mesalib/src/mesa/main/shaderapi.h169
-rw-r--r--mesalib/src/mesa/main/shaderobj.c408
-rw-r--r--mesalib/src/mesa/main/shaderobj.h134
-rw-r--r--mesalib/src/mesa/main/shaders.c741
-rw-r--r--mesalib/src/mesa/main/shaders.h236
-rw-r--r--mesalib/src/mesa/main/shared.c25
-rw-r--r--mesalib/src/mesa/main/shared.h1
-rw-r--r--mesalib/src/mesa/main/state.c36
-rw-r--r--mesalib/src/mesa/main/syncobj.c15
-rw-r--r--mesalib/src/mesa/main/syncobj.h47
-rw-r--r--mesalib/src/mesa/main/texcompress.c19
-rw-r--r--mesalib/src/mesa/main/texcompress_fxt1.c2
-rw-r--r--mesalib/src/mesa/main/texcompress_fxt1.h4
-rw-r--r--mesalib/src/mesa/main/texcompress_s3tc.c19
-rw-r--r--mesalib/src/mesa/main/texenv.c119
-rw-r--r--mesalib/src/mesa/main/texenvprogram.c33
-rw-r--r--mesalib/src/mesa/main/texfetch.c607
-rw-r--r--mesalib/src/mesa/main/texfetch_tmp.h374
-rw-r--r--mesalib/src/mesa/main/texformat.c95
-rw-r--r--mesalib/src/mesa/main/texgen.c32
-rw-r--r--mesalib/src/mesa/main/texgen.h23
-rw-r--r--mesalib/src/mesa/main/texgetimage.c2
-rw-r--r--mesalib/src/mesa/main/texgetimage.h1
-rw-r--r--mesalib/src/mesa/main/teximage.c349
-rw-r--r--mesalib/src/mesa/main/teximage.h8
-rw-r--r--mesalib/src/mesa/main/texobj.c6
-rw-r--r--mesalib/src/mesa/main/texpal.c204
-rw-r--r--mesalib/src/mesa/main/texpal.h (renamed from mesalib/src/mesa/main/rbadaptors.h)24
-rw-r--r--mesalib/src/mesa/main/texparam.c22
-rw-r--r--mesalib/src/mesa/main/texrender.c1
-rw-r--r--mesalib/src/mesa/main/texrender.h1
-rw-r--r--mesalib/src/mesa/main/texstate.c2
-rw-r--r--mesalib/src/mesa/main/texstate.h1
-rw-r--r--mesalib/src/mesa/main/texstore.c683
-rw-r--r--mesalib/src/mesa/main/transformfeedback.c944
-rw-r--r--mesalib/src/mesa/main/transformfeedback.h132
-rw-r--r--mesalib/src/mesa/main/uniforms.c1382
-rw-r--r--mesalib/src/mesa/main/uniforms.h175
-rw-r--r--mesalib/src/mesa/main/varray.c290
-rw-r--r--mesalib/src/mesa/main/varray.h44
-rw-r--r--mesalib/src/mesa/main/version.c200
-rw-r--r--mesalib/src/mesa/main/version.h8
-rw-r--r--mesalib/src/mesa/main/viewport.h2
-rw-r--r--mesalib/src/mesa/main/vtxfmt.c2
-rw-r--r--mesalib/src/mesa/main/vtxfmt.h3
-rw-r--r--mesalib/src/mesa/main/vtxfmt_tmp.h21
136 files changed, 28136 insertions, 15422 deletions
diff --git a/mesalib/src/mesa/main/APIspec.dtd b/mesalib/src/mesa/main/APIspec.dtd
new file mode 100644
index 000000000..efcfa31f1
--- /dev/null
+++ b/mesalib/src/mesa/main/APIspec.dtd
@@ -0,0 +1,52 @@
+<!ELEMENT apispec (template|api)+>
+
+<!ELEMENT api (category*, function*)>
+<!ELEMENT category EMPTY>
+<!ELEMENT function EMPTY>
+
+<!ELEMENT template (proto, desc*)>
+<!ELEMENT proto (return, (param|vector)*)>
+<!ELEMENT return EMPTY>
+<!ELEMENT param EMPTY>
+<!ELEMENT vector (param*)>
+<!ELEMENT desc ((value|range)*, desc*)>
+<!ELEMENT value EMPTY>
+<!ELEMENT range EMPTY>
+
+<!ATTLIST api name NMTOKEN #REQUIRED
+ implementation (true | false) "false">
+<!ATTLIST category name NMTOKEN #REQUIRED>
+<!ATTLIST function name NMTOKEN #REQUIRED
+ default_prefix NMTOKEN "_mesa_"
+ external (true | false) "false"
+ template NMTOKEN #REQUIRED
+ gltype CDATA #IMPLIED
+ vector_size NMTOKEN #IMPLIED
+ expand_vector (true | false) "false"
+ skip_desc (true | false) "false">
+
+<!ATTLIST template name NMTOKEN #REQUIRED
+ direction (set | get) "set">
+
+<!ATTLIST return type CDATA #REQUIRED>
+<!ATTLIST param name NMTOKEN #REQUIRED
+ type CDATA #REQUIRED
+ hide_if_expanded (true | false) "false"
+ category NMTOKEN #IMPLIED>
+<!ATTLIST vector name NMTOKEN #REQUIRED
+ type CDATA #REQUIRED
+ size NMTOKEN #REQUIRED
+ category NMTOKEN #IMPLIED>
+
+<!ATTLIST desc name NMTOKEN #REQUIRED
+ vector_size CDATA #IMPLIED
+ convert (true | false) #IMPLIED
+ error NMTOKEN "GL_INVALID_ENUM"
+ category NMTOKEN #IMPLIED>
+
+<!ATTLIST value name CDATA #REQUIRED
+ category NMTOKEN #IMPLIED>
+<!ATTLIST range from NMTOKEN #REQUIRED
+ to NMTOKEN #REQUIRED
+ base NMTOKEN #IMPLIED
+ category NMTOKEN #IMPLIED>
diff --git a/mesalib/src/mesa/main/APIspec.py b/mesalib/src/mesa/main/APIspec.py
new file mode 100644
index 000000000..6947f7301
--- /dev/null
+++ b/mesalib/src/mesa/main/APIspec.py
@@ -0,0 +1,617 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+"""
+A parser for APIspec.
+"""
+
+class SpecError(Exception):
+ """Error in the spec file."""
+
+
+class Spec(object):
+ """A Spec is an abstraction of the API spec."""
+
+ def __init__(self, doc):
+ self.doc = doc
+
+ self.spec_node = doc.getRootElement()
+ self.tmpl_nodes = {}
+ self.api_nodes = {}
+ self.impl_node = None
+
+ # parse <apispec>
+ node = self.spec_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "template":
+ self.tmpl_nodes[node.prop("name")] = node
+ elif node.name == "api":
+ self.api_nodes[node.prop("name")] = node
+ else:
+ raise SpecError("unexpected node %s in apispec" %
+ node.name)
+ node = node.next
+
+ # find an implementation
+ for name, node in self.api_nodes.iteritems():
+ if node.prop("implementation") == "true":
+ self.impl_node = node
+ break
+ if not self.impl_node:
+ raise SpecError("unable to find an implementation")
+
+ def get_impl(self):
+ """Return the implementation."""
+ return API(self, self.impl_node)
+
+ def get_api(self, name):
+ """Return an API."""
+ return API(self, self.api_nodes[name])
+
+
+class API(object):
+ """An API consists of categories and functions."""
+
+ def __init__(self, spec, api_node):
+ self.name = api_node.prop("name")
+ self.is_impl = (api_node.prop("implementation") == "true")
+
+ self.categories = []
+ self.functions = []
+
+ # parse <api>
+ func_nodes = []
+ node = api_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "category":
+ cat = node.prop("name")
+ self.categories.append(cat)
+ elif node.name == "function":
+ func_nodes.append(node)
+ else:
+ raise SpecError("unexpected node %s in api" % node.name)
+ node = node.next
+
+ # realize functions
+ for func_node in func_nodes:
+ tmpl_node = spec.tmpl_nodes[func_node.prop("template")]
+ try:
+ func = Function(tmpl_node, func_node, self.is_impl,
+ self.categories)
+ except SpecError, e:
+ func_name = func_node.prop("name")
+ raise SpecError("failed to parse %s: %s" % (func_name, e))
+ self.functions.append(func)
+
+ def match(self, func, conversions={}):
+ """Find a matching function in the API."""
+ match = None
+ need_conv = False
+ for f in self.functions:
+ matched, conv = f.match(func, conversions)
+ if matched:
+ match = f
+ need_conv = conv
+ # exact match
+ if not need_conv:
+ break
+ return (match, need_conv)
+
+
+class Function(object):
+ """Parse and realize a <template> node."""
+
+ def __init__(self, tmpl_node, func_node, force_skip_desc=False, categories=[]):
+ self.tmpl_name = tmpl_node.prop("name")
+ self.direction = tmpl_node.prop("direction")
+
+ self.name = func_node.prop("name")
+ self.prefix = func_node.prop("default_prefix")
+ self.is_external = (func_node.prop("external") == "true")
+
+ if force_skip_desc:
+ self._skip_desc = True
+ else:
+ self._skip_desc = (func_node.prop("skip_desc") == "true")
+
+ self._categories = categories
+
+ # these attributes decide how the template is realized
+ self._gltype = func_node.prop("gltype")
+ if func_node.hasProp("vector_size"):
+ self._vector_size = int(func_node.prop("vector_size"))
+ else:
+ self._vector_size = 0
+ self._expand_vector = (func_node.prop("expand_vector") == "true")
+
+ self.return_type = "void"
+ param_nodes = []
+
+ # find <proto>
+ proto_node = tmpl_node.children
+ while proto_node:
+ if proto_node.type == "element" and proto_node.name == "proto":
+ break
+ proto_node = proto_node.next
+ if not proto_node:
+ raise SpecError("no proto")
+ # and parse it
+ node = proto_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "return":
+ self.return_type = node.prop("type")
+ elif node.name == "param" or node.name == "vector":
+ if self.support_node(node):
+ # make sure the node is not hidden
+ if not (self._expand_vector and
+ (node.prop("hide_if_expanded") == "true")):
+ param_nodes.append(node)
+ else:
+ raise SpecError("unexpected node %s in proto" % node.name)
+ node = node.next
+
+ self._init_params(param_nodes)
+ self._init_descs(tmpl_node, param_nodes)
+
+ def __str__(self):
+ return "%s %s%s(%s)" % (self.return_type, self.prefix, self.name,
+ self.param_string(True))
+
+ def _init_params(self, param_nodes):
+ """Parse and initialize parameters."""
+ self.params = []
+
+ for param_node in param_nodes:
+ size = self.param_node_size(param_node)
+ # when no expansion, vector is just like param
+ if param_node.name == "param" or not self._expand_vector:
+ param = Parameter(param_node, self._gltype, size)
+ self.params.append(param)
+ continue
+
+ if not size or size > param_node.lsCountNode():
+ raise SpecError("could not expand %s with unknown or "
+ "mismatch sizes" % param.name)
+
+ # expand the vector
+ expanded_params = []
+ child = param_node.children
+ while child:
+ if (child.type == "element" and child.name == "param" and
+ self.support_node(child)):
+ expanded_params.append(Parameter(child, self._gltype))
+ if len(expanded_params) == size:
+ break
+ child = child.next
+ # just in case that lsCountNode counts unknown nodes
+ if len(expanded_params) < size:
+ raise SpecError("not enough named parameters")
+
+ self.params.extend(expanded_params)
+
+ def _init_descs(self, tmpl_node, param_nodes):
+ """Parse and initialize parameter descriptions."""
+ self.checker = Checker()
+ if self._skip_desc:
+ return
+
+ node = tmpl_node.children
+ while node:
+ if node.type == "element" and node.name == "desc":
+ if self.support_node(node):
+ # parse <desc>
+ desc = Description(node, self._categories)
+ self.checker.add_desc(desc)
+ node = node.next
+
+ self.checker.validate(self, param_nodes)
+
+ def support_node(self, node):
+ """Return true if a node is in the supported category."""
+ return (not node.hasProp("category") or
+ node.prop("category") in self._categories)
+
+ def get_param(self, name):
+ """Return the named parameter."""
+ for param in self.params:
+ if param.name == name:
+ return param
+ return None
+
+ def param_node_size(self, param):
+ """Return the size of a vector."""
+ if param.name != "vector":
+ return 0
+
+ size = param.prop("size")
+ if size.isdigit():
+ size = int(size)
+ else:
+ size = 0
+ if not size:
+ size = self._vector_size
+ if not size and self._expand_vector:
+ # return the number of named parameters
+ size = param.lsCountNode()
+ return size
+
+ def param_string(self, declaration):
+ """Return the C code of the parameters."""
+ args = []
+ if declaration:
+ for param in self.params:
+ sep = "" if param.type.endswith("*") else " "
+ args.append("%s%s%s" % (param.type, sep, param.name))
+ if not args:
+ args.append("void")
+ else:
+ for param in self.params:
+ args.append(param.name)
+ return ", ".join(args)
+
+ def match(self, other, conversions={}):
+ """Return true if the functions match, probably with a conversion."""
+ if (self.tmpl_name != other.tmpl_name or
+ self.return_type != other.return_type or
+ len(self.params) != len(other.params)):
+ return (False, False)
+
+ need_conv = False
+ for i in xrange(len(self.params)):
+ src = other.params[i]
+ dst = self.params[i]
+ if (src.is_vector != dst.is_vector or src.size != dst.size):
+ return (False, False)
+ if src.type != dst.type:
+ if dst.base_type() in conversions.get(src.base_type(), []):
+ need_conv = True
+ else:
+ # unable to convert
+ return (False, False)
+
+ return (True, need_conv)
+
+
+class Parameter(object):
+ """A parameter of a function."""
+
+ def __init__(self, param_node, gltype=None, size=0):
+ self.is_vector = (param_node.name == "vector")
+
+ self.name = param_node.prop("name")
+ self.size = size
+
+ type = param_node.prop("type")
+ if gltype:
+ type = type.replace("GLtype", gltype)
+ elif type.find("GLtype") != -1:
+ raise SpecError("parameter %s has unresolved type" % self.name)
+
+ self.type = type
+
+ def base_type(self):
+ """Return the base GL type by stripping qualifiers."""
+ return [t for t in self.type.split(" ") if t.startswith("GL")][0]
+
+
+class Checker(object):
+ """A checker is the collection of all descriptions on the same level.
+ Descriptions of the same parameter are concatenated.
+ """
+
+ def __init__(self):
+ self.switches = {}
+ self.switch_constants = {}
+
+ def add_desc(self, desc):
+ """Add a description."""
+ # TODO allow index to vary
+ const_attrs = ["index", "error", "convert", "size_str"]
+ if desc.name not in self.switches:
+ self.switches[desc.name] = []
+ self.switch_constants[desc.name] = {}
+ for attr in const_attrs:
+ self.switch_constants[desc.name][attr] = None
+
+ # some attributes, like error code, should be the same for all descs
+ consts = self.switch_constants[desc.name]
+ for attr in const_attrs:
+ if getattr(desc, attr) is not None:
+ if (consts[attr] is not None and
+ consts[attr] != getattr(desc, attr)):
+ raise SpecError("mismatch %s for %s" % (attr, desc.name))
+ consts[attr] = getattr(desc, attr)
+
+ self.switches[desc.name].append(desc)
+
+ def validate(self, func, param_nodes):
+ """Validate the checker against a function."""
+ tmp = Checker()
+
+ for switch in self.switches.itervalues():
+ valid_descs = []
+ for desc in switch:
+ if desc.validate(func, param_nodes):
+ valid_descs.append(desc)
+ # no possible values
+ if not valid_descs:
+ return False
+ for desc in valid_descs:
+ if not desc._is_noop:
+ tmp.add_desc(desc)
+
+ self.switches = tmp.switches
+ self.switch_constants = tmp.switch_constants
+ return True
+
+ def flatten(self, name=None):
+ """Return a flat list of all descriptions of the named parameter."""
+ flat_list = []
+ for switch in self.switches.itervalues():
+ for desc in switch:
+ if not name or desc.name == name:
+ flat_list.append(desc)
+ flat_list.extend(desc.checker.flatten(name))
+ return flat_list
+
+ def always_check(self, name):
+ """Return true if the parameter is checked in all possible pathes."""
+ if name in self.switches:
+ return True
+
+ # a param is always checked if any of the switch always checks it
+ for switch in self.switches.itervalues():
+ # a switch always checks it if all of the descs always check it
+ always = True
+ for desc in switch:
+ if not desc.checker.always_check(name):
+ always = False
+ break
+ if always:
+ return True
+ return False
+
+ def _c_switch(self, name, indent="\t"):
+ """Output C switch-statement for the named parameter, for debug."""
+ switch = self.switches.get(name, [])
+ # make sure there are valid values
+ need_switch = False
+ for desc in switch:
+ if desc.values:
+ need_switch = True
+ if not need_switch:
+ return []
+
+ stmts = []
+ var = switch[0].name
+ if switch[0].index >= 0:
+ var += "[%d]" % switch[0].index
+ stmts.append("switch (%s) { /* assume GLenum */" % var)
+
+ for desc in switch:
+ if desc.values:
+ for val in desc.values:
+ stmts.append("case %s:" % val)
+ for dep_name in desc.checker.switches.iterkeys():
+ dep_stmts = [indent + s for s in desc.checker._c_switch(dep_name, indent)]
+ stmts.extend(dep_stmts)
+ stmts.append(indent + "break;")
+
+ stmts.append("default:")
+ stmts.append(indent + "ON_ERROR(%s);" % switch[0].error);
+ stmts.append(indent + "break;")
+ stmts.append("}")
+
+ return stmts
+
+ def dump(self, indent="\t"):
+ """Dump the descriptions in C code."""
+ stmts = []
+ for name in self.switches.iterkeys():
+ c_switch = self._c_switch(name)
+ print "\n".join(c_switch)
+
+
+class Description(object):
+ """A description desribes a parameter and its relationship with other
+ parameters.
+ """
+
+ def __init__(self, desc_node, categories=[]):
+ self._categories = categories
+ self._is_noop = False
+
+ self.name = desc_node.prop("name")
+ self.index = -1
+
+ self.error = desc_node.prop("error") or "GL_INVALID_ENUM"
+ # vector_size may be C code
+ self.size_str = desc_node.prop("vector_size")
+
+ self._has_enum = False
+ self.values = []
+ dep_nodes = []
+
+ # parse <desc>
+ valid_names = ["value", "range", "desc"]
+ node = desc_node.children
+ while node:
+ if node.type == "element":
+ if node.name in valid_names:
+ # ignore nodes that require unsupported categories
+ if (node.prop("category") and
+ node.prop("category") not in self._categories):
+ node = node.next
+ continue
+ else:
+ raise SpecError("unexpected node %s in desc" % node.name)
+
+ if node.name == "value":
+ val = node.prop("name")
+ if not self._has_enum and val.startswith("GL_"):
+ self._has_enum = True
+ self.values.append(val)
+ elif node.name == "range":
+ first = int(node.prop("from"))
+ last = int(node.prop("to"))
+ base = node.prop("base") or ""
+ if not self._has_enum and base.startswith("GL_"):
+ self._has_enum = True
+ # expand range
+ for i in xrange(first, last + 1):
+ self.values.append("%s%d" % (base, i))
+ else: # dependent desc
+ dep_nodes.append(node)
+ node = node.next
+
+ # default to convert if there is no enum
+ self.convert = not self._has_enum
+ if desc_node.hasProp("convert"):
+ self.convert = (desc_node.prop("convert") == "true")
+
+ self._init_deps(dep_nodes)
+
+ def _init_deps(self, dep_nodes):
+ """Parse and initialize dependents."""
+ self.checker = Checker()
+
+ for dep_node in dep_nodes:
+ # recursion!
+ dep = Description(dep_node, self._categories)
+ self.checker.add_desc(dep)
+
+ def _search_param_node(self, param_nodes, name=None):
+ """Search the template parameters for the named node."""
+ param_node = None
+ param_index = -1
+
+ if not name:
+ name = self.name
+ for node in param_nodes:
+ if name == node.prop("name"):
+ param_node = node
+ elif node.name == "vector":
+ child = node.children
+ idx = 0
+ while child:
+ if child.type == "element" and child.name == "param":
+ if name == child.prop("name"):
+ param_node = node
+ param_index = idx
+ break
+ idx += 1
+ child = child.next
+ if param_node:
+ break
+ return (param_node, param_index)
+
+ def _find_final(self, func, param_nodes):
+ """Find the final parameter."""
+ param = func.get_param(self.name)
+ param_index = -1
+
+ # the described param is not in the final function
+ if not param:
+ # search the template parameters
+ node, index = self._search_param_node(param_nodes)
+ if not node:
+ raise SpecError("invalid desc %s in %s" %
+ (self.name, func.name))
+
+ # a named parameter of a vector
+ if index >= 0:
+ param = func.get_param(node.prop("name"))
+ param_index = index
+ elif node.name == "vector":
+ # must be an expanded vector, check its size
+ if self.size_str and self.size_str.isdigit():
+ size = int(self.size_str)
+ expanded_size = func.param_node_size(node)
+ if size != expanded_size:
+ return (False, None, -1)
+ # otherwise, it is a valid, but no-op, description
+
+ return (True, param, param_index)
+
+ def validate(self, func, param_nodes):
+ """Validate a description against certain function."""
+ if self.checker.switches and not self.values:
+ raise SpecError("no valid values for %s" % self.name)
+
+ valid, param, param_index = self._find_final(func, param_nodes)
+ if not valid:
+ return False
+
+ # the description is valid, but the param is gone
+ # mark it no-op so that it will be skipped
+ if not param:
+ self._is_noop = True
+ return True
+
+ if param.is_vector:
+ # if param was known, this should have been done in __init__
+ if self._has_enum:
+ self.size_str = "1"
+ # size mismatch
+ if (param.size and self.size_str and self.size_str.isdigit() and
+ param.size != int(self.size_str)):
+ return False
+ elif self.size_str:
+ # only vector accepts vector_size
+ raise SpecError("vector_size is invalid for %s" % param.name)
+
+ if not self.checker.validate(func, param_nodes):
+ return False
+
+ # update the description
+ self.name = param.name
+ self.index = param_index
+
+ return True
+
+
+def main():
+ import libxml2
+
+ filename = "APIspec.xml"
+ apinames = ["GLES1.1", "GLES2.0"]
+
+ doc = libxml2.readFile(filename, None,
+ libxml2.XML_PARSE_DTDLOAD +
+ libxml2.XML_PARSE_DTDVALID +
+ libxml2.XML_PARSE_NOBLANKS)
+
+ spec = Spec(doc)
+ impl = spec.get_impl()
+ for apiname in apinames:
+ spec.get_api(apiname)
+
+ doc.freeDoc()
+
+ print "%s is successfully parsed" % filename
+
+
+if __name__ == "__main__":
+ main()
diff --git a/mesalib/src/mesa/main/APIspec.xml b/mesalib/src/mesa/main/APIspec.xml
new file mode 100644
index 000000000..4c5fd59d4
--- /dev/null
+++ b/mesalib/src/mesa/main/APIspec.xml
@@ -0,0 +1,4332 @@
+<?xml version="1.0"?>
+<!DOCTYPE apispec SYSTEM "APIspec.dtd">
+
+<!-- A function is generated from a template. Multiple functions can be
+ generated from a single template with different arguments. For example,
+ glColor3f can be generated from
+
+ <function name="Color3f" template="Color" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+
+ and glColor4iv can be generated from
+
+ <function name="Color4iv" template="Color" gltype="GLint" vector_size="4"/>
+
+ In a template, there are <desc>s that describe the properties of
+ parameters. A <desc> can enumerate the valid values of a parameter. It
+ can also specify the error code when an invalid value is given, and etc.
+ By nesting <desc>s, they can create dependency between parameters.
+
+ A function can be marked as external. It means that the function cannot
+ be dispatched to the corresponding mesa function, if one exists, directly,
+ and requires an external implementation.
+-->
+
+<apispec>
+
+<template name="Color">
+ <proto>
+ <return type="void"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="ClipPlane">
+ <proto>
+ <return type="void"/>
+ <param name="plane" type="GLenum"/>
+ <vector name="equation" type="const GLtype *" size="4"/>
+ </proto>
+
+ <desc name="plane">
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+ </desc>
+</template>
+
+<template name="CullFace">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+</template>
+
+<template name="Fog">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_FOG_MODE"/>
+ <desc name="param">
+ <value name="GL_EXP"/>
+ <value name="GL_EXP2"/>
+ <value name="GL_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FOG_COLOR"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FOG_DENSITY"/>
+ <value name="GL_FOG_START"/>
+ <value name="GL_FOG_END"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="FrontFace">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_CW"/>
+ <value name="GL_CCW"/>
+ </desc>
+</template>
+
+<template name="Hint">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="target" category="GLES1.1">
+ <value name="GL_FOG_HINT"/>
+ <value name="GL_LINE_SMOOTH_HINT"/>
+ <value name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+ <value name="GL_POINT_SMOOTH_HINT"/>
+ </desc>
+ <desc name="target" category="OES_standard_derivatives">
+ <value name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES"/>
+ </desc>
+ <desc name="target">
+ <value name="GL_GENERATE_MIPMAP_HINT"/>
+ </desc>
+
+ <desc name="mode">
+ <value name="GL_FASTEST"/>
+ <value name="GL_NICEST"/>
+ <value name="GL_DONT_CARE"/>
+ </desc>
+</template>
+
+<template name="Light">
+ <proto>
+ <return type="void"/>
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="light">
+ <range base="GL_LIGHT" from="0" to="7"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_POSITION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_DIRECTION"/>
+
+ <desc name="params" vector_size="3"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_EXPONENT"/>
+ <value name="GL_SPOT_CUTOFF"/>
+ <value name="GL_CONSTANT_ATTENUATION"/>
+ <value name="GL_LINEAR_ATTENUATION"/>
+ <value name="GL_QUADRATIC_ATTENUATION"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="LightModel">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_LIGHT_MODEL_AMBIENT"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_LIGHT_MODEL_TWO_SIDE"/>
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="LineWidth">
+ <proto>
+ <return type="void"/>
+ <param name="width" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Material">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_AMBIENT_AND_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_EMISSION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SHININESS"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="PointSize">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="PointSizePointer">
+ <proto>
+ <return type="void"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ </desc>
+</template>
+
+<template name="Scissor">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="ShadeModel">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FLAT"/>
+ <value name="GL_SMOOTH"/>
+ </desc>
+</template>
+
+<template name="TexParameter">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_WRAP_S"/>
+ <value name="GL_TEXTURE_WRAP_T"/>
+ <value name="GL_TEXTURE_WRAP_R_OES" category="OES_texture_3D"/>
+
+ <desc name="param">
+ <value name="GL_CLAMP_TO_EDGE"/>
+ <value name="GL_REPEAT"/>
+ <value name="GL_MIRRORED_REPEAT" category="GLES2.0"/>
+ <value name="GL_MIRRORED_REPEAT_OES" category="OES_texture_mirrored_repeat"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_MIN_FILTER"/>
+
+ <desc name="param">
+ <value name="GL_NEAREST"/>
+ <value name="GL_LINEAR"/>
+ <value name="GL_NEAREST_MIPMAP_NEAREST"/>
+ <value name="GL_NEAREST_MIPMAP_LINEAR"/>
+ <value name="GL_LINEAR_MIPMAP_NEAREST"/>
+ <value name="GL_LINEAR_MIPMAP_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_MAG_FILTER"/>
+
+ <desc name="param">
+ <value name="GL_NEAREST"/>
+ <value name="GL_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="GLES1.1">
+ <value name="GL_GENERATE_MIPMAP"/>
+
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_filter_anisotropic">
+ <value name="GL_TEXTURE_MAX_ANISOTROPY_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname" category="OES_draw_texture">
+ <value name="GL_TEXTURE_CROP_RECT_OES"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="TexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLint"/> <!-- should be GLenum -->
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat" error="GL_INVALID_VALUE">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ <value name="GL_DEPTH_COMPONENT" category="OES_depth_texture"/>
+ <value name="GL_DEPTH_STENCIL_OES" category="OES_packed_depth_stencil"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_depth_texture">
+ <value name="GL_DEPTH_COMPONENT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_packed_depth_stencil">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_INT_24_8_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="TexEnv">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="target" category="OES_point_sprite">
+ <value name="GL_POINT_SPRITE_OES"/>
+
+ <desc name="pname">
+ <value name="GL_COORD_REPLACE_OES"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="OES_point_sprite">
+ <value name="GL_COORD_REPLACE_OES"/>
+
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+
+ <desc name="target" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_ENV"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_DECAL"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_ADD"/>
+ <value name="GL_COMBINE"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_COMBINE_RGB"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_ADD"/>
+ <value name="GL_ADD_SIGNED"/>
+ <value name="GL_INTERPOLATE"/>
+ <value name="GL_SUBTRACT"/>
+ <value name="GL_DOT3_RGB"/>
+ <value name="GL_DOT3_RGBA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_COMBINE_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_ADD"/>
+ <value name="GL_ADD_SIGNED"/>
+ <value name="GL_INTERPOLATE"/>
+ <value name="GL_SUBTRACT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+
+ <desc name="param" convert="true" error="GL_INVALID_VALUE">
+ <value name="1.0"/>
+ <value name="2.0"/>
+ <value name="4.0"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_TEXTURE"/>
+ <value name="GL_CONSTANT"/>
+ <value name="GL_PRIMARY_COLOR"/>
+ <value name="GL_PREVIOUS"/>
+
+ <range base="GL_TEXTURE" from="0" to="31" category="OES_texture_env_crossbar"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+
+ <desc name="param">
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="TexGen">
+ <proto>
+ <return type="void"/>
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="coord" category="OES_texture_cube_map">
+ <value name="GL_TEXTURE_GEN_STR_OES"/>
+ </desc>
+
+ <desc name="pname" category="OES_texture_cube_map">
+ <value name="GL_TEXTURE_GEN_MODE_OES"/>
+
+ <desc name="param">
+ <value name="GL_NORMAL_MAP_OES"/>
+ <value name="GL_REFLECTION_MAP_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="Clear">
+ <proto>
+ <return type="void"/>
+ <param name="mask" type="GLbitfield"/>
+ </proto>
+
+ <desc name="mask" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ <value name="(GL_COLOR_BUFFER_BIT)"/>
+ <value name="(GL_DEPTH_BUFFER_BIT)"/>
+ <value name="(GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ </desc>
+</template>
+
+<template name="ClearColor">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="ClearStencil">
+ <proto>
+ <return type="void"/>
+ <param name="s" type="GLint"/>
+ </proto>
+</template>
+
+<template name="ClearDepth">
+ <proto>
+ <return type="void"/>
+ <param name="depth" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="StencilMask">
+ <proto>
+ <return type="void"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="StencilMaskSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+</template>
+
+<template name="ColorMask">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLboolean"/>
+ <param name="green" type="GLboolean"/>
+ <param name="blue" type="GLboolean"/>
+ <param name="alpha" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="DepthMask">
+ <proto>
+ <return type="void"/>
+ <param name="flag" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="Disable">
+ <proto>
+ <return type="void"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<!-- it is exactly the same as Disable -->
+<template name="Enable">
+ <proto>
+ <return type="void"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<template name="Finish">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="Flush">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="AlphaFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLtype"/>
+ </proto>
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="BlendFunc">
+ <proto>
+ <return type="void"/>
+ <param name="sfactor" type="GLenum"/>
+ <param name="dfactor" type="GLenum"/>
+ </proto>
+
+ <desc name="sfactor">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dfactor">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="LogicOp">
+ <proto>
+ <return type="void"/>
+ <param name="opcode" type="GLenum"/>
+ </proto>
+
+ <desc name="opcode">
+ <value name="GL_CLEAR"/>
+ <value name="GL_SET"/>
+ <value name="GL_COPY"/>
+ <value name="GL_COPY_INVERTED"/>
+ <value name="GL_NOOP"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_AND"/>
+ <value name="GL_NAND"/>
+ <value name="GL_OR"/>
+ <value name="GL_NOR"/>
+ <value name="GL_XOR"/>
+ <value name="GL_EQUIV"/>
+ <value name="GL_AND_REVERSE"/>
+ <value name="GL_AND_INVERTED"/>
+ <value name="GL_OR_REVERSE"/>
+ <value name="GL_OR_INVERTED"/>
+ </desc>
+</template>
+
+<template name="StencilFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="StencilFuncSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="StencilOp">
+ <proto>
+ <return type="void"/>
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ </proto>
+
+ <desc name="fail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+
+ <desc name="zfail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+
+ <desc name="zpass">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+</template>
+
+<template name="StencilOpSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="fail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+
+ <desc name="zfail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+
+ <desc name="zpass">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+</template>
+
+<template name="DepthFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ </proto>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="PixelStore">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLtype"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_PACK_ALIGNMENT"/>
+ <value name="GL_UNPACK_ALIGNMENT"/>
+ </desc>
+
+ <desc name="param" error="GL_INVALID_VALUE">
+ <value name="1"/>
+ <value name="2"/>
+ <value name="4"/>
+ <value name="8"/>
+ </desc>
+</template>
+
+<template name="ReadPixels" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="GLvoid *"/>
+ </proto>
+
+ <!-- Technically, only two combinations are actually allowed:
+ GL_RGBA/GL_UNSIGNED_BYTE, and some implementation-specific
+ internal preferred combination. I don't know what that is, so I'm
+ allowing any valid combination for now; the underlying support
+ should fail when necessary.-->
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="EXT_read_format_bgra">
+ <value name="GL_BGRA_EXT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT"/>
+ <value name="GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="GetClipPlane" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="plane" type="GLenum"/>
+ <vector name="equation" type="GLtype *" size="4"/>
+ </proto>
+
+ <desc name="plane">
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+ </desc>
+</template>
+
+<template name="GetError" direction="get">
+ <proto>
+ <return type="GLenum"/>
+ </proto>
+</template>
+
+<!-- template for GetFloatv, GetIntegerv, GetBoolean, and GetFixedv -->
+<template name="GetState" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+ <!-- param checking is done in mesa -->
+</template>
+
+<template name="GetLight" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="light">
+ <range base="GL_LIGHT" from="0" to="7"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_POSITION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_DIRECTION"/>
+
+ <desc name="params" vector_size="3"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_EXPONENT"/>
+ <value name="GL_SPOT_CUTOFF"/>
+ <value name="GL_CONSTANT_ATTENUATION"/>
+ <value name="GL_LINEAR_ATTENUATION"/>
+ <value name="GL_QUADRATIC_ATTENUATION"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="GetMaterial" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SHININESS"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_AMBIENT_AND_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_EMISSION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="GetString" direction="get">
+ <proto>
+ <return type="const GLubyte *"/>
+ <param name="name" type="GLenum"/>
+ </proto>
+
+ <desc name="name">
+ <value name="GL_VENDOR"/>
+ <value name="GL_RENDERER"/>
+ <value name="GL_VERSION"/>
+ <value name="GL_EXTENSIONS"/>
+ <value name="GL_SHADING_LANGUAGE_VERSION" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="GetTexEnv" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target" category="OES_point_sprite">
+ <value name="GL_POINT_SPRITE_OES"/>
+ <desc name="pname">
+ <value name="GL_COORD_REPLACE_OES"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="OES_point_sprite">
+ <value name="GL_COORD_REPLACE_OES"/>
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="target" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_ENV"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetTexGen" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="coord">
+ <value name="GL_TEXTURE_GEN_STR_OES"/>
+ </desc>
+ <desc name="pname">
+ <value name="GL_TEXTURE_GEN_MODE_OES"/>
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetTexParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_WRAP_S"/>
+ <value name="GL_TEXTURE_WRAP_T"/>
+ <value name="GL_TEXTURE_WRAP_R_OES" category="OES_texture_3D"/>
+ <value name="GL_TEXTURE_MIN_FILTER"/>
+ <value name="GL_TEXTURE_MAG_FILTER"/>
+ <value name="GL_GENERATE_MIPMAP" category="GLES1.1"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname" category="OES_draw_texture">
+ <value name="GL_TEXTURE_CROP_RECT_OES"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="IsEnabled" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<template name="DepthRange">
+ <proto>
+ <return type="void"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Frustum">
+ <proto>
+ <return type="void"/>
+ <param name="left" type="GLtype"/>
+ <param name="right" type="GLtype"/>
+ <param name="bottom" type="GLtype"/>
+ <param name="top" type="GLtype"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="LoadIdentity">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="LoadMatrix">
+ <proto>
+ <return type="void"/>
+ <vector name="m" type="const GLtype *" size="16"/>
+ </proto>
+</template>
+
+<template name="MatrixMode">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_MODELVIEW"/>
+ <value name="GL_PROJECTION"/>
+ <value name="GL_TEXTURE"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ </desc>
+</template>
+
+<template name="MultMatrix">
+ <proto>
+ <return type="void"/>
+ <vector name="m" type="const GLtype *" size="16"/>
+ </proto>
+</template>
+
+<template name="Ortho">
+ <proto>
+ <return type="void"/>
+ <param name="left" type="GLtype"/>
+ <param name="right" type="GLtype"/>
+ <param name="bottom" type="GLtype"/>
+ <param name="top" type="GLtype"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="PopMatrix">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="PushMatrix">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="Rotate">
+ <proto>
+ <return type="void"/>
+ <param name="angle" type="GLtype"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Scale">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Translate">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Viewport">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="ColorPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="DisableClientState">
+ <proto>
+ <return type="void"/>
+ <param name="array" type="GLenum"/>
+ </proto>
+
+ <desc name="array">
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="DrawArrays">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+</template>
+
+<template name="DrawElements">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT" category="OES_element_index_uint"/>
+ </desc>
+</template>
+
+<template name="EnableClientState">
+ <proto>
+ <return type="void"/>
+ <param name="array" type="GLenum"/>
+ </proto>
+
+ <desc name="array">
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="GetPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ARRAY_POINTER"/>
+ <value name="GL_NORMAL_ARRAY_POINTER"/>
+ <value name="GL_COLOR_ARRAY_POINTER"/>
+ <value name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_POINTER_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_POINTER_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_POINTER_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="Normal">
+ <proto>
+ <return type="void"/>
+ <vector name="v" type="const GLtype *" size="3">
+ <param name="nx" type="GLtype"/>
+ <param name="ny" type="GLtype"/>
+ <param name="nz" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="NormalPointer">
+ <proto>
+ <return type="void"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="TexCoordPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="VertexPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="PolygonOffset">
+ <proto>
+ <return type="void"/>
+ <param name="factor" type="GLtype"/>
+ <param name="units" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="CopyTexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat" error="GL_INVALID_VALUE">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+</template>
+
+<template name="CopyTexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+</template>
+
+<template name="TexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_depth_texture">
+ <value name="GL_DEPTH_COMPONENT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_packed_depth_stencil">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_INT_24_8_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="BindTexture">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="DeleteTextures">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="textures" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenTextures" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="textures" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="IsTexture" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="texture" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="BlendColor">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="BlendEquation">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+</template>
+
+<template name="BlendEquationSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeAlpha" type="GLenum"/>
+ </proto>
+
+ <desc name="modeRGB">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+
+ <desc name="modeAlpha">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+</template>
+
+<template name="TexImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="TexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="CopyTexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+</template>
+
+<template name="MultiTexCoord">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="s" type="GLtype"/>
+ <param name="t" type="GLtype"/>
+ <param name="r" type="GLtype"/>
+ <param name="q" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="CompressedTexImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imagesize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_3DC_X_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_3DC_XY_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_ATC_RGB_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ </desc>
+</template>
+
+<template name="CompressedTexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imagesize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+</template>
+
+<template name="ActiveTexture">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="ClientActiveTexture">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="SampleCoverage">
+ <proto>
+ <return type="void"/>
+ <param name="value" type="GLtype"/>
+ <param name="invert" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="CompressedTexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imageSize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_ETC1_RGB8_OES" category="OES_compressed_ETC1_RGB8_texture"/>
+
+ <value name="GL_PALETTE4_RGB8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGB8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+
+ <value name="GL_3DC_X_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_3DC_XY_AMD" category="AMD_compressed_3DC_texture"/>
+
+ <value name="GL_ATC_RGB_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+
+ <value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ <value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+</template>
+
+<template name="CompressedTexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imageSize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ <value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ </desc>
+</template>
+
+<template name="BlendFuncSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="srcRGB" type="GLenum"/>
+ <param name="dstRGB" type="GLenum"/>
+ <param name="srcAlpha" type="GLenum"/>
+ <param name="dstAlpha" type="GLenum"/>
+ </proto>
+
+ <desc name="srcRGB">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dstRGB">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="srcAlpha">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dstAlpha">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="PointParameter">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_POINT_SIZE_MIN"/>
+ <value name="GL_POINT_SIZE_MAX"/>
+ <value name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_POINT_DISTANCE_ATTENUATION"/>
+ <desc name="params" vector_size="3"/>
+ </desc>
+</template>
+
+<template name="VertexAttrib">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ <param name="w" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="VertexAttribPointer">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="normalized" type="GLboolean"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="1"/>
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type" error="GL_INVALID_VALUE">
+ <value name="GL_BYTE"/>
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ <value name="GL_UNSIGNED_INT_10_10_10_2_OES" category="OES_vertex_type_10_10_10_2"/>
+ <value name="GL_INT_10_10_10_2_OES" category="OES_vertex_type_10_10_10_2"/>
+ </desc>
+
+ <desc name="type" category="OES_vertex_type_10_10_10_2">
+ <value name="GL_UNSIGNED_INT_10_10_10_2_OES"/>
+ <value name="GL_INT_10_10_10_2_OES"/>
+
+ <desc name="size">
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="EnableVertexAttribArray">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DisableVertexAttribArray">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsProgram" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetProgram" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_DELETE_STATUS"/>
+ <value name="GL_LINK_STATUS"/>
+ <value name="GL_VALIDATE_STATUS"/>
+ <value name="GL_INFO_LOG_LENGTH"/>
+ <value name="GL_ATTACHED_SHADERS"/>
+ <value name="GL_ACTIVE_ATTRIBUTES"/>
+ <value name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
+ <value name="GL_ACTIVE_UNIFORMS"/>
+ <value name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
+ <value name="GL_PROGRAM_BINARY_LENGTH_OES" category="OES_get_program_binary"/>
+
+ <desc name="params" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetVertexAttrib" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_CURRENT_VERTEX_ATTRIB"/>
+ <desc name="params" vector_size="16?" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetVertexAttribPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="pointer" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ATTRIB_ARRAY_POINTER"/>
+ </desc>
+</template>
+
+<template name="GetBufferPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_BUFFER_MAP_POINTER_OES"/>
+ </desc>
+</template>
+
+<template name="MapBuffer" direction="get">
+ <proto>
+ <return type="void *"/>
+ <param name="target" type="GLenum"/>
+ <param name="access" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="access">
+ <value name="GL_WRITE_ONLY_OES"/>
+ </desc>
+</template>
+
+<template name="UnmapBuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="BindBuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="buffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="BufferData">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="size" type="GLsizeiptr"/>
+ <param name="data" type="const GLvoid *"/>
+ <param name="usage" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="usage">
+ <value name="GL_STATIC_DRAW"/>
+ <value name="GL_DYNAMIC_DRAW"/>
+ <value name="GL_STREAM_DRAW" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="BufferSubData">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="offset" type="GLintptr"/>
+ <param name="size" type="GLsizeiptr"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="DeleteBuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="buffer" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenBuffers" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="buffer" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="GetBufferParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_BUFFER_SIZE"/>
+ <value name="GL_BUFFER_USAGE"/>
+ <value name="GL_BUFFER_ACCESS_OES" category="OES_mapbuffer"/>
+ <value name="GL_BUFFER_MAPPED_OES" category="OES_mapbuffer"/>
+ </desc>
+</template>
+
+<template name="IsBuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="buffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="CreateShader">
+ <proto>
+ <return type="GLuint"/>
+ <param name="type" type="GLenum"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_VERTEX_SHADER"/>
+ <value name="GL_FRAGMENT_SHADER"/>
+ </desc>
+</template>
+
+<template name="ShaderSource">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="string" type="const GLchar **"/>
+ <param name="length" type="const int *"/>
+ </proto>
+</template>
+
+<template name="CompileShader">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="ReleaseShaderCompiler">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="DeleteShader">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="ShaderBinary">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="shaders" type="const GLuint *"/>
+ <param name="binaryformat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="CreateProgram">
+ <proto>
+ <return type="GLuint"/>
+ </proto>
+</template>
+
+<template name="AttachShader">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DetachShader">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="LinkProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="UseProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DeleteProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetActiveAttrib" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="size" type="GLint *"/>
+ <param name="type" type="GLenum *"/>
+ <param name="name" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetAttribLocation" direction="get">
+ <proto>
+ <return type="GLint"/>
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="BindAttribLocation">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="GetUniformLocation" direction="get">
+ <proto>
+ <return type="GLint"/>
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="GetActiveUniform" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="size" type="GLint *"/>
+ <param name="type" type="GLenum *"/>
+ <param name="name" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="Uniform">
+ <proto>
+ <return type="void"/>
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei" hide_if_expanded="true"/>
+ <vector name="values" type="const GLtype *" size="dynamic">
+ <param name="v0" type="GLtype"/>
+ <param name="v1" type="GLtype"/>
+ <param name="v2" type="GLtype"/>
+ <param name="v3" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="UniformMatrix">
+ <proto>
+ <return type="void"/>
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <vector name="value" type="const GLtype *" size="dynamic"/>
+ </proto>
+</template>
+
+<template name="ValidateProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GenerateMipmap">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="BindFramebuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="framebuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="DeleteFramebuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="framebuffers" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenFramebuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="ids" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="BindRenderbuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="DeleteRenderbuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="renderbuffers" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenRenderbuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="renderbuffers" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="RenderbufferStorage">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_DEPTH_COMPONENT16_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGBA4_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGB5_A1_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGB565_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_INDEX8_OES" category="OES_stencil8"/>
+
+ <value name="GL_DEPTH_COMPONENT16" category="GLES2.0"/>
+ <value name="GL_RGBA4" category="GLES2.0"/>
+ <value name="GL_RGB5_A1" category="GLES2.0"/>
+ <value name="GL_RGB565" category="GLES2.0"/>
+ <value name="GL_STENCIL_INDEX8" category="GLES2.0"/>
+
+ <value name="GL_DEPTH_COMPONENT24_OES" category="OES_depth24"/>
+ <value name="GL_DEPTH_COMPONENT32_OES" category="OES_depth32"/>
+ <value name="GL_RGB8_OES" category="OES_rgb8_rgba8"/>
+ <value name="GL_RGBA8_OES" category="OES_rgb8_rgba8"/>
+ <value name="GL_STENCIL_INDEX1_OES" category="OES_stencil1"/>
+ <value name="GL_STENCIL_INDEX4_OES" category="OES_stencil4"/>
+ <value name="GL_DEPTH24_STENCIL8_OES" category="OES_packed_depth_stencil"/>
+ </desc>
+</template>
+
+<template name="FramebufferRenderbuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="renderbuffertarget" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="renderbuffertarget">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="FramebufferTexture2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="textarget" error="GL_INVALID_OPERATION">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+ <!-- According to the base specification, "level" must be 0. But
+ extension GL_OES_fbo_render_mipmap lifts that restriction,
+ so no restriction is placed here. -->
+</template>
+
+<template name="FramebufferTexture3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="textarget" error="GL_INVALID_OPERATION">
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="CheckFramebufferStatus" direction="get">
+ <proto>
+ <return type="GLenum"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="GetFramebufferAttachmentParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES" category="OES_framebuffer_object"/>
+
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES" category="OES_texture_3D"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetRenderbufferParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="pname" category="OES_framebuffer_object">
+ <value name="GL_RENDERBUFFER_WIDTH_OES"/>
+ <value name="GL_RENDERBUFFER_HEIGHT_OES"/>
+ <value name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"/>
+ <value name="GL_RENDERBUFFER_RED_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_GREEN_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_BLUE_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_ALPHA_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_DEPTH_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_STENCIL_SIZE_OES"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname" category="GLES2.0">
+ <value name="GL_RENDERBUFFER_WIDTH"/>
+ <value name="GL_RENDERBUFFER_HEIGHT"/>
+ <value name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+ <value name="GL_RENDERBUFFER_RED_SIZE"/>
+ <value name="GL_RENDERBUFFER_GREEN_SIZE"/>
+ <value name="GL_RENDERBUFFER_BLUE_SIZE"/>
+ <value name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+ <value name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+ <value name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="IsRenderbuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsFramebuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="framebuffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsShader" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetShader" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_SHADER_TYPE"/>
+ <value name="GL_COMPILE_STATUS"/>
+ <value name="GL_DELETE_STATUS"/>
+ <value name="GL_INFO_LOG_LENGTH"/>
+ <value name="GL_SHADER_SOURCE_LENGTH"/>
+ </desc>
+</template>
+
+<template name="GetAttachedShaders" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="maxCount" type="GLsizei"/>
+ <param name="count" type="GLsizei *"/>
+ <param name="shaders" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="GetShaderInfoLog" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetProgramInfoLog" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetShaderSource" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="source" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetShaderPrecisionFormat" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="precisiontype" type="GLenum"/>
+ <param name="range" type="GLint *"/>
+ <param name="precision" type="GLint *"/>
+ </proto>
+
+ <desc name="shadertype">
+ <value name="GL_VERTEX_SHADER"/>
+ <value name="GL_FRAGMENT_SHADER"/>
+ </desc>
+
+ <desc name="precisiontype">
+ <value name="GL_LOW_FLOAT"/>
+ <value name="GL_MEDIUM_FLOAT"/>
+ <value name="GL_HIGH_FLOAT"/>
+ <value name="GL_LOW_INT"/>
+ <value name="GL_MEDIUM_INT"/>
+ <value name="GL_HIGH_INT"/>
+ </desc>
+</template>
+
+<template name="GetUniform" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+</template>
+
+<template name="QueryMatrix" direction="get">
+ <proto>
+ <return type="GLbitfield"/>
+ <vector name="mantissa" type="GLtype *" size="16"/>
+ <vector name="exponent" type="GLint *" size="16"/>
+ </proto>
+</template>
+
+<template name="DrawTex">
+ <proto>
+ <return type="void"/>
+ <vector name="coords" type="const GLtype *" size="5">
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ <param name="w" type="GLtype"/>
+ <param name="h" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="MultiDrawArrays">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="const GLint *"/>
+ <param name="count" type="const GLsizei *"/>
+ <param name="primcount" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+</template>
+
+<template name="MultiDrawElements">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="const GLsizei *"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid **"/>
+ <param name="primcount" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT" category="OES_element_index_uint"/>
+ </desc>
+</template>
+
+<template name="EGLImageTargetTexture2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ </desc>
+</template>
+
+<template name="EGLImageTargetRenderbufferStorage">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<api name="mesa" implementation="true">
+ <category name="MESA"/>
+
+ <function name="Color4f" default_prefix="_vbo_" template="Color" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="ClipPlane" template="ClipPlane" gltype="GLdouble"/>
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="Fogf" template="Fog" gltype="GLfloat" expand_vector="true"/>
+ <function name="Fogfv" template="Fog" gltype="GLfloat"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="Lightf" template="Light" gltype="GLfloat" expand_vector="true"/>
+ <function name="Lightfv" template="Light" gltype="GLfloat"/>
+
+ <function name="LightModelf" template="LightModel" gltype="GLfloat" expand_vector="true"/>
+ <function name="LightModelfv" template="LightModel" gltype="GLfloat"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+
+ <function name="Materialf" default_prefix="_vbo_" template="Material" gltype="GLfloat" expand_vector="true"/>
+ <function name="Materialfv" default_prefix="_vbo_" template="Material" gltype="GLfloat"/>
+
+ <function name="PointSize" template="PointSize" gltype="GLfloat"/>
+ <function name="PointSizePointer" template="PointSizePointer"/>
+
+ <function name="Scissor" template="Scissor"/>
+ <function name="ShadeModel" template="ShadeModel"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="TexEnvf" template="TexEnv" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexEnvi" template="TexEnv" gltype="GLint" expand_vector="true"/>
+ <function name="TexEnvfv" template="TexEnv" gltype="GLfloat"/>
+ <function name="TexEnviv" template="TexEnv" gltype="GLint"/>
+
+ <function name="TexGenf" template="TexGen" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexGenfv" template="TexGen" gltype="GLfloat"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepth" template="ClearDepth" gltype="GLclampd"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="StencilMaskSeparate" template="StencilMaskSeparate"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+ <function name="Disable" template="Disable"/>
+ <function name="Enable" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="AlphaFunc" template="AlphaFunc" gltype="GLclampf"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+ <function name="LogicOp" template="LogicOp"/>
+ <function name="StencilFunc" template="StencilFunc"/>
+ <function name="StencilFuncSeparate" template="StencilFuncSeparate"/>
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="StencilOpSeparate" template="StencilOpSeparate"/>
+ <function name="DepthFunc" template="DepthFunc"/>
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+
+ <function name="ReadPixels" template="ReadPixels"/>
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+ <function name="GetClipPlane" template="GetClipPlane" gltype="GLdouble"/>
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetFixedv" template="GetState" gltype="GLfixed"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetLightfv" template="GetLight" gltype="GLfloat"/>
+ <function name="GetMaterialfv" template="GetMaterial" gltype="GLfloat"/>
+ <function name="GetMaterialiv" template="GetMaterial" gltype="GLint"/>
+
+ <function name="GetString" template="GetString"/>
+
+ <function name="GetTexEnvfv" template="GetTexEnv" gltype="GLfloat"/>
+ <function name="GetTexEnviv" template="GetTexEnv" gltype="GLint"/>
+ <function name="GetTexGenfv" template="GetTexGen" gltype="GLfloat"/>
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+
+ <function name="IsEnabled" template="IsEnabled"/>
+
+ <function name="DepthRange" template="DepthRange" gltype="GLclampd"/>
+ <function name="Frustum" template="Frustum" gltype="GLdouble"/>
+
+ <function name="LoadIdentity" template="LoadIdentity"/>
+ <function name="LoadMatrixf" template="LoadMatrix" gltype="GLfloat"/>
+ <function name="MatrixMode" template="MatrixMode"/>
+
+ <function name="MultMatrixf" template="MultMatrix" gltype="GLfloat"/>
+ <function name="Ortho" template="Ortho" gltype="GLdouble"/>
+ <function name="PopMatrix" template="PopMatrix"/>
+ <function name="PushMatrix" template="PushMatrix"/>
+
+ <function name="Rotatef" template="Rotate" gltype="GLfloat"/>
+ <function name="Scalef" template="Scale" gltype="GLfloat"/>
+ <function name="Translatef" template="Translate" gltype="GLfloat"/>
+
+ <function name="Viewport" template="Viewport"/>
+
+ <function name="ColorPointer" template="ColorPointer"/>
+ <function name="DisableClientState" template="DisableClientState"/>
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+ <function name="EnableClientState" template="EnableClientState"/>
+
+ <function name="GetPointerv" template="GetPointer"/>
+ <function name="Normal3f" default_prefix="_vbo_" template="Normal" gltype="GLfloat" expand_vector="true"/>
+ <function name="NormalPointer" template="NormalPointer"/>
+ <function name="TexCoordPointer" template="TexCoordPointer"/>
+ <function name="VertexPointer" template="VertexPointer"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendColor" template="BlendColor" gltype="GLclampf"/>
+ <function name="BlendEquation" template="BlendEquation"/>
+ <function name="BlendEquationSeparateEXT" template="BlendEquationSeparate"/>
+
+ <function name="TexImage3D" template="TexImage3D"/>
+ <function name="TexSubImage3D" template="TexSubImage3D"/>
+ <function name="CopyTexSubImage3D" template="CopyTexSubImage3D"/>
+
+ <function name="CompressedTexImage3DARB" template="CompressedTexImage3D"/>
+ <function name="CompressedTexSubImage3DARB" template="CompressedTexSubImage3D"/>
+
+ <function name="ActiveTextureARB" template="ActiveTexture"/>
+ <function name="ClientActiveTextureARB" template="ClientActiveTexture"/>
+
+ <function name="MultiTexCoord4f" default_prefix="_vbo_" template="MultiTexCoord" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+
+ <function name="SampleCoverageARB" template="SampleCoverage" gltype="GLclampf"/>
+
+ <function name="CompressedTexImage2DARB" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2DARB" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparateEXT" template="BlendFuncSeparate"/>
+
+ <function name="PointParameterf" template="PointParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="PointParameterfv" template="PointParameter" gltype="GLfloat"/>
+
+ <function name="VertexAttrib1f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="VertexAttrib2f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="VertexAttrib3f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="VertexAttrib4f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="VertexAttrib1fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="1"/>
+ <function name="VertexAttrib2fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="2"/>
+ <function name="VertexAttrib3fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="3"/>
+ <function name="VertexAttrib4fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="4"/>
+
+ <function name="VertexAttribPointerARB" template="VertexAttribPointer"/>
+ <function name="EnableVertexAttribArrayARB" template="EnableVertexAttribArray"/>
+ <function name="DisableVertexAttribArrayARB" template="DisableVertexAttribArray"/>
+
+ <function name="IsProgram" template="IsProgram"/>
+ <function name="GetProgramiv" template="GetProgram" gltype="GLint"/>
+
+ <function name="GetVertexAttribfvARB" template="GetVertexAttrib" gltype="GLfloat"/>
+ <function name="GetVertexAttribivARB" template="GetVertexAttrib" gltype="GLint"/>
+ <function name="GetVertexAttribPointervARB" template="GetVertexAttribPointer"/>
+
+ <function name="GetBufferPointervARB" template="GetBufferPointer"/>
+ <function name="MapBufferARB" template="MapBuffer"/>
+ <function name="UnmapBufferARB" template="UnmapBuffer"/>
+ <function name="BindBufferARB" template="BindBuffer"/>
+ <function name="BufferDataARB" template="BufferData"/>
+ <function name="BufferSubDataARB" template="BufferSubData"/>
+ <function name="DeleteBuffersARB" template="DeleteBuffers"/>
+ <function name="GenBuffersARB" template="GenBuffers"/>
+ <function name="GetBufferParameterivARB" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBufferARB" template="IsBuffer"/>
+
+ <function name="CreateShader" template="CreateShader"/>
+ <function name="ShaderSourceARB" template="ShaderSource"/>
+ <function name="CompileShaderARB" template="CompileShader"/>
+ <function name="ReleaseShaderCompiler" template="ReleaseShaderCompiler"/>
+ <function name="DeleteShader" template="DeleteShader"/>
+ <function name="ShaderBinary" template="ShaderBinary"/>
+ <function name="CreateProgram" template="CreateProgram"/>
+ <function name="AttachShader" template="AttachShader"/>
+ <function name="DetachShader" template="DetachShader"/>
+ <function name="LinkProgramARB" template="LinkProgram"/>
+ <function name="UseProgramObjectARB" template="UseProgram"/>
+ <function name="DeleteProgram" template="DeleteProgram"/>
+
+ <function name="GetActiveAttribARB" template="GetActiveAttrib"/>
+ <function name="GetAttribLocationARB" template="GetAttribLocation"/>
+ <function name="BindAttribLocationARB" template="BindAttribLocation"/>
+ <function name="GetUniformLocationARB" template="GetUniformLocation"/>
+ <function name="GetActiveUniformARB" template="GetActiveUniform"/>
+
+ <function name="Uniform1fARB" template="Uniform" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2fARB" template="Uniform" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3fARB" template="Uniform" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4fARB" template="Uniform" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1iARB" template="Uniform" gltype="GLint" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2iARB" template="Uniform" gltype="GLint" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3iARB" template="Uniform" gltype="GLint" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4iARB" template="Uniform" gltype="GLint" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1fvARB" template="Uniform" gltype="GLfloat" vector_size="1"/>
+ <function name="Uniform2fvARB" template="Uniform" gltype="GLfloat" vector_size="2"/>
+ <function name="Uniform3fvARB" template="Uniform" gltype="GLfloat" vector_size="3"/>
+ <function name="Uniform4fvARB" template="Uniform" gltype="GLfloat" vector_size="4"/>
+ <function name="Uniform1ivARB" template="Uniform" gltype="GLint" vector_size="1"/>
+ <function name="Uniform2ivARB" template="Uniform" gltype="GLint" vector_size="2"/>
+ <function name="Uniform3ivARB" template="Uniform" gltype="GLint" vector_size="3"/>
+ <function name="Uniform4ivARB" template="Uniform" gltype="GLint" vector_size="4"/>
+
+ <function name="UniformMatrix2fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="2"/>
+ <function name="UniformMatrix3fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="3"/>
+ <function name="UniformMatrix4fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="4"/>
+
+ <function name="ValidateProgramARB" template="ValidateProgram"/>
+
+ <function name="GenerateMipmapEXT" template="GenerateMipmap"/>
+ <function name="BindFramebufferEXT" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffersEXT" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffersEXT" template="GenFramebuffers"/>
+ <function name="BindRenderbufferEXT" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffersEXT" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffersEXT" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorageEXT" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbufferEXT" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2DEXT" template="FramebufferTexture2D"/>
+ <function name="FramebufferTexture3DEXT" template="FramebufferTexture3D"/>
+ <function name="CheckFramebufferStatusEXT" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameterivEXT" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameterivEXT" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbufferEXT" template="IsRenderbuffer"/>
+ <function name="IsFramebufferEXT" template="IsFramebuffer"/>
+
+ <function name="IsShader" template="IsShader"/>
+ <function name="GetShaderiv" template="GetShader" gltype="GLint"/>
+ <function name="GetAttachedShaders" template="GetAttachedShaders"/>
+ <function name="GetShaderInfoLog" template="GetShaderInfoLog"/>
+ <function name="GetProgramInfoLog" template="GetProgramInfoLog"/>
+ <function name="GetShaderSourceARB" template="GetShaderSource"/>
+ <function name="GetShaderPrecisionFormat" template="GetShaderPrecisionFormat"/>
+ <function name="GetUniformfvARB" template="GetUniform" gltype="GLfloat"/>
+ <function name="GetUniformivARB" template="GetUniform" gltype="GLint"/>
+
+ <function name="DrawTexf" template="DrawTex" gltype="GLfloat" expand_vector="true"/>
+ <function name="DrawTexfv" template="DrawTex" gltype="GLfloat"/>
+ <function name="DrawTexi" template="DrawTex" gltype="GLint" expand_vector="true"/>
+ <function name="DrawTexiv" template="DrawTex" gltype="GLint"/>
+ <function name="DrawTexs" template="DrawTex" gltype="GLshort" expand_vector="true"/>
+ <function name="DrawTexsv" template="DrawTex" gltype="GLshort"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
+</api>
+
+<api name="GLES1.1">
+ <category name="GLES1.1"/>
+
+ <category name="OES_byte_coordinates"/>
+ <category name="OES_fixed_point"/>
+ <category name="OES_single_precision"/>
+ <category name="OES_matrix_get"/>
+ <category name="OES_read_format"/>
+ <category name="OES_compressed_paletted_texture"/>
+ <category name="OES_point_size_array"/>
+ <category name="OES_point_sprite"/>
+ <category name="OES_query_matrix"/>
+ <category name="OES_draw_texture"/>
+ <category name="OES_blend_equation_separate"/>
+ <category name="OES_blend_func_separate"/>
+ <category name="OES_blend_subtract"/>
+ <category name="OES_stencil_wrap"/>
+ <category name="OES_texture_cube_map"/>
+ <category name="OES_texture_env_crossbar"/>
+ <category name="OES_texture_mirrored_repeat"/>
+ <category name="OES_framebuffer_object"/>
+ <category name="OES_depth24"/>
+ <category name="OES_depth32"/>
+ <category name="OES_fbo_render_mipmap"/>
+ <category name="OES_rgb8_rgba8"/>
+ <category name="OES_stencil1"/>
+ <category name="OES_stencil4"/>
+ <category name="OES_stencil8"/>
+ <category name="OES_element_index_uint"/>
+ <category name="OES_mapbuffer"/>
+ <category name="EXT_texture_filter_anisotropic"/>
+
+ <category name="ARB_texture_non_power_of_two"/>
+ <!-- disabled due to missing enums
+ <category name="EXT_texture_compression_dxt1"/>
+ -->
+ <category name="EXT_texture_lod_bias"/>
+ <category name="EXT_blend_minmax"/>
+ <category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
+
+ <category name="OES_matrix_palette"/>
+
+ <function name="Color4f" template="Color" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Color4ub" template="Color" gltype="GLubyte" vector_size="4" expand_vector="true"/>
+ <function name="Color4x" template="Color" gltype="GLfixed" vector_size="4" expand_vector="true"/>
+
+ <function name="ClipPlanef" template="ClipPlane" gltype="GLfloat"/>
+ <function name="ClipPlanex" template="ClipPlane" gltype="GLfixed"/>
+
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="Fogf" template="Fog" gltype="GLfloat" expand_vector="true"/>
+ <function name="Fogx" template="Fog" gltype="GLfixed" expand_vector="true"/>
+ <function name="Fogfv" template="Fog" gltype="GLfloat"/>
+ <function name="Fogxv" template="Fog" gltype="GLfixed"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="Lightf" template="Light" gltype="GLfloat" expand_vector="true"/>
+ <function name="Lightx" template="Light" gltype="GLfixed" expand_vector="true"/>
+ <function name="Lightfv" template="Light" gltype="GLfloat"/>
+ <function name="Lightxv" template="Light" gltype="GLfixed"/>
+
+ <function name="LightModelf" template="LightModel" gltype="GLfloat" expand_vector="true"/>
+ <function name="LightModelx" template="LightModel" gltype="GLfixed" expand_vector="true"/>
+ <function name="LightModelfv" template="LightModel" gltype="GLfloat"/>
+ <function name="LightModelxv" template="LightModel" gltype="GLfixed"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+ <function name="LineWidthx" template="LineWidth" gltype="GLfixed"/>
+
+ <function name="Materialf" template="Material" gltype="GLfloat" expand_vector="true"/>
+ <function name="Materialfv" template="Material" gltype="GLfloat"/>
+ <function name="Materialx" template="Material" gltype="GLfixed" expand_vector="true"/>
+ <function name="Materialxv" template="Material" gltype="GLfixed"/>
+
+ <function name="PointSize" template="PointSize" gltype="GLfloat"/>
+ <function name="PointSizex" template="PointSize" gltype="GLfixed"/>
+ <function name="PointSizePointerOES" template="PointSizePointer"/>
+
+ <function name="Scissor" template="Scissor"/>
+ <function name="ShadeModel" template="ShadeModel"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+ <function name="TexParameterx" template="TexParameter" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexParameterxv" template="TexParameter" gltype="GLfixed"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="TexEnvf" template="TexEnv" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexEnvfv" template="TexEnv" gltype="GLfloat"/>
+ <function name="TexEnvi" template="TexEnv" gltype="GLint" expand_vector="true"/>
+ <function name="TexEnviv" template="TexEnv" gltype="GLint"/>
+ <function name="TexEnvx" template="TexEnv" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexEnvxv" template="TexEnv" gltype="GLfixed"/>
+
+ <function name="TexGenfOES" external="true" template="TexGen" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexGenfvOES" external="true" template="TexGen" gltype="GLfloat"/>
+ <function name="TexGeniOES" external="true" template="TexGen" gltype="GLint" expand_vector="true"/>
+ <function name="TexGenivOES" external="true" template="TexGen" gltype="GLint"/>
+ <function name="TexGenxOES" external="true" template="TexGen" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexGenxvOES" external="true" template="TexGen" gltype="GLfixed"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearColorx" template="ClearColor" gltype="GLclampx"/>
+
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepthf" template="ClearDepth" gltype="GLclampf"/>
+ <function name="ClearDepthx" template="ClearDepth" gltype="GLclampx"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+
+ <function name="Disable" template="Disable"/>
+ <function name="Enable" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="AlphaFunc" template="AlphaFunc" gltype="GLclampf"/>
+ <function name="AlphaFuncx" template="AlphaFunc" gltype="GLclampx"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+ <function name="LogicOp" template="LogicOp"/>
+ <function name="StencilFunc" template="StencilFunc"/>
+
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="DepthFunc" template="DepthFunc"/>
+
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+ <function name="ReadPixels" template="ReadPixels"/>
+
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+
+ <function name="GetClipPlanef" template="GetClipPlane" gltype="GLfloat"/>
+ <function name="GetClipPlanex" template="GetClipPlane" gltype="GLfixed"/>
+
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetFixedv" template="GetState" gltype="GLfixed"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetLightfv" template="GetLight" gltype="GLfloat"/>
+ <function name="GetLightxv" template="GetLight" gltype="GLfixed"/>
+
+ <function name="GetMaterialfv" template="GetMaterial" gltype="GLfloat"/>
+ <function name="GetMaterialxv" template="GetMaterial" gltype="GLfixed"/>
+
+ <function name="GetString" template="GetString"/>
+
+ <function name="GetTexEnvfv" template="GetTexEnv" gltype="GLfloat"/>
+ <function name="GetTexEnviv" template="GetTexEnv" gltype="GLint"/>
+ <function name="GetTexEnvxv" template="GetTexEnv" gltype="GLfixed"/>
+
+ <function name="GetTexGenfvOES" external="true" template="GetTexGen" gltype="GLfloat"/>
+ <function name="GetTexGenivOES" external="true" template="GetTexGen" gltype="GLint"/>
+ <function name="GetTexGenxvOES" external="true" template="GetTexGen" gltype="GLfixed"/>
+
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+ <function name="GetTexParameterxv" template="GetTexParameter" gltype="GLfixed"/>
+
+ <function name="IsEnabled" template="IsEnabled"/>
+
+ <function name="DepthRangef" template="DepthRange" gltype="GLclampf"/>
+ <function name="DepthRangex" template="DepthRange" gltype="GLclampx"/>
+
+ <function name="Frustumf" template="Frustum" gltype="GLfloat"/>
+ <function name="Frustumx" template="Frustum" gltype="GLfixed"/>
+
+ <function name="LoadIdentity" template="LoadIdentity"/>
+ <function name="LoadMatrixf" template="LoadMatrix" gltype="GLfloat"/>
+ <function name="LoadMatrixx" template="LoadMatrix" gltype="GLfixed"/>
+ <function name="MatrixMode" template="MatrixMode"/>
+
+ <function name="MultMatrixf" template="MultMatrix" gltype="GLfloat"/>
+ <function name="MultMatrixx" template="MultMatrix" gltype="GLfixed"/>
+ <function name="Orthof" template="Ortho" gltype="GLfloat"/>
+ <function name="Orthox" template="Ortho" gltype="GLfixed"/>
+
+ <function name="PopMatrix" template="PopMatrix"/>
+ <function name="PushMatrix" template="PushMatrix"/>
+
+ <function name="Rotatef" template="Rotate" gltype="GLfloat"/>
+ <function name="Rotatex" template="Rotate" gltype="GLfixed"/>
+ <function name="Scalef" template="Scale" gltype="GLfloat"/>
+ <function name="Scalex" template="Scale" gltype="GLfixed"/>
+ <function name="Translatef" template="Translate" gltype="GLfloat"/>
+ <function name="Translatex" template="Translate" gltype="GLfixed"/>
+
+ <function name="Viewport" template="Viewport"/>
+ <function name="ColorPointer" template="ColorPointer"/>
+ <function name="DisableClientState" template="DisableClientState"/>
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+ <function name="EnableClientState" template="EnableClientState"/>
+
+ <function name="GetPointerv" template="GetPointer"/>
+
+ <function name="Normal3f" template="Normal" gltype="GLfloat" expand_vector="true"/>
+ <function name="Normal3x" template="Normal" gltype="GLfixed" expand_vector="true"/>
+ <function name="NormalPointer" template="NormalPointer"/>
+ <function name="TexCoordPointer" template="TexCoordPointer"/>
+ <function name="VertexPointer" template="VertexPointer"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="PolygonOffsetx" template="PolygonOffset" gltype="GLfixed"/>
+
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendEquationOES" template="BlendEquation"/>
+ <function name="BlendEquationSeparateOES" template="BlendEquationSeparate"/>
+
+ <function name="MultiTexCoord4x" template="MultiTexCoord" gltype="GLfixed" vector_size="4" expand_vector="true"/>
+
+ <function name="ActiveTexture" template="ActiveTexture"/>
+ <function name="ClientActiveTexture" template="ClientActiveTexture"/>
+
+ <function name="MultiTexCoord4f" template="MultiTexCoord" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+
+ <function name="SampleCoverage" template="SampleCoverage" gltype="GLclampf"/>
+ <function name="SampleCoveragex" template="SampleCoverage" gltype="GLclampx"/>
+
+ <!-- CompressedTexImage2D calls out to two different functions based on
+ whether the image is a paletted image or not -->
+ <function name="CompressedTexImage2D" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2D" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparateOES" template="BlendFuncSeparate"/>
+
+ <function name="PointParameterf" template="PointParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="PointParameterfv" template="PointParameter" gltype="GLfloat"/>
+ <function name="PointParameterx" template="PointParameter" gltype="GLfixed" expand_vector="true"/>
+ <function name="PointParameterxv" template="PointParameter" gltype="GLfixed"/>
+
+ <!-- OES_mapbuffer -->
+ <function name="GetBufferPointervOES" template="GetBufferPointer"/>
+ <function name="MapBufferOES" template="MapBuffer"/>
+ <function name="UnmapBufferOES" template="UnmapBuffer"/>
+
+ <function name="BindBuffer" template="BindBuffer"/>
+ <function name="BufferData" template="BufferData"/>
+ <function name="BufferSubData" template="BufferSubData"/>
+ <function name="DeleteBuffers" template="DeleteBuffers"/>
+ <function name="GenBuffers" template="GenBuffers"/>
+ <function name="GetBufferParameteriv" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBuffer" template="IsBuffer"/>
+
+ <!-- OES_framebuffer_object -->
+ <function name="GenerateMipmapOES" template="GenerateMipmap"/>
+ <function name="BindFramebufferOES" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffersOES" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffersOES" template="GenFramebuffers"/>
+ <function name="BindRenderbufferOES" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffersOES" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffersOES" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorageOES" external="true" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbufferOES" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2DOES" template="FramebufferTexture2D"/>
+ <function name="CheckFramebufferStatusOES" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameterivOES" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameterivOES" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbufferOES" template="IsRenderbuffer"/>
+ <function name="IsFramebufferOES" template="IsFramebuffer"/>
+
+ <!-- OES_query_matrix -->
+ <!-- QueryMatrixx returns values in an unusual, decomposed, fixed-value
+ form; it has its own code for this -->
+ <function name="QueryMatrixxOES" external="true" template="QueryMatrix" gltype="GLfixed"/>
+
+ <!-- OES_draw_texture -->
+ <function name="DrawTexfOES" template="DrawTex" gltype="GLfloat" expand_vector="true"/>
+ <function name="DrawTexiOES" template="DrawTex" gltype="GLint" expand_vector="true"/>
+ <function name="DrawTexsOES" template="DrawTex" gltype="GLshort" expand_vector="true"/>
+ <function name="DrawTexxOES" template="DrawTex" gltype="GLfixed" expand_vector="true"/>
+ <function name="DrawTexfvOES" template="DrawTex" gltype="GLfloat"/>
+ <function name="DrawTexivOES" template="DrawTex" gltype="GLint"/>
+ <function name="DrawTexsvOES" template="DrawTex" gltype="GLshort"/>
+ <function name="DrawTexxvOES" template="DrawTex" gltype="GLfixed"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
+</api>
+
+<api name="GLES2.0">
+ <category name="GLES2.0"/>
+
+ <category name="OES_compressed_paletted_texture"/>
+ <category name="OES_depth24"/>
+ <category name="OES_depth32"/>
+ <category name="OES_fbo_render_mipmap"/>
+ <category name="OES_rgb8_rgba8"/>
+ <category name="OES_stencil1"/>
+ <category name="OES_stencil4"/>
+ <category name="OES_element_index_uint"/>
+ <category name="OES_mapbuffer"/>
+ <category name="OES_texture_3D"/>
+ <category name="OES_texture_npot"/>
+ <category name="EXT_texture_filter_anisotropic"/>
+ <category name="EXT_texture_type_2_10_10_10_REV"/>
+ <category name="OES_depth_texture"/>
+ <category name="OES_packed_depth_stencil"/>
+ <category name="OES_standard_derivatives"/>
+
+ <category name="EXT_texture_compression_dxt1"/>
+ <category name="EXT_blend_minmax"/>
+ <category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
+
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+
+ <function name="Scissor" template="Scissor"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepthf" template="ClearDepth" gltype="GLclampf"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="StencilMaskSeparate" template="StencilMaskSeparate"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+ <function name="Disable" template="Disable"/>
+ <function name="Enable" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+
+ <function name="StencilFunc" template="StencilFunc"/>
+ <function name="StencilFuncSeparate" template="StencilFuncSeparate"/>
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="StencilOpSeparate" template="StencilOpSeparate"/>
+
+ <function name="DepthFunc" template="DepthFunc"/>
+
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+ <function name="ReadPixels" template="ReadPixels"/>
+
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetString" template="GetString"/>
+
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+
+ <function name="IsEnabled" template="IsEnabled"/>
+
+ <function name="DepthRangef" template="DepthRange" gltype="GLclampf"/>
+
+ <function name="Viewport" template="Viewport"/>
+
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendColor" template="BlendColor" gltype="GLclampf"/>
+ <function name="BlendEquation" template="BlendEquation"/>
+ <function name="BlendEquationSeparate" template="BlendEquationSeparate"/>
+
+ <function name="TexImage3DOES" template="TexImage3D"/>
+ <function name="TexSubImage3DOES" template="TexSubImage3D"/>
+ <function name="CopyTexSubImage3DOES" template="CopyTexSubImage3D"/>
+
+ <function name="CompressedTexImage3DOES" template="CompressedTexImage3D"/>
+ <function name="CompressedTexSubImage3DOES" template="CompressedTexSubImage3D"/>
+
+ <function name="ActiveTexture" template="ActiveTexture"/>
+
+ <function name="SampleCoverage" template="SampleCoverage" gltype="GLclampf"/>
+
+ <function name="CompressedTexImage2D" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2D" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparate" template="BlendFuncSeparate"/>
+
+ <function name="VertexAttrib1f" template="VertexAttrib" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="VertexAttrib2f" template="VertexAttrib" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="VertexAttrib3f" template="VertexAttrib" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="VertexAttrib4f" template="VertexAttrib" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="VertexAttrib1fv" template="VertexAttrib" gltype="GLfloat" vector_size="1"/>
+ <function name="VertexAttrib2fv" template="VertexAttrib" gltype="GLfloat" vector_size="2"/>
+ <function name="VertexAttrib3fv" template="VertexAttrib" gltype="GLfloat" vector_size="3"/>
+ <function name="VertexAttrib4fv" template="VertexAttrib" gltype="GLfloat" vector_size="4"/>
+
+ <function name="VertexAttribPointer" template="VertexAttribPointer"/>
+
+ <function name="EnableVertexAttribArray" template="EnableVertexAttribArray"/>
+ <function name="DisableVertexAttribArray" template="DisableVertexAttribArray"/>
+
+ <function name="IsProgram" template="IsProgram"/>
+ <function name="GetProgramiv" template="GetProgram" gltype="GLint"/>
+
+ <function name="GetVertexAttribfv" template="GetVertexAttrib" gltype="GLfloat"/>
+ <function name="GetVertexAttribiv" template="GetVertexAttrib" gltype="GLint"/>
+ <function name="GetVertexAttribPointerv" template="GetVertexAttribPointer"/>
+
+ <function name="GetBufferPointervOES" template="GetBufferPointer"/>
+ <function name="MapBufferOES" template="MapBuffer"/>
+ <function name="UnmapBufferOES" template="UnmapBuffer"/>
+ <function name="BindBuffer" template="BindBuffer"/>
+ <function name="BufferData" template="BufferData"/>
+ <function name="BufferSubData" template="BufferSubData"/>
+ <function name="DeleteBuffers" template="DeleteBuffers"/>
+ <function name="GenBuffers" template="GenBuffers"/>
+ <function name="GetBufferParameteriv" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBuffer" template="IsBuffer"/>
+
+ <function name="CreateShader" template="CreateShader"/>
+ <function name="ShaderSource" template="ShaderSource"/>
+ <function name="CompileShader" template="CompileShader"/>
+ <function name="ReleaseShaderCompiler" template="ReleaseShaderCompiler"/>
+ <function name="DeleteShader" template="DeleteShader"/>
+ <function name="ShaderBinary" template="ShaderBinary"/>
+ <function name="CreateProgram" template="CreateProgram"/>
+ <function name="AttachShader" template="AttachShader"/>
+ <function name="DetachShader" template="DetachShader"/>
+ <function name="LinkProgram" template="LinkProgram"/>
+ <function name="UseProgram" template="UseProgram"/>
+ <function name="DeleteProgram" template="DeleteProgram"/>
+
+ <function name="GetActiveAttrib" template="GetActiveAttrib"/>
+ <function name="GetAttribLocation" template="GetAttribLocation"/>
+ <function name="BindAttribLocation" template="BindAttribLocation"/>
+ <function name="GetUniformLocation" template="GetUniformLocation"/>
+ <function name="GetActiveUniform" template="GetActiveUniform"/>
+
+ <function name="Uniform1f" template="Uniform" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2f" template="Uniform" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3f" template="Uniform" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4f" template="Uniform" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1i" template="Uniform" gltype="GLint" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2i" template="Uniform" gltype="GLint" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3i" template="Uniform" gltype="GLint" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4i" template="Uniform" gltype="GLint" vector_size="4" expand_vector="true"/>
+
+ <function name="Uniform1fv" template="Uniform" gltype="GLfloat" vector_size="1"/>
+ <function name="Uniform2fv" template="Uniform" gltype="GLfloat" vector_size="2"/>
+ <function name="Uniform3fv" template="Uniform" gltype="GLfloat" vector_size="3"/>
+ <function name="Uniform4fv" template="Uniform" gltype="GLfloat" vector_size="4"/>
+ <function name="Uniform1iv" template="Uniform" gltype="GLint" vector_size="1"/>
+ <function name="Uniform2iv" template="Uniform" gltype="GLint" vector_size="2"/>
+ <function name="Uniform3iv" template="Uniform" gltype="GLint" vector_size="3"/>
+ <function name="Uniform4iv" template="Uniform" gltype="GLint" vector_size="4"/>
+
+ <function name="UniformMatrix2fv" template="UniformMatrix" gltype="GLfloat" vector_size="2"/>
+ <function name="UniformMatrix3fv" template="UniformMatrix" gltype="GLfloat" vector_size="3"/>
+ <function name="UniformMatrix4fv" template="UniformMatrix" gltype="GLfloat" vector_size="4"/>
+
+ <function name="ValidateProgram" template="ValidateProgram"/>
+
+ <function name="GenerateMipmap" template="GenerateMipmap"/>
+ <function name="BindFramebuffer" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffers" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffers" template="GenFramebuffers"/>
+ <function name="BindRenderbuffer" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffers" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffers" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorage" external="true" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbuffer" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2D" template="FramebufferTexture2D"/>
+ <function name="FramebufferTexture3DOES" template="FramebufferTexture3D"/>
+ <function name="CheckFramebufferStatus" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameteriv" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameteriv" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbuffer" template="IsRenderbuffer"/>
+ <function name="IsFramebuffer" template="IsFramebuffer"/>
+
+ <function name="IsShader" template="IsShader"/>
+ <function name="GetShaderiv" template="GetShader" gltype="GLint"/>
+ <function name="GetAttachedShaders" template="GetAttachedShaders"/>
+ <function name="GetShaderInfoLog" template="GetShaderInfoLog"/>
+ <function name="GetProgramInfoLog" template="GetProgramInfoLog"/>
+ <function name="GetShaderSource" template="GetShaderSource"/>
+ <function name="GetShaderPrecisionFormat" template="GetShaderPrecisionFormat"/>
+ <function name="GetUniformfv" template="GetUniform" gltype="GLfloat"/>
+ <function name="GetUniformiv" template="GetUniform" gltype="GLint"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
+</api>
+
+</apispec>
diff --git a/mesalib/src/mesa/main/APIspecutil.py b/mesalib/src/mesa/main/APIspecutil.py
new file mode 100644
index 000000000..9e604bb84
--- /dev/null
+++ b/mesalib/src/mesa/main/APIspecutil.py
@@ -0,0 +1,272 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+"""
+Minimal apiutil.py interface for use by es_generator.py.
+"""
+
+import sys
+import libxml2
+
+import APIspec
+
+__spec = {}
+__functions = {}
+__aliases = {}
+
+def _ParseXML(filename, apiname):
+ conversions = {
+ # from to
+ 'GLfloat': [ 'GLdouble' ],
+ 'GLclampf': [ 'GLclampd' ],
+ 'GLubyte': [ 'GLfloat', 'GLdouble' ],
+ 'GLint': [ 'GLfloat', 'GLdouble' ],
+ 'GLfixed': [ 'GLfloat', 'GLdouble' ],
+ 'GLclampx': [ 'GLclampf', 'GLclampd' ],
+ }
+
+ doc = libxml2.readFile(filename, None,
+ libxml2.XML_PARSE_DTDLOAD +
+ libxml2.XML_PARSE_DTDVALID +
+ libxml2.XML_PARSE_NOBLANKS)
+ spec = APIspec.Spec(doc)
+ impl = spec.get_impl()
+ api = spec.get_api(apiname)
+ doc.freeDoc()
+
+ __spec["impl"] = impl
+ __spec["api"] = api
+
+ for func in api.functions:
+ alias, need_conv = impl.match(func, conversions)
+ if not alias:
+ # external functions are manually dispatched
+ if not func.is_external:
+ print >>sys.stderr, "Error: unable to dispatch %s" % func.name
+ alias = func
+ need_conv = False
+
+ __functions[func.name] = func
+ __aliases[func.name] = (alias, need_conv)
+
+
+def AllSpecials(notused=None):
+ """Return a list of all external functions in the API."""
+ api = __spec["api"]
+
+ specials = []
+ for func in api.functions:
+ if func.is_external:
+ specials.append(func.name)
+
+ return specials
+
+
+def GetAllFunctions(filename, api):
+ """Return sorted list of all functions in the API."""
+ if not __spec:
+ _ParseXML(filename, api)
+
+ api = __spec["api"]
+ names = []
+ for func in api.functions:
+ names.append(func.name)
+ names.sort()
+ return names
+
+
+def ReturnType(funcname):
+ """Return the C return type of named function."""
+ func = __functions[funcname]
+ return func.return_type
+
+
+def Properties(funcname):
+ """Return list of properties of the named GL function."""
+ func = __functions[funcname]
+ return [func.direction]
+
+
+def _ValidValues(func, param):
+ """Return the valid values of a parameter."""
+ valid_values = []
+ switch = func.checker.switches.get(param.name, [])
+ for desc in switch:
+ # no dependent vector
+ if not desc.checker.switches:
+ for val in desc.values:
+ valid_values.append((val, None, None, [], desc.error, None))
+ continue
+
+ items = desc.checker.switches.items()
+ if len(items) > 1:
+ print >>sys.stderr, "%s: more than one parameter depend on %s" % \
+ (func.name, desc.name)
+ dep_name, dep_switch = items[0]
+
+ for dep_desc in dep_switch:
+ if dep_desc.index >= 0 and dep_desc.index != 0:
+ print >>sys.stderr, "%s: not first element of a vector" % func.name
+ if dep_desc.checker.switches:
+ print >>sys.stderr, "%s: deep nested dependence" % func.name
+
+ convert = None if dep_desc.convert else "noconvert"
+ for val in desc.values:
+ valid_values.append((val, dep_desc.size_str, dep_desc.name,
+ dep_desc.values, dep_desc.error, convert))
+ return valid_values
+
+
+def _Conversion(func, src_param):
+ """Return the destination type of the conversion, or None."""
+ alias, need_conv = __aliases[func.name]
+ if need_conv:
+ dst_param = alias.get_param(src_param.name)
+ if src_param.type == dst_param.type:
+ need_conv = False
+ if not need_conv:
+ return (None, "none")
+
+ converts = { True: 0, False: 0 }
+
+ # In Fogx, for example, pname may be GL_FOG_DENSITY/GL_FOG_START/GL_FOG_END
+ # or GL_FOG_MODE. In the former three cases, param is not checked and the
+ # default is to convert.
+ if not func.checker.always_check(src_param.name):
+ converts[True] += 1
+
+ for desc in func.checker.flatten(src_param.name):
+ converts[desc.convert] += 1
+ if converts[True] and converts[False]:
+ break
+
+ # it should be "never", "sometimes", and "always"...
+ if converts[False]:
+ if converts[True]:
+ conversion = "some"
+ else:
+ conversion = "none"
+ else:
+ conversion = "all"
+
+ return (dst_param.base_type(), conversion)
+
+
+def _MaxVecSize(func, param):
+ """Return the largest possible size of a vector."""
+ if not param.is_vector:
+ return 0
+ if param.size:
+ return param.size
+
+ # need to look at all descriptions
+ size = 0
+ for desc in func.checker.flatten(param.name):
+ if desc.size_str and desc.size_str.isdigit():
+ s = int(desc.size_str)
+ if s > size:
+ size = s
+ if not size:
+ need_conv = __aliases[func.name][1]
+ if need_conv:
+ print >>sys.stderr, \
+ "Error: unable to dicide the max size of %s in %s" % \
+ (param.name, func.name)
+ return size
+
+
+def _ParameterTuple(func, param):
+ """Return a parameter tuple.
+
+ [0] -- parameter name
+ [1] -- parameter type
+ [2] -- max vector size or 0
+ [3] -- dest type the parameter converts to, or None
+ [4] -- valid values
+ [5] -- how often does the conversion happen
+
+ """
+ vec_size = _MaxVecSize(func, param)
+ dst_type, conversion = _Conversion(func, param)
+ valid_values = _ValidValues(func, param)
+
+ return (param.name, param.type, vec_size, dst_type, valid_values, conversion)
+
+
+def Parameters(funcname):
+ """Return list of tuples of function parameters."""
+ func = __functions[funcname]
+ params = []
+ for param in func.params:
+ params.append(_ParameterTuple(func, param))
+
+ return params
+
+
+def FunctionPrefix(funcname):
+ """Return function specific prefix."""
+ func = __functions[funcname]
+
+ return func.prefix
+
+
+def FindParamIndex(params, paramname):
+ """Find the index of a named parameter."""
+ for i in xrange(len(params)):
+ if params[i][0] == paramname:
+ return i
+ return None
+
+
+def MakeDeclarationString(params):
+ """Return a C-style parameter declaration string."""
+ string = []
+ for p in params:
+ sep = "" if p[1].endswith("*") else " "
+ string.append("%s%s%s" % (p[1], sep, p[0]))
+ if not string:
+ return "void"
+ return ", ".join(string)
+
+
+def AliasPrefix(funcname):
+ """Return the prefix of the function the named function is an alias of."""
+ alias = __aliases[funcname][0]
+ return alias.prefix
+
+
+def Alias(funcname):
+ """Return the name of the function the named function is an alias of."""
+ alias, need_conv = __aliases[funcname]
+ return alias.name if not need_conv else None
+
+
+def ConversionFunction(funcname):
+ """Return the name of the function the named function converts to."""
+ alias, need_conv = __aliases[funcname]
+ return alias.name if need_conv else None
+
+
+def Categories(funcname):
+ """Return all the categories of the named GL function."""
+ api = __spec["api"]
+ return [api.name]
diff --git a/mesalib/src/mesa/main/accum.h b/mesalib/src/mesa/main/accum.h
index 63740f07e..4b628bafa 100644
--- a/mesalib/src/mesa/main/accum.h
+++ b/mesalib/src/mesa/main/accum.h
@@ -42,11 +42,6 @@
#if FEATURE_accum
-#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) \
- do { \
- (driver)->Accum = impl ## Accum; \
- } while (0)
-
extern void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
@@ -55,7 +50,7 @@ _mesa_init_accum_dispatch(struct _glapi_table *disp);
#else /* FEATURE_accum */
-#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) do { } while (0)
+#include "main/compiler.h"
static INLINE void
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
diff --git a/mesalib/src/mesa/main/api_exec.c b/mesalib/src/mesa/main/api_exec.c
index fa8d409ca..ae918bf7e 100644
--- a/mesalib/src/mesa/main/api_exec.c
+++ b/mesalib/src/mesa/main/api_exec.c
@@ -34,11 +34,9 @@
#include "api_loopback.h"
#include "api_exec.h"
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
-#include "shader/arbprogram.h"
-#endif
-#if FEATURE_ATI_fragment_shader
-#include "shader/atifragshader.h"
+#include "arbprogram.h"
#endif
+#include "atifragshader.h"
#include "attrib.h"
#include "blend.h"
#if FEATURE_ARB_vertex_buffer_object
@@ -89,24 +87,65 @@
#include "texobj.h"
#include "texparam.h"
#include "texstate.h"
+#include "transformfeedback.h"
#include "mtypes.h"
#include "varray.h"
#include "viewport.h"
#if FEATURE_NV_vertex_program
-#include "shader/nvprogram.h"
+#include "nvprogram.h"
#endif
#if FEATURE_NV_fragment_program
-#include "shader/nvprogram.h"
+#include "nvprogram.h"
#endif
#if FEATURE_ARB_shader_objects
-#include "shaders.h"
+#include "shaderapi.h"
+#include "uniforms.h"
#endif
-#if FEATURE_ARB_sync
#include "syncobj.h"
-#endif
#include "main/dispatch.h"
+#if FEATURE_GL
+
+#ifdef _GLAPI_USE_REMAP_TABLE
+
+#define need_MESA_remap_table
+#include "main/remap.h"
+#include "main/remap_helper.h"
+
+/* This is shared across all APIs but We define this here since
+ * desktop GL has the biggest remap table. */
+int driDispatchRemapTable[driDispatchRemapTable_size];
+
+/**
+ * Map the functions which are already static.
+ *
+ * When a extension function are incorporated into the ABI, the
+ * extension suffix is usually stripped. Mapping such functions
+ * makes sure the alternative names are available.
+ *
+ * Note that functions mapped by _mesa_init_remap_table() are
+ * excluded.
+ */
+void
+_mesa_map_static_functions(void)
+{
+ /* Remap static functions which have alternative names and are in the ABI.
+ * This is to be on the safe side. glapi should have defined those names.
+ */
+ _mesa_map_function_array(MESA_alt_functions);
+}
+
+void
+_mesa_init_remap_table(void)
+{
+ _mesa_do_init_remap_table(_mesa_function_pool,
+ driDispatchRemapTable_size,
+ MESA_remap_table_functions);
+}
+
+#endif /* _GLAPI_USE_REMAP_TABLE */
+
/**
* Initialize a dispatch table with pointers to Mesa's immediate-mode
@@ -118,9 +157,15 @@
* \param ctx GL context to which \c exec belongs.
* \param exec dispatch table.
*/
-void
-_mesa_init_exec_table(struct _glapi_table *exec)
+struct _glapi_table *
+_mesa_create_exec_table(void)
{
+ struct _glapi_table *exec;
+
+ exec = _mesa_alloc_dispatch_table(sizeof *exec);
+ if (exec == NULL)
+ return NULL;
+
#if _HAVE_FULL_GL
_mesa_loopback_init_api_table( exec );
#endif
@@ -297,33 +342,12 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate);
SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate);
SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate);
+
#if FEATURE_ARB_shader_objects
- SET_AttachShader(exec, _mesa_AttachShader);
- SET_CreateProgram(exec, _mesa_CreateProgram);
- SET_CreateShader(exec, _mesa_CreateShader);
- SET_DeleteProgram(exec, _mesa_DeleteProgram);
- SET_DeleteShader(exec, _mesa_DeleteShader);
- SET_DetachShader(exec, _mesa_DetachShader);
- SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders);
- SET_GetProgramiv(exec, _mesa_GetProgramiv);
- SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog);
- SET_GetShaderiv(exec, _mesa_GetShaderiv);
- SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog);
- SET_IsProgram(exec, _mesa_IsProgram);
- SET_IsShader(exec, _mesa_IsShader);
-#endif
-
- /* OpenGL 2.1 */
-#if FEATURE_ARB_shader_objects
- SET_UniformMatrix2x3fv(exec, _mesa_UniformMatrix2x3fv);
- SET_UniformMatrix3x2fv(exec, _mesa_UniformMatrix3x2fv);
- SET_UniformMatrix2x4fv(exec, _mesa_UniformMatrix2x4fv);
- SET_UniformMatrix4x2fv(exec, _mesa_UniformMatrix4x2fv);
- SET_UniformMatrix3x4fv(exec, _mesa_UniformMatrix3x4fv);
- SET_UniformMatrix4x3fv(exec, _mesa_UniformMatrix4x3fv);
+ _mesa_init_shader_dispatch(exec);
+ _mesa_init_shader_uniform_dispatch(exec);
#endif
-
/* 2. GL_EXT_blend_color */
#if 0
/* SET_BlendColorEXT(exec, _mesa_BlendColorEXT); */
@@ -477,6 +501,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
/* ???. GL_EXT_depth_bounds_test */
SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT);
+ /* 352. GL_EXT_transform_feedback */
+ _mesa_init_transform_feedback_dispatch(exec);
+
+ /* 364. GL_EXT_provoking_vertex */
SET_ProvokingVertexEXT(exec, _mesa_ProvokingVertexEXT);
/* ARB 1. GL_ARB_multitexture */
@@ -602,82 +630,11 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB);
#endif
-#if FEATURE_ARB_shader_objects
- SET_DeleteObjectARB(exec, _mesa_DeleteObjectARB);
- SET_GetHandleARB(exec, _mesa_GetHandleARB);
- SET_DetachObjectARB(exec, _mesa_DetachObjectARB);
- SET_CreateShaderObjectARB(exec, _mesa_CreateShaderObjectARB);
- SET_ShaderSourceARB(exec, _mesa_ShaderSourceARB);
- SET_CompileShaderARB(exec, _mesa_CompileShaderARB);
- SET_CreateProgramObjectARB(exec, _mesa_CreateProgramObjectARB);
- SET_AttachObjectARB(exec, _mesa_AttachObjectARB);
- SET_LinkProgramARB(exec, _mesa_LinkProgramARB);
- SET_UseProgramObjectARB(exec, _mesa_UseProgramObjectARB);
- SET_ValidateProgramARB(exec, _mesa_ValidateProgramARB);
- SET_Uniform1fARB(exec, _mesa_Uniform1fARB);
- SET_Uniform2fARB(exec, _mesa_Uniform2fARB);
- SET_Uniform3fARB(exec, _mesa_Uniform3fARB);
- SET_Uniform4fARB(exec, _mesa_Uniform4fARB);
- SET_Uniform1iARB(exec, _mesa_Uniform1iARB);
- SET_Uniform2iARB(exec, _mesa_Uniform2iARB);
- SET_Uniform3iARB(exec, _mesa_Uniform3iARB);
- SET_Uniform4iARB(exec, _mesa_Uniform4iARB);
- SET_Uniform1fvARB(exec, _mesa_Uniform1fvARB);
- SET_Uniform2fvARB(exec, _mesa_Uniform2fvARB);
- SET_Uniform3fvARB(exec, _mesa_Uniform3fvARB);
- SET_Uniform4fvARB(exec, _mesa_Uniform4fvARB);
- SET_Uniform1ivARB(exec, _mesa_Uniform1ivARB);
- SET_Uniform2ivARB(exec, _mesa_Uniform2ivARB);
- SET_Uniform3ivARB(exec, _mesa_Uniform3ivARB);
- SET_Uniform4ivARB(exec, _mesa_Uniform4ivARB);
- SET_UniformMatrix2fvARB(exec, _mesa_UniformMatrix2fvARB);
- SET_UniformMatrix3fvARB(exec, _mesa_UniformMatrix3fvARB);
- SET_UniformMatrix4fvARB(exec, _mesa_UniformMatrix4fvARB);
- SET_GetObjectParameterfvARB(exec, _mesa_GetObjectParameterfvARB);
- SET_GetObjectParameterivARB(exec, _mesa_GetObjectParameterivARB);
- SET_GetInfoLogARB(exec, _mesa_GetInfoLogARB);
- SET_GetAttachedObjectsARB(exec, _mesa_GetAttachedObjectsARB);
- SET_GetUniformLocationARB(exec, _mesa_GetUniformLocationARB);
- SET_GetActiveUniformARB(exec, _mesa_GetActiveUniformARB);
- SET_GetUniformfvARB(exec, _mesa_GetUniformfvARB);
- SET_GetUniformivARB(exec, _mesa_GetUniformivARB);
- SET_GetShaderSourceARB(exec, _mesa_GetShaderSourceARB);
-#endif /* FEATURE_ARB_shader_objects */
-
-#if FEATURE_ARB_vertex_shader
- SET_BindAttribLocationARB(exec, _mesa_BindAttribLocationARB);
- SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
- SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
-#endif /* FEATURE_ARB_vertex_shader */
-
/* GL_ARB_sync */
-#if FEATURE_ARB_sync
- SET_IsSync(exec, _mesa_IsSync);
- SET_DeleteSync(exec, _mesa_DeleteSync);
- SET_FenceSync(exec, _mesa_FenceSync);
- SET_ClientWaitSync(exec, _mesa_ClientWaitSync);
- SET_WaitSync(exec, _mesa_WaitSync);
- SET_GetInteger64v(exec, _mesa_GetInteger64v);
- SET_GetSynciv(exec, _mesa_GetSynciv);
-#endif
+ _mesa_init_sync_dispatch(exec);
/* GL_ATI_fragment_shader */
-#if FEATURE_ATI_fragment_shader
- SET_GenFragmentShadersATI(exec, _mesa_GenFragmentShadersATI);
- SET_BindFragmentShaderATI(exec, _mesa_BindFragmentShaderATI);
- SET_DeleteFragmentShaderATI(exec, _mesa_DeleteFragmentShaderATI);
- SET_BeginFragmentShaderATI(exec, _mesa_BeginFragmentShaderATI);
- SET_EndFragmentShaderATI(exec, _mesa_EndFragmentShaderATI);
- SET_PassTexCoordATI(exec, _mesa_PassTexCoordATI);
- SET_SampleMapATI(exec, _mesa_SampleMapATI);
- SET_ColorFragmentOp1ATI(exec, _mesa_ColorFragmentOp1ATI);
- SET_ColorFragmentOp2ATI(exec, _mesa_ColorFragmentOp2ATI);
- SET_ColorFragmentOp3ATI(exec, _mesa_ColorFragmentOp3ATI);
- SET_AlphaFragmentOp1ATI(exec, _mesa_AlphaFragmentOp1ATI);
- SET_AlphaFragmentOp2ATI(exec, _mesa_AlphaFragmentOp2ATI);
- SET_AlphaFragmentOp3ATI(exec, _mesa_AlphaFragmentOp3ATI);
- SET_SetFragmentShaderConstantATI(exec, _mesa_SetFragmentShaderConstantATI);
-#endif
+ _mesa_init_ati_fragment_shader_dispatch(exec);
/* GL_ATI_envmap_bumpmap */
SET_GetTexBumpParameterivATI(exec, _mesa_GetTexBumpParameterivATI);
@@ -764,4 +721,14 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE);
#endif
+
+#if FEATURE_ARB_geometry_shader4
+ SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB);
+ SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
+#endif
+
+
+ return exec;
}
+
+#endif /* FEATURE_GL */
diff --git a/mesalib/src/mesa/main/api_exec.h b/mesalib/src/mesa/main/api_exec.h
index 4bd715053..29c953f31 100644
--- a/mesalib/src/mesa/main/api_exec.h
+++ b/mesalib/src/mesa/main/api_exec.h
@@ -29,9 +29,17 @@
struct _glapi_table;
+extern struct _glapi_table *
+_mesa_alloc_dispatch_table(int size);
-extern void
-_mesa_init_exec_table(struct _glapi_table *exec);
+extern struct _glapi_table *
+_mesa_create_exec_table(void);
+
+extern struct _glapi_table *
+_mesa_create_exec_table_es1(void);
+
+extern struct _glapi_table *
+_mesa_create_exec_table_es2(void);
#endif
diff --git a/mesalib/src/mesa/main/api_loopback.c b/mesalib/src/mesa/main/api_loopback.c
index aedc509fb..d1789069c 100644
--- a/mesalib/src/mesa/main/api_loopback.c
+++ b/mesalib/src/mesa/main/api_loopback.c
@@ -1443,6 +1443,135 @@ loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v)
+/** GL 3.0 Integer-valued attributes **/
+
+static void GLAPIENTRY
+loopback_VertexAttribI1i(GLuint index, GLint x)
+{
+ ATTRIB1ARB(index, (GLfloat) x);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI2i(GLuint index, GLint x, GLint y)
+{
+ ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
+{
+ ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI1ui(GLuint index, GLuint x)
+{
+ ATTRIB1ARB(index, (GLfloat) x);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI2ui(GLuint index, GLuint x, GLuint y)
+{
+ ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI1iv(GLuint index, const GLint *v)
+{
+ ATTRIB1ARB(index, (GLfloat) v[0]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI2iv (GLuint index, const GLint *v)
+{
+ ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI3iv(GLuint index, const GLint *v)
+{
+ ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4iv(GLuint index, const GLint *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ ATTRIB1ARB(index, (GLfloat) v[0]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+static void GLAPIENTRY
+loopback_VertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
+}
+
+
/*
* This code never registers handlers for any of the entry points
@@ -1658,6 +1787,51 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest )
SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB);
SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
+
+ /* GL 3.0 */
+#if 0
+ SET_VertexAttribI1i(dest, loopback_VertexAttribI1i);
+ SET_VertexAttribI2i(dest, loopback_VertexAttribI2i);
+ SET_VertexAttribI3i(dest, loopback_VertexAttribI3i);
+ SET_VertexAttribI4i(dest, loopback_VertexAttribI4i);
+ SET_VertexAttribI1ui(dest, loopback_VertexAttribI1ui);
+ SET_VertexAttribI2ui(dest, loopback_VertexAttribI2ui);
+ SET_VertexAttribI3ui(dest, loopback_VertexAttribI3ui);
+ SET_VertexAttribI4ui(dest, loopback_VertexAttribI4ui);
+ SET_VertexAttribI1iv(dest, loopback_VertexAttribI1iv);
+ SET_VertexAttribI2iv(dest, loopback_VertexAttribI2iv);
+ SET_VertexAttribI3iv(dest, loopback_VertexAttribI3iv);
+ SET_VertexAttribI4iv(dest, loopback_VertexAttribI4iv);
+ SET_VertexAttribI1uiv(dest, loopback_VertexAttribI1uiv);
+ SET_VertexAttribI2uiv(dest, loopback_VertexAttribI2uiv);
+ SET_VertexAttribI3uiv(dest, loopback_VertexAttribI3uiv);
+ SET_VertexAttribI4uiv(dest, loopback_VertexAttribI4uiv);
+ SET_VertexAttribI4bv(dest, loopback_VertexAttribI4bv);
+ SET_VertexAttribI4sv(dest, loopback_VertexAttribI4sv);
+ SET_VertexAttribI4ubv(dest, loopback_VertexAttribI4ubv);
+ SET_VertexAttribI4usv(dest, loopback_VertexAttribI4usv);
+#else
+ (void) loopback_VertexAttribI1i;
+ (void) loopback_VertexAttribI2i;
+ (void) loopback_VertexAttribI3i;
+ (void) loopback_VertexAttribI4i;
+ (void) loopback_VertexAttribI1ui;
+ (void) loopback_VertexAttribI2ui;
+ (void) loopback_VertexAttribI3ui;
+ (void) loopback_VertexAttribI4ui;
+ (void) loopback_VertexAttribI1iv;
+ (void) loopback_VertexAttribI2iv;
+ (void) loopback_VertexAttribI3iv;
+ (void) loopback_VertexAttribI4iv;
+ (void) loopback_VertexAttribI1uiv;
+ (void) loopback_VertexAttribI2uiv;
+ (void) loopback_VertexAttribI3uiv;
+ (void) loopback_VertexAttribI4uiv;
+ (void) loopback_VertexAttribI4bv;
+ (void) loopback_VertexAttribI4sv;
+ (void) loopback_VertexAttribI4ubv;
+ (void) loopback_VertexAttribI4usv;
+#endif
}
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index 4fb7b5ad6..b3b5c6cc0 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -105,21 +105,31 @@ check_valid_to_render(GLcontext *ctx, const char *function)
return GL_FALSE;
}
+ switch (ctx->API) {
#if FEATURE_es2_glsl
- /* For ES2, we can draw if any vertex array is enabled (and we should
- * always have a vertex program/shader).
- */
- if (ctx->Array.ArrayObj->_Enabled == 0x0 || !ctx->VertexProgram._Current)
- return GL_FALSE;
-#else
- /* For regular OpenGL, only draw if we have vertex positions (regardless
- * of whether or not we have a vertex program/shader).
- */
- if (!ctx->Array.ArrayObj->Vertex.Enabled &&
- !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
- return GL_FALSE;
+ case API_OPENGLES2:
+ /* For ES2, we can draw if any vertex array is enabled (and we
+ * should always have a vertex program/shader). */
+ if (ctx->Array.ArrayObj->_Enabled == 0x0 || !ctx->VertexProgram._Current)
+ return GL_FALSE;
+ break;
+#endif
+
+#if FEATURE_ES1 || FEATURE_GL
+ case API_OPENGLES:
+ case API_OPENGL:
+ /* For regular OpenGL, only draw if we have vertex positions
+ * (regardless of whether or not we have a vertex program/shader). */
+ if (!ctx->Array.ArrayObj->Vertex.Enabled &&
+ !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
+ return GL_FALSE;
+ break;
#endif
+ default:
+ ASSERT_NO_FEATURE();
+ }
+
return GL_TRUE;
}
@@ -175,7 +185,7 @@ _mesa_validate_DrawElements(GLcontext *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count <= 0) {
if (count < 0)
@@ -183,7 +193,7 @@ _mesa_validate_DrawElements(GLcontext *ctx,
return GL_FALSE;
}
- if (mode > GL_POLYGON) {
+ if (mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(mode)" );
return GL_FALSE;
}
@@ -240,7 +250,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
return GL_FALSE;
}
- if (mode > GL_POLYGON) {
+ if (mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(mode)" );
return GL_FALSE;
}
@@ -299,7 +309,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
return GL_FALSE;
}
- if (mode > GL_POLYGON) {
+ if (mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}
@@ -314,3 +324,108 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
return GL_TRUE;
}
+
+
+GLboolean
+_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first,
+ GLsizei count, GLsizei primcount)
+{
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (count <= 0) {
+ if (count < 0)
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawArraysInstanced(count=%d)", count);
+ return GL_FALSE;
+ }
+
+ if (mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glDrawArraysInstanced(mode=0x%x)", mode);
+ return GL_FALSE;
+ }
+
+ if (primcount <= 0) {
+ if (primcount < 0)
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawArraysInstanced(primcount=%d)", primcount);
+ return GL_FALSE;
+ }
+
+ if (!check_valid_to_render(ctx, "glDrawArraysInstanced(invalid to render)"))
+ return GL_FALSE;
+
+ if (ctx->CompileFlag) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawArraysInstanced(display list");
+ return GL_FALSE;
+ }
+
+ if (ctx->Const.CheckArrayBounds) {
+ if (first + count > (GLint) ctx->Array.ArrayObj->_MaxElement)
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+
+GLboolean
+_mesa_validate_DrawElementsInstanced(GLcontext *ctx,
+ GLenum mode, GLsizei count, GLenum type,
+ const GLvoid *indices, GLsizei primcount)
+{
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (count <= 0) {
+ if (count < 0)
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawElementsInstanced(count=%d)", count);
+ return GL_FALSE;
+ }
+
+ if (mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glDrawElementsInstanced(mode = 0x%x)", mode);
+ return GL_FALSE;
+ }
+
+ if (type != GL_UNSIGNED_INT &&
+ type != GL_UNSIGNED_BYTE &&
+ type != GL_UNSIGNED_SHORT) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glDrawElementsInstanced(type=0x%x)", type);
+ return GL_FALSE;
+ }
+
+ if (primcount <= 0) {
+ if (primcount < 0)
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawElementsInstanced(primcount=%d)", primcount);
+ return GL_FALSE;
+ }
+
+ if (!check_valid_to_render(ctx, "glDrawElementsInstanced"))
+ return GL_FALSE;
+
+ /* Vertex buffer object tests */
+ if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) {
+ /* use indices in the buffer object */
+ /* make sure count doesn't go outside buffer bounds */
+ if (index_bytes(type, count) > ctx->Array.ElementArrayBufferObj->Size) {
+ _mesa_warning(ctx,
+ "glDrawElementsInstanced index out of buffer bounds");
+ return GL_FALSE;
+ }
+ }
+ else {
+ /* not using a VBO */
+ if (!indices)
+ return GL_FALSE;
+ }
+
+ if (!check_index_bounds(ctx, count, type, indices, 0))
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
diff --git a/mesalib/src/mesa/main/api_validate.h b/mesalib/src/mesa/main/api_validate.h
index 6064d15fe..cd27d58aa 100644
--- a/mesalib/src/mesa/main/api_validate.h
+++ b/mesalib/src/mesa/main/api_validate.h
@@ -52,4 +52,14 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
const GLvoid *indices, GLint basevertex);
+extern GLboolean
+_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first,
+ GLsizei count, GLsizei primcount);
+
+extern GLboolean
+_mesa_validate_DrawElementsInstanced(GLcontext *ctx,
+ GLenum mode, GLsizei count, GLenum type,
+ const GLvoid *indices, GLsizei primcount);
+
+
#endif
diff --git a/mesalib/src/mesa/main/arbprogram.c b/mesalib/src/mesa/main/arbprogram.c
new file mode 100644
index 000000000..26d781954
--- /dev/null
+++ b/mesalib/src/mesa/main/arbprogram.c
@@ -0,0 +1,940 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.0
+ *
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file arbprogram.c
+ * ARB_vertex/fragment_program state management functions.
+ * \author Brian Paul
+ */
+
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/hash.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/mtypes.h"
+#include "main/arbprogram.h"
+#include "program/arbprogparse.h"
+#include "program/nvfragparse.h"
+#include "program/nvvertparse.h"
+#include "program/program.h"
+
+
+
+/**
+ * Mixing ARB and NV vertex/fragment programs can be tricky.
+ * Note: GL_VERTEX_PROGRAM_ARB == GL_VERTEX_PROGRAM_NV
+ * but, GL_FRAGMENT_PROGRAM_ARB != GL_FRAGMENT_PROGRAM_NV
+ * The two different fragment program targets are supposed to be compatible
+ * to some extent (see GL_ARB_fragment_program spec).
+ * This function does the compatibility check.
+ */
+static GLboolean
+compatible_program_targets(GLenum t1, GLenum t2)
+{
+ if (t1 == t2)
+ return GL_TRUE;
+ if (t1 == GL_FRAGMENT_PROGRAM_ARB && t2 == GL_FRAGMENT_PROGRAM_NV)
+ return GL_TRUE;
+ if (t1 == GL_FRAGMENT_PROGRAM_NV && t2 == GL_FRAGMENT_PROGRAM_ARB)
+ return GL_TRUE;
+ return GL_FALSE;
+}
+
+
+/**
+ * Bind a program (make it current)
+ * \note Called from the GL API dispatcher by both glBindProgramNV
+ * and glBindProgramARB.
+ */
+void GLAPIENTRY
+_mesa_BindProgram(GLenum target, GLuint id)
+{
+ struct gl_program *curProg, *newProg;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ /* Error-check target and get curProg */
+ if ((target == GL_VERTEX_PROGRAM_ARB) && /* == GL_VERTEX_PROGRAM_NV */
+ (ctx->Extensions.NV_vertex_program ||
+ ctx->Extensions.ARB_vertex_program)) {
+ curProg = &ctx->VertexProgram.Current->Base;
+ }
+ else if ((target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) ||
+ (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program)) {
+ curProg = &ctx->FragmentProgram.Current->Base;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindProgramNV/ARB(target)");
+ return;
+ }
+
+ /*
+ * Get pointer to new program to bind.
+ * NOTE: binding to a non-existant program is not an error.
+ * That's supposed to be caught in glBegin.
+ */
+ if (id == 0) {
+ /* Bind a default program */
+ newProg = NULL;
+ if (target == GL_VERTEX_PROGRAM_ARB) /* == GL_VERTEX_PROGRAM_NV */
+ newProg = &ctx->Shared->DefaultVertexProgram->Base;
+ else
+ newProg = &ctx->Shared->DefaultFragmentProgram->Base;
+ }
+ else {
+ /* Bind a user program */
+ newProg = _mesa_lookup_program(ctx, id);
+ if (!newProg || newProg == &_mesa_DummyProgram) {
+ /* allocate a new program now */
+ newProg = ctx->Driver.NewProgram(ctx, target, id);
+ if (!newProg) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindProgramNV/ARB");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->Programs, id, newProg);
+ }
+ else if (!compatible_program_targets(newProg->Target, target)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindProgramNV/ARB(target mismatch)");
+ return;
+ }
+ }
+
+ /** All error checking is complete now **/
+
+ if (curProg->Id == id) {
+ /* binding same program - no change */
+ return;
+ }
+
+ /* signal new program (and its new constants) */
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+
+ /* bind newProg */
+ if (target == GL_VERTEX_PROGRAM_ARB) { /* == GL_VERTEX_PROGRAM_NV */
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
+ (struct gl_vertex_program *) newProg);
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_NV ||
+ target == GL_FRAGMENT_PROGRAM_ARB) {
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
+ (struct gl_fragment_program *) newProg);
+ }
+
+ /* Never null pointers */
+ ASSERT(ctx->VertexProgram.Current);
+ ASSERT(ctx->FragmentProgram.Current);
+
+ if (ctx->Driver.BindProgram)
+ ctx->Driver.BindProgram(ctx, target, newProg);
+}
+
+
+/**
+ * Delete a list of programs.
+ * \note Not compiled into display lists.
+ * \note Called by both glDeleteProgramsNV and glDeleteProgramsARB.
+ */
+void GLAPIENTRY
+_mesa_DeletePrograms(GLsizei n, const GLuint *ids)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (n < 0) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteProgramsNV" );
+ return;
+ }
+
+ for (i = 0; i < n; i++) {
+ if (ids[i] != 0) {
+ struct gl_program *prog = _mesa_lookup_program(ctx, ids[i]);
+ if (prog == &_mesa_DummyProgram) {
+ _mesa_HashRemove(ctx->Shared->Programs, ids[i]);
+ }
+ else if (prog) {
+ /* Unbind program if necessary */
+ switch (prog->Target) {
+ case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
+ case GL_VERTEX_STATE_PROGRAM_NV:
+ if (ctx->VertexProgram.Current &&
+ ctx->VertexProgram.Current->Base.Id == ids[i]) {
+ /* unbind this currently bound program */
+ _mesa_BindProgram(prog->Target, 0);
+ }
+ break;
+ case GL_FRAGMENT_PROGRAM_NV:
+ case GL_FRAGMENT_PROGRAM_ARB:
+ if (ctx->FragmentProgram.Current &&
+ ctx->FragmentProgram.Current->Base.Id == ids[i]) {
+ /* unbind this currently bound program */
+ _mesa_BindProgram(prog->Target, 0);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad target in glDeleteProgramsNV");
+ return;
+ }
+ /* The ID is immediately available for re-use now */
+ _mesa_HashRemove(ctx->Shared->Programs, ids[i]);
+ _mesa_reference_program(ctx, &prog, NULL);
+ }
+ }
+ }
+}
+
+
+/**
+ * Generate a list of new program identifiers.
+ * \note Not compiled into display lists.
+ * \note Called by both glGenProgramsNV and glGenProgramsARB.
+ */
+void GLAPIENTRY
+_mesa_GenPrograms(GLsizei n, GLuint *ids)
+{
+ GLuint first;
+ GLuint i;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenPrograms");
+ return;
+ }
+
+ if (!ids)
+ return;
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->Programs, n);
+
+ /* Insert pointer to dummy program as placeholder */
+ for (i = 0; i < (GLuint) n; i++) {
+ _mesa_HashInsert(ctx->Shared->Programs, first + i, &_mesa_DummyProgram);
+ }
+
+ /* Return the program names */
+ for (i = 0; i < (GLuint) n; i++) {
+ ids[i] = first + i;
+ }
+}
+
+
+/**
+ * Determine if id names a vertex or fragment program.
+ * \note Not compiled into display lists.
+ * \note Called from both glIsProgramNV and glIsProgramARB.
+ * \param id is the program identifier
+ * \return GL_TRUE if id is a program, else GL_FALSE.
+ */
+GLboolean GLAPIENTRY
+_mesa_IsProgramARB(GLuint id)
+{
+ struct gl_program *prog = NULL;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (id == 0)
+ return GL_FALSE;
+
+ prog = _mesa_lookup_program(ctx, id);
+ if (prog && (prog != &_mesa_DummyProgram))
+ return GL_TRUE;
+ else
+ return GL_FALSE;
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
+ const GLvoid *string)
+{
+ struct gl_program *base;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ if (!ctx->Extensions.ARB_vertex_program
+ && !ctx->Extensions.ARB_fragment_program) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramStringARB()");
+ return;
+ }
+
+ if (format != GL_PROGRAM_FORMAT_ASCII_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
+ return;
+ }
+
+ /* The first couple cases are complicated. The same enum value is used for
+ * ARB and NV vertex programs. If the target is a vertex program, parse it
+ * using the ARB grammar if the string starts with "!!ARB" or if
+ * NV_vertex_program is not supported.
+ */
+ if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program
+ && ((strncmp(string, "!!ARB", 5) == 0)
+ || !ctx->Extensions.NV_vertex_program)) {
+ struct gl_vertex_program *prog = ctx->VertexProgram.Current;
+ _mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
+ }
+ else if ((target == GL_VERTEX_PROGRAM_ARB
+ || target == GL_VERTEX_STATE_PROGRAM_NV)
+ && ctx->Extensions.NV_vertex_program) {
+ struct gl_vertex_program *prog = ctx->VertexProgram.Current;
+ _mesa_parse_nv_vertex_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
+ _mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) {
+ struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
+ _mesa_parse_nv_fragment_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
+ return;
+ }
+
+ if (ctx->Program.ErrorPos == -1) {
+ /* finally, give the program to the driver for translation/checking */
+ if (!ctx->Driver.ProgramStringNotify(ctx, target, base)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glProgramStringARB(rejected by driver");
+ }
+ }
+}
+
+
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterdNV)
+ */
+void GLAPIENTRY
+_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
+ (GLfloat) z, (GLfloat) w);
+}
+
+
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterdvNV)
+ */
+void GLAPIENTRY
+_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
+ const GLdouble *params)
+{
+ _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) params[0],
+ (GLfloat) params[1], (GLfloat) params[2],
+ (GLfloat) params[3]);
+}
+
+
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterfNV)
+ */
+void GLAPIENTRY
+_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ if (index >= ctx->Const.FragmentProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
+ return;
+ }
+ ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w);
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB /* == GL_VERTEX_PROGRAM_NV */
+ && (ctx->Extensions.ARB_vertex_program || ctx->Extensions.NV_vertex_program)) {
+ if (index >= ctx->Const.VertexProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
+ return;
+ }
+ ASSIGN_4V(ctx->VertexProgram.Parameters[index], x, y, z, w);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramEnvParameter(target)");
+ return;
+ }
+}
+
+
+
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterfvNV)
+ */
+void GLAPIENTRY
+_mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
+ const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ if (index >= ctx->Const.FragmentProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter4fv(index)");
+ return;
+ }
+ memcpy(ctx->FragmentProgram.Parameters[index], params,
+ 4 * sizeof(GLfloat));
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB /* == GL_VERTEX_PROGRAM_NV */
+ && (ctx->Extensions.ARB_vertex_program || ctx->Extensions.NV_vertex_program)) {
+ if (index >= ctx->Const.VertexProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter4fv(index)");
+ return;
+ }
+ memcpy(ctx->VertexProgram.Parameters[index], params,
+ 4 * sizeof(GLfloat));
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramEnvParameter4fv(target)");
+ return;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
+ const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat * dest;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ if (count <= 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameters4fv(count)");
+ }
+
+ if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ if ((index + count) > ctx->Const.FragmentProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameters4fv(index + count)");
+ return;
+ }
+ dest = ctx->FragmentProgram.Parameters[index];
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ if ((index + count) > ctx->Const.VertexProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameters4fv(index + count)");
+ return;
+ }
+ dest = ctx->VertexProgram.Parameters[index];
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramEnvParameters4fv(target)");
+ return;
+ }
+
+ memcpy(dest, params, count * 4 * sizeof(GLfloat));
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
+ GLdouble *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat fparams[4];
+
+ _mesa_GetProgramEnvParameterfvARB(target, index, fparams);
+ if (ctx->ErrorValue == GL_NO_ERROR) {
+ params[0] = fparams[0];
+ params[1] = fparams[1];
+ params[2] = fparams[2];
+ params[3] = fparams[3];
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
+ GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ if (index >= ctx->Const.FragmentProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramEnvParameter(index)");
+ return;
+ }
+ COPY_4V(params, ctx->FragmentProgram.Parameters[index]);
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ if (index >= ctx->Const.VertexProgram.MaxEnvParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramEnvParameter(index)");
+ return;
+ }
+ COPY_4V(params, ctx->VertexProgram.Parameters[index]);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramEnvParameter(target)");
+ return;
+ }
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_program *prog;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ if ((target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) ||
+ (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program)) {
+ if (index >= ctx->Const.FragmentProgram.MaxLocalParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameterARB");
+ return;
+ }
+ prog = &(ctx->FragmentProgram.Current->Base);
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ if (index >= ctx->Const.VertexProgram.MaxLocalParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameterARB");
+ return;
+ }
+ prog = &(ctx->VertexProgram.Current->Base);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramLocalParameterARB");
+ return;
+ }
+
+ ASSERT(index < MAX_PROGRAM_LOCAL_PARAMS);
+ prog->LocalParams[index][0] = x;
+ prog->LocalParams[index][1] = y;
+ prog->LocalParams[index][2] = z;
+ prog->LocalParams[index][3] = w;
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
+ const GLfloat *params)
+{
+ _mesa_ProgramLocalParameter4fARB(target, index, params[0], params[1],
+ params[2], params[3]);
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
+ const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat *dest;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ if (count <= 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fv(count)");
+ }
+
+ if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ if ((index + count) > ctx->Const.FragmentProgram.MaxLocalParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)");
+ return;
+ }
+ dest = ctx->FragmentProgram.Current->Base.LocalParams[index];
+ }
+ else if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ if ((index + count) > ctx->Const.VertexProgram.MaxLocalParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)");
+ return;
+ }
+ dest = ctx->VertexProgram.Current->Base.LocalParams[index];
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramLocalParameters4fvEXT(target)");
+ return;
+ }
+
+ memcpy(dest, params, count * 4 * sizeof(GLfloat));
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
+ GLdouble x, GLdouble y,
+ GLdouble z, GLdouble w)
+{
+ _mesa_ProgramLocalParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
+ (GLfloat) z, (GLfloat) w);
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
+ const GLdouble *params)
+{
+ _mesa_ProgramLocalParameter4fARB(target, index,
+ (GLfloat) params[0], (GLfloat) params[1],
+ (GLfloat) params[2], (GLfloat) params[3]);
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
+ GLfloat *params)
+{
+ const struct gl_program *prog;
+ GLuint maxParams;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ prog = &(ctx->VertexProgram.Current->Base);
+ maxParams = ctx->Const.VertexProgram.MaxLocalParams;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ prog = &(ctx->FragmentProgram.Current->Base);
+ maxParams = ctx->Const.FragmentProgram.MaxLocalParams;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) {
+ prog = &(ctx->FragmentProgram.Current->Base);
+ maxParams = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetProgramLocalParameterARB(target)");
+ return;
+ }
+
+ if (index >= maxParams) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetProgramLocalParameterARB(index)");
+ return;
+ }
+
+ ASSERT(prog);
+ ASSERT(index < MAX_PROGRAM_LOCAL_PARAMS);
+ COPY_4V(params, prog->LocalParams[index]);
+}
+
+
+/**
+ * Note, this function is also used by the GL_NV_fragment_program extension.
+ */
+void GLAPIENTRY
+_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
+ GLdouble *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat floatParams[4];
+ ASSIGN_4V(floatParams, 0.0F, 0.0F, 0.0F, 0.0F);
+ _mesa_GetProgramLocalParameterfvARB(target, index, floatParams);
+ if (ctx->ErrorValue == GL_NO_ERROR) {
+ COPY_4V(params, floatParams);
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
+{
+ const struct gl_program_constants *limits;
+ struct gl_program *prog;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_ARB
+ && ctx->Extensions.ARB_vertex_program) {
+ prog = &(ctx->VertexProgram.Current->Base);
+ limits = &ctx->Const.VertexProgram;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ prog = &(ctx->FragmentProgram.Current->Base);
+ limits = &ctx->Const.FragmentProgram;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(target)");
+ return;
+ }
+
+ ASSERT(prog);
+ ASSERT(limits);
+
+ /* Queries supported for both vertex and fragment programs */
+ switch (pname) {
+ case GL_PROGRAM_LENGTH_ARB:
+ *params
+ = prog->String ? (GLint) strlen((char *) prog->String) : 0;
+ return;
+ case GL_PROGRAM_FORMAT_ARB:
+ *params = prog->Format;
+ return;
+ case GL_PROGRAM_BINDING_ARB:
+ *params = prog->Id;
+ return;
+ case GL_PROGRAM_INSTRUCTIONS_ARB:
+ *params = prog->NumInstructions;
+ return;
+ case GL_MAX_PROGRAM_INSTRUCTIONS_ARB:
+ *params = limits->MaxInstructions;
+ return;
+ case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
+ *params = prog->NumNativeInstructions;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
+ *params = limits->MaxNativeInstructions;
+ return;
+ case GL_PROGRAM_TEMPORARIES_ARB:
+ *params = prog->NumTemporaries;
+ return;
+ case GL_MAX_PROGRAM_TEMPORARIES_ARB:
+ *params = limits->MaxTemps;
+ return;
+ case GL_PROGRAM_NATIVE_TEMPORARIES_ARB:
+ *params = prog->NumNativeTemporaries;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB:
+ *params = limits->MaxNativeTemps;
+ return;
+ case GL_PROGRAM_PARAMETERS_ARB:
+ *params = prog->NumParameters;
+ return;
+ case GL_MAX_PROGRAM_PARAMETERS_ARB:
+ *params = limits->MaxParameters;
+ return;
+ case GL_PROGRAM_NATIVE_PARAMETERS_ARB:
+ *params = prog->NumNativeParameters;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB:
+ *params = limits->MaxNativeParameters;
+ return;
+ case GL_PROGRAM_ATTRIBS_ARB:
+ *params = prog->NumAttributes;
+ return;
+ case GL_MAX_PROGRAM_ATTRIBS_ARB:
+ *params = limits->MaxAttribs;
+ return;
+ case GL_PROGRAM_NATIVE_ATTRIBS_ARB:
+ *params = prog->NumNativeAttributes;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB:
+ *params = limits->MaxNativeAttribs;
+ return;
+ case GL_PROGRAM_ADDRESS_REGISTERS_ARB:
+ *params = prog->NumAddressRegs;
+ return;
+ case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB:
+ *params = limits->MaxAddressRegs;
+ return;
+ case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
+ *params = prog->NumNativeAddressRegs;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
+ *params = limits->MaxNativeAddressRegs;
+ return;
+ case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB:
+ *params = limits->MaxLocalParams;
+ return;
+ case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB:
+ *params = limits->MaxEnvParams;
+ return;
+ case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
+ /*
+ * XXX we may not really need a driver callback here.
+ * If the number of native instructions, registers, etc. used
+ * are all below the maximums, we could return true.
+ * The spec says that even if this query returns true, there's
+ * no guarantee that the program will run in hardware.
+ */
+ if (prog->Id == 0) {
+ /* default/null program */
+ *params = GL_FALSE;
+ }
+ else if (ctx->Driver.IsProgramNative) {
+ /* ask the driver */
+ *params = ctx->Driver.IsProgramNative( ctx, target, prog );
+ }
+ else {
+ /* probably running in software */
+ *params = GL_TRUE;
+ }
+ return;
+ default:
+ /* continue with fragment-program only queries below */
+ break;
+ }
+
+ /*
+ * The following apply to fragment programs only (at this time)
+ */
+ if (target == GL_FRAGMENT_PROGRAM_ARB) {
+ const struct gl_fragment_program *fp = ctx->FragmentProgram.Current;
+ switch (pname) {
+ case GL_PROGRAM_ALU_INSTRUCTIONS_ARB:
+ *params = fp->Base.NumNativeAluInstructions;
+ return;
+ case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
+ *params = fp->Base.NumAluInstructions;
+ return;
+ case GL_PROGRAM_TEX_INSTRUCTIONS_ARB:
+ *params = fp->Base.NumTexInstructions;
+ return;
+ case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
+ *params = fp->Base.NumNativeTexInstructions;
+ return;
+ case GL_PROGRAM_TEX_INDIRECTIONS_ARB:
+ *params = fp->Base.NumTexIndirections;
+ return;
+ case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
+ *params = fp->Base.NumNativeTexIndirections;
+ return;
+ case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB:
+ *params = limits->MaxAluInstructions;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
+ *params = limits->MaxNativeAluInstructions;
+ return;
+ case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB:
+ *params = limits->MaxTexInstructions;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
+ *params = limits->MaxNativeTexInstructions;
+ return;
+ case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB:
+ *params = limits->MaxTexIndirections;
+ return;
+ case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
+ *params = limits->MaxNativeTexIndirections;
+ return;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
+ return;
+ }
+ } else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
+ return;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string)
+{
+ const struct gl_program *prog;
+ char *dst = (char *) string;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_ARB) {
+ prog = &(ctx->VertexProgram.Current->Base);
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_ARB) {
+ prog = &(ctx->FragmentProgram.Current->Base);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramStringARB(target)");
+ return;
+ }
+
+ ASSERT(prog);
+
+ if (pname != GL_PROGRAM_STRING_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramStringARB(pname)");
+ return;
+ }
+
+ if (prog->String)
+ memcpy(dst, prog->String, strlen((char *) prog->String));
+ else
+ *dst = '\0';
+}
diff --git a/mesalib/src/mesa/main/arbprogram.h b/mesalib/src/mesa/main/arbprogram.h
new file mode 100644
index 000000000..e2e535e91
--- /dev/null
+++ b/mesalib/src/mesa/main/arbprogram.h
@@ -0,0 +1,131 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.2
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef ARBPROGRAM_H
+#define ARBPROGRAM_H
+
+
+#include "glheader.h"
+
+
+extern void GLAPIENTRY
+_mesa_BindProgram(GLenum target, GLuint id);
+
+extern void GLAPIENTRY
+_mesa_DeletePrograms(GLsizei n, const GLuint *ids);
+
+extern void GLAPIENTRY
+_mesa_GenPrograms(GLsizei n, GLuint *ids);
+
+
+extern GLboolean GLAPIENTRY
+_mesa_IsProgramARB(GLuint id);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
+ const GLvoid *string);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
+ const GLdouble *params);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
+ const GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
+ const GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
+ GLdouble x, GLdouble y,
+ GLdouble z, GLdouble w);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
+ const GLdouble *params);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
+ const GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
+ const GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
+ GLdouble *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
+ GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
+ GLdouble *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
+ GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string);
+
+
+#endif
diff --git a/mesalib/src/mesa/main/arrayobj.h b/mesalib/src/mesa/main/arrayobj.h
index 8999edc72..fdf7e2bca 100644
--- a/mesalib/src/mesa/main/arrayobj.h
+++ b/mesalib/src/mesa/main/arrayobj.h
@@ -28,7 +28,7 @@
#ifndef ARRAYOBJ_H
#define ARRAYOBJ_H
-#include "context.h"
+#include "mtypes.h"
/**
* \file arrayobj.h
diff --git a/mesalib/src/mesa/main/atifragshader.c b/mesalib/src/mesa/main/atifragshader.c
new file mode 100644
index 000000000..550f50b7a
--- /dev/null
+++ b/mesalib/src/mesa/main/atifragshader.c
@@ -0,0 +1,794 @@
+/**
+ * \file atifragshader.c
+ * \author David Airlie
+ * Copyright (C) 2004 David Airlie All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * DAVID AIRLIE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/hash.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/enums.h"
+#include "main/mtypes.h"
+#include "main/dispatch.h"
+#include "main/atifragshader.h"
+
+#if FEATURE_ATI_fragment_shader
+
+#define MESA_DEBUG_ATI_FS 0
+
+static struct ati_fragment_shader DummyShader;
+
+
+void
+_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
+{
+ SET_GenFragmentShadersATI(disp, _mesa_GenFragmentShadersATI);
+ SET_BindFragmentShaderATI(disp, _mesa_BindFragmentShaderATI);
+ SET_DeleteFragmentShaderATI(disp, _mesa_DeleteFragmentShaderATI);
+ SET_BeginFragmentShaderATI(disp, _mesa_BeginFragmentShaderATI);
+ SET_EndFragmentShaderATI(disp, _mesa_EndFragmentShaderATI);
+ SET_PassTexCoordATI(disp, _mesa_PassTexCoordATI);
+ SET_SampleMapATI(disp, _mesa_SampleMapATI);
+ SET_ColorFragmentOp1ATI(disp, _mesa_ColorFragmentOp1ATI);
+ SET_ColorFragmentOp2ATI(disp, _mesa_ColorFragmentOp2ATI);
+ SET_ColorFragmentOp3ATI(disp, _mesa_ColorFragmentOp3ATI);
+ SET_AlphaFragmentOp1ATI(disp, _mesa_AlphaFragmentOp1ATI);
+ SET_AlphaFragmentOp2ATI(disp, _mesa_AlphaFragmentOp2ATI);
+ SET_AlphaFragmentOp3ATI(disp, _mesa_AlphaFragmentOp3ATI);
+ SET_SetFragmentShaderConstantATI(disp, _mesa_SetFragmentShaderConstantATI);
+}
+
+
+/**
+ * Allocate and initialize a new ATI fragment shader object.
+ */
+struct ati_fragment_shader *
+_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id)
+{
+ struct ati_fragment_shader *s = CALLOC_STRUCT(ati_fragment_shader);
+ (void) ctx;
+ if (s) {
+ s->Id = id;
+ s->RefCount = 1;
+ }
+ return s;
+}
+
+
+/**
+ * Delete the given ati fragment shader
+ */
+void
+_mesa_delete_ati_fragment_shader(GLcontext *ctx, struct ati_fragment_shader *s)
+{
+ GLuint i;
+ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) {
+ if (s->Instructions[i])
+ free(s->Instructions[i]);
+ if (s->SetupInst[i])
+ free(s->SetupInst[i]);
+ }
+ free(s);
+}
+
+
+
+static void
+new_arith_inst(struct ati_fragment_shader *prog)
+{
+/* set "default" instruction as not all may get defined.
+ there is no specified way to express a nop with ati fragment shaders we use
+ GL_NONE as the op enum and just set some params to 0 - so nothing to do here */
+ prog->numArithInstr[prog->cur_pass >> 1]++;
+}
+
+static void
+new_tex_inst(struct ati_fragment_shader *prog)
+{
+}
+
+static void match_pair_inst(struct ati_fragment_shader *curProg, GLuint optype)
+{
+ if (optype == curProg->last_optype) {
+ curProg->last_optype = 1;
+ }
+}
+
+#if MESA_DEBUG_ATI_FS
+static char *
+create_dst_mod_str(GLuint mod)
+{
+ static char ret_str[1024];
+
+ memset(ret_str, 0, 1024);
+ if (mod & GL_2X_BIT_ATI)
+ strncat(ret_str, "|2X", 1024);
+
+ if (mod & GL_4X_BIT_ATI)
+ strncat(ret_str, "|4X", 1024);
+
+ if (mod & GL_8X_BIT_ATI)
+ strncat(ret_str, "|8X", 1024);
+ if (mod & GL_HALF_BIT_ATI)
+ strncat(ret_str, "|HA", 1024);
+ if (mod & GL_QUARTER_BIT_ATI)
+ strncat(ret_str, "|QU", 1024);
+ if (mod & GL_EIGHTH_BIT_ATI)
+ strncat(ret_str, "|EI", 1024);
+
+ if (mod & GL_SATURATE_BIT_ATI)
+ strncat(ret_str, "|SAT", 1024);
+
+ if (strlen(ret_str) == 0)
+ strncat(ret_str, "NONE", 1024);
+ return ret_str;
+}
+
+static char *atifs_ops[] = {"ColorFragmentOp1ATI", "ColorFragmentOp2ATI", "ColorFragmentOp3ATI",
+ "AlphaFragmentOp1ATI", "AlphaFragmentOp2ATI", "AlphaFragmentOp3ATI" };
+
+static void debug_op(GLint optype, GLuint arg_count, GLenum op, GLuint dst,
+ GLuint dstMask, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod, GLuint arg3,
+ GLuint arg3Rep, GLuint arg3Mod)
+{
+ char *op_name;
+
+ op_name = atifs_ops[(arg_count-1)+(optype?3:0)];
+
+ fprintf(stderr, "%s(%s, %s", op_name, _mesa_lookup_enum_by_nr(op),
+ _mesa_lookup_enum_by_nr(dst));
+ if (!optype)
+ fprintf(stderr, ", %d", dstMask);
+
+ fprintf(stderr, ", %s", create_dst_mod_str(dstMod));
+
+ fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg1),
+ _mesa_lookup_enum_by_nr(arg1Rep), arg1Mod);
+ if (arg_count>1)
+ fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg2),
+ _mesa_lookup_enum_by_nr(arg2Rep), arg2Mod);
+ if (arg_count>2)
+ fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg3),
+ _mesa_lookup_enum_by_nr(arg3Rep), arg3Mod);
+
+ fprintf(stderr,")\n");
+
+}
+#endif
+
+static int check_arith_arg(struct ati_fragment_shader *curProg,
+ GLuint optype, GLuint arg, GLuint argRep)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (((arg < GL_CON_0_ATI) || (arg > GL_CON_7_ATI)) &&
+ ((arg < GL_REG_0_ATI) || (arg > GL_REG_5_ATI)) &&
+ (arg != GL_ZERO) && (arg != GL_ONE) &&
+ (arg != GL_PRIMARY_COLOR_ARB) && (arg != GL_SECONDARY_INTERPOLATOR_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "C/AFragmentOpATI(arg)");
+ return 0;
+ }
+ if ((arg == GL_SECONDARY_INTERPOLATOR_ATI) && (((optype == 0) && (argRep == GL_ALPHA)) ||
+ ((optype == 1) && ((arg == GL_ALPHA) || (argRep == GL_NONE))))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(sec_interp)");
+ return 0;
+ }
+ if ((arg == GL_SECONDARY_INTERPOLATOR_ATI) && (((optype == 0) && (argRep == GL_ALPHA)) ||
+ ((optype == 1) && ((arg == GL_ALPHA) || (argRep == GL_NONE))))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(sec_interp)");
+ return 0;
+ }
+ if ((curProg->cur_pass == 1) &&
+ ((arg == GL_PRIMARY_COLOR_ARB) || (arg == GL_SECONDARY_INTERPOLATOR_ATI))) {
+ curProg->interpinp1 = GL_TRUE;
+ }
+ return 1;
+}
+
+GLuint GLAPIENTRY
+_mesa_GenFragmentShadersATI(GLuint range)
+{
+ GLuint first;
+ GLuint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (range == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenFragmentShadersATI(range)");
+ return 0;
+ }
+
+ if (ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGenFragmentShadersATI(insideShader)");
+ return 0;
+ }
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->ATIShaders, range);
+ for (i = 0; i < range; i++) {
+ _mesa_HashInsert(ctx->Shared->ATIShaders, first + i, &DummyShader);
+ }
+
+ return first;
+}
+
+void GLAPIENTRY
+_mesa_BindFragmentShaderATI(GLuint id)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+ struct ati_fragment_shader *newProg;
+
+ if (ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindFragmentShaderATI(insideShader)");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ if (curProg->Id == id) {
+ return;
+ }
+
+ /* unbind current */
+ if (curProg->Id != 0) {
+ curProg->RefCount--;
+ if (curProg->RefCount <= 0) {
+ _mesa_HashRemove(ctx->Shared->ATIShaders, id);
+ }
+ }
+
+ /* find new shader */
+ if (id == 0) {
+ newProg = ctx->Shared->DefaultFragmentShader;
+ }
+ else {
+ newProg = (struct ati_fragment_shader *)
+ _mesa_HashLookup(ctx->Shared->ATIShaders, id);
+ if (!newProg || newProg == &DummyShader) {
+ /* allocate a new program now */
+ newProg = _mesa_new_ati_fragment_shader(ctx, id);
+ if (!newProg) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindFragmentShaderATI");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->ATIShaders, id, newProg);
+ }
+
+ }
+
+ /* do actual bind */
+ ctx->ATIFragmentShader.Current = newProg;
+
+ ASSERT(ctx->ATIFragmentShader.Current);
+ if (newProg)
+ newProg->RefCount++;
+
+ /*if (ctx->Driver.BindProgram)
+ ctx->Driver.BindProgram(ctx, target, prog); */
+}
+
+void GLAPIENTRY
+_mesa_DeleteFragmentShaderATI(GLuint id)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteFragmentShaderATI(insideShader)");
+ return;
+ }
+
+ if (id != 0) {
+ struct ati_fragment_shader *prog = (struct ati_fragment_shader *)
+ _mesa_HashLookup(ctx->Shared->ATIShaders, id);
+ if (prog == &DummyShader) {
+ _mesa_HashRemove(ctx->Shared->ATIShaders, id);
+ }
+ else if (prog) {
+ if (ctx->ATIFragmentShader.Current &&
+ ctx->ATIFragmentShader.Current->Id == id) {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ _mesa_BindFragmentShaderATI(0);
+ }
+ }
+
+ /* The ID is immediately available for re-use now */
+ _mesa_HashRemove(ctx->Shared->ATIShaders, id);
+ if (prog) {
+ prog->RefCount--;
+ if (prog->RefCount <= 0) {
+ free(prog);
+ }
+ }
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_BeginFragmentShaderATI(void)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginFragmentShaderATI(insideShader)");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ /* if the shader was already defined free instructions and get new ones
+ (or, could use the same mem but would need to reinitialize) */
+ /* no idea if it's allowed to redefine a shader */
+ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) {
+ if (ctx->ATIFragmentShader.Current->Instructions[i])
+ free(ctx->ATIFragmentShader.Current->Instructions[i]);
+ if (ctx->ATIFragmentShader.Current->SetupInst[i])
+ free(ctx->ATIFragmentShader.Current->SetupInst[i]);
+ }
+
+ /* malloc the instructions here - not sure if the best place but its
+ a start */
+ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) {
+ ctx->ATIFragmentShader.Current->Instructions[i] =
+ (struct atifs_instruction *)
+ calloc(1, sizeof(struct atifs_instruction) *
+ (MAX_NUM_INSTRUCTIONS_PER_PASS_ATI));
+ ctx->ATIFragmentShader.Current->SetupInst[i] =
+ (struct atifs_setupinst *)
+ calloc(1, sizeof(struct atifs_setupinst) *
+ (MAX_NUM_FRAGMENT_REGISTERS_ATI));
+ }
+
+/* can't rely on calloc for initialization as it's possible to redefine a shader (?) */
+ ctx->ATIFragmentShader.Current->LocalConstDef = 0;
+ ctx->ATIFragmentShader.Current->numArithInstr[0] = 0;
+ ctx->ATIFragmentShader.Current->numArithInstr[1] = 0;
+ ctx->ATIFragmentShader.Current->regsAssigned[0] = 0;
+ ctx->ATIFragmentShader.Current->regsAssigned[1] = 0;
+ ctx->ATIFragmentShader.Current->NumPasses = 0;
+ ctx->ATIFragmentShader.Current->cur_pass = 0;
+ ctx->ATIFragmentShader.Current->last_optype = 0;
+ ctx->ATIFragmentShader.Current->interpinp1 = GL_FALSE;
+ ctx->ATIFragmentShader.Current->isValid = GL_FALSE;
+ ctx->ATIFragmentShader.Current->swizzlerq = 0;
+ ctx->ATIFragmentShader.Compiling = 1;
+}
+
+void GLAPIENTRY
+_mesa_EndFragmentShaderATI(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+#if MESA_DEBUG_ATI_FS
+ GLint i, j;
+#endif
+
+ if (!ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glEndFragmentShaderATI(outsideShader)");
+ return;
+ }
+ if (curProg->interpinp1 && (ctx->ATIFragmentShader.Current->cur_pass > 1)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glEndFragmentShaderATI(interpinfirstpass)");
+ /* according to spec, DON'T return here */
+ }
+
+ match_pair_inst(curProg, 0);
+ ctx->ATIFragmentShader.Compiling = 0;
+ ctx->ATIFragmentShader.Current->isValid = GL_TRUE;
+ if ((ctx->ATIFragmentShader.Current->cur_pass == 0) ||
+ (ctx->ATIFragmentShader.Current->cur_pass == 2)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glEndFragmentShaderATI(noarithinst)");
+ }
+ if (ctx->ATIFragmentShader.Current->cur_pass > 1)
+ ctx->ATIFragmentShader.Current->NumPasses = 2;
+ else
+ ctx->ATIFragmentShader.Current->NumPasses = 1;
+
+ ctx->ATIFragmentShader.Current->cur_pass = 0;
+
+#if MESA_DEBUG_ATI_FS
+ for (j = 0; j < MAX_NUM_PASSES_ATI; j++) {
+ for (i = 0; i < MAX_NUM_FRAGMENT_REGISTERS_ATI; i++) {
+ GLuint op = curProg->SetupInst[j][i].Opcode;
+ const char *op_enum = op > 5 ? _mesa_lookup_enum_by_nr(op) : "0";
+ GLuint src = curProg->SetupInst[j][i].src;
+ GLuint swizzle = curProg->SetupInst[j][i].swizzle;
+ fprintf(stderr, "%2d %04X %s %d %04X\n", i, op, op_enum, src,
+ swizzle);
+ }
+ for (i = 0; i < curProg->numArithInstr[j]; i++) {
+ GLuint op0 = curProg->Instructions[j][i].Opcode[0];
+ GLuint op1 = curProg->Instructions[j][i].Opcode[1];
+ const char *op0_enum = op0 > 5 ? _mesa_lookup_enum_by_nr(op0) : "0";
+ const char *op1_enum = op1 > 5 ? _mesa_lookup_enum_by_nr(op1) : "0";
+ GLuint count0 = curProg->Instructions[j][i].ArgCount[0];
+ GLuint count1 = curProg->Instructions[j][i].ArgCount[1];
+ fprintf(stderr, "%2d %04X %s %d %04X %s %d\n", i, op0, op0_enum, count0,
+ op1, op1_enum, count1);
+ }
+ }
+#endif
+
+ if (!ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_SHADER_ATI, NULL)) {
+ ctx->ATIFragmentShader.Current->isValid = GL_FALSE;
+ /* XXX is this the right error? */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEndFragmentShaderATI(driver rejected shader)");
+ }
+}
+
+void GLAPIENTRY
+_mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+ struct atifs_setupinst *curI;
+
+ if (!ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(outsideShader)");
+ return;
+ }
+
+ if (curProg->cur_pass == 1) {
+ match_pair_inst(curProg, 0);
+ curProg->cur_pass = 2;
+ }
+ if ((curProg->cur_pass > 2) ||
+ ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[curProg->cur_pass >> 1])) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoord(pass)");
+ return;
+ }
+ if ((dst < GL_REG_0_ATI) || (dst > GL_REG_5_ATI) ||
+ ((dst - GL_REG_0_ATI) >= ctx->Const.MaxTextureUnits)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glPassTexCoordATI(dst)");
+ return;
+ }
+ if (((coord < GL_REG_0_ATI) || (coord > GL_REG_5_ATI)) &&
+ ((coord < GL_TEXTURE0_ARB) || (coord > GL_TEXTURE7_ARB) ||
+ ((coord - GL_TEXTURE0_ARB) >= ctx->Const.MaxTextureUnits))) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glPassTexCoordATI(coord)");
+ return;
+ }
+ if ((curProg->cur_pass == 0) && (coord >= GL_REG_0_ATI)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(coord)");
+ return;
+ }
+ if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glPassTexCoordATI(swizzle)");
+ return;
+ }
+ if ((swizzle & 1) && (coord >= GL_REG_0_ATI)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(swizzle)");
+ return;
+ }
+ if (coord <= GL_TEXTURE7_ARB) {
+ GLuint tmp = coord - GL_TEXTURE0_ARB;
+ if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) &&
+ (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(swizzle)");
+ return;
+ } else {
+ curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2));
+ }
+ }
+
+ curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI);
+ new_tex_inst(curProg);
+
+ /* add the instructions */
+ curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI];
+
+ curI->Opcode = ATI_FRAGMENT_SHADER_PASS_OP;
+ curI->src = coord;
+ curI->swizzle = swizzle;
+
+#if MESA_DEBUG_ATI_FS
+ _mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,
+ _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(coord),
+ _mesa_lookup_enum_by_nr(swizzle));
+#endif
+}
+
+void GLAPIENTRY
+_mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+ struct atifs_setupinst *curI;
+
+ if (!ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(outsideShader)");
+ return;
+ }
+
+ if (curProg->cur_pass == 1) {
+ match_pair_inst(curProg, 0);
+ curProg->cur_pass = 2;
+ }
+ if ((curProg->cur_pass > 2) ||
+ ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[curProg->cur_pass >> 1])) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(pass)");
+ return;
+ }
+ if ((dst < GL_REG_0_ATI) || (dst > GL_REG_5_ATI) ||
+ ((dst - GL_REG_0_ATI) >= ctx->Const.MaxTextureUnits)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glSampleMapATI(dst)");
+ return;
+ }
+ if (((interp < GL_REG_0_ATI) || (interp > GL_REG_5_ATI)) &&
+ ((interp < GL_TEXTURE0_ARB) || (interp > GL_TEXTURE7_ARB) ||
+ ((interp - GL_TEXTURE0_ARB) >= ctx->Const.MaxTextureUnits))) {
+ /* is this texture5 or texture7? spec is a bit unclear there */
+ _mesa_error(ctx, GL_INVALID_ENUM, "glSampleMapATI(interp)");
+ return;
+ }
+ if ((curProg->cur_pass == 0) && (interp >= GL_REG_0_ATI)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(interp)");
+ return;
+ }
+ if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glSampleMapATI(swizzle)");
+ return;
+ }
+ if ((swizzle & 1) && (interp >= GL_REG_0_ATI)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(swizzle)");
+ return;
+ }
+ if (interp <= GL_TEXTURE7_ARB) {
+ GLuint tmp = interp - GL_TEXTURE0_ARB;
+ if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) &&
+ (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(swizzle)");
+ return;
+ } else {
+ curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2));
+ }
+ }
+
+ curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI);
+ new_tex_inst(curProg);
+
+ /* add the instructions */
+ curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI];
+
+ curI->Opcode = ATI_FRAGMENT_SHADER_SAMPLE_OP;
+ curI->src = interp;
+ curI->swizzle = swizzle;
+
+#if MESA_DEBUG_ATI_FS
+ _mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,
+ _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(interp),
+ _mesa_lookup_enum_by_nr(swizzle));
+#endif
+}
+
+static void
+_mesa_FragmentOpXATI(GLint optype, GLuint arg_count, GLenum op, GLuint dst,
+ GLuint dstMask, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod, GLuint arg3,
+ GLuint arg3Rep, GLuint arg3Mod)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+ GLint ci;
+ struct atifs_instruction *curI;
+ GLuint modtemp = dstMod & ~GL_SATURATE_BIT_ATI;
+
+ if (!ctx->ATIFragmentShader.Compiling) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(outsideShader)");
+ return;
+ }
+
+ if (curProg->cur_pass==0)
+ curProg->cur_pass=1;
+
+ else if (curProg->cur_pass==2)
+ curProg->cur_pass=3;
+
+ /* decide whether this is a new instruction or not ... all color instructions are new,
+ and alpha instructions might also be new if there was no preceding color inst */
+ if ((optype == 0) || (curProg->last_optype == optype)) {
+ if (curProg->numArithInstr[curProg->cur_pass >> 1] > 7) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(instrCount)");
+ return;
+ }
+ /* easier to do that here slight side effect invalid instr will still be inserted as nops */
+ match_pair_inst(curProg, optype);
+ new_arith_inst(curProg);
+ }
+ curProg->last_optype = optype;
+ ci = curProg->numArithInstr[curProg->cur_pass >> 1] - 1;
+
+ /* add the instructions */
+ curI = &curProg->Instructions[curProg->cur_pass >> 1][ci];
+
+ /* error checking */
+ if ((dst < GL_REG_0_ATI) || (dst > GL_REG_5_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "C/AFragmentOpATI(dst)");
+ return;
+ }
+ if ((modtemp != GL_NONE) && (modtemp != GL_2X_BIT_ATI) &&
+ (modtemp != GL_4X_BIT_ATI) && (modtemp != GL_8X_BIT_ATI) &&
+ (modtemp != GL_HALF_BIT_ATI) && !(modtemp != GL_QUARTER_BIT_ATI) &&
+ (modtemp != GL_EIGHTH_BIT_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "C/AFragmentOpATI(dstMod)%x", modtemp);
+ return;
+ }
+ /* op checking? Actually looks like that's missing in the spec but we'll do it anyway */
+ if (((op < GL_ADD_ATI) || (op > GL_DOT2_ADD_ATI)) && !(op == GL_MOV_ATI)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "C/AFragmentOpATI(op)");
+ return;
+ }
+ if (optype == 1) {
+ if (((op == GL_DOT2_ADD_ATI) && (curI->Opcode[0] != GL_DOT2_ADD_ATI)) ||
+ ((op == GL_DOT3_ATI) && (curI->Opcode[0] != GL_DOT3_ATI)) ||
+ ((op == GL_DOT4_ATI) && (curI->Opcode[0] != GL_DOT4_ATI)) ||
+ ((op != GL_DOT4_ATI) && (curI->Opcode[0] == GL_DOT4_ATI))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "AFragmentOpATI(op)");
+ return;
+ }
+ }
+ if ((op == GL_DOT4_ATI) &&
+ (((arg1 == GL_SECONDARY_INTERPOLATOR_ATI) && ((arg1Rep == GL_ALPHA) || (arg1Rep == GL_NONE))) ||
+ (((arg2 == GL_SECONDARY_INTERPOLATOR_ATI) && ((arg2Rep == GL_ALPHA) || (arg2Rep == GL_NONE)))))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(sec_interp)");
+ }
+
+ if (!check_arith_arg(curProg, optype, arg1, arg1Rep)) {
+ return;
+ }
+ if (arg2) {
+ if (!check_arith_arg(curProg, optype, arg2, arg2Rep)) {
+ return;
+ }
+ }
+ if (arg3) {
+ if (!check_arith_arg(curProg, optype, arg3, arg3Rep)) {
+ return;
+ }
+ if ((arg1 >= GL_CON_0_ATI) && (arg1 <= GL_CON_7_ATI) &&
+ (arg2 >= GL_CON_0_ATI) && (arg2 <= GL_CON_7_ATI) &&
+ (arg3 >= GL_CON_0_ATI) && (arg3 <= GL_CON_7_ATI) &&
+ (arg1 != arg2) && (arg1 != arg3) && (arg2 != arg3)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "C/AFragmentOpATI(3Consts)");
+ return;
+ }
+ }
+
+ /* all ok - not all fully validated though (e.g. argNMod - spec doesn't say anything) */
+
+ curI->Opcode[optype] = op;
+ curI->SrcReg[optype][0].Index = arg1;
+ curI->SrcReg[optype][0].argRep = arg1Rep;
+ curI->SrcReg[optype][0].argMod = arg1Mod;
+ curI->ArgCount[optype] = arg_count;
+
+ if (arg2) {
+ curI->SrcReg[optype][1].Index = arg2;
+ curI->SrcReg[optype][1].argRep = arg2Rep;
+ curI->SrcReg[optype][1].argMod = arg2Mod;
+ }
+
+ if (arg3) {
+ curI->SrcReg[optype][2].Index = arg3;
+ curI->SrcReg[optype][2].argRep = arg3Rep;
+ curI->SrcReg[optype][2].argMod = arg3Mod;
+ }
+
+ curI->DstReg[optype].Index = dst;
+ curI->DstReg[optype].dstMod = dstMod;
+ curI->DstReg[optype].dstMask = dstMask;
+
+#if MESA_DEBUG_ATI_FS
+ debug_op(optype, arg_count, op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);
+#endif
+
+}
+
+void GLAPIENTRY
+_mesa_ColorFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_COLOR_OP, 1, op, dst, dstMask,
+ dstMod, arg1, arg1Rep, arg1Mod, 0, 0, 0, 0, 0, 0);
+}
+
+void GLAPIENTRY
+_mesa_ColorFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
+ GLuint arg2Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_COLOR_OP, 2, op, dst, dstMask,
+ dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep,
+ arg2Mod, 0, 0, 0);
+}
+
+void GLAPIENTRY
+_mesa_ColorFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
+ GLuint arg2Mod, GLuint arg3, GLuint arg3Rep,
+ GLuint arg3Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_COLOR_OP, 3, op, dst, dstMask,
+ dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep,
+ arg2Mod, arg3, arg3Rep, arg3Mod);
+}
+
+void GLAPIENTRY
+_mesa_AlphaFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_ALPHA_OP, 1, op, dst, 0, dstMod,
+ arg1, arg1Rep, arg1Mod, 0, 0, 0, 0, 0, 0);
+}
+
+void GLAPIENTRY
+_mesa_AlphaFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_ALPHA_OP, 2, op, dst, 0, dstMod,
+ arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, 0, 0,
+ 0);
+}
+
+void GLAPIENTRY
+_mesa_AlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod, GLuint arg3,
+ GLuint arg3Rep, GLuint arg3Mod)
+{
+ _mesa_FragmentOpXATI(ATI_FRAGMENT_SHADER_ALPHA_OP, 3, op, dst, 0, dstMod,
+ arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3,
+ arg3Rep, arg3Mod);
+}
+
+void GLAPIENTRY
+_mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value)
+{
+ GLuint dstindex;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if ((dst < GL_CON_0_ATI) || (dst > GL_CON_7_ATI)) {
+ /* spec says nothing about what should happen here but we can't just segfault...*/
+ _mesa_error(ctx, GL_INVALID_ENUM, "glSetFragmentShaderConstantATI(dst)");
+ return;
+ }
+
+ dstindex = dst - GL_CON_0_ATI;
+ if (ctx->ATIFragmentShader.Compiling) {
+ struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current;
+ COPY_4V(curProg->Constants[dstindex], value);
+ curProg->LocalConstDef |= 1 << dstindex;
+ }
+ else {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ COPY_4V(ctx->ATIFragmentShader.GlobalConstants[dstindex], value);
+ }
+}
+
+#endif /* FEATURE_ATI_fragment_shader */
diff --git a/mesalib/src/mesa/main/atifragshader.h b/mesalib/src/mesa/main/atifragshader.h
new file mode 100644
index 000000000..31c335ec8
--- /dev/null
+++ b/mesalib/src/mesa/main/atifragshader.h
@@ -0,0 +1,149 @@
+/*
+ * Mesa 3-D graphics library ATI Fragment Shader
+ *
+ * Copyright (C) 2004 David Airlie All Rights Reserved.
+ *
+ */
+
+#ifndef ATIFRAGSHADER_H
+#define ATIFRAGSHADER_H
+
+#include "main/mtypes.h"
+
+#define MAX_NUM_INSTRUCTIONS_PER_PASS_ATI 8
+#define MAX_NUM_PASSES_ATI 2
+#define MAX_NUM_FRAGMENT_REGISTERS_ATI 6
+
+struct ati_fs_opcode_st
+{
+ GLenum opcode;
+ GLint num_src_args;
+};
+
+extern struct ati_fs_opcode_st ati_fs_opcodes[];
+
+struct atifragshader_src_register
+{
+ GLuint Index;
+ GLuint argRep;
+ GLuint argMod;
+};
+
+struct atifragshader_dst_register
+{
+ GLuint Index;
+ GLuint dstMod;
+ GLuint dstMask;
+};
+
+#define ATI_FRAGMENT_SHADER_COLOR_OP 0
+#define ATI_FRAGMENT_SHADER_ALPHA_OP 1
+#define ATI_FRAGMENT_SHADER_PASS_OP 2
+#define ATI_FRAGMENT_SHADER_SAMPLE_OP 3
+
+/* two opcodes - one for color/one for alpha */
+/* up to three source registers for most ops */
+struct atifs_instruction
+{
+ GLenum Opcode[2];
+ GLuint ArgCount[2];
+ struct atifragshader_src_register SrcReg[2][3];
+ struct atifragshader_dst_register DstReg[2];
+};
+
+/* different from arithmetic shader instruction */
+struct atifs_setupinst
+{
+ GLenum Opcode;
+ GLuint src;
+ GLenum swizzle;
+};
+
+
+#if FEATURE_ATI_fragment_shader
+
+extern void
+_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp);
+
+extern struct ati_fragment_shader *
+_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id);
+
+extern void
+_mesa_delete_ati_fragment_shader(GLcontext *ctx,
+ struct ati_fragment_shader *s);
+
+
+extern GLuint GLAPIENTRY _mesa_GenFragmentShadersATI(GLuint range);
+
+extern void GLAPIENTRY _mesa_BindFragmentShaderATI(GLuint id);
+
+extern void GLAPIENTRY _mesa_DeleteFragmentShaderATI(GLuint id);
+
+extern void GLAPIENTRY _mesa_BeginFragmentShaderATI(void);
+
+extern void GLAPIENTRY _mesa_EndFragmentShaderATI(void);
+
+extern void GLAPIENTRY
+_mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle);
+
+extern void GLAPIENTRY
+_mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle);
+
+extern void GLAPIENTRY
+_mesa_ColorFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod);
+
+extern void GLAPIENTRY
+_mesa_ColorFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
+ GLuint arg2Mod);
+
+extern void GLAPIENTRY
+_mesa_ColorFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMask,
+ GLuint dstMod, GLuint arg1, GLuint arg1Rep,
+ GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
+ GLuint arg2Mod, GLuint arg3, GLuint arg3Rep,
+ GLuint arg3Mod);
+
+extern void GLAPIENTRY
+_mesa_AlphaFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod);
+
+extern void GLAPIENTRY
+_mesa_AlphaFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod);
+
+extern void GLAPIENTRY
+_mesa_AlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
+ GLuint arg1Rep, GLuint arg1Mod, GLuint arg2,
+ GLuint arg2Rep, GLuint arg2Mod, GLuint arg3,
+ GLuint arg3Rep, GLuint arg3Mod);
+
+extern void GLAPIENTRY
+_mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value);
+
+#else /* FEATURE_ATI_fragment_shader */
+
+static INLINE void
+_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
+{
+}
+
+static INLINE struct ati_fragment_shader *
+_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id)
+{
+ return NULL;
+}
+
+static INLINE void
+_mesa_delete_ati_fragment_shader(GLcontext *ctx,
+ struct ati_fragment_shader *s)
+{
+}
+
+#endif /* FEATURE_ATI_fragment_shader */
+
+#endif /* ATIFRAGSHADER_H */
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index 92fb8d289..753949be5 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -41,12 +41,12 @@
#include "hint.h"
#include "light.h"
#include "lines.h"
+#include "macros.h"
#include "matrix.h"
#include "multisample.h"
#include "points.h"
#include "polygon.h"
#include "scissor.h"
-#include "simple_list.h"
#include "stencil.h"
#include "texenv.h"
#include "texgen.h"
diff --git a/mesalib/src/mesa/main/attrib.h b/mesalib/src/mesa/main/attrib.h
index 6b48a1766..83b28a65b 100644
--- a/mesalib/src/mesa/main/attrib.h
+++ b/mesalib/src/mesa/main/attrib.h
@@ -48,6 +48,8 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp);
#else /* FEATURE_attrib_stack */
+#include "main/compiler.h"
+
static INLINE void
_mesa_PushClientAttrib( GLbitfield mask )
{
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index 56dfdae3d..b21654890 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -32,6 +32,7 @@
#include "glheader.h"
+#include "enums.h"
#include "hash.h"
#include "imports.h"
#include "image.h"
@@ -46,7 +47,7 @@
/*#define BOUNDS_CHECK*/
-#ifdef FEATURE_OES_mapbuffer
+#if FEATURE_OES_mapbuffer
#define DEFAULT_ACCESS GL_MAP_WRITE_BIT
#else
#define DEFAULT_ACCESS (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)
@@ -82,6 +83,13 @@ get_buffer_target(GLcontext *ctx, GLenum target)
return &ctx->CopyWriteBuffer;
}
break;
+#if FEATURE_EXT_transform_feedback
+ case GL_TRANSFORM_FEEDBACK_BUFFER:
+ if (ctx->Extensions.EXT_transform_feedback) {
+ return &ctx->TransformFeedback.CurrentBuffer;
+ }
+ break;
+#endif
default:
return NULL;
}
@@ -582,7 +590,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
bindTarget = get_buffer_target(ctx, target);
if (!bindTarget) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferARB(target 0x%x)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferARB(target 0x%x)", target);
return;
}
@@ -1376,31 +1384,49 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
bufObj = get_buffer(ctx, target);
if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_ENUM, "GetBufferParameterivARB(target)" );
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(target)" );
return;
}
if (!_mesa_is_bufferobj(bufObj)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "GetBufferParameterivARB" );
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetBufferParameterivARB" );
return;
}
switch (pname) {
case GL_BUFFER_SIZE_ARB:
*params = (GLint) bufObj->Size;
- break;
+ return;
case GL_BUFFER_USAGE_ARB:
*params = bufObj->Usage;
- break;
+ return;
case GL_BUFFER_ACCESS_ARB:
*params = simplified_access_mode(bufObj->AccessFlags);
- break;
+ return;
case GL_BUFFER_MAPPED_ARB:
*params = _mesa_bufferobj_mapped(bufObj);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname)");
return;
+ case GL_BUFFER_ACCESS_FLAGS:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = bufObj->AccessFlags;
+ return;
+ case GL_BUFFER_MAP_OFFSET:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = (GLint) bufObj->Offset;
+ return;
+ case GL_BUFFER_MAP_LENGTH:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = (GLint) bufObj->Length;
+ return;
+ default:
+ ; /* fall-through */
}
+
+invalid_pname:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
}
@@ -1418,31 +1444,49 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
bufObj = get_buffer(ctx, target);
if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_ENUM, "GetBufferParameteri64v(target)" );
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(target)" );
return;
}
if (!_mesa_is_bufferobj(bufObj)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "GetBufferParameteri64v" );
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetBufferParameteri64v" );
return;
}
switch (pname) {
case GL_BUFFER_SIZE_ARB:
*params = bufObj->Size;
- break;
+ return;
case GL_BUFFER_USAGE_ARB:
*params = bufObj->Usage;
- break;
+ return;
case GL_BUFFER_ACCESS_ARB:
*params = simplified_access_mode(bufObj->AccessFlags);
- break;
+ return;
+ case GL_BUFFER_ACCESS_FLAGS:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = bufObj->AccessFlags;
+ return;
case GL_BUFFER_MAPPED_ARB:
*params = _mesa_bufferobj_mapped(bufObj);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname)");
return;
+ case GL_BUFFER_MAP_OFFSET:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = bufObj->Offset;
+ return;
+ case GL_BUFFER_MAP_LENGTH:
+ if (ctx->VersionMajor < 3)
+ goto invalid_pname;
+ *params = bufObj->Length;
+ return;
+ default:
+ ; /* fall-through */
}
+
+invalid_pname:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
}
@@ -1509,27 +1553,27 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
if (readOffset < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyBuffserSubData(readOffset = %d)", readOffset);
+ "glCopyBuffserSubData(readOffset = %d)", (int) readOffset);
return;
}
if (writeOffset < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyBuffserSubData(writeOffset = %d)", writeOffset);
+ "glCopyBuffserSubData(writeOffset = %d)", (int) writeOffset);
return;
}
if (readOffset + size > src->Size) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyBuffserSubData(readOffset + size = %d)",
- readOffset, size);
+ (int) (readOffset + size));
return;
}
if (writeOffset + size > dst->Size) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyBuffserSubData(writeOffset + size = %d)",
- writeOffset, size);
+ (int) (writeOffset + size));
return;
}
@@ -1573,13 +1617,13 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length,
if (offset < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glMapBufferRange(offset = %ld)", offset);
+ "glMapBufferRange(offset = %ld)", (long)offset);
return NULL;
}
if (length < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glMapBufferRange(length = %ld)", length);
+ "glMapBufferRange(length = %ld)", (long)length);
return NULL;
}
@@ -1664,13 +1708,13 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
if (offset < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glMapBufferRange(offset = %ld)", offset);
+ "glMapBufferRange(offset = %ld)", (long)offset);
return;
}
if (length < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glMapBufferRange(length = %ld)", length);
+ "glMapBufferRange(length = %ld)", (long)length);
return;
}
@@ -1702,8 +1746,8 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
if (offset + length > bufObj->Length) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glMapBufferRange(offset %ld + length %ld > mapped length %ld)",
- offset, length, bufObj->Length);
+ "glMapBufferRange(offset %ld + length %ld > mapped length %ld)",
+ (long)offset, (long)length, (long)bufObj->Length);
return;
}
@@ -1880,7 +1924,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
bufObj->Purgeable = GL_FALSE;
- retval = GL_RETAINED_APPLE;
+ retval = option;
if (ctx->Driver.BufferObjectUnpurgeable)
retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option);
@@ -1910,11 +1954,11 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
bufObj->Purgeable = GL_FALSE;
- retval = GL_RETAINED_APPLE;
+ retval = option;
if (ctx->Driver.RenderObjectUnpurgeable)
retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option);
- return option;
+ return retval;
}
@@ -1940,7 +1984,7 @@ _mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
bufObj->Purgeable = GL_FALSE;
- retval = GL_RETAINED_APPLE;
+ retval = option;
if (ctx->Driver.TextureObjectUnpurgeable)
retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option);
diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h
index 912529cfd..f234d06c6 100644
--- a/mesalib/src/mesa/main/bufferobj.h
+++ b/mesalib/src/mesa/main/bufferobj.h
@@ -29,7 +29,7 @@
#define BUFFEROBJ_H
-#include "context.h"
+#include "mtypes.h"
/*
diff --git a/mesalib/src/mesa/main/clear.c b/mesalib/src/mesa/main/clear.c
index e76ab5527..49d86b3b1 100644
--- a/mesalib/src/mesa/main/clear.c
+++ b/mesalib/src/mesa/main/clear.c
@@ -35,6 +35,7 @@
#include "context.h"
#include "colormac.h"
#include "enums.h"
+#include "macros.h"
#include "state.h"
diff --git a/mesalib/src/mesa/main/clear.h b/mesalib/src/mesa/main/clear.h
index 4c78eeda4..6657370c4 100644
--- a/mesalib/src/mesa/main/clear.h
+++ b/mesalib/src/mesa/main/clear.h
@@ -27,7 +27,7 @@
#define CLEAR_H
-#include "main/mtypes.h"
+#include "glheader.h"
extern void GLAPIENTRY
diff --git a/mesalib/src/mesa/main/clip.h b/mesalib/src/mesa/main/clip.h
index d53afb45b..ac472d66e 100644
--- a/mesalib/src/mesa/main/clip.h
+++ b/mesalib/src/mesa/main/clip.h
@@ -31,7 +31,7 @@
#ifndef CLIP_H
#define CLIP_H
-#include "mtypes.h"
+#include "glheader.h"
extern void GLAPIENTRY
_mesa_ClipPlane( GLenum plane, const GLdouble *equation );
diff --git a/mesalib/src/mesa/main/colormac.h b/mesalib/src/mesa/main/colormac.h
index 905f4e228..245fb658b 100644
--- a/mesalib/src/mesa/main/colormac.h
+++ b/mesalib/src/mesa/main/colormac.h
@@ -33,9 +33,9 @@
#define COLORMAC_H
-#include "imports.h"
#include "config.h"
#include "macros.h"
+#include "mtypes.h"
/** \def BYTE_TO_CHAN
diff --git a/mesalib/src/mesa/main/colortab.h b/mesalib/src/mesa/main/colortab.h
index 652fb5824..303c9fb30 100644
--- a/mesalib/src/mesa/main/colortab.h
+++ b/mesalib/src/mesa/main/colortab.h
@@ -31,13 +31,6 @@
#if FEATURE_colortable
-#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) \
- do { \
- (driver)->CopyColorTable = impl ## CopyColorTable; \
- (driver)->CopyColorSubTable = impl ## CopyColorSubTable; \
- (driver)->UpdateTexturePalette = impl ## UpdateTexturePalette; \
- } while (0)
-
extern void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
GLsizei width, GLenum format, GLenum type,
@@ -53,7 +46,7 @@ _mesa_init_colortable_dispatch(struct _glapi_table *disp);
#else /* FEATURE_colortable */
-#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0)
+#include "main/compiler.h"
static INLINE void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index 81704ae2c..800eb8390 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -65,9 +65,7 @@ extern "C" {
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
-# ifndef __eglplatform_h_
- typedef __int32 int32_t;
-# endif
+ typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
@@ -200,6 +198,13 @@ extern "C" {
# define __builtin_expect(x, y) x
#endif
+#ifdef __GNUC__
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#else
+#define likely(x) !!(x)
+#define unlikely(x) !!(x)
+#endif
/**
* The __FUNCTION__ gcc variable is generally only used for debugging.
@@ -219,6 +224,18 @@ extern "C" {
# endif
# endif
#endif
+#ifndef __func__
+# if (__STDC_VERSION__ >= 199901L) || \
+ (defined(__SUNPRO_C) && defined(__C99FEATURES__))
+ /* __func__ is part of C99 */
+# elif defined(_MSC_VER)
+# if _MSC_VER >= 1300
+# define __func__ __FUNCTION__
+# else
+# define __func__ "<unknown>"
+# endif
+# endif
+#endif
/**
@@ -311,6 +328,11 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
#endif
#endif
+#if (__GNUC__ >= 3)
+#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
+#else
+#define PRINTFLIKE(f, a)
+#endif
#ifndef NULL
#define NULL 0
diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h
index 2eac1cc2e..0f2d1a8f8 100644
--- a/mesalib/src/mesa/main/config.h
+++ b/mesalib/src/mesa/main/config.h
@@ -177,7 +177,7 @@
/**
* Per-program constants (power of two)
*
- * \c MAX_PROGRAM_LOCAL_PARAMS and \c MAX_UNIFORMS are just the assmebly shader
+ * \c MAX_PROGRAM_LOCAL_PARAMS and \c MAX_UNIFORMS are just the assembly shader
* and GLSL shader names for the same thing. They should \b always have the
* same value. Each refers to the number of vec4 values supplied as
* per-program parameters.
@@ -250,7 +250,7 @@
/** For GL_ARB_draw_buffers */
/*@{*/
-#define MAX_DRAW_BUFFERS 4
+#define MAX_DRAW_BUFFERS 8
/*@}*/
@@ -262,6 +262,20 @@
/** For GL_ATI_envmap_bump - support bump mapping on first 8 units */
#define SUPPORTED_ATI_BUMP_UNITS 0xff
+/** For GL_EXT_transform_feedback */
+#define MAX_FEEDBACK_ATTRIBS 32
+
+/** For GL_ARB_geometry_shader4 */
+/*@{*/
+#define MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 8
+#define MAX_GEOMETRY_VARYING_COMPONENTS 32
+#define MAX_VERTEX_VARYING_COMPONENTS 32
+#define MAX_GEOMETRY_UNIFORM_COMPONENTS 512
+#define MAX_GEOMETRY_OUTPUT_VERTICES 256
+#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 1024
+/*@}*/
+
+
/**
* \name Mesa-specific parameters
*/
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index 73126b957..3bddf2570 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -111,28 +111,25 @@
#include "points.h"
#include "polygon.h"
#include "queryobj.h"
-#if FEATURE_ARB_sync
#include "syncobj.h"
-#endif
#include "rastpos.h"
#include "remap.h"
#include "scissor.h"
#include "shared.h"
+#include "shaderobj.h"
#include "simple_list.h"
#include "state.h"
#include "stencil.h"
#include "texcompress_s3tc.h"
#include "texstate.h"
+#include "transformfeedback.h"
#include "mtypes.h"
#include "varray.h"
#include "version.h"
#include "viewport.h"
#include "vtxfmt.h"
-#include "glapi/glthread.h"
-#include "glapi/glapitable.h"
-#include "shader/program.h"
-#include "shader/prog_print.h"
-#include "shader/shader_api.h"
+#include "program/program.h"
+#include "program/prog_print.h"
#if _HAVE_FULL_GL
#include "math/m_matrix.h"
#endif
@@ -141,6 +138,10 @@
#include "sparc/sparc.h"
#endif
+#include "glsl_parser_extras.h"
+
+
+
#ifndef MESA_VERBOSE
int MESA_VERBOSE = 0;
#endif
@@ -340,14 +341,16 @@ _mesa_destroy_visual( GLvisual *vis )
static void
dummy_enum_func(void)
{
- gl_buffer_index bi;
- gl_colortable_index ci;
- gl_face_index fi;
- gl_frag_attrib fa;
- gl_frag_result fr;
- gl_texture_index ti;
- gl_vert_attrib va;
- gl_vert_result vr;
+ gl_buffer_index bi = BUFFER_FRONT_LEFT;
+ gl_colortable_index ci = COLORTABLE_PRECONVOLUTION;
+ gl_face_index fi = FACE_POS_X;
+ gl_frag_attrib fa = FRAG_ATTRIB_WPOS;
+ gl_frag_result fr = FRAG_RESULT_DEPTH;
+ gl_texture_index ti = TEXTURE_2D_ARRAY_INDEX;
+ gl_vert_attrib va = VERT_ATTRIB_POS;
+ gl_vert_result vr = VERT_RESULT_HPOS;
+ gl_geom_attrib ga = GEOM_ATTRIB_POSITION;
+ gl_geom_result gr = GEOM_RESULT_POS;
(void) bi;
(void) ci;
@@ -357,6 +360,8 @@ dummy_enum_func(void)
(void) ti;
(void) va;
(void) vr;
+ (void) ga;
+ (void) gr;
}
@@ -395,9 +400,28 @@ one_time_init( GLcontext *ctx )
_mesa_get_cpu_features();
- _mesa_init_remap_table();
+ switch (ctx->API) {
+#if FEATURE_GL
+ case API_OPENGL:
+ _mesa_init_remap_table();
+ break;
+#endif
+#if FEATURE_ES1
+ case API_OPENGLES:
+ _mesa_init_remap_table_es1();
+ break;
+#endif
+#if FEATURE_ES2
+ case API_OPENGLES2:
+ _mesa_init_remap_table_es2();
+ break;
+#endif
+ default:
+ break;
+ }
_mesa_init_sqrt_table();
+ _mesa_init_get_hash(ctx);
for (i = 0; i < 256; i++) {
_mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
@@ -412,6 +436,11 @@ one_time_init( GLcontext *ctx )
}
_glthread_UNLOCK_MUTEX(OneTimeLock);
+ /* Hopefully atexit() is widely available. If not, we may need some
+ * #ifdef tests here.
+ */
+ atexit(_mesa_destroy_shader_compiler);
+
dummy_enum_func();
}
@@ -440,7 +469,7 @@ _mesa_init_current(GLcontext *ctx)
/**
- * Init vertex/fragment program limits.
+ * Init vertex/fragment/geometry program limits.
* Important: drivers should override these with actual limits.
*/
static void
@@ -455,15 +484,31 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS;
prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
- if (type == GL_VERTEX_PROGRAM_ARB) {
+ switch (type) {
+ case GL_VERTEX_PROGRAM_ARB:
prog->MaxParameters = MAX_VERTEX_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
- }
- else {
+ break;
+ case GL_FRAGMENT_PROGRAM_ARB:
prog->MaxParameters = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_FRAGMENT_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS;
+ break;
+ case MESA_GEOMETRY_PROGRAM:
+ prog->MaxParameters = MAX_NV_VERTEX_PROGRAM_PARAMS;
+ prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
+ prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
+
+ prog->MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
+ prog->MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
+ prog->MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
+ prog->MaxGeometryUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS;
+ prog->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
+ prog->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
+ break;
+ default:
+ assert(0 && "Bad program type in init_program_limits()");
}
/* Set the native limits to zero. This implies that there is no native
@@ -529,6 +574,9 @@ _mesa_init_constants(GLcontext *ctx)
#if FEATURE_ARB_fragment_program
init_program_limits(GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram);
#endif
+#if FEATURE_ARB_geometry_shader4
+ init_program_limits(MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
+#endif
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
@@ -549,6 +597,21 @@ _mesa_init_constants(GLcontext *ctx)
ctx->Const.MaxVarying = MAX_VARYING;
#endif
+ /* Shading language version */
+ if (ctx->API == API_OPENGL) {
+#if FEATURE_ARB_shading_language_120
+ ctx->Const.GLSLVersion = 120;
+#else
+ ctx->Const.GLSLVersion = 110;
+#endif
+ }
+ else if (ctx->API == API_OPENGLES2) {
+ ctx->Const.GLSLVersion = 100;
+ }
+ else if (ctx->API == API_OPENGLES) {
+ ctx->Const.GLSLVersion = 0; /* GLSL not supported */
+ }
+
/* GL_ARB_framebuffer_object */
ctx->Const.MaxSamples = 0;
@@ -560,6 +623,14 @@ _mesa_init_constants(GLcontext *ctx)
/* GL_EXT_provoking_vertex */
ctx->Const.QuadsFollowProvokingVertexConvention = GL_TRUE;
+
+ /* GL_EXT_transform_feedback */
+ ctx->Const.MaxTransformFeedbackSeparateAttribs = MAX_FEEDBACK_ATTRIBS;
+ ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
+ ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
+
+ /* GL 3.2: hard-coded for now: */
+ ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
}
@@ -627,6 +698,9 @@ check_context_limits(GLcontext *ctx)
assert(ctx->Const.MaxDrawBuffers <= MAX_DRAW_BUFFERS);
+ /* if this fails, add more enum values to gl_buffer_index */
+ assert(BUFFER_COLOR0 + MAX_DRAW_BUFFERS <= BUFFER_COUNT);
+
/* XXX probably add more tests */
}
@@ -676,14 +750,13 @@ init_attrib_groups(GLcontext *ctx)
_mesa_init_polygon( ctx );
_mesa_init_program( ctx );
_mesa_init_queryobj( ctx );
-#if FEATURE_ARB_sync
_mesa_init_sync( ctx );
-#endif
_mesa_init_rastpos( ctx );
_mesa_init_scissor( ctx );
_mesa_init_shader_state( ctx );
_mesa_init_stencil( ctx );
_mesa_init_transform( ctx );
+ _mesa_init_transform_feedback( ctx );
_mesa_init_varray( ctx );
_mesa_init_viewport( ctx );
@@ -739,8 +812,8 @@ generic_nop(void)
/**
* Allocate and initialize a new dispatch table.
*/
-static struct _glapi_table *
-alloc_dispatch_table(void)
+struct _glapi_table *
+_mesa_alloc_dispatch_table(int size)
{
/* Find the larger of Mesa's dispatch table and libGL's dispatch table.
* In practice, this'll be the same for stand-alone Mesa. But for DRI
@@ -748,7 +821,7 @@ alloc_dispatch_table(void)
* DRI drivers.
*/
GLint numEntries = MAX2(_glapi_get_dispatch_table_size(),
- sizeof(struct _glapi_table) / sizeof(_glapi_proc));
+ size / sizeof(_glapi_proc));
struct _glapi_table *table =
(struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
if (table) {
@@ -781,6 +854,7 @@ alloc_dispatch_table(void)
* for debug flags.
*
* \param ctx the context to initialize
+ * \param api the GL API type to create the context for
* \param visual describes the visual attributes for this context
* \param share_list points to context to share textures, display lists,
* etc with, or NULL
@@ -789,27 +863,30 @@ alloc_dispatch_table(void)
* \param driverContext pointer to driver-specific context data
*/
GLboolean
-_mesa_initialize_context(GLcontext *ctx,
- const GLvisual *visual,
- GLcontext *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
+_mesa_initialize_context_for_api(GLcontext *ctx,
+ gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
{
struct gl_shared_state *shared;
+ int i;
/*ASSERT(driverContext);*/
assert(driverFunctions->NewTextureObject);
assert(driverFunctions->FreeTexImageData);
- /* misc one-time initializations */
- one_time_init(ctx);
-
+ ctx->API = api;
ctx->Visual = *visual;
ctx->DrawBuffer = NULL;
ctx->ReadBuffer = NULL;
ctx->WinSysDrawBuffer = NULL;
ctx->WinSysReadBuffer = NULL;
+ /* misc one-time initializations */
+ one_time_init(ctx);
+
/* Plug in driver functions and context pointer here.
* This is important because when we call alloc_shared_state() below
* we'll call ctx->Driver.NewTextureObject() to create the default
@@ -839,30 +916,36 @@ _mesa_initialize_context(GLcontext *ctx,
return GL_FALSE;
}
+#if FEATURE_dispatch
/* setup the API dispatch tables */
- ctx->Exec = alloc_dispatch_table();
- ctx->Save = alloc_dispatch_table();
- if (!ctx->Exec || !ctx->Save) {
+ switch (ctx->API) {
+#if FEATURE_GL
+ case API_OPENGL:
+ ctx->Exec = _mesa_create_exec_table();
+ break;
+#endif
+#if FEATURE_ES1
+ case API_OPENGLES:
+ ctx->Exec = _mesa_create_exec_table_es1();
+ break;
+#endif
+#if FEATURE_ES2
+ case API_OPENGLES2:
+ ctx->Exec = _mesa_create_exec_table_es2();
+ break;
+#endif
+ default:
+ _mesa_problem(ctx, "unknown or unsupported API");
+ break;
+ }
+
+ if (!ctx->Exec) {
_mesa_release_shared_state(ctx, ctx->Shared);
- if (ctx->Exec)
- free(ctx->Exec);
return GL_FALSE;
}
-#if FEATURE_dispatch
- _mesa_init_exec_table(ctx->Exec);
#endif
ctx->CurrentDispatch = ctx->Exec;
-#if FEATURE_dlist
- _mesa_init_save_table(ctx->Save);
- _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
-#endif
-
- /* Neutral tnl module stuff */
- _mesa_init_exec_vtxfmt( ctx );
- ctx->TnlModule.Current = NULL;
- ctx->TnlModule.SwapCount = 0;
-
ctx->FragmentProgram._MaintainTexEnvProgram
= (_mesa_getenv("MESA_TEX_PROG") != NULL);
@@ -873,15 +956,65 @@ _mesa_initialize_context(GLcontext *ctx,
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
}
-#ifdef FEATURE_extra_context_init
- _mesa_initialize_context_extra(ctx);
+ switch (ctx->API) {
+ case API_OPENGL:
+ /* Neutral tnl module stuff */
+ _mesa_init_exec_vtxfmt( ctx );
+ ctx->TnlModule.Current = NULL;
+ ctx->TnlModule.SwapCount = 0;
+
+#if FEATURE_dlist
+ ctx->Save = _mesa_create_save_table();
+ if (!ctx->Save) {
+ _mesa_release_shared_state(ctx, ctx->Shared);
+ free(ctx->Exec);
+ return GL_FALSE;
+ }
+
+ _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
#endif
+ break;
+ case API_OPENGLES:
+ /**
+ * GL_OES_texture_cube_map says
+ * "Initially all texture generation modes are set to REFLECTION_MAP_OES"
+ */
+ for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
+ texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ }
+ break;
+ case API_OPENGLES2:
+ ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
+ ctx->Point.PointSprite = GL_TRUE; /* always on for ES 2.x */
+ break;
+ }
ctx->FirstTimeCurrent = GL_TRUE;
return GL_TRUE;
}
+GLboolean
+_mesa_initialize_context(GLcontext *ctx,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
+{
+ return _mesa_initialize_context_for_api(ctx,
+ API_OPENGL,
+ visual,
+ share_list,
+ driverFunctions,
+ driverContext);
+}
/**
* Allocate and initialize a GLcontext structure.
@@ -889,6 +1022,7 @@ _mesa_initialize_context(GLcontext *ctx,
* we need to at least call driverFunctions->NewTextureObject to initialize
* the rendering context.
*
+ * \param api the GL API type to create the context for
* \param visual a GLvisual pointer (we copy the struct contents)
* \param share_list another context to share display lists with or NULL
* \param driverFunctions points to the dd_function_table into which the
@@ -898,10 +1032,11 @@ _mesa_initialize_context(GLcontext *ctx,
* \return pointer to a new __GLcontextRec or NULL if error.
*/
GLcontext *
-_mesa_create_context(const GLvisual *visual,
- GLcontext *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
+_mesa_create_context_for_api(gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
{
GLcontext *ctx;
@@ -912,8 +1047,8 @@ _mesa_create_context(const GLvisual *visual,
if (!ctx)
return NULL;
- if (_mesa_initialize_context(ctx, visual, share_list,
- driverFunctions, driverContext)) {
+ if (_mesa_initialize_context_for_api(ctx, api, visual, share_list,
+ driverFunctions, driverContext)) {
return ctx;
}
else {
@@ -922,6 +1057,17 @@ _mesa_create_context(const GLvisual *visual,
}
}
+GLcontext *
+_mesa_create_context(const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
+{
+ return _mesa_create_context_for_api(API_OPENGL, visual,
+ share_list,
+ driverFunctions,
+ driverContext);
+}
/**
* Free the data associated with the given context.
@@ -965,10 +1111,9 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_free_program_data(ctx);
_mesa_free_shader_state(ctx);
_mesa_free_queryobj_data(ctx);
-#if FEATURE_ARB_sync
_mesa_free_sync_data(ctx);
-#endif
_mesa_free_varray_data(ctx);
+ _mesa_free_transform_feedback(ctx);
_mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
@@ -1164,6 +1309,9 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer)
if (ctxvis == bufvis)
return GL_TRUE;
+ if (buffer == _mesa_get_incomplete_framebuffer())
+ return GL_TRUE;
+
#if 0
/* disabling this fixes the fgl_glxgears pbuffer demo */
if (ctxvis->doubleBufferMode && !bufvis->doubleBufferMode)
@@ -1358,6 +1506,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
if (newCtx->FirstTimeCurrent) {
_mesa_compute_version(newCtx);
+ newCtx->Extensions.String = _mesa_make_extension_string(newCtx);
+
check_context_limits(newCtx);
/* We can use this to help debug user's problems. Tell them to set
@@ -1566,7 +1716,7 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where)
/* using shaders */
if (!ctx->Shader.CurrentProgram->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(shader not linked), where");
+ "%s(shader not linked)", where);
return GL_FALSE;
}
#if 0 /* not normally enabled */
diff --git a/mesalib/src/mesa/main/context.h b/mesalib/src/mesa/main/context.h
index 09bf1777d..c61da6282 100644
--- a/mesalib/src/mesa/main/context.h
+++ b/mesalib/src/mesa/main/context.h
@@ -112,8 +112,20 @@ _mesa_initialize_context( GLcontext *ctx,
const struct dd_function_table *driverFunctions,
void *driverContext );
-extern void
-_mesa_initialize_context_extra(GLcontext *ctx);
+extern GLcontext *
+_mesa_create_context_for_api(gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext);
+
+extern GLboolean
+_mesa_initialize_context_for_api(GLcontext *ctx,
+ gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext);
extern void
_mesa_free_context_data( GLcontext *ctx );
@@ -141,6 +153,8 @@ _mesa_get_current_context(void);
/*@}*/
+extern void
+_mesa_init_get_hash(GLcontext *ctx);
extern void
_mesa_notifySwapBuffers(__GLcontext *gc);
diff --git a/mesalib/src/mesa/main/convolve.c b/mesalib/src/mesa/main/convolve.c
index 15e8dffc2..f63bddc44 100644
--- a/mesalib/src/mesa/main/convolve.c
+++ b/mesalib/src/mesa/main/convolve.c
@@ -37,6 +37,7 @@
#include "convolve.h"
#include "context.h"
#include "image.h"
+#include "macros.h"
#include "mtypes.h"
#include "state.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/convolve.h b/mesalib/src/mesa/main/convolve.h
index 59492bc7c..80caf942f 100644
--- a/mesalib/src/mesa/main/convolve.h
+++ b/mesalib/src/mesa/main/convolve.h
@@ -33,12 +33,6 @@
#if FEATURE_convolve
-#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) \
- do { \
- (driver)->CopyConvolutionFilter1D = impl ## CopyConvolutionFilter1D; \
- (driver)->CopyConvolutionFilter2D = impl ## CopyConvolutionFilter2D; \
- } while (0)
-
extern void GLAPIENTRY
_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width,
GLenum format, GLenum type, const GLvoid *image);
@@ -70,7 +64,7 @@ _mesa_init_convolve_dispatch(struct _glapi_table *disp);
#else /* FEATURE_convolve */
-#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) do { } while (0)
+#include "main/compiler.h"
static INLINE void GLAPIENTRY
_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width,
diff --git a/mesalib/src/mesa/main/core.h b/mesalib/src/mesa/main/core.h
new file mode 100644
index 000000000..ea6e6bf11
--- /dev/null
+++ b/mesalib/src/mesa/main/core.h
@@ -0,0 +1,66 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.9
+ *
+ * Copyright (C) 2010 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
+
+/**
+ * \file core.h
+ * The public header of core mesa.
+ *
+ * This file is the (only) public header of core mesa. It is supposed to be
+ * used by GLX, WGL, and GLSL. It is important that headers directly or
+ * indirectly included here do not perform feature tests (#if FEATURE_xxx).
+ */
+
+
+#ifndef CORE_H
+#define CORE_H
+
+
+#include "main/glheader.h"
+#include "main/compiler.h"
+#include "main/imports.h"
+#include "main/macros.h"
+
+#include "main/version.h" /* for MESA_VERSION_STRING */
+#include "main/context.h" /* for _mesa_share_state */
+#include "main/mtypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* for GLSL */
+#include "program/prog_parameter.h"
+#include "program/prog_uniform.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* CORE_H */
diff --git a/mesalib/src/mesa/main/dd.h b/mesalib/src/mesa/main/dd.h
index 7c02faaa5..8a20a6636 100644
--- a/mesalib/src/mesa/main/dd.h
+++ b/mesalib/src/mesa/main/dd.h
@@ -36,7 +36,7 @@
struct gl_pixelstore_attrib;
struct gl_display_list;
-#if FEATURE_ARB_vertex_buffer_object
+/* GL_ARB_vertex_buffer_object */
/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
* NULL) if buffer is unavailable for immediate mapping.
*
@@ -49,7 +49,6 @@ struct gl_display_list;
* respect the contents of already referenced data.
*/
#define MESA_MAP_NOWAIT_BIT 0x0040
-#endif
/**
@@ -595,6 +594,27 @@ struct dd_function_table {
/*@}*/
+ /**
+ * \name GLSL shader/program functions.
+ */
+ /*@{*/
+ /**
+ * Called when a shader is compiled.
+ *
+ * Note that not all shader objects get ShaderCompile called on
+ * them. Notably, the shaders containing builtin functions do not
+ * have CompileShader() called, so if lowering passes are done they
+ * need to also be performed in LinkShader().
+ */
+ GLboolean (*CompileShader)(GLcontext *ctx, struct gl_shader *shader);
+ /**
+ * Called when a shader program is linked.
+ *
+ * This gives drivers an opportunity to clone the IR and make their
+ * own transformations on it for the purposes of code generation.
+ */
+ GLboolean (*LinkShader)(GLcontext *ctx, struct gl_shader_program *shader);
+ /*@}*/
/**
* \name State-changing functions.
@@ -706,31 +726,9 @@ struct dd_function_table {
/*@}*/
- /**
- * \name State-query functions
- *
- * Return GL_TRUE if query was completed, GL_FALSE otherwise.
- */
- /*@{*/
- /** Return the value or values of a selected parameter */
- GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result);
- /** Return the value or values of a selected parameter */
- GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result);
- /** Return the value or values of a selected parameter */
- GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result);
- /** Return the value or values of a selected parameter */
- GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result);
- /** Return the value or values of a selected parameter */
- GLboolean (*GetInteger64v)(GLcontext *ctx, GLenum pname, GLint64 *result);
- /** Return the value or values of a selected parameter */
- GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result);
- /*@}*/
-
-
/**
* \name Vertex/pixel buffer object functions
*/
-#if FEATURE_ARB_vertex_buffer_object
/*@{*/
void (*BindBuffer)( GLcontext *ctx, GLenum target,
struct gl_buffer_object *obj );
@@ -774,12 +772,10 @@ struct dd_function_table {
GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
struct gl_buffer_object *obj );
/*@}*/
-#endif
/**
* \name Functions for GL_APPLE_object_purgeable
*/
-#if FEATURE_APPLE_object_purgeable
/*@{*/
/* variations on ObjectPurgeable */
GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
@@ -791,12 +787,10 @@ struct dd_function_table {
GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
/*@}*/
-#endif
/**
- * \name Functions for GL_EXT_framebuffer_object
+ * \name Functions for GL_EXT_framebuffer_{object,blit}.
*/
-#if FEATURE_EXT_framebuffer_object
/*@{*/
struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
@@ -815,13 +809,10 @@ struct dd_function_table {
void (*ValidateFramebuffer)(GLcontext *ctx,
struct gl_framebuffer *fb);
/*@}*/
-#endif
-#if FEATURE_EXT_framebuffer_blit
void (*BlitFramebuffer)(GLcontext *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
-#endif
/**
* \name Query objects
@@ -849,54 +840,12 @@ struct dd_function_table {
* \name GLSL-related functions (ARB extensions and OpenGL 2.x)
*/
/*@{*/
- void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader);
- void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index,
- const GLcharARB *name);
- void (*CompileShader)(GLcontext *ctx, GLuint shader);
- GLuint (*CreateShader)(GLcontext *ctx, GLenum type);
- GLuint (*CreateProgram)(GLcontext *ctx);
- void (*DeleteProgram2)(GLcontext *ctx, GLuint program);
- void (*DeleteShader)(GLcontext *ctx, GLuint shader);
- void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader);
- void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index,
- GLsizei maxLength, GLsizei * length, GLint * size,
- GLenum * type, GLcharARB * name);
- void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index,
- GLsizei maxLength, GLsizei *length, GLint *size,
- GLenum *type, GLcharARB *name);
- void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount,
- GLsizei *count, GLuint *obj);
- GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program,
- const GLcharARB *name);
- GLuint (*GetHandle)(GLcontext *ctx, GLenum pname);
- void (*GetProgramiv)(GLcontext *ctx, GLuint program,
- GLenum pname, GLint *params);
- void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
- void (*GetShaderiv)(GLcontext *ctx, GLuint shader,
- GLenum pname, GLint *params);
- void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
- void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength,
- GLsizei *length, GLcharARB *sourceOut);
- void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location,
- GLfloat *params);
- void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location,
- GLint *params);
- GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program,
- const GLcharARB *name);
- GLboolean (*IsProgram)(GLcontext *ctx, GLuint name);
- GLboolean (*IsShader)(GLcontext *ctx, GLuint name);
- void (*LinkProgram)(GLcontext *ctx, GLuint program);
- void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source);
- void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count,
- const GLvoid *values, GLenum type);
- void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows,
- GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *values);
- void (*UseProgram)(GLcontext *ctx, GLuint program);
- void (*ValidateProgram)(GLcontext *ctx, GLuint program);
- /* XXX many more to come */
+ struct gl_shader *(*NewShader)(GLcontext *ctx, GLuint name, GLenum type);
+ void (*DeleteShader)(GLcontext *ctx, struct gl_shader *shader);
+ struct gl_shader_program *(*NewShaderProgram)(GLcontext *ctx, GLuint name);
+ void (*DeleteShaderProgram)(GLcontext *ctx,
+ struct gl_shader_program *shProg);
+ void (*UseProgram)(GLcontext *ctx, struct gl_shader_program *shProg);
/*@}*/
@@ -1018,7 +967,6 @@ struct dd_function_table {
void (*EndCallList)( GLcontext *ctx );
-#if FEATURE_ARB_sync
/**
* \name GL_ARB_sync interfaces
*/
@@ -1032,14 +980,12 @@ struct dd_function_table {
void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *,
GLbitfield, GLuint64);
/*@}*/
-#endif
/** GL_NV_conditional_render */
void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
GLenum mode);
void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
-#if FEATURE_OES_draw_texture
/**
* \name GL_OES_draw_texture interface
*/
@@ -1047,9 +993,10 @@ struct dd_function_table {
void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height);
/*@}*/
-#endif
-#if FEATURE_OES_EGL_image
+ /**
+ * \name GL_OES_EGL_image interface
+ */
void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
@@ -1057,8 +1004,24 @@ struct dd_function_table {
void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx,
struct gl_renderbuffer *rb,
void *image_handle);
-#endif
+ /**
+ * \name GL_EXT_transform_feedback interface
+ */
+ struct gl_transform_feedback_object *
+ (*NewTransformFeedback)(GLcontext *ctx, GLuint name);
+ void (*DeleteTransformFeedback)(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj);
+ void (*BeginTransformFeedback)(GLcontext *ctx, GLenum mode,
+ struct gl_transform_feedback_object *obj);
+ void (*EndTransformFeedback)(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj);
+ void (*PauseTransformFeedback)(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj);
+ void (*ResumeTransformFeedback)(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj);
+ void (*DrawTransformFeedback)(GLcontext *ctx, GLenum mode,
+ struct gl_transform_feedback_object *obj);
};
@@ -1085,23 +1048,23 @@ typedef struct {
* \name Vertex
*/
/*@{*/
- void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */
+ void (GLAPIENTRYP ArrayElement)( GLint );
void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
void (GLAPIENTRYP Color3fv)( const GLfloat * );
void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
void (GLAPIENTRYP Color4fv)( const GLfloat * );
void (GLAPIENTRYP EdgeFlag)( GLboolean );
- void (GLAPIENTRYP EvalCoord1f)( GLfloat ); /* NOTE */
- void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */
- void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */
- void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */
- void (GLAPIENTRYP EvalPoint1)( GLint ); /* NOTE */
- void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); /* NOTE */
+ void (GLAPIENTRYP EvalCoord1f)( GLfloat );
+ void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
+ void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
+ void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
+ void (GLAPIENTRYP EvalPoint1)( GLint );
+ void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
void (GLAPIENTRYP Indexf)( GLfloat );
void (GLAPIENTRYP Indexfv)( const GLfloat * );
- void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */
+ void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
@@ -1128,8 +1091,8 @@ typedef struct {
void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
- void (GLAPIENTRYP CallList)( GLuint ); /* NOTE */
- void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); /* NOTE */
+ void (GLAPIENTRYP CallList)( GLuint );
+ void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
void (GLAPIENTRYP Begin)( GLenum );
void (GLAPIENTRYP End)( void );
/* GL_NV_vertex_program */
@@ -1141,7 +1104,7 @@ typedef struct {
void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
-#if FEATURE_ARB_vertex_program
+ /* GL_ARB_vertex_program */
void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
@@ -1150,11 +1113,8 @@ typedef struct {
void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
-#endif
/*@}*/
- /*
- */
void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
/**
@@ -1186,6 +1146,11 @@ typedef struct {
const GLvoid **indices,
GLsizei primcount,
const GLint *basevertex);
+ void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
+ GLsizei count, GLsizei primcount);
+ void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count,
+ GLenum type, const GLvoid *indices,
+ GLsizei primcount);
/*@}*/
/**
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c
index 33b35e03c..526145aec 100644
--- a/mesalib/src/mesa/main/debug.c
+++ b/mesalib/src/mesa/main/debug.c
@@ -85,7 +85,7 @@ void
_mesa_print_state( const char *msg, GLuint state )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
state,
(state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
@@ -105,6 +105,7 @@ _mesa_print_state( const char *msg, GLuint state )
(state & _NEW_POLYGON) ? "ctx->Polygon, " : "",
(state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "",
(state & _NEW_SCISSOR) ? "ctx->Scissor, " : "",
+ (state & _NEW_STENCIL) ? "ctx->Stencil, " : "",
(state & _NEW_TEXTURE) ? "ctx->Texture, " : "",
(state & _NEW_TRANSFORM) ? "ctx->Transform, " : "",
(state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
@@ -314,7 +315,7 @@ write_texture_image(struct gl_texture_object *texObj,
buffer, texObj, img);
/* make filename */
- sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face);
+ _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face);
printf(" Writing image level %u to %s\n", level, s);
write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE);
@@ -356,7 +357,7 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb)
format, type, &ctx->DefaultPacking, buffer);
/* make filename */
- sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name);
+ _mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name);
printf(" Writing renderbuffer image to %s\n", s);
write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE);
diff --git a/mesalib/src/mesa/main/debug.h b/mesalib/src/mesa/main/debug.h
index 0449cb179..b517cc825 100644
--- a/mesalib/src/mesa/main/debug.h
+++ b/mesalib/src/mesa/main/debug.h
@@ -36,6 +36,9 @@
#ifndef _DEBUG_H
#define _DEBUG_H
+#include "glheader.h"
+#include "mtypes.h"
+
#if _HAVE_FULL_GL
extern void _mesa_print_tri_caps( const char *name, GLuint flags );
diff --git a/mesalib/src/mesa/main/depthstencil.c b/mesalib/src/mesa/main/depthstencil.c
index 892520b69..dbaa84164 100644
--- a/mesalib/src/mesa/main/depthstencil.c
+++ b/mesalib/src/mesa/main/depthstencil.c
@@ -62,8 +62,8 @@ nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
static void
delete_wrapper(struct gl_renderbuffer *rb)
{
- ASSERT(rb->Format == MESA_FORMAT_Z24_S8 ||
- rb->Format == MESA_FORMAT_S8_Z24);
+ ASSERT(rb->Format == MESA_FORMAT_S8 ||
+ rb->Format == MESA_FORMAT_X8_Z24);
_mesa_reference_renderbuffer(&rb->Wrapped, NULL);
free(rb);
}
@@ -83,7 +83,9 @@ alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
(void) internalFormat;
ASSERT(dsrb->Format == MESA_FORMAT_Z24_S8 ||
- dsrb->Format == MESA_FORMAT_S8_Z24);
+ dsrb->Format == MESA_FORMAT_Z24_X8 ||
+ dsrb->Format == MESA_FORMAT_S8_Z24 ||
+ dsrb->Format == MESA_FORMAT_X8_Z24);
retVal = dsrb->AllocStorage(ctx, dsrb, dsrb->InternalFormat, width, height);
if (retVal) {
@@ -352,16 +354,21 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
struct gl_renderbuffer *z24rb;
ASSERT(dsrb->Format == MESA_FORMAT_Z24_S8 ||
- dsrb->Format == MESA_FORMAT_S8_Z24);
+ dsrb->Format == MESA_FORMAT_Z24_X8 ||
+ dsrb->Format == MESA_FORMAT_S8_Z24 ||
+ dsrb->Format == MESA_FORMAT_X8_Z24);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
- z24rb = _mesa_new_renderbuffer(ctx, 0);
+ z24rb = ctx->Driver.NewRenderbuffer(ctx, 0);
if (!z24rb)
return NULL;
+ /* NOTE: need to do manual refcounting here */
z24rb->Wrapped = dsrb;
+ dsrb->RefCount++;
+
z24rb->Name = dsrb->Name;
- z24rb->RefCount = 1;
+ z24rb->RefCount = 0;
z24rb->Width = dsrb->Width;
z24rb->Height = dsrb->Height;
z24rb->InternalFormat = GL_DEPTH_COMPONENT24;
@@ -638,13 +645,16 @@ _mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb)
dsrb->Format == MESA_FORMAT_S8_Z24);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
- s8rb = _mesa_new_renderbuffer(ctx, 0);
+ s8rb = ctx->Driver.NewRenderbuffer(ctx, 0);
if (!s8rb)
return NULL;
+ /* NOTE: need to do manual refcounting here */
s8rb->Wrapped = dsrb;
+ dsrb->RefCount++;
+
s8rb->Name = dsrb->Name;
- s8rb->RefCount = 1;
+ s8rb->RefCount = 0;
s8rb->Width = dsrb->Width;
s8rb->Height = dsrb->Height;
s8rb->InternalFormat = GL_STENCIL_INDEX8_EXT;
diff --git a/mesalib/src/mesa/main/depthstencil.h b/mesalib/src/mesa/main/depthstencil.h
index 3dde081f5..afbac77f0 100644
--- a/mesalib/src/mesa/main/depthstencil.h
+++ b/mesalib/src/mesa/main/depthstencil.h
@@ -26,6 +26,7 @@
#ifndef DEPTHSTENCIL_H
#define DEPTHSTENCIL_H
+#include "mtypes.h"
extern struct gl_renderbuffer *
_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index 43aadb1de..d847d4d5d 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -32,7 +32,11 @@
#include "glheader.h"
#include "imports.h"
#include "api_arrayelt.h"
+#include "api_exec.h"
#include "api_loopback.h"
+#if FEATURE_ATI_fragment_shader
+#include "atifragshader.h"
+#endif
#include "config.h"
#include "mfeatures.h"
#if FEATURE_ARB_vertex_buffer_object
@@ -55,13 +59,10 @@
#include "mtypes.h"
#include "varray.h"
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
-#include "shader/arbprogram.h"
+#include "arbprogram.h"
#endif
#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program
-#include "shader/nvprogram.h"
-#endif
-#if FEATURE_ATI_fragment_shader
-#include "shader/atifragshader.h"
+#include "nvprogram.h"
#endif
#include "math/m_matrix.h"
@@ -370,6 +371,16 @@ typedef enum
OPCODE_UNIFORM_MATRIX34,
OPCODE_UNIFORM_MATRIX43,
+ /* OpenGL 3.0 */
+ OPCODE_UNIFORM_1UI,
+ OPCODE_UNIFORM_2UI,
+ OPCODE_UNIFORM_3UI,
+ OPCODE_UNIFORM_4UI,
+ OPCODE_UNIFORM_1UIV,
+ OPCODE_UNIFORM_2UIV,
+ OPCODE_UNIFORM_3UIV,
+ OPCODE_UNIFORM_4UIV,
+
/* GL_EXT_framebuffer_blit */
OPCODE_BLIT_FRAMEBUFFER,
@@ -396,6 +407,10 @@ typedef enum
/* GL_EXT_provoking_vertex */
OPCODE_PROVOKING_VERTEX,
+ /* GL_EXT_transform_feedback */
+ OPCODE_BEGIN_TRANSFORM_FEEDBACK,
+ OPCODE_END_TRANSFORM_FEEDBACK,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -670,6 +685,10 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
case OPCODE_UNIFORM_2IV:
case OPCODE_UNIFORM_3IV:
case OPCODE_UNIFORM_4IV:
+ case OPCODE_UNIFORM_1UIV:
+ case OPCODE_UNIFORM_2UIV:
+ case OPCODE_UNIFORM_3UIV:
+ case OPCODE_UNIFORM_4UIV:
free(n[3].data);
n += InstSize[n[0].opcode];
break;
@@ -6051,8 +6070,15 @@ exec_GetAttribLocationARB(GLuint program, const GLchar *name)
FLUSH_VERTICES(ctx, 0);
return CALL_GetAttribLocationARB(ctx->Exec, (program, name));
}
-/* XXX more shader functions needed here */
+static GLint GLAPIENTRY
+exec_GetUniformLocationARB(GLuint program, const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return CALL_GetUniformLocationARB(ctx->Exec, (program, name));
+}
+/* XXX more shader functions needed here */
#if FEATURE_EXT_framebuffer_blit
@@ -6104,6 +6130,36 @@ save_ProvokingVertexEXT(GLenum mode)
}
+/** GL_EXT_transform_feedback */
+static void GLAPIENTRY
+save_BeginTransformFeedback(GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_TRANSFORM_FEEDBACK, 1);
+ if (n) {
+ n[1].e = mode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BeginTransformFeedbackEXT(ctx->Exec, (mode));
+ }
+}
+
+
+/** GL_EXT_transform_feedback */
+static void GLAPIENTRY
+save_EndTransformFeedback(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ (void) alloc_instruction(ctx, OPCODE_END_TRANSFORM_FEEDBACK, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_EndTransformFeedbackEXT(ctx->Exec, ());
+ }
+}
+
+
/* aka UseProgram() */
static void GLAPIENTRY
save_UseProgramObjectARB(GLhandleARB program)
@@ -6416,6 +6472,149 @@ save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v)
}
+
+static void GLAPIENTRY
+save_Uniform1ui(GLint location, GLuint x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI, 2);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform1ui(ctx->Exec, (location, x));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2ui(GLint location, GLuint x, GLuint y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform2ui(ctx->Exec, (location, x, y));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3ui(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI, 4);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform3ui(ctx->Exec, (location, x, y, z));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4ui(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI, 5);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ n[5].i = w;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));*/
+ }
+}
+
+
+
+static void GLAPIENTRY
+save_Uniform1uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].data = memdup(v, count * 1 * sizeof(*v));
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform1uiv(ctx->Exec, (location, count, v));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UIV, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].data = memdup(v, count * 2 * sizeof(*v));
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform2uiv(ctx->Exec, (location, count, v));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UIV, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].data = memdup(v, count * 3 * sizeof(*v));
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform3uiv(ctx->Exec, (location, count, v));*/
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].data = memdup(v, count * 4 * sizeof(*v));
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_Uniform4uiv(ctx->Exec, (location, count, v));*/
+ }
+}
+
+
+
static void GLAPIENTRY
save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *m)
@@ -6619,7 +6818,7 @@ _mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
if (ctx->CompileFlag)
save_error(ctx, error, s);
if (ctx->ExecuteFlag)
- _mesa_error(ctx, error, s);
+ _mesa_error(ctx, error, "%s", s);
}
@@ -6686,7 +6885,7 @@ execute_list(GLcontext *ctx, GLuint list)
else {
switch (opcode) {
case OPCODE_ERROR:
- _mesa_error(ctx, n[1].e, (const char *) n[2].data);
+ _mesa_error(ctx, n[1].e, "%s", (const char *) n[2].data);
break;
case OPCODE_ACCUM:
CALL_Accum(ctx->Exec, (n[1].e, n[2].f));
@@ -7199,6 +7398,12 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_PROVOKING_VERTEX:
CALL_ProvokingVertexEXT(ctx->Exec, (n[1].e));
break;
+ case OPCODE_BEGIN_TRANSFORM_FEEDBACK:
+ CALL_BeginTransformFeedbackEXT(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_END_TRANSFORM_FEEDBACK:
+ CALL_EndTransformFeedbackEXT(ctx->Exec, ());
+ break;
case OPCODE_STENCIL_FUNC:
CALL_StencilFunc(ctx->Exec, (n[1].e, n[2].i, n[3].ui));
break;
@@ -7521,7 +7726,32 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_UNIFORM_4IV:
CALL_Uniform4ivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));
break;
-
+ case OPCODE_UNIFORM_1UI:
+ /*CALL_Uniform1uiARB(ctx->Exec, (n[1].i, n[2].i));*/
+ break;
+ case OPCODE_UNIFORM_2UI:
+ /*CALL_Uniform2uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i));*/
+ break;
+ case OPCODE_UNIFORM_3UI:
+ /*CALL_Uniform3uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));*/
+ break;
+ case OPCODE_UNIFORM_4UI:
+ /*CALL_Uniform4uiARB(ctx->Exec,
+ (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i));
+ */
+ break;
+ case OPCODE_UNIFORM_1UIV:
+ /*CALL_Uniform1uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/
+ break;
+ case OPCODE_UNIFORM_2UIV:
+ /*CALL_Uniform2uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/
+ break;
+ case OPCODE_UNIFORM_3UIV:
+ /*CALL_Uniform3uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/
+ break;
+ case OPCODE_UNIFORM_4UIV:
+ /*CALL_Uniform4uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/
+ break;
case OPCODE_UNIFORM_MATRIX22:
CALL_UniformMatrix2fvARB(ctx->Exec,
(n[1].i, n[2].i, n[3].b, n[4].data));
@@ -7685,9 +7915,9 @@ execute_list(GLcontext *ctx, GLuint list)
default:
{
char msg[1000];
- sprintf(msg, "Error in execute_list: opcode=%d",
+ _mesa_snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d",
(int) opcode);
- _mesa_problem(ctx, msg);
+ _mesa_problem(ctx, "%s", msg);
}
done = GL_TRUE;
}
@@ -8662,8 +8892,8 @@ exec_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
/* GL_EXT_multi_draw_arrays */
static void GLAPIENTRY
-exec_MultiDrawArraysEXT(GLenum mode, GLint * first,
- GLsizei * count, GLsizei primcount)
+exec_MultiDrawArraysEXT(GLenum mode, const GLint *first,
+ const GLsizei *count, GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
@@ -8707,9 +8937,15 @@ exec_MultiModeDrawElementsIBM(const GLenum * mode,
* initialized from _mesa_init_api_defaults and from the active vtxfmt
* struct.
*/
-void
-_mesa_init_save_table(struct _glapi_table *table)
+struct _glapi_table *
+_mesa_create_save_table(void)
{
+ struct _glapi_table *table;
+
+ table = _mesa_alloc_dispatch_table(sizeof *table);
+ if (table == NULL)
+ return NULL;
+
_mesa_loopback_init_api_table(table);
/* GL 1.0 */
@@ -9262,12 +9498,13 @@ _mesa_init_save_table(struct _glapi_table *table)
/* ARB 30/31/32. GL_ARB_shader_objects, GL_ARB_vertex/fragment_shader */
SET_BindAttribLocationARB(table, exec_BindAttribLocationARB);
SET_GetAttribLocationARB(table, exec_GetAttribLocationARB);
+ SET_GetUniformLocationARB(table, exec_GetUniformLocationARB);
/* XXX additional functions need to be implemented here! */
/* 299. GL_EXT_blend_equation_separate */
SET_BlendEquationSeparateEXT(table, save_BlendEquationSeparateEXT);
- /* GL_EXT_gpu_program_parmaeters */
+ /* GL_EXT_gpu_program_parameters */
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
SET_ProgramEnvParameters4fvEXT(table, save_ProgramEnvParameters4fvEXT);
SET_ProgramLocalParameters4fvEXT(table, save_ProgramLocalParameters4fvEXT);
@@ -9282,6 +9519,12 @@ _mesa_init_save_table(struct _glapi_table *table)
/* ARB 59. GL_ARB_copy_buffer */
SET_CopyBufferSubData(table, _mesa_CopyBufferSubData); /* no dlist save */
+ /* 352. GL_EXT_transform_feedback */
+#if FEATURE_EXT_transform_feedback
+ SET_BeginTransformFeedbackEXT(table, save_BeginTransformFeedback);
+ SET_EndTransformFeedbackEXT(table, save_EndTransformFeedback);
+#endif
+
/* 364. GL_EXT_provoking_vertex */
SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT);
@@ -9297,12 +9540,30 @@ _mesa_init_save_table(struct _glapi_table *table)
SET_ClearBufferuiv(table, save_ClearBufferuiv);
SET_ClearBufferfv(table, save_ClearBufferfv);
SET_ClearBufferfi(table, save_ClearBufferfi);
+ SET_Uniform1ui(table, save_Uniform1ui);
+ SET_Uniform2ui(table, save_Uniform2ui);
+ SET_Uniform3ui(table, save_Uniform3ui);
+ SET_Uniform4ui(table, save_Uniform4ui);
+ SET_Uniform1uiv(table, save_Uniform1uiv);
+ SET_Uniform2uiv(table, save_Uniform2uiv);
+ SET_Uniform3uiv(table, save_Uniform3uiv);
+ SET_Uniform4uiv(table, save_Uniform4uiv);
#else
(void) save_ClearBufferiv;
(void) save_ClearBufferuiv;
(void) save_ClearBufferfv;
(void) save_ClearBufferfi;
+ (void) save_Uniform1ui;
+ (void) save_Uniform2ui;
+ (void) save_Uniform3ui;
+ (void) save_Uniform4ui;
+ (void) save_Uniform1uiv;
+ (void) save_Uniform2uiv;
+ (void) save_Uniform3uiv;
+ (void) save_Uniform4uiv;
#endif
+
+ return table;
}
diff --git a/mesalib/src/mesa/main/dlist.h b/mesalib/src/mesa/main/dlist.h
index f37a93a7f..86bb132e5 100644
--- a/mesalib/src/mesa/main/dlist.h
+++ b/mesalib/src/mesa/main/dlist.h
@@ -38,16 +38,6 @@
#if FEATURE_dlist
-#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) \
- do { \
- (driver)->NewList = impl ## NewList; \
- (driver)->EndList = impl ## EndList; \
- (driver)->BeginCallList = impl ## BeginCallList; \
- (driver)->EndCallList = impl ## EndCallList; \
- (driver)->SaveFlushVertices = impl ## SaveFlushVertices; \
- (driver)->NotifySaveBegin = impl ## NotifyBegin; \
- } while (0)
-
#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) \
do { \
(vfmt)->CallList = impl ## CallList; \
@@ -72,7 +62,7 @@ extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist);
extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
-extern void _mesa_init_save_table( struct _glapi_table *table );
+extern struct _glapi_table *_mesa_create_save_table(void);
extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt);
@@ -81,7 +71,8 @@ extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp);
#else /* FEATURE_dlist */
-#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) do { } while (0)
+#include "main/compiler.h"
+
#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0)
static INLINE void
diff --git a/mesalib/src/mesa/main/dlopen.c b/mesalib/src/mesa/main/dlopen.c
index 658ac9e40..57a33292e 100644
--- a/mesalib/src/mesa/main/dlopen.c
+++ b/mesalib/src/mesa/main/dlopen.c
@@ -67,22 +67,27 @@ _mesa_dlopen(const char *libname, int flags)
GenericFunc
_mesa_dlsym(void *handle, const char *fname)
{
+ union {
+ void *v;
+ GenericFunc f;
+ } u;
#if defined(__blrts)
- return (GenericFunc) NULL;
+ u.v = NULL;
#elif defined(__DJGPP__)
/* need '_' prefix on symbol names */
char fname2[1000];
fname2[0] = '_';
strncpy(fname2 + 1, fname, 998);
fname2[999] = 0;
- return (GenericFunc) dlsym(handle, fname2);
+ u.v = dlsym(handle, fname2);
#elif defined(_GNU_SOURCE)
- return (GenericFunc) dlsym(handle, fname);
+ u.v = dlsym(handle, fname);
#elif defined(__MINGW32__)
- return (GenericFunc) GetProcAddress(handle, fname);
+ u.v = (void *) GetProcAddress(handle, fname);
#else
- return (GenericFunc) NULL;
+ u.v = NULL;
#endif
+ return u.f;
}
diff --git a/mesalib/src/mesa/main/drawpix.h b/mesalib/src/mesa/main/drawpix.h
index 8ffb1a6d8..1f95ff529 100644
--- a/mesalib/src/mesa/main/drawpix.h
+++ b/mesalib/src/mesa/main/drawpix.h
@@ -31,20 +31,11 @@
#if FEATURE_drawpix
-#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) \
- do { \
- (driver)->DrawPixels = impl ## DrawPixels; \
- (driver)->CopyPixels = impl ## CopyPixels; \
- (driver)->Bitmap = impl ## Bitmap; \
- } while (0)
-
extern void
_mesa_init_drawpix_dispatch(struct _glapi_table *disp);
#else /* FEATURE_drawpix */
-#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) do { } while (0)
-
static INLINE void
_mesa_init_drawpix_dispatch(struct _glapi_table *disp)
{
diff --git a/mesalib/src/mesa/main/drawtex.c b/mesalib/src/mesa/main/drawtex.c
new file mode 100644
index 000000000..c2ad5f238
--- /dev/null
+++ b/mesalib/src/mesa/main/drawtex.c
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "main/drawtex.h"
+#include "main/state.h"
+#include "main/imports.h"
+
+
+#if FEATURE_OES_draw_texture
+
+
+static void
+draw_texture(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat width, GLfloat height)
+{
+ if (!ctx->Extensions.OES_draw_texture) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawTex(unsupported)");
+ return;
+ }
+ if (width <= 0.0f || height <= 0.0f) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTex(width or height <= 0)");
+ return;
+ }
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ ASSERT(ctx->Driver.DrawTex);
+ ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, x, y, z, width, height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexfv(const GLfloat *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, coords[0], coords[1], coords[2], coords[3], coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
+ (GLfloat) width, (GLfloat) height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexiv(const GLint *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
+ (GLfloat) coords[2], (GLfloat) coords[3], (GLfloat) coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
+ (GLfloat) width, (GLfloat) height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexsv(const GLshort *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
+ (GLfloat) coords[2], (GLfloat) coords[3], (GLfloat) coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx,
+ (GLfloat) x / 65536.0f,
+ (GLfloat) y / 65536.0f,
+ (GLfloat) z / 65536.0f,
+ (GLfloat) width / 65536.0f,
+ (GLfloat) height / 65536.0f);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexxv(const GLfixed *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx,
+ (GLfloat) coords[0] / 65536.0f,
+ (GLfloat) coords[1] / 65536.0f,
+ (GLfloat) coords[2] / 65536.0f,
+ (GLfloat) coords[3] / 65536.0f,
+ (GLfloat) coords[4] / 65536.0f);
+}
+
+#endif /* FEATURE_OES_draw_texture */
diff --git a/mesalib/src/mesa/main/drawtex.h b/mesalib/src/mesa/main/drawtex.h
new file mode 100644
index 000000000..d7d507566
--- /dev/null
+++ b/mesalib/src/mesa/main/drawtex.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef DRAWTEX_H
+#define DRAWTEX_H
+
+
+#include "main/mtypes.h"
+
+
+#if FEATURE_OES_draw_texture
+
+extern void GLAPIENTRY
+_mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexfv(const GLfloat *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexiv(const GLint *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexsv(const GLshort *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexxv(const GLfixed *coords);
+
+#endif /* FEATURE_OES_draw_texture */
+
+
+#endif /* DRAWTEX_H */
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index f5c88a63e..db30123c0 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -42,9 +42,7 @@
#define CHECK_EXTENSION(EXTNAME, CAP) \
if (!ctx->Extensions.EXTNAME) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", \
- state ? "Enable" : "Disable", CAP); \
- return; \
+ goto invalid_enum_error; \
}
@@ -127,9 +125,7 @@ client_state(GLcontext *ctx, GLenum cap, GLboolean state)
#endif /* FEATURE_NV_vertex_program */
default:
- _mesa_error( ctx, GL_INVALID_ENUM,
- "glEnable/DisableClientState(0x%x)", cap);
- return;
+ goto invalid_enum_error;
}
if (*var == state)
@@ -150,6 +146,12 @@ client_state(GLcontext *ctx, GLenum cap, GLboolean state)
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
}
+
+ return;
+
+invalid_enum_error:
+ _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)",
+ state ? "Enable" : "Disable", cap);
}
@@ -188,16 +190,12 @@ _mesa_DisableClientState( GLenum cap )
#undef CHECK_EXTENSION
#define CHECK_EXTENSION(EXTNAME, CAP) \
if (!ctx->Extensions.EXTNAME) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \
- state ? "Enable" : "Disable", CAP); \
- return; \
+ goto invalid_enum_error; \
}
#define CHECK_EXTENSION2(EXT1, EXT2, CAP) \
if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \
- state ? "Enable" : "Disable", CAP); \
- return; \
+ goto invalid_enum_error; \
}
@@ -684,6 +682,25 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
}
break;
+#if FEATURE_ES1
+ case GL_TEXTURE_GEN_STR_OES:
+ /* disable S, T, and R at the same time */
+ {
+ struct gl_texture_unit *texUnit = get_texcoord_unit(ctx);
+ if (texUnit) {
+ GLuint newenabled =
+ texUnit->TexGenEnabled & ~STR_BITS;
+ if (state)
+ newenabled |= STR_BITS;
+ if (texUnit->TexGenEnabled == newenabled)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ texUnit->TexGenEnabled = newenabled;
+ }
+ }
+ break;
+#endif
+
/*
* CLIENT STATE!!!
*/
@@ -982,15 +999,40 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
ctx->Texture.CubeMapSeamless = state;
break;
+#if FEATURE_EXT_transform_feedback
+ case GL_RASTERIZER_DISCARD:
+ CHECK_EXTENSION(EXT_transform_feedback, cap);
+ if (ctx->TransformFeedback.RasterDiscard != state) {
+ ctx->TransformFeedback.RasterDiscard = state;
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ }
+ break;
+#endif
+
+ /* GL 3.1 primitive restart */
+ case GL_PRIMITIVE_RESTART:
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ goto invalid_enum_error;
+ }
+ if (ctx->Array.PrimitiveRestart != state) {
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ ctx->Array.PrimitiveRestart = state;
+ }
+ break;
+
default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "%s(0x%x)", state ? "glEnable" : "glDisable", cap);
- return;
+ goto invalid_enum_error;
}
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
}
+
+ return;
+
+invalid_enum_error:
+ _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)",
+ state ? "Enable" : "Disable", cap);
}
@@ -1033,7 +1075,7 @@ _mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state)
switch (cap) {
case GL_BLEND:
if (!ctx->Extensions.EXT_draw_buffers2) {
- goto bad_cap_error;
+ goto invalid_enum_error;
}
if (index >= ctx->Const.MaxDrawBuffers) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)",
@@ -1049,11 +1091,11 @@ _mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state)
}
break;
default:
- goto bad_cap_error;
+ goto invalid_enum_error;
}
return;
-bad_cap_error:
+invalid_enum_error:
_mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)",
state ? "glEnablei" : "glDisablei",
_mesa_lookup_enum_by_nr(cap));
@@ -1103,15 +1145,13 @@ _mesa_IsEnabledIndexed( GLenum cap, GLuint index )
#undef CHECK_EXTENSION
#define CHECK_EXTENSION(EXTNAME) \
if (!ctx->Extensions.EXTNAME) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); \
- return GL_FALSE; \
+ goto invalid_enum_error; \
}
#undef CHECK_EXTENSION2
#define CHECK_EXTENSION2(EXT1, EXT2) \
if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); \
- return GL_FALSE; \
+ goto invalid_enum_error; \
}
@@ -1280,6 +1320,15 @@ _mesa_IsEnabled( GLenum cap )
}
}
return GL_FALSE;
+#if FEATURE_ES1
+ case GL_TEXTURE_GEN_STR_OES:
+ {
+ const struct gl_texture_unit *texUnit = get_texcoord_unit(ctx);
+ if (texUnit) {
+ return (texUnit->TexGenEnabled & STR_BITS) == STR_BITS ? GL_TRUE : GL_FALSE;
+ }
+ }
+#endif
/*
* CLIENT STATE!!!
@@ -1493,8 +1542,26 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(ARB_seamless_cube_map);
return ctx->Texture.CubeMapSeamless;
+#if FEATURE_EXT_transform_feedback
+ case GL_RASTERIZER_DISCARD:
+ CHECK_EXTENSION(EXT_transform_feedback);
+ return ctx->TransformFeedback.RasterDiscard;
+#endif
+
+ /* GL 3.1 primitive restart */
+ case GL_PRIMITIVE_RESTART:
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ goto invalid_enum_error;
+ }
+ return ctx->Array.PrimitiveRestart;
+
default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
- return GL_FALSE;
+ goto invalid_enum_error;
}
+
+ return GL_FALSE;
+
+invalid_enum_error:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
+ return GL_FALSE;
}
diff --git a/mesalib/src/mesa/main/enums.c b/mesalib/src/mesa/main/enums.c
index 06d51d4e5..bc18e1b11 100644
--- a/mesalib/src/mesa/main/enums.c
+++ b/mesalib/src/mesa/main/enums.c
@@ -109,6 +109,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_BACK_RIGHT\0"
"GL_BGR\0"
"GL_BGRA\0"
+ "GL_BGRA_EXT\0"
"GL_BITMAP\0"
"GL_BITMAP_TOKEN\0"
"GL_BLEND\0"
@@ -116,16 +117,23 @@ LONGSTRING static const char enum_string_table[] =
"GL_BLEND_COLOR_EXT\0"
"GL_BLEND_DST\0"
"GL_BLEND_DST_ALPHA\0"
+ "GL_BLEND_DST_ALPHA_OES\0"
"GL_BLEND_DST_RGB\0"
+ "GL_BLEND_DST_RGB_OES\0"
"GL_BLEND_EQUATION\0"
"GL_BLEND_EQUATION_ALPHA\0"
"GL_BLEND_EQUATION_ALPHA_EXT\0"
+ "GL_BLEND_EQUATION_ALPHA_OES\0"
"GL_BLEND_EQUATION_EXT\0"
+ "GL_BLEND_EQUATION_OES\0"
"GL_BLEND_EQUATION_RGB\0"
"GL_BLEND_EQUATION_RGB_EXT\0"
+ "GL_BLEND_EQUATION_RGB_OES\0"
"GL_BLEND_SRC\0"
"GL_BLEND_SRC_ALPHA\0"
+ "GL_BLEND_SRC_ALPHA_OES\0"
"GL_BLEND_SRC_RGB\0"
+ "GL_BLEND_SRC_RGB_OES\0"
"GL_BLUE\0"
"GL_BLUE_BIAS\0"
"GL_BLUE_BITS\0"
@@ -140,11 +148,14 @@ LONGSTRING static const char enum_string_table[] =
"GL_BOOL_VEC4_ARB\0"
"GL_BUFFER_ACCESS\0"
"GL_BUFFER_ACCESS_ARB\0"
+ "GL_BUFFER_ACCESS_OES\0"
"GL_BUFFER_FLUSHING_UNMAP_APPLE\0"
"GL_BUFFER_MAPPED\0"
"GL_BUFFER_MAPPED_ARB\0"
+ "GL_BUFFER_MAPPED_OES\0"
"GL_BUFFER_MAP_POINTER\0"
"GL_BUFFER_MAP_POINTER_ARB\0"
+ "GL_BUFFER_MAP_POINTER_OES\0"
"GL_BUFFER_OBJECT_APPLE\0"
"GL_BUFFER_SERIALIZED_MODIFY_APPLE\0"
"GL_BUFFER_SIZE\0"
@@ -194,6 +205,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_COLOR_ARRAY_TYPE\0"
"GL_COLOR_ATTACHMENT0\0"
"GL_COLOR_ATTACHMENT0_EXT\0"
+ "GL_COLOR_ATTACHMENT0_OES\0"
"GL_COLOR_ATTACHMENT1\0"
"GL_COLOR_ATTACHMENT10\0"
"GL_COLOR_ATTACHMENT10_EXT\0"
@@ -336,6 +348,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_COORD_REPLACE\0"
"GL_COORD_REPLACE_ARB\0"
"GL_COORD_REPLACE_NV\0"
+ "GL_COORD_REPLACE_OES\0"
"GL_COPY\0"
"GL_COPY_INVERTED\0"
"GL_COPY_PIXEL_TOKEN\0"
@@ -359,6 +372,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
"GL_CURRENT_NORMAL\0"
"GL_CURRENT_PALETTE_MATRIX_ARB\0"
+ "GL_CURRENT_PALETTE_MATRIX_OES\0"
"GL_CURRENT_PROGRAM\0"
"GL_CURRENT_QUERY\0"
"GL_CURRENT_QUERY_ARB\0"
@@ -386,8 +400,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH\0"
"GL_DEPTH24_STENCIL8\0"
"GL_DEPTH24_STENCIL8_EXT\0"
+ "GL_DEPTH24_STENCIL8_OES\0"
"GL_DEPTH_ATTACHMENT\0"
"GL_DEPTH_ATTACHMENT_EXT\0"
+ "GL_DEPTH_ATTACHMENT_OES\0"
"GL_DEPTH_BIAS\0"
"GL_DEPTH_BITS\0"
"GL_DEPTH_BOUNDS_EXT\0"
@@ -399,12 +415,15 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_COMPONENT\0"
"GL_DEPTH_COMPONENT16\0"
"GL_DEPTH_COMPONENT16_ARB\0"
+ "GL_DEPTH_COMPONENT16_OES\0"
"GL_DEPTH_COMPONENT16_SGIX\0"
"GL_DEPTH_COMPONENT24\0"
"GL_DEPTH_COMPONENT24_ARB\0"
+ "GL_DEPTH_COMPONENT24_OES\0"
"GL_DEPTH_COMPONENT24_SGIX\0"
"GL_DEPTH_COMPONENT32\0"
"GL_DEPTH_COMPONENT32_ARB\0"
+ "GL_DEPTH_COMPONENT32_OES\0"
"GL_DEPTH_COMPONENT32_SGIX\0"
"GL_DEPTH_FUNC\0"
"GL_DEPTH_RANGE\0"
@@ -413,6 +432,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_STENCIL_ATTACHMENT\0"
"GL_DEPTH_STENCIL_EXT\0"
"GL_DEPTH_STENCIL_NV\0"
+ "GL_DEPTH_STENCIL_OES\0"
"GL_DEPTH_STENCIL_TO_BGRA_NV\0"
"GL_DEPTH_STENCIL_TO_RGBA_NV\0"
"GL_DEPTH_TEST\0"
@@ -525,6 +545,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_FILL\0"
"GL_FIRST_VERTEX_CONVENTION\0"
"GL_FIRST_VERTEX_CONVENTION_EXT\0"
+ "GL_FIXED\0"
+ "GL_FIXED_OES\0"
"GL_FLAT\0"
"GL_FLOAT\0"
"GL_FLOAT_MAT2\0"
@@ -577,6 +599,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAGMENT_SHADER\0"
"GL_FRAGMENT_SHADER_ARB\0"
"GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES\0"
"GL_FRAMEBUFFER\0"
"GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE\0"
"GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE\0"
@@ -584,42 +607,61 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\0"
"GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE\0"
"GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES\0"
"GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE\0"
"GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES\0"
"GL_FRAMEBUFFER_BINDING\0"
"GL_FRAMEBUFFER_BINDING_EXT\0"
+ "GL_FRAMEBUFFER_BINDING_OES\0"
"GL_FRAMEBUFFER_COMPLETE\0"
"GL_FRAMEBUFFER_COMPLETE_EXT\0"
+ "GL_FRAMEBUFFER_COMPLETE_OES\0"
"GL_FRAMEBUFFER_DEFAULT\0"
"GL_FRAMEBUFFER_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS\0"
"GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES\0"
"GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES\0"
"GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES\0"
"GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\0"
"GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES\0"
+ "GL_FRAMEBUFFER_OES\0"
"GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
"GL_FRAMEBUFFER_UNDEFINED\0"
"GL_FRAMEBUFFER_UNSUPPORTED\0"
"GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
+ "GL_FRAMEBUFFER_UNSUPPORTED_OES\0"
"GL_FRONT\0"
"GL_FRONT_AND_BACK\0"
"GL_FRONT_FACE\0"
@@ -627,14 +669,21 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRONT_RIGHT\0"
"GL_FUNC_ADD\0"
"GL_FUNC_ADD_EXT\0"
+ "GL_FUNC_ADD_OES\0"
"GL_FUNC_REVERSE_SUBTRACT\0"
"GL_FUNC_REVERSE_SUBTRACT_EXT\0"
+ "GL_FUNC_REVERSE_SUBTRACT_OES\0"
"GL_FUNC_SUBTRACT\0"
"GL_FUNC_SUBTRACT_EXT\0"
+ "GL_FUNC_SUBTRACT_OES\0"
"GL_GENERATE_MIPMAP\0"
"GL_GENERATE_MIPMAP_HINT\0"
"GL_GENERATE_MIPMAP_HINT_SGIS\0"
"GL_GENERATE_MIPMAP_SGIS\0"
+ "GL_GEOMETRY_INPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_OUTPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_SHADER_ARB\0"
+ "GL_GEOMETRY_VERTICES_OUT_ARB\0"
"GL_GEQUAL\0"
"GL_GREATER\0"
"GL_GREEN\0"
@@ -642,6 +691,9 @@ LONGSTRING static const char enum_string_table[] =
"GL_GREEN_BITS\0"
"GL_GREEN_SCALE\0"
"GL_HALF_FLOAT\0"
+ "GL_HALF_FLOAT_OES\0"
+ "GL_HIGH_FLOAT\0"
+ "GL_HIGH_INT\0"
"GL_HINT_BIT\0"
"GL_HISTOGRAM\0"
"GL_HISTOGRAM_ALPHA_SIZE\0"
@@ -663,7 +715,9 @@ LONGSTRING static const char enum_string_table[] =
"GL_HISTOGRAM_WIDTH_EXT\0"
"GL_IDENTITY_NV\0"
"GL_IGNORE_BORDER_HP\0"
+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT\0"
"GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
+ "GL_IMPLEMENTATION_COLOR_READ_TYPE\0"
"GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
"GL_INCR\0"
"GL_INCR_WRAP\0"
@@ -694,9 +748,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_INTENSITY8\0"
"GL_INTENSITY8_EXT\0"
"GL_INTENSITY_EXT\0"
+ "GL_INTERLEAVED_ATTRIBS_EXT\0"
"GL_INTERPOLATE\0"
"GL_INTERPOLATE_ARB\0"
"GL_INTERPOLATE_EXT\0"
+ "GL_INT_10_10_10_2_OES\0"
"GL_INT_VEC2\0"
"GL_INT_VEC2_ARB\0"
"GL_INT_VEC3\0"
@@ -706,6 +762,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_INVALID_ENUM\0"
"GL_INVALID_FRAMEBUFFER_OPERATION\0"
"GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
+ "GL_INVALID_FRAMEBUFFER_OPERATION_OES\0"
"GL_INVALID_OPERATION\0"
"GL_INVALID_VALUE\0"
"GL_INVERSE_NV\0"
@@ -740,6 +797,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_LINEAR_MIPMAP_LINEAR\0"
"GL_LINEAR_MIPMAP_NEAREST\0"
"GL_LINES\0"
+ "GL_LINES_ADJACENCY_ARB\0"
"GL_LINE_BIT\0"
"GL_LINE_LOOP\0"
"GL_LINE_RESET_TOKEN\0"
@@ -749,6 +807,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_LINE_STIPPLE_PATTERN\0"
"GL_LINE_STIPPLE_REPEAT\0"
"GL_LINE_STRIP\0"
+ "GL_LINE_STRIP_ADJACENCY_ARB\0"
"GL_LINE_TOKEN\0"
"GL_LINE_WIDTH\0"
"GL_LINE_WIDTH_GRANULARITY\0"
@@ -762,6 +821,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_LOGIC_OP\0"
"GL_LOGIC_OP_MODE\0"
"GL_LOWER_LEFT\0"
+ "GL_LOW_FLOAT\0"
+ "GL_LOW_INT\0"
"GL_LUMINANCE\0"
"GL_LUMINANCE12\0"
"GL_LUMINANCE12_ALPHA12\0"
@@ -887,14 +948,22 @@ LONGSTRING static const char enum_string_table[] =
"GL_MATRIX8_ARB\0"
"GL_MATRIX9_ARB\0"
"GL_MATRIX_INDEX_ARRAY_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_OES\0"
"GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_POINTER_OES\0"
"GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_SIZE_OES\0"
"GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_STRIDE_OES\0"
"GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_TYPE_OES\0"
"GL_MATRIX_MODE\0"
"GL_MATRIX_PALETTE_ARB\0"
+ "GL_MATRIX_PALETTE_OES\0"
"GL_MAX\0"
"GL_MAX_3D_TEXTURE_SIZE\0"
+ "GL_MAX_3D_TEXTURE_SIZE_OES\0"
"GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
"GL_MAX_ATTRIB_STACK_DEPTH\0"
"GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
@@ -913,6 +982,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_CONVOLUTION_WIDTH_EXT\0"
"GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
"GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES\0"
"GL_MAX_DRAW_BUFFERS\0"
"GL_MAX_DRAW_BUFFERS_ARB\0"
"GL_MAX_DRAW_BUFFERS_ATI\0"
@@ -922,12 +992,19 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_EXT\0"
"GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
"GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_FRAGMENT_UNIFORM_VECTORS\0"
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB\0"
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB\0"
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB\0"
"GL_MAX_LIGHTS\0"
"GL_MAX_LIST_NESTING\0"
"GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
"GL_MAX_MODELVIEW_STACK_DEPTH\0"
"GL_MAX_NAME_STACK_DEPTH\0"
"GL_MAX_PALETTE_MATRICES_ARB\0"
+ "GL_MAX_PALETTE_MATRICES_OES\0"
"GL_MAX_PIXEL_MAP_TABLE\0"
"GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
"GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
@@ -959,6 +1036,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
"GL_MAX_RENDERBUFFER_SIZE\0"
"GL_MAX_RENDERBUFFER_SIZE_EXT\0"
+ "GL_MAX_RENDERBUFFER_SIZE_OES\0"
"GL_MAX_SAMPLES\0"
"GL_MAX_SAMPLES_EXT\0"
"GL_MAX_SERVER_WAIT_TIMEOUT\0"
@@ -969,6 +1047,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
"GL_MAX_TEXTURE_LOD_BIAS\0"
+ "GL_MAX_TEXTURE_LOD_BIAS_EXT\0"
"GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
"GL_MAX_TEXTURE_SIZE\0"
"GL_MAX_TEXTURE_STACK_DEPTH\0"
@@ -976,16 +1055,26 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_TEXTURE_UNITS_ARB\0"
"GL_MAX_TRACK_MATRICES_NV\0"
"GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT\0"
+ "GL_MAX_VARYING_COMPONENTS\0"
"GL_MAX_VARYING_FLOATS\0"
"GL_MAX_VARYING_FLOATS_ARB\0"
+ "GL_MAX_VARYING_VECTORS\0"
"GL_MAX_VERTEX_ATTRIBS\0"
"GL_MAX_VERTEX_ATTRIBS_ARB\0"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
"GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
"GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_VERTEX_UNIFORM_VECTORS\0"
"GL_MAX_VERTEX_UNITS_ARB\0"
+ "GL_MAX_VERTEX_UNITS_OES\0"
+ "GL_MAX_VERTEX_VARYING_COMPONENTS_ARB\0"
"GL_MAX_VIEWPORT_DIMS\0"
+ "GL_MEDIUM_FLOAT\0"
+ "GL_MEDIUM_INT\0"
"GL_MIN\0"
"GL_MINMAX\0"
"GL_MINMAX_EXT\0"
@@ -1036,6 +1125,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MODELVIEW8_ARB\0"
"GL_MODELVIEW9_ARB\0"
"GL_MODELVIEW_MATRIX\0"
+ "GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES\0"
"GL_MODELVIEW_PROJECTION_NV\0"
"GL_MODELVIEW_STACK_DEPTH\0"
"GL_MODULATE\0"
@@ -1061,6 +1151,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_NEVER\0"
"GL_NICEST\0"
"GL_NONE\0"
+ "GL_NONE_OES\0"
"GL_NOOP\0"
"GL_NOR\0"
"GL_NORMALIZE\0"
@@ -1073,10 +1164,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_NORMAL_MAP\0"
"GL_NORMAL_MAP_ARB\0"
"GL_NORMAL_MAP_NV\0"
+ "GL_NORMAL_MAP_OES\0"
"GL_NOTEQUAL\0"
"GL_NO_ERROR\0"
"GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
"GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
+ "GL_NUM_PROGRAM_BINARY_FORMATS_OES\0"
+ "GL_NUM_SHADER_BINARY_FORMATS\0"
"GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
"GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
"GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
@@ -1191,6 +1285,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
"GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
"GL_POINT_SIZE\0"
+ "GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_POINT_SIZE_ARRAY_OES\0"
+ "GL_POINT_SIZE_ARRAY_POINTER_OES\0"
+ "GL_POINT_SIZE_ARRAY_STRIDE_OES\0"
+ "GL_POINT_SIZE_ARRAY_TYPE_OES\0"
"GL_POINT_SIZE_GRANULARITY\0"
"GL_POINT_SIZE_MAX\0"
"GL_POINT_SIZE_MAX_ARB\0"
@@ -1207,6 +1306,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_POINT_SPRITE_ARB\0"
"GL_POINT_SPRITE_COORD_ORIGIN\0"
"GL_POINT_SPRITE_NV\0"
+ "GL_POINT_SPRITE_OES\0"
"GL_POINT_SPRITE_R_MODE_NV\0"
"GL_POINT_TOKEN\0"
"GL_POLYGON\0"
@@ -1268,9 +1368,12 @@ LONGSTRING static const char enum_string_table[] =
"GL_PRIMARY_COLOR\0"
"GL_PRIMARY_COLOR_ARB\0"
"GL_PRIMARY_COLOR_EXT\0"
+ "GL_PRIMITIVES_GENERATED_EXT\0"
"GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
"GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
"GL_PROGRAM_ATTRIBS_ARB\0"
+ "GL_PROGRAM_BINARY_FORMATS_OES\0"
+ "GL_PROGRAM_BINARY_LENGTH_OES\0"
"GL_PROGRAM_BINDING_ARB\0"
"GL_PROGRAM_ERROR_POSITION_ARB\0"
"GL_PROGRAM_ERROR_POSITION_NV\0"
@@ -1291,6 +1394,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROGRAM_OBJECT_ARB\0"
"GL_PROGRAM_PARAMETERS_ARB\0"
"GL_PROGRAM_PARAMETER_NV\0"
+ "GL_PROGRAM_POINT_SIZE_ARB\0"
"GL_PROGRAM_RESIDENT_NV\0"
"GL_PROGRAM_STRING_ARB\0"
"GL_PROGRAM_STRING_NV\0"
@@ -1301,6 +1405,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
"GL_PROJECTION\0"
"GL_PROJECTION_MATRIX\0"
+ "GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES\0"
"GL_PROJECTION_STACK_DEPTH\0"
"GL_PROVOKING_VERTEX\0"
"GL_PROVOKING_VERTEX_EXT\0"
@@ -1341,6 +1446,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_QUERY_WAIT_NV\0"
"GL_R\0"
"GL_R3_G3_B2\0"
+ "GL_RASTERIZER_DISCARD_EXT\0"
"GL_RASTER_POSITION_UNCLIPPED_IBM\0"
"GL_READ_BUFFER\0"
"GL_READ_FRAMEBUFFER\0"
@@ -1360,26 +1466,38 @@ LONGSTRING static const char enum_string_table[] =
"GL_REFLECTION_MAP\0"
"GL_REFLECTION_MAP_ARB\0"
"GL_REFLECTION_MAP_NV\0"
+ "GL_REFLECTION_MAP_OES\0"
"GL_RELEASED_APPLE\0"
"GL_RENDER\0"
"GL_RENDERBUFFER\0"
"GL_RENDERBUFFER_ALPHA_SIZE\0"
+ "GL_RENDERBUFFER_ALPHA_SIZE_OES\0"
"GL_RENDERBUFFER_BINDING\0"
"GL_RENDERBUFFER_BINDING_EXT\0"
+ "GL_RENDERBUFFER_BINDING_OES\0"
"GL_RENDERBUFFER_BLUE_SIZE\0"
+ "GL_RENDERBUFFER_BLUE_SIZE_OES\0"
"GL_RENDERBUFFER_DEPTH_SIZE\0"
+ "GL_RENDERBUFFER_DEPTH_SIZE_OES\0"
"GL_RENDERBUFFER_EXT\0"
"GL_RENDERBUFFER_GREEN_SIZE\0"
+ "GL_RENDERBUFFER_GREEN_SIZE_OES\0"
"GL_RENDERBUFFER_HEIGHT\0"
"GL_RENDERBUFFER_HEIGHT_EXT\0"
+ "GL_RENDERBUFFER_HEIGHT_OES\0"
"GL_RENDERBUFFER_INTERNAL_FORMAT\0"
"GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
+ "GL_RENDERBUFFER_INTERNAL_FORMAT_OES\0"
+ "GL_RENDERBUFFER_OES\0"
"GL_RENDERBUFFER_RED_SIZE\0"
+ "GL_RENDERBUFFER_RED_SIZE_OES\0"
"GL_RENDERBUFFER_SAMPLES\0"
"GL_RENDERBUFFER_SAMPLES_EXT\0"
"GL_RENDERBUFFER_STENCIL_SIZE\0"
+ "GL_RENDERBUFFER_STENCIL_SIZE_OES\0"
"GL_RENDERBUFFER_WIDTH\0"
"GL_RENDERBUFFER_WIDTH_EXT\0"
+ "GL_RENDERBUFFER_WIDTH_OES\0"
"GL_RENDERER\0"
"GL_RENDER_MODE\0"
"GL_REPEAT\0"
@@ -1404,11 +1522,15 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGB4_EXT\0"
"GL_RGB4_S3TC\0"
"GL_RGB5\0"
+ "GL_RGB565\0"
+ "GL_RGB565_OES\0"
"GL_RGB5_A1\0"
"GL_RGB5_A1_EXT\0"
+ "GL_RGB5_A1_OES\0"
"GL_RGB5_EXT\0"
"GL_RGB8\0"
"GL_RGB8_EXT\0"
+ "GL_RGB8_OES\0"
"GL_RGBA\0"
"GL_RGBA12\0"
"GL_RGBA12_EXT\0"
@@ -1419,9 +1541,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGBA4\0"
"GL_RGBA4_DXT5_S3TC\0"
"GL_RGBA4_EXT\0"
+ "GL_RGBA4_OES\0"
"GL_RGBA4_S3TC\0"
"GL_RGBA8\0"
"GL_RGBA8_EXT\0"
+ "GL_RGBA8_OES\0"
"GL_RGBA8_SNORM\0"
"GL_RGBA_DXT5_S3TC\0"
"GL_RGBA_MODE\0"
@@ -1438,6 +1562,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_SAMPLER_2D\0"
"GL_SAMPLER_2D_SHADOW\0"
"GL_SAMPLER_3D\0"
+ "GL_SAMPLER_3D_OES\0"
"GL_SAMPLER_CUBE\0"
"GL_SAMPLES\0"
"GL_SAMPLES_3DFX\0"
@@ -1471,9 +1596,12 @@ LONGSTRING static const char enum_string_table[] =
"GL_SELECTION_BUFFER_POINTER\0"
"GL_SELECTION_BUFFER_SIZE\0"
"GL_SEPARABLE_2D\0"
+ "GL_SEPARATE_ATTRIBS_EXT\0"
"GL_SEPARATE_SPECULAR_COLOR\0"
"GL_SEPARATE_SPECULAR_COLOR_EXT\0"
"GL_SET\0"
+ "GL_SHADER_BINARY_FORMATS\0"
+ "GL_SHADER_COMPILER\0"
"GL_SHADER_OBJECT_ARB\0"
"GL_SHADER_SOURCE_LENGTH\0"
"GL_SHADER_TYPE\0"
@@ -1546,6 +1674,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_STENCIL\0"
"GL_STENCIL_ATTACHMENT\0"
"GL_STENCIL_ATTACHMENT_EXT\0"
+ "GL_STENCIL_ATTACHMENT_OES\0"
"GL_STENCIL_BACK_FAIL\0"
"GL_STENCIL_BACK_FAIL_ATI\0"
"GL_STENCIL_BACK_FUNC\0"
@@ -1567,10 +1696,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_STENCIL_INDEX16\0"
"GL_STENCIL_INDEX16_EXT\0"
"GL_STENCIL_INDEX1_EXT\0"
+ "GL_STENCIL_INDEX1_OES\0"
"GL_STENCIL_INDEX4\0"
"GL_STENCIL_INDEX4_EXT\0"
+ "GL_STENCIL_INDEX4_OES\0"
"GL_STENCIL_INDEX8\0"
"GL_STENCIL_INDEX8_EXT\0"
+ "GL_STENCIL_INDEX8_OES\0"
"GL_STENCIL_INDEX_EXT\0"
"GL_STENCIL_PASS_DEPTH_FAIL\0"
"GL_STENCIL_PASS_DEPTH_PASS\0"
@@ -1677,6 +1809,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_2D\0"
"GL_TEXTURE_2D_ARRAY_EXT\0"
"GL_TEXTURE_3D\0"
+ "GL_TEXTURE_3D_OES\0"
"GL_TEXTURE_ALPHA_SIZE\0"
"GL_TEXTURE_ALPHA_SIZE_EXT\0"
"GL_TEXTURE_BASE_LEVEL\0"
@@ -1685,8 +1818,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_BINDING_2D\0"
"GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
"GL_TEXTURE_BINDING_3D\0"
+ "GL_TEXTURE_BINDING_3D_OES\0"
"GL_TEXTURE_BINDING_CUBE_MAP\0"
"GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
+ "GL_TEXTURE_BINDING_CUBE_MAP_OES\0"
"GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
"GL_TEXTURE_BINDING_RECTANGLE_NV\0"
"GL_TEXTURE_BIT\0"
@@ -1724,20 +1859,28 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_COORD_ARRAY_SIZE\0"
"GL_TEXTURE_COORD_ARRAY_STRIDE\0"
"GL_TEXTURE_COORD_ARRAY_TYPE\0"
+ "GL_TEXTURE_CROP_RECT_OES\0"
"GL_TEXTURE_CUBE_MAP\0"
"GL_TEXTURE_CUBE_MAP_ARB\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
"GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES\0"
+ "GL_TEXTURE_CUBE_MAP_OES\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
"GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES\0"
"GL_TEXTURE_CUBE_MAP_SEAMLESS\0"
"GL_TEXTURE_DEPTH\0"
"GL_TEXTURE_DEPTH_SIZE\0"
@@ -1746,10 +1889,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_ENV_COLOR\0"
"GL_TEXTURE_ENV_MODE\0"
"GL_TEXTURE_FILTER_CONTROL\0"
+ "GL_TEXTURE_FILTER_CONTROL_EXT\0"
"GL_TEXTURE_GEN_MODE\0"
+ "GL_TEXTURE_GEN_MODE_OES\0"
"GL_TEXTURE_GEN_Q\0"
"GL_TEXTURE_GEN_R\0"
"GL_TEXTURE_GEN_S\0"
+ "GL_TEXTURE_GEN_STR_OES\0"
"GL_TEXTURE_GEN_T\0"
"GL_TEXTURE_GEQUAL_R_SGIX\0"
"GL_TEXTURE_GREEN_SIZE\0"
@@ -1769,6 +1915,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
"GL_TEXTURE_MAG_FILTER\0"
"GL_TEXTURE_MATRIX\0"
+ "GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES\0"
"GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
"GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
"GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
@@ -1793,6 +1940,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
"GL_TEXTURE_WIDTH\0"
"GL_TEXTURE_WRAP_R\0"
+ "GL_TEXTURE_WRAP_R_OES\0"
"GL_TEXTURE_WRAP_S\0"
"GL_TEXTURE_WRAP_T\0"
"GL_TIMEOUT_EXPIRED\0"
@@ -1800,6 +1948,18 @@ LONGSTRING static const char enum_string_table[] =
"GL_TRACK_MATRIX_NV\0"
"GL_TRACK_MATRIX_TRANSFORM_NV\0"
"GL_TRANSFORM_BIT\0"
+ "GL_TRANSFORM_FEEDBACK\0"
+ "GL_TRANSFORM_FEEDBACK_BINDING\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYINGS_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT\0"
"GL_TRANSPOSE_COLOR_MATRIX\0"
"GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
"GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
@@ -1811,9 +1971,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_TRANSPOSE_TEXTURE_MATRIX\0"
"GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
"GL_TRIANGLES\0"
+ "GL_TRIANGLES_ADJACENCY_ARB\0"
"GL_TRIANGLE_FAN\0"
"GL_TRIANGLE_MESH_SUN\0"
"GL_TRIANGLE_STRIP\0"
+ "GL_TRIANGLE_STRIP_ADJACENCY_ARB\0"
"GL_TRUE\0"
"GL_UNDEFINED_APPLE\0"
"GL_UNPACK_ALIGNMENT\0"
@@ -1830,17 +1992,22 @@ LONGSTRING static const char enum_string_table[] =
"GL_UNSIGNED_BYTE_3_3_2\0"
"GL_UNSIGNED_INT\0"
"GL_UNSIGNED_INT_10_10_10_2\0"
+ "GL_UNSIGNED_INT_10_10_10_2_OES\0"
"GL_UNSIGNED_INT_24_8\0"
"GL_UNSIGNED_INT_24_8_EXT\0"
"GL_UNSIGNED_INT_24_8_NV\0"
+ "GL_UNSIGNED_INT_24_8_OES\0"
"GL_UNSIGNED_INT_2_10_10_10_REV\0"
+ "GL_UNSIGNED_INT_2_10_10_10_REV_EXT\0"
"GL_UNSIGNED_INT_8_8_8_8\0"
"GL_UNSIGNED_INT_8_8_8_8_REV\0"
"GL_UNSIGNED_NORMALIZED\0"
"GL_UNSIGNED_SHORT\0"
"GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
+ "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT\0"
"GL_UNSIGNED_SHORT_4_4_4_4\0"
"GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
+ "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT\0"
"GL_UNSIGNED_SHORT_5_5_5_1\0"
"GL_UNSIGNED_SHORT_5_6_5\0"
"GL_UNSIGNED_SHORT_5_6_5_REV\0"
@@ -1913,14 +2080,21 @@ LONGSTRING static const char enum_string_table[] =
"GL_WEIGHT_ARRAY_ARB\0"
"GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
"GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_WEIGHT_ARRAY_OES\0"
"GL_WEIGHT_ARRAY_POINTER_ARB\0"
+ "GL_WEIGHT_ARRAY_POINTER_OES\0"
"GL_WEIGHT_ARRAY_SIZE_ARB\0"
+ "GL_WEIGHT_ARRAY_SIZE_OES\0"
"GL_WEIGHT_ARRAY_STRIDE_ARB\0"
+ "GL_WEIGHT_ARRAY_STRIDE_OES\0"
"GL_WEIGHT_ARRAY_TYPE_ARB\0"
+ "GL_WEIGHT_ARRAY_TYPE_OES\0"
"GL_WEIGHT_SUM_UNITY_ARB\0"
"GL_WRAP_BORDER_SUN\0"
"GL_WRITE_ONLY\0"
"GL_WRITE_ONLY_ARB\0"
+ "GL_WRITE_ONLY_OES\0"
"GL_XOR\0"
"GL_YCBCR_422_APPLE\0"
"GL_YCBCR_MESA\0"
@@ -1929,7 +2103,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1891] =
+static const enum_elt all_enums[2065] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2004,3184 +2178,3424 @@ static const enum_elt all_enums[1891] =
{ 1175, 0x00000403 }, /* GL_BACK_RIGHT */
{ 1189, 0x000080E0 }, /* GL_BGR */
{ 1196, 0x000080E1 }, /* GL_BGRA */
- { 1204, 0x00001A00 }, /* GL_BITMAP */
- { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
- { 1230, 0x00000BE2 }, /* GL_BLEND */
- { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
- { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
- { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
- { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
- { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
- { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
- { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
- { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
- { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
- { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
- { 1436, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
- { 1462, 0x00000BE1 }, /* GL_BLEND_SRC */
- { 1475, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
- { 1494, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
- { 1511, 0x00001905 }, /* GL_BLUE */
- { 1519, 0x00000D1B }, /* GL_BLUE_BIAS */
- { 1532, 0x00000D54 }, /* GL_BLUE_BITS */
- { 1545, 0x00000D1A }, /* GL_BLUE_SCALE */
- { 1559, 0x00008B56 }, /* GL_BOOL */
- { 1567, 0x00008B56 }, /* GL_BOOL_ARB */
- { 1579, 0x00008B57 }, /* GL_BOOL_VEC2 */
- { 1592, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
- { 1609, 0x00008B58 }, /* GL_BOOL_VEC3 */
- { 1622, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
- { 1639, 0x00008B59 }, /* GL_BOOL_VEC4 */
- { 1652, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
- { 1669, 0x000088BB }, /* GL_BUFFER_ACCESS */
- { 1686, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
- { 1707, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- { 1738, 0x000088BC }, /* GL_BUFFER_MAPPED */
- { 1755, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
- { 1776, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
- { 1798, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
- { 1824, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
- { 1847, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- { 1881, 0x00008764 }, /* GL_BUFFER_SIZE */
- { 1896, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
- { 1915, 0x00008765 }, /* GL_BUFFER_USAGE */
- { 1931, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
- { 1951, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
- { 1970, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- { 1996, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
- { 2019, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- { 2047, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
- { 2066, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
- { 2088, 0x00001400 }, /* GL_BYTE */
- { 2096, 0x00002A24 }, /* GL_C3F_V3F */
- { 2107, 0x00002A26 }, /* GL_C4F_N3F_V3F */
- { 2122, 0x00002A22 }, /* GL_C4UB_V2F */
- { 2134, 0x00002A23 }, /* GL_C4UB_V3F */
- { 2146, 0x00000901 }, /* GL_CCW */
- { 2153, 0x00002900 }, /* GL_CLAMP */
- { 2162, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
- { 2181, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
- { 2204, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
- { 2228, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
- { 2245, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
- { 2267, 0x00001500 }, /* GL_CLEAR */
- { 2276, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
- { 2301, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
- { 2330, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
- { 2356, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- { 2385, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
- { 2411, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
- { 2438, 0x00003000 }, /* GL_CLIP_PLANE0 */
- { 2453, 0x00003001 }, /* GL_CLIP_PLANE1 */
- { 2468, 0x00003002 }, /* GL_CLIP_PLANE2 */
- { 2483, 0x00003003 }, /* GL_CLIP_PLANE3 */
- { 2498, 0x00003004 }, /* GL_CLIP_PLANE4 */
- { 2513, 0x00003005 }, /* GL_CLIP_PLANE5 */
- { 2528, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- { 2561, 0x00000A00 }, /* GL_COEFF */
- { 2570, 0x00001800 }, /* GL_COLOR */
- { 2579, 0x00008076 }, /* GL_COLOR_ARRAY */
- { 2594, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- { 2624, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 2658, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
- { 2681, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
- { 2701, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
- { 2723, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
- { 2743, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
- { 2764, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
- { 2789, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
- { 2810, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
- { 2832, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
- { 2858, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
- { 2880, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
- { 2906, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
- { 2928, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
- { 2954, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
- { 2976, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
- { 3002, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
- { 3024, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
- { 3050, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
- { 3072, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
- { 3098, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
- { 3123, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
- { 3144, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
- { 3169, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
- { 3190, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
- { 3215, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
- { 3236, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
- { 3261, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
- { 3282, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
- { 3307, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
- { 3328, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
- { 3353, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
- { 3374, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
- { 3399, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
- { 3420, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
- { 3445, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
- { 3466, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
- { 3491, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
- { 3511, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
- { 3532, 0x00001900 }, /* GL_COLOR_INDEX */
- { 3547, 0x00001603 }, /* GL_COLOR_INDEXES */
- { 3564, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
- { 3582, 0x00000B57 }, /* GL_COLOR_MATERIAL */
- { 3600, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
- { 3623, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
- { 3651, 0x000080B1 }, /* GL_COLOR_MATRIX */
- { 3667, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
- { 3687, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
- { 3715, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 3747, 0x00008458 }, /* GL_COLOR_SUM */
- { 3760, 0x00008458 }, /* GL_COLOR_SUM_ARB */
- { 3777, 0x000080D0 }, /* GL_COLOR_TABLE */
- { 3792, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
- { 3818, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
- { 3848, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
- { 3878, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
- { 3898, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
- { 3922, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
- { 3947, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
- { 3976, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
- { 4005, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
- { 4027, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
- { 4053, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
- { 4079, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
- { 4105, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
- { 4135, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
- { 4165, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- { 4195, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
- { 4229, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
- { 4263, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- { 4293, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
- { 4327, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
- { 4361, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
- { 4385, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
- { 4413, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
- { 4441, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
- { 4462, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
- { 4487, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
- { 4508, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
- { 4533, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
- { 4558, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
- { 4577, 0x00008570 }, /* GL_COMBINE */
- { 4588, 0x00008503 }, /* GL_COMBINE4 */
- { 4600, 0x00008572 }, /* GL_COMBINE_ALPHA */
- { 4617, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
- { 4638, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
- { 4659, 0x00008570 }, /* GL_COMBINE_ARB */
- { 4674, 0x00008570 }, /* GL_COMBINE_EXT */
- { 4689, 0x00008571 }, /* GL_COMBINE_RGB */
- { 4704, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
- { 4723, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
- { 4742, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
- { 4778, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
- { 4802, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
- { 4830, 0x00001300 }, /* GL_COMPILE */
- { 4841, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
- { 4864, 0x00008B81 }, /* GL_COMPILE_STATUS */
- { 4882, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
- { 4902, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
- { 4926, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
- { 4950, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
- { 4978, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
- { 5002, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- { 5032, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
- { 5066, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
- { 5094, 0x000084ED }, /* GL_COMPRESSED_RGB */
- { 5112, 0x000084EE }, /* GL_COMPRESSED_RGBA */
- { 5131, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
- { 5154, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- { 5183, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- { 5216, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- { 5249, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- { 5282, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
- { 5304, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- { 5332, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- { 5364, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
- { 5389, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- { 5420, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
- { 5439, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
- { 5464, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
- { 5494, 0x0000911C }, /* GL_CONDITION_SATISFIED */
- { 5517, 0x00008576 }, /* GL_CONSTANT */
- { 5529, 0x00008003 }, /* GL_CONSTANT_ALPHA */
- { 5547, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
- { 5569, 0x00008576 }, /* GL_CONSTANT_ARB */
- { 5585, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
- { 5609, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
- { 5631, 0x00008001 }, /* GL_CONSTANT_COLOR */
- { 5649, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
- { 5671, 0x00008576 }, /* GL_CONSTANT_EXT */
- { 5687, 0x00008010 }, /* GL_CONVOLUTION_1D */
- { 5705, 0x00008011 }, /* GL_CONVOLUTION_2D */
- { 5723, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
- { 5751, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
- { 5782, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
- { 5809, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
- { 5840, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
- { 5867, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
- { 5898, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
- { 5926, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
- { 5958, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
- { 5980, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
- { 6006, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
- { 6028, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
- { 6054, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
- { 6075, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
- { 6100, 0x00008862 }, /* GL_COORD_REPLACE */
- { 6117, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
- { 6138, 0x00008862 }, /* GL_COORD_REPLACE_NV */
- { 6158, 0x00001503 }, /* GL_COPY */
- { 6166, 0x0000150C }, /* GL_COPY_INVERTED */
- { 6183, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
- { 6203, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
- { 6223, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
- { 6244, 0x00000B44 }, /* GL_CULL_FACE */
- { 6257, 0x00000B45 }, /* GL_CULL_FACE_MODE */
- { 6275, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
- { 6294, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- { 6326, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- { 6361, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
- { 6382, 0x00000001 }, /* GL_CURRENT_BIT */
- { 6397, 0x00000B00 }, /* GL_CURRENT_COLOR */
- { 6414, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
- { 6435, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
- { 6461, 0x00000B01 }, /* GL_CURRENT_INDEX */
- { 6478, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
- { 6500, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
- { 6528, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
- { 6549, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- { 6583, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
- { 6616, 0x00000B02 }, /* GL_CURRENT_NORMAL */
- { 6634, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- { 6664, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
- { 6683, 0x00008865 }, /* GL_CURRENT_QUERY */
- { 6700, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
- { 6721, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
- { 6745, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
- { 6772, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
- { 6796, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
- { 6823, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
- { 6856, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- { 6890, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- { 6923, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
- { 6950, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
- { 6976, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
- { 7001, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- { 7030, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
- { 7052, 0x00000900 }, /* GL_CW */
- { 7058, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
- { 7079, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
- { 7100, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
- { 7120, 0x00002101 }, /* GL_DECAL */
- { 7129, 0x00001E03 }, /* GL_DECR */
- { 7137, 0x00008508 }, /* GL_DECR_WRAP */
- { 7150, 0x00008508 }, /* GL_DECR_WRAP_EXT */
- { 7167, 0x00008B80 }, /* GL_DELETE_STATUS */
- { 7184, 0x00001801 }, /* GL_DEPTH */
- { 7193, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7213, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
- { 7237, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7257, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7281, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7295, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7309, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7329, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7354, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7374, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7389, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7407, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7428, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7447, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7468, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7493, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7519, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7540, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7565, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 7591, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 7612, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 7637, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 7663, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 7677, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 7692, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 7707, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 7724, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 7752, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
- { 7773, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 7793, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 7821, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 7849, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 7863, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 7885, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 7911, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 7930, 0x00001201 }, /* GL_DIFFUSE */
- { 7941, 0x00000BD0 }, /* GL_DITHER */
- { 7951, 0x00000A02 }, /* GL_DOMAIN */
- { 7961, 0x00001100 }, /* GL_DONT_CARE */
- { 7974, 0x000086AE }, /* GL_DOT3_RGB */
- { 7986, 0x000086AF }, /* GL_DOT3_RGBA */
- { 7999, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 8016, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 8033, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 8049, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 8065, 0x0000140A }, /* GL_DOUBLE */
- { 8075, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8091, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8106, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8122, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8142, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8162, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8178, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8195, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8216, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8237, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8254, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8275, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8296, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8313, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8334, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8355, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8372, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8393, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8414, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8431, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8452, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8473, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8490, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8511, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8532, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 8552, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 8572, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 8588, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 8608, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 8628, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 8644, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 8664, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 8684, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 8700, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 8720, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 8740, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 8756, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 8776, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 8796, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 8812, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 8832, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 8852, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 8868, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 8888, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 8908, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 8924, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 8944, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 8964, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 8980, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 9000, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 9020, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 9040, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
- { 9068, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9100, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9124, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9144, 0x00000304 }, /* GL_DST_ALPHA */
- { 9157, 0x00000306 }, /* GL_DST_COLOR */
- { 9170, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9184, 0x00008779 }, /* GL_DUDV_ATI */
- { 9196, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9212, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9232, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9248, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9268, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9284, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9304, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9317, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9336, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9370, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9408, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9435, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9461, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9485, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9517, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 9553, 0x00001600 }, /* GL_EMISSION */
- { 9565, 0x00002000 }, /* GL_ENABLE_BIT */
- { 9579, 0x00000202 }, /* GL_EQUAL */
- { 9588, 0x00001509 }, /* GL_EQUIV */
- { 9597, 0x00010000 }, /* GL_EVAL_BIT */
- { 9609, 0x00000800 }, /* GL_EXP */
- { 9616, 0x00000801 }, /* GL_EXP2 */
- { 9624, 0x00001F03 }, /* GL_EXTENSIONS */
- { 9638, 0x00002400 }, /* GL_EYE_LINEAR */
- { 9652, 0x00002502 }, /* GL_EYE_PLANE */
- { 9665, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 9690, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 9707, 0x00000000 }, /* GL_FALSE */
- { 9716, 0x00001101 }, /* GL_FASTEST */
- { 9727, 0x00001C01 }, /* GL_FEEDBACK */
- { 9739, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 9766, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 9790, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 9814, 0x00001B02 }, /* GL_FILL */
- { 9822, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 9849, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 9880, 0x00001D00 }, /* GL_FLAT */
- { 9888, 0x00001406 }, /* GL_FLOAT */
- { 9897, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 9911, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 9929, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 9945, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 9961, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 9975, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 9993, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 10009, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 10025, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 10039, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 10057, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 10073, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 10089, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10103, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10121, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10135, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10153, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10167, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10185, 0x00000B60 }, /* GL_FOG */
- { 10192, 0x00000080 }, /* GL_FOG_BIT */
- { 10203, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10216, 0x00008451 }, /* GL_FOG_COORD */
- { 10229, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10247, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10271, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10310, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10353, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10385, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10416, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10445, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10470, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10489, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 10523, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 10550, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 10576, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 10600, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 10617, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 10632, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 10656, 0x00000B64 }, /* GL_FOG_END */
- { 10667, 0x00000C54 }, /* GL_FOG_HINT */
- { 10679, 0x00000B61 }, /* GL_FOG_INDEX */
- { 10692, 0x00000B65 }, /* GL_FOG_MODE */
- { 10704, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 10723, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 10748, 0x00000B63 }, /* GL_FOG_START */
- { 10761, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 10779, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 10803, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 10822, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 10845, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 10880, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 10895, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 10932, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 10968, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 11009, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 11050, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 11087, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11124, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11162, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11204, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11242, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11284, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11319, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 11358, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 11407, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 11455, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 11507, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 11547, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 11591, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 11631, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
- { 11698, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 11725, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 11749, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 11777, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 11800, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 11819, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 11856, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 11897, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 11938, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- { 11976, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 12018, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 12069, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 12107, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 12152, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 12201, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 12239, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
- { 12281, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- { 12319, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 12361, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 12393, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 12418, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 12445, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 12476, 0x00000404 }, /* GL_FRONT */
- { 12485, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 12503, 0x00000B46 }, /* GL_FRONT_FACE */
- { 12517, 0x00000400 }, /* GL_FRONT_LEFT */
- { 12531, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 12546, 0x00008006 }, /* GL_FUNC_ADD */
- { 12558, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 12574, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 12599, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 12628, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 12645, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 12666, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 12685, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 12709, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 12738, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 12762, 0x00000206 }, /* GL_GEQUAL */
- { 12772, 0x00000204 }, /* GL_GREATER */
- { 12783, 0x00001904 }, /* GL_GREEN */
- { 12792, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 12806, 0x00000D53 }, /* GL_GREEN_BITS */
- { 12820, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 12835, 0x0000140B }, /* GL_HALF_FLOAT */
- { 12849, 0x00008000 }, /* GL_HINT_BIT */
- { 12861, 0x00008024 }, /* GL_HISTOGRAM */
- { 12874, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 12898, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 12926, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 12949, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 12976, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 12993, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 13013, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 13037, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 13061, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 13089, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 13117, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 13149, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 13171, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 13197, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 13215, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 13237, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 13256, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 13279, 0x0000862A }, /* GL_IDENTITY_NV */
- { 13294, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 13314, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 13354, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 13392, 0x00001E02 }, /* GL_INCR */
- { 13400, 0x00008507 }, /* GL_INCR_WRAP */
- { 13413, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 13430, 0x00008222 }, /* GL_INDEX */
- { 13439, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 13454, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 13484, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 13518, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 13541, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 13563, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 13583, 0x00000D51 }, /* GL_INDEX_BITS */
- { 13597, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 13618, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 13636, 0x00000C30 }, /* GL_INDEX_MODE */
- { 13650, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 13666, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 13681, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 13700, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 13719, 0x00001404 }, /* GL_INT */
- { 13726, 0x00008049 }, /* GL_INTENSITY */
- { 13739, 0x0000804C }, /* GL_INTENSITY12 */
- { 13754, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 13773, 0x0000804D }, /* GL_INTENSITY16 */
- { 13788, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 13807, 0x0000804A }, /* GL_INTENSITY4 */
- { 13821, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 13839, 0x0000804B }, /* GL_INTENSITY8 */
- { 13853, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 13871, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 13888, 0x00008575 }, /* GL_INTERPOLATE */
- { 13903, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 13922, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 13941, 0x00008B53 }, /* GL_INT_VEC2 */
- { 13953, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 13969, 0x00008B54 }, /* GL_INT_VEC3 */
- { 13981, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 13997, 0x00008B55 }, /* GL_INT_VEC4 */
- { 14009, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 14025, 0x00000500 }, /* GL_INVALID_ENUM */
- { 14041, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 14074, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 14111, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 14132, 0x00000501 }, /* GL_INVALID_VALUE */
- { 14149, 0x0000862B }, /* GL_INVERSE_NV */
- { 14163, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 14187, 0x0000150A }, /* GL_INVERT */
- { 14197, 0x00001E00 }, /* GL_KEEP */
- { 14205, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 14231, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 14261, 0x00000406 }, /* GL_LEFT */
- { 14269, 0x00000203 }, /* GL_LEQUAL */
- { 14279, 0x00000201 }, /* GL_LESS */
- { 14287, 0x00004000 }, /* GL_LIGHT0 */
- { 14297, 0x00004001 }, /* GL_LIGHT1 */
- { 14307, 0x00004002 }, /* GL_LIGHT2 */
- { 14317, 0x00004003 }, /* GL_LIGHT3 */
- { 14327, 0x00004004 }, /* GL_LIGHT4 */
- { 14337, 0x00004005 }, /* GL_LIGHT5 */
- { 14347, 0x00004006 }, /* GL_LIGHT6 */
- { 14357, 0x00004007 }, /* GL_LIGHT7 */
- { 14367, 0x00000B50 }, /* GL_LIGHTING */
- { 14379, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 14395, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 14418, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 14447, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 14480, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 14508, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 14532, 0x00001B01 }, /* GL_LINE */
- { 14540, 0x00002601 }, /* GL_LINEAR */
- { 14550, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 14572, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 14602, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 14633, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 14657, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 14682, 0x00000001 }, /* GL_LINES */
- { 14691, 0x00000004 }, /* GL_LINE_BIT */
- { 14703, 0x00000002 }, /* GL_LINE_LOOP */
- { 14716, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 14736, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 14751, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 14771, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 14787, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 14811, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 14834, 0x00000003 }, /* GL_LINE_STRIP */
- { 14848, 0x00000702 }, /* GL_LINE_TOKEN */
- { 14862, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 14876, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 14902, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 14922, 0x00008B82 }, /* GL_LINK_STATUS */
- { 14937, 0x00000B32 }, /* GL_LIST_BASE */
- { 14950, 0x00020000 }, /* GL_LIST_BIT */
- { 14962, 0x00000B33 }, /* GL_LIST_INDEX */
- { 14976, 0x00000B30 }, /* GL_LIST_MODE */
- { 14989, 0x00000101 }, /* GL_LOAD */
- { 14997, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 15009, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 15026, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 15040, 0x00001909 }, /* GL_LUMINANCE */
- { 15053, 0x00008041 }, /* GL_LUMINANCE12 */
- { 15068, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 15091, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 15118, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 15140, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 15166, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 15185, 0x00008042 }, /* GL_LUMINANCE16 */
- { 15200, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 15223, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 15250, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 15269, 0x0000803F }, /* GL_LUMINANCE4 */
- { 15283, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 15304, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 15329, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 15347, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 15368, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 15393, 0x00008040 }, /* GL_LUMINANCE8 */
- { 15407, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 15428, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 15453, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 15471, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 15490, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 15506, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 15526, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 15548, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 15562, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 15577, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 15601, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 15625, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 15649, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 15673, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 15690, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 15707, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 15735, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 15764, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 15793, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 15822, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 15851, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 15880, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 15909, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 15937, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 15965, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 15993, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 16021, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 16049, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 16077, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 16105, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 16133, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 16161, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 16177, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 16197, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 16219, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 16233, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 16248, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 16272, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 16296, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 16320, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 16344, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 16361, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 16378, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 16406, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 16435, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 16464, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 16493, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 16522, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 16551, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 16580, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 16608, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 16636, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 16664, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 16692, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 16720, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 16748, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 16776, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 16804, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 16832, 0x00000D10 }, /* GL_MAP_COLOR */
- { 16845, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 16871, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 16900, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 16928, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 16944, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 16959, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 16985, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 17002, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 17017, 0x00008630 }, /* GL_MATRIX0_NV */
- { 17031, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 17047, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 17063, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 17079, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 17095, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 17111, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 17127, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 17143, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 17159, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 17175, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 17191, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 17206, 0x00008631 }, /* GL_MATRIX1_NV */
- { 17220, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 17236, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 17252, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 17268, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 17284, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 17300, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 17316, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 17332, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 17348, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 17364, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 17380, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 17395, 0x00008632 }, /* GL_MATRIX2_NV */
- { 17409, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 17425, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 17441, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 17456, 0x00008633 }, /* GL_MATRIX3_NV */
- { 17470, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 17485, 0x00008634 }, /* GL_MATRIX4_NV */
- { 17499, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 17514, 0x00008635 }, /* GL_MATRIX5_NV */
- { 17528, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 17543, 0x00008636 }, /* GL_MATRIX6_NV */
- { 17557, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 17572, 0x00008637 }, /* GL_MATRIX7_NV */
- { 17586, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 17601, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 17616, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 17642, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 17676, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 17707, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 17740, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 17771, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 17786, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 17808, 0x00008008 }, /* GL_MAX */
- { 17815, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 17838, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 17870, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 17896, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 17929, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 17955, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 17989, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 18008, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
- { 18033, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 18062, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 18094, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 18130, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 18166, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 18206, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 18232, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 18262, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 18287, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 18316, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 18345, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 18378, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 18398, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 18422, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 18446, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 18470, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 18495, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 18513, 0x00008008 }, /* GL_MAX_EXT */
- { 18524, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 18559, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 18598, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 18612, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 18632, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 18670, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 18699, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 18723, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 18751, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 18774, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 18811, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 18847, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 18874, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 18903, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 18937, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 18973, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 19000, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 19032, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 19068, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 19097, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 19126, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 19154, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 19192, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 19236, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 19279, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 19313, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 19352, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 19389, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 19427, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 19470, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 19513, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 19543, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 19574, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 19610, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 19646, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 19676, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 19710, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 19743, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
- { 19768, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 19797, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 19812, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
- { 19831, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 19858, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 19878, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 19902, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 19924, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 19950, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 19977, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 20008, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 20032, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 20066, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 20086, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 20113, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 20134, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 20159, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 20184, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 20219, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 20241, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 20267, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 20289, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 20315, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 20349, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 20387, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 20420, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 20457, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 20481, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 20502, 0x00008007 }, /* GL_MIN */
- { 20509, 0x0000802E }, /* GL_MINMAX */
- { 20519, 0x0000802E }, /* GL_MINMAX_EXT */
- { 20533, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 20550, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 20571, 0x00008030 }, /* GL_MINMAX_SINK */
- { 20586, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 20605, 0x00008007 }, /* GL_MIN_EXT */
- { 20616, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 20635, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 20658, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 20681, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 20701, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 20721, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 20751, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 20779, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 20807, 0x00001700 }, /* GL_MODELVIEW */
- { 20820, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 20838, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 20857, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 20876, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 20895, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 20914, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 20933, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 20952, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 20971, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 20990, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 21009, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 21028, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 21046, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 21065, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 21084, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 21103, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 21122, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 21141, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 21160, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 21179, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 21198, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 21217, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 21236, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 21254, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 21273, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 21292, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 21310, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 21328, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 21346, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 21364, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 21382, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 21400, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 21418, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 21438, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 21465, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 21490, 0x00002100 }, /* GL_MODULATE */
- { 21502, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 21522, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 21549, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 21574, 0x00000103 }, /* GL_MULT */
- { 21582, 0x0000809D }, /* GL_MULTISAMPLE */
- { 21597, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 21617, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 21636, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 21655, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 21679, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 21702, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 21732, 0x00002A25 }, /* GL_N3F_V3F */
- { 21743, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 21763, 0x0000150E }, /* GL_NAND */
- { 21771, 0x00002600 }, /* GL_NEAREST */
- { 21782, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 21813, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 21845, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 21870, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 21896, 0x00000200 }, /* GL_NEVER */
- { 21905, 0x00001102 }, /* GL_NICEST */
- { 21915, 0x00000000 }, /* GL_NONE */
- { 21923, 0x00001505 }, /* GL_NOOP */
- { 21931, 0x00001508 }, /* GL_NOR */
- { 21938, 0x00000BA1 }, /* GL_NORMALIZE */
- { 21951, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 21967, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 21998, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 22033, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 22057, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 22080, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 22101, 0x00008511 }, /* GL_NORMAL_MAP */
- { 22115, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 22133, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 22150, 0x00000205 }, /* GL_NOTEQUAL */
- { 22162, 0x00000000 }, /* GL_NO_ERROR */
- { 22174, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 22208, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 22246, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 22278, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 22320, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 22350, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 22390, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 22421, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 22450, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 22478, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 22508, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 22525, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 22551, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 22567, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 22602, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 22624, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 22639, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 22658, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 22688, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 22709, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 22737, 0x00000001 }, /* GL_ONE */
- { 22744, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 22772, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 22804, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 22832, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 22864, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 22887, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 22910, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 22933, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 22956, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 22974, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 22996, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 23018, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 23034, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 23054, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 23074, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 23092, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 23114, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 23136, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 23152, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 23172, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 23192, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 23210, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 23232, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 23254, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 23270, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 23290, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 23310, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 23331, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 23350, 0x00001507 }, /* GL_OR */
- { 23356, 0x00000A01 }, /* GL_ORDER */
- { 23365, 0x0000150D }, /* GL_OR_INVERTED */
- { 23380, 0x0000150B }, /* GL_OR_REVERSE */
- { 23394, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 23411, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 23429, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 23450, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 23470, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 23488, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 23507, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 23527, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 23547, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 23565, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 23584, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 23609, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 23633, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 23654, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 23676, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 23698, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 23723, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 23747, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 23768, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 23790, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 23812, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 23834, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 23865, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 23885, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 23910, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 23930, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 23955, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 23975, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 24000, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 24020, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 24045, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 24065, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 24090, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 24110, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 24135, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 24155, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 24180, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 24200, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 24225, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 24245, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 24270, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 24290, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 24315, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 24333, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 24354, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 24383, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 24416, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 24441, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 24464, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 24495, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 24530, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 24557, 0x00001B00 }, /* GL_POINT */
- { 24566, 0x00000000 }, /* GL_POINTS */
- { 24576, 0x00000002 }, /* GL_POINT_BIT */
- { 24589, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 24619, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 24653, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 24687, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 24722, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 24751, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 24784, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 24817, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 24851, 0x00000B11 }, /* GL_POINT_SIZE */
- { 24865, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 24891, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 24909, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 24931, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 24953, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 24976, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 24994, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 25016, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 25038, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 25061, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 25081, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 25097, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 25118, 0x00008861 }, /* GL_POINT_SPRITE */
- { 25134, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 25154, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 25183, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 25202, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 25228, 0x00000701 }, /* GL_POINT_TOKEN */
- { 25243, 0x00000009 }, /* GL_POLYGON */
- { 25254, 0x00000008 }, /* GL_POLYGON_BIT */
- { 25269, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 25285, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 25308, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 25333, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 25356, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 25379, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 25403, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 25427, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 25445, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 25468, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 25487, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 25510, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 25527, 0x00001203 }, /* GL_POSITION */
- { 25539, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 25571, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 25607, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 25640, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 25677, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 25708, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 25743, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 25775, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 25811, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 25844, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 25876, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 25912, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 25945, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 25982, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 26012, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 26046, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 26077, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 26112, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 26143, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 26178, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 26210, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 26246, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 26276, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 26310, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 26341, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 26376, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 26408, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 26439, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 26474, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 26506, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 26542, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 26571, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 26604, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 26634, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 26668, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 26707, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 26740, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 26780, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 26814, 0x00008578 }, /* GL_PREVIOUS */
- { 26826, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 26842, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 26858, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 26875, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 26896, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 26917, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 26950, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 26982, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 27005, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 27028, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 27058, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 27087, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 27115, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 27137, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 27165, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 27193, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 27215, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 27236, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 27276, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 27315, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 27345, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 27380, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 27413, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 27447, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 27486, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 27525, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 27547, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 27573, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 27597, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 27620, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 27642, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 27663, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 27684, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 27711, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 27743, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 27775, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 27810, 0x00001701 }, /* GL_PROJECTION */
- { 27824, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 27845, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 27871, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 27891, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 27915, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 27936, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 27955, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 27978, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 28017, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 28055, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 28075, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 28105, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 28129, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 28149, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 28179, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 28203, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 28223, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 28256, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 28282, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 28312, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 28343, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 28373, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
- { 28392, 0x00002003 }, /* GL_Q */
- { 28397, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 28422, 0x00000007 }, /* GL_QUADS */
- { 28431, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 28475, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 28523, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 28540, 0x00000008 }, /* GL_QUAD_STRIP */
- { 28554, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- { 28584, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
- { 28611, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 28633, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 28659, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
- { 28679, 0x00008866 }, /* GL_QUERY_RESULT */
- { 28695, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 28715, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 28741, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 28771, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
- { 28788, 0x00002002 }, /* GL_R */
- { 28793, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 28805, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 28838, 0x00000C02 }, /* GL_READ_BUFFER */
- { 28853, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 28873, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
- { 28901, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 28933, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 28957, 0x000088B8 }, /* GL_READ_ONLY */
- { 28970, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 28987, 0x000088BA }, /* GL_READ_WRITE */
- { 29001, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 29019, 0x00001903 }, /* GL_RED */
- { 29026, 0x00008016 }, /* GL_REDUCE */
- { 29036, 0x00008016 }, /* GL_REDUCE_EXT */
- { 29050, 0x00000D15 }, /* GL_RED_BIAS */
- { 29062, 0x00000D52 }, /* GL_RED_BITS */
- { 29074, 0x00000D14 }, /* GL_RED_SCALE */
- { 29087, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 29105, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 29127, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 29148, 0x00008A19 }, /* GL_RELEASED_APPLE */
- { 29166, 0x00001C00 }, /* GL_RENDER */
- { 29176, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 29192, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 29219, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
- { 29243, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 29271, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 29297, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 29324, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 29344, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 29371, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 29394, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 29421, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 29453, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 29489, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 29514, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 29538, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
- { 29566, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 29595, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 29617, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 29643, 0x00001F01 }, /* GL_RENDERER */
- { 29655, 0x00000C40 }, /* GL_RENDER_MODE */
- { 29670, 0x00002901 }, /* GL_REPEAT */
- { 29680, 0x00001E01 }, /* GL_REPLACE */
- { 29691, 0x00008062 }, /* GL_REPLACE_EXT */
- { 29706, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 29729, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 29747, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 29769, 0x00008A1B }, /* GL_RETAINED_APPLE */
- { 29787, 0x00000102 }, /* GL_RETURN */
- { 29797, 0x00001907 }, /* GL_RGB */
- { 29804, 0x00008052 }, /* GL_RGB10 */
- { 29813, 0x00008059 }, /* GL_RGB10_A2 */
- { 29825, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 29841, 0x00008052 }, /* GL_RGB10_EXT */
- { 29854, 0x00008053 }, /* GL_RGB12 */
- { 29863, 0x00008053 }, /* GL_RGB12_EXT */
- { 29876, 0x00008054 }, /* GL_RGB16 */
- { 29885, 0x00008054 }, /* GL_RGB16_EXT */
- { 29898, 0x0000804E }, /* GL_RGB2_EXT */
- { 29910, 0x0000804F }, /* GL_RGB4 */
- { 29918, 0x0000804F }, /* GL_RGB4_EXT */
- { 29930, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 29943, 0x00008050 }, /* GL_RGB5 */
- { 29951, 0x00008057 }, /* GL_RGB5_A1 */
- { 29962, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 29977, 0x00008050 }, /* GL_RGB5_EXT */
- { 29989, 0x00008051 }, /* GL_RGB8 */
- { 29997, 0x00008051 }, /* GL_RGB8_EXT */
- { 30009, 0x00001908 }, /* GL_RGBA */
- { 30017, 0x0000805A }, /* GL_RGBA12 */
- { 30027, 0x0000805A }, /* GL_RGBA12_EXT */
- { 30041, 0x0000805B }, /* GL_RGBA16 */
- { 30051, 0x0000805B }, /* GL_RGBA16_EXT */
- { 30065, 0x00008055 }, /* GL_RGBA2 */
- { 30074, 0x00008055 }, /* GL_RGBA2_EXT */
- { 30087, 0x00008056 }, /* GL_RGBA4 */
- { 30096, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 30115, 0x00008056 }, /* GL_RGBA4_EXT */
- { 30128, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 30142, 0x00008058 }, /* GL_RGBA8 */
- { 30151, 0x00008058 }, /* GL_RGBA8_EXT */
- { 30164, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 30179, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 30197, 0x00000C31 }, /* GL_RGBA_MODE */
- { 30210, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 30223, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 30237, 0x000083A0 }, /* GL_RGB_S3TC */
- { 30249, 0x00008573 }, /* GL_RGB_SCALE */
- { 30262, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 30279, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 30296, 0x00000407 }, /* GL_RIGHT */
- { 30305, 0x00002000 }, /* GL_S */
- { 30310, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 30324, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 30345, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 30359, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 30380, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 30394, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 30410, 0x000080A9 }, /* GL_SAMPLES */
- { 30421, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 30437, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 30452, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 30470, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 30492, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 30520, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 30552, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 30575, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 30602, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 30620, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 30643, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 30665, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 30684, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 30707, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 30733, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 30763, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 30788, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 30817, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 30832, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 30847, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 30863, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 30888, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 30928, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 30972, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 31005, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 31035, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 31067, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 31097, 0x00001C02 }, /* GL_SELECT */
- { 31107, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 31135, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 31160, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 31176, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 31203, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 31234, 0x0000150F }, /* GL_SET */
- { 31241, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 31262, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 31286, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 31301, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 31316, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 31344, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 31367, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 31397, 0x00001601 }, /* GL_SHININESS */
- { 31410, 0x00001402 }, /* GL_SHORT */
- { 31419, 0x00009119 }, /* GL_SIGNALED */
- { 31431, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 31452, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 31468, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 31488, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 31507, 0x00008C46 }, /* GL_SLUMINANCE */
- { 31521, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 31536, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 31558, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 31578, 0x00001D01 }, /* GL_SMOOTH */
- { 31588, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 31621, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 31648, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 31681, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 31708, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 31725, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 31746, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 31767, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 31782, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 31801, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 31820, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 31837, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 31858, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 31879, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 31894, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 31913, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 31932, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 31949, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 31970, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 31991, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 32006, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 32025, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 32044, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 32064, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 32082, 0x00001202 }, /* GL_SPECULAR */
- { 32094, 0x00002402 }, /* GL_SPHERE_MAP */
- { 32108, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 32123, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 32141, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 32158, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 32172, 0x00008580 }, /* GL_SRC0_RGB */
- { 32184, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 32198, 0x00008581 }, /* GL_SRC1_RGB */
- { 32210, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 32224, 0x00008582 }, /* GL_SRC2_RGB */
- { 32236, 0x00000302 }, /* GL_SRC_ALPHA */
- { 32249, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 32271, 0x00000300 }, /* GL_SRC_COLOR */
- { 32284, 0x00008C40 }, /* GL_SRGB */
- { 32292, 0x00008C41 }, /* GL_SRGB8 */
- { 32301, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 32317, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 32331, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 32349, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 32368, 0x000088E6 }, /* GL_STATIC_COPY */
- { 32383, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 32402, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 32417, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 32436, 0x000088E5 }, /* GL_STATIC_READ */
- { 32451, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 32470, 0x00001802 }, /* GL_STENCIL */
- { 32481, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 32503, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 32529, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 32550, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 32575, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 32596, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 32621, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 32653, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 32689, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 32721, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 32757, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 32777, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 32804, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 32830, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 32846, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 32868, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 32891, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 32907, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 32923, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 32940, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
- { 32958, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
- { 32977, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 33000, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 33022, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
- { 33040, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 33062, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
- { 33080, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 33102, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 33123, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 33150, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 33177, 0x00000B97 }, /* GL_STENCIL_REF */
- { 33192, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 33208, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 33237, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 33259, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 33280, 0x00000C33 }, /* GL_STEREO */
- { 33290, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 33314, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 33339, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 33363, 0x000088E2 }, /* GL_STREAM_COPY */
- { 33378, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 33397, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 33412, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 33431, 0x000088E1 }, /* GL_STREAM_READ */
- { 33446, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 33465, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 33482, 0x000084E7 }, /* GL_SUBTRACT */
- { 33494, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 33510, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 33528, 0x00009116 }, /* GL_SYNC_FENCE */
- { 33542, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 33556, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 33583, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 33613, 0x00009114 }, /* GL_SYNC_STATUS */
- { 33628, 0x00002001 }, /* GL_T */
- { 33633, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 33648, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 33667, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 33683, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 33698, 0x00002A27 }, /* GL_T2F_V3F */
- { 33709, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 33728, 0x00002A28 }, /* GL_T4F_V4F */
- { 33739, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 33762, 0x00001702 }, /* GL_TEXTURE */
- { 33773, 0x000084C0 }, /* GL_TEXTURE0 */
- { 33785, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 33801, 0x000084C1 }, /* GL_TEXTURE1 */
- { 33813, 0x000084CA }, /* GL_TEXTURE10 */
- { 33826, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 33843, 0x000084CB }, /* GL_TEXTURE11 */
- { 33856, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 33873, 0x000084CC }, /* GL_TEXTURE12 */
- { 33886, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 33903, 0x000084CD }, /* GL_TEXTURE13 */
- { 33916, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 33933, 0x000084CE }, /* GL_TEXTURE14 */
- { 33946, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 33963, 0x000084CF }, /* GL_TEXTURE15 */
- { 33976, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 33993, 0x000084D0 }, /* GL_TEXTURE16 */
- { 34006, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 34023, 0x000084D1 }, /* GL_TEXTURE17 */
- { 34036, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 34053, 0x000084D2 }, /* GL_TEXTURE18 */
- { 34066, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 34083, 0x000084D3 }, /* GL_TEXTURE19 */
- { 34096, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 34113, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 34129, 0x000084C2 }, /* GL_TEXTURE2 */
- { 34141, 0x000084D4 }, /* GL_TEXTURE20 */
- { 34154, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 34171, 0x000084D5 }, /* GL_TEXTURE21 */
- { 34184, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 34201, 0x000084D6 }, /* GL_TEXTURE22 */
- { 34214, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 34231, 0x000084D7 }, /* GL_TEXTURE23 */
- { 34244, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 34261, 0x000084D8 }, /* GL_TEXTURE24 */
- { 34274, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 34291, 0x000084D9 }, /* GL_TEXTURE25 */
- { 34304, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 34321, 0x000084DA }, /* GL_TEXTURE26 */
- { 34334, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 34351, 0x000084DB }, /* GL_TEXTURE27 */
- { 34364, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 34381, 0x000084DC }, /* GL_TEXTURE28 */
- { 34394, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 34411, 0x000084DD }, /* GL_TEXTURE29 */
- { 34424, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 34441, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 34457, 0x000084C3 }, /* GL_TEXTURE3 */
- { 34469, 0x000084DE }, /* GL_TEXTURE30 */
- { 34482, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 34499, 0x000084DF }, /* GL_TEXTURE31 */
- { 34512, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 34529, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 34545, 0x000084C4 }, /* GL_TEXTURE4 */
- { 34557, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 34573, 0x000084C5 }, /* GL_TEXTURE5 */
- { 34585, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 34601, 0x000084C6 }, /* GL_TEXTURE6 */
- { 34613, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 34629, 0x000084C7 }, /* GL_TEXTURE7 */
- { 34641, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 34657, 0x000084C8 }, /* GL_TEXTURE8 */
- { 34669, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 34685, 0x000084C9 }, /* GL_TEXTURE9 */
- { 34697, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 34713, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 34727, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 34751, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 34765, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 34789, 0x0000806F }, /* GL_TEXTURE_3D */
- { 34803, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 34825, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 34851, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 34873, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 34895, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 34927, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 34949, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 34981, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 35003, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 35031, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 35063, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 35096, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 35128, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 35143, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 35164, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 35189, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 35207, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 35231, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 35262, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 35292, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 35322, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 35357, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 35388, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 35426, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 35453, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 35485, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 35519, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 35543, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 35571, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 35595, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 35623, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 35656, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 35680, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 35702, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 35724, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 35750, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 35784, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 35817, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 35854, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 35882, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 35914, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 35937, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 35975, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 36017, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 36048, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 36076, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 36106, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 36134, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 36154, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 36178, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 36209, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 36244, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 36275, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 36310, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 36341, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 36376, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 36407, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 36442, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 36473, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 36508, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 36539, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 36574, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 36603, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 36620, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 36642, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 36668, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 36683, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 36704, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 36724, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 36750, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 36770, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 36787, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 36804, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 36821, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 36838, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 36863, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 36885, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 36911, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 36929, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 36955, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 36981, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 37011, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 37038, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 37063, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 37083, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 37107, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 37134, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 37161, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 37188, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 37214, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 37244, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 37266, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 37284, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 37314, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 37342, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 37370, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 37398, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 37419, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 37438, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 37460, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 37479, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 37499, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 37529, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 37560, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 37585, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 37609, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 37629, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 37653, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 37673, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 37696, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 37720, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
- { 37748, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 37778, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 37803, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 37837, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 37854, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 37872, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 37890, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 37908, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37927, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37947, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37966, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37995, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 38012, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 38038, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 38068, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 38100, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 38130, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 38164, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 38180, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 38211, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 38246, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 38274, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 38306, 0x00000004 }, /* GL_TRIANGLES */
- { 38319, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 38335, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 38356, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 38374, 0x00000001 }, /* GL_TRUE */
- { 38382, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
- { 38401, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 38421, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 38444, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 38464, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 38485, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 38507, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 38529, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 38549, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 38570, 0x00009118 }, /* GL_UNSIGNALED */
- { 38584, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 38601, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 38628, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38651, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38667, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38694, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38715, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 38740, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38764, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38795, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38819, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38847, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38870, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38888, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38918, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38944, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38974, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 39000, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 39024, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 39052, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 39080, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 39107, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 39139, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 39170, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 39184, 0x00002A20 }, /* GL_V2F */
- { 39191, 0x00002A21 }, /* GL_V3F */
- { 39198, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 39217, 0x00001F00 }, /* GL_VENDOR */
- { 39227, 0x00001F02 }, /* GL_VERSION */
- { 39238, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 39254, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 39278, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 39308, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 39339, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 39374, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 39398, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 39419, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 39442, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 39463, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 39490, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 39518, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 39546, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 39574, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 39602, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 39630, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 39658, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39685, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39712, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39739, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39766, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39793, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39820, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39847, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39874, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39901, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39939, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39981, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 40012, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 40047, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 40081, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 40119, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 40150, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 40185, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 40213, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 40245, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 40275, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 40309, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 40337, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 40369, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 40389, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 40411, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 40440, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 40461, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 40490, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 40523, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 40555, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 40582, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 40613, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 40643, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 40660, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40681, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40708, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40720, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40736, 0x00008A1A }, /* GL_VOLATILE_APPLE */
- { 40754, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40769, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40789, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40820, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40855, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40883, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40908, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40935, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40960, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40984, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 41003, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 41017, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 41035, 0x00001506 }, /* GL_XOR */
- { 41042, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 41061, 0x00008757 }, /* GL_YCBCR_MESA */
- { 41075, 0x00000000 }, /* GL_ZERO */
- { 41083, 0x00000D16 }, /* GL_ZOOM_X */
- { 41093, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 1204, 0x000080E1 }, /* GL_BGRA_EXT */
+ { 1216, 0x00001A00 }, /* GL_BITMAP */
+ { 1226, 0x00000704 }, /* GL_BITMAP_TOKEN */
+ { 1242, 0x00000BE2 }, /* GL_BLEND */
+ { 1251, 0x00008005 }, /* GL_BLEND_COLOR */
+ { 1266, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+ { 1285, 0x00000BE0 }, /* GL_BLEND_DST */
+ { 1298, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+ { 1317, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
+ { 1340, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+ { 1357, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
+ { 1378, 0x00008009 }, /* GL_BLEND_EQUATION */
+ { 1396, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+ { 1420, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+ { 1448, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
+ { 1476, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+ { 1498, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
+ { 1520, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
+ { 1542, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+ { 1568, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
+ { 1594, 0x00000BE1 }, /* GL_BLEND_SRC */
+ { 1607, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+ { 1626, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
+ { 1649, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+ { 1666, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
+ { 1687, 0x00001905 }, /* GL_BLUE */
+ { 1695, 0x00000D1B }, /* GL_BLUE_BIAS */
+ { 1708, 0x00000D54 }, /* GL_BLUE_BITS */
+ { 1721, 0x00000D1A }, /* GL_BLUE_SCALE */
+ { 1735, 0x00008B56 }, /* GL_BOOL */
+ { 1743, 0x00008B56 }, /* GL_BOOL_ARB */
+ { 1755, 0x00008B57 }, /* GL_BOOL_VEC2 */
+ { 1768, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+ { 1785, 0x00008B58 }, /* GL_BOOL_VEC3 */
+ { 1798, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+ { 1815, 0x00008B59 }, /* GL_BOOL_VEC4 */
+ { 1828, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+ { 1845, 0x000088BB }, /* GL_BUFFER_ACCESS */
+ { 1862, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+ { 1883, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
+ { 1904, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ { 1935, 0x000088BC }, /* GL_BUFFER_MAPPED */
+ { 1952, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+ { 1973, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
+ { 1994, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+ { 2016, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+ { 2042, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
+ { 2068, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
+ { 2091, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ { 2125, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 2140, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 2159, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 2175, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 2195, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
+ { 2214, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ { 2240, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
+ { 2263, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ { 2291, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
+ { 2310, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
+ { 2332, 0x00001400 }, /* GL_BYTE */
+ { 2340, 0x00002A24 }, /* GL_C3F_V3F */
+ { 2351, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 2366, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 2378, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 2390, 0x00000901 }, /* GL_CCW */
+ { 2397, 0x00002900 }, /* GL_CLAMP */
+ { 2406, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 2425, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 2448, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 2472, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 2489, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2511, 0x00001500 }, /* GL_CLEAR */
+ { 2520, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2545, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2574, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 2600, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 2629, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 2655, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 2682, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 2697, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 2712, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 2727, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 2742, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 2757, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 2772, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 2805, 0x00000A00 }, /* GL_COEFF */
+ { 2814, 0x00001800 }, /* GL_COLOR */
+ { 2823, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 2838, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 2868, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 2902, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 2925, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 2945, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 2967, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 2987, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
+ { 3008, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 3033, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
+ { 3058, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
+ { 3079, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
+ { 3101, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 3127, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
+ { 3149, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 3175, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
+ { 3197, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 3223, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
+ { 3245, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 3271, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
+ { 3293, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 3319, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
+ { 3341, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 3367, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 3392, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
+ { 3413, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 3438, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
+ { 3459, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 3484, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
+ { 3505, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 3530, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
+ { 3551, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 3576, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
+ { 3597, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 3622, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
+ { 3643, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 3668, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
+ { 3689, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 3714, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
+ { 3735, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 3760, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 3780, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 3801, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 3816, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 3833, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 3851, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 3869, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 3892, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 3920, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 3936, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 3956, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 3984, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 4016, 0x00008458 }, /* GL_COLOR_SUM */
+ { 4029, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 4046, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 4061, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 4087, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 4117, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 4147, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 4167, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 4191, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 4216, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 4245, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 4274, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 4296, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 4322, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 4348, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 4374, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 4404, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 4434, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 4464, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 4498, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 4532, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 4562, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 4596, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 4630, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 4654, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 4682, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 4710, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 4731, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 4756, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 4777, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 4802, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 4827, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 4846, 0x00008570 }, /* GL_COMBINE */
+ { 4857, 0x00008503 }, /* GL_COMBINE4 */
+ { 4869, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 4886, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 4907, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 4928, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 4943, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 4958, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 4973, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 4992, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 5011, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+ { 5047, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 5071, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 5099, 0x00001300 }, /* GL_COMPILE */
+ { 5110, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 5133, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 5151, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 5171, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 5195, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 5219, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 5247, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 5271, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 5301, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 5335, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 5363, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 5381, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 5400, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 5423, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 5452, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 5485, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 5518, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 5551, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 5573, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 5601, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 5633, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
+ { 5658, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 5689, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
+ { 5708, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
+ { 5733, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 5763, 0x0000911C }, /* GL_CONDITION_SATISFIED */
+ { 5786, 0x00008576 }, /* GL_CONSTANT */
+ { 5798, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 5816, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 5838, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 5854, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 5878, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 5900, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 5918, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 5940, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 5956, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 5974, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 5992, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 6020, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 6051, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 6078, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 6109, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 6136, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 6167, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 6195, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 6227, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 6249, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 6275, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 6297, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 6323, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 6344, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 6369, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 6386, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 6407, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 6427, 0x00008862 }, /* GL_COORD_REPLACE_OES */
+ { 6448, 0x00001503 }, /* GL_COPY */
+ { 6456, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 6473, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 6493, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
+ { 6513, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
+ { 6534, 0x00000B44 }, /* GL_CULL_FACE */
+ { 6547, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 6565, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 6584, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 6616, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 6651, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 6672, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 6687, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 6704, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 6725, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 6751, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 6768, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 6790, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 6818, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 6839, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 6873, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 6906, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 6924, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 6954, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
+ { 6984, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 7003, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 7020, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 7041, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 7065, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 7092, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 7116, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 7143, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 7176, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 7210, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 7243, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 7270, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 7296, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 7321, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 7350, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 7372, 0x00000900 }, /* GL_CW */
+ { 7378, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 7399, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 7420, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 7440, 0x00002101 }, /* GL_DECAL */
+ { 7449, 0x00001E03 }, /* GL_DECR */
+ { 7457, 0x00008508 }, /* GL_DECR_WRAP */
+ { 7470, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 7487, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 7504, 0x00001801 }, /* GL_DEPTH */
+ { 7513, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
+ { 7533, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 7557, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
+ { 7581, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 7601, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 7625, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
+ { 7649, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 7663, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 7677, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 7697, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 7722, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 7742, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 7757, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 7775, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 7796, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 7815, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 7836, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 7861, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
+ { 7886, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 7912, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 7933, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 7958, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
+ { 7983, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 8009, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 8030, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 8055, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
+ { 8080, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 8106, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 8120, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 8135, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 8150, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 8167, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 8195, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 8216, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 8236, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
+ { 8257, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 8285, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 8313, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 8327, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 8349, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 8375, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 8394, 0x00001201 }, /* GL_DIFFUSE */
+ { 8405, 0x00000BD0 }, /* GL_DITHER */
+ { 8415, 0x00000A02 }, /* GL_DOMAIN */
+ { 8425, 0x00001100 }, /* GL_DONT_CARE */
+ { 8438, 0x000086AE }, /* GL_DOT3_RGB */
+ { 8450, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 8463, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 8480, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 8497, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 8513, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 8529, 0x0000140A }, /* GL_DOUBLE */
+ { 8539, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 8555, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 8570, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 8586, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 8606, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 8626, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 8642, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 8659, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 8680, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 8701, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 8718, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 8739, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 8760, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 8777, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 8798, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 8819, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 8836, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 8857, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 8878, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 8895, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 8916, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 8937, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 8954, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 8975, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 8996, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 9016, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 9036, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 9052, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 9072, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 9092, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 9108, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 9128, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 9148, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 9164, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 9184, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 9204, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 9220, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 9240, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 9260, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 9276, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 9296, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 9316, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 9332, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 9352, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 9372, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 9388, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 9408, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 9428, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 9444, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 9464, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 9484, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 9504, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 9532, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 9564, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 9588, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 9608, 0x00000304 }, /* GL_DST_ALPHA */
+ { 9621, 0x00000306 }, /* GL_DST_COLOR */
+ { 9634, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 9648, 0x00008779 }, /* GL_DUDV_ATI */
+ { 9660, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 9676, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 9696, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 9712, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 9732, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 9748, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 9768, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 9781, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 9800, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 9834, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 9872, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 9899, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 9925, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 9949, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 9981, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 10017, 0x00001600 }, /* GL_EMISSION */
+ { 10029, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 10043, 0x00000202 }, /* GL_EQUAL */
+ { 10052, 0x00001509 }, /* GL_EQUIV */
+ { 10061, 0x00010000 }, /* GL_EVAL_BIT */
+ { 10073, 0x00000800 }, /* GL_EXP */
+ { 10080, 0x00000801 }, /* GL_EXP2 */
+ { 10088, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 10102, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 10116, 0x00002502 }, /* GL_EYE_PLANE */
+ { 10129, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 10154, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 10171, 0x00000000 }, /* GL_FALSE */
+ { 10180, 0x00001101 }, /* GL_FASTEST */
+ { 10191, 0x00001C01 }, /* GL_FEEDBACK */
+ { 10203, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 10230, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 10254, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 10278, 0x00001B02 }, /* GL_FILL */
+ { 10286, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 10313, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 10344, 0x0000140C }, /* GL_FIXED */
+ { 10353, 0x0000140C }, /* GL_FIXED_OES */
+ { 10366, 0x00001D00 }, /* GL_FLAT */
+ { 10374, 0x00001406 }, /* GL_FLOAT */
+ { 10383, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 10397, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 10415, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 10431, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 10447, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 10461, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 10479, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 10495, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 10511, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 10525, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 10543, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 10559, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 10575, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 10589, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 10607, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 10621, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 10639, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 10653, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 10671, 0x00000B60 }, /* GL_FOG */
+ { 10678, 0x00000080 }, /* GL_FOG_BIT */
+ { 10689, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 10702, 0x00008451 }, /* GL_FOG_COORD */
+ { 10715, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 10733, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 10757, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 10796, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 10839, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 10871, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 10902, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 10931, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 10956, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 10975, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 11009, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 11036, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 11062, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 11086, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 11103, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 11118, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 11142, 0x00000B64 }, /* GL_FOG_END */
+ { 11153, 0x00000C54 }, /* GL_FOG_HINT */
+ { 11165, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 11178, 0x00000B65 }, /* GL_FOG_MODE */
+ { 11190, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 11209, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 11234, 0x00000B63 }, /* GL_FOG_START */
+ { 11247, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 11265, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 11289, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 11308, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 11331, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 11366, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
+ { 11405, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 11420, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 11457, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 11493, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 11534, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 11575, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 11612, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 11649, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ { 11687, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 11725, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 11767, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
+ { 11809, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 11847, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 11889, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
+ { 11931, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 11966, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 12005, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 12054, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
+ { 12103, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 12151, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 12203, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
+ { 12255, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 12295, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 12339, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 12379, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 12423, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
+ { 12467, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 12490, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 12517, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
+ { 12544, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 12568, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 12596, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
+ { 12624, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 12647, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 12666, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 12703, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 12744, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
+ { 12785, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
+ { 12822, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 12863, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
+ { 12904, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 12942, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 12984, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
+ { 13026, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 13077, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 13115, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
+ { 13153, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ { 13195, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ { 13239, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 13284, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 13333, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
+ { 13382, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 13420, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 13462, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 13500, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 13542, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
+ { 13584, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
+ { 13603, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 13635, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 13660, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 13687, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 13718, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
+ { 13749, 0x00000404 }, /* GL_FRONT */
+ { 13758, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 13776, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 13790, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 13804, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 13819, 0x00008006 }, /* GL_FUNC_ADD */
+ { 13831, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 13847, 0x00008006 }, /* GL_FUNC_ADD_OES */
+ { 13863, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 13888, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 13917, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
+ { 13946, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 13963, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 13984, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
+ { 14005, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 14024, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 14048, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 14077, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 14101, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ { 14128, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ { 14156, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
+ { 14179, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ { 14208, 0x00000206 }, /* GL_GEQUAL */
+ { 14218, 0x00000204 }, /* GL_GREATER */
+ { 14229, 0x00001904 }, /* GL_GREEN */
+ { 14238, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 14252, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 14266, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 14281, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 14295, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
+ { 14313, 0x00008DF2 }, /* GL_HIGH_FLOAT */
+ { 14327, 0x00008DF5 }, /* GL_HIGH_INT */
+ { 14339, 0x00008000 }, /* GL_HINT_BIT */
+ { 14351, 0x00008024 }, /* GL_HISTOGRAM */
+ { 14364, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 14388, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 14416, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 14439, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 14466, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 14483, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 14503, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 14527, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 14551, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 14579, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 14607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 14639, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 14661, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 14687, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 14705, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 14727, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 14746, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 14769, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 14784, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 14804, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+ { 14840, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 14880, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ { 14914, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 14952, 0x00001E02 }, /* GL_INCR */
+ { 14960, 0x00008507 }, /* GL_INCR_WRAP */
+ { 14973, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 14990, 0x00008222 }, /* GL_INDEX */
+ { 14999, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 15014, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 15044, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 15078, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 15101, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 15123, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 15143, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 15157, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 15178, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 15196, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 15210, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 15226, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 15241, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 15260, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 15279, 0x00001404 }, /* GL_INT */
+ { 15286, 0x00008049 }, /* GL_INTENSITY */
+ { 15299, 0x0000804C }, /* GL_INTENSITY12 */
+ { 15314, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 15333, 0x0000804D }, /* GL_INTENSITY16 */
+ { 15348, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 15367, 0x0000804A }, /* GL_INTENSITY4 */
+ { 15381, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 15399, 0x0000804B }, /* GL_INTENSITY8 */
+ { 15413, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 15431, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 15448, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ { 15475, 0x00008575 }, /* GL_INTERPOLATE */
+ { 15490, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 15509, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 15528, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
+ { 15550, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 15562, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 15578, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 15590, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 15606, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 15618, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 15634, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 15650, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 15683, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 15720, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
+ { 15757, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 15778, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 15795, 0x0000862B }, /* GL_INVERSE_NV */
+ { 15809, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 15833, 0x0000150A }, /* GL_INVERT */
+ { 15843, 0x00001E00 }, /* GL_KEEP */
+ { 15851, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 15877, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 15907, 0x00000406 }, /* GL_LEFT */
+ { 15915, 0x00000203 }, /* GL_LEQUAL */
+ { 15925, 0x00000201 }, /* GL_LESS */
+ { 15933, 0x00004000 }, /* GL_LIGHT0 */
+ { 15943, 0x00004001 }, /* GL_LIGHT1 */
+ { 15953, 0x00004002 }, /* GL_LIGHT2 */
+ { 15963, 0x00004003 }, /* GL_LIGHT3 */
+ { 15973, 0x00004004 }, /* GL_LIGHT4 */
+ { 15983, 0x00004005 }, /* GL_LIGHT5 */
+ { 15993, 0x00004006 }, /* GL_LIGHT6 */
+ { 16003, 0x00004007 }, /* GL_LIGHT7 */
+ { 16013, 0x00000B50 }, /* GL_LIGHTING */
+ { 16025, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 16041, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 16064, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 16093, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 16126, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 16154, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 16178, 0x00001B01 }, /* GL_LINE */
+ { 16186, 0x00002601 }, /* GL_LINEAR */
+ { 16196, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 16218, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 16248, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 16279, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 16303, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 16328, 0x00000001 }, /* GL_LINES */
+ { 16337, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
+ { 16360, 0x00000004 }, /* GL_LINE_BIT */
+ { 16372, 0x00000002 }, /* GL_LINE_LOOP */
+ { 16385, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 16405, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 16420, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 16440, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 16456, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 16480, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 16503, 0x00000003 }, /* GL_LINE_STRIP */
+ { 16517, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ { 16545, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 16559, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 16573, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 16599, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 16619, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 16634, 0x00000B32 }, /* GL_LIST_BASE */
+ { 16647, 0x00020000 }, /* GL_LIST_BIT */
+ { 16659, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 16673, 0x00000B30 }, /* GL_LIST_MODE */
+ { 16686, 0x00000101 }, /* GL_LOAD */
+ { 16694, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 16706, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 16723, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 16737, 0x00008DF0 }, /* GL_LOW_FLOAT */
+ { 16750, 0x00008DF3 }, /* GL_LOW_INT */
+ { 16761, 0x00001909 }, /* GL_LUMINANCE */
+ { 16774, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 16789, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 16812, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 16839, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 16861, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 16887, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 16906, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 16921, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 16944, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 16971, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 16990, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 17004, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 17025, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 17050, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 17068, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 17089, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 17114, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 17128, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 17149, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 17174, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 17192, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 17211, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 17227, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 17247, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 17269, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 17283, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 17298, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 17322, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 17346, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 17370, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 17394, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 17411, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 17428, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 17456, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 17485, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 17514, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 17543, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 17572, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 17601, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 17630, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 17658, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 17686, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 17714, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 17742, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 17770, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 17798, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 17826, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 17854, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 17882, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 17898, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 17918, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 17940, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 17954, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 17969, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 17993, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 18017, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 18041, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 18065, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 18082, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 18099, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 18127, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 18156, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 18185, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 18214, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 18243, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 18272, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 18301, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 18329, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 18357, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 18385, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 18413, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 18441, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 18469, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 18497, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 18525, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 18553, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 18566, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 18592, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 18621, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 18649, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 18665, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 18680, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 18706, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 18723, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 18738, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 18752, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 18768, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 18784, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 18800, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 18816, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 18832, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 18848, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 18864, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 18880, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 18896, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 18912, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 18927, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 18941, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 18957, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 18973, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 18989, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 19005, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 19021, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 19037, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 19053, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 19069, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 19085, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 19101, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 19116, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 19130, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 19146, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 19162, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 19177, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 19191, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 19206, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 19220, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 19235, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 19249, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 19264, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 19278, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 19293, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 19307, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 19322, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 19337, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 19363, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ { 19404, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
+ { 19430, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 19464, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
+ { 19498, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 19529, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
+ { 19560, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 19593, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
+ { 19626, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 19657, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
+ { 19688, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 19703, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 19725, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
+ { 19747, 0x00008008 }, /* GL_MAX */
+ { 19754, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 19777, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
+ { 19804, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 19836, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 19862, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 19895, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 19921, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 19955, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 19974, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 19999, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 20028, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 20060, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 20096, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 20132, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 20172, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 20198, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 20228, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 20253, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 20282, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 20311, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 20344, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
+ { 20377, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 20397, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 20421, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 20445, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 20469, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 20494, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 20512, 0x00008008 }, /* GL_MAX_EXT */
+ { 20523, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 20558, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 20597, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ { 20629, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ { 20665, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ { 20705, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ { 20749, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ { 20788, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ { 20827, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 20841, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 20861, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 20899, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 20928, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 20952, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 20980, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
+ { 21008, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 21031, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 21068, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 21104, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 21131, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 21160, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 21194, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 21230, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 21257, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 21289, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 21325, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 21354, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 21383, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 21411, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 21449, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 21493, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 21536, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 21570, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 21609, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 21646, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 21684, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 21727, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 21770, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 21800, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 21831, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 21867, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 21903, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 21933, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 21967, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 22000, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 22025, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 22054, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
+ { 22083, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 22098, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 22117, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 22144, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 22164, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 22188, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 22210, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 22236, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 22263, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 22294, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 22318, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
+ { 22346, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 22380, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 22400, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 22427, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 22448, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 22473, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 22498, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 22533, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ { 22586, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ { 22633, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ { 22683, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
+ { 22709, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 22731, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 22757, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
+ { 22780, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 22802, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 22828, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 22862, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 22900, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 22933, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 22970, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ { 23000, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 23024, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
+ { 23048, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ { 23085, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 23106, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
+ { 23122, 0x00008DF4 }, /* GL_MEDIUM_INT */
+ { 23136, 0x00008007 }, /* GL_MIN */
+ { 23143, 0x0000802E }, /* GL_MINMAX */
+ { 23153, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 23167, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 23184, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 23205, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 23220, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 23239, 0x00008007 }, /* GL_MIN_EXT */
+ { 23250, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 23269, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 23292, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 23315, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 23335, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 23355, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 23385, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 23413, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 23441, 0x00001700 }, /* GL_MODELVIEW */
+ { 23454, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 23472, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 23491, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 23510, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 23529, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 23548, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 23567, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 23586, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 23605, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 23624, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 23643, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 23662, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 23680, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 23699, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 23718, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 23737, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 23756, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 23775, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 23794, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 23813, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 23832, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 23851, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 23870, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 23888, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 23907, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 23926, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 23944, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 23962, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 23980, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 23998, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 24016, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 24034, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 24052, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 24072, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 24114, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 24141, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 24166, 0x00002100 }, /* GL_MODULATE */
+ { 24178, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 24198, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 24225, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 24250, 0x00000103 }, /* GL_MULT */
+ { 24258, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 24273, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 24293, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 24312, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 24331, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 24355, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 24378, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 24408, 0x00002A25 }, /* GL_N3F_V3F */
+ { 24419, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 24439, 0x0000150E }, /* GL_NAND */
+ { 24447, 0x00002600 }, /* GL_NEAREST */
+ { 24458, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 24489, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 24521, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 24546, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 24572, 0x00000200 }, /* GL_NEVER */
+ { 24581, 0x00001102 }, /* GL_NICEST */
+ { 24591, 0x00000000 }, /* GL_NONE */
+ { 24599, 0x00000000 }, /* GL_NONE_OES */
+ { 24611, 0x00001505 }, /* GL_NOOP */
+ { 24619, 0x00001508 }, /* GL_NOR */
+ { 24626, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 24639, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 24655, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 24686, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 24721, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 24745, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 24768, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 24789, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 24803, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 24821, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 24838, 0x00008511 }, /* GL_NORMAL_MAP_OES */
+ { 24856, 0x00000205 }, /* GL_NOTEQUAL */
+ { 24868, 0x00000000 }, /* GL_NO_ERROR */
+ { 24880, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 24914, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 24952, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ { 24986, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
+ { 25015, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 25047, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 25089, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 25119, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 25159, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 25190, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 25219, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 25247, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 25277, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 25294, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 25320, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 25336, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 25371, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 25393, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 25408, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 25427, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 25457, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 25478, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 25506, 0x00000001 }, /* GL_ONE */
+ { 25513, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 25541, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 25573, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 25601, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 25633, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 25656, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 25679, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 25702, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 25725, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 25743, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 25765, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 25787, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 25803, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 25823, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 25843, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 25861, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 25883, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 25905, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 25921, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 25941, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 25961, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 25979, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 26001, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 26023, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 26039, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 26059, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 26079, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 26100, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 26119, 0x00001507 }, /* GL_OR */
+ { 26125, 0x00000A01 }, /* GL_ORDER */
+ { 26134, 0x0000150D }, /* GL_OR_INVERTED */
+ { 26149, 0x0000150B }, /* GL_OR_REVERSE */
+ { 26163, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 26180, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 26198, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 26219, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 26239, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 26257, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 26276, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 26296, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 26316, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 26334, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 26353, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 26378, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 26402, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 26423, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 26445, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 26467, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 26492, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 26516, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 26537, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 26559, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 26581, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 26603, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 26634, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 26654, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 26679, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 26699, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 26724, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 26744, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 26769, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 26789, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 26814, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 26834, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 26859, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 26879, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 26904, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 26924, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 26949, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 26969, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 26994, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 27014, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 27039, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 27059, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 27084, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 27102, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 27123, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 27152, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 27185, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 27210, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 27233, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 27264, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 27299, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 27326, 0x00001B00 }, /* GL_POINT */
+ { 27335, 0x00000000 }, /* GL_POINTS */
+ { 27345, 0x00000002 }, /* GL_POINT_BIT */
+ { 27358, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 27388, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 27422, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 27456, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 27491, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 27520, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 27553, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 27586, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 27620, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 27634, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ { 27673, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
+ { 27697, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ { 27729, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ { 27760, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ { 27789, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 27815, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 27833, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 27855, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 27877, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 27900, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 27918, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 27940, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 27962, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 27985, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 28005, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 28021, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 28042, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 28058, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 28078, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 28107, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 28126, 0x00008861 }, /* GL_POINT_SPRITE_OES */
+ { 28146, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 28172, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 28187, 0x00000009 }, /* GL_POLYGON */
+ { 28198, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 28213, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 28229, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 28252, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 28277, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 28300, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 28323, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 28347, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 28371, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 28389, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 28412, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 28431, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 28454, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 28471, 0x00001203 }, /* GL_POSITION */
+ { 28483, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 28515, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 28551, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 28584, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 28621, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 28652, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 28687, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 28719, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 28755, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 28788, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 28820, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 28856, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 28889, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 28926, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 28956, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 28990, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 29021, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 29056, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 29087, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 29122, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 29154, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 29190, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 29220, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 29254, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 29285, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 29320, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 29352, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 29383, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 29418, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 29450, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 29486, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 29515, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 29548, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 29578, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 29612, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 29651, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 29684, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 29724, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 29758, 0x00008578 }, /* GL_PREVIOUS */
+ { 29770, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 29786, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 29802, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 29819, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 29840, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 29861, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
+ { 29889, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 29922, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 29954, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 29977, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ { 30007, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
+ { 30036, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 30059, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 30089, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 30118, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 30146, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 30168, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 30196, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 30224, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 30246, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 30267, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 30307, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 30346, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 30376, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 30411, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 30444, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 30478, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 30517, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 30556, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 30578, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 30604, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 30628, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
+ { 30654, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 30677, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 30699, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 30720, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 30741, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 30768, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 30800, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 30832, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 30867, 0x00001701 }, /* GL_PROJECTION */
+ { 30881, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 30902, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 30945, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 30971, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 30991, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 31015, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 31036, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 31055, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 31078, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 31117, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 31155, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 31175, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 31205, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 31229, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 31249, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 31279, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 31303, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 31323, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 31356, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 31382, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 31412, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 31443, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 31473, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
+ { 31492, 0x00002003 }, /* GL_Q */
+ { 31497, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 31522, 0x00000007 }, /* GL_QUADS */
+ { 31531, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 31575, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 31623, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 31640, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 31654, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 31684, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 31711, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 31733, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 31759, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 31779, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 31795, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 31815, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 31841, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 31871, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 31888, 0x00002002 }, /* GL_R */
+ { 31893, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 31905, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
+ { 31931, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 31964, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 31979, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 31999, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 32027, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 32059, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 32083, 0x000088B8 }, /* GL_READ_ONLY */
+ { 32096, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 32113, 0x000088BA }, /* GL_READ_WRITE */
+ { 32127, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 32145, 0x00001903 }, /* GL_RED */
+ { 32152, 0x00008016 }, /* GL_REDUCE */
+ { 32162, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 32176, 0x00000D15 }, /* GL_RED_BIAS */
+ { 32188, 0x00000D52 }, /* GL_RED_BITS */
+ { 32200, 0x00000D14 }, /* GL_RED_SCALE */
+ { 32213, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 32231, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 32253, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 32274, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
+ { 32296, 0x00008A19 }, /* GL_RELEASED_APPLE */
+ { 32314, 0x00001C00 }, /* GL_RENDER */
+ { 32324, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 32340, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 32367, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
+ { 32398, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 32422, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 32450, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
+ { 32478, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 32504, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
+ { 32534, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 32561, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
+ { 32592, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 32612, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 32639, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
+ { 32670, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 32693, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 32720, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
+ { 32747, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 32779, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 32815, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ { 32851, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
+ { 32871, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 32896, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
+ { 32925, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 32949, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 32977, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 33006, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
+ { 33039, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 33061, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 33087, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
+ { 33113, 0x00001F01 }, /* GL_RENDERER */
+ { 33125, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 33140, 0x00002901 }, /* GL_REPEAT */
+ { 33150, 0x00001E01 }, /* GL_REPLACE */
+ { 33161, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 33176, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 33199, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 33217, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 33239, 0x00008A1B }, /* GL_RETAINED_APPLE */
+ { 33257, 0x00000102 }, /* GL_RETURN */
+ { 33267, 0x00001907 }, /* GL_RGB */
+ { 33274, 0x00008052 }, /* GL_RGB10 */
+ { 33283, 0x00008059 }, /* GL_RGB10_A2 */
+ { 33295, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 33311, 0x00008052 }, /* GL_RGB10_EXT */
+ { 33324, 0x00008053 }, /* GL_RGB12 */
+ { 33333, 0x00008053 }, /* GL_RGB12_EXT */
+ { 33346, 0x00008054 }, /* GL_RGB16 */
+ { 33355, 0x00008054 }, /* GL_RGB16_EXT */
+ { 33368, 0x0000804E }, /* GL_RGB2_EXT */
+ { 33380, 0x0000804F }, /* GL_RGB4 */
+ { 33388, 0x0000804F }, /* GL_RGB4_EXT */
+ { 33400, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 33413, 0x00008050 }, /* GL_RGB5 */
+ { 33421, 0x00008D62 }, /* GL_RGB565 */
+ { 33431, 0x00008D62 }, /* GL_RGB565_OES */
+ { 33445, 0x00008057 }, /* GL_RGB5_A1 */
+ { 33456, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 33471, 0x00008057 }, /* GL_RGB5_A1_OES */
+ { 33486, 0x00008050 }, /* GL_RGB5_EXT */
+ { 33498, 0x00008051 }, /* GL_RGB8 */
+ { 33506, 0x00008051 }, /* GL_RGB8_EXT */
+ { 33518, 0x00008051 }, /* GL_RGB8_OES */
+ { 33530, 0x00001908 }, /* GL_RGBA */
+ { 33538, 0x0000805A }, /* GL_RGBA12 */
+ { 33548, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 33562, 0x0000805B }, /* GL_RGBA16 */
+ { 33572, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 33586, 0x00008055 }, /* GL_RGBA2 */
+ { 33595, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 33608, 0x00008056 }, /* GL_RGBA4 */
+ { 33617, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 33636, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 33649, 0x00008056 }, /* GL_RGBA4_OES */
+ { 33662, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 33676, 0x00008058 }, /* GL_RGBA8 */
+ { 33685, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 33698, 0x00008058 }, /* GL_RGBA8_OES */
+ { 33711, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 33726, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 33744, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 33757, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 33770, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 33784, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 33796, 0x00008573 }, /* GL_RGB_SCALE */
+ { 33809, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 33826, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 33843, 0x00000407 }, /* GL_RIGHT */
+ { 33852, 0x00002000 }, /* GL_S */
+ { 33857, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 33871, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 33892, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 33906, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 33927, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 33941, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
+ { 33959, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 33975, 0x000080A9 }, /* GL_SAMPLES */
+ { 33986, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 34002, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 34017, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 34035, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 34057, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 34085, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 34117, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 34140, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 34167, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 34185, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 34208, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 34230, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 34249, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 34272, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 34298, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 34328, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 34353, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 34382, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 34397, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 34412, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 34428, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 34453, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 34493, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 34537, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 34570, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 34600, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 34632, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 34662, 0x00001C02 }, /* GL_SELECT */
+ { 34672, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 34700, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 34725, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 34741, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
+ { 34765, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 34792, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 34823, 0x0000150F }, /* GL_SET */
+ { 34830, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
+ { 34855, 0x00008DFA }, /* GL_SHADER_COMPILER */
+ { 34874, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 34895, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 34919, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 34934, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 34949, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 34977, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 35000, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 35030, 0x00001601 }, /* GL_SHININESS */
+ { 35043, 0x00001402 }, /* GL_SHORT */
+ { 35052, 0x00009119 }, /* GL_SIGNALED */
+ { 35064, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 35085, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 35101, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 35121, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 35140, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 35154, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 35169, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 35191, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 35211, 0x00001D01 }, /* GL_SMOOTH */
+ { 35221, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 35254, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 35281, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 35314, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 35341, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 35358, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 35379, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 35400, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 35415, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 35434, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 35453, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 35470, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 35491, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 35512, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 35527, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 35546, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 35565, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 35582, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 35603, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 35624, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 35639, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 35658, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 35677, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 35697, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 35715, 0x00001202 }, /* GL_SPECULAR */
+ { 35727, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 35741, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 35756, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 35774, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 35791, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 35805, 0x00008580 }, /* GL_SRC0_RGB */
+ { 35817, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 35831, 0x00008581 }, /* GL_SRC1_RGB */
+ { 35843, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 35857, 0x00008582 }, /* GL_SRC2_RGB */
+ { 35869, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 35882, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 35904, 0x00000300 }, /* GL_SRC_COLOR */
+ { 35917, 0x00008C40 }, /* GL_SRGB */
+ { 35925, 0x00008C41 }, /* GL_SRGB8 */
+ { 35934, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 35950, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 35964, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 35982, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 36001, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 36016, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 36035, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 36050, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 36069, 0x000088E5 }, /* GL_STATIC_READ */
+ { 36084, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 36103, 0x00001802 }, /* GL_STENCIL */
+ { 36114, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 36136, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 36162, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
+ { 36188, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 36209, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 36234, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 36255, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 36280, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 36312, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 36348, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 36380, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 36416, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 36436, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 36463, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 36489, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 36505, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 36527, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 36550, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 36566, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 36582, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 36599, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 36617, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 36636, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 36659, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 36681, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
+ { 36703, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 36721, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 36743, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
+ { 36765, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 36783, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 36805, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
+ { 36827, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 36848, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 36875, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 36902, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 36917, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 36933, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 36962, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 36984, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 37005, 0x00000C33 }, /* GL_STEREO */
+ { 37015, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 37039, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 37064, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 37088, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 37103, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 37122, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 37137, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 37156, 0x000088E1 }, /* GL_STREAM_READ */
+ { 37171, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 37190, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 37207, 0x000084E7 }, /* GL_SUBTRACT */
+ { 37219, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 37235, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 37253, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 37267, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 37281, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 37308, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 37338, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 37353, 0x00002001 }, /* GL_T */
+ { 37358, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 37373, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 37392, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 37408, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 37423, 0x00002A27 }, /* GL_T2F_V3F */
+ { 37434, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 37453, 0x00002A28 }, /* GL_T4F_V4F */
+ { 37464, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 37487, 0x00001702 }, /* GL_TEXTURE */
+ { 37498, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 37510, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 37526, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 37538, 0x000084CA }, /* GL_TEXTURE10 */
+ { 37551, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 37568, 0x000084CB }, /* GL_TEXTURE11 */
+ { 37581, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 37598, 0x000084CC }, /* GL_TEXTURE12 */
+ { 37611, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 37628, 0x000084CD }, /* GL_TEXTURE13 */
+ { 37641, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 37658, 0x000084CE }, /* GL_TEXTURE14 */
+ { 37671, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 37688, 0x000084CF }, /* GL_TEXTURE15 */
+ { 37701, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 37718, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 37731, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 37748, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 37761, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 37778, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 37791, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 37808, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 37821, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 37838, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 37854, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 37866, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 37879, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 37896, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 37909, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 37926, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 37939, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 37956, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 37969, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 37986, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 37999, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 38016, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 38029, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 38046, 0x000084DA }, /* GL_TEXTURE26 */
+ { 38059, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 38076, 0x000084DB }, /* GL_TEXTURE27 */
+ { 38089, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 38106, 0x000084DC }, /* GL_TEXTURE28 */
+ { 38119, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 38136, 0x000084DD }, /* GL_TEXTURE29 */
+ { 38149, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 38166, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 38182, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 38194, 0x000084DE }, /* GL_TEXTURE30 */
+ { 38207, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 38224, 0x000084DF }, /* GL_TEXTURE31 */
+ { 38237, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 38254, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 38270, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 38282, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 38298, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 38310, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 38326, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 38338, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 38354, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 38366, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 38382, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 38394, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 38410, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 38422, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 38438, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 38452, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 38476, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 38490, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 38514, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 38528, 0x0000806F }, /* GL_TEXTURE_3D_OES */
+ { 38546, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 38568, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 38594, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 38616, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 38638, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 38670, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 38692, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 38724, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 38746, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
+ { 38772, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 38800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 38832, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
+ { 38864, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 38897, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 38929, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 38944, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 38965, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 38990, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 39008, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 39032, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 39063, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 39093, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 39123, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 39158, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 39189, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 39227, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 39254, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 39286, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 39320, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 39344, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 39372, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 39396, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 39424, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 39457, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 39481, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 39503, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 39525, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 39551, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 39585, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 39618, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 39655, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 39683, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 39715, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 39738, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 39776, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 39818, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 39849, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 39877, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 39907, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 39935, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
+ { 39960, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 39980, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 40004, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 40035, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 40070, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
+ { 40105, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 40136, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 40171, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
+ { 40206, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 40237, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 40272, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
+ { 40307, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
+ { 40331, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 40362, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 40397, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
+ { 40432, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 40463, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 40498, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
+ { 40533, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 40564, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 40599, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
+ { 40634, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 40663, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 40680, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 40702, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 40728, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 40743, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 40764, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 40784, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 40810, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
+ { 40840, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 40860, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
+ { 40884, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 40901, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 40918, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 40935, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
+ { 40958, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 40975, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 41000, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 41022, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 41048, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 41066, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 41092, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 41118, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 41148, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 41175, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 41200, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 41220, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 41244, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 41271, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 41298, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 41325, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 41351, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 41381, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 41403, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 41421, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 41461, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 41491, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 41519, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 41547, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 41575, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 41596, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 41615, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 41637, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 41656, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 41676, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 41706, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 41737, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 41762, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 41786, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 41806, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 41830, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 41850, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 41873, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 41897, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 41925, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 41955, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 41980, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 42014, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 42031, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 42049, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
+ { 42071, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 42089, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 42107, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 42126, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 42146, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 42165, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 42194, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 42211, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
+ { 42233, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ { 42263, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ { 42299, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ { 42340, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ { 42373, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ { 42411, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ { 42447, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ { 42485, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ { 42524, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ { 42569, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ { 42604, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ { 42649, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 42675, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 42705, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 42737, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 42767, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 42801, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 42817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 42848, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 42883, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 42911, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 42943, 0x00000004 }, /* GL_TRIANGLES */
+ { 42956, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
+ { 42983, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 42999, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 43020, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 43038, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ { 43070, 0x00000001 }, /* GL_TRUE */
+ { 43078, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
+ { 43097, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 43117, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 43140, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 43160, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 43181, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 43203, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 43225, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 43245, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 43266, 0x00009118 }, /* GL_UNSIGNALED */
+ { 43280, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 43297, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 43324, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 43347, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 43363, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 43390, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ { 43421, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 43442, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 43467, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 43491, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
+ { 43516, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 43547, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
+ { 43582, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 43606, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 43634, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 43657, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 43675, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 43705, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
+ { 43739, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 43765, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 43795, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
+ { 43829, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 43855, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 43879, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 43907, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 43935, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 43962, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 43994, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 44025, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 44039, 0x00002A20 }, /* GL_V2F */
+ { 44046, 0x00002A21 }, /* GL_V3F */
+ { 44053, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 44072, 0x00001F00 }, /* GL_VENDOR */
+ { 44082, 0x00001F02 }, /* GL_VERSION */
+ { 44093, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 44109, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 44133, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 44163, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 44194, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 44229, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 44253, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 44274, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 44297, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 44318, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 44345, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 44373, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 44401, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 44429, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 44457, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 44485, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 44513, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 44540, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 44567, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 44594, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 44621, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 44648, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 44675, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 44702, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 44729, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 44756, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 44794, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 44836, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 44867, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 44902, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 44936, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 44974, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 45005, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 45040, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 45068, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 45100, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 45130, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 45164, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 45192, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 45224, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 45244, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 45266, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 45295, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 45316, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 45345, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 45378, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 45410, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 45437, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 45468, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 45498, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 45515, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 45536, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 45563, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 45575, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 45591, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 45609, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 45624, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 45644, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 45675, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 45710, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
+ { 45745, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
+ { 45765, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 45793, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
+ { 45821, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 45846, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
+ { 45871, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 45898, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
+ { 45925, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 45950, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
+ { 45975, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 45999, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 46018, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 46032, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 46050, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
+ { 46068, 0x00001506 }, /* GL_XOR */
+ { 46075, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 46094, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 46108, 0x00000000 }, /* GL_ZERO */
+ { 46116, 0x00000D16 }, /* GL_ZOOM_X */
+ { 46126, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1357] =
+static const unsigned reduced_enums[1423] =
{
- 480, /* GL_FALSE */
- 703, /* GL_LINES */
- 705, /* GL_LINE_LOOP */
- 712, /* GL_LINE_STRIP */
- 1774, /* GL_TRIANGLES */
- 1777, /* GL_TRIANGLE_STRIP */
- 1775, /* GL_TRIANGLE_FAN */
- 1288, /* GL_QUADS */
- 1292, /* GL_QUAD_STRIP */
- 1173, /* GL_POLYGON */
- 1185, /* GL_POLYGON_STIPPLE_BIT */
- 1134, /* GL_PIXEL_MODE_BIT */
- 690, /* GL_LIGHTING_BIT */
- 510, /* GL_FOG_BIT */
+ 500, /* GL_FALSE */
+ 760, /* GL_LINES */
+ 763, /* GL_LINE_LOOP */
+ 770, /* GL_LINE_STRIP */
+ 1934, /* GL_TRIANGLES */
+ 1938, /* GL_TRIANGLE_STRIP */
+ 1936, /* GL_TRIANGLE_FAN */
+ 1393, /* GL_QUADS */
+ 1397, /* GL_QUAD_STRIP */
+ 1273, /* GL_POLYGON */
+ 761, /* GL_LINES_ADJACENCY_ARB */
+ 771, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ 1935, /* GL_TRIANGLES_ADJACENCY_ARB */
+ 1939, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ 1285, /* GL_POLYGON_STIPPLE_BIT */
+ 1228, /* GL_PIXEL_MODE_BIT */
+ 747, /* GL_LIGHTING_BIT */
+ 532, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 722, /* GL_LOAD */
- 1353, /* GL_RETURN */
- 1006, /* GL_MULT */
+ 781, /* GL_LOAD */
+ 1471, /* GL_RETURN */
+ 1096, /* GL_MULT */
23, /* GL_ADD */
- 1022, /* GL_NEVER */
- 680, /* GL_LESS */
- 470, /* GL_EQUAL */
- 679, /* GL_LEQUAL */
- 600, /* GL_GREATER */
- 1037, /* GL_NOTEQUAL */
- 599, /* GL_GEQUAL */
+ 1112, /* GL_NEVER */
+ 737, /* GL_LESS */
+ 490, /* GL_EQUAL */
+ 736, /* GL_LEQUAL */
+ 649, /* GL_GREATER */
+ 1129, /* GL_NOTEQUAL */
+ 648, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1494, /* GL_SRC_COLOR */
- 1067, /* GL_ONE_MINUS_SRC_COLOR */
- 1492, /* GL_SRC_ALPHA */
- 1066, /* GL_ONE_MINUS_SRC_ALPHA */
- 449, /* GL_DST_ALPHA */
- 1064, /* GL_ONE_MINUS_DST_ALPHA */
- 450, /* GL_DST_COLOR */
- 1065, /* GL_ONE_MINUS_DST_COLOR */
- 1493, /* GL_SRC_ALPHA_SATURATE */
- 587, /* GL_FRONT_LEFT */
- 588, /* GL_FRONT_RIGHT */
+ 1622, /* GL_SRC_COLOR */
+ 1161, /* GL_ONE_MINUS_SRC_COLOR */
+ 1620, /* GL_SRC_ALPHA */
+ 1160, /* GL_ONE_MINUS_SRC_ALPHA */
+ 469, /* GL_DST_ALPHA */
+ 1158, /* GL_ONE_MINUS_DST_ALPHA */
+ 470, /* GL_DST_COLOR */
+ 1159, /* GL_ONE_MINUS_DST_COLOR */
+ 1621, /* GL_SRC_ALPHA_SATURATE */
+ 629, /* GL_FRONT_LEFT */
+ 630, /* GL_FRONT_RIGHT */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
- 584, /* GL_FRONT */
+ 626, /* GL_FRONT */
68, /* GL_BACK */
- 678, /* GL_LEFT */
- 1395, /* GL_RIGHT */
- 585, /* GL_FRONT_AND_BACK */
+ 735, /* GL_LEFT */
+ 1519, /* GL_RIGHT */
+ 627, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 667, /* GL_INVALID_ENUM */
- 671, /* GL_INVALID_VALUE */
- 670, /* GL_INVALID_OPERATION */
- 1499, /* GL_STACK_OVERFLOW */
- 1500, /* GL_STACK_UNDERFLOW */
- 1092, /* GL_OUT_OF_MEMORY */
- 668, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 723, /* GL_INVALID_ENUM */
+ 728, /* GL_INVALID_VALUE */
+ 727, /* GL_INVALID_OPERATION */
+ 1627, /* GL_STACK_OVERFLOW */
+ 1628, /* GL_STACK_UNDERFLOW */
+ 1186, /* GL_OUT_OF_MEMORY */
+ 724, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1112, /* GL_PASS_THROUGH_TOKEN */
- 1172, /* GL_POINT_TOKEN */
- 713, /* GL_LINE_TOKEN */
- 1186, /* GL_POLYGON_TOKEN */
- 74, /* GL_BITMAP_TOKEN */
- 448, /* GL_DRAW_PIXEL_TOKEN */
- 302, /* GL_COPY_PIXEL_TOKEN */
- 706, /* GL_LINE_RESET_TOKEN */
- 473, /* GL_EXP */
- 474, /* GL_EXP2 */
- 338, /* GL_CW */
- 126, /* GL_CCW */
- 147, /* GL_COEFF */
- 1089, /* GL_ORDER */
- 385, /* GL_DOMAIN */
- 312, /* GL_CURRENT_COLOR */
- 315, /* GL_CURRENT_INDEX */
- 321, /* GL_CURRENT_NORMAL */
- 334, /* GL_CURRENT_TEXTURE_COORDS */
- 326, /* GL_CURRENT_RASTER_COLOR */
- 328, /* GL_CURRENT_RASTER_INDEX */
- 332, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- 329, /* GL_CURRENT_RASTER_POSITION */
- 330, /* GL_CURRENT_RASTER_POSITION_VALID */
- 327, /* GL_CURRENT_RASTER_DISTANCE */
- 1165, /* GL_POINT_SMOOTH */
- 1154, /* GL_POINT_SIZE */
- 1164, /* GL_POINT_SIZE_RANGE */
- 1155, /* GL_POINT_SIZE_GRANULARITY */
- 707, /* GL_LINE_SMOOTH */
- 714, /* GL_LINE_WIDTH */
- 716, /* GL_LINE_WIDTH_RANGE */
- 715, /* GL_LINE_WIDTH_GRANULARITY */
- 709, /* GL_LINE_STIPPLE */
- 710, /* GL_LINE_STIPPLE_PATTERN */
- 711, /* GL_LINE_STIPPLE_REPEAT */
- 721, /* GL_LIST_MODE */
- 887, /* GL_MAX_LIST_NESTING */
- 718, /* GL_LIST_BASE */
- 720, /* GL_LIST_INDEX */
- 1175, /* GL_POLYGON_MODE */
- 1182, /* GL_POLYGON_SMOOTH */
- 1184, /* GL_POLYGON_STIPPLE */
- 459, /* GL_EDGE_FLAG */
- 305, /* GL_CULL_FACE */
- 306, /* GL_CULL_FACE_MODE */
- 586, /* GL_FRONT_FACE */
- 689, /* GL_LIGHTING */
- 694, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 695, /* GL_LIGHT_MODEL_TWO_SIDE */
- 691, /* GL_LIGHT_MODEL_AMBIENT */
- 1441, /* GL_SHADE_MODEL */
- 194, /* GL_COLOR_MATERIAL_FACE */
- 195, /* GL_COLOR_MATERIAL_PARAMETER */
- 193, /* GL_COLOR_MATERIAL */
- 509, /* GL_FOG */
- 531, /* GL_FOG_INDEX */
- 527, /* GL_FOG_DENSITY */
- 535, /* GL_FOG_START */
- 529, /* GL_FOG_END */
- 532, /* GL_FOG_MODE */
- 511, /* GL_FOG_COLOR */
- 371, /* GL_DEPTH_RANGE */
- 379, /* GL_DEPTH_TEST */
- 382, /* GL_DEPTH_WRITEMASK */
- 359, /* GL_DEPTH_CLEAR_VALUE */
- 370, /* GL_DEPTH_FUNC */
+ 1206, /* GL_PASS_THROUGH_TOKEN */
+ 1272, /* GL_POINT_TOKEN */
+ 772, /* GL_LINE_TOKEN */
+ 1286, /* GL_POLYGON_TOKEN */
+ 75, /* GL_BITMAP_TOKEN */
+ 468, /* GL_DRAW_PIXEL_TOKEN */
+ 315, /* GL_COPY_PIXEL_TOKEN */
+ 764, /* GL_LINE_RESET_TOKEN */
+ 493, /* GL_EXP */
+ 494, /* GL_EXP2 */
+ 352, /* GL_CW */
+ 137, /* GL_CCW */
+ 158, /* GL_COEFF */
+ 1183, /* GL_ORDER */
+ 405, /* GL_DOMAIN */
+ 325, /* GL_CURRENT_COLOR */
+ 328, /* GL_CURRENT_INDEX */
+ 334, /* GL_CURRENT_NORMAL */
+ 348, /* GL_CURRENT_TEXTURE_COORDS */
+ 340, /* GL_CURRENT_RASTER_COLOR */
+ 342, /* GL_CURRENT_RASTER_INDEX */
+ 346, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 343, /* GL_CURRENT_RASTER_POSITION */
+ 344, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 341, /* GL_CURRENT_RASTER_DISTANCE */
+ 1264, /* GL_POINT_SMOOTH */
+ 1248, /* GL_POINT_SIZE */
+ 1263, /* GL_POINT_SIZE_RANGE */
+ 1254, /* GL_POINT_SIZE_GRANULARITY */
+ 765, /* GL_LINE_SMOOTH */
+ 773, /* GL_LINE_WIDTH */
+ 775, /* GL_LINE_WIDTH_RANGE */
+ 774, /* GL_LINE_WIDTH_GRANULARITY */
+ 767, /* GL_LINE_STIPPLE */
+ 768, /* GL_LINE_STIPPLE_PATTERN */
+ 769, /* GL_LINE_STIPPLE_REPEAT */
+ 780, /* GL_LIST_MODE */
+ 963, /* GL_MAX_LIST_NESTING */
+ 777, /* GL_LIST_BASE */
+ 779, /* GL_LIST_INDEX */
+ 1275, /* GL_POLYGON_MODE */
+ 1282, /* GL_POLYGON_SMOOTH */
+ 1284, /* GL_POLYGON_STIPPLE */
+ 479, /* GL_EDGE_FLAG */
+ 318, /* GL_CULL_FACE */
+ 319, /* GL_CULL_FACE_MODE */
+ 628, /* GL_FRONT_FACE */
+ 746, /* GL_LIGHTING */
+ 751, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 752, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 748, /* GL_LIGHT_MODEL_AMBIENT */
+ 1569, /* GL_SHADE_MODEL */
+ 206, /* GL_COLOR_MATERIAL_FACE */
+ 207, /* GL_COLOR_MATERIAL_PARAMETER */
+ 205, /* GL_COLOR_MATERIAL */
+ 531, /* GL_FOG */
+ 553, /* GL_FOG_INDEX */
+ 549, /* GL_FOG_DENSITY */
+ 557, /* GL_FOG_START */
+ 551, /* GL_FOG_END */
+ 554, /* GL_FOG_MODE */
+ 533, /* GL_FOG_COLOR */
+ 390, /* GL_DEPTH_RANGE */
+ 399, /* GL_DEPTH_TEST */
+ 402, /* GL_DEPTH_WRITEMASK */
+ 375, /* GL_DEPTH_CLEAR_VALUE */
+ 389, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1539, /* GL_STENCIL_TEST */
- 1523, /* GL_STENCIL_CLEAR_VALUE */
- 1525, /* GL_STENCIL_FUNC */
- 1541, /* GL_STENCIL_VALUE_MASK */
- 1524, /* GL_STENCIL_FAIL */
- 1536, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1537, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1538, /* GL_STENCIL_REF */
- 1542, /* GL_STENCIL_WRITEMASK */
- 855, /* GL_MATRIX_MODE */
- 1027, /* GL_NORMALIZE */
- 1870, /* GL_VIEWPORT */
- 1001, /* GL_MODELVIEW_STACK_DEPTH */
- 1265, /* GL_PROJECTION_STACK_DEPTH */
- 1749, /* GL_TEXTURE_STACK_DEPTH */
- 999, /* GL_MODELVIEW_MATRIX */
- 1264, /* GL_PROJECTION_MATRIX */
- 1732, /* GL_TEXTURE_MATRIX */
+ 1671, /* GL_STENCIL_TEST */
+ 1652, /* GL_STENCIL_CLEAR_VALUE */
+ 1654, /* GL_STENCIL_FUNC */
+ 1673, /* GL_STENCIL_VALUE_MASK */
+ 1653, /* GL_STENCIL_FAIL */
+ 1668, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1669, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1670, /* GL_STENCIL_REF */
+ 1674, /* GL_STENCIL_WRITEMASK */
+ 922, /* GL_MATRIX_MODE */
+ 1118, /* GL_NORMALIZE */
+ 2037, /* GL_VIEWPORT */
+ 1091, /* GL_MODELVIEW_STACK_DEPTH */
+ 1370, /* GL_PROJECTION_STACK_DEPTH */
+ 1896, /* GL_TEXTURE_STACK_DEPTH */
+ 1088, /* GL_MODELVIEW_MATRIX */
+ 1368, /* GL_PROJECTION_MATRIX */
+ 1878, /* GL_TEXTURE_MATRIX */
61, /* GL_ATTRIB_STACK_DEPTH */
- 137, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 148, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
43, /* GL_ALPHA_TEST */
44, /* GL_ALPHA_TEST_FUNC */
45, /* GL_ALPHA_TEST_REF */
- 384, /* GL_DITHER */
- 78, /* GL_BLEND_DST */
- 87, /* GL_BLEND_SRC */
- 75, /* GL_BLEND */
- 724, /* GL_LOGIC_OP_MODE */
- 641, /* GL_INDEX_LOGIC_OP */
- 192, /* GL_COLOR_LOGIC_OP */
+ 404, /* GL_DITHER */
+ 79, /* GL_BLEND_DST */
+ 93, /* GL_BLEND_SRC */
+ 76, /* GL_BLEND */
+ 783, /* GL_LOGIC_OP_MODE */
+ 695, /* GL_INDEX_LOGIC_OP */
+ 204, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
- 395, /* GL_DRAW_BUFFER */
- 1306, /* GL_READ_BUFFER */
- 1422, /* GL_SCISSOR_BOX */
- 1423, /* GL_SCISSOR_TEST */
- 640, /* GL_INDEX_CLEAR_VALUE */
- 645, /* GL_INDEX_WRITEMASK */
- 189, /* GL_COLOR_CLEAR_VALUE */
- 231, /* GL_COLOR_WRITEMASK */
- 642, /* GL_INDEX_MODE */
- 1388, /* GL_RGBA_MODE */
- 394, /* GL_DOUBLEBUFFER */
- 1543, /* GL_STEREO */
- 1345, /* GL_RENDER_MODE */
- 1113, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1166, /* GL_POINT_SMOOTH_HINT */
- 708, /* GL_LINE_SMOOTH_HINT */
- 1183, /* GL_POLYGON_SMOOTH_HINT */
- 530, /* GL_FOG_HINT */
- 1713, /* GL_TEXTURE_GEN_S */
- 1714, /* GL_TEXTURE_GEN_T */
- 1712, /* GL_TEXTURE_GEN_R */
- 1711, /* GL_TEXTURE_GEN_Q */
- 1126, /* GL_PIXEL_MAP_I_TO_I */
- 1132, /* GL_PIXEL_MAP_S_TO_S */
- 1128, /* GL_PIXEL_MAP_I_TO_R */
- 1124, /* GL_PIXEL_MAP_I_TO_G */
- 1122, /* GL_PIXEL_MAP_I_TO_B */
- 1120, /* GL_PIXEL_MAP_I_TO_A */
- 1130, /* GL_PIXEL_MAP_R_TO_R */
- 1118, /* GL_PIXEL_MAP_G_TO_G */
- 1116, /* GL_PIXEL_MAP_B_TO_B */
- 1114, /* GL_PIXEL_MAP_A_TO_A */
- 1127, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1133, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1129, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1125, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1123, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1121, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1131, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1119, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1117, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1115, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1787, /* GL_UNPACK_SWAP_BYTES */
- 1782, /* GL_UNPACK_LSB_FIRST */
- 1783, /* GL_UNPACK_ROW_LENGTH */
- 1786, /* GL_UNPACK_SKIP_ROWS */
- 1785, /* GL_UNPACK_SKIP_PIXELS */
- 1780, /* GL_UNPACK_ALIGNMENT */
- 1101, /* GL_PACK_SWAP_BYTES */
- 1096, /* GL_PACK_LSB_FIRST */
- 1097, /* GL_PACK_ROW_LENGTH */
- 1100, /* GL_PACK_SKIP_ROWS */
- 1099, /* GL_PACK_SKIP_PIXELS */
- 1093, /* GL_PACK_ALIGNMENT */
- 802, /* GL_MAP_COLOR */
- 807, /* GL_MAP_STENCIL */
- 644, /* GL_INDEX_SHIFT */
- 643, /* GL_INDEX_OFFSET */
- 1320, /* GL_RED_SCALE */
- 1318, /* GL_RED_BIAS */
- 1889, /* GL_ZOOM_X */
- 1890, /* GL_ZOOM_Y */
- 604, /* GL_GREEN_SCALE */
- 602, /* GL_GREEN_BIAS */
- 93, /* GL_BLUE_SCALE */
- 91, /* GL_BLUE_BIAS */
+ 415, /* GL_DRAW_BUFFER */
+ 1412, /* GL_READ_BUFFER */
+ 1547, /* GL_SCISSOR_BOX */
+ 1548, /* GL_SCISSOR_TEST */
+ 694, /* GL_INDEX_CLEAR_VALUE */
+ 699, /* GL_INDEX_WRITEMASK */
+ 201, /* GL_COLOR_CLEAR_VALUE */
+ 243, /* GL_COLOR_WRITEMASK */
+ 696, /* GL_INDEX_MODE */
+ 1512, /* GL_RGBA_MODE */
+ 414, /* GL_DOUBLEBUFFER */
+ 1675, /* GL_STEREO */
+ 1463, /* GL_RENDER_MODE */
+ 1207, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1265, /* GL_POINT_SMOOTH_HINT */
+ 766, /* GL_LINE_SMOOTH_HINT */
+ 1283, /* GL_POLYGON_SMOOTH_HINT */
+ 552, /* GL_FOG_HINT */
+ 1858, /* GL_TEXTURE_GEN_S */
+ 1860, /* GL_TEXTURE_GEN_T */
+ 1857, /* GL_TEXTURE_GEN_R */
+ 1856, /* GL_TEXTURE_GEN_Q */
+ 1220, /* GL_PIXEL_MAP_I_TO_I */
+ 1226, /* GL_PIXEL_MAP_S_TO_S */
+ 1222, /* GL_PIXEL_MAP_I_TO_R */
+ 1218, /* GL_PIXEL_MAP_I_TO_G */
+ 1216, /* GL_PIXEL_MAP_I_TO_B */
+ 1214, /* GL_PIXEL_MAP_I_TO_A */
+ 1224, /* GL_PIXEL_MAP_R_TO_R */
+ 1212, /* GL_PIXEL_MAP_G_TO_G */
+ 1210, /* GL_PIXEL_MAP_B_TO_B */
+ 1208, /* GL_PIXEL_MAP_A_TO_A */
+ 1221, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1227, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1223, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1219, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1217, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1215, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1225, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1213, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1211, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1209, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1949, /* GL_UNPACK_SWAP_BYTES */
+ 1944, /* GL_UNPACK_LSB_FIRST */
+ 1945, /* GL_UNPACK_ROW_LENGTH */
+ 1948, /* GL_UNPACK_SKIP_ROWS */
+ 1947, /* GL_UNPACK_SKIP_PIXELS */
+ 1942, /* GL_UNPACK_ALIGNMENT */
+ 1195, /* GL_PACK_SWAP_BYTES */
+ 1190, /* GL_PACK_LSB_FIRST */
+ 1191, /* GL_PACK_ROW_LENGTH */
+ 1194, /* GL_PACK_SKIP_ROWS */
+ 1193, /* GL_PACK_SKIP_PIXELS */
+ 1187, /* GL_PACK_ALIGNMENT */
+ 863, /* GL_MAP_COLOR */
+ 868, /* GL_MAP_STENCIL */
+ 698, /* GL_INDEX_SHIFT */
+ 697, /* GL_INDEX_OFFSET */
+ 1426, /* GL_RED_SCALE */
+ 1424, /* GL_RED_BIAS */
+ 2063, /* GL_ZOOM_X */
+ 2064, /* GL_ZOOM_Y */
+ 653, /* GL_GREEN_SCALE */
+ 651, /* GL_GREEN_BIAS */
+ 101, /* GL_BLUE_SCALE */
+ 99, /* GL_BLUE_BIAS */
42, /* GL_ALPHA_SCALE */
40, /* GL_ALPHA_BIAS */
- 372, /* GL_DEPTH_SCALE */
- 352, /* GL_DEPTH_BIAS */
- 882, /* GL_MAX_EVAL_ORDER */
- 886, /* GL_MAX_LIGHTS */
- 864, /* GL_MAX_CLIP_PLANES */
- 934, /* GL_MAX_TEXTURE_SIZE */
- 892, /* GL_MAX_PIXEL_MAP_TABLE */
- 860, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 889, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 890, /* GL_MAX_NAME_STACK_DEPTH */
- 918, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 935, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 949, /* GL_MAX_VIEWPORT_DIMS */
- 861, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1553, /* GL_SUBPIXEL_BITS */
- 639, /* GL_INDEX_BITS */
- 1319, /* GL_RED_BITS */
- 603, /* GL_GREEN_BITS */
- 92, /* GL_BLUE_BITS */
+ 391, /* GL_DEPTH_SCALE */
+ 368, /* GL_DEPTH_BIAS */
+ 952, /* GL_MAX_EVAL_ORDER */
+ 962, /* GL_MAX_LIGHTS */
+ 933, /* GL_MAX_CLIP_PLANES */
+ 1013, /* GL_MAX_TEXTURE_SIZE */
+ 969, /* GL_MAX_PIXEL_MAP_TABLE */
+ 929, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 965, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 966, /* GL_MAX_NAME_STACK_DEPTH */
+ 995, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 1014, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 1036, /* GL_MAX_VIEWPORT_DIMS */
+ 930, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1685, /* GL_SUBPIXEL_BITS */
+ 693, /* GL_INDEX_BITS */
+ 1425, /* GL_RED_BITS */
+ 652, /* GL_GREEN_BITS */
+ 100, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
- 353, /* GL_DEPTH_BITS */
- 1521, /* GL_STENCIL_BITS */
+ 369, /* GL_DEPTH_BITS */
+ 1650, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1015, /* GL_NAME_STACK_DEPTH */
+ 1105, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 748, /* GL_MAP1_COLOR_4 */
- 751, /* GL_MAP1_INDEX */
- 752, /* GL_MAP1_NORMAL */
- 753, /* GL_MAP1_TEXTURE_COORD_1 */
- 754, /* GL_MAP1_TEXTURE_COORD_2 */
- 755, /* GL_MAP1_TEXTURE_COORD_3 */
- 756, /* GL_MAP1_TEXTURE_COORD_4 */
- 757, /* GL_MAP1_VERTEX_3 */
- 758, /* GL_MAP1_VERTEX_4 */
- 775, /* GL_MAP2_COLOR_4 */
- 778, /* GL_MAP2_INDEX */
- 779, /* GL_MAP2_NORMAL */
- 780, /* GL_MAP2_TEXTURE_COORD_1 */
- 781, /* GL_MAP2_TEXTURE_COORD_2 */
- 782, /* GL_MAP2_TEXTURE_COORD_3 */
- 783, /* GL_MAP2_TEXTURE_COORD_4 */
- 784, /* GL_MAP2_VERTEX_3 */
- 785, /* GL_MAP2_VERTEX_4 */
- 749, /* GL_MAP1_GRID_DOMAIN */
- 750, /* GL_MAP1_GRID_SEGMENTS */
- 776, /* GL_MAP2_GRID_DOMAIN */
- 777, /* GL_MAP2_GRID_SEGMENTS */
- 1636, /* GL_TEXTURE_1D */
- 1638, /* GL_TEXTURE_2D */
- 483, /* GL_FEEDBACK_BUFFER_POINTER */
- 484, /* GL_FEEDBACK_BUFFER_SIZE */
- 485, /* GL_FEEDBACK_BUFFER_TYPE */
- 1432, /* GL_SELECTION_BUFFER_POINTER */
- 1433, /* GL_SELECTION_BUFFER_SIZE */
- 1755, /* GL_TEXTURE_WIDTH */
- 1718, /* GL_TEXTURE_HEIGHT */
- 1673, /* GL_TEXTURE_COMPONENTS */
- 1657, /* GL_TEXTURE_BORDER_COLOR */
- 1656, /* GL_TEXTURE_BORDER */
- 386, /* GL_DONT_CARE */
- 481, /* GL_FASTEST */
- 1023, /* GL_NICEST */
+ 809, /* GL_MAP1_COLOR_4 */
+ 812, /* GL_MAP1_INDEX */
+ 813, /* GL_MAP1_NORMAL */
+ 814, /* GL_MAP1_TEXTURE_COORD_1 */
+ 815, /* GL_MAP1_TEXTURE_COORD_2 */
+ 816, /* GL_MAP1_TEXTURE_COORD_3 */
+ 817, /* GL_MAP1_TEXTURE_COORD_4 */
+ 818, /* GL_MAP1_VERTEX_3 */
+ 819, /* GL_MAP1_VERTEX_4 */
+ 836, /* GL_MAP2_COLOR_4 */
+ 839, /* GL_MAP2_INDEX */
+ 840, /* GL_MAP2_NORMAL */
+ 841, /* GL_MAP2_TEXTURE_COORD_1 */
+ 842, /* GL_MAP2_TEXTURE_COORD_2 */
+ 843, /* GL_MAP2_TEXTURE_COORD_3 */
+ 844, /* GL_MAP2_TEXTURE_COORD_4 */
+ 845, /* GL_MAP2_VERTEX_3 */
+ 846, /* GL_MAP2_VERTEX_4 */
+ 810, /* GL_MAP1_GRID_DOMAIN */
+ 811, /* GL_MAP1_GRID_SEGMENTS */
+ 837, /* GL_MAP2_GRID_DOMAIN */
+ 838, /* GL_MAP2_GRID_SEGMENTS */
+ 1768, /* GL_TEXTURE_1D */
+ 1770, /* GL_TEXTURE_2D */
+ 503, /* GL_FEEDBACK_BUFFER_POINTER */
+ 504, /* GL_FEEDBACK_BUFFER_SIZE */
+ 505, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1557, /* GL_SELECTION_BUFFER_POINTER */
+ 1558, /* GL_SELECTION_BUFFER_SIZE */
+ 1902, /* GL_TEXTURE_WIDTH */
+ 1864, /* GL_TEXTURE_HEIGHT */
+ 1808, /* GL_TEXTURE_COMPONENTS */
+ 1792, /* GL_TEXTURE_BORDER_COLOR */
+ 1791, /* GL_TEXTURE_BORDER */
+ 406, /* GL_DONT_CARE */
+ 501, /* GL_FASTEST */
+ 1113, /* GL_NICEST */
48, /* GL_AMBIENT */
- 383, /* GL_DIFFUSE */
- 1481, /* GL_SPECULAR */
- 1187, /* GL_POSITION */
- 1484, /* GL_SPOT_DIRECTION */
- 1485, /* GL_SPOT_EXPONENT */
- 1483, /* GL_SPOT_CUTOFF */
- 276, /* GL_CONSTANT_ATTENUATION */
- 698, /* GL_LINEAR_ATTENUATION */
- 1287, /* GL_QUADRATIC_ATTENUATION */
- 245, /* GL_COMPILE */
- 246, /* GL_COMPILE_AND_EXECUTE */
- 121, /* GL_BYTE */
- 1789, /* GL_UNSIGNED_BYTE */
- 1446, /* GL_SHORT */
- 1801, /* GL_UNSIGNED_SHORT */
- 647, /* GL_INT */
- 1792, /* GL_UNSIGNED_INT */
- 490, /* GL_FLOAT */
+ 403, /* GL_DIFFUSE */
+ 1609, /* GL_SPECULAR */
+ 1287, /* GL_POSITION */
+ 1612, /* GL_SPOT_DIRECTION */
+ 1613, /* GL_SPOT_EXPONENT */
+ 1611, /* GL_SPOT_CUTOFF */
+ 288, /* GL_CONSTANT_ATTENUATION */
+ 755, /* GL_LINEAR_ATTENUATION */
+ 1392, /* GL_QUADRATIC_ATTENUATION */
+ 257, /* GL_COMPILE */
+ 258, /* GL_COMPILE_AND_EXECUTE */
+ 132, /* GL_BYTE */
+ 1951, /* GL_UNSIGNED_BYTE */
+ 1574, /* GL_SHORT */
+ 1966, /* GL_UNSIGNED_SHORT */
+ 701, /* GL_INT */
+ 1954, /* GL_UNSIGNED_INT */
+ 512, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 393, /* GL_DOUBLE */
- 605, /* GL_HALF_FLOAT */
- 133, /* GL_CLEAR */
+ 413, /* GL_DOUBLE */
+ 654, /* GL_HALF_FLOAT */
+ 509, /* GL_FIXED */
+ 144, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
- 300, /* GL_COPY */
+ 313, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1025, /* GL_NOOP */
- 1885, /* GL_XOR */
- 1088, /* GL_OR */
- 1026, /* GL_NOR */
- 471, /* GL_EQUIV */
- 674, /* GL_INVERT */
- 1091, /* GL_OR_REVERSE */
- 301, /* GL_COPY_INVERTED */
- 1090, /* GL_OR_INVERTED */
- 1016, /* GL_NAND */
- 1437, /* GL_SET */
- 468, /* GL_EMISSION */
- 1445, /* GL_SHININESS */
+ 1116, /* GL_NOOP */
+ 2059, /* GL_XOR */
+ 1182, /* GL_OR */
+ 1117, /* GL_NOR */
+ 491, /* GL_EQUIV */
+ 731, /* GL_INVERT */
+ 1185, /* GL_OR_REVERSE */
+ 314, /* GL_COPY_INVERTED */
+ 1184, /* GL_OR_INVERTED */
+ 1106, /* GL_NAND */
+ 1563, /* GL_SET */
+ 488, /* GL_EMISSION */
+ 1573, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
- 191, /* GL_COLOR_INDEXES */
- 966, /* GL_MODELVIEW */
- 1263, /* GL_PROJECTION */
- 1571, /* GL_TEXTURE */
- 148, /* GL_COLOR */
- 347, /* GL_DEPTH */
- 1507, /* GL_STENCIL */
- 190, /* GL_COLOR_INDEX */
- 1526, /* GL_STENCIL_INDEX */
- 360, /* GL_DEPTH_COMPONENT */
- 1315, /* GL_RED */
- 601, /* GL_GREEN */
- 90, /* GL_BLUE */
+ 203, /* GL_COLOR_INDEXES */
+ 1055, /* GL_MODELVIEW */
+ 1367, /* GL_PROJECTION */
+ 1703, /* GL_TEXTURE */
+ 159, /* GL_COLOR */
+ 361, /* GL_DEPTH */
+ 1635, /* GL_STENCIL */
+ 202, /* GL_COLOR_INDEX */
+ 1655, /* GL_STENCIL_INDEX */
+ 376, /* GL_DEPTH_COMPONENT */
+ 1421, /* GL_RED */
+ 650, /* GL_GREEN */
+ 98, /* GL_BLUE */
31, /* GL_ALPHA */
- 1354, /* GL_RGB */
- 1373, /* GL_RGBA */
- 726, /* GL_LUMINANCE */
- 747, /* GL_LUMINANCE_ALPHA */
- 73, /* GL_BITMAP */
- 1143, /* GL_POINT */
- 696, /* GL_LINE */
- 486, /* GL_FILL */
- 1325, /* GL_RENDER */
- 482, /* GL_FEEDBACK */
- 1431, /* GL_SELECT */
- 489, /* GL_FLAT */
- 1456, /* GL_SMOOTH */
- 675, /* GL_KEEP */
- 1347, /* GL_REPLACE */
- 629, /* GL_INCR */
- 343, /* GL_DECR */
- 1816, /* GL_VENDOR */
- 1344, /* GL_RENDERER */
- 1817, /* GL_VERSION */
- 475, /* GL_EXTENSIONS */
- 1396, /* GL_S */
- 1562, /* GL_T */
- 1303, /* GL_R */
- 1286, /* GL_Q */
- 1002, /* GL_MODULATE */
- 342, /* GL_DECAL */
- 1708, /* GL_TEXTURE_ENV_MODE */
- 1707, /* GL_TEXTURE_ENV_COLOR */
- 1706, /* GL_TEXTURE_ENV */
- 476, /* GL_EYE_LINEAR */
- 1049, /* GL_OBJECT_LINEAR */
- 1482, /* GL_SPHERE_MAP */
- 1710, /* GL_TEXTURE_GEN_MODE */
- 1051, /* GL_OBJECT_PLANE */
- 477, /* GL_EYE_PLANE */
- 1017, /* GL_NEAREST */
- 697, /* GL_LINEAR */
- 1021, /* GL_NEAREST_MIPMAP_NEAREST */
- 702, /* GL_LINEAR_MIPMAP_NEAREST */
- 1020, /* GL_NEAREST_MIPMAP_LINEAR */
- 701, /* GL_LINEAR_MIPMAP_LINEAR */
- 1731, /* GL_TEXTURE_MAG_FILTER */
- 1739, /* GL_TEXTURE_MIN_FILTER */
- 1757, /* GL_TEXTURE_WRAP_S */
- 1758, /* GL_TEXTURE_WRAP_T */
- 127, /* GL_CLAMP */
- 1346, /* GL_REPEAT */
- 1181, /* GL_POLYGON_OFFSET_UNITS */
- 1180, /* GL_POLYGON_OFFSET_POINT */
- 1179, /* GL_POLYGON_OFFSET_LINE */
- 1304, /* GL_R3_G3_B2 */
- 1813, /* GL_V2F */
- 1814, /* GL_V3F */
- 124, /* GL_C4UB_V2F */
- 125, /* GL_C4UB_V3F */
- 122, /* GL_C3F_V3F */
- 1014, /* GL_N3F_V3F */
- 123, /* GL_C4F_N3F_V3F */
- 1567, /* GL_T2F_V3F */
- 1569, /* GL_T4F_V4F */
- 1565, /* GL_T2F_C4UB_V3F */
- 1563, /* GL_T2F_C3F_V3F */
- 1566, /* GL_T2F_N3F_V3F */
- 1564, /* GL_T2F_C4F_N3F_V3F */
- 1568, /* GL_T4F_C4F_N3F_V4F */
- 140, /* GL_CLIP_PLANE0 */
- 141, /* GL_CLIP_PLANE1 */
- 142, /* GL_CLIP_PLANE2 */
- 143, /* GL_CLIP_PLANE3 */
- 144, /* GL_CLIP_PLANE4 */
- 145, /* GL_CLIP_PLANE5 */
- 681, /* GL_LIGHT0 */
- 682, /* GL_LIGHT1 */
- 683, /* GL_LIGHT2 */
- 684, /* GL_LIGHT3 */
- 685, /* GL_LIGHT4 */
- 686, /* GL_LIGHT5 */
- 687, /* GL_LIGHT6 */
- 688, /* GL_LIGHT7 */
- 606, /* GL_HINT_BIT */
- 278, /* GL_CONSTANT_COLOR */
- 1062, /* GL_ONE_MINUS_CONSTANT_COLOR */
- 273, /* GL_CONSTANT_ALPHA */
- 1060, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- 76, /* GL_BLEND_COLOR */
- 589, /* GL_FUNC_ADD */
- 950, /* GL_MIN */
- 857, /* GL_MAX */
- 81, /* GL_BLEND_EQUATION */
- 593, /* GL_FUNC_SUBTRACT */
- 591, /* GL_FUNC_REVERSE_SUBTRACT */
- 281, /* GL_CONVOLUTION_1D */
- 282, /* GL_CONVOLUTION_2D */
- 1434, /* GL_SEPARABLE_2D */
- 285, /* GL_CONVOLUTION_BORDER_MODE */
- 289, /* GL_CONVOLUTION_FILTER_SCALE */
- 287, /* GL_CONVOLUTION_FILTER_BIAS */
- 1316, /* GL_REDUCE */
- 291, /* GL_CONVOLUTION_FORMAT */
- 295, /* GL_CONVOLUTION_WIDTH */
- 293, /* GL_CONVOLUTION_HEIGHT */
- 873, /* GL_MAX_CONVOLUTION_WIDTH */
- 871, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1220, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1216, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1211, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1207, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1218, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1214, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1209, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1205, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 607, /* GL_HISTOGRAM */
- 1269, /* GL_PROXY_HISTOGRAM */
- 623, /* GL_HISTOGRAM_WIDTH */
- 613, /* GL_HISTOGRAM_FORMAT */
- 619, /* GL_HISTOGRAM_RED_SIZE */
- 615, /* GL_HISTOGRAM_GREEN_SIZE */
- 610, /* GL_HISTOGRAM_BLUE_SIZE */
- 608, /* GL_HISTOGRAM_ALPHA_SIZE */
- 617, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 621, /* GL_HISTOGRAM_SINK */
- 951, /* GL_MINMAX */
- 953, /* GL_MINMAX_FORMAT */
- 955, /* GL_MINMAX_SINK */
- 1570, /* GL_TABLE_TOO_LARGE_EXT */
- 1791, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1803, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1805, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1798, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1793, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1178, /* GL_POLYGON_OFFSET_FILL */
- 1177, /* GL_POLYGON_OFFSET_FACTOR */
- 1176, /* GL_POLYGON_OFFSET_BIAS */
- 1350, /* GL_RESCALE_NORMAL */
+ 1472, /* GL_RGB */
+ 1495, /* GL_RGBA */
+ 787, /* GL_LUMINANCE */
+ 808, /* GL_LUMINANCE_ALPHA */
+ 74, /* GL_BITMAP */
+ 1237, /* GL_POINT */
+ 753, /* GL_LINE */
+ 506, /* GL_FILL */
+ 1432, /* GL_RENDER */
+ 502, /* GL_FEEDBACK */
+ 1556, /* GL_SELECT */
+ 511, /* GL_FLAT */
+ 1584, /* GL_SMOOTH */
+ 732, /* GL_KEEP */
+ 1465, /* GL_REPLACE */
+ 683, /* GL_INCR */
+ 357, /* GL_DECR */
+ 1983, /* GL_VENDOR */
+ 1462, /* GL_RENDERER */
+ 1984, /* GL_VERSION */
+ 495, /* GL_EXTENSIONS */
+ 1520, /* GL_S */
+ 1694, /* GL_T */
+ 1408, /* GL_R */
+ 1391, /* GL_Q */
+ 1092, /* GL_MODULATE */
+ 356, /* GL_DECAL */
+ 1851, /* GL_TEXTURE_ENV_MODE */
+ 1850, /* GL_TEXTURE_ENV_COLOR */
+ 1849, /* GL_TEXTURE_ENV */
+ 496, /* GL_EYE_LINEAR */
+ 1143, /* GL_OBJECT_LINEAR */
+ 1610, /* GL_SPHERE_MAP */
+ 1854, /* GL_TEXTURE_GEN_MODE */
+ 1145, /* GL_OBJECT_PLANE */
+ 497, /* GL_EYE_PLANE */
+ 1107, /* GL_NEAREST */
+ 754, /* GL_LINEAR */
+ 1111, /* GL_NEAREST_MIPMAP_NEAREST */
+ 759, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1110, /* GL_NEAREST_MIPMAP_LINEAR */
+ 758, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1877, /* GL_TEXTURE_MAG_FILTER */
+ 1886, /* GL_TEXTURE_MIN_FILTER */
+ 1905, /* GL_TEXTURE_WRAP_S */
+ 1906, /* GL_TEXTURE_WRAP_T */
+ 138, /* GL_CLAMP */
+ 1464, /* GL_REPEAT */
+ 1281, /* GL_POLYGON_OFFSET_UNITS */
+ 1280, /* GL_POLYGON_OFFSET_POINT */
+ 1279, /* GL_POLYGON_OFFSET_LINE */
+ 1409, /* GL_R3_G3_B2 */
+ 1980, /* GL_V2F */
+ 1981, /* GL_V3F */
+ 135, /* GL_C4UB_V2F */
+ 136, /* GL_C4UB_V3F */
+ 133, /* GL_C3F_V3F */
+ 1104, /* GL_N3F_V3F */
+ 134, /* GL_C4F_N3F_V3F */
+ 1699, /* GL_T2F_V3F */
+ 1701, /* GL_T4F_V4F */
+ 1697, /* GL_T2F_C4UB_V3F */
+ 1695, /* GL_T2F_C3F_V3F */
+ 1698, /* GL_T2F_N3F_V3F */
+ 1696, /* GL_T2F_C4F_N3F_V3F */
+ 1700, /* GL_T4F_C4F_N3F_V4F */
+ 151, /* GL_CLIP_PLANE0 */
+ 152, /* GL_CLIP_PLANE1 */
+ 153, /* GL_CLIP_PLANE2 */
+ 154, /* GL_CLIP_PLANE3 */
+ 155, /* GL_CLIP_PLANE4 */
+ 156, /* GL_CLIP_PLANE5 */
+ 738, /* GL_LIGHT0 */
+ 739, /* GL_LIGHT1 */
+ 740, /* GL_LIGHT2 */
+ 741, /* GL_LIGHT3 */
+ 742, /* GL_LIGHT4 */
+ 743, /* GL_LIGHT5 */
+ 744, /* GL_LIGHT6 */
+ 745, /* GL_LIGHT7 */
+ 658, /* GL_HINT_BIT */
+ 290, /* GL_CONSTANT_COLOR */
+ 1156, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 285, /* GL_CONSTANT_ALPHA */
+ 1154, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 77, /* GL_BLEND_COLOR */
+ 631, /* GL_FUNC_ADD */
+ 1039, /* GL_MIN */
+ 925, /* GL_MAX */
+ 84, /* GL_BLEND_EQUATION */
+ 637, /* GL_FUNC_SUBTRACT */
+ 634, /* GL_FUNC_REVERSE_SUBTRACT */
+ 293, /* GL_CONVOLUTION_1D */
+ 294, /* GL_CONVOLUTION_2D */
+ 1559, /* GL_SEPARABLE_2D */
+ 297, /* GL_CONVOLUTION_BORDER_MODE */
+ 301, /* GL_CONVOLUTION_FILTER_SCALE */
+ 299, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1422, /* GL_REDUCE */
+ 303, /* GL_CONVOLUTION_FORMAT */
+ 307, /* GL_CONVOLUTION_WIDTH */
+ 305, /* GL_CONVOLUTION_HEIGHT */
+ 942, /* GL_MAX_CONVOLUTION_WIDTH */
+ 940, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1320, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1316, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1311, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1307, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1318, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1314, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1309, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1305, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 659, /* GL_HISTOGRAM */
+ 1374, /* GL_PROXY_HISTOGRAM */
+ 675, /* GL_HISTOGRAM_WIDTH */
+ 665, /* GL_HISTOGRAM_FORMAT */
+ 671, /* GL_HISTOGRAM_RED_SIZE */
+ 667, /* GL_HISTOGRAM_GREEN_SIZE */
+ 662, /* GL_HISTOGRAM_BLUE_SIZE */
+ 660, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 669, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 673, /* GL_HISTOGRAM_SINK */
+ 1040, /* GL_MINMAX */
+ 1042, /* GL_MINMAX_FORMAT */
+ 1044, /* GL_MINMAX_SINK */
+ 1702, /* GL_TABLE_TOO_LARGE_EXT */
+ 1953, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1969, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1972, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1963, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1955, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1278, /* GL_POLYGON_OFFSET_FILL */
+ 1277, /* GL_POLYGON_OFFSET_FACTOR */
+ 1276, /* GL_POLYGON_OFFSET_BIAS */
+ 1468, /* GL_RESCALE_NORMAL */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 737, /* GL_LUMINANCE4 */
- 743, /* GL_LUMINANCE8 */
- 727, /* GL_LUMINANCE12 */
- 733, /* GL_LUMINANCE16 */
- 738, /* GL_LUMINANCE4_ALPHA4 */
- 741, /* GL_LUMINANCE6_ALPHA2 */
- 744, /* GL_LUMINANCE8_ALPHA8 */
- 730, /* GL_LUMINANCE12_ALPHA4 */
- 728, /* GL_LUMINANCE12_ALPHA12 */
- 734, /* GL_LUMINANCE16_ALPHA16 */
- 648, /* GL_INTENSITY */
- 653, /* GL_INTENSITY4 */
- 655, /* GL_INTENSITY8 */
- 649, /* GL_INTENSITY12 */
- 651, /* GL_INTENSITY16 */
- 1363, /* GL_RGB2_EXT */
- 1364, /* GL_RGB4 */
- 1367, /* GL_RGB5 */
- 1371, /* GL_RGB8 */
- 1355, /* GL_RGB10 */
- 1359, /* GL_RGB12 */
- 1361, /* GL_RGB16 */
- 1378, /* GL_RGBA2 */
- 1380, /* GL_RGBA4 */
- 1368, /* GL_RGB5_A1 */
- 1384, /* GL_RGBA8 */
- 1356, /* GL_RGB10_A2 */
- 1374, /* GL_RGBA12 */
- 1376, /* GL_RGBA16 */
- 1746, /* GL_TEXTURE_RED_SIZE */
- 1716, /* GL_TEXTURE_GREEN_SIZE */
- 1654, /* GL_TEXTURE_BLUE_SIZE */
- 1641, /* GL_TEXTURE_ALPHA_SIZE */
- 1729, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1720, /* GL_TEXTURE_INTENSITY_SIZE */
- 1348, /* GL_REPLACE_EXT */
- 1273, /* GL_PROXY_TEXTURE_1D */
- 1276, /* GL_PROXY_TEXTURE_2D */
- 1753, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1741, /* GL_TEXTURE_PRIORITY */
- 1748, /* GL_TEXTURE_RESIDENT */
- 1644, /* GL_TEXTURE_BINDING_1D */
- 1646, /* GL_TEXTURE_BINDING_2D */
- 1648, /* GL_TEXTURE_BINDING_3D */
- 1098, /* GL_PACK_SKIP_IMAGES */
- 1094, /* GL_PACK_IMAGE_HEIGHT */
- 1784, /* GL_UNPACK_SKIP_IMAGES */
- 1781, /* GL_UNPACK_IMAGE_HEIGHT */
- 1640, /* GL_TEXTURE_3D */
- 1279, /* GL_PROXY_TEXTURE_3D */
- 1703, /* GL_TEXTURE_DEPTH */
- 1756, /* GL_TEXTURE_WRAP_R */
- 858, /* GL_MAX_3D_TEXTURE_SIZE */
- 1818, /* GL_VERTEX_ARRAY */
- 1028, /* GL_NORMAL_ARRAY */
- 149, /* GL_COLOR_ARRAY */
- 633, /* GL_INDEX_ARRAY */
- 1681, /* GL_TEXTURE_COORD_ARRAY */
- 460, /* GL_EDGE_FLAG_ARRAY */
- 1824, /* GL_VERTEX_ARRAY_SIZE */
- 1826, /* GL_VERTEX_ARRAY_TYPE */
- 1825, /* GL_VERTEX_ARRAY_STRIDE */
- 1033, /* GL_NORMAL_ARRAY_TYPE */
- 1032, /* GL_NORMAL_ARRAY_STRIDE */
- 153, /* GL_COLOR_ARRAY_SIZE */
- 155, /* GL_COLOR_ARRAY_TYPE */
- 154, /* GL_COLOR_ARRAY_STRIDE */
- 638, /* GL_INDEX_ARRAY_TYPE */
- 637, /* GL_INDEX_ARRAY_STRIDE */
- 1685, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1687, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1686, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 464, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1823, /* GL_VERTEX_ARRAY_POINTER */
- 1031, /* GL_NORMAL_ARRAY_POINTER */
- 152, /* GL_COLOR_ARRAY_POINTER */
- 636, /* GL_INDEX_ARRAY_POINTER */
- 1684, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 463, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 1007, /* GL_MULTISAMPLE */
- 1408, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1410, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1415, /* GL_SAMPLE_COVERAGE */
- 1412, /* GL_SAMPLE_BUFFERS */
- 1403, /* GL_SAMPLES */
- 1419, /* GL_SAMPLE_COVERAGE_VALUE */
- 1417, /* GL_SAMPLE_COVERAGE_INVERT */
- 196, /* GL_COLOR_MATRIX */
- 198, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 867, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1203, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1199, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1194, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1190, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1201, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1197, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1192, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1188, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1664, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1280, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1666, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- 80, /* GL_BLEND_DST_RGB */
- 89, /* GL_BLEND_SRC_RGB */
- 79, /* GL_BLEND_DST_ALPHA */
- 88, /* GL_BLEND_SRC_ALPHA */
- 202, /* GL_COLOR_TABLE */
- 1213, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1196, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1268, /* GL_PROXY_COLOR_TABLE */
- 1272, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1271, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- 226, /* GL_COLOR_TABLE_SCALE */
- 206, /* GL_COLOR_TABLE_BIAS */
- 211, /* GL_COLOR_TABLE_FORMAT */
- 228, /* GL_COLOR_TABLE_WIDTH */
- 223, /* GL_COLOR_TABLE_RED_SIZE */
- 214, /* GL_COLOR_TABLE_GREEN_SIZE */
- 208, /* GL_COLOR_TABLE_BLUE_SIZE */
- 203, /* GL_COLOR_TABLE_ALPHA_SIZE */
- 220, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- 217, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 798, /* GL_LUMINANCE4 */
+ 804, /* GL_LUMINANCE8 */
+ 788, /* GL_LUMINANCE12 */
+ 794, /* GL_LUMINANCE16 */
+ 799, /* GL_LUMINANCE4_ALPHA4 */
+ 802, /* GL_LUMINANCE6_ALPHA2 */
+ 805, /* GL_LUMINANCE8_ALPHA8 */
+ 791, /* GL_LUMINANCE12_ALPHA4 */
+ 789, /* GL_LUMINANCE12_ALPHA12 */
+ 795, /* GL_LUMINANCE16_ALPHA16 */
+ 702, /* GL_INTENSITY */
+ 707, /* GL_INTENSITY4 */
+ 709, /* GL_INTENSITY8 */
+ 703, /* GL_INTENSITY12 */
+ 705, /* GL_INTENSITY16 */
+ 1481, /* GL_RGB2_EXT */
+ 1482, /* GL_RGB4 */
+ 1485, /* GL_RGB5 */
+ 1492, /* GL_RGB8 */
+ 1473, /* GL_RGB10 */
+ 1477, /* GL_RGB12 */
+ 1479, /* GL_RGB16 */
+ 1500, /* GL_RGBA2 */
+ 1502, /* GL_RGBA4 */
+ 1488, /* GL_RGB5_A1 */
+ 1507, /* GL_RGBA8 */
+ 1474, /* GL_RGB10_A2 */
+ 1496, /* GL_RGBA12 */
+ 1498, /* GL_RGBA16 */
+ 1893, /* GL_TEXTURE_RED_SIZE */
+ 1862, /* GL_TEXTURE_GREEN_SIZE */
+ 1789, /* GL_TEXTURE_BLUE_SIZE */
+ 1774, /* GL_TEXTURE_ALPHA_SIZE */
+ 1875, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1866, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1466, /* GL_REPLACE_EXT */
+ 1378, /* GL_PROXY_TEXTURE_1D */
+ 1381, /* GL_PROXY_TEXTURE_2D */
+ 1900, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1888, /* GL_TEXTURE_PRIORITY */
+ 1895, /* GL_TEXTURE_RESIDENT */
+ 1777, /* GL_TEXTURE_BINDING_1D */
+ 1779, /* GL_TEXTURE_BINDING_2D */
+ 1781, /* GL_TEXTURE_BINDING_3D */
+ 1192, /* GL_PACK_SKIP_IMAGES */
+ 1188, /* GL_PACK_IMAGE_HEIGHT */
+ 1946, /* GL_UNPACK_SKIP_IMAGES */
+ 1943, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1772, /* GL_TEXTURE_3D */
+ 1384, /* GL_PROXY_TEXTURE_3D */
+ 1846, /* GL_TEXTURE_DEPTH */
+ 1903, /* GL_TEXTURE_WRAP_R */
+ 926, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1985, /* GL_VERTEX_ARRAY */
+ 1119, /* GL_NORMAL_ARRAY */
+ 160, /* GL_COLOR_ARRAY */
+ 687, /* GL_INDEX_ARRAY */
+ 1816, /* GL_TEXTURE_COORD_ARRAY */
+ 480, /* GL_EDGE_FLAG_ARRAY */
+ 1991, /* GL_VERTEX_ARRAY_SIZE */
+ 1993, /* GL_VERTEX_ARRAY_TYPE */
+ 1992, /* GL_VERTEX_ARRAY_STRIDE */
+ 1124, /* GL_NORMAL_ARRAY_TYPE */
+ 1123, /* GL_NORMAL_ARRAY_STRIDE */
+ 164, /* GL_COLOR_ARRAY_SIZE */
+ 166, /* GL_COLOR_ARRAY_TYPE */
+ 165, /* GL_COLOR_ARRAY_STRIDE */
+ 692, /* GL_INDEX_ARRAY_TYPE */
+ 691, /* GL_INDEX_ARRAY_STRIDE */
+ 1820, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1822, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1821, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 484, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 1990, /* GL_VERTEX_ARRAY_POINTER */
+ 1122, /* GL_NORMAL_ARRAY_POINTER */
+ 163, /* GL_COLOR_ARRAY_POINTER */
+ 690, /* GL_INDEX_ARRAY_POINTER */
+ 1819, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 483, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1097, /* GL_MULTISAMPLE */
+ 1533, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1535, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1540, /* GL_SAMPLE_COVERAGE */
+ 1537, /* GL_SAMPLE_BUFFERS */
+ 1528, /* GL_SAMPLES */
+ 1544, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1542, /* GL_SAMPLE_COVERAGE_INVERT */
+ 208, /* GL_COLOR_MATRIX */
+ 210, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 936, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1303, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1299, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1294, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1290, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1301, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1297, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1292, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1288, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1799, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1385, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1801, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 82, /* GL_BLEND_DST_RGB */
+ 96, /* GL_BLEND_SRC_RGB */
+ 80, /* GL_BLEND_DST_ALPHA */
+ 94, /* GL_BLEND_SRC_ALPHA */
+ 214, /* GL_COLOR_TABLE */
+ 1313, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1296, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1373, /* GL_PROXY_COLOR_TABLE */
+ 1377, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1376, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 238, /* GL_COLOR_TABLE_SCALE */
+ 218, /* GL_COLOR_TABLE_BIAS */
+ 223, /* GL_COLOR_TABLE_FORMAT */
+ 240, /* GL_COLOR_TABLE_WIDTH */
+ 235, /* GL_COLOR_TABLE_RED_SIZE */
+ 226, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 220, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 215, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 232, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 229, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 881, /* GL_MAX_ELEMENTS_VERTICES */
- 880, /* GL_MAX_ELEMENTS_INDICES */
- 1719, /* GL_TEXTURE_INDEX_SIZE_EXT */
- 146, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1160, /* GL_POINT_SIZE_MIN */
- 1156, /* GL_POINT_SIZE_MAX */
- 1150, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1146, /* GL_POINT_DISTANCE_ATTENUATION */
- 128, /* GL_CLAMP_TO_BORDER */
- 131, /* GL_CLAMP_TO_EDGE */
- 1740, /* GL_TEXTURE_MIN_LOD */
- 1738, /* GL_TEXTURE_MAX_LOD */
- 1643, /* GL_TEXTURE_BASE_LEVEL */
- 1737, /* GL_TEXTURE_MAX_LEVEL */
- 626, /* GL_IGNORE_BORDER_HP */
- 277, /* GL_CONSTANT_BORDER_HP */
- 1349, /* GL_REPLICATE_BORDER_HP */
- 283, /* GL_CONVOLUTION_BORDER_COLOR */
- 1057, /* GL_OCCLUSION_TEST_HP */
- 1058, /* GL_OCCLUSION_TEST_RESULT_HP */
- 699, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1658, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1660, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1662, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1663, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1661, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1659, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 862, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 863, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1223, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1225, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1222, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1224, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1727, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1728, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1726, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 595, /* GL_GENERATE_MIPMAP */
- 596, /* GL_GENERATE_MIPMAP_HINT */
- 533, /* GL_FOG_OFFSET_SGIX */
- 534, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1672, /* GL_TEXTURE_COMPARE_SGIX */
- 1671, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1723, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1715, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 361, /* GL_DEPTH_COMPONENT16 */
- 364, /* GL_DEPTH_COMPONENT24 */
- 367, /* GL_DEPTH_COMPONENT32 */
- 307, /* GL_CULL_VERTEX_EXT */
- 309, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- 308, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1882, /* GL_WRAP_BORDER_SUN */
- 1665, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 692, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1449, /* GL_SINGLE_COLOR */
- 1435, /* GL_SEPARATE_SPECULAR_COLOR */
- 1444, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 544, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 545, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 552, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 547, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 543, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 542, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 546, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 553, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 565, /* GL_FRAMEBUFFER_DEFAULT */
- 581, /* GL_FRAMEBUFFER_UNDEFINED */
- 374, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 632, /* GL_INDEX */
- 1790, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1806, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1807, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1804, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1802, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1799, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1797, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1735, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1736, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1734, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 958, /* GL_MIRRORED_REPEAT */
- 1391, /* GL_RGB_S3TC */
- 1366, /* GL_RGB4_S3TC */
- 1389, /* GL_RGBA_S3TC */
- 1383, /* GL_RGBA4_S3TC */
- 1387, /* GL_RGBA_DXT5_S3TC */
- 1381, /* GL_RGBA4_DXT5_S3TC */
- 265, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- 260, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- 261, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- 262, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1019, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1018, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 700, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 520, /* GL_FOG_COORDINATE_SOURCE */
- 512, /* GL_FOG_COORD */
- 536, /* GL_FRAGMENT_DEPTH */
- 313, /* GL_CURRENT_FOG_COORD */
- 519, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 518, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 517, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 514, /* GL_FOG_COORDINATE_ARRAY */
- 200, /* GL_COLOR_SUM */
- 333, /* GL_CURRENT_SECONDARY_COLOR */
- 1428, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1430, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1429, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1427, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1424, /* GL_SECONDARY_COLOR_ARRAY */
- 331, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 951, /* GL_MAX_ELEMENTS_VERTICES */
+ 950, /* GL_MAX_ELEMENTS_INDICES */
+ 1865, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 157, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1259, /* GL_POINT_SIZE_MIN */
+ 1255, /* GL_POINT_SIZE_MAX */
+ 1244, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1240, /* GL_POINT_DISTANCE_ATTENUATION */
+ 139, /* GL_CLAMP_TO_BORDER */
+ 142, /* GL_CLAMP_TO_EDGE */
+ 1887, /* GL_TEXTURE_MIN_LOD */
+ 1885, /* GL_TEXTURE_MAX_LOD */
+ 1776, /* GL_TEXTURE_BASE_LEVEL */
+ 1884, /* GL_TEXTURE_MAX_LEVEL */
+ 678, /* GL_IGNORE_BORDER_HP */
+ 289, /* GL_CONSTANT_BORDER_HP */
+ 1467, /* GL_REPLICATE_BORDER_HP */
+ 295, /* GL_CONVOLUTION_BORDER_COLOR */
+ 1151, /* GL_OCCLUSION_TEST_HP */
+ 1152, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 756, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1793, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1795, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1797, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1798, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1796, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1794, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 931, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 932, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1323, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1325, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1322, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1324, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1873, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1874, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1872, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 640, /* GL_GENERATE_MIPMAP */
+ 641, /* GL_GENERATE_MIPMAP_HINT */
+ 555, /* GL_FOG_OFFSET_SGIX */
+ 556, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1807, /* GL_TEXTURE_COMPARE_SGIX */
+ 1806, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1869, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1861, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 377, /* GL_DEPTH_COMPONENT16 */
+ 381, /* GL_DEPTH_COMPONENT24 */
+ 385, /* GL_DEPTH_COMPONENT32 */
+ 320, /* GL_CULL_VERTEX_EXT */
+ 322, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 321, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 2055, /* GL_WRAP_BORDER_SUN */
+ 1800, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 749, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1577, /* GL_SINGLE_COLOR */
+ 1561, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1572, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 567, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 568, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 578, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 570, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 566, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 565, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 569, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 579, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 596, /* GL_FRAMEBUFFER_DEFAULT */
+ 622, /* GL_FRAMEBUFFER_UNDEFINED */
+ 393, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 686, /* GL_INDEX */
+ 1952, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1973, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1974, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1970, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1967, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1964, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1961, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1882, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1883, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1881, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 1047, /* GL_MIRRORED_REPEAT */
+ 1515, /* GL_RGB_S3TC */
+ 1484, /* GL_RGB4_S3TC */
+ 1513, /* GL_RGBA_S3TC */
+ 1506, /* GL_RGBA4_S3TC */
+ 1511, /* GL_RGBA_DXT5_S3TC */
+ 1503, /* GL_RGBA4_DXT5_S3TC */
+ 277, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 272, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 273, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 274, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 1109, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1108, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 757, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 542, /* GL_FOG_COORDINATE_SOURCE */
+ 534, /* GL_FOG_COORD */
+ 558, /* GL_FRAGMENT_DEPTH */
+ 326, /* GL_CURRENT_FOG_COORD */
+ 541, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 540, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 539, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 536, /* GL_FOG_COORDINATE_ARRAY */
+ 212, /* GL_COLOR_SUM */
+ 347, /* GL_CURRENT_SECONDARY_COLOR */
+ 1553, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1555, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1554, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1552, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1549, /* GL_SECONDARY_COLOR_ARRAY */
+ 345, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1572, /* GL_TEXTURE0 */
- 1574, /* GL_TEXTURE1 */
- 1596, /* GL_TEXTURE2 */
- 1618, /* GL_TEXTURE3 */
- 1624, /* GL_TEXTURE4 */
- 1626, /* GL_TEXTURE5 */
- 1628, /* GL_TEXTURE6 */
- 1630, /* GL_TEXTURE7 */
- 1632, /* GL_TEXTURE8 */
- 1634, /* GL_TEXTURE9 */
- 1575, /* GL_TEXTURE10 */
- 1577, /* GL_TEXTURE11 */
- 1579, /* GL_TEXTURE12 */
- 1581, /* GL_TEXTURE13 */
- 1583, /* GL_TEXTURE14 */
- 1585, /* GL_TEXTURE15 */
- 1587, /* GL_TEXTURE16 */
- 1589, /* GL_TEXTURE17 */
- 1591, /* GL_TEXTURE18 */
- 1593, /* GL_TEXTURE19 */
- 1597, /* GL_TEXTURE20 */
- 1599, /* GL_TEXTURE21 */
- 1601, /* GL_TEXTURE22 */
- 1603, /* GL_TEXTURE23 */
- 1605, /* GL_TEXTURE24 */
- 1607, /* GL_TEXTURE25 */
- 1609, /* GL_TEXTURE26 */
- 1611, /* GL_TEXTURE27 */
- 1613, /* GL_TEXTURE28 */
- 1615, /* GL_TEXTURE29 */
- 1619, /* GL_TEXTURE30 */
- 1621, /* GL_TEXTURE31 */
+ 1704, /* GL_TEXTURE0 */
+ 1706, /* GL_TEXTURE1 */
+ 1728, /* GL_TEXTURE2 */
+ 1750, /* GL_TEXTURE3 */
+ 1756, /* GL_TEXTURE4 */
+ 1758, /* GL_TEXTURE5 */
+ 1760, /* GL_TEXTURE6 */
+ 1762, /* GL_TEXTURE7 */
+ 1764, /* GL_TEXTURE8 */
+ 1766, /* GL_TEXTURE9 */
+ 1707, /* GL_TEXTURE10 */
+ 1709, /* GL_TEXTURE11 */
+ 1711, /* GL_TEXTURE12 */
+ 1713, /* GL_TEXTURE13 */
+ 1715, /* GL_TEXTURE14 */
+ 1717, /* GL_TEXTURE15 */
+ 1719, /* GL_TEXTURE16 */
+ 1721, /* GL_TEXTURE17 */
+ 1723, /* GL_TEXTURE18 */
+ 1725, /* GL_TEXTURE19 */
+ 1729, /* GL_TEXTURE20 */
+ 1731, /* GL_TEXTURE21 */
+ 1733, /* GL_TEXTURE22 */
+ 1735, /* GL_TEXTURE23 */
+ 1737, /* GL_TEXTURE24 */
+ 1739, /* GL_TEXTURE25 */
+ 1741, /* GL_TEXTURE26 */
+ 1743, /* GL_TEXTURE27 */
+ 1745, /* GL_TEXTURE28 */
+ 1747, /* GL_TEXTURE29 */
+ 1751, /* GL_TEXTURE30 */
+ 1753, /* GL_TEXTURE31 */
18, /* GL_ACTIVE_TEXTURE */
- 134, /* GL_CLIENT_ACTIVE_TEXTURE */
- 936, /* GL_MAX_TEXTURE_UNITS */
- 1767, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1770, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1772, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1764, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1554, /* GL_SUBTRACT */
- 921, /* GL_MAX_RENDERBUFFER_SIZE */
- 248, /* GL_COMPRESSED_ALPHA */
- 252, /* GL_COMPRESSED_LUMINANCE */
- 253, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- 250, /* GL_COMPRESSED_INTENSITY */
- 256, /* GL_COMPRESSED_RGB */
- 257, /* GL_COMPRESSED_RGBA */
- 1679, /* GL_TEXTURE_COMPRESSION_HINT */
- 1744, /* GL_TEXTURE_RECTANGLE_ARB */
- 1651, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1283, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 919, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 373, /* GL_DEPTH_STENCIL */
- 1794, /* GL_UNSIGNED_INT_24_8 */
- 932, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1733, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 933, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1709, /* GL_TEXTURE_FILTER_CONTROL */
- 1724, /* GL_TEXTURE_LOD_BIAS */
- 233, /* GL_COMBINE4 */
- 926, /* GL_MAX_SHININESS_NV */
- 927, /* GL_MAX_SPOT_EXPONENT_NV */
- 630, /* GL_INCR_WRAP */
- 344, /* GL_DECR_WRAP */
- 978, /* GL_MODELVIEW1_ARB */
- 1034, /* GL_NORMAL_MAP */
- 1321, /* GL_REFLECTION_MAP */
- 1688, /* GL_TEXTURE_CUBE_MAP */
- 1649, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1696, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1690, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1698, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1692, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1700, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1694, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1281, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 875, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1013, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 528, /* GL_FOG_DISTANCE_MODE_NV */
- 479, /* GL_EYE_RADIAL_NV */
- 478, /* GL_EYE_PLANE_ABSOLUTE_NV */
- 232, /* GL_COMBINE */
- 239, /* GL_COMBINE_RGB */
- 234, /* GL_COMBINE_ALPHA */
- 1392, /* GL_RGB_SCALE */
+ 145, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 1015, /* GL_MAX_TEXTURE_UNITS */
+ 1927, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1930, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1932, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1924, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1686, /* GL_SUBTRACT */
+ 998, /* GL_MAX_RENDERBUFFER_SIZE */
+ 260, /* GL_COMPRESSED_ALPHA */
+ 264, /* GL_COMPRESSED_LUMINANCE */
+ 265, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 262, /* GL_COMPRESSED_INTENSITY */
+ 268, /* GL_COMPRESSED_RGB */
+ 269, /* GL_COMPRESSED_RGBA */
+ 1814, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1891, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1786, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1388, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 996, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 392, /* GL_DEPTH_STENCIL */
+ 1957, /* GL_UNSIGNED_INT_24_8 */
+ 1010, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1880, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1012, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1852, /* GL_TEXTURE_FILTER_CONTROL */
+ 1870, /* GL_TEXTURE_LOD_BIAS */
+ 245, /* GL_COMBINE4 */
+ 1004, /* GL_MAX_SHININESS_NV */
+ 1005, /* GL_MAX_SPOT_EXPONENT_NV */
+ 684, /* GL_INCR_WRAP */
+ 358, /* GL_DECR_WRAP */
+ 1067, /* GL_MODELVIEW1_ARB */
+ 1125, /* GL_NORMAL_MAP */
+ 1427, /* GL_REFLECTION_MAP */
+ 1824, /* GL_TEXTURE_CUBE_MAP */
+ 1783, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1836, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1826, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1839, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1829, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1842, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1832, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1386, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 944, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1103, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 550, /* GL_FOG_DISTANCE_MODE_NV */
+ 499, /* GL_EYE_RADIAL_NV */
+ 498, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 244, /* GL_COMBINE */
+ 251, /* GL_COMBINE_RGB */
+ 246, /* GL_COMBINE_ALPHA */
+ 1516, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 658, /* GL_INTERPOLATE */
- 272, /* GL_CONSTANT */
- 1229, /* GL_PRIMARY_COLOR */
- 1226, /* GL_PREVIOUS */
- 1464, /* GL_SOURCE0_RGB */
- 1470, /* GL_SOURCE1_RGB */
- 1476, /* GL_SOURCE2_RGB */
- 1480, /* GL_SOURCE3_RGB_NV */
- 1461, /* GL_SOURCE0_ALPHA */
- 1467, /* GL_SOURCE1_ALPHA */
- 1473, /* GL_SOURCE2_ALPHA */
- 1479, /* GL_SOURCE3_ALPHA_NV */
- 1071, /* GL_OPERAND0_RGB */
- 1077, /* GL_OPERAND1_RGB */
- 1083, /* GL_OPERAND2_RGB */
- 1087, /* GL_OPERAND3_RGB_NV */
- 1068, /* GL_OPERAND0_ALPHA */
- 1074, /* GL_OPERAND1_ALPHA */
- 1080, /* GL_OPERAND2_ALPHA */
- 1086, /* GL_OPERAND3_ALPHA_NV */
- 109, /* GL_BUFFER_OBJECT_APPLE */
- 1819, /* GL_VERTEX_ARRAY_BINDING */
- 1742, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1743, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1886, /* GL_YCBCR_422_APPLE */
- 1808, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1810, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1752, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1545, /* GL_STORAGE_PRIVATE_APPLE */
- 1544, /* GL_STORAGE_CACHED_APPLE */
- 1546, /* GL_STORAGE_SHARED_APPLE */
- 1451, /* GL_SLICE_ACCUM_SUN */
- 1291, /* GL_QUAD_MESH_SUN */
- 1776, /* GL_TRIANGLE_MESH_SUN */
- 1858, /* GL_VERTEX_PROGRAM_ARB */
- 1869, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1845, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1851, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1853, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1855, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- 335, /* GL_CURRENT_VERTEX_ATTRIB */
- 1242, /* GL_PROGRAM_LENGTH_ARB */
- 1256, /* GL_PROGRAM_STRING_ARB */
- 1000, /* GL_MODELVIEW_PROJECTION_NV */
- 625, /* GL_IDENTITY_NV */
- 672, /* GL_INVERSE_NV */
- 1769, /* GL_TRANSPOSE_NV */
- 673, /* GL_INVERSE_TRANSPOSE_NV */
- 905, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 904, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 811, /* GL_MATRIX0_NV */
- 823, /* GL_MATRIX1_NV */
- 835, /* GL_MATRIX2_NV */
- 839, /* GL_MATRIX3_NV */
- 841, /* GL_MATRIX4_NV */
- 843, /* GL_MATRIX5_NV */
- 845, /* GL_MATRIX6_NV */
- 847, /* GL_MATRIX7_NV */
- 319, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- 316, /* GL_CURRENT_MATRIX_ARB */
- 1861, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1864, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1254, /* GL_PROGRAM_PARAMETER_NV */
- 1849, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1258, /* GL_PROGRAM_TARGET_NV */
- 1255, /* GL_PROGRAM_RESIDENT_NV */
- 1761, /* GL_TRACK_MATRIX_NV */
- 1762, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1859, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1236, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 357, /* GL_DEPTH_CLAMP */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1834, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1835, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1836, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1837, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1838, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1839, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1840, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1841, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1842, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1828, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1829, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1830, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1831, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1832, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1833, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 759, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 766, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 767, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 768, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 769, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 770, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 771, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 772, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 773, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 774, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 760, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 761, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 762, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 763, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 764, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 765, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 786, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 793, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 794, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 795, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 796, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 797, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 798, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1235, /* GL_PROGRAM_BINDING_ARB */
- 800, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 801, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 787, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 788, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 789, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 790, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 791, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 792, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1677, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1674, /* GL_TEXTURE_COMPRESSED */
- 1039, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- 270, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 948, /* GL_MAX_VERTEX_UNITS_ARB */
+ 713, /* GL_INTERPOLATE */
+ 284, /* GL_CONSTANT */
+ 1329, /* GL_PRIMARY_COLOR */
+ 1326, /* GL_PREVIOUS */
+ 1592, /* GL_SOURCE0_RGB */
+ 1598, /* GL_SOURCE1_RGB */
+ 1604, /* GL_SOURCE2_RGB */
+ 1608, /* GL_SOURCE3_RGB_NV */
+ 1589, /* GL_SOURCE0_ALPHA */
+ 1595, /* GL_SOURCE1_ALPHA */
+ 1601, /* GL_SOURCE2_ALPHA */
+ 1607, /* GL_SOURCE3_ALPHA_NV */
+ 1165, /* GL_OPERAND0_RGB */
+ 1171, /* GL_OPERAND1_RGB */
+ 1177, /* GL_OPERAND2_RGB */
+ 1181, /* GL_OPERAND3_RGB_NV */
+ 1162, /* GL_OPERAND0_ALPHA */
+ 1168, /* GL_OPERAND1_ALPHA */
+ 1174, /* GL_OPERAND2_ALPHA */
+ 1180, /* GL_OPERAND3_ALPHA_NV */
+ 120, /* GL_BUFFER_OBJECT_APPLE */
+ 1986, /* GL_VERTEX_ARRAY_BINDING */
+ 1889, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1890, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 2060, /* GL_YCBCR_422_APPLE */
+ 1975, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1977, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1899, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1677, /* GL_STORAGE_PRIVATE_APPLE */
+ 1676, /* GL_STORAGE_CACHED_APPLE */
+ 1678, /* GL_STORAGE_SHARED_APPLE */
+ 1579, /* GL_SLICE_ACCUM_SUN */
+ 1396, /* GL_QUAD_MESH_SUN */
+ 1937, /* GL_TRIANGLE_MESH_SUN */
+ 2025, /* GL_VERTEX_PROGRAM_ARB */
+ 2036, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 2012, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 2018, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 2020, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 2022, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 349, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1345, /* GL_PROGRAM_LENGTH_ARB */
+ 1360, /* GL_PROGRAM_STRING_ARB */
+ 1090, /* GL_MODELVIEW_PROJECTION_NV */
+ 677, /* GL_IDENTITY_NV */
+ 729, /* GL_INVERSE_NV */
+ 1929, /* GL_TRANSPOSE_NV */
+ 730, /* GL_INVERSE_TRANSPOSE_NV */
+ 982, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 981, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 872, /* GL_MATRIX0_NV */
+ 884, /* GL_MATRIX1_NV */
+ 896, /* GL_MATRIX2_NV */
+ 900, /* GL_MATRIX3_NV */
+ 902, /* GL_MATRIX4_NV */
+ 904, /* GL_MATRIX5_NV */
+ 906, /* GL_MATRIX6_NV */
+ 908, /* GL_MATRIX7_NV */
+ 332, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 329, /* GL_CURRENT_MATRIX_ARB */
+ 2028, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 2031, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1357, /* GL_PROGRAM_PARAMETER_NV */
+ 2016, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1362, /* GL_PROGRAM_TARGET_NV */
+ 1359, /* GL_PROGRAM_RESIDENT_NV */
+ 1909, /* GL_TRACK_MATRIX_NV */
+ 1910, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 2026, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1339, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 373, /* GL_DEPTH_CLAMP */
+ 1994, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 2001, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 2002, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 2003, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 2004, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 2005, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 2006, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 2007, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 2008, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 2009, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1995, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1996, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1997, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1998, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1999, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 2000, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 820, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 827, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 828, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 829, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 830, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 831, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 832, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 833, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 834, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 835, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 821, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 822, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 823, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 824, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 825, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 826, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 847, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 854, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 855, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 856, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 857, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 858, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 859, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1338, /* GL_PROGRAM_BINDING_ARB */
+ 861, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 862, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 848, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 849, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 850, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 851, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 852, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 853, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1812, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1809, /* GL_TEXTURE_COMPRESSED */
+ 1131, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 282, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 1033, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1881, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1857, /* GL_VERTEX_BLEND_ARB */
- 337, /* GL_CURRENT_WEIGHT_ARB */
- 1880, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1879, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1878, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1877, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1874, /* GL_WEIGHT_ARRAY_ARB */
- 387, /* GL_DOT3_RGB */
- 388, /* GL_DOT3_RGBA */
- 264, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- 259, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 1008, /* GL_MULTISAMPLE_3DFX */
- 1413, /* GL_SAMPLE_BUFFERS_3DFX */
- 1404, /* GL_SAMPLES_3DFX */
- 989, /* GL_MODELVIEW2_ARB */
- 992, /* GL_MODELVIEW3_ARB */
- 993, /* GL_MODELVIEW4_ARB */
- 994, /* GL_MODELVIEW5_ARB */
- 995, /* GL_MODELVIEW6_ARB */
- 996, /* GL_MODELVIEW7_ARB */
- 997, /* GL_MODELVIEW8_ARB */
- 998, /* GL_MODELVIEW9_ARB */
- 968, /* GL_MODELVIEW10_ARB */
- 969, /* GL_MODELVIEW11_ARB */
- 970, /* GL_MODELVIEW12_ARB */
- 971, /* GL_MODELVIEW13_ARB */
- 972, /* GL_MODELVIEW14_ARB */
- 973, /* GL_MODELVIEW15_ARB */
- 974, /* GL_MODELVIEW16_ARB */
- 975, /* GL_MODELVIEW17_ARB */
- 976, /* GL_MODELVIEW18_ARB */
- 977, /* GL_MODELVIEW19_ARB */
- 979, /* GL_MODELVIEW20_ARB */
- 980, /* GL_MODELVIEW21_ARB */
- 981, /* GL_MODELVIEW22_ARB */
- 982, /* GL_MODELVIEW23_ARB */
- 983, /* GL_MODELVIEW24_ARB */
- 984, /* GL_MODELVIEW25_ARB */
- 985, /* GL_MODELVIEW26_ARB */
- 986, /* GL_MODELVIEW27_ARB */
- 987, /* GL_MODELVIEW28_ARB */
- 988, /* GL_MODELVIEW29_ARB */
- 990, /* GL_MODELVIEW30_ARB */
- 991, /* GL_MODELVIEW31_ARB */
- 392, /* GL_DOT3_RGB_EXT */
- 390, /* GL_DOT3_RGBA_EXT */
- 962, /* GL_MIRROR_CLAMP_EXT */
- 965, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 1003, /* GL_MODULATE_ADD_ATI */
- 1004, /* GL_MODULATE_SIGNED_ADD_ATI */
- 1005, /* GL_MODULATE_SUBTRACT_ATI */
- 1887, /* GL_YCBCR_MESA */
- 1095, /* GL_PACK_INVERT_MESA */
- 340, /* GL_DEBUG_OBJECT_MESA */
- 341, /* GL_DEBUG_PRINT_MESA */
- 339, /* GL_DEBUG_ASSERT_MESA */
- 111, /* GL_BUFFER_SIZE */
- 113, /* GL_BUFFER_USAGE */
- 117, /* GL_BUMP_ROT_MATRIX_ATI */
- 118, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- 116, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- 120, /* GL_BUMP_TEX_UNITS_ATI */
- 452, /* GL_DUDV_ATI */
- 451, /* GL_DU8DV8_ATI */
- 115, /* GL_BUMP_ENVMAP_ATI */
- 119, /* GL_BUMP_TARGET_ATI */
- 1512, /* GL_STENCIL_BACK_FUNC */
- 1510, /* GL_STENCIL_BACK_FAIL */
- 1514, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1516, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 537, /* GL_FRAGMENT_PROGRAM_ARB */
- 1233, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1261, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1260, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1245, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1251, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1250, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 894, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 917, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 916, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 907, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 913, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 912, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 877, /* GL_MAX_DRAW_BUFFERS */
- 396, /* GL_DRAW_BUFFER0 */
- 399, /* GL_DRAW_BUFFER1 */
- 420, /* GL_DRAW_BUFFER2 */
- 423, /* GL_DRAW_BUFFER3 */
- 426, /* GL_DRAW_BUFFER4 */
- 429, /* GL_DRAW_BUFFER5 */
- 432, /* GL_DRAW_BUFFER6 */
- 435, /* GL_DRAW_BUFFER7 */
- 438, /* GL_DRAW_BUFFER8 */
- 441, /* GL_DRAW_BUFFER9 */
- 400, /* GL_DRAW_BUFFER10 */
- 403, /* GL_DRAW_BUFFER11 */
- 406, /* GL_DRAW_BUFFER12 */
- 409, /* GL_DRAW_BUFFER13 */
- 412, /* GL_DRAW_BUFFER14 */
- 415, /* GL_DRAW_BUFFER15 */
- 82, /* GL_BLEND_EQUATION_ALPHA */
- 856, /* GL_MATRIX_PALETTE_ARB */
- 888, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 891, /* GL_MAX_PALETTE_MATRICES_ARB */
- 322, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 850, /* GL_MATRIX_INDEX_ARRAY_ARB */
- 317, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 852, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 854, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 853, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 851, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1704, /* GL_TEXTURE_DEPTH_SIZE */
- 380, /* GL_DEPTH_TEXTURE_MODE */
- 1669, /* GL_TEXTURE_COMPARE_MODE */
- 1667, /* GL_TEXTURE_COMPARE_FUNC */
- 243, /* GL_COMPARE_R_TO_TEXTURE */
- 1167, /* GL_POINT_SPRITE */
- 297, /* GL_COORD_REPLACE */
- 1171, /* GL_POINT_SPRITE_R_MODE_NV */
- 1295, /* GL_QUERY_COUNTER_BITS */
- 324, /* GL_CURRENT_QUERY */
- 1298, /* GL_QUERY_RESULT */
- 1300, /* GL_QUERY_RESULT_AVAILABLE */
- 942, /* GL_MAX_VERTEX_ATTRIBS */
- 1847, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 378, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 377, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 928, /* GL_MAX_TEXTURE_COORDS */
- 930, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1238, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1240, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1239, /* GL_PROGRAM_FORMAT_ARB */
- 1754, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 355, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 354, /* GL_DEPTH_BOUNDS_EXT */
+ 2054, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 2024, /* GL_VERTEX_BLEND_ARB */
+ 351, /* GL_CURRENT_WEIGHT_ARB */
+ 2052, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 2050, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 2048, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 2046, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 2041, /* GL_WEIGHT_ARRAY_ARB */
+ 407, /* GL_DOT3_RGB */
+ 408, /* GL_DOT3_RGBA */
+ 276, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 271, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 1098, /* GL_MULTISAMPLE_3DFX */
+ 1538, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1529, /* GL_SAMPLES_3DFX */
+ 1078, /* GL_MODELVIEW2_ARB */
+ 1081, /* GL_MODELVIEW3_ARB */
+ 1082, /* GL_MODELVIEW4_ARB */
+ 1083, /* GL_MODELVIEW5_ARB */
+ 1084, /* GL_MODELVIEW6_ARB */
+ 1085, /* GL_MODELVIEW7_ARB */
+ 1086, /* GL_MODELVIEW8_ARB */
+ 1087, /* GL_MODELVIEW9_ARB */
+ 1057, /* GL_MODELVIEW10_ARB */
+ 1058, /* GL_MODELVIEW11_ARB */
+ 1059, /* GL_MODELVIEW12_ARB */
+ 1060, /* GL_MODELVIEW13_ARB */
+ 1061, /* GL_MODELVIEW14_ARB */
+ 1062, /* GL_MODELVIEW15_ARB */
+ 1063, /* GL_MODELVIEW16_ARB */
+ 1064, /* GL_MODELVIEW17_ARB */
+ 1065, /* GL_MODELVIEW18_ARB */
+ 1066, /* GL_MODELVIEW19_ARB */
+ 1068, /* GL_MODELVIEW20_ARB */
+ 1069, /* GL_MODELVIEW21_ARB */
+ 1070, /* GL_MODELVIEW22_ARB */
+ 1071, /* GL_MODELVIEW23_ARB */
+ 1072, /* GL_MODELVIEW24_ARB */
+ 1073, /* GL_MODELVIEW25_ARB */
+ 1074, /* GL_MODELVIEW26_ARB */
+ 1075, /* GL_MODELVIEW27_ARB */
+ 1076, /* GL_MODELVIEW28_ARB */
+ 1077, /* GL_MODELVIEW29_ARB */
+ 1079, /* GL_MODELVIEW30_ARB */
+ 1080, /* GL_MODELVIEW31_ARB */
+ 412, /* GL_DOT3_RGB_EXT */
+ 410, /* GL_DOT3_RGBA_EXT */
+ 1051, /* GL_MIRROR_CLAMP_EXT */
+ 1054, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1093, /* GL_MODULATE_ADD_ATI */
+ 1094, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1095, /* GL_MODULATE_SUBTRACT_ATI */
+ 2061, /* GL_YCBCR_MESA */
+ 1189, /* GL_PACK_INVERT_MESA */
+ 354, /* GL_DEBUG_OBJECT_MESA */
+ 355, /* GL_DEBUG_PRINT_MESA */
+ 353, /* GL_DEBUG_ASSERT_MESA */
+ 122, /* GL_BUFFER_SIZE */
+ 124, /* GL_BUFFER_USAGE */
+ 128, /* GL_BUMP_ROT_MATRIX_ATI */
+ 129, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ 127, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ 131, /* GL_BUMP_TEX_UNITS_ATI */
+ 472, /* GL_DUDV_ATI */
+ 471, /* GL_DU8DV8_ATI */
+ 126, /* GL_BUMP_ENVMAP_ATI */
+ 130, /* GL_BUMP_TARGET_ATI */
+ 1133, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ 1336, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ 1641, /* GL_STENCIL_BACK_FUNC */
+ 1639, /* GL_STENCIL_BACK_FAIL */
+ 1643, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1645, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 559, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1334, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1365, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1364, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1348, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1354, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1353, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 971, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 994, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 993, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 984, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 990, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 989, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 947, /* GL_MAX_DRAW_BUFFERS */
+ 416, /* GL_DRAW_BUFFER0 */
+ 419, /* GL_DRAW_BUFFER1 */
+ 440, /* GL_DRAW_BUFFER2 */
+ 443, /* GL_DRAW_BUFFER3 */
+ 446, /* GL_DRAW_BUFFER4 */
+ 449, /* GL_DRAW_BUFFER5 */
+ 452, /* GL_DRAW_BUFFER6 */
+ 455, /* GL_DRAW_BUFFER7 */
+ 458, /* GL_DRAW_BUFFER8 */
+ 461, /* GL_DRAW_BUFFER9 */
+ 420, /* GL_DRAW_BUFFER10 */
+ 423, /* GL_DRAW_BUFFER11 */
+ 426, /* GL_DRAW_BUFFER12 */
+ 429, /* GL_DRAW_BUFFER13 */
+ 432, /* GL_DRAW_BUFFER14 */
+ 435, /* GL_DRAW_BUFFER15 */
+ 85, /* GL_BLEND_EQUATION_ALPHA */
+ 923, /* GL_MATRIX_PALETTE_ARB */
+ 964, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 967, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 335, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 911, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 330, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 916, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 920, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 918, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 914, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1847, /* GL_TEXTURE_DEPTH_SIZE */
+ 400, /* GL_DEPTH_TEXTURE_MODE */
+ 1804, /* GL_TEXTURE_COMPARE_MODE */
+ 1802, /* GL_TEXTURE_COMPARE_FUNC */
+ 255, /* GL_COMPARE_R_TO_TEXTURE */
+ 1266, /* GL_POINT_SPRITE */
+ 309, /* GL_COORD_REPLACE */
+ 1271, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1400, /* GL_QUERY_COUNTER_BITS */
+ 338, /* GL_CURRENT_QUERY */
+ 1403, /* GL_QUERY_RESULT */
+ 1405, /* GL_QUERY_RESULT_AVAILABLE */
+ 1026, /* GL_MAX_VERTEX_ATTRIBS */
+ 2014, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 398, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 397, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 1006, /* GL_MAX_TEXTURE_COORDS */
+ 1008, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1341, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1343, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1342, /* GL_PROGRAM_FORMAT_ARB */
+ 1901, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 371, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 370, /* GL_DEPTH_BOUNDS_EXT */
53, /* GL_ARRAY_BUFFER */
- 465, /* GL_ELEMENT_ARRAY_BUFFER */
+ 485, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
- 466, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1821, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1029, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- 150, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 634, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1682, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 461, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1425, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 515, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1875, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1843, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1241, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 900, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1247, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 909, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1259, /* GL_PROGRAM_TEMPORARIES_ARB */
- 915, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1249, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 911, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1253, /* GL_PROGRAM_PARAMETERS_ARB */
- 914, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1248, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 910, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1234, /* GL_PROGRAM_ATTRIBS_ARB */
- 895, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1246, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 908, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1232, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 893, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1244, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 906, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 901, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 897, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1262, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1766, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1311, /* GL_READ_ONLY */
- 1883, /* GL_WRITE_ONLY */
- 1313, /* GL_READ_WRITE */
- 102, /* GL_BUFFER_ACCESS */
- 105, /* GL_BUFFER_MAPPED */
- 107, /* GL_BUFFER_MAP_POINTER */
- 1760, /* GL_TIME_ELAPSED_EXT */
- 810, /* GL_MATRIX0_ARB */
- 822, /* GL_MATRIX1_ARB */
- 834, /* GL_MATRIX2_ARB */
- 838, /* GL_MATRIX3_ARB */
- 840, /* GL_MATRIX4_ARB */
- 842, /* GL_MATRIX5_ARB */
- 844, /* GL_MATRIX6_ARB */
- 846, /* GL_MATRIX7_ARB */
- 848, /* GL_MATRIX8_ARB */
- 849, /* GL_MATRIX9_ARB */
- 812, /* GL_MATRIX10_ARB */
- 813, /* GL_MATRIX11_ARB */
- 814, /* GL_MATRIX12_ARB */
- 815, /* GL_MATRIX13_ARB */
- 816, /* GL_MATRIX14_ARB */
- 817, /* GL_MATRIX15_ARB */
- 818, /* GL_MATRIX16_ARB */
- 819, /* GL_MATRIX17_ARB */
- 820, /* GL_MATRIX18_ARB */
- 821, /* GL_MATRIX19_ARB */
- 824, /* GL_MATRIX20_ARB */
- 825, /* GL_MATRIX21_ARB */
- 826, /* GL_MATRIX22_ARB */
- 827, /* GL_MATRIX23_ARB */
- 828, /* GL_MATRIX24_ARB */
- 829, /* GL_MATRIX25_ARB */
- 830, /* GL_MATRIX26_ARB */
- 831, /* GL_MATRIX27_ARB */
- 832, /* GL_MATRIX28_ARB */
- 833, /* GL_MATRIX29_ARB */
- 836, /* GL_MATRIX30_ARB */
- 837, /* GL_MATRIX31_ARB */
- 1549, /* GL_STREAM_DRAW */
- 1551, /* GL_STREAM_READ */
- 1547, /* GL_STREAM_COPY */
- 1503, /* GL_STATIC_DRAW */
- 1505, /* GL_STATIC_READ */
- 1501, /* GL_STATIC_COPY */
- 455, /* GL_DYNAMIC_DRAW */
- 457, /* GL_DYNAMIC_READ */
- 453, /* GL_DYNAMIC_COPY */
- 1135, /* GL_PIXEL_PACK_BUFFER */
- 1139, /* GL_PIXEL_UNPACK_BUFFER */
- 1136, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1140, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- 348, /* GL_DEPTH24_STENCIL8 */
- 1750, /* GL_TEXTURE_STENCIL_SIZE */
- 1702, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 896, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 899, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 903, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 902, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 859, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1540, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 486, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1988, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1120, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 161, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 688, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1817, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 481, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1550, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 537, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 2042, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 2010, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1344, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 977, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1350, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 986, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1363, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 992, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1352, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 988, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1356, /* GL_PROGRAM_PARAMETERS_ARB */
+ 991, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1351, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 987, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1335, /* GL_PROGRAM_ATTRIBS_ARB */
+ 972, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1349, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 985, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1333, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 970, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1347, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 983, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 978, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 974, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1366, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1926, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1417, /* GL_READ_ONLY */
+ 2056, /* GL_WRITE_ONLY */
+ 1419, /* GL_READ_WRITE */
+ 110, /* GL_BUFFER_ACCESS */
+ 114, /* GL_BUFFER_MAPPED */
+ 117, /* GL_BUFFER_MAP_POINTER */
+ 1908, /* GL_TIME_ELAPSED_EXT */
+ 871, /* GL_MATRIX0_ARB */
+ 883, /* GL_MATRIX1_ARB */
+ 895, /* GL_MATRIX2_ARB */
+ 899, /* GL_MATRIX3_ARB */
+ 901, /* GL_MATRIX4_ARB */
+ 903, /* GL_MATRIX5_ARB */
+ 905, /* GL_MATRIX6_ARB */
+ 907, /* GL_MATRIX7_ARB */
+ 909, /* GL_MATRIX8_ARB */
+ 910, /* GL_MATRIX9_ARB */
+ 873, /* GL_MATRIX10_ARB */
+ 874, /* GL_MATRIX11_ARB */
+ 875, /* GL_MATRIX12_ARB */
+ 876, /* GL_MATRIX13_ARB */
+ 877, /* GL_MATRIX14_ARB */
+ 878, /* GL_MATRIX15_ARB */
+ 879, /* GL_MATRIX16_ARB */
+ 880, /* GL_MATRIX17_ARB */
+ 881, /* GL_MATRIX18_ARB */
+ 882, /* GL_MATRIX19_ARB */
+ 885, /* GL_MATRIX20_ARB */
+ 886, /* GL_MATRIX21_ARB */
+ 887, /* GL_MATRIX22_ARB */
+ 888, /* GL_MATRIX23_ARB */
+ 889, /* GL_MATRIX24_ARB */
+ 890, /* GL_MATRIX25_ARB */
+ 891, /* GL_MATRIX26_ARB */
+ 892, /* GL_MATRIX27_ARB */
+ 893, /* GL_MATRIX28_ARB */
+ 894, /* GL_MATRIX29_ARB */
+ 897, /* GL_MATRIX30_ARB */
+ 898, /* GL_MATRIX31_ARB */
+ 1681, /* GL_STREAM_DRAW */
+ 1683, /* GL_STREAM_READ */
+ 1679, /* GL_STREAM_COPY */
+ 1631, /* GL_STATIC_DRAW */
+ 1633, /* GL_STATIC_READ */
+ 1629, /* GL_STATIC_COPY */
+ 475, /* GL_DYNAMIC_DRAW */
+ 477, /* GL_DYNAMIC_READ */
+ 473, /* GL_DYNAMIC_COPY */
+ 1229, /* GL_PIXEL_PACK_BUFFER */
+ 1233, /* GL_PIXEL_UNPACK_BUFFER */
+ 1230, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1234, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 362, /* GL_DEPTH24_STENCIL8 */
+ 1897, /* GL_TEXTURE_STENCIL_SIZE */
+ 1845, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 973, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 976, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 980, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 979, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 928, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1672, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 963, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1406, /* GL_SAMPLES_PASSED */
- 110, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- 104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 1324, /* GL_RELEASED_APPLE */
- 1872, /* GL_VOLATILE_APPLE */
- 1352, /* GL_RETAINED_APPLE */
- 1779, /* GL_UNDEFINED_APPLE */
- 1285, /* GL_PURGEABLE_APPLE */
- 538, /* GL_FRAGMENT_SHADER */
- 1867, /* GL_VERTEX_SHADER */
- 1252, /* GL_PROGRAM_OBJECT_ARB */
- 1438, /* GL_SHADER_OBJECT_ARB */
- 884, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 946, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 940, /* GL_MAX_VARYING_FLOATS */
- 944, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 869, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1055, /* GL_OBJECT_TYPE_ARB */
- 1440, /* GL_SHADER_TYPE */
- 503, /* GL_FLOAT_VEC2 */
- 505, /* GL_FLOAT_VEC3 */
- 507, /* GL_FLOAT_VEC4 */
- 661, /* GL_INT_VEC2 */
- 663, /* GL_INT_VEC3 */
- 665, /* GL_INT_VEC4 */
- 94, /* GL_BOOL */
- 96, /* GL_BOOL_VEC2 */
- 98, /* GL_BOOL_VEC3 */
- 100, /* GL_BOOL_VEC4 */
- 491, /* GL_FLOAT_MAT2 */
- 495, /* GL_FLOAT_MAT3 */
- 499, /* GL_FLOAT_MAT4 */
- 1397, /* GL_SAMPLER_1D */
- 1399, /* GL_SAMPLER_2D */
- 1401, /* GL_SAMPLER_3D */
- 1402, /* GL_SAMPLER_CUBE */
- 1398, /* GL_SAMPLER_1D_SHADOW */
- 1400, /* GL_SAMPLER_2D_SHADOW */
- 493, /* GL_FLOAT_MAT2x3 */
- 494, /* GL_FLOAT_MAT2x4 */
- 497, /* GL_FLOAT_MAT3x2 */
- 498, /* GL_FLOAT_MAT3x4 */
- 501, /* GL_FLOAT_MAT4x2 */
- 502, /* GL_FLOAT_MAT4x3 */
- 346, /* GL_DELETE_STATUS */
- 247, /* GL_COMPILE_STATUS */
- 717, /* GL_LINK_STATUS */
- 1815, /* GL_VALIDATE_STATUS */
- 646, /* GL_INFO_LOG_LENGTH */
+ 1052, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1531, /* GL_SAMPLES_PASSED */
+ 1253, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ 1252, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ 1251, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ 1089, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1369, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1879, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 121, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ 113, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ 1431, /* GL_RELEASED_APPLE */
+ 2039, /* GL_VOLATILE_APPLE */
+ 1470, /* GL_RETAINED_APPLE */
+ 1941, /* GL_UNDEFINED_APPLE */
+ 1390, /* GL_PURGEABLE_APPLE */
+ 560, /* GL_FRAGMENT_SHADER */
+ 2034, /* GL_VERTEX_SHADER */
+ 1355, /* GL_PROGRAM_OBJECT_ARB */
+ 1566, /* GL_SHADER_OBJECT_ARB */
+ 954, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 1030, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 1023, /* GL_MAX_VARYING_FLOATS */
+ 1028, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 938, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1149, /* GL_OBJECT_TYPE_ARB */
+ 1568, /* GL_SHADER_TYPE */
+ 525, /* GL_FLOAT_VEC2 */
+ 527, /* GL_FLOAT_VEC3 */
+ 529, /* GL_FLOAT_VEC4 */
+ 717, /* GL_INT_VEC2 */
+ 719, /* GL_INT_VEC3 */
+ 721, /* GL_INT_VEC4 */
+ 102, /* GL_BOOL */
+ 104, /* GL_BOOL_VEC2 */
+ 106, /* GL_BOOL_VEC3 */
+ 108, /* GL_BOOL_VEC4 */
+ 513, /* GL_FLOAT_MAT2 */
+ 517, /* GL_FLOAT_MAT3 */
+ 521, /* GL_FLOAT_MAT4 */
+ 1521, /* GL_SAMPLER_1D */
+ 1523, /* GL_SAMPLER_2D */
+ 1525, /* GL_SAMPLER_3D */
+ 1527, /* GL_SAMPLER_CUBE */
+ 1522, /* GL_SAMPLER_1D_SHADOW */
+ 1524, /* GL_SAMPLER_2D_SHADOW */
+ 515, /* GL_FLOAT_MAT2x3 */
+ 516, /* GL_FLOAT_MAT2x4 */
+ 519, /* GL_FLOAT_MAT3x2 */
+ 520, /* GL_FLOAT_MAT3x4 */
+ 523, /* GL_FLOAT_MAT4x2 */
+ 524, /* GL_FLOAT_MAT4x3 */
+ 360, /* GL_DELETE_STATUS */
+ 259, /* GL_COMPILE_STATUS */
+ 776, /* GL_LINK_STATUS */
+ 1982, /* GL_VALIDATE_STATUS */
+ 700, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1439, /* GL_SHADER_SOURCE_LENGTH */
+ 1567, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 540, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1442, /* GL_SHADING_LANGUAGE_VERSION */
- 323, /* GL_CURRENT_PROGRAM */
- 1104, /* GL_PALETTE4_RGB8_OES */
- 1106, /* GL_PALETTE4_RGBA8_OES */
- 1102, /* GL_PALETTE4_R5_G6_B5_OES */
- 1105, /* GL_PALETTE4_RGBA4_OES */
- 1103, /* GL_PALETTE4_RGB5_A1_OES */
- 1109, /* GL_PALETTE8_RGB8_OES */
- 1111, /* GL_PALETTE8_RGBA8_OES */
- 1107, /* GL_PALETTE8_R5_G6_B5_OES */
- 1110, /* GL_PALETTE8_RGBA4_OES */
- 1108, /* GL_PALETTE8_RGB5_A1_OES */
- 628, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 627, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1800, /* GL_UNSIGNED_NORMALIZED */
- 1637, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1274, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1639, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1277, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1645, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1647, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 1495, /* GL_SRGB */
- 1496, /* GL_SRGB8 */
- 1498, /* GL_SRGB_ALPHA */
- 1497, /* GL_SRGB8_ALPHA8 */
- 1455, /* GL_SLUMINANCE_ALPHA */
- 1454, /* GL_SLUMINANCE8_ALPHA8 */
- 1452, /* GL_SLUMINANCE */
- 1453, /* GL_SLUMINANCE8 */
- 268, /* GL_COMPRESSED_SRGB */
- 269, /* GL_COMPRESSED_SRGB_ALPHA */
- 266, /* GL_COMPRESSED_SLUMINANCE */
- 267, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1169, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 725, /* GL_LOWER_LEFT */
- 1812, /* GL_UPPER_LEFT */
- 1518, /* GL_STENCIL_BACK_REF */
- 1519, /* GL_STENCIL_BACK_VALUE_MASK */
- 1520, /* GL_STENCIL_BACK_WRITEMASK */
- 445, /* GL_DRAW_FRAMEBUFFER_BINDING */
- 1328, /* GL_RENDERBUFFER_BINDING */
- 1307, /* GL_READ_FRAMEBUFFER */
- 444, /* GL_DRAW_FRAMEBUFFER */
- 1308, /* GL_READ_FRAMEBUFFER_BINDING */
- 1339, /* GL_RENDERBUFFER_SAMPLES */
- 550, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 548, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 559, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 555, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 557, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 563, /* GL_FRAMEBUFFER_COMPLETE */
- 567, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 574, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 572, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 569, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 573, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 570, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- 578, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- 582, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 580, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 865, /* GL_MAX_COLOR_ATTACHMENTS */
- 156, /* GL_COLOR_ATTACHMENT0 */
- 158, /* GL_COLOR_ATTACHMENT1 */
- 172, /* GL_COLOR_ATTACHMENT2 */
- 174, /* GL_COLOR_ATTACHMENT3 */
- 176, /* GL_COLOR_ATTACHMENT4 */
- 178, /* GL_COLOR_ATTACHMENT5 */
- 180, /* GL_COLOR_ATTACHMENT6 */
- 182, /* GL_COLOR_ATTACHMENT7 */
- 184, /* GL_COLOR_ATTACHMENT8 */
- 186, /* GL_COLOR_ATTACHMENT9 */
- 159, /* GL_COLOR_ATTACHMENT10 */
- 161, /* GL_COLOR_ATTACHMENT11 */
- 163, /* GL_COLOR_ATTACHMENT12 */
- 165, /* GL_COLOR_ATTACHMENT13 */
- 167, /* GL_COLOR_ATTACHMENT14 */
- 169, /* GL_COLOR_ATTACHMENT15 */
- 350, /* GL_DEPTH_ATTACHMENT */
- 1508, /* GL_STENCIL_ATTACHMENT */
- 541, /* GL_FRAMEBUFFER */
- 1326, /* GL_RENDERBUFFER */
- 1342, /* GL_RENDERBUFFER_WIDTH */
- 1334, /* GL_RENDERBUFFER_HEIGHT */
- 1336, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1535, /* GL_STENCIL_INDEX_EXT */
- 1527, /* GL_STENCIL_INDEX1 */
- 1531, /* GL_STENCIL_INDEX4 */
- 1533, /* GL_STENCIL_INDEX8 */
- 1528, /* GL_STENCIL_INDEX16 */
- 1338, /* GL_RENDERBUFFER_RED_SIZE */
- 1333, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1330, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1327, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1331, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1341, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 576, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 923, /* GL_MAX_SAMPLES */
- 1302, /* GL_QUERY_WAIT_NV */
- 1297, /* GL_QUERY_NO_WAIT_NV */
- 1294, /* GL_QUERY_BY_REGION_WAIT_NV */
- 1293, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- 1289, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 487, /* GL_FIRST_VERTEX_CONVENTION */
- 676, /* GL_LAST_VERTEX_CONVENTION */
- 1266, /* GL_PROVOKING_VERTEX */
- 303, /* GL_COPY_READ_BUFFER */
- 304, /* GL_COPY_WRITE_BUFFER */
- 1390, /* GL_RGBA_SNORM */
- 1386, /* GL_RGBA8_SNORM */
- 1448, /* GL_SIGNED_NORMALIZED */
- 925, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1054, /* GL_OBJECT_TYPE */
- 1556, /* GL_SYNC_CONDITION */
- 1561, /* GL_SYNC_STATUS */
- 1558, /* GL_SYNC_FLAGS */
- 1557, /* GL_SYNC_FENCE */
- 1560, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1788, /* GL_UNSIGNALED */
- 1447, /* GL_SIGNALED */
+ 562, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1570, /* GL_SHADING_LANGUAGE_VERSION */
+ 337, /* GL_CURRENT_PROGRAM */
+ 1198, /* GL_PALETTE4_RGB8_OES */
+ 1200, /* GL_PALETTE4_RGBA8_OES */
+ 1196, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1199, /* GL_PALETTE4_RGBA4_OES */
+ 1197, /* GL_PALETTE4_RGB5_A1_OES */
+ 1203, /* GL_PALETTE8_RGB8_OES */
+ 1205, /* GL_PALETTE8_RGBA8_OES */
+ 1201, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1204, /* GL_PALETTE8_RGBA4_OES */
+ 1202, /* GL_PALETTE8_RGB5_A1_OES */
+ 682, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 680, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1250, /* GL_POINT_SIZE_ARRAY_OES */
+ 1823, /* GL_TEXTURE_CROP_RECT_OES */
+ 912, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ 1249, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ 1965, /* GL_UNSIGNED_NORMALIZED */
+ 1769, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1379, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1771, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1382, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1778, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1780, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 958, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ 1623, /* GL_SRGB */
+ 1624, /* GL_SRGB8 */
+ 1626, /* GL_SRGB_ALPHA */
+ 1625, /* GL_SRGB8_ALPHA8 */
+ 1583, /* GL_SLUMINANCE_ALPHA */
+ 1582, /* GL_SLUMINANCE8_ALPHA8 */
+ 1580, /* GL_SLUMINANCE */
+ 1581, /* GL_SLUMINANCE8 */
+ 280, /* GL_COMPRESSED_SRGB */
+ 281, /* GL_COMPRESSED_SRGB_ALPHA */
+ 278, /* GL_COMPRESSED_SLUMINANCE */
+ 279, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 1923, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ 1917, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ 1021, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ 1922, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ 1920, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ 1919, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ 1332, /* GL_PRIMITIVES_GENERATED_EXT */
+ 1921, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ 1410, /* GL_RASTERIZER_DISCARD_EXT */
+ 1019, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ 1020, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ 712, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ 1560, /* GL_SEPARATE_ATTRIBS_EXT */
+ 1916, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ 1915, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ 1268, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 784, /* GL_LOWER_LEFT */
+ 1979, /* GL_UPPER_LEFT */
+ 1647, /* GL_STENCIL_BACK_REF */
+ 1648, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1649, /* GL_STENCIL_BACK_WRITEMASK */
+ 465, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1436, /* GL_RENDERBUFFER_BINDING */
+ 1413, /* GL_READ_FRAMEBUFFER */
+ 464, /* GL_DRAW_FRAMEBUFFER */
+ 1414, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1455, /* GL_RENDERBUFFER_SAMPLES */
+ 575, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 572, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 587, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 582, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 585, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 593, /* GL_FRAMEBUFFER_COMPLETE */
+ 598, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 612, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 607, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 602, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 608, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 604, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 617, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 623, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 621, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 934, /* GL_MAX_COLOR_ATTACHMENTS */
+ 167, /* GL_COLOR_ATTACHMENT0 */
+ 170, /* GL_COLOR_ATTACHMENT1 */
+ 184, /* GL_COLOR_ATTACHMENT2 */
+ 186, /* GL_COLOR_ATTACHMENT3 */
+ 188, /* GL_COLOR_ATTACHMENT4 */
+ 190, /* GL_COLOR_ATTACHMENT5 */
+ 192, /* GL_COLOR_ATTACHMENT6 */
+ 194, /* GL_COLOR_ATTACHMENT7 */
+ 196, /* GL_COLOR_ATTACHMENT8 */
+ 198, /* GL_COLOR_ATTACHMENT9 */
+ 171, /* GL_COLOR_ATTACHMENT10 */
+ 173, /* GL_COLOR_ATTACHMENT11 */
+ 175, /* GL_COLOR_ATTACHMENT12 */
+ 177, /* GL_COLOR_ATTACHMENT13 */
+ 179, /* GL_COLOR_ATTACHMENT14 */
+ 181, /* GL_COLOR_ATTACHMENT15 */
+ 365, /* GL_DEPTH_ATTACHMENT */
+ 1636, /* GL_STENCIL_ATTACHMENT */
+ 564, /* GL_FRAMEBUFFER */
+ 1433, /* GL_RENDERBUFFER */
+ 1459, /* GL_RENDERBUFFER_WIDTH */
+ 1446, /* GL_RENDERBUFFER_HEIGHT */
+ 1449, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1667, /* GL_STENCIL_INDEX_EXT */
+ 1656, /* GL_STENCIL_INDEX1 */
+ 1661, /* GL_STENCIL_INDEX4 */
+ 1664, /* GL_STENCIL_INDEX8 */
+ 1657, /* GL_STENCIL_INDEX16 */
+ 1453, /* GL_RENDERBUFFER_RED_SIZE */
+ 1444, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1439, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1434, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1441, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1457, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 615, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 1001, /* GL_MAX_SAMPLES */
+ 1859, /* GL_TEXTURE_GEN_STR_OES */
+ 655, /* GL_HALF_FLOAT_OES */
+ 1487, /* GL_RGB565_OES */
+ 571, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ 611, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ 610, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ 646, /* GL_GEOMETRY_SHADER_ARB */
+ 647, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ 644, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ 645, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ 961, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ 1035, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ 960, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ 957, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ 959, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ 785, /* GL_LOW_FLOAT */
+ 1037, /* GL_MEDIUM_FLOAT */
+ 656, /* GL_HIGH_FLOAT */
+ 786, /* GL_LOW_INT */
+ 1038, /* GL_MEDIUM_INT */
+ 657, /* GL_HIGH_INT */
+ 1956, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ 716, /* GL_INT_10_10_10_2_OES */
+ 1564, /* GL_SHADER_BINARY_FORMATS */
+ 1134, /* GL_NUM_SHADER_BINARY_FORMATS */
+ 1565, /* GL_SHADER_COMPILER */
+ 1032, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ 1025, /* GL_MAX_VARYING_VECTORS */
+ 956, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ 1407, /* GL_QUERY_WAIT_NV */
+ 1402, /* GL_QUERY_NO_WAIT_NV */
+ 1399, /* GL_QUERY_BY_REGION_WAIT_NV */
+ 1398, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ 1912, /* GL_TRANSFORM_FEEDBACK */
+ 1918, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ 1914, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ 1913, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ 1394, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 507, /* GL_FIRST_VERTEX_CONVENTION */
+ 733, /* GL_LAST_VERTEX_CONVENTION */
+ 1371, /* GL_PROVOKING_VERTEX */
+ 316, /* GL_COPY_READ_BUFFER */
+ 317, /* GL_COPY_WRITE_BUFFER */
+ 1514, /* GL_RGBA_SNORM */
+ 1510, /* GL_RGBA8_SNORM */
+ 1576, /* GL_SIGNED_NORMALIZED */
+ 1003, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1148, /* GL_OBJECT_TYPE */
+ 1688, /* GL_SYNC_CONDITION */
+ 1693, /* GL_SYNC_STATUS */
+ 1690, /* GL_SYNC_FLAGS */
+ 1689, /* GL_SYNC_FENCE */
+ 1692, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 1950, /* GL_UNSIGNALED */
+ 1575, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
- 1759, /* GL_TIMEOUT_EXPIRED */
- 271, /* GL_CONDITION_SATISFIED */
- 1873, /* GL_WAIT_FAILED */
- 472, /* GL_EVAL_BIT */
- 1305, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 719, /* GL_LIST_BIT */
- 1653, /* GL_TEXTURE_BIT */
- 1421, /* GL_SCISSOR_BIT */
+ 1907, /* GL_TIMEOUT_EXPIRED */
+ 283, /* GL_CONDITION_SATISFIED */
+ 2040, /* GL_WAIT_FAILED */
+ 492, /* GL_EVAL_BIT */
+ 1411, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 778, /* GL_LIST_BIT */
+ 1788, /* GL_TEXTURE_BIT */
+ 1546, /* GL_SCISSOR_BIT */
29, /* GL_ALL_ATTRIB_BITS */
- 1010, /* GL_MULTISAMPLE_BIT */
+ 1100, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
@@ -5234,7 +5648,8 @@ const char *_mesa_lookup_enum_by_nr( int nr )
}
else {
/* this is not re-entrant safe, no big deal here */
- sprintf(token_tmp, "0x%x", nr);
+ _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr);
+ token_tmp[sizeof(token_tmp) - 1] = '\0';
return token_tmp;
}
}
diff --git a/mesalib/src/mesa/main/es_generator.py b/mesalib/src/mesa/main/es_generator.py
new file mode 100644
index 000000000..ecb34bb5c
--- /dev/null
+++ b/mesalib/src/mesa/main/es_generator.py
@@ -0,0 +1,743 @@
+#*************************************************************************
+# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+# All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#*************************************************************************
+
+
+import sys, os
+import APIspecutil as apiutil
+
+# These dictionary entries are used for automatic conversion.
+# The string will be used as a format string with the conversion
+# variable.
+Converters = {
+ 'GLfloat': {
+ 'GLdouble': "(GLdouble) (%s)",
+ 'GLfixed' : "(GLint) (%s * 65536)",
+ },
+ 'GLfixed': {
+ 'GLfloat': "(GLfloat) (%s / 65536.0f)",
+ 'GLdouble': "(GLdouble) (%s / 65536.0)",
+ },
+ 'GLdouble': {
+ 'GLfloat': "(GLfloat) (%s)",
+ 'GLfixed': "(GLfixed) (%s * 65536)",
+ },
+ 'GLclampf': {
+ 'GLclampd': "(GLclampd) (%s)",
+ 'GLclampx': "(GLclampx) (%s * 65536)",
+ },
+ 'GLclampx': {
+ 'GLclampf': "(GLclampf) (%s / 65536.0f)",
+ 'GLclampd': "(GLclampd) (%s / 65536.0)",
+ },
+ 'GLubyte': {
+ 'GLfloat': "(GLfloat) (%s / 255.0f)",
+ },
+}
+
+def GetBaseType(type):
+ typeTokens = type.split(' ')
+ baseType = None
+ typeModifiers = []
+ for t in typeTokens:
+ if t in ['const', '*']:
+ typeModifiers.append(t)
+ else:
+ baseType = t
+ return (baseType, typeModifiers)
+
+def ConvertValue(value, fromType, toType):
+ """Returns a string that represents the given parameter string,
+ type-converted if necessary."""
+
+ if not Converters.has_key(fromType):
+ print >> sys.stderr, "No base converter for type '%s' found. Ignoring." % fromType
+ return value
+
+ if not Converters[fromType].has_key(toType):
+ print >> sys.stderr, "No converter found for type '%s' to type '%s'. Ignoring." % (fromType, toType)
+ return value
+
+ # This part is simple. Return the proper conversion.
+ conversionString = Converters[fromType][toType]
+ return conversionString % value
+
+FormatStrings = {
+ 'GLenum' : '0x%x',
+ 'GLfloat' : '%f',
+ 'GLint' : '%d',
+ 'GLbitfield' : '0x%x',
+}
+def GetFormatString(type):
+ if FormatStrings.has_key(type):
+ return FormatStrings[type]
+ else:
+ return None
+
+
+######################################################################
+# Version-specific values to be used in the main script
+# header: which header file to include
+# api: what text specifies an API-level function
+VersionSpecificValues = {
+ 'GLES1.1' : {
+ 'description' : 'GLES1.1 functions',
+ 'header' : 'GLES/gl.h',
+ 'extheader' : 'GLES/glext.h',
+ 'shortname' : 'es1'
+ },
+ 'GLES2.0': {
+ 'description' : 'GLES2.0 functions',
+ 'header' : 'GLES2/gl2.h',
+ 'extheader' : 'GLES2/gl2ext.h',
+ 'shortname' : 'es2'
+ }
+}
+
+
+######################################################################
+# Main code for the script begins here.
+
+# Get the name of the program (without the directory part) for use in
+# error messages.
+program = os.path.basename(sys.argv[0])
+
+# Set default values
+verbose = 0
+functionList = "APIspec.xml"
+version = "GLES1.1"
+
+# Allow for command-line switches
+import getopt, time
+options = "hvV:S:"
+try:
+ optlist, args = getopt.getopt(sys.argv[1:], options)
+except getopt.GetoptError, message:
+ sys.stderr.write("%s: %s. Use -h for help.\n" % (program, message))
+ sys.exit(1)
+
+for option, optarg in optlist:
+ if option == "-h":
+ sys.stderr.write("Usage: %s [-%s]\n" % (program, options))
+ sys.stderr.write("Parse an API specification file and generate wrapper functions for a given GLES version\n")
+ sys.stderr.write("-h gives help\n")
+ sys.stderr.write("-v is verbose\n")
+ sys.stderr.write("-V specifies GLES version to generate [%s]:\n" % version)
+ for key in VersionSpecificValues.keys():
+ sys.stderr.write(" %s - %s\n" % (key, VersionSpecificValues[key]['description']))
+ sys.stderr.write("-S specifies API specification file to use [%s]\n" % functionList)
+ sys.exit(1)
+ elif option == "-v":
+ verbose += 1
+ elif option == "-V":
+ version = optarg
+ elif option == "-S":
+ functionList = optarg
+
+# Beyond switches, we support no further command-line arguments
+if len(args) > 0:
+ sys.stderr.write("%s: only switch arguments are supported - use -h for help\n" % program)
+ sys.exit(1)
+
+# If we don't have a valid version, abort.
+if not VersionSpecificValues.has_key(version):
+ sys.stderr.write("%s: version '%s' is not valid - use -h for help\n" % (program, version))
+ sys.exit(1)
+
+# Grab the version-specific items we need to use
+versionHeader = VersionSpecificValues[version]['header']
+versionExtHeader = VersionSpecificValues[version]['extheader']
+shortname = VersionSpecificValues[version]['shortname']
+
+# If we get to here, we're good to go. The "version" parameter
+# directs GetDispatchedFunctions to only allow functions from
+# that "category" (version in our parlance). This allows
+# functions with different declarations in different categories
+# to exist (glTexImage2D, for example, is different between
+# GLES1 and GLES2).
+keys = apiutil.GetAllFunctions(functionList, version)
+
+allSpecials = apiutil.AllSpecials()
+
+print """/* DO NOT EDIT *************************************************
+ * THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
+ * API specification file: %s
+ * GLES version: %s
+ * date: %s
+ */
+""" % (program, functionList, version, time.strftime("%Y-%m-%d %H:%M:%S"))
+
+# The headers we choose are version-specific.
+print """
+#include "%s"
+#include "%s"
+#include "main/mfeatures.h"
+
+#if FEATURE_%s
+""" % (versionHeader, versionExtHeader, shortname.upper())
+
+# Everyone needs these types.
+print """
+/* These types are needed for the Mesa veneer, but are not defined in
+ * the standard GLES headers.
+ */
+typedef double GLdouble;
+typedef double GLclampd;
+
+/* Mesa error handling requires these */
+extern void *_mesa_get_current_context(void);
+extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
+
+#include "main/compiler.h"
+#include "main/api_exec.h"
+#include "main/remap.h"
+
+/* cannot include main/dispatch.h here */
+#ifdef IN_DRI_DRIVER
+#define _GLAPI_USE_REMAP_TABLE
+#endif
+/* glapi uses GLAPIENTRY while GLES headers define GL_APIENTRY */
+#ifndef GLAPIENTRY
+#define GLAPIENTRY GL_APIENTRY
+#endif
+#include "%sapi/glapi/glapitable.h"
+#include "%sapi/glapi/glapioffsets.h"
+#include "%sapi/glapi/glapidispatch.h"
+
+#if FEATURE_remap_table
+
+#if !FEATURE_GL
+int driDispatchRemapTable[driDispatchRemapTable_size];
+#endif
+
+#define need_MESA_remap_table
+
+#include "%sapi/main/remap_helper.h"
+
+void
+_mesa_init_remap_table_%s(void)
+{
+ _mesa_do_init_remap_table(_mesa_function_pool,
+ driDispatchRemapTable_size,
+ MESA_remap_table_functions);
+}
+
+void
+_mesa_map_static_functions_%s(void)
+{
+}
+
+#endif
+
+typedef void (*_glapi_proc)(void); /* generic function pointer */
+""" % (shortname, shortname, shortname, shortname, shortname, shortname);
+
+# Finally we get to the all-important functions
+print """/*************************************************************
+ * Generated functions begin here
+ */
+"""
+for funcName in keys:
+ if verbose > 0: sys.stderr.write("%s: processing function %s\n" % (program, funcName))
+
+ # start figuring out what this function will look like.
+ returnType = apiutil.ReturnType(funcName)
+ props = apiutil.Properties(funcName)
+ params = apiutil.Parameters(funcName)
+ declarationString = apiutil.MakeDeclarationString(params)
+
+ # In case of error, a function may have to return. Make
+ # sure we have valid return values in this case.
+ if returnType == "void":
+ errorReturn = "return"
+ elif returnType == "GLboolean":
+ errorReturn = "return GL_FALSE"
+ else:
+ errorReturn = "return (%s) 0" % returnType
+
+ # These are the output of this large calculation block.
+ # passthroughDeclarationString: a typed set of parameters that
+ # will be used to create the "extern" reference for the
+ # underlying Mesa or support function. Note that as generated
+ # these have an extra ", " at the beginning, which will be
+ # removed before use.
+ #
+ # passthroughDeclarationString: an untyped list of parameters
+ # that will be used to call the underlying Mesa or support
+ # function (including references to converted parameters).
+ # This will also be generated with an extra ", " at the
+ # beginning, which will be removed before use.
+ #
+ # variables: C code to create any local variables determined to
+ # be necessary.
+ # conversionCodeOutgoing: C code to convert application parameters
+ # to a necessary type before calling the underlying support code.
+ # May be empty if no conversion is required.
+ # conversionCodeIncoming: C code to do the converse: convert
+ # values returned by underlying Mesa code to the types needed
+ # by the application.
+ # Note that *either* the conversionCodeIncoming will be used (for
+ # generated query functions), *or* the conversionCodeOutgoing will
+ # be used (for generated non-query functions), never both.
+ passthroughFuncName = ""
+ passthroughDeclarationString = ""
+ passthroughCallString = ""
+ prefixOverride = None
+ variables = []
+ conversionCodeOutgoing = []
+ conversionCodeIncoming = []
+ switchCode = []
+
+ # Calculate the name of the underlying support function to call.
+ # By default, the passthrough function is named _mesa_<funcName>.
+ # We're allowed to override the prefix and/or the function name
+ # for each function record, though. The "ConversionFunction"
+ # utility is poorly named, BTW...
+ if funcName in allSpecials:
+ # perform checks and pass through
+ funcPrefix = "_check_"
+ aliasprefix = "_es_"
+ else:
+ funcPrefix = "_es_"
+ aliasprefix = apiutil.AliasPrefix(funcName)
+ alias = apiutil.ConversionFunction(funcName)
+ prefixOverride = apiutil.FunctionPrefix(funcName)
+ if prefixOverride != "_mesa_":
+ aliasprefix = apiutil.FunctionPrefix(funcName)
+ if not alias:
+ # There may still be a Mesa alias for the function
+ if apiutil.Alias(funcName):
+ passthroughFuncName = "%s%s" % (aliasprefix, apiutil.Alias(funcName))
+ else:
+ passthroughFuncName = "%s%s" % (aliasprefix, funcName)
+ else: # a specific alias is provided
+ passthroughFuncName = "%s%s" % (aliasprefix, alias)
+
+ # Look at every parameter: each one may have only specific
+ # allowed values, or dependent parameters to check, or
+ # variant-sized vector arrays to calculate
+ for (paramName, paramType, paramMaxVecSize, paramConvertToType, paramValidValues, paramValueConversion) in params:
+ # We'll need this below if we're doing conversions
+ (paramBaseType, paramTypeModifiers) = GetBaseType(paramType)
+
+ # Conversion management.
+ # We'll handle three cases, easiest to hardest: a parameter
+ # that doesn't require conversion, a scalar parameter that
+ # requires conversion, and a vector parameter that requires
+ # conversion.
+ if paramConvertToType == None:
+ # Unconverted parameters are easy, whether they're vector
+ # or scalar - just add them to the call list. No conversions
+ # or anything to worry about.
+ passthroughDeclarationString += ", %s %s" % (paramType, paramName)
+ passthroughCallString += ", %s" % paramName
+
+ elif paramMaxVecSize == 0: # a scalar parameter that needs conversion
+ # A scalar to hold a converted parameter
+ variables.append(" %s converted_%s;" % (paramConvertToType, paramName))
+
+ # Outgoing conversion depends on whether we have to conditionally
+ # perform value conversion.
+ if paramValueConversion == "none":
+ conversionCodeOutgoing.append(" converted_%s = (%s) %s;" % (paramName, paramConvertToType, paramName))
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+
+ # Write code based on that conditional.
+ conversionCodeOutgoing.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s = %s;" % (paramName, ConvertValue(paramName, paramBaseType, paramConvertToType)))
+ conversionCodeOutgoing.append(" } else {")
+ conversionCodeOutgoing.append(" converted_%s = (%s) %s;" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeOutgoing.append(" converted_%s = %s;" % (paramName, ConvertValue(paramName, paramBaseType, paramConvertToType)))
+
+ # Note that there can be no incoming conversion for a
+ # scalar parameter; changing the scalar will only change
+ # the local value, and won't ultimately change anything
+ # that passes back to the application.
+
+ # Call strings. The unusual " ".join() call will join the
+ # array of parameter modifiers with spaces as separators.
+ passthroughDeclarationString += ", %s %s %s" % (paramConvertToType, " ".join(paramTypeModifiers), paramName)
+ passthroughCallString += ", converted_%s" % paramName
+
+ else: # a vector parameter that needs conversion
+ # We'll need an index variable for conversions
+ if " register unsigned int i;" not in variables:
+ variables.append(" register unsigned int i;")
+
+ # This variable will hold the (possibly variant) size of
+ # this array needing conversion. By default, we'll set
+ # it to the maximal size (which is correct for functions
+ # with a constant-sized vector parameter); for true
+ # variant arrays, we'll modify it with other code.
+ variables.append(" unsigned int n_%s = %d;" % (paramName, paramMaxVecSize))
+
+ # This array will hold the actual converted values.
+ variables.append(" %s converted_%s[%d];" % (paramConvertToType, paramName, paramMaxVecSize))
+
+ # Again, we choose the conversion code based on whether we
+ # have to always convert values, never convert values, or
+ # conditionally convert values.
+ if paramValueConversion == "none":
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = (%s) %s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+ # Write code based on that conditional.
+ conversionCodeOutgoing.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = %s;" % (paramName, ConvertValue("%s[i]" % paramName, paramBaseType, paramConvertToType)))
+ conversionCodeOutgoing.append(" }")
+ conversionCodeOutgoing.append(" } else {")
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = (%s) %s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ conversionCodeOutgoing.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = %s;" % (paramName, ConvertValue("%s[i]" % paramName, paramBaseType, paramConvertToType)))
+
+ conversionCodeOutgoing.append(" }")
+
+ # If instead we need an incoming conversion (i.e. results
+ # from Mesa have to be converted before handing back
+ # to the application), this is it. Fortunately, we don't
+ # have to worry about conditional value conversion - the
+ # functions that do (e.g. glGetFixedv()) are handled
+ # specially, outside this code generation.
+ #
+ # Whether we use incoming conversion or outgoing conversion
+ # is determined later - we only ever use one or the other.
+
+ if paramValueConversion == "none":
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = (%s) converted_%s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeIncoming.append(" }")
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+
+ # Write code based on that conditional.
+ conversionCodeIncoming.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = %s;" % (paramName, ConvertValue("converted_%s[i]" % paramName, paramConvertToType, paramBaseType)))
+ conversionCodeIncoming.append(" }")
+ conversionCodeIncoming.append(" } else {")
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = (%s) converted_%s[i];" % (paramName, paramBaseType, paramName))
+ conversionCodeIncoming.append(" }")
+ conversionCodeIncoming.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = %s;" % (paramName, ConvertValue("converted_%s[i]" % paramName, paramConvertToType, paramBaseType)))
+ conversionCodeIncoming.append(" }")
+
+ # Call strings. The unusual " ".join() call will join the
+ # array of parameter modifiers with spaces as separators.
+ passthroughDeclarationString += ", %s %s %s" % (paramConvertToType, " ".join(paramTypeModifiers), paramName)
+ passthroughCallString += ", converted_%s" % paramName
+
+ # endif conversion management
+
+ # Parameter checking. If the parameter has a specific list of
+ # valid values, we have to make sure that the passed-in values
+ # match these, or we make an error.
+ if len(paramValidValues) > 0:
+ # We're about to make a big switch statement with an
+ # error at the end. By default, the error is GL_INVALID_ENUM,
+ # unless we find a "case" statement in the middle with a
+ # non-GLenum value.
+ errorDefaultCase = "GL_INVALID_ENUM"
+
+ # This parameter has specific valid values. Make a big
+ # switch statement to handle it. Note that the original
+ # parameters are always what is checked, not the
+ # converted parameters.
+ switchCode.append(" switch(%s) {" % paramName)
+
+ for valueIndex in range(len(paramValidValues)):
+ (paramValue, dependentVecSize, dependentParamName, dependentValidValues, errorCode, valueConvert) = paramValidValues[valueIndex]
+
+ # We're going to need information on the dependent param
+ # as well.
+ if dependentParamName:
+ depParamIndex = apiutil.FindParamIndex(params, dependentParamName)
+ if depParamIndex == None:
+ sys.stderr.write("%s: can't find dependent param '%s' for function '%s'\n" % (program, dependentParamName, funcName))
+
+ (depParamName, depParamType, depParamMaxVecSize, depParamConvertToType, depParamValidValues, depParamValueConversion) = params[depParamIndex]
+ else:
+ (depParamName, depParamType, depParamMaxVecSize, depParamConvertToType, depParamValidValues, depParamValueConversion) = (None, None, None, None, [], None)
+
+ # This is a sneaky trick. It's valid syntax for a parameter
+ # that is *not* going to be converted to be declared
+ # with a dependent vector size; but in this case, the
+ # dependent vector size is unused and unnecessary.
+ # So check for this and ignore the dependent vector size
+ # if the parameter is not going to be converted.
+ if depParamConvertToType:
+ usedDependentVecSize = dependentVecSize
+ else:
+ usedDependentVecSize = None
+
+ # We'll peek ahead at the next parameter, to see whether
+ # we can combine cases
+ if valueIndex + 1 < len(paramValidValues) :
+ (nextParamValue, nextDependentVecSize, nextDependentParamName, nextDependentValidValues, nextErrorCode, nextValueConvert) = paramValidValues[valueIndex + 1]
+ if depParamConvertToType:
+ usedNextDependentVecSize = nextDependentVecSize
+ else:
+ usedNextDependentVecSize = None
+
+ # Create a case for this value. As a mnemonic,
+ # if we have a dependent vector size that we're ignoring,
+ # add it as a comment.
+ if usedDependentVecSize == None and dependentVecSize != None:
+ switchCode.append(" case %s: /* size %s */" % (paramValue, dependentVecSize))
+ else:
+ switchCode.append(" case %s:" % paramValue)
+
+ # If this is not a GLenum case, then switch our error
+ # if no value is matched to be GL_INVALID_VALUE instead
+ # of GL_INVALID_ENUM. (Yes, this does get confused
+ # if there are both values and GLenums in the same
+ # switch statement, which shouldn't happen.)
+ if paramValue[0:3] != "GL_":
+ errorDefaultCase = "GL_INVALID_VALUE"
+
+ # If all the remaining parameters are identical to the
+ # next set, then we're done - we'll just create the
+ # official code on the next pass through, and the two
+ # cases will share the code.
+ if valueIndex + 1 < len(paramValidValues) and usedDependentVecSize == usedNextDependentVecSize and dependentParamName == nextDependentParamName and dependentValidValues == nextDependentValidValues and errorCode == nextErrorCode and valueConvert == nextValueConvert:
+ continue
+
+ # Otherwise, we'll have to generate code for this case.
+ # Start off with a check: if there is a dependent parameter,
+ # and a list of valid values for that parameter, we need
+ # to generate an error if something other than one
+ # of those values is passed.
+ if len(dependentValidValues) > 0:
+ conditional=""
+
+ # If the parameter being checked is actually an array,
+ # check only its first element.
+ if depParamMaxVecSize == 0:
+ valueToCheck = dependentParamName
+ else:
+ valueToCheck = "%s[0]" % dependentParamName
+
+ for v in dependentValidValues:
+ conditional += " && %s != %s" % (valueToCheck, v)
+ switchCode.append(" if (%s) {" % conditional[4:])
+ if errorCode == None:
+ errorCode = "GL_INVALID_ENUM"
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s=0x%s)", %s);' % (errorCode, funcName, paramName, "%x", paramName))
+ switchCode.append(" %s;" % errorReturn)
+ switchCode.append(" }")
+ # endif there are dependent valid values
+
+ # The dependent parameter may require conditional
+ # value conversion. If it does, and we don't want
+ # to convert values, we'll have to generate code for that
+ if depParamValueConversion == "some" and valueConvert == "noconvert":
+ switchCode.append(" convert_%s_value = 0;" % dependentParamName)
+
+ # If there's a dependent vector size for this parameter
+ # that we're actually going to use (i.e. we need conversion),
+ # mark it.
+ if usedDependentVecSize:
+ switchCode.append(" n_%s = %s;" % (dependentParamName, dependentVecSize))
+
+ # In all cases, break out of the switch if any valid
+ # value is found.
+ switchCode.append(" break;")
+
+
+ # Need a default case to catch all the other, invalid
+ # parameter values. These will all generate errors.
+ switchCode.append(" default:")
+ if errorCode == None:
+ errorCode = "GL_INVALID_ENUM"
+ formatString = GetFormatString(paramType)
+ if formatString == None:
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s)");' % (errorCode, funcName, paramName))
+ else:
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s=%s)", %s);' % (errorCode, funcName, paramName, formatString, paramName))
+ switchCode.append(" %s;" % errorReturn)
+
+ # End of our switch code.
+ switchCode.append(" }")
+
+ # endfor every recognized parameter value
+
+ # endfor every param
+
+ # Here, the passthroughDeclarationString and passthroughCallString
+ # are complete; remove the extra ", " at the front of each.
+ passthroughDeclarationString = passthroughDeclarationString[2:]
+ passthroughCallString = passthroughCallString[2:]
+ if not passthroughDeclarationString:
+ passthroughDeclarationString = "void"
+
+ # The Mesa functions are scattered across all the Mesa
+ # header files. The easiest way to manage declarations
+ # is to create them ourselves.
+ if funcName in allSpecials:
+ print "/* this function is special and is defined elsewhere */"
+ print "extern %s GL_APIENTRY %s(%s);" % (returnType, passthroughFuncName, passthroughDeclarationString)
+
+ # A function may be a core function (i.e. it exists in
+ # the core specification), a core addition (extension
+ # functions added officially to the core), a required
+ # extension (usually an extension for an earlier version
+ # that has been officially adopted), or an optional extension.
+ #
+ # Core functions have a simple category (e.g. "GLES1.1");
+ # we generate only a simple callback for them.
+ #
+ # Core additions have two category listings, one simple
+ # and one compound (e.g. ["GLES1.1", "GLES1.1:OES_fixed_point"]).
+ # We generate the core function, and also an extension function.
+ #
+ # Required extensions and implemented optional extensions
+ # have a single compound category "GLES1.1:OES_point_size_array".
+ # For these we generate just the extension function.
+ for categorySpec in apiutil.Categories(funcName):
+ compoundCategory = categorySpec.split(":")
+
+ # This category isn't for us, if the base category doesn't match
+ # our version
+ if compoundCategory[0] != version:
+ continue
+
+ # Otherwise, determine if we're writing code for a core
+ # function (no suffix) or an extension function.
+ if len(compoundCategory) == 1:
+ # This is a core function
+ extensionName = None
+ extensionSuffix = ""
+ else:
+ # This is an extension function. We'll need to append
+ # the extension suffix.
+ extensionName = compoundCategory[1]
+ extensionSuffix = extensionName.split("_")[0]
+ fullFuncName = funcPrefix + funcName + extensionSuffix
+
+ # Now the generated function. The text used to mark an API-level
+ # function, oddly, is version-specific.
+ if extensionName:
+ print "/* Extension %s */" % extensionName
+
+ if (not variables and
+ not switchCode and
+ not conversionCodeOutgoing and
+ not conversionCodeIncoming):
+ # pass through directly
+ print "#define %s %s" % (fullFuncName, passthroughFuncName)
+ print
+ continue
+
+ print "static %s GL_APIENTRY %s(%s)" % (returnType, fullFuncName, declarationString)
+ print "{"
+
+ # Start printing our code pieces. Start with any local
+ # variables we need. This unusual syntax joins the
+ # lines in the variables[] array with the "\n" separator.
+ if len(variables) > 0:
+ print "\n".join(variables) + "\n"
+
+ # If there's any sort of parameter checking or variable
+ # array sizing, the switch code will contain it.
+ if len(switchCode) > 0:
+ print "\n".join(switchCode) + "\n"
+
+ # In the case of an outgoing conversion (i.e. parameters must
+ # be converted before calling the underlying Mesa function),
+ # use the appropriate code.
+ if "get" not in props and len(conversionCodeOutgoing) > 0:
+ print "\n".join(conversionCodeOutgoing) + "\n"
+
+ # Call the Mesa function. Note that there are very few functions
+ # that return a value (i.e. returnType is not "void"), and that
+ # none of them require incoming translation; so we're safe
+ # to generate code that directly returns in those cases,
+ # even though it's not completely independent.
+
+ if returnType == "void":
+ print " %s(%s);" % (passthroughFuncName, passthroughCallString)
+ else:
+ print " return %s(%s);" % (passthroughFuncName, passthroughCallString)
+
+ # If the function is one that returns values (i.e. "get" in props),
+ # it might return values of a different type than we need, that
+ # require conversion before passing back to the application.
+ if "get" in props and len(conversionCodeIncoming) > 0:
+ print "\n".join(conversionCodeIncoming)
+
+ # All done.
+ print "}"
+ print
+ # end for each category provided for a function
+
+# end for each function
+
+print """
+struct _glapi_table *
+_mesa_create_exec_table_%s(void)
+{
+ struct _glapi_table *exec;
+ exec = _mesa_alloc_dispatch_table(sizeof *exec);
+ if (exec == NULL)
+ return NULL;
+
+""" % shortname
+
+for func in keys:
+ prefix = "_es_" if func not in allSpecials else "_check_"
+ for spec in apiutil.Categories(func):
+ ext = spec.split(":")
+ # version does not match
+ if ext.pop(0) != version:
+ continue
+ entry = func
+ if ext:
+ suffix = ext[0].split("_")[0]
+ entry += suffix
+ print " SET_%s(exec, %s%s);" % (entry, prefix, entry)
+print ""
+print " return exec;"
+print "}"
+
+print """
+#endif /* FEATURE_%s */""" % (shortname.upper())
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 30245d6aa..080fa98df 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -28,7 +28,6 @@
#include "imports.h"
#include "context.h"
#include "extensions.h"
-#include "simple_list.h"
#include "mtypes.h"
@@ -45,35 +44,44 @@ static const struct {
const char *name;
int flag_offset;
} default_extensions[] = {
+ { OFF, "GL_ARB_blend_func_extended", F(ARB_blend_func_extended) },
{ OFF, "GL_ARB_copy_buffer", F(ARB_copy_buffer) },
- { OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) },
+ { OFF, "GL_ARB_depth_buffer_float", F(ARB_depth_buffer_float) },
{ OFF, "GL_ARB_depth_clamp", F(ARB_depth_clamp) },
+ { OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) },
{ ON, "GL_ARB_draw_buffers", F(ARB_draw_buffers) },
{ OFF, "GL_ARB_draw_elements_base_vertex", F(ARB_draw_elements_base_vertex) },
+ { OFF, "GL_ARB_draw_instanced", F(ARB_draw_instanced) },
{ OFF, "GL_ARB_fragment_coord_conventions", F(ARB_fragment_coord_conventions) },
{ OFF, "GL_ARB_fragment_program", F(ARB_fragment_program) },
{ OFF, "GL_ARB_fragment_program_shadow", F(ARB_fragment_program_shadow) },
{ OFF, "GL_ARB_fragment_shader", F(ARB_fragment_shader) },
{ OFF, "GL_ARB_framebuffer_object", F(ARB_framebuffer_object) },
+ { OFF, "GL_ARB_explicit_attrib_location", F(ARB_explicit_attrib_location) },
+ /* TODO: reenable this when the new GLSL compiler actually supports them */
+ /* { OFF, "GL_ARB_geometry_shader4", F(ARB_geometry_shader4) }, */
{ OFF, "GL_ARB_half_float_pixel", F(ARB_half_float_pixel) },
{ OFF, "GL_ARB_half_float_vertex", F(ARB_half_float_vertex) },
{ OFF, "GL_ARB_imaging", F(ARB_imaging) },
+ { OFF, "GL_ARB_instanced_arrays", F(ARB_instanced_arrays) },
{ OFF, "GL_ARB_map_buffer_range", F(ARB_map_buffer_range) },
{ ON, "GL_ARB_multisample", F(ARB_multisample) },
{ OFF, "GL_ARB_multitexture", F(ARB_multitexture) },
{ OFF, "GL_ARB_occlusion_query", F(ARB_occlusion_query) },
+ { OFF, "GL_ARB_occlusion_query2", F(ARB_occlusion_query2) },
{ OFF, "GL_ARB_pixel_buffer_object", F(EXT_pixel_buffer_object) },
{ OFF, "GL_ARB_point_parameters", F(EXT_point_parameters) },
{ OFF, "GL_ARB_point_sprite", F(ARB_point_sprite) },
{ OFF, "GL_ARB_provoking_vertex", F(EXT_provoking_vertex) },
+ { OFF, "GL_ARB_sampler_objects", F(ARB_sampler_objects) },
{ OFF, "GL_ARB_seamless_cube_map", F(ARB_seamless_cube_map) },
{ OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) },
{ OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) },
- { OFF, "GL_ARB_shading_language_120", F(ARB_shading_language_120) },
{ OFF, "GL_ARB_shadow", F(ARB_shadow) },
{ OFF, "GL_ARB_shadow_ambient", F(ARB_shadow_ambient) },
{ OFF, "GL_ARB_sync", F(ARB_sync) },
{ OFF, "GL_ARB_texture_border_clamp", F(ARB_texture_border_clamp) },
+ { OFF, "GL_ARB_texture_buffer_object", F(ARB_texture_buffer_object) },
{ ON, "GL_ARB_texture_compression", F(ARB_texture_compression) },
{ OFF, "GL_ARB_texture_cube_map", F(ARB_texture_cube_map) },
{ OFF, "GL_ARB_texture_env_add", F(EXT_texture_env_add) },
@@ -82,14 +90,21 @@ static const struct {
{ OFF, "GL_ARB_texture_env_dot3", F(ARB_texture_env_dot3) },
{ OFF, "GL_MESAX_texture_float", F(ARB_texture_float) },
{ OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
+ { OFF, "GL_ARB_texture_multisample", F(ARB_texture_multisample) },
{ OFF, "GL_ARB_texture_non_power_of_two", F(ARB_texture_non_power_of_two)},
{ OFF, "GL_ARB_texture_rectangle", F(NV_texture_rectangle) },
+ { OFF, "GL_ARB_texture_rg", F(ARB_texture_rg) },
+ { OFF, "GL_ARB_texture_rgb10_a2ui", F(ARB_texture_rgb10_a2ui) },
+ { OFF, "GL_ARB_texture_swizzle", F(EXT_texture_swizzle) },
{ ON, "GL_ARB_transpose_matrix", F(ARB_transpose_matrix) },
+ { OFF, "GL_ARB_transform_feedback2", F(ARB_transform_feedback2) },
+ { OFF, "GL_ARB_uniform_buffer_object", F(ARB_uniform_buffer_object) },
{ OFF, "GL_ARB_vertex_array_bgra", F(EXT_vertex_array_bgra) },
{ OFF, "GL_ARB_vertex_array_object", F(ARB_vertex_array_object) },
{ ON, "GL_ARB_vertex_buffer_object", F(ARB_vertex_buffer_object) },
{ OFF, "GL_ARB_vertex_program", F(ARB_vertex_program) },
{ OFF, "GL_ARB_vertex_shader", F(ARB_vertex_shader) },
+ { OFF, "GL_ARB_vertex_type_2_10_10_10_rev", F(ARB_vertex_type_2_10_10_10_rev) },
{ ON, "GL_ARB_window_pos", F(ARB_window_pos) },
{ ON, "GL_EXT_abgr", F(EXT_abgr) },
{ ON, "GL_EXT_bgra", F(EXT_bgra) },
@@ -106,15 +121,18 @@ static const struct {
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
{ OFF, "GL_EXT_draw_buffers2", F(EXT_draw_buffers2) },
+ { OFF, "GL_EXT_draw_instanced", F(ARB_draw_instanced) },
{ ON, "GL_EXT_draw_range_elements", F(EXT_draw_range_elements) },
{ OFF, "GL_EXT_framebuffer_blit", F(EXT_framebuffer_blit) },
{ OFF, "GL_EXT_framebuffer_multisample", F(EXT_framebuffer_multisample) },
{ OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
+ { OFF, "GL_EXT_framebuffer_sRGB", F(EXT_framebuffer_sRGB) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
{ OFF, "GL_EXT_histogram", F(EXT_histogram) },
{ ON, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_EXT_packed_depth_stencil", F(EXT_packed_depth_stencil) },
+ { OFF, "GL_EXT_packed_float", F(EXT_packed_float) },
{ ON, "GL_EXT_packed_pixels", F(EXT_packed_pixels) },
{ OFF, "GL_EXT_paletted_texture", F(EXT_paletted_texture) },
{ OFF, "GL_EXT_pixel_buffer_object", F(EXT_pixel_buffer_object) },
@@ -133,19 +151,23 @@ static const struct {
{ ON, "GL_EXT_texture3D", F(EXT_texture3D) },
{ OFF, "GL_EXT_texture_array", F(EXT_texture_array) },
{ OFF, "GL_EXT_texture_compression_s3tc", F(EXT_texture_compression_s3tc) },
+ { OFF, "GL_EXT_texture_compression_rgtc", F(EXT_texture_compression_rgtc) },
{ OFF, "GL_EXT_texture_cube_map", F(ARB_texture_cube_map) },
{ ON, "GL_EXT_texture_edge_clamp", F(SGIS_texture_edge_clamp) },
{ OFF, "GL_EXT_texture_env_add", F(EXT_texture_env_add) },
{ OFF, "GL_EXT_texture_env_combine", F(EXT_texture_env_combine) },
{ OFF, "GL_EXT_texture_env_dot3", F(EXT_texture_env_dot3) },
{ OFF, "GL_EXT_texture_filter_anisotropic", F(EXT_texture_filter_anisotropic) },
+ { OFF, "GL_EXT_texture_integer", F(EXT_texture_integer) },
{ OFF, "GL_EXT_texture_lod_bias", F(EXT_texture_lod_bias) },
{ OFF, "GL_EXT_texture_mirror_clamp", F(EXT_texture_mirror_clamp) },
{ ON, "GL_EXT_texture_object", F(EXT_texture_object) },
{ OFF, "GL_EXT_texture_rectangle", F(NV_texture_rectangle) },
+ { OFF, "GL_EXT_texture_shared_exponent", F(EXT_texture_shared_exponent) },
{ OFF, "GL_EXT_texture_sRGB", F(EXT_texture_sRGB) },
{ OFF, "GL_EXT_texture_swizzle", F(EXT_texture_swizzle) },
{ OFF, "GL_EXT_timer_query", F(EXT_timer_query) },
+ { OFF, "GL_EXT_transform_feedback", F(EXT_transform_feedback) },
{ ON, "GL_EXT_vertex_array", F(EXT_vertex_array) },
{ OFF, "GL_EXT_vertex_array_bgra", F(EXT_vertex_array_bgra) },
{ OFF, "GL_EXT_vertex_array_set", F(EXT_vertex_array_set) },
@@ -179,9 +201,10 @@ static const struct {
{ ON, "GL_NV_light_max_exponent", F(NV_light_max_exponent) },
{ OFF, "GL_NV_packed_depth_stencil", F(EXT_packed_depth_stencil) },
{ OFF, "GL_NV_point_sprite", F(NV_point_sprite) },
+ { OFF, "GL_NV_primitive_restart", F(NV_primitive_restart) },
+ { ON, "GL_NV_texgen_reflection", F(NV_texgen_reflection) },
{ OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) },
{ OFF, "GL_NV_texture_rectangle", F(NV_texture_rectangle) },
- { ON, "GL_NV_texgen_reflection", F(NV_texgen_reflection) },
{ OFF, "GL_NV_vertex_program", F(NV_vertex_program) },
{ OFF, "GL_NV_vertex_program1_1", F(NV_vertex_program1_1) },
{ ON, "GL_OES_read_format", F(OES_read_format) },
@@ -194,6 +217,9 @@ static const struct {
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
+#if FEATURE_OES_EGL_image
+ { OFF, "GL_OES_EGL_image", F(OES_EGL_image) },
+#endif
#if FEATURE_OES_draw_texture
{ OFF, "GL_OES_draw_texture", F(OES_draw_texture) },
#endif /* FEATURE_OES_draw_texture */
@@ -224,6 +250,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_ARB_framebuffer_object
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
#endif
+#if FEATURE_ARB_geometry_shader4
+ ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
+#endif
ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
ctx->Extensions.ARB_imaging = GL_TRUE;
@@ -239,9 +268,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
#endif
-#if FEATURE_ARB_shading_language_120
- ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
-#endif
ctx->Extensions.ARB_shadow = GL_TRUE;
ctx->Extensions.ARB_shadow_ambient = GL_TRUE;
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
@@ -319,6 +345,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
#endif
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
+#if FEATURE_EXT_transform_feedback
+ /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/
+#endif
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
/*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/
ctx->Extensions.MESA_pack_invert = GL_TRUE;
@@ -480,13 +509,9 @@ _mesa_enable_2_1_extensions(GLcontext *ctx)
#if FEATURE_EXT_texture_sRGB
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
#endif
-#ifdef FEATURE_ARB_shading_language_120
- ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
-#endif
}
-
/**
* Either enable or disable the named extension.
* \return GL_TRUE for success, GL_FALSE if invalid extension name
@@ -672,8 +697,8 @@ _mesa_init_extensions( GLcontext *ctx )
* Construct the GL_EXTENSIONS string. Called the first time that
* glGetString(GL_EXTENSIONS) is called.
*/
-GLubyte *
-_mesa_make_extension_string( GLcontext *ctx )
+static GLubyte *
+compute_extensions( GLcontext *ctx )
{
const char *extraExt = get_extension_override(ctx);
GLuint extStrLen = 0;
@@ -718,6 +743,206 @@ _mesa_make_extension_string( GLcontext *ctx )
return (GLubyte *) s;
}
+static size_t
+append_extension(GLubyte **str, const char *ext)
+{
+ GLubyte *s = *str;
+ size_t len = strlen(ext);
+
+ if (s) {
+ memcpy(s, ext, len);
+ s[len++] = ' ';
+ s[len] = '\0';
+
+ *str += len;
+ }
+ else {
+ len++;
+ }
+
+ return len;
+}
+
+
+static size_t
+make_extension_string_es1(const GLcontext *ctx, GLubyte *str)
+{
+ size_t len = 0;
+
+ /* Core additions */
+ len += append_extension(&str, "GL_OES_byte_coordinates");
+ len += append_extension(&str, "GL_OES_fixed_point");
+ len += append_extension(&str, "GL_OES_single_precision");
+ len += append_extension(&str, "GL_OES_matrix_get");
+
+ /* 1.1 required extensions */
+ len += append_extension(&str, "GL_OES_read_format");
+ len += append_extension(&str, "GL_OES_compressed_paletted_texture");
+ len += append_extension(&str, "GL_OES_point_size_array");
+ len += append_extension(&str, "GL_OES_point_sprite");
+
+ /* 1.1 deprecated extensions */
+ len += append_extension(&str, "GL_OES_query_matrix");
+
+#if FEATURE_OES_draw_texture
+ if (ctx->Extensions.OES_draw_texture)
+ len += append_extension(&str, "GL_OES_draw_texture");
+#endif
+
+ if (ctx->Extensions.EXT_blend_equation_separate)
+ len += append_extension(&str, "GL_OES_blend_equation_separate");
+ if (ctx->Extensions.EXT_blend_func_separate)
+ len += append_extension(&str, "GL_OES_blend_func_separate");
+ if (ctx->Extensions.EXT_blend_subtract)
+ len += append_extension(&str, "GL_OES_blend_subtract");
+
+ if (ctx->Extensions.EXT_stencil_wrap)
+ len += append_extension(&str, "GL_OES_stencil_wrap");
+
+ if (ctx->Extensions.ARB_texture_cube_map)
+ len += append_extension(&str, "GL_OES_texture_cube_map");
+ if (ctx->Extensions.ARB_texture_env_crossbar)
+ len += append_extension(&str, "GL_OES_texture_env_crossbar");
+ if (ctx->Extensions.ARB_texture_mirrored_repeat)
+ len += append_extension(&str, "GL_OES_texture_mirrored_repeat");
+
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ len += append_extension(&str, "GL_OES_framebuffer_object");
+ len += append_extension(&str, "GL_OES_depth24");
+ len += append_extension(&str, "GL_OES_depth32");
+ len += append_extension(&str, "GL_OES_fbo_render_mipmap");
+ len += append_extension(&str, "GL_OES_rgb8_rgba8");
+ len += append_extension(&str, "GL_OES_stencil1");
+ len += append_extension(&str, "GL_OES_stencil4");
+ len += append_extension(&str, "GL_OES_stencil8");
+ }
+
+ if (ctx->Extensions.EXT_vertex_array)
+ len += append_extension(&str, "GL_OES_element_index_uint");
+ if (ctx->Extensions.ARB_vertex_buffer_object)
+ len += append_extension(&str, "GL_OES_mapbuffer");
+ if (ctx->Extensions.EXT_texture_filter_anisotropic)
+ len += append_extension(&str, "GL_EXT_texture_filter_anisotropic");
+
+ /* some applications check this for NPOT support */
+ if (ctx->Extensions.ARB_texture_non_power_of_two)
+ len += append_extension(&str, "GL_ARB_texture_non_power_of_two");
+
+ if (ctx->Extensions.EXT_texture_compression_s3tc)
+ len += append_extension(&str, "GL_EXT_texture_compression_dxt1");
+ if (ctx->Extensions.EXT_texture_lod_bias)
+ len += append_extension(&str, "GL_EXT_texture_lod_bias");
+ if (ctx->Extensions.EXT_blend_minmax)
+ len += append_extension(&str, "GL_EXT_blend_minmax");
+ if (ctx->Extensions.EXT_multi_draw_arrays)
+ len += append_extension(&str, "GL_EXT_multi_draw_arrays");
+
+#if FEATURE_OES_EGL_image
+ if (ctx->Extensions.OES_EGL_image)
+ len += append_extension(&str, "GL_OES_EGL_image");
+#endif
+
+ return len;
+}
+
+
+static GLubyte *
+compute_extensions_es1(const GLcontext *ctx)
+{
+ GLubyte *s;
+ unsigned int len;
+
+ len = make_extension_string_es1(ctx, NULL);
+ s = malloc(len + 1);
+ if (!s)
+ return NULL;
+ make_extension_string_es1(ctx, s);
+
+ return s;
+}
+
+static size_t
+make_extension_string_es2(const GLcontext *ctx, GLubyte *str)
+{
+ size_t len = 0;
+
+ len += append_extension(&str, "GL_OES_compressed_paletted_texture");
+
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ len += append_extension(&str, "GL_OES_depth24");
+ len += append_extension(&str, "GL_OES_depth32");
+ len += append_extension(&str, "GL_OES_fbo_render_mipmap");
+ len += append_extension(&str, "GL_OES_rgb8_rgba8");
+ len += append_extension(&str, "GL_OES_stencil1");
+ len += append_extension(&str, "GL_OES_stencil4");
+ }
+
+ if (ctx->Extensions.EXT_vertex_array)
+ len += append_extension(&str, "GL_OES_element_index_uint");
+ if (ctx->Extensions.ARB_vertex_buffer_object)
+ len += append_extension(&str, "GL_OES_mapbuffer");
+
+ if (ctx->Extensions.EXT_texture3D)
+ len += append_extension(&str, "GL_OES_texture_3D");
+ if (ctx->Extensions.ARB_texture_non_power_of_two)
+ len += append_extension(&str, "GL_OES_texture_npot");
+ if (ctx->Extensions.EXT_texture_filter_anisotropic)
+ len += append_extension(&str, "GL_EXT_texture_filter_anisotropic");
+
+ len += append_extension(&str, "GL_EXT_texture_type_2_10_10_10_REV");
+ if (ctx->Extensions.ARB_depth_texture)
+ len += append_extension(&str, "GL_OES_depth_texture");
+ if (ctx->Extensions.EXT_packed_depth_stencil)
+ len += append_extension(&str, "GL_OES_packed_depth_stencil");
+ if (ctx->Extensions.ARB_fragment_shader)
+ len += append_extension(&str, "GL_OES_standard_derivatives");
+
+ if (ctx->Extensions.EXT_texture_compression_s3tc)
+ len += append_extension(&str, "GL_EXT_texture_compression_dxt1");
+ if (ctx->Extensions.EXT_blend_minmax)
+ len += append_extension(&str, "GL_EXT_blend_minmax");
+ if (ctx->Extensions.EXT_multi_draw_arrays)
+ len += append_extension(&str, "GL_EXT_multi_draw_arrays");
+
+#if FEATURE_OES_EGL_image
+ if (ctx->Extensions.OES_EGL_image)
+ len += append_extension(&str, "GL_OES_EGL_image");
+#endif
+
+ return len;
+}
+
+static GLubyte *
+compute_extensions_es2(GLcontext *ctx)
+{
+ GLubyte *s;
+ unsigned int len;
+
+ len = make_extension_string_es2(ctx, NULL);
+ s = malloc(len + 1);
+ if (!s)
+ return NULL;
+ make_extension_string_es2(ctx, s);
+
+ return s;
+}
+
+
+GLubyte *
+_mesa_make_extension_string(GLcontext *ctx)
+{
+ switch (ctx->API) {
+ case API_OPENGL:
+ return compute_extensions(ctx);
+ case API_OPENGLES2:
+ return compute_extensions_es2(ctx);
+ case API_OPENGLES:
+ return compute_extensions_es1(ctx);
+ default:
+ assert(0);
+ return NULL;
+ }
+}
/**
* Return number of enabled extensions.
@@ -738,7 +963,7 @@ _mesa_get_extension_count(GLcontext *ctx)
if (0)
_mesa_debug(ctx, "%u of %d extensions enabled\n", ctx->Extensions.Count,
- Elements(default_extensions));
+ (int) Elements(default_extensions));
return ctx->Extensions.Count;
}
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index cc20f7479..5201f5025 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -71,6 +71,10 @@
static struct gl_framebuffer DummyFramebuffer;
static struct gl_renderbuffer DummyRenderbuffer;
+/* We bind this framebuffer when applications pass a NULL
+ * drawable/surface in make current. */
+static struct gl_framebuffer IncompleteFramebuffer;
+
#define IS_CUBE_FACE(TARGET) \
((TARGET) >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && \
@@ -93,10 +97,19 @@ delete_dummy_framebuffer(struct gl_framebuffer *fb)
void
_mesa_init_fbobjects(GLcontext *ctx)
{
+ _glthread_INIT_MUTEX(DummyFramebuffer.Mutex);
+ _glthread_INIT_MUTEX(DummyRenderbuffer.Mutex);
+ _glthread_INIT_MUTEX(IncompleteFramebuffer.Mutex);
DummyFramebuffer.Delete = delete_dummy_framebuffer;
DummyRenderbuffer.Delete = delete_dummy_renderbuffer;
+ IncompleteFramebuffer.Delete = delete_dummy_framebuffer;
}
+struct gl_framebuffer *
+_mesa_get_incomplete_framebuffer(void)
+{
+ return &IncompleteFramebuffer;
+}
/**
* Helper routine for getting a gl_renderbuffer.
@@ -147,6 +160,8 @@ invalidate_framebuffer(struct gl_framebuffer *fb)
/**
* Given a GL_*_ATTACHMENTn token, return a pointer to the corresponding
* gl_renderbuffer_attachment object.
+ * This function is only used for user-created FB objects, not the
+ * default / window-system FB object.
* If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to
* the depth buffer attachment point.
*/
@@ -156,6 +171,8 @@ _mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
{
GLuint i;
+ assert(fb->Name > 0);
+
switch (attachment) {
case GL_COLOR_ATTACHMENT0_EXT:
case GL_COLOR_ATTACHMENT1_EXT:
@@ -180,8 +197,50 @@ _mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
return &fb->Attachment[BUFFER_COLOR0 + i];
case GL_DEPTH_STENCIL_ATTACHMENT:
/* fall-through */
+ case GL_DEPTH_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_DEPTH_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_DEPTH];
+ case GL_STENCIL_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_STENCIL_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_STENCIL];
+ default:
+ return NULL;
+ }
+}
+
+
+/**
+ * As above, but only used for getting attachments of the default /
+ * window-system framebuffer (not user-created framebuffer objects).
+ */
+static struct gl_renderbuffer_attachment *
+_mesa_get_fb0_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
+ GLenum attachment)
+{
+ assert(fb->Name == 0);
+
+ switch (attachment) {
+ case GL_FRONT_LEFT:
+ return &fb->Attachment[BUFFER_FRONT_LEFT];
+ case GL_FRONT_RIGHT:
+ return &fb->Attachment[BUFFER_FRONT_RIGHT];
+ case GL_BACK_LEFT:
+ return &fb->Attachment[BUFFER_BACK_LEFT];
+ case GL_BACK_RIGHT:
+ return &fb->Attachment[BUFFER_BACK_RIGHT];
+ case GL_AUX0:
+ if (fb->Visual.numAuxBuffers == 1) {
+ return &fb->Attachment[BUFFER_AUX0];
+ }
+ return NULL;
+ case GL_DEPTH_BUFFER:
+ /* fall-through / new in GL 3.0 */
case GL_DEPTH_ATTACHMENT_EXT:
return &fb->Attachment[BUFFER_DEPTH];
+ case GL_STENCIL_BUFFER:
+ /* fall-through / new in GL 3.0 */
case GL_STENCIL_ATTACHMENT_EXT:
return &fb->Attachment[BUFFER_STENCIL];
default:
@@ -190,6 +249,7 @@ _mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
}
+
/**
* Remove any texture or renderbuffer attached to the given attachment
* point. Update reference counts, etc.
@@ -389,7 +449,9 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
if (format == GL_COLOR) {
if (baseFormat != GL_RGB &&
- baseFormat != GL_RGBA) {
+ baseFormat != GL_RGBA &&
+ (!ctx->Extensions.ARB_framebuffer_object ||
+ baseFormat != GL_ALPHA)) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
@@ -568,7 +630,8 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
f = texImg->_BaseFormat;
numImages++;
if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT
- && f != GL_DEPTH_STENCIL_EXT) {
+ && f != GL_DEPTH_STENCIL_EXT
+ && (!ctx->Extensions.ARB_framebuffer_object || f != GL_ALPHA)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("texture attachment incomplete", -1);
return;
@@ -625,30 +688,32 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
}
}
-#ifndef FEATURE_OES_framebuffer_object
- /* Check that all DrawBuffers are present */
- for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
- if (fb->ColorDrawBuffer[j] != GL_NONE) {
- const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
- assert(att);
- if (att->Type == GL_NONE) {
- fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
- fbo_incomplete("missing drawbuffer", j);
- return;
- }
+#if FEATURE_GL
+ if (ctx->API == API_OPENGL) {
+ /* Check that all DrawBuffers are present */
+ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
+ if (fb->ColorDrawBuffer[j] != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
+ fbo_incomplete("missing drawbuffer", j);
+ return;
+ }
+ }
}
- }
- /* Check that the ReadBuffer is present */
- if (fb->ColorReadBuffer != GL_NONE) {
- const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
- assert(att);
- if (att->Type == GL_NONE) {
- fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
+ /* Check that the ReadBuffer is present */
+ if (fb->ColorReadBuffer != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
fbo_incomplete("missing readbuffer", -1);
- return;
+ return;
+ }
}
}
#else
@@ -866,6 +931,12 @@ GLenum
_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
{
switch (internalFormat) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
case GL_RGB:
case GL_R3_G3_B2:
case GL_RGB4:
@@ -883,6 +954,7 @@ _mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
case GL_RGB10_A2:
case GL_RGBA12:
case GL_RGBA16:
+ case GL_RGBA16_SNORM:
return GL_RGBA;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
@@ -962,7 +1034,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
rb = ctx->CurrentRenderbuffer;
if (!rb) {
- _mesa_error(ctx, GL_INVALID_OPERATION, func);
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s", func);
return;
}
@@ -1008,22 +1080,31 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
*/
}
+
#if FEATURE_OES_EGL_image
void GLAPIENTRY
-_mesa_EGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image)
+_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
{
struct gl_renderbuffer *rb;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetRenderbufferStorageOES(unsupported)");
+ return;
+ }
+
if (target != GL_RENDERBUFFER) {
- _mesa_error(ctx, GL_INVALID_ENUM, "EGLImageTargetRenderbufferStorageOES");
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "EGLImageTargetRenderbufferStorageOES");
return;
}
rb = ctx->CurrentRenderbuffer;
if (!rb) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "EGLImageTargetRenderbufferStorageOES");
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "EGLImageTargetRenderbufferStorageOES");
return;
}
@@ -1033,6 +1114,7 @@ _mesa_EGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image)
}
#endif
+
/**
* Helper function for _mesa_GetRenderbufferParameterivEXT() and
* _mesa_GetFramebufferAttachmentParameterivEXT()
@@ -1101,6 +1183,26 @@ _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
}
+/**
+ * OpenGL ES version of glRenderBufferStorage.
+ */
+void GLAPIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ switch (internalFormat) {
+ case GL_RGB565:
+ /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ /* choose a closest format */
+ internalFormat = GL_RGB5;
+ break;
+ default:
+ break;
+ }
+
+ renderbuffer_storage(target, internalFormat, width, height, 0);
+}
+
void GLAPIENTRY
_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
@@ -1549,6 +1651,7 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
texObj = _mesa_lookup_texture(ctx, texture);
if (texObj != NULL) {
if (textarget == 0) {
+ /* XXX what's the purpose of this? */
err = (texObj->Target != GL_TEXTURE_3D) &&
(texObj->Target != GL_TEXTURE_1D_ARRAY_EXT) &&
(texObj->Target != GL_TEXTURE_2D_ARRAY_EXT);
@@ -1559,6 +1662,13 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
: (texObj->Target != textarget);
}
}
+ else {
+ /* can't render to a non-existant texture */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTexture%sEXT(non existant texture)",
+ caller);
+ return;
+ }
if (err) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -1830,12 +1940,14 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
if (buffer->Name == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetFramebufferAttachmentParameterivEXT");
- return;
+ /* the default / window-system FBO */
+ att = _mesa_get_fb0_attachment(ctx, buffer, attachment);
+ }
+ else {
+ /* user-created framebuffer FBO */
+ att = _mesa_get_attachment(ctx, buffer, attachment);
}
- att = _mesa_get_attachment(ctx, buffer, attachment);
if (att == NULL) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(attachment)");
@@ -2206,3 +2318,25 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
mask, filter);
}
#endif /* FEATURE_EXT_framebuffer_blit */
+
+#if FEATURE_ARB_geometry_shader4
+void GLAPIENTRY
+_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTextureARB "
+ "not implemented!");
+}
+
+void GLAPIENTRY
+_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTextureFaceARB "
+ "not implemented!");
+}
+#endif /* FEATURE_ARB_geometry_shader4 */
diff --git a/mesalib/src/mesa/main/fbobject.h b/mesalib/src/mesa/main/fbobject.h
index 28f75dfca..9850ee9aa 100644
--- a/mesalib/src/mesa/main/fbobject.h
+++ b/mesalib/src/mesa/main/fbobject.h
@@ -26,10 +26,14 @@
#ifndef FBOBJECT_H
#define FBOBJECT_H
+#include "mtypes.h"
extern void
_mesa_init_fbobjects(GLcontext *ctx);
+extern struct gl_framebuffer *
+_mesa_get_incomplete_framebuffer(void);
+
extern struct gl_renderbuffer *
_mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id);
@@ -89,6 +93,10 @@ _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
GLsizei width, GLsizei height);
extern void GLAPIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height);
+
+extern void GLAPIENTRY
_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
extern void GLAPIENTRY
@@ -145,5 +153,13 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
+extern void GLAPIENTRY
+_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face);
+
#endif /* FBOBJECT_H */
diff --git a/mesalib/src/mesa/main/feedback.h b/mesalib/src/mesa/main/feedback.h
index 3e8283ed2..c6354b97b 100644
--- a/mesalib/src/mesa/main/feedback.h
+++ b/mesalib/src/mesa/main/feedback.h
@@ -32,11 +32,6 @@
#if FEATURE_feedback
-#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) \
- do { \
- (driver)->RenderMode = impl ## RenderMode; \
- } while (0)
-
extern void
_mesa_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
@@ -63,7 +58,7 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp);
#else /* FEATURE_feedback */
-#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) do { } while (0)
+#include "main/compiler.h"
static INLINE void
_mesa_feedback_vertex( GLcontext *ctx,
diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c
index ba94a3877..92fec09ba 100644
--- a/mesalib/src/mesa/main/ffvertex_prog.c
+++ b/mesalib/src/mesa/main/ffvertex_prog.c
@@ -38,12 +38,12 @@
#include "main/macros.h"
#include "main/enums.h"
#include "main/ffvertex_prog.h"
-#include "shader/program.h"
-#include "shader/prog_cache.h"
-#include "shader/prog_instruction.h"
-#include "shader/prog_parameter.h"
-#include "shader/prog_print.h"
-#include "shader/prog_statevars.h"
+#include "program/program.h"
+#include "program/prog_cache.h"
+#include "program/prog_instruction.h"
+#include "program/prog_parameter.h"
+#include "program/prog_print.h"
+#include "program/prog_statevars.h"
/** Max of number of lights and texture coord units */
@@ -75,6 +75,7 @@ struct state_key {
unsigned light_attenuated:1;
unsigned texunit_really_enabled:1;
unsigned texmat_enabled:1;
+ unsigned coord_replace:1;
unsigned texgen_enabled:4;
unsigned texgen_mode0:4;
unsigned texgen_mode1:4;
@@ -225,6 +226,10 @@ static void make_state_key( GLcontext *ctx, struct state_key *key )
if (texUnit->_ReallyEnabled)
key->unit[i].texunit_really_enabled = 1;
+ if (ctx->Point.PointSprite)
+ if (ctx->Point.CoordReplace[i])
+ key->unit[i].coord_replace = 1;
+
if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i))
key->unit[i].texmat_enabled = 1;
@@ -1385,6 +1390,9 @@ static void build_texture_transform( struct tnl_program *p )
if (!(p->state->fragprog_inputs_read & FRAG_BIT_TEX(i)))
continue;
+ if (p->state->unit[i].coord_replace)
+ continue;
+
if (p->state->unit[i].texgen_enabled ||
p->state->unit[i].texmat_enabled) {
diff --git a/mesalib/src/mesa/main/fog.c b/mesalib/src/mesa/main/fog.c
index 269ff3f8b..9f26c012d 100644
--- a/mesalib/src/mesa/main/fog.c
+++ b/mesalib/src/mesa/main/fog.c
@@ -27,6 +27,7 @@
#include "colormac.h"
#include "context.h"
#include "fog.h"
+#include "macros.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c
index d0c9c0028..9db9f1c56 100644
--- a/mesalib/src/mesa/main/formats.c
+++ b/mesalib/src/mesa/main/formats.c
@@ -26,7 +26,7 @@
#include "imports.h"
#include "formats.h"
-#include "config.h"
+#include "mfeatures.h"
/**
@@ -48,7 +48,7 @@ struct gl_format_info
/**
* Logical data type: one of GL_UNSIGNED_NORMALIZED, GL_SIGNED_NORMALED,
- * GL_UNSIGNED_INT, GL_SIGNED_INT, GL_FLOAT.
+ * GL_UNSIGNED_INT, GL_INT, GL_FLOAT.
*/
GLenum DataType;
@@ -628,6 +628,66 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 16, 0, 0, 0,
1, 1, 2
},
+
+ /* unnormalized signed int formats */
+ {
+ MESA_FORMAT_RGBA_INT8,
+ "MESA_FORMAT_RGBA_INT8",
+ GL_RGBA,
+ GL_INT,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_RGBA_INT16,
+ "MESA_FORMAT_RGBA_INT16",
+ GL_RGBA,
+ GL_INT,
+ 16, 16, 16, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGBA_INT32,
+ "MESA_FORMAT_RGBA_INT32",
+ GL_RGBA,
+ GL_INT,
+ 32, 32, 32, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 16
+ },
+
+ /* unnormalized unsigned int formats */
+ {
+ MESA_FORMAT_RGBA_UINT8,
+ "MESA_FORMAT_RGBA_UINT8",
+ GL_RGBA,
+ GL_UNSIGNED_INT,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_RGBA_UINT16,
+ "MESA_FORMAT_RGBA_UINT16",
+ GL_RGBA,
+ GL_UNSIGNED_INT,
+ 16, 16, 16, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGBA_UINT32,
+ "MESA_FORMAT_RGBA_UINT32",
+ GL_RGBA,
+ GL_UNSIGNED_INT,
+ 32, 32, 32, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 16
+ },
+
+
{
MESA_FORMAT_DUDV8,
"MESA_FORMAT_DUDV8",
@@ -637,6 +697,35 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 0, 0, 0, 0,
1, 1, 2
},
+
+ /* Signed 8 bits / channel */
+ {
+ MESA_FORMAT_SIGNED_R8, /* Name */
+ "MESA_FORMAT_SIGNED_R8", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_SIGNED_NORMALIZED, /* DataType */
+ 8, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_SIGNED_RG88,
+ "MESA_FORMAT_SIGNED_RG88",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 8, 8, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBX8888,
+ "MESA_FORMAT_SIGNED_RGBX8888",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 8, 8, 8, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4 /* 4 bpp, but no alpha */
+ },
{
MESA_FORMAT_SIGNED_RGBA8888,
"MESA_FORMAT_SIGNED_RGBA8888",
@@ -655,6 +744,35 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 0, 0, 0, 0,
1, 1, 4
},
+
+ /* Signed 16 bits / channel */
+ {
+ MESA_FORMAT_SIGNED_R_16,
+ "MESA_FORMAT_SIGNED_R_16",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 16, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_RG_16,
+ "MESA_FORMAT_SIGNED_RG_16",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 16, 16, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SIGNED_RGB_16,
+ "MESA_FORMAT_SIGNED_RGB_16",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 16, 16, 16, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 6
+ },
{
MESA_FORMAT_SIGNED_RGBA_16,
"MESA_FORMAT_SIGNED_RGBA_16",
@@ -663,6 +781,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
16, 16, 16, 16,
0, 0, 0, 0, 0,
1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGBA_16,
+ "MESA_FORMAT_RGBA_16",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 16, 16, 16, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
}
};
@@ -814,6 +941,18 @@ _mesa_is_format_compressed(gl_format format)
/**
+ * Determine if the given format represents a packed depth/stencil buffer.
+ */
+GLboolean
+_mesa_is_format_packed_depth_stencil(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+
+ return info->BaseFormat == GL_DEPTH_STENCIL;
+}
+
+
+/**
* Return color encoding for given format.
* \return GL_LINEAR or GL_SRGB
*/
@@ -1067,6 +1206,19 @@ _mesa_format_to_type_and_comps(gl_format format,
*datatype = GL_BYTE;
*comps = 4;
return;
+
+ case MESA_FORMAT_SIGNED_R_16:
+ *datatype = GL_SHORT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_SIGNED_RG_16:
+ *datatype = GL_SHORT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_SIGNED_RGB_16:
+ *datatype = GL_SHORT;
+ *comps = 3;
+ return;
case MESA_FORMAT_SIGNED_RGBA_16:
*datatype = GL_SHORT;
*comps = 4;
@@ -1150,6 +1302,36 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 1;
return;
+ case MESA_FORMAT_RGBA_INT8:
+ *datatype = GL_BYTE;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGBA_INT16:
+ *datatype = GL_SHORT;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGBA_INT32:
+ *datatype = GL_INT;
+ *comps = 4;
+ return;
+
+ /**
+ * \name Non-normalized unsigned integer formats.
+ */
+ case MESA_FORMAT_RGBA_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGBA_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGBA_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 4;
+ return;
+
+
default:
_mesa_problem(NULL, "bad format in _mesa_format_to_type_and_comps");
*datatype = 0;
diff --git a/mesalib/src/mesa/main/formats.h b/mesalib/src/mesa/main/formats.h
index 0eeeb8b2b..e9467f486 100644
--- a/mesalib/src/mesa/main/formats.h
+++ b/mesalib/src/mesa/main/formats.h
@@ -33,7 +33,7 @@
#define FORMATS_H
-#include "main/mtypes.h"
+#include <GL/gl.h>
@@ -131,13 +131,38 @@ typedef enum
/*@}*/
/**
+ * \name Non-normalized signed integer formats.
+ * XXX Note: these are just stand-ins for some better hardware
+ * formats TBD such as BGRA or ARGB.
+ */
+ MESA_FORMAT_RGBA_INT8,
+ MESA_FORMAT_RGBA_INT16,
+ MESA_FORMAT_RGBA_INT32,
+
+ /**
+ * \name Non-normalized unsigned integer formats.
+ */
+ MESA_FORMAT_RGBA_UINT8,
+ MESA_FORMAT_RGBA_UINT16,
+ MESA_FORMAT_RGBA_UINT32,
+
+ /* msb <------ TEXEL BITS -----------> lsb */
+ /* ---- ---- ---- ---- ---- ---- ---- ---- */
+ /**
* \name Signed fixed point texture formats.
*/
/*@{*/
- MESA_FORMAT_DUDV8,
- MESA_FORMAT_SIGNED_RGBA8888,
- MESA_FORMAT_SIGNED_RGBA8888_REV,
- MESA_FORMAT_SIGNED_RGBA_16,
+ MESA_FORMAT_DUDV8, /* DUDU DUDU DVDV DVDV */
+ MESA_FORMAT_SIGNED_R8, /* RRRR RRRR */
+ MESA_FORMAT_SIGNED_RG88, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_SIGNED_RGBX8888, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_SIGNED_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_SIGNED_RGBA8888_REV,/*AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_SIGNED_R_16, /* ushort[0]=R */
+ MESA_FORMAT_SIGNED_RG_16, /* ushort[0]=R, ushort[1]=G */
+ MESA_FORMAT_SIGNED_RGB_16, /* ushort[0]=R, ushort[1]=G, ushort[2]=B */
+ MESA_FORMAT_SIGNED_RGBA_16, /* ... */
+ MESA_FORMAT_RGBA_16, /* ... */
/*@}*/
MESA_FORMAT_COUNT
@@ -165,6 +190,9 @@ _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh);
extern GLboolean
_mesa_is_format_compressed(gl_format format);
+extern GLboolean
+_mesa_is_format_packed_depth_stencil(gl_format format);
+
extern GLenum
_mesa_get_format_color_encoding(gl_format format);
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c
index 6a85162d5..a98c09cfb 100644
--- a/mesalib/src/mesa/main/framebuffer.c
+++ b/mesalib/src/mesa/main/framebuffer.c
@@ -35,6 +35,7 @@
#include "buffers.h"
#include "context.h"
#include "depthstencil.h"
+#include "enums.h"
#include "formats.h"
#include "macros.h"
#include "mtypes.h"
@@ -74,7 +75,6 @@ compute_depth_max(struct gl_framebuffer *fb)
fb->_MRD = (GLfloat)1.0 / fb->_DepthMaxF;
}
-
/**
* Create and initialize a gl_framebuffer object.
* This is intended for creating _window_system_ framebuffers, not generic
@@ -543,7 +543,8 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
const gl_format fmt = rb->Format;
- if (baseFormat == GL_RGBA || baseFormat == GL_RGB) {
+ if (baseFormat == GL_RGBA || baseFormat == GL_RGB ||
+ baseFormat == GL_ALPHA) {
fb->Visual.redBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
fb->Visual.greenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
fb->Visual.blueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS);
@@ -610,7 +611,7 @@ _mesa_update_depth_buffer(GLcontext *ctx,
depthRb = fb->Attachment[attIndex].Renderbuffer;
- if (depthRb && depthRb->_BaseFormat == GL_DEPTH_STENCIL) {
+ if (depthRb && _mesa_is_format_packed_depth_stencil(depthRb->Format)) {
/* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_DepthBuffer
|| fb->_DepthBuffer->Wrapped != depthRb
@@ -651,7 +652,7 @@ _mesa_update_stencil_buffer(GLcontext *ctx,
stencilRb = fb->Attachment[attIndex].Renderbuffer;
- if (stencilRb && stencilRb->_BaseFormat == GL_DEPTH_STENCIL) {
+ if (stencilRb && _mesa_is_format_packed_depth_stencil(stencilRb->Format)) {
/* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_StencilBuffer
|| fb->_StencilBuffer->Wrapped != stencilRb
@@ -877,6 +878,7 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
return GL_FALSE;
}
ASSERT(_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_RED_BITS) > 0 ||
+ _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_ALPHA_BITS) > 0 ||
_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_INDEX_BITS) > 0);
break;
case GL_DEPTH:
@@ -986,6 +988,10 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
return GL_TRUE;
}
+
+/**
+ * Used to answer the GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES query.
+ */
GLenum
_mesa_get_color_read_format(GLcontext *ctx)
{
@@ -999,6 +1005,10 @@ _mesa_get_color_read_format(GLcontext *ctx)
}
}
+
+/**
+ * Used to answer the GL_IMPLEMENTATION_COLOR_READ_TYPE_OES query.
+ */
GLenum
_mesa_get_color_read_type(GLcontext *ctx)
{
@@ -1011,3 +1021,43 @@ _mesa_get_color_read_type(GLcontext *ctx)
return GL_UNSIGNED_BYTE;
}
}
+
+
+/**
+ * Print framebuffer info to stderr, for debugging.
+ */
+void
+_mesa_print_framebuffer(const struct gl_framebuffer *fb)
+{
+ GLuint i;
+
+ fprintf(stderr, "Mesa Framebuffer %u at %p\n", fb->Name, (void *) fb);
+ fprintf(stderr, " Size: %u x %u Status: %s\n", fb->Width, fb->Height,
+ _mesa_lookup_enum_by_nr(fb->_Status));
+ fprintf(stderr, " Attachments:\n");
+
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ const struct gl_renderbuffer_attachment *att = &fb->Attachment[i];
+ if (att->Type == GL_TEXTURE) {
+ const struct gl_texture_image *texImage;
+ fprintf(stderr,
+ " %2d: Texture %u, level %u, face %u, slice %u, complete %d\n",
+ i, att->Texture->Name, att->TextureLevel, att->CubeMapFace,
+ att->Zoffset, att->Complete);
+ texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ fprintf(stderr, " Size: %u x %u x %u Format %s\n",
+ texImage->Width, texImage->Height, texImage->Depth,
+ _mesa_get_format_name(texImage->TexFormat));
+ }
+ else if (att->Type == GL_RENDERBUFFER) {
+ fprintf(stderr, " %2d: Renderbuffer %u, complete %d\n",
+ i, att->Renderbuffer->Name, att->Complete);
+ fprintf(stderr, " Size: %u x %u Format %s\n",
+ att->Renderbuffer->Width, att->Renderbuffer->Height,
+ _mesa_get_format_name(att->Renderbuffer->Format));
+ }
+ else {
+ fprintf(stderr, " %2d: none\n", i);
+ }
+ }
+}
diff --git a/mesalib/src/mesa/main/framebuffer.h b/mesalib/src/mesa/main/framebuffer.h
index 960513812..2e9844282 100644
--- a/mesalib/src/mesa/main/framebuffer.h
+++ b/mesalib/src/mesa/main/framebuffer.h
@@ -26,6 +26,7 @@
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
+#include "mtypes.h"
extern struct gl_framebuffer *
_mesa_create_framebuffer(const GLvisual *visual);
@@ -91,4 +92,7 @@ _mesa_get_color_read_type(GLcontext *ctx);
extern GLenum
_mesa_get_color_read_format(GLcontext *ctx);
+extern void
+_mesa_print_framebuffer(const struct gl_framebuffer *fb);
+
#endif /* FRAMEBUFFER_H */
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index edc440091..2062134a3 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -1,11 +1,31 @@
-
-/***
- *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
- ***/
+/*
+ * Copyright (C) 2010 Brian Paul All Rights Reserved.
+ * Copyright (C) 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Kristian Høgsberg <krh@bitplanet.net>
+ */
#include "glheader.h"
#include "context.h"
#include "enable.h"
+#include "enums.h"
#include "extensions.h"
#include "get.h"
#include "macros.h"
@@ -14,10 +34,43 @@
#include "texcompress.h"
#include "framebuffer.h"
+/* This is a table driven implemetation of the glGet*v() functions.
+ * The basic idea is that most getters just look up an int somewhere
+ * in GLcontext and then convert it to a bool or float according to
+ * which of glGetIntegerv() glGetBooleanv() etc is being called.
+ * Instead of generating code to do this, we can just record the enum
+ * value and the offset into GLcontext in an array of structs. Then
+ * in glGet*(), we lookup the struct for the enum in question, and use
+ * the offset to get the int we need.
+ *
+ * Sometimes we need to look up a float, a boolean, a bit in a
+ * bitfield, a matrix or other types instead, so we need to track the
+ * type of the value in GLcontext. And sometimes the value isn't in
+ * GLcontext but in the drawbuffer, the array object, current texture
+ * unit, or maybe it's a computed value. So we need to also track
+ * where or how to find the value. Finally, we sometimes need to
+ * check that one of a number of extensions are enabled, the GL
+ * version or flush or call _mesa_update_state(). This is done by
+ * attaching optional extra information to the value description
+ * struct, it's sort of like an array of opcodes that describe extra
+ * checks or actions.
+ *
+ * Putting all this together we end up with struct value_desc below,
+ * and with a couple of macros to help, the table of struct value_desc
+ * is about as concise as the specification in the old python script.
+ */
+
+#undef CONST
#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
+#define FLOAT_TO_FIXED(F) ( ((F) * 65536.0f > INT_MAX) ? INT_MAX : \
+ ((F) * 65536.0f < INT_MIN) ? INT_MIN : \
+ (GLint) ((F) * 65536.0f) )
#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT_TO_FIXED(I) ( ((I) > SHRT_MAX) ? INT_MAX : \
+ ((I) < SHRT_MIN) ? INT_MIN : \
+ (GLint) ((I) * 65536) )
#define INT64_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
#define INT64_TO_INT(I) ( (GLint)((I > INT_MAX) ? INT_MAX : ((I < INT_MIN) ? INT_MIN : (I))) )
@@ -25,7617 +78,2285 @@
#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
#define BOOLEAN_TO_INT64(B) ( (GLint64) (B) )
#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
+#define BOOLEAN_TO_FIXED(B) ( (GLint) ((B) ? 1 : 0) << 16 )
#define ENUM_TO_INT64(E) ( (GLint64) (E) )
+#define ENUM_TO_FIXED(E) (E)
+enum value_type {
+ TYPE_INVALID,
+ TYPE_API_MASK,
+ TYPE_INT,
+ TYPE_INT_2,
+ TYPE_INT_3,
+ TYPE_INT_4,
+ TYPE_INT_N,
+ TYPE_INT64,
+ TYPE_ENUM,
+ TYPE_ENUM_2,
+ TYPE_BOOLEAN,
+ TYPE_BIT_0,
+ TYPE_BIT_1,
+ TYPE_BIT_2,
+ TYPE_BIT_3,
+ TYPE_BIT_4,
+ TYPE_BIT_5,
+ TYPE_FLOAT,
+ TYPE_FLOAT_2,
+ TYPE_FLOAT_3,
+ TYPE_FLOAT_4,
+ TYPE_FLOATN,
+ TYPE_FLOATN_2,
+ TYPE_FLOATN_3,
+ TYPE_FLOATN_4,
+ TYPE_DOUBLEN,
+ TYPE_MATRIX,
+ TYPE_MATRIX_T,
+ TYPE_CONST
+};
-/*
- * Check if named extension is enabled, if not generate error and return.
- */
-#define CHECK_EXT1(EXT1, FUNC) \
- if (!ctx->Extensions.EXT1) { \
- _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
- return; \
+enum value_location {
+ LOC_BUFFER,
+ LOC_CONTEXT,
+ LOC_ARRAY,
+ LOC_TEXUNIT,
+ LOC_CUSTOM
+};
+
+enum value_extra {
+ EXTRA_END = 0x8000,
+ EXTRA_VERSION_30,
+ EXTRA_VERSION_31,
+ EXTRA_VERSION_32,
+ EXTRA_VERSION_ES2,
+ EXTRA_NEW_BUFFERS,
+ EXTRA_VALID_DRAW_BUFFER,
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_FLUSH_CURRENT,
+};
+
+#define NO_EXTRA NULL
+#define NO_OFFSET 0
+
+struct value_desc {
+ GLenum pname;
+ GLubyte location; /**< enum value_location */
+ GLubyte type; /**< enum value_type */
+ int offset;
+ const int *extra;
+};
+
+union value {
+ GLfloat value_float;
+ GLfloat value_float_4[4];
+ GLmatrix *value_matrix;
+ GLint value_int;
+ GLint value_int_4[4];
+ GLint64 value_int64;
+ GLenum value_enum;
+
+ /* Sigh, see GL_COMPRESSED_TEXTURE_FORMATS_ARB handling */
+ struct {
+ GLint n, ints[100];
+ } value_int_n;
+ GLboolean value_bool;
+};
+
+#define BUFFER_FIELD(field, type) \
+ LOC_BUFFER, type, offsetof(struct gl_framebuffer, field)
+#define CONTEXT_FIELD(field, type) \
+ LOC_CONTEXT, type, offsetof(GLcontext, field)
+#define ARRAY_FIELD(field, type) \
+ LOC_ARRAY, type, offsetof(struct gl_array_object, field)
+#define CONST(value) \
+ LOC_CONTEXT, TYPE_CONST, value
+
+#define BUFFER_INT(field) BUFFER_FIELD(field, TYPE_INT)
+#define BUFFER_ENUM(field) BUFFER_FIELD(field, TYPE_ENUM)
+
+#define CONTEXT_INT(field) CONTEXT_FIELD(field, TYPE_INT)
+#define CONTEXT_INT2(field) CONTEXT_FIELD(field, TYPE_INT_2)
+#define CONTEXT_INT64(field) CONTEXT_FIELD(field, TYPE_INT64)
+#define CONTEXT_ENUM(field) CONTEXT_FIELD(field, TYPE_ENUM)
+#define CONTEXT_ENUM2(field) CONTEXT_FIELD(field, TYPE_ENUM_2)
+#define CONTEXT_BOOL(field) CONTEXT_FIELD(field, TYPE_BOOLEAN)
+#define CONTEXT_BIT0(field) CONTEXT_FIELD(field, TYPE_BIT_0)
+#define CONTEXT_BIT1(field) CONTEXT_FIELD(field, TYPE_BIT_1)
+#define CONTEXT_BIT2(field) CONTEXT_FIELD(field, TYPE_BIT_2)
+#define CONTEXT_BIT3(field) CONTEXT_FIELD(field, TYPE_BIT_3)
+#define CONTEXT_BIT4(field) CONTEXT_FIELD(field, TYPE_BIT_4)
+#define CONTEXT_BIT5(field) CONTEXT_FIELD(field, TYPE_BIT_5)
+#define CONTEXT_FLOAT(field) CONTEXT_FIELD(field, TYPE_FLOAT)
+#define CONTEXT_FLOAT2(field) CONTEXT_FIELD(field, TYPE_FLOAT_2)
+#define CONTEXT_FLOAT3(field) CONTEXT_FIELD(field, TYPE_FLOAT_3)
+#define CONTEXT_FLOAT4(field) CONTEXT_FIELD(field, TYPE_FLOAT_4)
+#define CONTEXT_MATRIX(field) CONTEXT_FIELD(field, TYPE_MATRIX)
+#define CONTEXT_MATRIX_T(field) CONTEXT_FIELD(field, TYPE_MATRIX_T)
+
+#define ARRAY_INT(field) ARRAY_FIELD(field, TYPE_INT)
+#define ARRAY_ENUM(field) ARRAY_FIELD(field, TYPE_ENUM)
+#define ARRAY_BOOL(field) ARRAY_FIELD(field, TYPE_BOOLEAN)
+
+#define EXT(f) \
+ offsetof(struct gl_extensions, f)
+
+#define EXTRA_EXT(e) \
+ static const int extra_##e[] = { \
+ EXT(e), EXTRA_END \
}
-/*
- * Check if either of two extensions is enabled.
+#define EXTRA_EXT2(e1, e2) \
+ static const int extra_##e1##_##e2[] = { \
+ EXT(e1), EXT(e2), EXTRA_END \
+ }
+
+/* The 'extra' mechanism is a way to specify extra checks (such as
+ * extensions or specific gl versions) or actions (flush current, new
+ * buffers) that we need to do before looking up an enum. We need to
+ * declare them all up front so we can refer to them in the value_desc
+ * structs below. */
+
+static const int extra_new_buffers[] = {
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
+static const int extra_valid_draw_buffer[] = {
+ EXTRA_VALID_DRAW_BUFFER,
+ EXTRA_END
+};
+
+static const int extra_valid_texture_unit[] = {
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_END
+};
+
+static const int extra_flush_current_valid_texture_unit[] = {
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_END
+};
+
+static const int extra_flush_current[] = {
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+static const int extra_new_buffers_OES_read_format[] = {
+ EXTRA_NEW_BUFFERS,
+ EXT(OES_read_format),
+ EXTRA_END
+};
+
+static const int extra_EXT_secondary_color_flush_current[] = {
+ EXT(EXT_secondary_color),
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+static const int extra_EXT_fog_coord_flush_current[] = {
+ EXT(EXT_fog_coord),
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+EXTRA_EXT(ARB_multitexture);
+EXTRA_EXT(ARB_texture_cube_map);
+EXTRA_EXT(MESA_texture_array);
+EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
+EXTRA_EXT(EXT_secondary_color);
+EXTRA_EXT(EXT_fog_coord);
+EXTRA_EXT(EXT_texture_lod_bias);
+EXTRA_EXT(EXT_texture_filter_anisotropic);
+EXTRA_EXT(IBM_rasterpos_clip);
+EXTRA_EXT(NV_point_sprite);
+EXTRA_EXT(SGIS_generate_mipmap);
+EXTRA_EXT(NV_vertex_program);
+EXTRA_EXT(NV_fragment_program);
+EXTRA_EXT(NV_texture_rectangle);
+EXTRA_EXT(EXT_stencil_two_side);
+EXTRA_EXT(NV_light_max_exponent);
+EXTRA_EXT(EXT_convolution);
+EXTRA_EXT(EXT_histogram);
+EXTRA_EXT(SGI_color_table);
+EXTRA_EXT(SGI_texture_color_table);
+EXTRA_EXT(EXT_depth_bounds_test);
+EXTRA_EXT(ARB_depth_clamp);
+EXTRA_EXT(ATI_fragment_shader);
+EXTRA_EXT(EXT_framebuffer_blit);
+EXTRA_EXT(ARB_shader_objects);
+EXTRA_EXT(EXT_provoking_vertex);
+EXTRA_EXT(ARB_fragment_shader);
+EXTRA_EXT(ARB_fragment_program);
+EXTRA_EXT(ARB_framebuffer_object);
+EXTRA_EXT(EXT_framebuffer_object);
+EXTRA_EXT(APPLE_vertex_array_object);
+EXTRA_EXT(ARB_seamless_cube_map);
+EXTRA_EXT(EXT_compiled_vertex_array);
+EXTRA_EXT(ARB_sync);
+EXTRA_EXT(ARB_vertex_shader);
+EXTRA_EXT(EXT_transform_feedback);
+EXTRA_EXT(ARB_transform_feedback2);
+EXTRA_EXT(EXT_pixel_buffer_object);
+EXTRA_EXT(ARB_vertex_program);
+EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
+EXTRA_EXT2(ARB_fragment_program, NV_fragment_program);
+EXTRA_EXT2(ARB_vertex_program, NV_vertex_program);
+EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
+EXTRA_EXT(ARB_vertex_buffer_object);
+EXTRA_EXT(ARB_geometry_shader4);
+
+static const int
+extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
+ EXT(ARB_vertex_program),
+ EXT(ARB_fragment_program),
+ EXT(NV_vertex_program),
+ EXTRA_END
+};
+
+static const int
+extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
+ EXT(NV_vertex_program),
+ EXT(ARB_vertex_program),
+ EXT(ARB_fragment_program),
+ EXT(NV_vertex_program),
+ EXTRA_END
+};
+
+static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END };
+static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END };
+static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END };
+
+static const int
+extra_ARB_vertex_program_version_es2[] = {
+ EXT(ARB_vertex_program),
+ EXTRA_VERSION_ES2,
+ EXTRA_END
+};
+
+#define API_OPENGL_BIT (1 << API_OPENGL)
+#define API_OPENGLES_BIT (1 << API_OPENGLES)
+#define API_OPENGLES2_BIT (1 << API_OPENGLES2)
+
+/* This is the big table describing all the enums we accept in
+ * glGet*v(). The table is partitioned into six parts: enums
+ * understood by all GL APIs (OpenGL, GLES and GLES2), enums shared
+ * between OpenGL and GLES, enums exclusive to GLES, etc for the
+ * remaining combinations. When we add the enums to the hash table in
+ * _mesa_init_get_hash(), we only add the enums for the API we're
+ * instantiating and the different sections are guarded by #if
+ * FEATURE_GL etc to make sure we only compile in the enums we may
+ * need. */
+
+static const struct value_desc values[] = {
+ /* Enums shared between OpenGL, GLES1 and GLES2 */
+ { 0, 0, TYPE_API_MASK,
+ API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGLES2_BIT, NO_EXTRA},
+ { GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers },
+ { GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA },
+ { GL_BLEND_SRC, CONTEXT_ENUM(Color.BlendSrcRGB), NO_EXTRA },
+ { GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers },
+ { GL_COLOR_CLEAR_VALUE, CONTEXT_FIELD(Color.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+ { GL_CULL_FACE, CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA },
+ { GL_CULL_FACE_MODE, CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA },
+ { GL_DEPTH_BITS, BUFFER_INT(Visual.depthBits), NO_EXTRA },
+ { GL_DEPTH_CLEAR_VALUE, CONTEXT_FIELD(Depth.Clear, TYPE_DOUBLEN), NO_EXTRA },
+ { GL_DEPTH_FUNC, CONTEXT_ENUM(Depth.Func), NO_EXTRA },
+ { GL_DEPTH_RANGE, CONTEXT_FIELD(Viewport.Near, TYPE_FLOATN_2), NO_EXTRA },
+ { GL_DEPTH_TEST, CONTEXT_BOOL(Depth.Test), NO_EXTRA },
+ { GL_DEPTH_WRITEMASK, CONTEXT_BOOL(Depth.Mask), NO_EXTRA },
+ { GL_DITHER, CONTEXT_BOOL(Color.DitherFlag), NO_EXTRA },
+ { GL_FRONT_FACE, CONTEXT_ENUM(Polygon.FrontFace), NO_EXTRA },
+ { GL_GREEN_BITS, BUFFER_INT(Visual.greenBits), extra_new_buffers },
+ { GL_LINE_WIDTH, CONTEXT_FLOAT(Line.Width), NO_EXTRA },
+ { GL_ALIASED_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidth), NO_EXTRA },
+ { GL_MAX_ELEMENTS_VERTICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
+ { GL_MAX_ELEMENTS_INDICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
+ { GL_MAX_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.MaxTextureLevels), NO_EXTRA },
+ { GL_MAX_VIEWPORT_DIMS, CONTEXT_INT2(Const.MaxViewportWidth), NO_EXTRA },
+ { GL_PACK_ALIGNMENT, CONTEXT_INT(Pack.Alignment), NO_EXTRA },
+ { GL_ALIASED_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSize), NO_EXTRA },
+ { GL_POLYGON_OFFSET_FACTOR, CONTEXT_FLOAT(Polygon.OffsetFactor ), NO_EXTRA },
+ { GL_POLYGON_OFFSET_UNITS, CONTEXT_FLOAT(Polygon.OffsetUnits ), NO_EXTRA },
+ { GL_POLYGON_OFFSET_FILL, CONTEXT_BOOL(Polygon.OffsetFill), NO_EXTRA },
+ { GL_RED_BITS, BUFFER_INT(Visual.redBits), extra_new_buffers },
+ { GL_SCISSOR_BOX, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+ { GL_SCISSOR_TEST, CONTEXT_BOOL(Scissor.Enabled), NO_EXTRA },
+ { GL_STENCIL_BITS, BUFFER_INT(Visual.stencilBits), NO_EXTRA },
+ { GL_STENCIL_CLEAR_VALUE, CONTEXT_INT(Stencil.Clear), NO_EXTRA },
+ { GL_STENCIL_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_FUNC, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_PASS_DEPTH_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_PASS_DEPTH_PASS, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_REF, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_TEST, CONTEXT_BOOL(Stencil.Enabled), NO_EXTRA },
+ { GL_STENCIL_VALUE_MASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_WRITEMASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_SUBPIXEL_BITS, CONTEXT_INT(Const.SubPixelBits), NO_EXTRA },
+ { GL_TEXTURE_BINDING_2D, LOC_CUSTOM, TYPE_INT, TEXTURE_2D_INDEX, NO_EXTRA },
+ { GL_UNPACK_ALIGNMENT, CONTEXT_INT(Unpack.Alignment), NO_EXTRA },
+ { GL_VIEWPORT, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+
+ /* GL_ARB_multitexture */
+ { GL_ACTIVE_TEXTURE_ARB,
+ LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+
+ /* Note that all the OES_* extensions require that the Mesa "struct
+ * gl_extensions" include a member with the name of the extension.
+ * That structure does not yet include OES extensions (and we're
+ * not sure whether it will). If it does, all the OES_*
+ * extensions below should mark the dependency. */
+
+ /* GL_ARB_texture_cube_map */
+ { GL_TEXTURE_BINDING_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_CUBE_INDEX, extra_ARB_texture_cube_map },
+ { GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.MaxCubeTextureLevels),
+ extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */
+
+ /* XXX: OES_blend_subtract */
+ { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.BlendSrcRGB), NO_EXTRA },
+ { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.BlendDstRGB), NO_EXTRA },
+ { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.BlendSrcA), NO_EXTRA },
+ { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.BlendDstA), NO_EXTRA },
+
+ /* GL_BLEND_EQUATION_RGB, which is what we're really after, is
+ * defined identically to GL_BLEND_EQUATION. */
+ { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.BlendEquationRGB), NO_EXTRA },
+ { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.BlendEquationA), NO_EXTRA },
+
+ /* GL_ARB_texture_compression */
+ { GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT_N, 0, NO_EXTRA },
+
+ /* GL_ARB_multisample */
+ { GL_SAMPLE_ALPHA_TO_COVERAGE_ARB,
+ CONTEXT_BOOL(Multisample.SampleAlphaToCoverage), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_ARB, CONTEXT_BOOL(Multisample.SampleCoverage), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_VALUE_ARB,
+ CONTEXT_FLOAT(Multisample.SampleCoverageValue), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_INVERT_ARB,
+ CONTEXT_BOOL(Multisample.SampleCoverageInvert), NO_EXTRA },
+ { GL_SAMPLE_BUFFERS_ARB, BUFFER_INT(Visual.sampleBuffers), NO_EXTRA },
+ { GL_SAMPLES_ARB, BUFFER_INT(Visual.samples), NO_EXTRA },
+
+ /* GL_SGIS_generate_mipmap */
+ { GL_GENERATE_MIPMAP_HINT_SGIS, CONTEXT_ENUM(Hint.GenerateMipmap),
+ extra_SGIS_generate_mipmap },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+
+ /* GL_ARB_vertex_buffer_object */
+ /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported */
+ { GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_buffer_object },
+
+ /* GL_OES_read_format */
+ { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, LOC_CUSTOM, TYPE_INT, 0,
+ extra_new_buffers_OES_read_format },
+ { GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, LOC_CUSTOM, TYPE_INT, 0,
+ extra_new_buffers_OES_read_format },
+
+ /* GL_EXT_framebuffer_object */
+ { GL_FRAMEBUFFER_BINDING_EXT, BUFFER_INT(Name),
+ extra_EXT_framebuffer_object },
+ { GL_RENDERBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_framebuffer_object },
+ { GL_MAX_RENDERBUFFER_SIZE_EXT, CONTEXT_INT(Const.MaxRenderbufferSize),
+ extra_EXT_framebuffer_object },
+
+ /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's
+ * GLSL: */
+ { GL_MAX_CLIP_PLANES, CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA },
+
+#if FEATURE_GL || FEATURE_ES1
+ /* Enums in OpenGL and GLES1 */
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT, NO_EXTRA },
+ { GL_LIGHT0, CONTEXT_BOOL(Light.Light[0].Enabled), NO_EXTRA },
+ { GL_LIGHT1, CONTEXT_BOOL(Light.Light[1].Enabled), NO_EXTRA },
+ { GL_LIGHT2, CONTEXT_BOOL(Light.Light[2].Enabled), NO_EXTRA },
+ { GL_LIGHT3, CONTEXT_BOOL(Light.Light[3].Enabled), NO_EXTRA },
+ { GL_LIGHT4, CONTEXT_BOOL(Light.Light[4].Enabled), NO_EXTRA },
+ { GL_LIGHT5, CONTEXT_BOOL(Light.Light[5].Enabled), NO_EXTRA },
+ { GL_LIGHT6, CONTEXT_BOOL(Light.Light[6].Enabled), NO_EXTRA },
+ { GL_LIGHT7, CONTEXT_BOOL(Light.Light[7].Enabled), NO_EXTRA },
+ { GL_LIGHTING, CONTEXT_BOOL(Light.Enabled), NO_EXTRA },
+ { GL_LIGHT_MODEL_AMBIENT,
+ CONTEXT_FIELD(Light.Model.Ambient[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_LIGHT_MODEL_TWO_SIDE, CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA },
+ { GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA },
+ { GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA },
+ { GL_ALPHA_TEST_REF, CONTEXT_FIELD(Color.AlphaRef, TYPE_FLOATN), NO_EXTRA },
+ { GL_BLEND_DST, CONTEXT_ENUM(Color.BlendDstRGB), NO_EXTRA },
+ { GL_CLIP_PLANE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE2, CONTEXT_BIT2(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE3, CONTEXT_BIT3(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE4, CONTEXT_BIT4(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE5, CONTEXT_BIT5(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_COLOR_MATERIAL, CONTEXT_BOOL(Light.ColorMaterialEnabled), NO_EXTRA },
+ { GL_CURRENT_COLOR,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR0][0], TYPE_FLOATN_4),
+ extra_flush_current },
+ { GL_CURRENT_NORMAL,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_NORMAL][0], TYPE_FLOATN_3),
+ extra_flush_current },
+ { GL_CURRENT_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0,
+ extra_flush_current_valid_texture_unit },
+ { GL_DISTANCE_ATTENUATION_EXT, CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA },
+ { GL_FOG, CONTEXT_BOOL(Fog.Enabled), NO_EXTRA },
+ { GL_FOG_COLOR, CONTEXT_FIELD(Fog.Color[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_FOG_DENSITY, CONTEXT_FLOAT(Fog.Density), NO_EXTRA },
+ { GL_FOG_END, CONTEXT_FLOAT(Fog.End), NO_EXTRA },
+ { GL_FOG_HINT, CONTEXT_ENUM(Hint.Fog), NO_EXTRA },
+ { GL_FOG_MODE, CONTEXT_ENUM(Fog.Mode), NO_EXTRA },
+ { GL_FOG_START, CONTEXT_FLOAT(Fog.Start), NO_EXTRA },
+ { GL_LINE_SMOOTH, CONTEXT_BOOL(Line.SmoothFlag), NO_EXTRA },
+ { GL_LINE_SMOOTH_HINT, CONTEXT_ENUM(Hint.LineSmooth), NO_EXTRA },
+ { GL_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidthAA), NO_EXTRA },
+ { GL_COLOR_LOGIC_OP, CONTEXT_BOOL(Color.ColorLogicOpEnabled), NO_EXTRA },
+ { GL_LOGIC_OP_MODE, CONTEXT_ENUM(Color.LogicOp), NO_EXTRA },
+ { GL_MATRIX_MODE, CONTEXT_ENUM(Transform.MatrixMode), NO_EXTRA },
+ { GL_MAX_MODELVIEW_STACK_DEPTH, CONST(MAX_MODELVIEW_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_PROJECTION_STACK_DEPTH, CONST(MAX_PROJECTION_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_TEXTURE_STACK_DEPTH, CONST(MAX_TEXTURE_STACK_DEPTH), NO_EXTRA },
+ { GL_MODELVIEW_MATRIX, CONTEXT_MATRIX(ModelviewMatrixStack.Top), NO_EXTRA },
+ { GL_MODELVIEW_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, ModelviewMatrixStack.Depth), NO_EXTRA },
+ { GL_NORMALIZE, CONTEXT_BOOL(Transform.Normalize), NO_EXTRA },
+ { GL_PACK_SKIP_IMAGES_EXT, CONTEXT_INT(Pack.SkipImages), NO_EXTRA },
+ { GL_PERSPECTIVE_CORRECTION_HINT, CONTEXT_ENUM(Hint.PerspectiveCorrection), NO_EXTRA },
+ { GL_POINT_SIZE, CONTEXT_FLOAT(Point.Size), NO_EXTRA },
+ { GL_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSizeAA), NO_EXTRA },
+ { GL_POINT_SMOOTH, CONTEXT_BOOL(Point.SmoothFlag), NO_EXTRA },
+ { GL_POINT_SMOOTH_HINT, CONTEXT_ENUM(Hint.PointSmooth), NO_EXTRA },
+ { GL_POINT_SIZE_MIN_EXT, CONTEXT_FLOAT(Point.MinSize), NO_EXTRA },
+ { GL_POINT_SIZE_MAX_EXT, CONTEXT_FLOAT(Point.MaxSize), NO_EXTRA },
+ { GL_POINT_FADE_THRESHOLD_SIZE_EXT, CONTEXT_FLOAT(Point.Threshold), NO_EXTRA },
+ { GL_PROJECTION_MATRIX, CONTEXT_MATRIX(ProjectionMatrixStack.Top), NO_EXTRA },
+ { GL_PROJECTION_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, ProjectionMatrixStack.Depth), NO_EXTRA },
+ { GL_RESCALE_NORMAL, CONTEXT_BOOL(Transform.RescaleNormals), NO_EXTRA },
+ { GL_SHADE_MODEL, CONTEXT_ENUM(Light.ShadeModel), NO_EXTRA },
+ { GL_TEXTURE_2D, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ { GL_TEXTURE_MATRIX, LOC_CUSTOM, TYPE_MATRIX, 0, extra_valid_texture_unit },
+ { GL_TEXTURE_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, 0,
+ extra_valid_texture_unit },
+
+ { GL_VERTEX_ARRAY, ARRAY_BOOL(Vertex.Enabled), NO_EXTRA },
+ { GL_VERTEX_ARRAY_SIZE, ARRAY_INT(Vertex.Size), NO_EXTRA },
+ { GL_VERTEX_ARRAY_TYPE, ARRAY_ENUM(Vertex.Type), NO_EXTRA },
+ { GL_VERTEX_ARRAY_STRIDE, ARRAY_INT(Vertex.Stride), NO_EXTRA },
+ { GL_NORMAL_ARRAY, ARRAY_ENUM(Normal.Enabled), NO_EXTRA },
+ { GL_NORMAL_ARRAY_TYPE, ARRAY_ENUM(Normal.Type), NO_EXTRA },
+ { GL_NORMAL_ARRAY_STRIDE, ARRAY_INT(Normal.Stride), NO_EXTRA },
+ { GL_COLOR_ARRAY, ARRAY_BOOL(Color.Enabled), NO_EXTRA },
+ { GL_COLOR_ARRAY_SIZE, ARRAY_INT(Color.Size), NO_EXTRA },
+ { GL_COLOR_ARRAY_TYPE, ARRAY_ENUM(Color.Type), NO_EXTRA },
+ { GL_COLOR_ARRAY_STRIDE, ARRAY_INT(Color.Stride), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY,
+ LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_SIZE,
+ LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Size), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_TYPE,
+ LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Type), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_STRIDE,
+ LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Stride), NO_EXTRA },
+
+ /* GL_ARB_multitexture */
+ { GL_MAX_TEXTURE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxTextureUnits), extra_ARB_multitexture },
+ { GL_CLIENT_ACTIVE_TEXTURE_ARB,
+ LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+
+ /* GL_ARB_texture_cube_map */
+ { GL_TEXTURE_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ /* S, T, and R are always set at the same time */
+ { GL_TEXTURE_GEN_STR_OES, LOC_TEXUNIT, TYPE_BIT_0,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+
+ /* GL_ARB_multisample */
+ { GL_MULTISAMPLE_ARB, CONTEXT_BOOL(Multisample.Enabled), NO_EXTRA },
+ { GL_SAMPLE_ALPHA_TO_ONE_ARB, CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_VERTEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Vertex.BufferObj), NO_EXTRA },
+ { GL_NORMAL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Normal.BufferObj), NO_EXTRA },
+ { GL_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Color.BufferObj), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+
+ /* GL_OES_point_sprite */
+ { GL_POINT_SPRITE_NV,
+ CONTEXT_BOOL(Point.PointSprite),
+ extra_NV_point_sprite_ARB_point_sprite },
+
+ /* GL_ARB_fragment_shader */
+ { GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.FragmentProgram.MaxUniformComponents),
+ extra_ARB_fragment_shader },
+
+ /* GL_ARB_vertex_shader */
+ { GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.VertexProgram.MaxUniformComponents),
+ extra_ARB_vertex_shader },
+ { GL_MAX_VARYING_FLOATS_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_shader },
+
+ /* GL_EXT_texture_lod_bias */
+ { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias),
+ extra_EXT_texture_lod_bias },
+
+ /* GL_EXT_texture_filter_anisotropic */
+ { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
+ CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy),
+ extra_EXT_texture_filter_anisotropic },
+#endif /* FEATURE_GL || FEATURE_ES1 */
+
+#if FEATURE_ES1
+ { 0, 0, TYPE_API_MASK, API_OPENGLES_BIT },
+ /* XXX: OES_matrix_get */
+ { GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES },
+ { GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES },
+ { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES },
+
+ /* OES_point_size_array */
+ { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(PointSize.Enabled, TYPE_BOOLEAN) },
+ { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(PointSize.Type, TYPE_ENUM) },
+ { GL_POINT_SIZE_ARRAY_STRIDE_OES, ARRAY_FIELD(PointSize.Stride, TYPE_INT) },
+ { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 },
+#endif /* FEATURE_ES1 */
+
+#if FEATURE_GL || FEATURE_ES2
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES2_BIT, NO_EXTRA },
+ /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's GLSL: */
+ { GL_MAX_LIGHTS, CONTEXT_INT(Const.MaxLights), NO_EXTRA },
+ { GL_MAX_TEXTURE_COORDS_ARB, /* == GL_MAX_TEXTURE_COORDS_NV */
+ CONTEXT_INT(Const.MaxTextureCoordUnits),
+ extra_ARB_fragment_program_NV_fragment_program },
+
+ /* GL_ARB_draw_buffers */
+ { GL_MAX_DRAW_BUFFERS_ARB, CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA },
+
+ { GL_BLEND_COLOR_EXT, CONTEXT_FIELD(Color.BlendColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ /* GL_ARB_fragment_program */
+ { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */
+ CONTEXT_INT(Const.MaxTextureImageUnits),
+ extra_ARB_fragment_program_NV_fragment_program },
+ { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader },
+ { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxCombinedTextureImageUnits),
+ extra_ARB_vertex_shader },
+
+ /* GL_ARB_shader_objects
+ * Actually, this token isn't part of GL_ARB_shader_objects, but is
+ * close enough for now. */
+ { GL_CURRENT_PROGRAM, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_objects },
+
+ /* OpenGL 2.0 */
+ { GL_STENCIL_BACK_FUNC, CONTEXT_ENUM(Stencil.Function[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_VALUE_MASK, CONTEXT_INT(Stencil.ValueMask[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_WRITEMASK, CONTEXT_INT(Stencil.WriteMask[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_REF, CONTEXT_INT(Stencil.Ref[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_FAIL, CONTEXT_ENUM(Stencil.FailFunc[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_PASS_DEPTH_FAIL, CONTEXT_ENUM(Stencil.ZFailFunc[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_PASS_DEPTH_PASS, CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA },
+
+ { GL_MAX_VERTEX_ATTRIBS_ARB,
+ CONTEXT_INT(Const.VertexProgram.MaxAttribs),
+ extra_ARB_vertex_program_version_es2 },
+
+ /* OES_texture_3D */
+ { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA },
+ { GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.Max3DTextureLevels), NO_EXTRA },
+
+ /* GL_ARB_fragment_program/OES_standard_derivatives */
+ { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB,
+ CONTEXT_ENUM(Hint.FragmentShaderDerivative), extra_ARB_fragment_shader },
+#endif /* FEATURE_GL || FEATURE_ES2 */
+
+#if FEATURE_ES2
+ /* Enums unique to OpenGL ES 2.0 */
+ { 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA },
+ { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.FragmentProgram.MaxUniformComponents), NO_EXTRA },
+ { GL_MAX_VARYING_VECTORS, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.MaxVarying), NO_EXTRA },
+ { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, Const.VertexProgram.MaxUniformComponents), NO_EXTRA },
+ { GL_SHADER_COMPILER, CONST(1), NO_EXTRA },
+ /* OES_get_program_binary */
+ { GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
+ { GL_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
+#endif /* FEATURE_ES2 */
+
+#if FEATURE_GL
+ /* Remaining enums are only in OpenGL */
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT, NO_EXTRA },
+ { GL_ACCUM_RED_BITS, BUFFER_INT(Visual.accumRedBits), NO_EXTRA },
+ { GL_ACCUM_GREEN_BITS, BUFFER_INT(Visual.accumGreenBits), NO_EXTRA },
+ { GL_ACCUM_BLUE_BITS, BUFFER_INT(Visual.accumBlueBits), NO_EXTRA },
+ { GL_ACCUM_ALPHA_BITS, BUFFER_INT(Visual.accumAlphaBits), NO_EXTRA },
+ { GL_ACCUM_CLEAR_VALUE, CONTEXT_FIELD(Accum.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_ALPHA_BIAS, CONTEXT_FLOAT(Pixel.AlphaBias), NO_EXTRA },
+ { GL_ALPHA_SCALE, CONTEXT_FLOAT(Pixel.AlphaScale), NO_EXTRA },
+ { GL_ATTRIB_STACK_DEPTH, CONTEXT_INT(AttribStackDepth), NO_EXTRA },
+ { GL_AUTO_NORMAL, CONTEXT_BOOL(Eval.AutoNormal), NO_EXTRA },
+ { GL_AUX_BUFFERS, BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA },
+ { GL_BLUE_BIAS, CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA },
+ { GL_BLUE_SCALE, CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA },
+ { GL_CLIENT_ATTRIB_STACK_DEPTH, CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA },
+ { GL_COLOR_MATERIAL_FACE, CONTEXT_ENUM(Light.ColorMaterialFace), NO_EXTRA },
+ { GL_COLOR_MATERIAL_PARAMETER, CONTEXT_ENUM(Light.ColorMaterialMode), NO_EXTRA },
+ { GL_CURRENT_INDEX,
+ CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]),
+ extra_flush_current },
+ { GL_CURRENT_RASTER_COLOR,
+ CONTEXT_FIELD(Current.RasterColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_CURRENT_RASTER_DISTANCE, CONTEXT_FLOAT(Current.RasterDistance), NO_EXTRA },
+ { GL_CURRENT_RASTER_INDEX, CONST(1), NO_EXTRA },
+ { GL_CURRENT_RASTER_POSITION, CONTEXT_FLOAT4(Current.RasterPos[0]), NO_EXTRA },
+ { GL_CURRENT_RASTER_SECONDARY_COLOR,
+ CONTEXT_FIELD(Current.RasterSecondaryColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_CURRENT_RASTER_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0,
+ extra_valid_texture_unit },
+ { GL_CURRENT_RASTER_POSITION_VALID, CONTEXT_BOOL(Current.RasterPosValid), NO_EXTRA },
+ { GL_DEPTH_BIAS, CONTEXT_FLOAT(Pixel.DepthBias), NO_EXTRA },
+ { GL_DEPTH_SCALE, CONTEXT_FLOAT(Pixel.DepthScale), NO_EXTRA },
+ { GL_DOUBLEBUFFER, BUFFER_INT(Visual.doubleBufferMode), NO_EXTRA },
+ { GL_DRAW_BUFFER, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA },
+ { GL_EDGE_FLAG, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ { GL_FEEDBACK_BUFFER_SIZE, CONTEXT_INT(Feedback.BufferSize), NO_EXTRA },
+ { GL_FEEDBACK_BUFFER_TYPE, CONTEXT_ENUM(Feedback.Type), NO_EXTRA },
+ { GL_FOG_INDEX, CONTEXT_FLOAT(Fog.Index), NO_EXTRA },
+ { GL_GREEN_BIAS, CONTEXT_FLOAT(Pixel.GreenBias), NO_EXTRA },
+ { GL_GREEN_SCALE, CONTEXT_FLOAT(Pixel.GreenScale), NO_EXTRA },
+ { GL_INDEX_BITS, BUFFER_INT(Visual.indexBits), extra_new_buffers },
+ { GL_INDEX_CLEAR_VALUE, CONTEXT_INT(Color.ClearIndex), NO_EXTRA },
+ { GL_INDEX_MODE, CONST(0) , NO_EXTRA},
+ { GL_INDEX_OFFSET, CONTEXT_INT(Pixel.IndexOffset), NO_EXTRA },
+ { GL_INDEX_SHIFT, CONTEXT_INT(Pixel.IndexShift), NO_EXTRA },
+ { GL_INDEX_WRITEMASK, CONTEXT_INT(Color.IndexMask), NO_EXTRA },
+ { GL_LIGHT_MODEL_COLOR_CONTROL, CONTEXT_ENUM(Light.Model.ColorControl), NO_EXTRA },
+ { GL_LIGHT_MODEL_LOCAL_VIEWER, CONTEXT_BOOL(Light.Model.LocalViewer), NO_EXTRA },
+ { GL_LINE_STIPPLE, CONTEXT_BOOL(Line.StippleFlag), NO_EXTRA },
+ { GL_LINE_STIPPLE_PATTERN, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_LINE_STIPPLE_REPEAT, CONTEXT_INT(Line.StippleFactor), NO_EXTRA },
+ { GL_LINE_WIDTH_GRANULARITY, CONTEXT_FLOAT(Const.LineWidthGranularity), NO_EXTRA },
+ { GL_LIST_BASE, CONTEXT_INT(List.ListBase), NO_EXTRA },
+ { GL_LIST_INDEX, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_LIST_MODE, LOC_CUSTOM, TYPE_ENUM, 0, NO_EXTRA },
+ { GL_INDEX_LOGIC_OP, CONTEXT_BOOL(Color.IndexLogicOpEnabled), NO_EXTRA },
+ { GL_MAP1_COLOR_4, CONTEXT_BOOL(Eval.Map1Color4), NO_EXTRA },
+ { GL_MAP1_GRID_DOMAIN, CONTEXT_FLOAT2(Eval.MapGrid1u1), NO_EXTRA },
+ { GL_MAP1_GRID_SEGMENTS, CONTEXT_INT(Eval.MapGrid1un), NO_EXTRA },
+ { GL_MAP1_INDEX, CONTEXT_BOOL(Eval.Map1Index), NO_EXTRA },
+ { GL_MAP1_NORMAL, CONTEXT_BOOL(Eval.Map1Normal), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map1TextureCoord1), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map1TextureCoord2), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map1TextureCoord3), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map1TextureCoord4), NO_EXTRA },
+ { GL_MAP1_VERTEX_3, CONTEXT_BOOL(Eval.Map1Vertex3), NO_EXTRA },
+ { GL_MAP1_VERTEX_4, CONTEXT_BOOL(Eval.Map1Vertex4), NO_EXTRA },
+ { GL_MAP2_COLOR_4, CONTEXT_BOOL(Eval.Map2Color4), NO_EXTRA },
+ { GL_MAP2_GRID_DOMAIN, LOC_CUSTOM, TYPE_FLOAT_4, 0, NO_EXTRA },
+ { GL_MAP2_GRID_SEGMENTS, CONTEXT_INT2(Eval.MapGrid2un), NO_EXTRA },
+ { GL_MAP2_INDEX, CONTEXT_BOOL(Eval.Map2Index), NO_EXTRA },
+ { GL_MAP2_NORMAL, CONTEXT_BOOL(Eval.Map2Normal), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map2TextureCoord1), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map2TextureCoord2), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map2TextureCoord3), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map2TextureCoord4), NO_EXTRA },
+ { GL_MAP2_VERTEX_3, CONTEXT_BOOL(Eval.Map2Vertex3), NO_EXTRA },
+ { GL_MAP2_VERTEX_4, CONTEXT_BOOL(Eval.Map2Vertex4), NO_EXTRA },
+ { GL_MAP_COLOR, CONTEXT_BOOL(Pixel.MapColorFlag), NO_EXTRA },
+ { GL_MAP_STENCIL, CONTEXT_BOOL(Pixel.MapStencilFlag), NO_EXTRA },
+ { GL_MAX_ATTRIB_STACK_DEPTH, CONST(MAX_ATTRIB_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, CONST(MAX_CLIENT_ATTRIB_STACK_DEPTH), NO_EXTRA },
+
+ { GL_MAX_EVAL_ORDER, CONST(MAX_EVAL_ORDER), NO_EXTRA },
+ { GL_MAX_LIST_NESTING, CONST(MAX_LIST_NESTING), NO_EXTRA },
+ { GL_MAX_NAME_STACK_DEPTH, CONST(MAX_NAME_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_PIXEL_MAP_TABLE, CONST(MAX_PIXEL_MAP_TABLE), NO_EXTRA },
+ { GL_NAME_STACK_DEPTH, CONTEXT_INT(Select.NameStackDepth), NO_EXTRA },
+ { GL_PACK_LSB_FIRST, CONTEXT_BOOL(Pack.LsbFirst), NO_EXTRA },
+ { GL_PACK_ROW_LENGTH, CONTEXT_INT(Pack.RowLength), NO_EXTRA },
+ { GL_PACK_SKIP_PIXELS, CONTEXT_INT(Pack.SkipPixels), NO_EXTRA },
+ { GL_PACK_SKIP_ROWS, CONTEXT_INT(Pack.SkipRows), NO_EXTRA },
+ { GL_PACK_SWAP_BYTES, CONTEXT_BOOL(Pack.SwapBytes), NO_EXTRA },
+ { GL_PACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Pack.ImageHeight), NO_EXTRA },
+ { GL_PACK_INVERT_MESA, CONTEXT_BOOL(Pack.Invert), NO_EXTRA },
+ { GL_PIXEL_MAP_A_TO_A_SIZE, CONTEXT_INT(PixelMaps.AtoA.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_B_TO_B_SIZE, CONTEXT_INT(PixelMaps.BtoB.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_G_TO_G_SIZE, CONTEXT_INT(PixelMaps.GtoG.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_A_SIZE, CONTEXT_INT(PixelMaps.ItoA.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_B_SIZE, CONTEXT_INT(PixelMaps.ItoB.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_G_SIZE, CONTEXT_INT(PixelMaps.ItoG.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_I_SIZE, CONTEXT_INT(PixelMaps.ItoI.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_R_SIZE, CONTEXT_INT(PixelMaps.ItoR.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_R_TO_R_SIZE, CONTEXT_INT(PixelMaps.RtoR.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_S_TO_S_SIZE, CONTEXT_INT(PixelMaps.StoS.Size), NO_EXTRA },
+ { GL_POINT_SIZE_GRANULARITY, CONTEXT_FLOAT(Const.PointSizeGranularity), NO_EXTRA },
+ { GL_POLYGON_MODE, CONTEXT_ENUM2(Polygon.FrontMode), NO_EXTRA },
+ { GL_POLYGON_OFFSET_BIAS_EXT, CONTEXT_FLOAT(Polygon.OffsetUnits), NO_EXTRA },
+ { GL_POLYGON_OFFSET_POINT, CONTEXT_BOOL(Polygon.OffsetPoint), NO_EXTRA },
+ { GL_POLYGON_OFFSET_LINE, CONTEXT_BOOL(Polygon.OffsetLine), NO_EXTRA },
+ { GL_POLYGON_SMOOTH, CONTEXT_BOOL(Polygon.SmoothFlag), NO_EXTRA },
+ { GL_POLYGON_SMOOTH_HINT, CONTEXT_ENUM(Hint.PolygonSmooth), NO_EXTRA },
+ { GL_POLYGON_STIPPLE, CONTEXT_BOOL(Polygon.StippleFlag), NO_EXTRA },
+ { GL_READ_BUFFER, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_RED_BIAS, CONTEXT_FLOAT(Pixel.RedBias), NO_EXTRA },
+ { GL_RED_SCALE, CONTEXT_FLOAT(Pixel.RedScale), NO_EXTRA },
+ { GL_RENDER_MODE, CONTEXT_ENUM(RenderMode), NO_EXTRA },
+ { GL_RGBA_MODE, CONST(1), NO_EXTRA },
+ { GL_SELECTION_BUFFER_SIZE, CONTEXT_INT(Select.BufferSize), NO_EXTRA },
+ { GL_SHARED_TEXTURE_PALETTE_EXT, CONTEXT_BOOL(Texture.SharedPalette), NO_EXTRA },
+
+ { GL_STEREO, BUFFER_INT(Visual.stereoMode), NO_EXTRA },
+
+ { GL_TEXTURE_1D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_3D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_1D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_2D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+
+ { GL_TEXTURE_BINDING_1D, LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA },
+ { GL_TEXTURE_BINDING_1D_ARRAY, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array },
+ { GL_TEXTURE_BINDING_2D_ARRAY, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array },
+ { GL_MAX_ARRAY_TEXTURE_LAYERS_EXT,
+ CONTEXT_INT(Const.MaxArrayTextureLayers), extra_MESA_texture_array },
+
+ { GL_TEXTURE_GEN_S, LOC_TEXUNIT, TYPE_BIT_0,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_T, LOC_TEXUNIT, TYPE_BIT_1,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_R, LOC_TEXUNIT, TYPE_BIT_2,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_Q, LOC_TEXUNIT, TYPE_BIT_3,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_UNPACK_LSB_FIRST, CONTEXT_BOOL(Unpack.LsbFirst), NO_EXTRA },
+ { GL_UNPACK_ROW_LENGTH, CONTEXT_INT(Unpack.RowLength), NO_EXTRA },
+ { GL_UNPACK_SKIP_PIXELS, CONTEXT_INT(Unpack.SkipPixels), NO_EXTRA },
+ { GL_UNPACK_SKIP_ROWS, CONTEXT_INT(Unpack.SkipRows), NO_EXTRA },
+ { GL_UNPACK_SWAP_BYTES, CONTEXT_BOOL(Unpack.SwapBytes), NO_EXTRA },
+ { GL_UNPACK_SKIP_IMAGES_EXT, CONTEXT_INT(Unpack.SkipImages), NO_EXTRA },
+ { GL_UNPACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Unpack.ImageHeight), NO_EXTRA },
+ { GL_UNPACK_CLIENT_STORAGE_APPLE, CONTEXT_BOOL(Unpack.ClientStorage), NO_EXTRA },
+ { GL_ZOOM_X, CONTEXT_FLOAT(Pixel.ZoomX), NO_EXTRA },
+ { GL_ZOOM_Y, CONTEXT_FLOAT(Pixel.ZoomY), NO_EXTRA },
+
+ /* Vertex arrays */
+ { GL_VERTEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_NORMAL_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_COLOR_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_INDEX_ARRAY, ARRAY_BOOL(Index.Enabled), NO_EXTRA },
+ { GL_INDEX_ARRAY_TYPE, ARRAY_ENUM(Index.Type), NO_EXTRA },
+ { GL_INDEX_ARRAY_STRIDE, ARRAY_INT(Index.Stride), NO_EXTRA },
+ { GL_INDEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY, ARRAY_BOOL(EdgeFlag.Enabled), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_STRIDE, ARRAY_INT(EdgeFlag.Stride), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+
+ /* GL_ARB_texture_compression */
+ { GL_TEXTURE_COMPRESSION_HINT_ARB, CONTEXT_INT(Hint.TextureCompression), NO_EXTRA },
+
+ /* GL_EXT_compiled_vertex_array */
+ { GL_ARRAY_ELEMENT_LOCK_FIRST_EXT, CONTEXT_INT(Array.LockFirst),
+ extra_EXT_compiled_vertex_array },
+ { GL_ARRAY_ELEMENT_LOCK_COUNT_EXT, CONTEXT_INT(Array.LockCount),
+ extra_EXT_compiled_vertex_array },
+
+ /* GL_ARB_transpose_matrix */
+ { GL_TRANSPOSE_COLOR_MATRIX_ARB, CONTEXT_MATRIX_T(ColorMatrixStack.Top), NO_EXTRA },
+ { GL_TRANSPOSE_MODELVIEW_MATRIX_ARB,
+ CONTEXT_MATRIX_T(ModelviewMatrixStack), NO_EXTRA },
+ { GL_TRANSPOSE_PROJECTION_MATRIX_ARB,
+ CONTEXT_MATRIX_T(ProjectionMatrixStack.Top), NO_EXTRA },
+ { GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA },
+
+ /* GL_SGI_color_matrix (also in 1.2 imaging) */
+ { GL_COLOR_MATRIX_SGI, CONTEXT_MATRIX(ColorMatrixStack.Top), NO_EXTRA },
+ { GL_COLOR_MATRIX_STACK_DEPTH_SGI, LOC_CUSTOM, TYPE_INT,
+ offsetof(GLcontext, ColorMatrixStack.Depth), NO_EXTRA },
+ { GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI,
+ CONST(MAX_COLOR_STACK_DEPTH), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_RED_SCALE_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixScale[0]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixScale[1]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixScale[2]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixScale[3]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_RED_BIAS_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixBias[0]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixBias[1]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixBias[2]), NO_EXTRA },
+ { GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI,
+ CONTEXT_FLOAT(Pixel.PostColorMatrixBias[3]), NO_EXTRA },
+
+ /* GL_EXT_convolution (also in 1.2 imaging) */
+ { GL_CONVOLUTION_1D_EXT, CONTEXT_BOOL(Pixel.Convolution1DEnabled),
+ extra_EXT_convolution },
+ { GL_CONVOLUTION_2D_EXT, CONTEXT_BOOL(Pixel.Convolution2DEnabled),
+ extra_EXT_convolution },
+ { GL_SEPARABLE_2D_EXT, CONTEXT_BOOL(Pixel.Separable2DEnabled),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_RED_SCALE_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionScale[0]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_GREEN_SCALE_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionScale[1]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_BLUE_SCALE_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionScale[2]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_ALPHA_SCALE_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionScale[3]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_RED_BIAS_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionBias[0]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_GREEN_BIAS_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionBias[1]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_BLUE_BIAS_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionBias[2]),
+ extra_EXT_convolution },
+ { GL_POST_CONVOLUTION_ALPHA_BIAS_EXT,
+ CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]),
+ extra_EXT_convolution },
+
+ /* GL_EXT_histogram / GL_ARB_imaging */
+ { GL_HISTOGRAM, CONTEXT_BOOL(Pixel.HistogramEnabled),
+ extra_EXT_histogram },
+ { GL_MINMAX, CONTEXT_BOOL(Pixel.MinMaxEnabled), extra_EXT_histogram },
+
+ /* GL_SGI_color_table / GL_ARB_imaging */
+ { GL_COLOR_TABLE_SGI,
+ CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]),
+ extra_SGI_color_table },
+ { GL_POST_CONVOLUTION_COLOR_TABLE_SGI,
+ CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]),
+ extra_SGI_color_table },
+ { GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI,
+ CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]),
+ extra_SGI_color_table },
+
+ /* GL_SGI_texture_color_table */
+ { GL_TEXTURE_COLOR_TABLE_SGI, LOC_TEXUNIT, TYPE_BOOLEAN,
+ offsetof(struct gl_texture_unit, ColorTableEnabled),
+ extra_SGI_texture_color_table },
+
+ /* GL_EXT_secondary_color */
+ { GL_COLOR_SUM_EXT, CONTEXT_BOOL(Fog.ColorSumEnabled),
+ extra_EXT_secondary_color_ARB_vertex_program },
+ { GL_CURRENT_SECONDARY_COLOR_EXT,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4),
+ extra_EXT_secondary_color_flush_current },
+ { GL_SECONDARY_COLOR_ARRAY_EXT, ARRAY_BOOL(SecondaryColor.Enabled),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_TYPE_EXT, ARRAY_ENUM(SecondaryColor.Type),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT, ARRAY_INT(SecondaryColor.Stride),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_SIZE_EXT, ARRAY_INT(SecondaryColor.Size),
+ extra_EXT_secondary_color },
+
+ /* GL_EXT_fog_coord */
+ { GL_CURRENT_FOG_COORDINATE_EXT,
+ CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]),
+ extra_EXT_fog_coord_flush_current },
+ { GL_FOG_COORDINATE_ARRAY_EXT, ARRAY_BOOL(FogCoord.Enabled),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_ARRAY_TYPE_EXT, ARRAY_ENUM(FogCoord.Type),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_ARRAY_STRIDE_EXT, ARRAY_INT(FogCoord.Stride),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_SOURCE_EXT, CONTEXT_ENUM(Fog.FogCoordinateSource),
+ extra_EXT_fog_coord },
+
+ /* GL_IBM_rasterpos_clip */
+ { GL_RASTER_POSITION_UNCLIPPED_IBM,
+ CONTEXT_BOOL(Transform.RasterPositionUnclipped),
+ extra_IBM_rasterpos_clip },
+
+ /* GL_NV_point_sprite */
+ { GL_POINT_SPRITE_R_MODE_NV,
+ CONTEXT_ENUM(Point.SpriteRMode), extra_NV_point_sprite },
+ { GL_POINT_SPRITE_COORD_ORIGIN, CONTEXT_ENUM(Point.SpriteOrigin),
+ extra_NV_point_sprite_ARB_point_sprite },
+
+ /* GL_NV_vertex_program */
+ { GL_VERTEX_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0,
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY0_NV, ARRAY_BOOL(VertexAttrib[0].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY1_NV, ARRAY_BOOL(VertexAttrib[1].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY2_NV, ARRAY_BOOL(VertexAttrib[2].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY3_NV, ARRAY_BOOL(VertexAttrib[3].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY4_NV, ARRAY_BOOL(VertexAttrib[4].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY5_NV, ARRAY_BOOL(VertexAttrib[5].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY6_NV, ARRAY_BOOL(VertexAttrib[6].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY7_NV, ARRAY_BOOL(VertexAttrib[7].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY8_NV, ARRAY_BOOL(VertexAttrib[8].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY9_NV, ARRAY_BOOL(VertexAttrib[9].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY10_NV, ARRAY_BOOL(VertexAttrib[10].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY11_NV, ARRAY_BOOL(VertexAttrib[11].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY12_NV, ARRAY_BOOL(VertexAttrib[12].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY13_NV, ARRAY_BOOL(VertexAttrib[13].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY14_NV, ARRAY_BOOL(VertexAttrib[14].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY15_NV, ARRAY_BOOL(VertexAttrib[15].Enabled),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB0_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[0]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB1_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[1]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB2_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[2]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB3_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[3]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB4_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[4]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB5_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[5]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB6_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[6]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB7_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[7]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB8_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[8]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB9_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[9]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB10_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[10]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB11_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[11]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB12_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[12]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB13_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[13]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB14_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[14]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB15_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[15]),
+ extra_NV_vertex_program },
+
+ /* GL_NV_fragment_program */
+ { GL_FRAGMENT_PROGRAM_NV, CONTEXT_BOOL(FragmentProgram.Enabled),
+ extra_NV_fragment_program },
+ { GL_FRAGMENT_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0,
+ extra_NV_fragment_program },
+ { GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV,
+ CONST(MAX_NV_FRAGMENT_PROGRAM_PARAMS),
+ extra_NV_fragment_program },
+
+ /* GL_NV_texture_rectangle */
+ { GL_TEXTURE_RECTANGLE_NV,
+ LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle },
+ { GL_TEXTURE_BINDING_RECTANGLE_NV,
+ LOC_CUSTOM, TYPE_INT, TEXTURE_RECT_INDEX, extra_NV_texture_rectangle },
+ { GL_MAX_RECTANGLE_TEXTURE_SIZE_NV,
+ CONTEXT_INT(Const.MaxTextureRectSize), extra_NV_texture_rectangle },
+
+ /* GL_EXT_stencil_two_side */
+ { GL_STENCIL_TEST_TWO_SIDE_EXT, CONTEXT_BOOL(Stencil.TestTwoSide),
+ extra_EXT_stencil_two_side },
+ { GL_ACTIVE_STENCIL_FACE_EXT, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+
+ /* GL_NV_light_max_exponent */
+ { GL_MAX_SHININESS_NV, CONTEXT_FLOAT(Const.MaxShininess),
+ extra_NV_light_max_exponent },
+ { GL_MAX_SPOT_EXPONENT_NV, CONTEXT_FLOAT(Const.MaxSpotExponent),
+ extra_NV_light_max_exponent },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Index.BufferObj), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, EdgeFlag.BufferObj), NO_EXTRA },
+ { GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, SecondaryColor.BufferObj), NO_EXTRA },
+ { GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, FogCoord.BufferObj), NO_EXTRA },
+
+ /* GL_EXT_pixel_buffer_object */
+ { GL_PIXEL_PACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_pixel_buffer_object },
+ { GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_pixel_buffer_object },
+
+ /* GL_ARB_vertex_program */
+ { GL_VERTEX_PROGRAM_ARB, /* == GL_VERTEX_PROGRAM_NV */
+ CONTEXT_BOOL(VertexProgram.Enabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_VERTEX_PROGRAM_POINT_SIZE_ARB, /* == GL_VERTEX_PROGRAM_POINT_SIZE_NV*/
+ CONTEXT_BOOL(VertexProgram.PointSizeEnabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_VERTEX_PROGRAM_TWO_SIDE_ARB, /* == GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ CONTEXT_BOOL(VertexProgram.TwoSideEnabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB, /* == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ CONTEXT_INT(Const.MaxProgramMatrixStackDepth),
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_MAX_PROGRAM_MATRICES_ARB, /* == GL_MAX_TRACK_MATRICES_NV */
+ CONTEXT_INT(Const.MaxProgramMatrices),
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_CURRENT_MATRIX_STACK_DEPTH_ARB, /* == GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+
+ { GL_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */
+ LOC_CUSTOM, TYPE_MATRIX, 0,
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_TRANSPOSE_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */
+ LOC_CUSTOM, TYPE_MATRIX, 0,
+ extra_ARB_vertex_program_ARB_fragment_program },
+
+ { GL_PROGRAM_ERROR_POSITION_ARB, /* == GL_PROGRAM_ERROR_POSITION_NV */
+ CONTEXT_INT(Program.ErrorPos),
+ extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+
+ /* GL_ARB_fragment_program */
+ { GL_FRAGMENT_PROGRAM_ARB, CONTEXT_BOOL(FragmentProgram.Enabled),
+ extra_ARB_fragment_program },
+
+ /* GL_EXT_depth_bounds_test */
+ { GL_DEPTH_BOUNDS_TEST_EXT, CONTEXT_BOOL(Depth.BoundsTest),
+ extra_EXT_depth_bounds_test },
+ { GL_DEPTH_BOUNDS_EXT, CONTEXT_FLOAT2(Depth.BoundsMin),
+ extra_EXT_depth_bounds_test },
+
+ /* GL_ARB_depth_clamp*/
+ { GL_DEPTH_CLAMP, CONTEXT_BOOL(Transform.DepthClamp),
+ extra_ARB_depth_clamp },
+
+ /* GL_ARB_draw_buffers */
+ { GL_DRAW_BUFFER0_ARB, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA },
+ { GL_DRAW_BUFFER1_ARB, BUFFER_ENUM(ColorDrawBuffer[1]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER2_ARB, BUFFER_ENUM(ColorDrawBuffer[2]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER3_ARB, BUFFER_ENUM(ColorDrawBuffer[3]),
+ extra_valid_draw_buffer },
+
+ /* GL_ATI_fragment_shader */
+ { GL_NUM_FRAGMENT_REGISTERS_ATI, CONST(6), extra_ATI_fragment_shader },
+ { GL_NUM_FRAGMENT_CONSTANTS_ATI, CONST(8), extra_ATI_fragment_shader },
+ { GL_NUM_PASSES_ATI, CONST(2), extra_ATI_fragment_shader },
+ { GL_NUM_INSTRUCTIONS_PER_PASS_ATI, CONST(8), extra_ATI_fragment_shader },
+ { GL_NUM_INSTRUCTIONS_TOTAL_ATI, CONST(16), extra_ATI_fragment_shader },
+ { GL_COLOR_ALPHA_PAIRING_ATI, CONST(GL_TRUE), extra_ATI_fragment_shader },
+ { GL_NUM_LOOPBACK_COMPONENTS_ATI, CONST(3), extra_ATI_fragment_shader },
+ { GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI,
+ CONST(3), extra_ATI_fragment_shader },
+
+ /* GL_EXT_framebuffer_object */
+ { GL_MAX_COLOR_ATTACHMENTS_EXT, CONTEXT_INT(Const.MaxColorAttachments),
+ extra_EXT_framebuffer_object },
+
+ /* GL_EXT_framebuffer_blit
+ * NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT */
+ { GL_READ_FRAMEBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_framebuffer_blit },
+
+ /* GL_EXT_provoking_vertex */
+ { GL_PROVOKING_VERTEX_EXT,
+ CONTEXT_BOOL(Light.ProvokingVertex), extra_EXT_provoking_vertex },
+ { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT,
+ CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention),
+ extra_EXT_provoking_vertex },
+
+ /* GL_ARB_framebuffer_object */
+ { GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples),
+ extra_ARB_framebuffer_object },
+
+ /* GL_APPLE_vertex_array_object */
+ { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name),
+ extra_APPLE_vertex_array_object },
+
+ /* GL_ARB_seamless_cube_map */
+ { GL_TEXTURE_CUBE_MAP_SEAMLESS,
+ CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map },
+
+ /* GL_ARB_sync */
+ { GL_MAX_SERVER_WAIT_TIMEOUT,
+ CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync },
+
+ /* GL_EXT_transform_feedback */
+ { GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_transform_feedback },
+ { GL_RASTERIZER_DISCARD, CONTEXT_BOOL(TransformFeedback.RasterDiscard),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS,
+ CONTEXT_INT(Const.MaxTransformFeedbackInterleavedComponents),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
+ CONTEXT_INT(Const.MaxTransformFeedbackSeparateAttribs),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS,
+ CONTEXT_INT(Const.MaxTransformFeedbackSeparateComponents),
+ extra_EXT_transform_feedback },
+
+ /* GL_ARB_transform_feedback2 */
+ { GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, LOC_CUSTOM, TYPE_BOOLEAN, 0,
+ extra_ARB_transform_feedback2 },
+ { GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, LOC_CUSTOM, TYPE_BOOLEAN, 0,
+ extra_ARB_transform_feedback2 },
+ { GL_TRANSFORM_FEEDBACK_BINDING, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_transform_feedback2 },
+
+ /* GL_ARB_geometry_shader4 */
+ { GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxGeometryTextureImageUnits),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxGeometryOutputVertices),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxGeometryTotalOutputComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxGeometryUniformComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxGeometryVaryingComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_VERTEX_VARYING_COMPONENTS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxVertexVaryingComponents),
+ extra_ARB_geometry_shader4 },
+
+ /* GL 3.0 */
+ { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 },
+ { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 },
+ { GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 },
+ { GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 },
+
+ /* GL 3.1 */
+ { GL_PRIMITIVE_RESTART, CONTEXT_BOOL(Array.PrimitiveRestart),
+ extra_version_31 },
+ { GL_PRIMITIVE_RESTART_INDEX, CONTEXT_INT(Array.RestartIndex),
+ extra_version_31 },
+
+ /* GL 3.2 */
+ { GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask),
+ extra_version_32 },
+#endif /* FEATURE_GL */
+};
+
+/* All we need now is a way to look up the value struct from the enum.
+ * The code generated by gcc for the old generated big switch
+ * statement is a big, balanced, open coded if/else tree, essentially
+ * an unrolled binary search. It would be natural to sort the new
+ * enum table and use bsearch(), but we will use a read-only hash
+ * table instead. bsearch() has a nice guaranteed worst case
+ * performance, but we're also guaranteed to hit that worst case
+ * (log2(n) iterations) for about half the enums. Instead, using an
+ * open addressing hash table, we can find the enum on the first try
+ * for 80% of the enums, 1 collision for 10% and never more than 5
+ * collisions for any enum (typical numbers). And the code is very
+ * simple, even though it feels a little magic. */
+
+static unsigned short table[1024];
+static const int prime_factor = 89, prime_step = 281;
+
+#ifdef GET_DEBUG
+static void
+print_table_stats(void)
+{
+ int i, j, collisions[11], count, hash, mask;
+ const struct value_desc *d;
+
+ count = 0;
+ mask = Elements(table) - 1;
+ memset(collisions, 0, sizeof collisions);
+
+ for (i = 0; i < Elements(table); i++) {
+ if (!table[i])
+ continue;
+ count++;
+ d = &values[table[i]];
+ hash = (d->pname * prime_factor);
+ j = 0;
+ while (1) {
+ if (values[table[hash & mask]].pname == d->pname)
+ break;
+ hash += prime_step;
+ j++;
+ }
+
+ if (j < 10)
+ collisions[j]++;
+ else
+ collisions[10]++;
+ }
+
+ printf("number of enums: %d (total %d)\n", count, Elements(values));
+ for (i = 0; i < Elements(collisions) - 1; i++)
+ if (collisions[i] > 0)
+ printf(" %d enums with %d %scollisions\n",
+ collisions[i], i, i == 10 ? "or more " : "");
+}
+#endif
+
+/**
+ * Initialize the enum hash for a given API
+ *
+ * This is called from one_time_init() to insert the enum values that
+ * are valid for the API in question into the enum hash table.
+ *
+ * \param the current context, for determining the API in question
*/
-#define CHECK_EXT2(EXT1, EXT2, FUNC) \
- if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
- _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
- return; \
+void _mesa_init_get_hash(GLcontext *ctx)
+{
+ int i, hash, index, mask;
+ int api_mask = 0, api_bit;
+
+ mask = Elements(table) - 1;
+ api_bit = 1 << ctx->API;
+
+ for (i = 0; i < Elements(values); i++) {
+ if (values[i].type == TYPE_API_MASK) {
+ api_mask = values[i].offset;
+ continue;
+ }
+ if (!(api_mask & api_bit))
+ continue;
+
+ hash = (values[i].pname * prime_factor) & mask;
+ while (1) {
+ index = hash & mask;
+ if (!table[index]) {
+ table[index] = i;
+ break;
+ }
+ hash += prime_step;
+ }
}
-/*
- * Check if either of three extensions is enabled.
+#ifdef GET_DEBUG
+ print_table_stats();
+#endif
+}
+
+/**
+ * Handle irregular enums
+ *
+ * Some values don't conform to the "well-known type at context
+ * pointer + offset" pattern, so we have this function to catch all
+ * the corner cases. Typically, it's a computed value or a one-off
+ * pointer to a custom struct or something.
+ *
+ * In this case we can't return a pointer to the value, so we'll have
+ * to use the temporary variable 'v' declared back in the calling
+ * glGet*v() function to store the result.
+ *
+ * \param ctx the current context
+ * \param d the struct value_desc that describes the enum
+ * \param v pointer to the tmp declared in the calling glGet*v() function
*/
-#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
- if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
- !ctx->Extensions.EXT3) { \
- _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
- return; \
+static void
+find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v)
+{
+ struct gl_buffer_object *buffer_obj;
+ struct gl_client_array *array;
+ GLuint unit, *p;
+
+ switch (d->pname) {
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_3D:
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_RECTANGLE_NV:
+ v->value_bool = _mesa_IsEnabled(d->pname);
+ break;
+
+ case GL_LINE_STIPPLE_PATTERN:
+ /* This is the only GLushort, special case it here by promoting
+ * to an int rather than introducing a new type. */
+ v->value_int = ctx->Line.StipplePattern;
+ break;
+
+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_float_4[0] = ctx->Current.RasterTexCoords[unit][0];
+ v->value_float_4[1] = ctx->Current.RasterTexCoords[unit][1];
+ v->value_float_4[2] = ctx->Current.RasterTexCoords[unit][2];
+ v->value_float_4[3] = ctx->Current.RasterTexCoords[unit][3];
+ break;
+
+ case GL_CURRENT_TEXTURE_COORDS:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_float_4[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0];
+ v->value_float_4[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1];
+ v->value_float_4[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2];
+ v->value_float_4[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3];
+ break;
+
+ case GL_COLOR_WRITEMASK:
+ v->value_int_4[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0;
+ v->value_int_4[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0;
+ v->value_int_4[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0;
+ v->value_int_4[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0;
+ break;
+
+ case GL_EDGE_FLAG:
+ v->value_bool = ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0;
+ break;
+
+ case GL_READ_BUFFER:
+ v->value_enum = ctx->ReadBuffer->ColorReadBuffer;
+ break;
+
+ case GL_MAP2_GRID_DOMAIN:
+ v->value_float_4[0] = ctx->Eval.MapGrid2u1;
+ v->value_float_4[1] = ctx->Eval.MapGrid2u2;
+ v->value_float_4[2] = ctx->Eval.MapGrid2v1;
+ v->value_float_4[3] = ctx->Eval.MapGrid2v2;
+ break;
+
+ case GL_TEXTURE_STACK_DEPTH:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int = ctx->TextureMatrixStack[unit].Depth + 1;
+ break;
+ case GL_TEXTURE_MATRIX:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_matrix = ctx->TextureMatrixStack[unit].Top;
+ break;
+
+ case GL_TEXTURE_COORD_ARRAY:
+ case GL_TEXTURE_COORD_ARRAY_SIZE:
+ case GL_TEXTURE_COORD_ARRAY_TYPE:
+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
+ array = &ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture];
+ v->value_int = *(GLuint *) ((char *) array + d->offset);
+ break;
+
+ case GL_ACTIVE_TEXTURE_ARB:
+ v->value_int = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
+ break;
+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
+ v->value_int = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
+ break;
+
+ case GL_MODELVIEW_STACK_DEPTH:
+ case GL_PROJECTION_STACK_DEPTH:
+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
+ v->value_int = *(GLint *) ((char *) ctx + d->offset) + 1;
+ break;
+
+ case GL_MAX_TEXTURE_SIZE:
+ case GL_MAX_3D_TEXTURE_SIZE:
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ p = (GLuint *) ((char *) ctx + d->offset);
+ v->value_int = 1 << (*p - 1);
+ break;
+
+ case GL_SCISSOR_BOX:
+ v->value_int_4[0] = ctx->Scissor.X;
+ v->value_int_4[1] = ctx->Scissor.Y;
+ v->value_int_4[2] = ctx->Scissor.Width;
+ v->value_int_4[3] = ctx->Scissor.Height;
+ break;
+
+ case GL_LIST_INDEX:
+ v->value_int =
+ ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0;
+ break;
+ case GL_LIST_MODE:
+ if (!ctx->CompileFlag)
+ v->value_enum = 0;
+ else if (ctx->ExecuteFlag)
+ v->value_enum = GL_COMPILE_AND_EXECUTE;
+ else
+ v->value_enum = GL_COMPILE;
+ break;
+
+ case GL_VIEWPORT:
+ v->value_int_4[0] = ctx->Viewport.X;
+ v->value_int_4[1] = ctx->Viewport.Y;
+ v->value_int_4[2] = ctx->Viewport.Width;
+ v->value_int_4[3] = ctx->Viewport.Height;
+ break;
+
+ case GL_ACTIVE_STENCIL_FACE_EXT:
+ v->value_enum = ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT;
+ break;
+
+ case GL_STENCIL_FAIL:
+ v->value_enum = ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_FUNC:
+ v->value_enum = ctx->Stencil.Function[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_PASS_DEPTH_FAIL:
+ v->value_enum = ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_PASS_DEPTH_PASS:
+ v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_REF:
+ v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_VALUE_MASK:
+ v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_WRITEMASK:
+ v->value_int = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
+ break;
+
+ case GL_NUM_EXTENSIONS:
+ v->value_int = _mesa_get_extension_count(ctx);
+ break;
+
+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
+ v->value_int = _mesa_get_color_read_type(ctx);
+ break;
+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
+ v->value_int = _mesa_get_color_read_format(ctx);
+ break;
+
+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+ v->value_int = ctx->CurrentStack->Depth + 1;
+ break;
+ case GL_CURRENT_MATRIX_ARB:
+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+ v->value_matrix = ctx->CurrentStack->Top;
+ break;
+
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ v->value_int = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ v->value_int_n.n =
+ _mesa_get_compressed_formats(ctx, v->value_int_n.ints, GL_FALSE);
+ ASSERT(v->value_int_n.n <= 100);
+ break;
+
+ case GL_MAX_VARYING_FLOATS_ARB:
+ v->value_int = ctx->Const.MaxVarying * 4;
+ break;
+
+ /* Various object names */
+
+ case GL_TEXTURE_BINDING_1D:
+ case GL_TEXTURE_BINDING_2D:
+ case GL_TEXTURE_BINDING_3D:
+ case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
+ case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int =
+ ctx->Texture.Unit[unit].CurrentTex[d->offset]->Name;
+ break;
+
+ /* GL_ARB_vertex_buffer_object */
+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+ buffer_obj = (struct gl_buffer_object *)
+ ((char *) ctx->Array.ArrayObj + d->offset);
+ v->value_int = buffer_obj->Name;
+ break;
+ case GL_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int = ctx->Array.ArrayBufferObj->Name;
+ break;
+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int =
+ ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+ break;
+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int = ctx->Array.ElementArrayBufferObj->Name;
+ break;
+
+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
+ v->value_int =
+ ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
+ break;
+ case GL_VERTEX_PROGRAM_BINDING_NV:
+ v->value_int =
+ ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0;
+ break;
+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
+ v->value_int = ctx->Pack.BufferObj->Name;
+ break;
+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
+ v->value_int = ctx->Unpack.BufferObj->Name;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
+ v->value_int = ctx->TransformFeedback.CurrentBuffer->Name;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Paused;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Active;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BINDING:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Name;
+ break;
+ case GL_CURRENT_PROGRAM:
+ v->value_int =
+ ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ break;
+ case GL_READ_FRAMEBUFFER_BINDING_EXT:
+ v->value_int = ctx->ReadBuffer->Name;
+ break;
+ case GL_RENDERBUFFER_BINDING_EXT:
+ v->value_int =
+ ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
+ break;
+ case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
+ v->value_int = ctx->Array.ArrayObj->PointSize.BufferObj->Name;
+ break;
+ }
+}
+
+/**
+ * Check extra constraints on a struct value_desc descriptor
+ *
+ * If a struct value_desc has a non-NULL extra pointer, it means that
+ * there are a number of extra constraints to check or actions to
+ * perform. The extras is just an integer array where each integer
+ * encode different constraints or actions.
+ *
+ * \param ctx current context
+ * \param func name of calling glGet*v() function for error reporting
+ * \param d the struct value_desc that has the extra constraints
+ *
+ * \return GL_FALSE if one of the constraints was not satisfied,
+ * otherwise GL_TRUE.
+ */
+static GLboolean
+check_extra(GLcontext *ctx, const char *func, const struct value_desc *d)
+{
+ const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor;
+ int total, enabled;
+ const int *e;
+
+ total = 0;
+ enabled = 0;
+ for (e = d->extra; *e != EXTRA_END; e++)
+ switch (*e) {
+ case EXTRA_VERSION_30:
+ if (version >= 30) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_VERSION_31:
+ if (version >= 31) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_VERSION_32:
+ if (version >= 32) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_VERSION_ES2:
+ if (ctx->API == API_OPENGLES2) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_NEW_BUFFERS:
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
+ break;
+ case EXTRA_FLUSH_CURRENT:
+ FLUSH_CURRENT(ctx, 0);
+ break;
+ case EXTRA_VALID_DRAW_BUFFER:
+ if (d->pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(draw buffer %u)",
+ func, d->pname - GL_DRAW_BUFFER0_ARB);
+ return GL_FALSE;
+ }
+ break;
+ case EXTRA_VALID_TEXTURE_UNIT:
+ if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture %u)",
+ func, ctx->Texture.CurrentUnit);
+ return GL_FALSE;
+ }
+ break;
+ case EXTRA_END:
+ break;
+ default: /* *e is a offset into the extension struct */
+ total++;
+ if (*(GLboolean *) ((char *) &ctx->Extensions + *e))
+ enabled++;
+ break;
+ }
+
+ if (total > 0 && enabled == 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(d->pname));
+ return GL_FALSE;
}
-/*
- * Check if either of four extensions is enabled.
+ return GL_TRUE;
+}
+
+static const struct value_desc error_value =
+ { 0, 0, TYPE_INVALID, NO_OFFSET, NO_EXTRA };
+
+/**
+ * Find the struct value_desc corresponding to the enum 'pname'.
+ *
+ * We hash the enum value to get an index into the 'table' array,
+ * which holds the index in the 'values' array of struct value_desc.
+ * Once we've found the entry, we do the extra checks, if any, then
+ * look up the value and return a pointer to it.
+ *
+ * If the value has to be computed (for example, it's the result of a
+ * function call or we need to add 1 to it), we use the tmp 'v' to
+ * store the result.
+ *
+ * \param func name of glGet*v() func for error reporting
+ * \param pname the enum value we're looking up
+ * \param p is were we return the pointer to the value
+ * \param v a tmp union value variable in the calling glGet*v() function
+ *
+ * \return the struct value_desc corresponding to the enum or a struct
+ * value_desc of TYPE_INVALID if not found. This lets the calling
+ * glGet*v() function jump right into a switch statement and
+ * handle errors there instead of having to check for NULL.
*/
-#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
- if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
- !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
- _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
- return; \
+static const struct value_desc *
+find_value(const char *func, GLenum pname, void **p, union value *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *unit;
+ int mask, hash;
+ const struct value_desc *d;
+
+ mask = Elements(table) - 1;
+ hash = (pname * prime_factor);
+ while (1) {
+ d = &values[table[hash & mask]];
+ if (likely(d->pname == pname))
+ break;
+
+ /* If the enum isn't valid, the hash walk ends with index 0,
+ * which is the API mask entry at the beginning of values[]. */
+ if (d->type == TYPE_API_MASK) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return &error_value;
+ }
+ hash += prime_step;
+ }
+
+ if (unlikely(d->extra && !check_extra(ctx, func, d)))
+ return &error_value;
+
+ switch (d->location) {
+ case LOC_BUFFER:
+ *p = ((char *) ctx->DrawBuffer + d->offset);
+ return d;
+ case LOC_CONTEXT:
+ *p = ((char *) ctx + d->offset);
+ return d;
+ case LOC_ARRAY:
+ *p = ((char *) ctx->Array.ArrayObj + d->offset);
+ return d;
+ case LOC_TEXUNIT:
+ unit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ *p = ((char *) unit + d->offset);
+ return d;
+ case LOC_CUSTOM:
+ find_custom_value(ctx, d, v);
+ *p = v;
+ return d;
+ default:
+ assert(0);
+ break;
}
+ /* silence warning */
+ return &error_value;
+}
+
+static const int transpose[] = {
+ 0, 4, 8, 12,
+ 1, 5, 9, 13,
+ 2, 6, 10, 14,
+ 3, 7, 11, 15
+};
void GLAPIENTRY
-_mesa_GetBooleanv( GLenum pname, GLboolean *params )
+_mesa_GetBooleanv(GLenum pname, GLboolean *params)
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
- if (!params)
- return;
+ d = find_value("glGetBooleanv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = INT_TO_BOOLEAN(d->offset);
+ break;
- if (ctx->NewState)
- _mesa_update_state(ctx);
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[0]);
+ break;
- if (ctx->Driver.GetBooleanv &&
- ctx->Driver.GetBooleanv(ctx, pname, params))
- return;
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_BOOLEAN(((GLdouble *) p)[0]);
+ break;
- switch (pname) {
- case GL_ACCUM_RED_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
- break;
- case GL_ACCUM_GREEN_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
- break;
- case GL_ACCUM_BLUE_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
- break;
- case GL_ACCUM_ALPHA_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
- break;
- case GL_ACCUM_CLEAR_VALUE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
- break;
- case GL_ALPHA_BIAS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
- break;
- case GL_ALPHA_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
- break;
- case GL_ALPHA_SCALE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
- break;
- case GL_ALPHA_TEST:
- params[0] = ctx->Color.AlphaEnabled;
- break;
- case GL_ALPHA_TEST_FUNC:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
- break;
- case GL_ALPHA_TEST_REF:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
- break;
- case GL_ATTRIB_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
- break;
- case GL_AUTO_NORMAL:
- params[0] = ctx->Eval.AutoNormal;
- break;
- case GL_AUX_BUFFERS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
- break;
- case GL_BLEND:
- params[0] = (ctx->Color.BlendEnabled & 1);
- break;
- case GL_BLEND_DST:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_SRC_RGB_EXT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_DST_RGB_EXT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC_ALPHA_EXT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
- break;
- case GL_BLEND_DST_ALPHA_EXT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
- break;
- case GL_BLEND_EQUATION:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
- break;
- case GL_BLEND_EQUATION_ALPHA_EXT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
- break;
- case GL_BLEND_COLOR_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
- break;
- case GL_BLUE_BIAS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
- break;
- case GL_BLUE_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
- break;
- case GL_BLUE_SCALE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
- break;
- case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
- break;
- case GL_CLIP_PLANE0:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
- break;
- case GL_CLIP_PLANE1:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
- break;
- case GL_CLIP_PLANE2:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
- break;
- case GL_CLIP_PLANE3:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
- break;
- case GL_CLIP_PLANE4:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
- break;
- case GL_CLIP_PLANE5:
- params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
- break;
- case GL_COLOR_CLEAR_VALUE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
- break;
- case GL_COLOR_MATERIAL:
- params[0] = ctx->Light.ColorMaterialEnabled;
- break;
- case GL_COLOR_MATERIAL_FACE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
- break;
- case GL_COLOR_MATERIAL_PARAMETER:
- params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
- break;
- case GL_COLOR_WRITEMASK:
- params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
- params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
- params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
- params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
- break;
- case GL_CULL_FACE:
- params[0] = ctx->Polygon.CullFlag;
- break;
- case GL_CULL_FACE_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
- break;
- case GL_CURRENT_COLOR:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
- }
- break;
- case GL_CURRENT_INDEX:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
- }
- break;
- case GL_CURRENT_NORMAL:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
- }
- break;
- case GL_CURRENT_RASTER_COLOR:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
- break;
- case GL_CURRENT_RASTER_DISTANCE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
- break;
- case GL_CURRENT_RASTER_INDEX:
- params[0] = FLOAT_TO_BOOLEAN(1.0);
- break;
- case GL_CURRENT_RASTER_POSITION:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
- break;
- case GL_CURRENT_RASTER_SECONDARY_COLOR:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
- break;
- case GL_CURRENT_RASTER_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(raster tex coords, unit %u)", unit);
- return;
- }
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][3]);
- }
- break;
- case GL_CURRENT_RASTER_POSITION_VALID:
- params[0] = ctx->Current.RasterPosValid;
- break;
- case GL_CURRENT_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(current tex coords, unit %u)", unit);
- return;
- }
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]);
- }
- break;
- case GL_DEPTH_BIAS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
- break;
- case GL_DEPTH_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
- break;
- case GL_DEPTH_CLEAR_VALUE:
- params[0] = FLOAT_TO_BOOLEAN(((GLfloat) ctx->Depth.Clear));
- break;
- case GL_DEPTH_FUNC:
- params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
- break;
- case GL_DEPTH_RANGE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
- break;
- case GL_DEPTH_SCALE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
- break;
- case GL_DEPTH_TEST:
- params[0] = ctx->Depth.Test;
- break;
- case GL_DEPTH_WRITEMASK:
- params[0] = ctx->Depth.Mask;
- break;
- case GL_DITHER:
- params[0] = ctx->Color.DitherFlag;
- break;
- case GL_DOUBLEBUFFER:
- params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
- break;
- case GL_DRAW_BUFFER:
- params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_EDGE_FLAG:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = (ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0);
- }
- break;
- case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
- break;
- case GL_FEEDBACK_BUFFER_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
- break;
- case GL_FOG:
- params[0] = ctx->Fog.Enabled;
- break;
- case GL_FOG_COLOR:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
- break;
- case GL_FOG_DENSITY:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
- break;
- case GL_FOG_END:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
- break;
- case GL_FOG_HINT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
- break;
- case GL_FOG_INDEX:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
- break;
- case GL_FOG_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
- break;
- case GL_FOG_START:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
- break;
- case GL_FRONT_FACE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
- break;
- case GL_GREEN_BIAS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
- break;
- case GL_GREEN_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
- break;
- case GL_GREEN_SCALE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
- break;
- case GL_INDEX_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
- break;
- case GL_INDEX_CLEAR_VALUE:
- params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
- break;
- case GL_INDEX_MODE:
- params[0] = GL_FALSE;
- break;
- case GL_INDEX_OFFSET:
- params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
- break;
- case GL_INDEX_SHIFT:
- params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
- break;
- case GL_INDEX_WRITEMASK:
- params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
- break;
- case GL_LIGHT0:
- params[0] = ctx->Light.Light[0].Enabled;
- break;
- case GL_LIGHT1:
- params[0] = ctx->Light.Light[1].Enabled;
- break;
- case GL_LIGHT2:
- params[0] = ctx->Light.Light[2].Enabled;
- break;
- case GL_LIGHT3:
- params[0] = ctx->Light.Light[3].Enabled;
- break;
- case GL_LIGHT4:
- params[0] = ctx->Light.Light[4].Enabled;
- break;
- case GL_LIGHT5:
- params[0] = ctx->Light.Light[5].Enabled;
- break;
- case GL_LIGHT6:
- params[0] = ctx->Light.Light[6].Enabled;
- break;
- case GL_LIGHT7:
- params[0] = ctx->Light.Light[7].Enabled;
- break;
- case GL_LIGHTING:
- params[0] = ctx->Light.Enabled;
- break;
- case GL_LIGHT_MODEL_AMBIENT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
- break;
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
- break;
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- params[0] = ctx->Light.Model.LocalViewer;
- break;
- case GL_LIGHT_MODEL_TWO_SIDE:
- params[0] = ctx->Light.Model.TwoSide;
- break;
- case GL_LINE_SMOOTH:
- params[0] = ctx->Line.SmoothFlag;
- break;
- case GL_LINE_SMOOTH_HINT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
- break;
- case GL_LINE_STIPPLE:
- params[0] = ctx->Line.StippleFlag;
- break;
- case GL_LINE_STIPPLE_PATTERN:
- params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
- break;
- case GL_LINE_STIPPLE_REPEAT:
- params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
- break;
- case GL_LINE_WIDTH:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
- break;
- case GL_LINE_WIDTH_GRANULARITY:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
- break;
- case GL_LINE_WIDTH_RANGE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
- break;
- case GL_ALIASED_LINE_WIDTH_RANGE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
- break;
- case GL_LIST_BASE:
- params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
- break;
- case GL_LIST_INDEX:
- params[0] = INT_TO_BOOLEAN((ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0));
- break;
- case GL_LIST_MODE:
- {
- GLenum mode;
- if (!ctx->CompileFlag)
- mode = 0;
- else if (ctx->ExecuteFlag)
- mode = GL_COMPILE_AND_EXECUTE;
- else
- mode = GL_COMPILE;
- params[0] = ENUM_TO_BOOLEAN(mode);
- }
- break;
- case GL_INDEX_LOGIC_OP:
- params[0] = ctx->Color.IndexLogicOpEnabled;
- break;
- case GL_COLOR_LOGIC_OP:
- params[0] = ctx->Color.ColorLogicOpEnabled;
- break;
- case GL_LOGIC_OP_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
- break;
- case GL_MAP1_COLOR_4:
- params[0] = ctx->Eval.Map1Color4;
- break;
- case GL_MAP1_GRID_DOMAIN:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
- break;
- case GL_MAP1_GRID_SEGMENTS:
- params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
- break;
- case GL_MAP1_INDEX:
- params[0] = ctx->Eval.Map1Index;
- break;
- case GL_MAP1_NORMAL:
- params[0] = ctx->Eval.Map1Normal;
- break;
- case GL_MAP1_TEXTURE_COORD_1:
- params[0] = ctx->Eval.Map1TextureCoord1;
- break;
- case GL_MAP1_TEXTURE_COORD_2:
- params[0] = ctx->Eval.Map1TextureCoord2;
- break;
- case GL_MAP1_TEXTURE_COORD_3:
- params[0] = ctx->Eval.Map1TextureCoord3;
- break;
- case GL_MAP1_TEXTURE_COORD_4:
- params[0] = ctx->Eval.Map1TextureCoord4;
- break;
- case GL_MAP1_VERTEX_3:
- params[0] = ctx->Eval.Map1Vertex3;
- break;
- case GL_MAP1_VERTEX_4:
- params[0] = ctx->Eval.Map1Vertex4;
- break;
- case GL_MAP2_COLOR_4:
- params[0] = ctx->Eval.Map2Color4;
- break;
- case GL_MAP2_GRID_DOMAIN:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
- break;
- case GL_MAP2_GRID_SEGMENTS:
- params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
- params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
- break;
- case GL_MAP2_INDEX:
- params[0] = ctx->Eval.Map2Index;
- break;
- case GL_MAP2_NORMAL:
- params[0] = ctx->Eval.Map2Normal;
- break;
- case GL_MAP2_TEXTURE_COORD_1:
- params[0] = ctx->Eval.Map2TextureCoord1;
- break;
- case GL_MAP2_TEXTURE_COORD_2:
- params[0] = ctx->Eval.Map2TextureCoord2;
- break;
- case GL_MAP2_TEXTURE_COORD_3:
- params[0] = ctx->Eval.Map2TextureCoord3;
- break;
- case GL_MAP2_TEXTURE_COORD_4:
- params[0] = ctx->Eval.Map2TextureCoord4;
- break;
- case GL_MAP2_VERTEX_3:
- params[0] = ctx->Eval.Map2Vertex3;
- break;
- case GL_MAP2_VERTEX_4:
- params[0] = ctx->Eval.Map2Vertex4;
- break;
- case GL_MAP_COLOR:
- params[0] = ctx->Pixel.MapColorFlag;
- break;
- case GL_MAP_STENCIL:
- params[0] = ctx->Pixel.MapStencilFlag;
- break;
- case GL_MATRIX_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
- break;
- case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIP_PLANES:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
- break;
- case GL_MAX_ELEMENTS_VERTICES:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_ELEMENTS_INDICES:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_EVAL_ORDER:
- params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
- break;
- case GL_MAX_LIGHTS:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
- break;
- case GL_MAX_LIST_NESTING:
- params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
- break;
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
- break;
- case GL_MAX_NAME_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
- break;
- case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
- break;
- case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
- break;
- case GL_MAX_TEXTURE_SIZE:
- params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
- break;
- case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
- break;
- case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
- break;
- case GL_MAX_VIEWPORT_DIMS:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
- params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
- break;
- case GL_MODELVIEW_MATRIX:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_MODELVIEW_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
- break;
- case GL_NAME_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
- break;
- case GL_NORMALIZE:
- params[0] = ctx->Transform.Normalize;
- break;
- case GL_PACK_ALIGNMENT:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
- break;
- case GL_PACK_LSB_FIRST:
- params[0] = ctx->Pack.LsbFirst;
- break;
- case GL_PACK_ROW_LENGTH:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
- break;
- case GL_PACK_SKIP_PIXELS:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
- break;
- case GL_PACK_SKIP_ROWS:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
- break;
- case GL_PACK_SWAP_BYTES:
- params[0] = ctx->Pack.SwapBytes;
- break;
- case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
- break;
- case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
- break;
- case GL_PACK_INVERT_MESA:
- params[0] = ctx->Pack.Invert;
- break;
- case GL_PERSPECTIVE_CORRECTION_HINT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
- break;
- case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.AtoA.Size);
- break;
- case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.BtoB.Size);
- break;
- case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.GtoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.ItoA.Size);
- break;
- case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.ItoB.Size);
- break;
- case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.ItoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.ItoI.Size);
- break;
- case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.ItoR.Size);
- break;
- case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.RtoR.Size);
- break;
- case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->PixelMaps.StoS.Size);
- break;
- case GL_POINT_SIZE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
- break;
- case GL_POINT_SIZE_GRANULARITY:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
- break;
- case GL_POINT_SIZE_RANGE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
- break;
- case GL_ALIASED_POINT_SIZE_RANGE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
- break;
- case GL_POINT_SMOOTH:
- params[0] = ctx->Point.SmoothFlag;
- break;
- case GL_POINT_SMOOTH_HINT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
- break;
- case GL_POINT_SIZE_MIN_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
- break;
- case GL_POINT_SIZE_MAX_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
- break;
- case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
- break;
- case GL_DISTANCE_ATTENUATION_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
- break;
- case GL_POLYGON_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
- params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
- break;
- case GL_POLYGON_OFFSET_BIAS_EXT:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
- break;
- case GL_POLYGON_OFFSET_FACTOR:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
- break;
- case GL_POLYGON_OFFSET_UNITS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
- break;
- case GL_POLYGON_OFFSET_POINT:
- params[0] = ctx->Polygon.OffsetPoint;
- break;
- case GL_POLYGON_OFFSET_LINE:
- params[0] = ctx->Polygon.OffsetLine;
- break;
- case GL_POLYGON_OFFSET_FILL:
- params[0] = ctx->Polygon.OffsetFill;
- break;
- case GL_POLYGON_SMOOTH:
- params[0] = ctx->Polygon.SmoothFlag;
- break;
- case GL_POLYGON_SMOOTH_HINT:
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
- break;
- case GL_POLYGON_STIPPLE:
- params[0] = ctx->Polygon.StippleFlag;
- break;
- case GL_PROJECTION_MATRIX:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_PROJECTION_STACK_DEPTH:
- params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
- break;
- case GL_READ_BUFFER:
- params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
- break;
- case GL_RED_BIAS:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
- break;
- case GL_RED_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.redBits);
- break;
- case GL_RED_SCALE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
- break;
- case GL_RENDER_MODE:
- params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
- break;
- case GL_RESCALE_NORMAL:
- params[0] = ctx->Transform.RescaleNormals;
- break;
- case GL_RGBA_MODE:
- params[0] = GL_TRUE;
- break;
- case GL_SCISSOR_BOX:
- params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
- params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
- params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
- params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
- break;
- case GL_SCISSOR_TEST:
- params[0] = ctx->Scissor.Enabled;
- break;
- case GL_SELECTION_BUFFER_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
- break;
- case GL_SHADE_MODEL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
- break;
- case GL_SHARED_TEXTURE_PALETTE_EXT:
- params[0] = ctx->Texture.SharedPalette;
- break;
- case GL_STENCIL_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
- break;
- case GL_STENCIL_CLEAR_VALUE:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
- break;
- case GL_STENCIL_FAIL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_FUNC:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_REF:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_TEST:
- params[0] = ctx->Stencil.Enabled;
- break;
- case GL_STENCIL_VALUE_MASK:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_WRITEMASK:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STEREO:
- params[0] = ctx->DrawBuffer->Visual.stereoMode;
- break;
- case GL_SUBPIXEL_BITS:
- params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
- break;
- case GL_TEXTURE_1D:
- params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
- break;
- case GL_TEXTURE_2D:
- params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
- break;
- case GL_TEXTURE_3D:
- params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
- break;
- case GL_TEXTURE_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetBooleanv");
- params[0] = _mesa_IsEnabled(GL_TEXTURE_1D_ARRAY_EXT);
- break;
- case GL_TEXTURE_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetBooleanv");
- params[0] = _mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT);
- break;
- case GL_TEXTURE_BINDING_1D:
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D:
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_3D:
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_GEN_S:
- params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
- break;
- case GL_TEXTURE_GEN_T:
- params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
- break;
- case GL_TEXTURE_GEN_R:
- params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
- break;
- case GL_TEXTURE_GEN_Q:
- params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
- break;
- case GL_TEXTURE_MATRIX:
- {
- const GLfloat *matrix;
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)",
- unit);
- return;
- }
- matrix = ctx->TextureMatrixStack[unit].Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_TEXTURE_STACK_DEPTH:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(texture stack depth, unit %u)", unit);
- return;
- }
- params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[unit].Depth + 1);
- }
- break;
- case GL_UNPACK_ALIGNMENT:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
- break;
- case GL_UNPACK_LSB_FIRST:
- params[0] = ctx->Unpack.LsbFirst;
- break;
- case GL_UNPACK_ROW_LENGTH:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
- break;
- case GL_UNPACK_SKIP_PIXELS:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
- break;
- case GL_UNPACK_SKIP_ROWS:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
- break;
- case GL_UNPACK_SWAP_BYTES:
- params[0] = ctx->Unpack.SwapBytes;
- break;
- case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
- break;
- case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
- break;
- case GL_UNPACK_CLIENT_STORAGE_APPLE:
- params[0] = ctx->Unpack.ClientStorage;
- break;
- case GL_VIEWPORT:
- params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
- params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
- params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
- params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
- break;
- case GL_ZOOM_X:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
- break;
- case GL_ZOOM_Y:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
- break;
- case GL_VERTEX_ARRAY:
- params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
- break;
- case GL_VERTEX_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
- break;
- case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
- break;
- case GL_VERTEX_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
- break;
- case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
- break;
- case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
- break;
- case GL_NORMAL_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
- break;
- case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_COLOR_ARRAY:
- params[0] = ctx->Array.ArrayObj->Color.Enabled;
- break;
- case GL_COLOR_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
- break;
- case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
- break;
- case GL_COLOR_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
- break;
- case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_INDEX_ARRAY:
- params[0] = ctx->Array.ArrayObj->Index.Enabled;
- break;
- case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
- break;
- case GL_INDEX_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
- break;
- case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_TEXTURE_COORD_ARRAY:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
- break;
- case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
- break;
- case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
- break;
- case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
- break;
- case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_EDGE_FLAG_ARRAY:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
- break;
- case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
- break;
- case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = INT_TO_BOOLEAN(0);
- break;
- case GL_MAX_TEXTURE_UNITS_ARB:
- CHECK_EXT1(ARB_multitexture, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
- break;
- case GL_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
- break;
- case GL_CLIENT_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
- break;
- case GL_TEXTURE_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
- params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
- break;
- case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
- break;
- case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
- break;
- case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
- break;
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
- break;
- case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
- {
- GLint formats[100];
- GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
- ASSERT(n <= 100);
- for (i = 0; i < n; i++)
- params[i] = ENUM_TO_BOOLEAN(formats[i]);
- }
- break;
- case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
- break;
- case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
- break;
- case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_SGI:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
- break;
- case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
- break;
- case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
- break;
- case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
- break;
- case GL_CONVOLUTION_1D_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = ctx->Pixel.Convolution1DEnabled;
- break;
- case GL_CONVOLUTION_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = ctx->Pixel.Convolution2DEnabled;
- break;
- case GL_SEPARABLE_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = ctx->Pixel.Separable2DEnabled;
- break;
- case GL_POST_CONVOLUTION_RED_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
- break;
- case GL_POST_CONVOLUTION_RED_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
- break;
- case GL_HISTOGRAM:
- CHECK_EXT1(EXT_histogram, "GetBooleanv");
- params[0] = ctx->Pixel.HistogramEnabled;
- break;
- case GL_MINMAX:
- CHECK_EXT1(EXT_histogram, "GetBooleanv");
- params[0] = ctx->Pixel.MinMaxEnabled;
- break;
- case GL_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetBooleanv");
- params[0] = ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION];
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetBooleanv");
- params[0] = ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetBooleanv");
- params[0] = ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX];
- break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
- break;
- case GL_COLOR_SUM_EXT:
- CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
- params[0] = ctx->Fog.ColorSumEnabled;
- break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
- params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
- params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
- }
- break;
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
- break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
- break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
- break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
- break;
- case GL_CURRENT_FOG_COORDINATE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
- }
- break;
- case GL_FOG_COORDINATE_ARRAY_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
- break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
- break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
- break;
- case GL_FOG_COORDINATE_SOURCE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
- break;
- case GL_MAX_TEXTURE_LOD_BIAS_EXT:
- CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
- break;
- case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
- CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
- break;
- case GL_MULTISAMPLE_ARB:
- params[0] = ctx->Multisample.Enabled;
- break;
- case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
- params[0] = ctx->Multisample.SampleAlphaToCoverage;
- break;
- case GL_SAMPLE_ALPHA_TO_ONE_ARB:
- params[0] = ctx->Multisample.SampleAlphaToOne;
- break;
- case GL_SAMPLE_COVERAGE_ARB:
- params[0] = ctx->Multisample.SampleCoverage;
- break;
- case GL_SAMPLE_COVERAGE_VALUE_ARB:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
- break;
- case GL_SAMPLE_COVERAGE_INVERT_ARB:
- params[0] = ctx->Multisample.SampleCoverageInvert;
- break;
- case GL_SAMPLE_BUFFERS_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
- break;
- case GL_SAMPLES_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
- break;
- case GL_RASTER_POSITION_UNCLIPPED_IBM:
- CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
- params[0] = ctx->Transform.RasterPositionUnclipped;
- break;
- case GL_POINT_SPRITE_NV:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
- params[0] = ctx->Point.PointSprite;
- break;
- case GL_POINT_SPRITE_R_MODE_NV:
- CHECK_EXT1(NV_point_sprite, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
- break;
- case GL_POINT_SPRITE_COORD_ORIGIN:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
- break;
- case GL_GENERATE_MIPMAP_HINT_SGIS:
- CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
- break;
- case GL_VERTEX_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
- break;
- case GL_VERTEX_ATTRIB_ARRAY0_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY1_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY2_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY3_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY5_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY6_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY7_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY8_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY9_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY10_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY11_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY12_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY13_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY14_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
- break;
- case GL_VERTEX_ATTRIB_ARRAY15_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
- break;
- case GL_MAP1_VERTEX_ATTRIB0_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[0];
- break;
- case GL_MAP1_VERTEX_ATTRIB1_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[1];
- break;
- case GL_MAP1_VERTEX_ATTRIB2_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[2];
- break;
- case GL_MAP1_VERTEX_ATTRIB3_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[3];
- break;
- case GL_MAP1_VERTEX_ATTRIB4_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[4];
- break;
- case GL_MAP1_VERTEX_ATTRIB5_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[5];
- break;
- case GL_MAP1_VERTEX_ATTRIB6_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[6];
- break;
- case GL_MAP1_VERTEX_ATTRIB7_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[7];
- break;
- case GL_MAP1_VERTEX_ATTRIB8_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[8];
- break;
- case GL_MAP1_VERTEX_ATTRIB9_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[9];
- break;
- case GL_MAP1_VERTEX_ATTRIB10_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[10];
- break;
- case GL_MAP1_VERTEX_ATTRIB11_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[11];
- break;
- case GL_MAP1_VERTEX_ATTRIB12_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[12];
- break;
- case GL_MAP1_VERTEX_ATTRIB13_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[13];
- break;
- case GL_MAP1_VERTEX_ATTRIB14_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[14];
- break;
- case GL_MAP1_VERTEX_ATTRIB15_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Eval.Map1Attrib[15];
- break;
- case GL_FRAGMENT_PROGRAM_NV:
- CHECK_EXT1(NV_fragment_program, "GetBooleanv");
- params[0] = ctx->FragmentProgram.Enabled;
- break;
- case GL_FRAGMENT_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_fragment_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
- break;
- case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
- CHECK_EXT1(NV_fragment_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
- params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
- break;
- case GL_TEXTURE_BINDING_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
- break;
- case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
- break;
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
- params[0] = ctx->Stencil.TestTwoSide;
- break;
- case GL_ACTIVE_STENCIL_FACE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
- break;
- case GL_MAX_SHININESS_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
- break;
- case GL_MAX_SPOT_EXPONENT_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
- break;
- case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
- break;
- case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
- break;
- case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
- break;
- case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
- break;
- case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
- break;
- case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
- break;
- case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
- break;
- case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
- break;
- case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
- break;
- case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
- break;
- case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
- break;
- case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
- break;
- case GL_VERTEX_PROGRAM_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
- params[0] = ctx->VertexProgram.Enabled;
- break;
- case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
- params[0] = ctx->VertexProgram.PointSizeEnabled;
- break;
- case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
- params[0] = ctx->VertexProgram.TwoSideEnabled;
- break;
- case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
- break;
- case GL_MAX_PROGRAM_MATRICES_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
- break;
- case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
- params[0] = ctx->CurrentStack->Depth + 1;
- break;
- case GL_CURRENT_MATRIX_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
- CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
- params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
- params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
- params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
- params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
- params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
- params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
- params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
- params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
- params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
- params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
- params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
- params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
- params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
- params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
- params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
- }
- break;
- case GL_MAX_VERTEX_ATTRIBS_ARB:
- CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
- break;
- case GL_PROGRAM_ERROR_POSITION_ARB:
- CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
- break;
- case GL_FRAGMENT_PROGRAM_ARB:
- CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
- params[0] = ctx->FragmentProgram.Enabled;
- break;
- case GL_MAX_TEXTURE_COORDS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
- break;
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
- break;
- case GL_DEPTH_BOUNDS_TEST_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
- params[0] = ctx->Depth.BoundsTest;
- break;
- case GL_DEPTH_BOUNDS_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
- params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
- params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
- break;
- case GL_DEPTH_CLAMP:
- CHECK_EXT1(ARB_depth_clamp, "GetBooleanv");
- params[0] = ctx->Transform.DepthClamp;
- break;
- case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
- break;
- case GL_DRAW_BUFFER0_ARB:
- params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_DRAW_BUFFER1_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
- params[0] = ENUM_TO_BOOLEAN(buffer);
- }
- break;
- case GL_DRAW_BUFFER2_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
- params[0] = ENUM_TO_BOOLEAN(buffer);
- }
- break;
- case GL_DRAW_BUFFER3_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
- params[0] = ENUM_TO_BOOLEAN(buffer);
- }
- break;
- case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- CHECK_EXT1(OES_read_format, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(_mesa_get_color_read_type(ctx));
- break;
- case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- CHECK_EXT1(OES_read_format, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(_mesa_get_color_read_format(ctx));
- break;
- case GL_NUM_FRAGMENT_REGISTERS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(6);
- break;
- case GL_NUM_FRAGMENT_CONSTANTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(8);
- break;
- case GL_NUM_PASSES_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(2);
- break;
- case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(8);
- break;
- case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(16);
- break;
- case GL_COLOR_ALPHA_PAIRING_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = GL_TRUE;
- break;
- case GL_NUM_LOOPBACK_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(3);
- break;
- case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(3);
- break;
- case GL_STENCIL_BACK_FUNC:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
- break;
- case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
- break;
- case GL_STENCIL_BACK_WRITEMASK:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[1]);
- break;
- case GL_STENCIL_BACK_REF:
- params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
- break;
- case GL_STENCIL_BACK_FAIL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
- break;
- case GL_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
- break;
- case GL_RENDERBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
- break;
- case GL_MAX_COLOR_ATTACHMENTS_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
- break;
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
- break;
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_blit, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->ReadBuffer->Name);
- break;
- case GL_PROVOKING_VERTEX_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetBooleanv");
- params[0] = ctx->Light.ProvokingVertex;
- break;
- case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetBooleanv");
- params[0] = ctx->Const.QuadsFollowProvokingVertexConvention;
- break;
- case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.FragmentProgram.MaxUniformComponents);
- break;
- case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
- break;
- case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxUniformComponents);
- break;
- case GL_MAX_VARYING_FLOATS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVarying * 4);
- break;
- case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVertexTextureImageUnits);
- break;
- case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxCombinedTextureImageUnits);
- break;
- case GL_CURRENT_PROGRAM:
- CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
- break;
- case GL_MAX_SAMPLES:
- CHECK_EXT1(ARB_framebuffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Const.MaxSamples);
- break;
- case GL_VERTEX_ARRAY_BINDING_APPLE:
- CHECK_EXT1(APPLE_vertex_array_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Name);
- break;
- case GL_TEXTURE_CUBE_MAP_SEAMLESS:
- CHECK_EXT1(ARB_seamless_cube_map, "GetBooleanv");
- params[0] = ctx->Texture.CubeMapSeamless;
- break;
- case GL_MAX_SERVER_WAIT_TIMEOUT:
- CHECK_EXT1(ARB_sync, "GetBooleanv");
- params[0] = INT64_TO_BOOLEAN(ctx->Const.MaxServerWaitTimeout);
- break;
- case GL_NUM_EXTENSIONS:
- params[0] = INT_TO_BOOLEAN(_mesa_get_extension_count(ctx));
- break;
- case GL_MAJOR_VERSION:
- params[0] = INT_TO_BOOLEAN(ctx->VersionMajor);
- break;
- case GL_MINOR_VERSION:
- params[0] = INT_TO_BOOLEAN(ctx->VersionMinor);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
+ case TYPE_INT_4:
+ params[3] = INT_TO_BOOLEAN(((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = INT_TO_BOOLEAN(((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = INT_TO_BOOLEAN(((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = INT_TO_BOOLEAN(((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = INT64_TO_BOOLEAN(((GLint64 *) p)[0]);
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = ((GLboolean*) p)[0];
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_BOOLEAN(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_BOOLEAN(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
}
}
void GLAPIENTRY
-_mesa_GetFloatv( GLenum pname, GLfloat *params )
+_mesa_GetFloatv(GLenum pname, GLfloat *params)
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
- if (!params)
- return;
+ d = find_value("glGetFloatv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = (GLfloat) d->offset;
+ break;
- if (ctx->NewState)
- _mesa_update_state(ctx);
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = ((GLfloat *) p)[3];
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = ((GLfloat *) p)[2];
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = ((GLfloat *) p)[1];
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = ((GLfloat *) p)[0];
+ break;
- if (ctx->Driver.GetFloatv &&
- ctx->Driver.GetFloatv(ctx, pname, params))
- return;
+ case TYPE_DOUBLEN:
+ params[0] = ((GLdouble *) p)[0];
+ break;
- switch (pname) {
- case GL_ACCUM_RED_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
- break;
- case GL_ACCUM_GREEN_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
- break;
- case GL_ACCUM_BLUE_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
- break;
- case GL_ACCUM_ALPHA_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
- break;
- case GL_ACCUM_CLEAR_VALUE:
- params[0] = ctx->Accum.ClearColor[0];
- params[1] = ctx->Accum.ClearColor[1];
- params[2] = ctx->Accum.ClearColor[2];
- params[3] = ctx->Accum.ClearColor[3];
- break;
- case GL_ALPHA_BIAS:
- params[0] = ctx->Pixel.AlphaBias;
- break;
- case GL_ALPHA_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
- break;
- case GL_ALPHA_SCALE:
- params[0] = ctx->Pixel.AlphaScale;
- break;
- case GL_ALPHA_TEST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
- break;
- case GL_ALPHA_TEST_FUNC:
- params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
- break;
- case GL_ALPHA_TEST_REF:
- params[0] = ctx->Color.AlphaRef;
- break;
- case GL_ATTRIB_STACK_DEPTH:
- params[0] = (GLfloat)(ctx->AttribStackDepth);
- break;
- case GL_AUTO_NORMAL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
- break;
- case GL_AUX_BUFFERS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
- break;
- case GL_BLEND:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Color.BlendEnabled & 1));
- break;
- case GL_BLEND_DST:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_SRC_RGB_EXT:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_DST_RGB_EXT:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC_ALPHA_EXT:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
- break;
- case GL_BLEND_DST_ALPHA_EXT:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
- break;
- case GL_BLEND_EQUATION:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
- break;
- case GL_BLEND_EQUATION_ALPHA_EXT:
- params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
- break;
- case GL_BLEND_COLOR_EXT:
- params[0] = ctx->Color.BlendColor[0];
- params[1] = ctx->Color.BlendColor[1];
- params[2] = ctx->Color.BlendColor[2];
- params[3] = ctx->Color.BlendColor[3];
- break;
- case GL_BLUE_BIAS:
- params[0] = ctx->Pixel.BlueBias;
- break;
- case GL_BLUE_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
- break;
- case GL_BLUE_SCALE:
- params[0] = ctx->Pixel.BlueScale;
- break;
- case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
- break;
- case GL_CLIP_PLANE0:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
- break;
- case GL_CLIP_PLANE1:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
- break;
- case GL_CLIP_PLANE2:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
- break;
- case GL_CLIP_PLANE3:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
- break;
- case GL_CLIP_PLANE4:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
- break;
- case GL_CLIP_PLANE5:
- params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
- break;
- case GL_COLOR_CLEAR_VALUE:
- params[0] = ctx->Color.ClearColor[0];
- params[1] = ctx->Color.ClearColor[1];
- params[2] = ctx->Color.ClearColor[2];
- params[3] = ctx->Color.ClearColor[3];
- break;
- case GL_COLOR_MATERIAL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
- break;
- case GL_COLOR_MATERIAL_FACE:
- params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
- break;
- case GL_COLOR_MATERIAL_PARAMETER:
- params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
- break;
- case GL_COLOR_WRITEMASK:
- params[0] = (GLfloat)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
- params[1] = (GLfloat)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
- params[2] = (GLfloat)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
- params[3] = (GLfloat)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
- break;
- case GL_CULL_FACE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
- break;
- case GL_CULL_FACE_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
- break;
- case GL_CURRENT_COLOR:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
- params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
- params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
- params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
- }
- break;
- case GL_CURRENT_INDEX:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
- }
- break;
- case GL_CURRENT_NORMAL:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
- params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
- params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
- }
- break;
- case GL_CURRENT_RASTER_COLOR:
- params[0] = ctx->Current.RasterColor[0];
- params[1] = ctx->Current.RasterColor[1];
- params[2] = ctx->Current.RasterColor[2];
- params[3] = ctx->Current.RasterColor[3];
- break;
- case GL_CURRENT_RASTER_DISTANCE:
- params[0] = ctx->Current.RasterDistance;
- break;
- case GL_CURRENT_RASTER_INDEX:
- params[0] = 1.0;
- break;
- case GL_CURRENT_RASTER_POSITION:
- params[0] = ctx->Current.RasterPos[0];
- params[1] = ctx->Current.RasterPos[1];
- params[2] = ctx->Current.RasterPos[2];
- params[3] = ctx->Current.RasterPos[3];
- break;
- case GL_CURRENT_RASTER_SECONDARY_COLOR:
- params[0] = ctx->Current.RasterSecondaryColor[0];
- params[1] = ctx->Current.RasterSecondaryColor[1];
- params[2] = ctx->Current.RasterSecondaryColor[2];
- params[3] = ctx->Current.RasterSecondaryColor[3];
- break;
- case GL_CURRENT_RASTER_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(raster tex coords, unit %u)", unit);
- return;
- }
- params[0] = ctx->Current.RasterTexCoords[unit][0];
- params[1] = ctx->Current.RasterTexCoords[unit][1];
- params[2] = ctx->Current.RasterTexCoords[unit][2];
- params[3] = ctx->Current.RasterTexCoords[unit][3];
- }
- break;
- case GL_CURRENT_RASTER_POSITION_VALID:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
- break;
- case GL_CURRENT_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(current tex coords, unit %u)", unit);
- return;
- }
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0];
- params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1];
- params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2];
- params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3];
- }
- break;
- case GL_DEPTH_BIAS:
- params[0] = ctx->Pixel.DepthBias;
- break;
- case GL_DEPTH_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
- break;
- case GL_DEPTH_CLEAR_VALUE:
- params[0] = ((GLfloat) ctx->Depth.Clear);
- break;
- case GL_DEPTH_FUNC:
- params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
- break;
- case GL_DEPTH_RANGE:
- params[0] = ctx->Viewport.Near;
- params[1] = ctx->Viewport.Far;
- break;
- case GL_DEPTH_SCALE:
- params[0] = ctx->Pixel.DepthScale;
- break;
- case GL_DEPTH_TEST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
- break;
- case GL_DEPTH_WRITEMASK:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
- break;
- case GL_DITHER:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
- break;
- case GL_DOUBLEBUFFER:
- params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
- break;
- case GL_DRAW_BUFFER:
- params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_EDGE_FLAG:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = BOOLEAN_TO_FLOAT((ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0));
- }
- break;
- case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = (GLfloat)(ctx->Feedback.BufferSize);
- break;
- case GL_FEEDBACK_BUFFER_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
- break;
- case GL_FOG:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
- break;
- case GL_FOG_COLOR:
- params[0] = ctx->Fog.Color[0];
- params[1] = ctx->Fog.Color[1];
- params[2] = ctx->Fog.Color[2];
- params[3] = ctx->Fog.Color[3];
- break;
- case GL_FOG_DENSITY:
- params[0] = ctx->Fog.Density;
- break;
- case GL_FOG_END:
- params[0] = ctx->Fog.End;
- break;
- case GL_FOG_HINT:
- params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
- break;
- case GL_FOG_INDEX:
- params[0] = ctx->Fog.Index;
- break;
- case GL_FOG_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
- break;
- case GL_FOG_START:
- params[0] = ctx->Fog.Start;
- break;
- case GL_FRONT_FACE:
- params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
- break;
- case GL_GREEN_BIAS:
- params[0] = ctx->Pixel.GreenBias;
- break;
- case GL_GREEN_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
- break;
- case GL_GREEN_SCALE:
- params[0] = ctx->Pixel.GreenScale;
- break;
- case GL_INDEX_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
- break;
- case GL_INDEX_CLEAR_VALUE:
- params[0] = (GLfloat)(ctx->Color.ClearIndex);
- break;
- case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_FLOAT(GL_FALSE);
- break;
- case GL_INDEX_OFFSET:
- params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
- break;
- case GL_INDEX_SHIFT:
- params[0] = (GLfloat)(ctx->Pixel.IndexShift);
- break;
- case GL_INDEX_WRITEMASK:
- params[0] = (GLfloat)(ctx->Color.IndexMask);
- break;
- case GL_LIGHT0:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
- break;
- case GL_LIGHT1:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
- break;
- case GL_LIGHT2:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
- break;
- case GL_LIGHT3:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
- break;
- case GL_LIGHT4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
- break;
- case GL_LIGHT5:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
- break;
- case GL_LIGHT6:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
- break;
- case GL_LIGHT7:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
- break;
- case GL_LIGHTING:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
- break;
- case GL_LIGHT_MODEL_AMBIENT:
- params[0] = ctx->Light.Model.Ambient[0];
- params[1] = ctx->Light.Model.Ambient[1];
- params[2] = ctx->Light.Model.Ambient[2];
- params[3] = ctx->Light.Model.Ambient[3];
- break;
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
- break;
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
- break;
- case GL_LIGHT_MODEL_TWO_SIDE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
- break;
- case GL_LINE_SMOOTH:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
- break;
- case GL_LINE_SMOOTH_HINT:
- params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
- break;
- case GL_LINE_STIPPLE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
- break;
- case GL_LINE_STIPPLE_PATTERN:
- params[0] = (GLfloat)(ctx->Line.StipplePattern);
- break;
- case GL_LINE_STIPPLE_REPEAT:
- params[0] = (GLfloat)(ctx->Line.StippleFactor);
- break;
- case GL_LINE_WIDTH:
- params[0] = ctx->Line.Width;
- break;
- case GL_LINE_WIDTH_GRANULARITY:
- params[0] = ctx->Const.LineWidthGranularity;
- break;
- case GL_LINE_WIDTH_RANGE:
- params[0] = ctx->Const.MinLineWidthAA;
- params[1] = ctx->Const.MaxLineWidthAA;
- break;
- case GL_ALIASED_LINE_WIDTH_RANGE:
- params[0] = ctx->Const.MinLineWidth;
- params[1] = ctx->Const.MaxLineWidth;
- break;
- case GL_LIST_BASE:
- params[0] = (GLfloat)(ctx->List.ListBase);
- break;
- case GL_LIST_INDEX:
- params[0] = (GLfloat)((ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0));
- break;
- case GL_LIST_MODE:
- {
- GLenum mode;
- if (!ctx->CompileFlag)
- mode = 0;
- else if (ctx->ExecuteFlag)
- mode = GL_COMPILE_AND_EXECUTE;
- else
- mode = GL_COMPILE;
- params[0] = ENUM_TO_FLOAT(mode);
- }
- break;
- case GL_INDEX_LOGIC_OP:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
- break;
- case GL_COLOR_LOGIC_OP:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
- break;
- case GL_LOGIC_OP_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
- break;
- case GL_MAP1_COLOR_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
- break;
- case GL_MAP1_GRID_DOMAIN:
- params[0] = ctx->Eval.MapGrid1u1;
- params[1] = ctx->Eval.MapGrid1u2;
- break;
- case GL_MAP1_GRID_SEGMENTS:
- params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
- break;
- case GL_MAP1_INDEX:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
- break;
- case GL_MAP1_NORMAL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
- break;
- case GL_MAP1_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
- break;
- case GL_MAP1_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
- break;
- case GL_MAP1_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
- break;
- case GL_MAP1_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
- break;
- case GL_MAP1_VERTEX_3:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
- break;
- case GL_MAP1_VERTEX_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
- break;
- case GL_MAP2_COLOR_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
- break;
- case GL_MAP2_GRID_DOMAIN:
- params[0] = ctx->Eval.MapGrid2u1;
- params[1] = ctx->Eval.MapGrid2u2;
- params[2] = ctx->Eval.MapGrid2v1;
- params[3] = ctx->Eval.MapGrid2v2;
- break;
- case GL_MAP2_GRID_SEGMENTS:
- params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
- params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
- break;
- case GL_MAP2_INDEX:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
- break;
- case GL_MAP2_NORMAL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
- break;
- case GL_MAP2_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
- break;
- case GL_MAP2_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
- break;
- case GL_MAP2_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
- break;
- case GL_MAP2_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
- break;
- case GL_MAP2_VERTEX_3:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
- break;
- case GL_MAP2_VERTEX_4:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
- break;
- case GL_MAP_COLOR:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
- break;
- case GL_MAP_STENCIL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
- break;
- case GL_MATRIX_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
- break;
- case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIP_PLANES:
- params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
- break;
- case GL_MAX_ELEMENTS_VERTICES:
- params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_ELEMENTS_INDICES:
- params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_EVAL_ORDER:
- params[0] = (GLfloat)(MAX_EVAL_ORDER);
- break;
- case GL_MAX_LIGHTS:
- params[0] = (GLfloat)(ctx->Const.MaxLights);
- break;
- case GL_MAX_LIST_NESTING:
- params[0] = (GLfloat)(MAX_LIST_NESTING);
- break;
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
- break;
- case GL_MAX_NAME_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
- break;
- case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
- break;
- case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
- break;
- case GL_MAX_TEXTURE_SIZE:
- params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
- break;
- case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
- break;
- case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
- break;
- case GL_MAX_VIEWPORT_DIMS:
- params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
- params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
- break;
- case GL_MODELVIEW_MATRIX:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[1];
- params[2] = matrix[2];
- params[3] = matrix[3];
- params[4] = matrix[4];
- params[5] = matrix[5];
- params[6] = matrix[6];
- params[7] = matrix[7];
- params[8] = matrix[8];
- params[9] = matrix[9];
- params[10] = matrix[10];
- params[11] = matrix[11];
- params[12] = matrix[12];
- params[13] = matrix[13];
- params[14] = matrix[14];
- params[15] = matrix[15];
- }
- break;
- case GL_MODELVIEW_STACK_DEPTH:
- params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
- break;
- case GL_NAME_STACK_DEPTH:
- params[0] = (GLfloat)(ctx->Select.NameStackDepth);
- break;
- case GL_NORMALIZE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
- break;
- case GL_PACK_ALIGNMENT:
- params[0] = (GLfloat)(ctx->Pack.Alignment);
- break;
- case GL_PACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
- break;
- case GL_PACK_ROW_LENGTH:
- params[0] = (GLfloat)(ctx->Pack.RowLength);
- break;
- case GL_PACK_SKIP_PIXELS:
- params[0] = (GLfloat)(ctx->Pack.SkipPixels);
- break;
- case GL_PACK_SKIP_ROWS:
- params[0] = (GLfloat)(ctx->Pack.SkipRows);
- break;
- case GL_PACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
- break;
- case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = (GLfloat)(ctx->Pack.SkipImages);
- break;
- case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = (GLfloat)(ctx->Pack.ImageHeight);
- break;
- case GL_PACK_INVERT_MESA:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
- break;
- case GL_PERSPECTIVE_CORRECTION_HINT:
- params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
- break;
- case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.AtoA.Size);
- break;
- case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.BtoB.Size);
- break;
- case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.GtoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.ItoA.Size);
- break;
- case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.ItoB.Size);
- break;
- case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.ItoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.ItoI.Size);
- break;
- case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.ItoR.Size);
- break;
- case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.RtoR.Size);
- break;
- case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = (GLfloat)(ctx->PixelMaps.StoS.Size);
- break;
- case GL_POINT_SIZE:
- params[0] = ctx->Point.Size;
- break;
- case GL_POINT_SIZE_GRANULARITY:
- params[0] = ctx->Const.PointSizeGranularity;
- break;
- case GL_POINT_SIZE_RANGE:
- params[0] = ctx->Const.MinPointSizeAA;
- params[1] = ctx->Const.MaxPointSizeAA;
- break;
- case GL_ALIASED_POINT_SIZE_RANGE:
- params[0] = ctx->Const.MinPointSize;
- params[1] = ctx->Const.MaxPointSize;
- break;
- case GL_POINT_SMOOTH:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
- break;
- case GL_POINT_SMOOTH_HINT:
- params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
- break;
- case GL_POINT_SIZE_MIN_EXT:
- params[0] = ctx->Point.MinSize;
- break;
- case GL_POINT_SIZE_MAX_EXT:
- params[0] = ctx->Point.MaxSize;
- break;
- case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
- params[0] = ctx->Point.Threshold;
- break;
- case GL_DISTANCE_ATTENUATION_EXT:
- params[0] = ctx->Point.Params[0];
- params[1] = ctx->Point.Params[1];
- params[2] = ctx->Point.Params[2];
- break;
- case GL_POLYGON_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
- params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
- break;
- case GL_POLYGON_OFFSET_BIAS_EXT:
- params[0] = ctx->Polygon.OffsetUnits;
- break;
- case GL_POLYGON_OFFSET_FACTOR:
- params[0] = ctx->Polygon.OffsetFactor ;
- break;
- case GL_POLYGON_OFFSET_UNITS:
- params[0] = ctx->Polygon.OffsetUnits ;
- break;
- case GL_POLYGON_OFFSET_POINT:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetPoint);
- break;
- case GL_POLYGON_OFFSET_LINE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetLine);
- break;
- case GL_POLYGON_OFFSET_FILL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetFill);
- break;
- case GL_POLYGON_SMOOTH:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
- break;
- case GL_POLYGON_SMOOTH_HINT:
- params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
- break;
- case GL_POLYGON_STIPPLE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
- break;
- case GL_PROJECTION_MATRIX:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[1];
- params[2] = matrix[2];
- params[3] = matrix[3];
- params[4] = matrix[4];
- params[5] = matrix[5];
- params[6] = matrix[6];
- params[7] = matrix[7];
- params[8] = matrix[8];
- params[9] = matrix[9];
- params[10] = matrix[10];
- params[11] = matrix[11];
- params[12] = matrix[12];
- params[13] = matrix[13];
- params[14] = matrix[14];
- params[15] = matrix[15];
- }
- break;
- case GL_PROJECTION_STACK_DEPTH:
- params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
- break;
- case GL_READ_BUFFER:
- params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
- break;
- case GL_RED_BIAS:
- params[0] = ctx->Pixel.RedBias;
- break;
- case GL_RED_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.redBits);
- break;
- case GL_RED_SCALE:
- params[0] = ctx->Pixel.RedScale;
- break;
- case GL_RENDER_MODE:
- params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
- break;
- case GL_RESCALE_NORMAL:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
- break;
- case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
- break;
- case GL_SCISSOR_BOX:
- params[0] = (GLfloat)(ctx->Scissor.X);
- params[1] = (GLfloat)(ctx->Scissor.Y);
- params[2] = (GLfloat)(ctx->Scissor.Width);
- params[3] = (GLfloat)(ctx->Scissor.Height);
- break;
- case GL_SCISSOR_TEST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
- break;
- case GL_SELECTION_BUFFER_SIZE:
- params[0] = (GLfloat)(ctx->Select.BufferSize);
- break;
- case GL_SHADE_MODEL:
- params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
- break;
- case GL_SHARED_TEXTURE_PALETTE_EXT:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
- break;
- case GL_STENCIL_BITS:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
- break;
- case GL_STENCIL_CLEAR_VALUE:
- params[0] = (GLfloat)(ctx->Stencil.Clear);
- break;
- case GL_STENCIL_FAIL:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_FUNC:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_REF:
- params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_TEST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
- break;
- case GL_STENCIL_VALUE_MASK:
- params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_WRITEMASK:
- params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STEREO:
- params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
- break;
- case GL_SUBPIXEL_BITS:
- params[0] = (GLfloat)(ctx->Const.SubPixelBits);
- break;
- case GL_TEXTURE_1D:
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
- break;
- case GL_TEXTURE_2D:
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
- break;
- case GL_TEXTURE_3D:
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
- break;
- case GL_TEXTURE_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D_ARRAY_EXT));
- break;
- case GL_TEXTURE_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
- break;
- case GL_TEXTURE_BINDING_1D:
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D:
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_3D:
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetFloatv");
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetFloatv");
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_GEN_S:
- params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_T:
- params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_R:
- params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_Q:
- params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_MATRIX:
- {
- const GLfloat *matrix;
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)",
- unit);
- return;
- }
- matrix = ctx->TextureMatrixStack[unit].Top->m;
- params[0] = matrix[0];
- params[1] = matrix[1];
- params[2] = matrix[2];
- params[3] = matrix[3];
- params[4] = matrix[4];
- params[5] = matrix[5];
- params[6] = matrix[6];
- params[7] = matrix[7];
- params[8] = matrix[8];
- params[9] = matrix[9];
- params[10] = matrix[10];
- params[11] = matrix[11];
- params[12] = matrix[12];
- params[13] = matrix[13];
- params[14] = matrix[14];
- params[15] = matrix[15];
- }
- break;
- case GL_TEXTURE_STACK_DEPTH:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(texture stack depth, unit %u)", unit);
- return;
- }
- params[0] = (GLfloat)(ctx->TextureMatrixStack[unit].Depth + 1);
- }
- break;
- case GL_UNPACK_ALIGNMENT:
- params[0] = (GLfloat)(ctx->Unpack.Alignment);
- break;
- case GL_UNPACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
- break;
- case GL_UNPACK_ROW_LENGTH:
- params[0] = (GLfloat)(ctx->Unpack.RowLength);
- break;
- case GL_UNPACK_SKIP_PIXELS:
- params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
- break;
- case GL_UNPACK_SKIP_ROWS:
- params[0] = (GLfloat)(ctx->Unpack.SkipRows);
- break;
- case GL_UNPACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
- break;
- case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = (GLfloat)(ctx->Unpack.SkipImages);
- break;
- case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
- break;
- case GL_UNPACK_CLIENT_STORAGE_APPLE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
- break;
- case GL_VIEWPORT:
- params[0] = (GLfloat)(ctx->Viewport.X);
- params[1] = (GLfloat)(ctx->Viewport.Y);
- params[2] = (GLfloat)(ctx->Viewport.Width);
- params[3] = (GLfloat)(ctx->Viewport.Height);
- break;
- case GL_ZOOM_X:
- params[0] = ctx->Pixel.ZoomX;
- break;
- case GL_ZOOM_Y:
- params[0] = ctx->Pixel.ZoomY;
- break;
- case GL_VERTEX_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
- break;
- case GL_VERTEX_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
- break;
- case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
- break;
- case GL_VERTEX_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
- break;
- case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
- break;
- case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
- break;
- case GL_NORMAL_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
- break;
- case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_COLOR_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
- break;
- case GL_COLOR_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
- break;
- case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
- break;
- case GL_COLOR_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
- break;
- case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_INDEX_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
- break;
- case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
- break;
- case GL_INDEX_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
- break;
- case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_TEXTURE_COORD_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
- break;
- case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
- break;
- case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
- break;
- case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
- break;
- case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_EDGE_FLAG_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
- break;
- case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
- break;
- case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = (GLfloat)(0);
- break;
- case GL_MAX_TEXTURE_UNITS_ARB:
- CHECK_EXT1(ARB_multitexture, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
- break;
- case GL_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetFloatv");
- params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
- break;
- case GL_CLIENT_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetFloatv");
- params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
- break;
- case GL_TEXTURE_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
- break;
- case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
- break;
- case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
- params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
- break;
- case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = (GLfloat)(ctx->Hint.TextureCompression);
- break;
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
- break;
- case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
- {
- GLint formats[100];
- GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
- ASSERT(n <= 100);
- for (i = 0; i < n; i++)
- params[i] = ENUM_TO_FLOAT(formats[i]);
- }
- break;
- case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.LockFirst);
- break;
- case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.LockCount);
- break;
- case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[4];
- params[2] = matrix[8];
- params[3] = matrix[12];
- params[4] = matrix[1];
- params[5] = matrix[5];
- params[6] = matrix[9];
- params[7] = matrix[13];
- params[8] = matrix[2];
- params[9] = matrix[6];
- params[10] = matrix[10];
- params[11] = matrix[14];
- params[12] = matrix[3];
- params[13] = matrix[7];
- params[14] = matrix[11];
- params[15] = matrix[15];
- }
- break;
- case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[4];
- params[2] = matrix[8];
- params[3] = matrix[12];
- params[4] = matrix[1];
- params[5] = matrix[5];
- params[6] = matrix[9];
- params[7] = matrix[13];
- params[8] = matrix[2];
- params[9] = matrix[6];
- params[10] = matrix[10];
- params[11] = matrix[14];
- params[12] = matrix[3];
- params[13] = matrix[7];
- params[14] = matrix[11];
- params[15] = matrix[15];
- }
- break;
- case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[4];
- params[2] = matrix[8];
- params[3] = matrix[12];
- params[4] = matrix[1];
- params[5] = matrix[5];
- params[6] = matrix[9];
- params[7] = matrix[13];
- params[8] = matrix[2];
- params[9] = matrix[6];
- params[10] = matrix[10];
- params[11] = matrix[14];
- params[12] = matrix[3];
- params[13] = matrix[7];
- params[14] = matrix[11];
- params[15] = matrix[15];
- }
- break;
- case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
- params[0] = matrix[0];
- params[1] = matrix[4];
- params[2] = matrix[8];
- params[3] = matrix[12];
- params[4] = matrix[1];
- params[5] = matrix[5];
- params[6] = matrix[9];
- params[7] = matrix[13];
- params[8] = matrix[2];
- params[9] = matrix[6];
- params[10] = matrix[10];
- params[11] = matrix[14];
- params[12] = matrix[3];
- params[13] = matrix[7];
- params[14] = matrix[11];
- params[15] = matrix[15];
- }
- break;
- case GL_COLOR_MATRIX_SGI:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = matrix[0];
- params[1] = matrix[1];
- params[2] = matrix[2];
- params[3] = matrix[3];
- params[4] = matrix[4];
- params[5] = matrix[5];
- params[6] = matrix[6];
- params[7] = matrix[7];
- params[8] = matrix[8];
- params[9] = matrix[9];
- params[10] = matrix[10];
- params[11] = matrix[11];
- params[12] = matrix[12];
- params[13] = matrix[13];
- params[14] = matrix[14];
- params[15] = matrix[15];
- }
- break;
- case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
- break;
- case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
- break;
- case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- params[0] = ctx->Pixel.PostColorMatrixScale[0];
- break;
- case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- params[0] = ctx->Pixel.PostColorMatrixScale[1];
- break;
- case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- params[0] = ctx->Pixel.PostColorMatrixScale[2];
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- params[0] = ctx->Pixel.PostColorMatrixScale[3];
- break;
- case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- params[0] = ctx->Pixel.PostColorMatrixBias[0];
- break;
- case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- params[0] = ctx->Pixel.PostColorMatrixBias[1];
- break;
- case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- params[0] = ctx->Pixel.PostColorMatrixBias[2];
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- params[0] = ctx->Pixel.PostColorMatrixBias[3];
- break;
- case GL_CONVOLUTION_1D_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
- break;
- case GL_CONVOLUTION_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
- break;
- case GL_SEPARABLE_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
- break;
- case GL_POST_CONVOLUTION_RED_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionScale[0];
- break;
- case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionScale[1];
- break;
- case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionScale[2];
- break;
- case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionScale[3];
- break;
- case GL_POST_CONVOLUTION_RED_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionBias[0];
- break;
- case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionBias[1];
- break;
- case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionBias[2];
- break;
- case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetFloatv");
- params[0] = ctx->Pixel.PostConvolutionBias[3];
- break;
- case GL_HISTOGRAM:
- CHECK_EXT1(EXT_histogram, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
- break;
- case GL_MINMAX:
- CHECK_EXT1(EXT_histogram, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
- break;
- case GL_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]);
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]);
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]);
- break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
- break;
- case GL_COLOR_SUM_EXT:
- CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
- break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
- params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
- params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
- params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
- }
- break;
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
- break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
- break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
- break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
- break;
- case GL_CURRENT_FOG_COORDINATE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
- }
- break;
- case GL_FOG_COORDINATE_ARRAY_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
- break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
- break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
- break;
- case GL_FOG_COORDINATE_SOURCE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
- break;
- case GL_MAX_TEXTURE_LOD_BIAS_EXT:
- CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
- params[0] = ctx->Const.MaxTextureLodBias;
- break;
- case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
- CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
- params[0] = ctx->Const.MaxTextureMaxAnisotropy;
- break;
- case GL_MULTISAMPLE_ARB:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
- break;
- case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
- break;
- case GL_SAMPLE_ALPHA_TO_ONE_ARB:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
- break;
- case GL_SAMPLE_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
- break;
- case GL_SAMPLE_COVERAGE_VALUE_ARB:
- params[0] = ctx->Multisample.SampleCoverageValue;
- break;
- case GL_SAMPLE_COVERAGE_INVERT_ARB:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
- break;
- case GL_SAMPLE_BUFFERS_ARB:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
- break;
- case GL_SAMPLES_ARB:
- params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
- break;
- case GL_RASTER_POSITION_UNCLIPPED_IBM:
- CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
- break;
- case GL_POINT_SPRITE_NV:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
- break;
- case GL_POINT_SPRITE_R_MODE_NV:
- CHECK_EXT1(NV_point_sprite, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
- break;
- case GL_POINT_SPRITE_COORD_ORIGIN:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
- break;
- case GL_GENERATE_MIPMAP_HINT_SGIS:
- CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
- break;
- case GL_VERTEX_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
- break;
- case GL_VERTEX_ATTRIB_ARRAY0_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY1_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY2_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY3_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY5_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY6_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY7_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY8_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY9_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY10_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY11_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY12_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY13_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY14_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY15_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
- break;
- case GL_MAP1_VERTEX_ATTRIB0_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
- break;
- case GL_MAP1_VERTEX_ATTRIB1_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
- break;
- case GL_MAP1_VERTEX_ATTRIB2_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
- break;
- case GL_MAP1_VERTEX_ATTRIB3_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
- break;
- case GL_MAP1_VERTEX_ATTRIB4_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
- break;
- case GL_MAP1_VERTEX_ATTRIB5_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
- break;
- case GL_MAP1_VERTEX_ATTRIB6_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
- break;
- case GL_MAP1_VERTEX_ATTRIB7_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
- break;
- case GL_MAP1_VERTEX_ATTRIB8_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
- break;
- case GL_MAP1_VERTEX_ATTRIB9_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
- break;
- case GL_MAP1_VERTEX_ATTRIB10_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
- break;
- case GL_MAP1_VERTEX_ATTRIB11_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
- break;
- case GL_MAP1_VERTEX_ATTRIB12_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
- break;
- case GL_MAP1_VERTEX_ATTRIB13_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
- break;
- case GL_MAP1_VERTEX_ATTRIB14_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
- break;
- case GL_MAP1_VERTEX_ATTRIB15_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
- break;
- case GL_FRAGMENT_PROGRAM_NV:
- CHECK_EXT1(NV_fragment_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
- break;
- case GL_FRAGMENT_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_fragment_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
- break;
- case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
- CHECK_EXT1(NV_fragment_program, "GetFloatv");
- params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
- break;
- case GL_TEXTURE_BINDING_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
- params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
- break;
- case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
- break;
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
- break;
- case GL_ACTIVE_STENCIL_FACE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
- break;
- case GL_MAX_SHININESS_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
- params[0] = ctx->Const.MaxShininess;
- break;
- case GL_MAX_SPOT_EXPONENT_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
- params[0] = ctx->Const.MaxSpotExponent;
- break;
- case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
- break;
- case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
- break;
- case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
- break;
- case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
- break;
- case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
- break;
- case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
- break;
- case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
- break;
- case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
- break;
- case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
- break;
- case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
- break;
- case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
- break;
- case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
- break;
- case GL_VERTEX_PROGRAM_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
- break;
- case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
- break;
- case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
- break;
- case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
- break;
- case GL_MAX_PROGRAM_MATRICES_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
- break;
- case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
- break;
- case GL_CURRENT_MATRIX_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = matrix[0];
- params[1] = matrix[1];
- params[2] = matrix[2];
- params[3] = matrix[3];
- params[4] = matrix[4];
- params[5] = matrix[5];
- params[6] = matrix[6];
- params[7] = matrix[7];
- params[8] = matrix[8];
- params[9] = matrix[9];
- params[10] = matrix[10];
- params[11] = matrix[11];
- params[12] = matrix[12];
- params[13] = matrix[13];
- params[14] = matrix[14];
- params[15] = matrix[15];
- }
- break;
- case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
- CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = matrix[0];
- params[1] = matrix[4];
- params[2] = matrix[8];
- params[3] = matrix[12];
- params[4] = matrix[1];
- params[5] = matrix[5];
- params[6] = matrix[9];
- params[7] = matrix[13];
- params[8] = matrix[2];
- params[9] = matrix[6];
- params[10] = matrix[10];
- params[11] = matrix[14];
- params[12] = matrix[3];
- params[13] = matrix[7];
- params[14] = matrix[11];
- params[15] = matrix[15];
- }
- break;
- case GL_MAX_VERTEX_ATTRIBS_ARB:
- CHECK_EXT1(ARB_vertex_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
- break;
- case GL_PROGRAM_ERROR_POSITION_ARB:
- CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Program.ErrorPos);
- break;
- case GL_FRAGMENT_PROGRAM_ARB:
- CHECK_EXT1(ARB_fragment_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
- break;
- case GL_MAX_TEXTURE_COORDS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
- break;
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
- break;
- case GL_DEPTH_BOUNDS_TEST_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
- break;
- case GL_DEPTH_BOUNDS_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
- params[0] = ctx->Depth.BoundsMin;
- params[1] = ctx->Depth.BoundsMax;
- break;
- case GL_DEPTH_CLAMP:
- CHECK_EXT1(ARB_depth_clamp, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.DepthClamp);
- break;
- case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
- break;
- case GL_DRAW_BUFFER0_ARB:
- params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_DRAW_BUFFER1_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
- params[0] = ENUM_TO_FLOAT(buffer);
- }
- break;
- case GL_DRAW_BUFFER2_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
- params[0] = ENUM_TO_FLOAT(buffer);
- }
- break;
- case GL_DRAW_BUFFER3_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
- params[0] = ENUM_TO_FLOAT(buffer);
- }
- break;
- case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- CHECK_EXT1(OES_read_format, "GetFloatv");
- params[0] = (GLfloat)(_mesa_get_color_read_type(ctx));
- break;
- case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- CHECK_EXT1(OES_read_format, "GetFloatv");
- params[0] = (GLfloat)(_mesa_get_color_read_format(ctx));
- break;
- case GL_NUM_FRAGMENT_REGISTERS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(6);
- break;
- case GL_NUM_FRAGMENT_CONSTANTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(8);
- break;
- case GL_NUM_PASSES_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(2);
- break;
- case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(8);
- break;
- case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(16);
- break;
- case GL_COLOR_ALPHA_PAIRING_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
- break;
- case GL_NUM_LOOPBACK_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(3);
- break;
- case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(3);
- break;
- case GL_STENCIL_BACK_FUNC:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
- break;
- case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
- break;
- case GL_STENCIL_BACK_WRITEMASK:
- params[0] = (GLfloat)(ctx->Stencil.WriteMask[1]);
- break;
- case GL_STENCIL_BACK_REF:
- params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
- break;
- case GL_STENCIL_BACK_FAIL:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
- break;
- case GL_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->DrawBuffer->Name);
- break;
- case GL_RENDERBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
- break;
- case GL_MAX_COLOR_ATTACHMENTS_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
- break;
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
- break;
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_blit, "GetFloatv");
- params[0] = (GLfloat)(ctx->ReadBuffer->Name);
- break;
- case GL_PROVOKING_VERTEX_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ProvokingVertex);
- break;
- case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Const.QuadsFollowProvokingVertexConvention);
- break;
- case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.FragmentProgram.MaxUniformComponents);
- break;
- case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
- break;
- case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxUniformComponents);
- break;
- case GL_MAX_VARYING_FLOATS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxVarying * 4);
- break;
- case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxVertexTextureImageUnits);
- break;
- case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxCombinedTextureImageUnits);
- break;
- case GL_CURRENT_PROGRAM:
- CHECK_EXT1(ARB_shader_objects, "GetFloatv");
- params[0] = (GLfloat)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
- break;
- case GL_MAX_SAMPLES:
- CHECK_EXT1(ARB_framebuffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxSamples);
- break;
- case GL_VERTEX_ARRAY_BINDING_APPLE:
- CHECK_EXT1(APPLE_vertex_array_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.ArrayObj->Name);
- break;
- case GL_TEXTURE_CUBE_MAP_SEAMLESS:
- CHECK_EXT1(ARB_seamless_cube_map, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.CubeMapSeamless);
- break;
- case GL_MAX_SERVER_WAIT_TIMEOUT:
- CHECK_EXT1(ARB_sync, "GetFloatv");
- params[0] = (GLfloat)(ctx->Const.MaxServerWaitTimeout);
- break;
- case GL_NUM_EXTENSIONS:
- params[0] = (GLfloat)(_mesa_get_extension_count(ctx));
- break;
- case GL_MAJOR_VERSION:
- params[0] = (GLfloat)(ctx->VersionMajor);
- break;
- case GL_MINOR_VERSION:
- params[0] = (GLfloat)(ctx->VersionMinor);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
+ case TYPE_INT_4:
+ params[3] = (GLfloat) (((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = (GLfloat) (((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = (GLfloat) (((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = (GLfloat) (((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_FLOAT(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_FLOAT(*(GLboolean*) p);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[i];
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[transpose[i]];
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = BOOLEAN_TO_FLOAT((*(GLbitfield *) p >> shift) & 1);
+ break;
}
}
void GLAPIENTRY
-_mesa_GetIntegerv( GLenum pname, GLint *params )
+_mesa_GetIntegerv(GLenum pname, GLint *params)
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
- if (!params)
- return;
+ d = find_value("glGetIntegerv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
- if (ctx->NewState)
- _mesa_update_state(ctx);
+ case TYPE_FLOAT_4:
+ params[3] = IROUND(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ params[2] = IROUND(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ params[1] = IROUND(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ params[0] = IROUND(((GLfloat *) p)[0]);
+ break;
- if (ctx->Driver.GetIntegerv &&
- ctx->Driver.GetIntegerv(ctx, pname, params))
- return;
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_INT(((GLfloat *) p)[3]);
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_INT(((GLfloat *) p)[2]);
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_INT(((GLfloat *) p)[1]);
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_INT(((GLfloat *) p)[0]);
+ break;
- switch (pname) {
- case GL_ACCUM_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumRedBits;
- break;
- case GL_ACCUM_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
- break;
- case GL_ACCUM_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
- break;
- case GL_ACCUM_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
- break;
- case GL_ACCUM_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
- params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
- params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
- params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
- break;
- case GL_ALPHA_BIAS:
- params[0] = IROUND(ctx->Pixel.AlphaBias);
- break;
- case GL_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.alphaBits;
- break;
- case GL_ALPHA_SCALE:
- params[0] = IROUND(ctx->Pixel.AlphaScale);
- break;
- case GL_ALPHA_TEST:
- params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
- break;
- case GL_ALPHA_TEST_FUNC:
- params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
- break;
- case GL_ALPHA_TEST_REF:
- params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
- break;
- case GL_ATTRIB_STACK_DEPTH:
- params[0] = ctx->AttribStackDepth;
- break;
- case GL_AUTO_NORMAL:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
- break;
- case GL_AUX_BUFFERS:
- params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
- break;
- case GL_BLEND:
- params[0] = BOOLEAN_TO_INT((ctx->Color.BlendEnabled & 1));
- break;
- case GL_BLEND_DST:
- params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC:
- params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_SRC_RGB_EXT:
- params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_DST_RGB_EXT:
- params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC_ALPHA_EXT:
- params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
- break;
- case GL_BLEND_DST_ALPHA_EXT:
- params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
- break;
- case GL_BLEND_EQUATION:
- params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
- break;
- case GL_BLEND_EQUATION_ALPHA_EXT:
- params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
- break;
- case GL_BLEND_COLOR_EXT:
- params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
- params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
- params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
- params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
- break;
- case GL_BLUE_BIAS:
- params[0] = IROUND(ctx->Pixel.BlueBias);
- break;
- case GL_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.blueBits;
- break;
- case GL_BLUE_SCALE:
- params[0] = IROUND(ctx->Pixel.BlueScale);
- break;
- case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = ctx->ClientAttribStackDepth;
- break;
- case GL_CLIP_PLANE0:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
- break;
- case GL_CLIP_PLANE1:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
- break;
- case GL_CLIP_PLANE2:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
- break;
- case GL_CLIP_PLANE3:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
- break;
- case GL_CLIP_PLANE4:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
- break;
- case GL_CLIP_PLANE5:
- params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
- break;
- case GL_COLOR_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
- params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
- params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
- params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
- break;
- case GL_COLOR_MATERIAL:
- params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
- break;
- case GL_COLOR_MATERIAL_FACE:
- params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
- break;
- case GL_COLOR_MATERIAL_PARAMETER:
- params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
- break;
- case GL_COLOR_WRITEMASK:
- params[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0;
- params[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0;
- params[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0;
- params[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0;
- break;
- case GL_CULL_FACE:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
- break;
- case GL_CULL_FACE_MODE:
- params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
- break;
- case GL_CURRENT_COLOR:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
- params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
- params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
- params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
- }
- break;
- case GL_CURRENT_INDEX:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
- }
- break;
- case GL_CURRENT_NORMAL:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
- params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
- params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
- }
- break;
- case GL_CURRENT_RASTER_COLOR:
- params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
- params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
- params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
- params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
- break;
- case GL_CURRENT_RASTER_DISTANCE:
- params[0] = IROUND(ctx->Current.RasterDistance);
- break;
- case GL_CURRENT_RASTER_INDEX:
- params[0] = IROUND(1.0);
- break;
- case GL_CURRENT_RASTER_POSITION:
- params[0] = IROUND(ctx->Current.RasterPos[0]);
- params[1] = IROUND(ctx->Current.RasterPos[1]);
- params[2] = IROUND(ctx->Current.RasterPos[2]);
- params[3] = IROUND(ctx->Current.RasterPos[3]);
- break;
- case GL_CURRENT_RASTER_SECONDARY_COLOR:
- params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
- params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
- params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
- params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
- break;
- case GL_CURRENT_RASTER_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(raster tex coords, unit %u)", unit);
- return;
- }
- params[0] = IROUND(ctx->Current.RasterTexCoords[unit][0]);
- params[1] = IROUND(ctx->Current.RasterTexCoords[unit][1]);
- params[2] = IROUND(ctx->Current.RasterTexCoords[unit][2]);
- params[3] = IROUND(ctx->Current.RasterTexCoords[unit][3]);
- }
- break;
- case GL_CURRENT_RASTER_POSITION_VALID:
- params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
- break;
- case GL_CURRENT_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(current tex coords, unit %u)", unit);
- return;
- }
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]);
- params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]);
- params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]);
- params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]);
- }
- break;
- case GL_DEPTH_BIAS:
- params[0] = IROUND(ctx->Pixel.DepthBias);
- break;
- case GL_DEPTH_BITS:
- params[0] = ctx->DrawBuffer->Visual.depthBits;
- break;
- case GL_DEPTH_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT(((GLfloat) ctx->Depth.Clear));
- break;
- case GL_DEPTH_FUNC:
- params[0] = ENUM_TO_INT(ctx->Depth.Func);
- break;
- case GL_DEPTH_RANGE:
- params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
- params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
- break;
- case GL_DEPTH_SCALE:
- params[0] = IROUND(ctx->Pixel.DepthScale);
- break;
- case GL_DEPTH_TEST:
- params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
- break;
- case GL_DEPTH_WRITEMASK:
- params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
- break;
- case GL_DITHER:
- params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
- break;
- case GL_DOUBLEBUFFER:
- params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
- break;
- case GL_DRAW_BUFFER:
- params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_EDGE_FLAG:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = BOOLEAN_TO_INT((ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0));
- }
- break;
- case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = ctx->Feedback.BufferSize;
- break;
- case GL_FEEDBACK_BUFFER_TYPE:
- params[0] = ENUM_TO_INT(ctx->Feedback.Type);
- break;
- case GL_FOG:
- params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
- break;
- case GL_FOG_COLOR:
- params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
- params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
- params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
- params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
- break;
- case GL_FOG_DENSITY:
- params[0] = IROUND(ctx->Fog.Density);
- break;
- case GL_FOG_END:
- params[0] = IROUND(ctx->Fog.End);
- break;
- case GL_FOG_HINT:
- params[0] = ENUM_TO_INT(ctx->Hint.Fog);
- break;
- case GL_FOG_INDEX:
- params[0] = IROUND(ctx->Fog.Index);
- break;
- case GL_FOG_MODE:
- params[0] = ENUM_TO_INT(ctx->Fog.Mode);
- break;
- case GL_FOG_START:
- params[0] = IROUND(ctx->Fog.Start);
- break;
- case GL_FRONT_FACE:
- params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
- break;
- case GL_GREEN_BIAS:
- params[0] = IROUND(ctx->Pixel.GreenBias);
- break;
- case GL_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.greenBits;
- break;
- case GL_GREEN_SCALE:
- params[0] = IROUND(ctx->Pixel.GreenScale);
- break;
- case GL_INDEX_BITS:
- params[0] = ctx->DrawBuffer->Visual.indexBits;
- break;
- case GL_INDEX_CLEAR_VALUE:
- params[0] = ctx->Color.ClearIndex;
- break;
- case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_INT(GL_FALSE);
- break;
- case GL_INDEX_OFFSET:
- params[0] = ctx->Pixel.IndexOffset;
- break;
- case GL_INDEX_SHIFT:
- params[0] = ctx->Pixel.IndexShift;
- break;
- case GL_INDEX_WRITEMASK:
- params[0] = ctx->Color.IndexMask;
- break;
- case GL_LIGHT0:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
- break;
- case GL_LIGHT1:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
- break;
- case GL_LIGHT2:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
- break;
- case GL_LIGHT3:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
- break;
- case GL_LIGHT4:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
- break;
- case GL_LIGHT5:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
- break;
- case GL_LIGHT6:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
- break;
- case GL_LIGHT7:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
- break;
- case GL_LIGHTING:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
- break;
- case GL_LIGHT_MODEL_AMBIENT:
- params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
- params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
- params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
- params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
- break;
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
- break;
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
- break;
- case GL_LIGHT_MODEL_TWO_SIDE:
- params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
- break;
- case GL_LINE_SMOOTH:
- params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
- break;
- case GL_LINE_SMOOTH_HINT:
- params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
- break;
- case GL_LINE_STIPPLE:
- params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
- break;
- case GL_LINE_STIPPLE_PATTERN:
- params[0] = ctx->Line.StipplePattern;
- break;
- case GL_LINE_STIPPLE_REPEAT:
- params[0] = ctx->Line.StippleFactor;
- break;
- case GL_LINE_WIDTH:
- params[0] = IROUND(ctx->Line.Width);
- break;
- case GL_LINE_WIDTH_GRANULARITY:
- params[0] = IROUND(ctx->Const.LineWidthGranularity);
- break;
- case GL_LINE_WIDTH_RANGE:
- params[0] = IROUND(ctx->Const.MinLineWidthAA);
- params[1] = IROUND(ctx->Const.MaxLineWidthAA);
- break;
- case GL_ALIASED_LINE_WIDTH_RANGE:
- params[0] = IROUND(ctx->Const.MinLineWidth);
- params[1] = IROUND(ctx->Const.MaxLineWidth);
- break;
- case GL_LIST_BASE:
- params[0] = ctx->List.ListBase;
- break;
- case GL_LIST_INDEX:
- params[0] = (ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0);
- break;
- case GL_LIST_MODE:
- {
- GLenum mode;
- if (!ctx->CompileFlag)
- mode = 0;
- else if (ctx->ExecuteFlag)
- mode = GL_COMPILE_AND_EXECUTE;
- else
- mode = GL_COMPILE;
- params[0] = ENUM_TO_INT(mode);
- }
- break;
- case GL_INDEX_LOGIC_OP:
- params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
- break;
- case GL_COLOR_LOGIC_OP:
- params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
- break;
- case GL_LOGIC_OP_MODE:
- params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
- break;
- case GL_MAP1_COLOR_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
- break;
- case GL_MAP1_GRID_DOMAIN:
- params[0] = IROUND(ctx->Eval.MapGrid1u1);
- params[1] = IROUND(ctx->Eval.MapGrid1u2);
- break;
- case GL_MAP1_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid1un;
- break;
- case GL_MAP1_INDEX:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
- break;
- case GL_MAP1_NORMAL:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
- break;
- case GL_MAP1_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
- break;
- case GL_MAP1_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
- break;
- case GL_MAP1_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
- break;
- case GL_MAP1_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
- break;
- case GL_MAP1_VERTEX_3:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
- break;
- case GL_MAP1_VERTEX_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
- break;
- case GL_MAP2_COLOR_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
- break;
- case GL_MAP2_GRID_DOMAIN:
- params[0] = IROUND(ctx->Eval.MapGrid2u1);
- params[1] = IROUND(ctx->Eval.MapGrid2u2);
- params[2] = IROUND(ctx->Eval.MapGrid2v1);
- params[3] = IROUND(ctx->Eval.MapGrid2v2);
- break;
- case GL_MAP2_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid2un;
- params[1] = ctx->Eval.MapGrid2vn;
- break;
- case GL_MAP2_INDEX:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
- break;
- case GL_MAP2_NORMAL:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
- break;
- case GL_MAP2_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
- break;
- case GL_MAP2_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
- break;
- case GL_MAP2_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
- break;
- case GL_MAP2_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
- break;
- case GL_MAP2_VERTEX_3:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
- break;
- case GL_MAP2_VERTEX_4:
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
- break;
- case GL_MAP_COLOR:
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
- break;
- case GL_MAP_STENCIL:
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
- break;
- case GL_MATRIX_MODE:
- params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
- break;
- case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = MAX_ATTRIB_STACK_DEPTH;
- break;
- case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
- break;
- case GL_MAX_CLIP_PLANES:
- params[0] = ctx->Const.MaxClipPlanes;
- break;
- case GL_MAX_ELEMENTS_VERTICES:
- params[0] = ctx->Const.MaxArrayLockSize;
- break;
- case GL_MAX_ELEMENTS_INDICES:
- params[0] = ctx->Const.MaxArrayLockSize;
- break;
- case GL_MAX_EVAL_ORDER:
- params[0] = MAX_EVAL_ORDER;
- break;
- case GL_MAX_LIGHTS:
- params[0] = ctx->Const.MaxLights;
- break;
- case GL_MAX_LIST_NESTING:
- params[0] = MAX_LIST_NESTING;
- break;
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = MAX_MODELVIEW_STACK_DEPTH;
- break;
- case GL_MAX_NAME_STACK_DEPTH:
- params[0] = MAX_NAME_STACK_DEPTH;
- break;
- case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = MAX_PIXEL_MAP_TABLE;
- break;
- case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = MAX_PROJECTION_STACK_DEPTH;
- break;
- case GL_MAX_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
- break;
- case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
- break;
- case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = MAX_TEXTURE_STACK_DEPTH;
- break;
- case GL_MAX_VIEWPORT_DIMS:
- params[0] = ctx->Const.MaxViewportWidth;
- params[1] = ctx->Const.MaxViewportHeight;
- break;
- case GL_MODELVIEW_MATRIX:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[1]);
- params[2] = IROUND(matrix[2]);
- params[3] = IROUND(matrix[3]);
- params[4] = IROUND(matrix[4]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[6]);
- params[7] = IROUND(matrix[7]);
- params[8] = IROUND(matrix[8]);
- params[9] = IROUND(matrix[9]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[11]);
- params[12] = IROUND(matrix[12]);
- params[13] = IROUND(matrix[13]);
- params[14] = IROUND(matrix[14]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_MODELVIEW_STACK_DEPTH:
- params[0] = ctx->ModelviewMatrixStack.Depth + 1;
- break;
- case GL_NAME_STACK_DEPTH:
- params[0] = ctx->Select.NameStackDepth;
- break;
- case GL_NORMALIZE:
- params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
- break;
- case GL_PACK_ALIGNMENT:
- params[0] = ctx->Pack.Alignment;
- break;
- case GL_PACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
- break;
- case GL_PACK_ROW_LENGTH:
- params[0] = ctx->Pack.RowLength;
- break;
- case GL_PACK_SKIP_PIXELS:
- params[0] = ctx->Pack.SkipPixels;
- break;
- case GL_PACK_SKIP_ROWS:
- params[0] = ctx->Pack.SkipRows;
- break;
- case GL_PACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
- break;
- case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Pack.SkipImages;
- break;
- case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Pack.ImageHeight;
- break;
- case GL_PACK_INVERT_MESA:
- params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
- break;
- case GL_PERSPECTIVE_CORRECTION_HINT:
- params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
- break;
- case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = ctx->PixelMaps.AtoA.Size;
- break;
- case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = ctx->PixelMaps.BtoB.Size;
- break;
- case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = ctx->PixelMaps.GtoG.Size;
- break;
- case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = ctx->PixelMaps.ItoA.Size;
- break;
- case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = ctx->PixelMaps.ItoB.Size;
- break;
- case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = ctx->PixelMaps.ItoG.Size;
- break;
- case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = ctx->PixelMaps.ItoI.Size;
- break;
- case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = ctx->PixelMaps.ItoR.Size;
- break;
- case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = ctx->PixelMaps.RtoR.Size;
- break;
- case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = ctx->PixelMaps.StoS.Size;
- break;
- case GL_POINT_SIZE:
- params[0] = IROUND(ctx->Point.Size);
- break;
- case GL_POINT_SIZE_GRANULARITY:
- params[0] = IROUND(ctx->Const.PointSizeGranularity);
- break;
- case GL_POINT_SIZE_RANGE:
- params[0] = IROUND(ctx->Const.MinPointSizeAA);
- params[1] = IROUND(ctx->Const.MaxPointSizeAA);
- break;
- case GL_ALIASED_POINT_SIZE_RANGE:
- params[0] = IROUND(ctx->Const.MinPointSize);
- params[1] = IROUND(ctx->Const.MaxPointSize);
- break;
- case GL_POINT_SMOOTH:
- params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
- break;
- case GL_POINT_SMOOTH_HINT:
- params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
- break;
- case GL_POINT_SIZE_MIN_EXT:
- params[0] = IROUND(ctx->Point.MinSize);
- break;
- case GL_POINT_SIZE_MAX_EXT:
- params[0] = IROUND(ctx->Point.MaxSize);
- break;
- case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
- params[0] = IROUND(ctx->Point.Threshold);
- break;
- case GL_DISTANCE_ATTENUATION_EXT:
- params[0] = IROUND(ctx->Point.Params[0]);
- params[1] = IROUND(ctx->Point.Params[1]);
- params[2] = IROUND(ctx->Point.Params[2]);
- break;
- case GL_POLYGON_MODE:
- params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
- params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
- break;
- case GL_POLYGON_OFFSET_BIAS_EXT:
- params[0] = IROUND(ctx->Polygon.OffsetUnits);
- break;
- case GL_POLYGON_OFFSET_FACTOR:
- params[0] = IROUND(ctx->Polygon.OffsetFactor );
- break;
- case GL_POLYGON_OFFSET_UNITS:
- params[0] = IROUND(ctx->Polygon.OffsetUnits );
- break;
- case GL_POLYGON_OFFSET_POINT:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetPoint);
- break;
- case GL_POLYGON_OFFSET_LINE:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetLine);
- break;
- case GL_POLYGON_OFFSET_FILL:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetFill);
- break;
- case GL_POLYGON_SMOOTH:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
- break;
- case GL_POLYGON_SMOOTH_HINT:
- params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
- break;
- case GL_POLYGON_STIPPLE:
- params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
- break;
- case GL_PROJECTION_MATRIX:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[1]);
- params[2] = IROUND(matrix[2]);
- params[3] = IROUND(matrix[3]);
- params[4] = IROUND(matrix[4]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[6]);
- params[7] = IROUND(matrix[7]);
- params[8] = IROUND(matrix[8]);
- params[9] = IROUND(matrix[9]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[11]);
- params[12] = IROUND(matrix[12]);
- params[13] = IROUND(matrix[13]);
- params[14] = IROUND(matrix[14]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_PROJECTION_STACK_DEPTH:
- params[0] = ctx->ProjectionMatrixStack.Depth + 1;
- break;
- case GL_READ_BUFFER:
- params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
- break;
- case GL_RED_BIAS:
- params[0] = IROUND(ctx->Pixel.RedBias);
- break;
- case GL_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.redBits;
- break;
- case GL_RED_SCALE:
- params[0] = IROUND(ctx->Pixel.RedScale);
- break;
- case GL_RENDER_MODE:
- params[0] = ENUM_TO_INT(ctx->RenderMode);
- break;
- case GL_RESCALE_NORMAL:
- params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
- break;
- case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_INT(GL_TRUE);
- break;
- case GL_SCISSOR_BOX:
- params[0] = ctx->Scissor.X;
- params[1] = ctx->Scissor.Y;
- params[2] = ctx->Scissor.Width;
- params[3] = ctx->Scissor.Height;
- break;
- case GL_SCISSOR_TEST:
- params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
- break;
- case GL_SELECTION_BUFFER_SIZE:
- params[0] = ctx->Select.BufferSize;
- break;
- case GL_SHADE_MODEL:
- params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
- break;
- case GL_SHARED_TEXTURE_PALETTE_EXT:
- params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
- break;
- case GL_STENCIL_BITS:
- params[0] = ctx->DrawBuffer->Visual.stencilBits;
- break;
- case GL_STENCIL_CLEAR_VALUE:
- params[0] = ctx->Stencil.Clear;
- break;
- case GL_STENCIL_FAIL:
- params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_FUNC:
- params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_REF:
- params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
- break;
- case GL_STENCIL_TEST:
- params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
- break;
- case GL_STENCIL_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
- break;
- case GL_STENCIL_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
- break;
- case GL_STEREO:
- params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
- break;
- case GL_SUBPIXEL_BITS:
- params[0] = ctx->Const.SubPixelBits;
- break;
- case GL_TEXTURE_1D:
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
- break;
- case GL_TEXTURE_2D:
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
- break;
- case GL_TEXTURE_3D:
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
- break;
- case GL_TEXTURE_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D_ARRAY_EXT));
- break;
- case GL_TEXTURE_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
- break;
- case GL_TEXTURE_BINDING_1D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name;
- break;
- case GL_TEXTURE_BINDING_2D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name;
- break;
- case GL_TEXTURE_BINDING_3D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name;
- break;
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetIntegerv");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name;
- break;
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetIntegerv");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name;
- break;
- case GL_TEXTURE_GEN_S:
- params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_T:
- params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_R:
- params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_Q:
- params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_MATRIX:
- {
- const GLfloat *matrix;
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)",
- unit);
- return;
- }
- matrix = ctx->TextureMatrixStack[unit].Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[1]);
- params[2] = IROUND(matrix[2]);
- params[3] = IROUND(matrix[3]);
- params[4] = IROUND(matrix[4]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[6]);
- params[7] = IROUND(matrix[7]);
- params[8] = IROUND(matrix[8]);
- params[9] = IROUND(matrix[9]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[11]);
- params[12] = IROUND(matrix[12]);
- params[13] = IROUND(matrix[13]);
- params[14] = IROUND(matrix[14]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_TEXTURE_STACK_DEPTH:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(texture stack depth, unit %u)", unit);
- return;
- }
- params[0] = ctx->TextureMatrixStack[unit].Depth + 1;
- }
- break;
- case GL_UNPACK_ALIGNMENT:
- params[0] = ctx->Unpack.Alignment;
- break;
- case GL_UNPACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
- break;
- case GL_UNPACK_ROW_LENGTH:
- params[0] = ctx->Unpack.RowLength;
- break;
- case GL_UNPACK_SKIP_PIXELS:
- params[0] = ctx->Unpack.SkipPixels;
- break;
- case GL_UNPACK_SKIP_ROWS:
- params[0] = ctx->Unpack.SkipRows;
- break;
- case GL_UNPACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
- break;
- case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Unpack.SkipImages;
- break;
- case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Unpack.ImageHeight;
- break;
- case GL_UNPACK_CLIENT_STORAGE_APPLE:
- params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
- break;
- case GL_VIEWPORT:
- params[0] = ctx->Viewport.X;
- params[1] = ctx->Viewport.Y;
- params[2] = ctx->Viewport.Width;
- params[3] = ctx->Viewport.Height;
- break;
- case GL_ZOOM_X:
- params[0] = IROUND(ctx->Pixel.ZoomX);
- break;
- case GL_ZOOM_Y:
- params[0] = IROUND(ctx->Pixel.ZoomY);
- break;
- case GL_VERTEX_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
- break;
- case GL_VERTEX_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Vertex.Size;
- break;
- case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
- break;
- case GL_VERTEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Vertex.Stride;
- break;
- case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
- break;
- case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
- break;
- case GL_NORMAL_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Normal.Stride;
- break;
- case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_COLOR_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
- break;
- case GL_COLOR_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Color.Size;
- break;
- case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
- break;
- case GL_COLOR_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Color.Stride;
- break;
- case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_INDEX_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
- break;
- case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
- break;
- case GL_INDEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Index.Stride;
- break;
- case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_TEXTURE_COORD_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
- break;
- case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
- break;
- case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
- break;
- case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
- break;
- case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_EDGE_FLAG_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
- break;
- case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
- break;
- case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = 0;
- break;
- case GL_MAX_TEXTURE_UNITS_ARB:
- CHECK_EXT1(ARB_multitexture, "GetIntegerv");
- params[0] = ctx->Const.MaxTextureUnits;
- break;
- case GL_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetIntegerv");
- params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
- break;
- case GL_CLIENT_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetIntegerv");
- params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
- break;
- case GL_TEXTURE_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
- break;
- case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name;
- break;
- case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
- params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
- break;
- case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = ctx->Hint.TextureCompression;
- break;
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
- break;
- case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
- {
- GLint formats[100];
- GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
- ASSERT(n <= 100);
- for (i = 0; i < n; i++)
- params[i] = ENUM_TO_INT(formats[i]);
- }
- break;
- case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
- params[0] = ctx->Array.LockFirst;
- break;
- case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
- params[0] = ctx->Array.LockCount;
- break;
- case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[4]);
- params[2] = IROUND(matrix[8]);
- params[3] = IROUND(matrix[12]);
- params[4] = IROUND(matrix[1]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[9]);
- params[7] = IROUND(matrix[13]);
- params[8] = IROUND(matrix[2]);
- params[9] = IROUND(matrix[6]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[14]);
- params[12] = IROUND(matrix[3]);
- params[13] = IROUND(matrix[7]);
- params[14] = IROUND(matrix[11]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[4]);
- params[2] = IROUND(matrix[8]);
- params[3] = IROUND(matrix[12]);
- params[4] = IROUND(matrix[1]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[9]);
- params[7] = IROUND(matrix[13]);
- params[8] = IROUND(matrix[2]);
- params[9] = IROUND(matrix[6]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[14]);
- params[12] = IROUND(matrix[3]);
- params[13] = IROUND(matrix[7]);
- params[14] = IROUND(matrix[11]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[4]);
- params[2] = IROUND(matrix[8]);
- params[3] = IROUND(matrix[12]);
- params[4] = IROUND(matrix[1]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[9]);
- params[7] = IROUND(matrix[13]);
- params[8] = IROUND(matrix[2]);
- params[9] = IROUND(matrix[6]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[14]);
- params[12] = IROUND(matrix[3]);
- params[13] = IROUND(matrix[7]);
- params[14] = IROUND(matrix[11]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[4]);
- params[2] = IROUND(matrix[8]);
- params[3] = IROUND(matrix[12]);
- params[4] = IROUND(matrix[1]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[9]);
- params[7] = IROUND(matrix[13]);
- params[8] = IROUND(matrix[2]);
- params[9] = IROUND(matrix[6]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[14]);
- params[12] = IROUND(matrix[3]);
- params[13] = IROUND(matrix[7]);
- params[14] = IROUND(matrix[11]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_SGI:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[1]);
- params[2] = IROUND(matrix[2]);
- params[3] = IROUND(matrix[3]);
- params[4] = IROUND(matrix[4]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[6]);
- params[7] = IROUND(matrix[7]);
- params[8] = IROUND(matrix[8]);
- params[9] = IROUND(matrix[9]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[11]);
- params[12] = IROUND(matrix[12]);
- params[13] = IROUND(matrix[13]);
- params[14] = IROUND(matrix[14]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = ctx->ColorMatrixStack.Depth + 1;
- break;
- case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = MAX_COLOR_STACK_DEPTH;
- break;
- case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
- break;
- case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
- break;
- case GL_CONVOLUTION_1D_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
- break;
- case GL_CONVOLUTION_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
- break;
- case GL_SEPARABLE_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
- break;
- case GL_POST_CONVOLUTION_RED_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
- break;
- case GL_POST_CONVOLUTION_RED_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetIntegerv");
- params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
- break;
- case GL_HISTOGRAM:
- CHECK_EXT1(EXT_histogram, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
- break;
- case GL_MINMAX:
- CHECK_EXT1(EXT_histogram, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
- break;
- case GL_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]);
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]);
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]);
- break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
- break;
- case GL_COLOR_SUM_EXT:
- CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
- break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
- params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
- params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
- params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
- }
- break;
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
- break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
- break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
- break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
- break;
- case GL_CURRENT_FOG_COORDINATE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
- }
- break;
- case GL_FOG_COORDINATE_ARRAY_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
- break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
- break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
- break;
- case GL_FOG_COORDINATE_SOURCE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
- break;
- case GL_MAX_TEXTURE_LOD_BIAS_EXT:
- CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
- params[0] = IROUND(ctx->Const.MaxTextureLodBias);
- break;
- case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
- CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
- params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
- break;
- case GL_MULTISAMPLE_ARB:
- params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
- break;
- case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
- break;
- case GL_SAMPLE_ALPHA_TO_ONE_ARB:
- params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
- break;
- case GL_SAMPLE_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
- break;
- case GL_SAMPLE_COVERAGE_VALUE_ARB:
- params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
- break;
- case GL_SAMPLE_COVERAGE_INVERT_ARB:
- params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
- break;
- case GL_SAMPLE_BUFFERS_ARB:
- params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
- break;
- case GL_SAMPLES_ARB:
- params[0] = ctx->DrawBuffer->Visual.samples;
- break;
- case GL_RASTER_POSITION_UNCLIPPED_IBM:
- CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
- break;
- case GL_POINT_SPRITE_NV:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
- break;
- case GL_POINT_SPRITE_R_MODE_NV:
- CHECK_EXT1(NV_point_sprite, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
- break;
- case GL_POINT_SPRITE_COORD_ORIGIN:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
- break;
- case GL_GENERATE_MIPMAP_HINT_SGIS:
- CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
- break;
- case GL_VERTEX_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
- break;
- case GL_VERTEX_ATTRIB_ARRAY0_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY1_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY2_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY3_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY5_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY6_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY7_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY8_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY9_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY10_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY11_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY12_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY13_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY14_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY15_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
- break;
- case GL_MAP1_VERTEX_ATTRIB0_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
- break;
- case GL_MAP1_VERTEX_ATTRIB1_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
- break;
- case GL_MAP1_VERTEX_ATTRIB2_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
- break;
- case GL_MAP1_VERTEX_ATTRIB3_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
- break;
- case GL_MAP1_VERTEX_ATTRIB4_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
- break;
- case GL_MAP1_VERTEX_ATTRIB5_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
- break;
- case GL_MAP1_VERTEX_ATTRIB6_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
- break;
- case GL_MAP1_VERTEX_ATTRIB7_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
- break;
- case GL_MAP1_VERTEX_ATTRIB8_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
- break;
- case GL_MAP1_VERTEX_ATTRIB9_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
- break;
- case GL_MAP1_VERTEX_ATTRIB10_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
- break;
- case GL_MAP1_VERTEX_ATTRIB11_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
- break;
- case GL_MAP1_VERTEX_ATTRIB12_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
- break;
- case GL_MAP1_VERTEX_ATTRIB13_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
- break;
- case GL_MAP1_VERTEX_ATTRIB14_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
- break;
- case GL_MAP1_VERTEX_ATTRIB15_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
- break;
- case GL_FRAGMENT_PROGRAM_NV:
- CHECK_EXT1(NV_fragment_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
- break;
- case GL_FRAGMENT_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_fragment_program, "GetIntegerv");
- params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
- break;
- case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
- CHECK_EXT1(NV_fragment_program, "GetIntegerv");
- params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
- break;
- case GL_TEXTURE_BINDING_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name;
- break;
- case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
- params[0] = ctx->Const.MaxTextureRectSize;
- break;
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
- break;
- case GL_ACTIVE_STENCIL_FACE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
- break;
- case GL_MAX_SHININESS_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
- params[0] = IROUND(ctx->Const.MaxShininess);
- break;
- case GL_MAX_SPOT_EXPONENT_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
- params[0] = IROUND(ctx->Const.MaxSpotExponent);
- break;
- case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayBufferObj->Name;
- break;
- case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
- break;
- case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
- break;
- case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
- break;
- case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
- break;
- case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
- break;
- case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
- break;
- case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
- break;
- case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
- break;
- case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ElementArrayBufferObj->Name;
- break;
- case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
- params[0] = ctx->Pack.BufferObj->Name;
- break;
- case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
- params[0] = ctx->Unpack.BufferObj->Name;
- break;
- case GL_VERTEX_PROGRAM_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
- break;
- case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
- break;
- case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
- break;
- case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
- params[0] = ctx->Const.MaxProgramMatrixStackDepth;
- break;
- case GL_MAX_PROGRAM_MATRICES_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
- params[0] = ctx->Const.MaxProgramMatrices;
- break;
- case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
- break;
- case GL_CURRENT_MATRIX_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[1]);
- params[2] = IROUND(matrix[2]);
- params[3] = IROUND(matrix[3]);
- params[4] = IROUND(matrix[4]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[6]);
- params[7] = IROUND(matrix[7]);
- params[8] = IROUND(matrix[8]);
- params[9] = IROUND(matrix[9]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[11]);
- params[12] = IROUND(matrix[12]);
- params[13] = IROUND(matrix[13]);
- params[14] = IROUND(matrix[14]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
- CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = IROUND(matrix[0]);
- params[1] = IROUND(matrix[4]);
- params[2] = IROUND(matrix[8]);
- params[3] = IROUND(matrix[12]);
- params[4] = IROUND(matrix[1]);
- params[5] = IROUND(matrix[5]);
- params[6] = IROUND(matrix[9]);
- params[7] = IROUND(matrix[13]);
- params[8] = IROUND(matrix[2]);
- params[9] = IROUND(matrix[6]);
- params[10] = IROUND(matrix[10]);
- params[11] = IROUND(matrix[14]);
- params[12] = IROUND(matrix[3]);
- params[13] = IROUND(matrix[7]);
- params[14] = IROUND(matrix[11]);
- params[15] = IROUND(matrix[15]);
- }
- break;
- case GL_MAX_VERTEX_ATTRIBS_ARB:
- CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
- params[0] = ctx->Const.VertexProgram.MaxAttribs;
- break;
- case GL_PROGRAM_ERROR_POSITION_ARB:
- CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
- params[0] = ctx->Program.ErrorPos;
- break;
- case GL_FRAGMENT_PROGRAM_ARB:
- CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
- break;
- case GL_MAX_TEXTURE_COORDS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
- params[0] = ctx->Const.MaxTextureCoordUnits;
- break;
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
- params[0] = ctx->Const.MaxTextureImageUnits;
- break;
- case GL_DEPTH_BOUNDS_TEST_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
- break;
- case GL_DEPTH_BOUNDS_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
- params[0] = IROUND(ctx->Depth.BoundsMin);
- params[1] = IROUND(ctx->Depth.BoundsMax);
- break;
- case GL_DEPTH_CLAMP:
- CHECK_EXT1(ARB_depth_clamp, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Transform.DepthClamp);
- break;
- case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = ctx->Const.MaxDrawBuffers;
- break;
- case GL_DRAW_BUFFER0_ARB:
- params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_DRAW_BUFFER1_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
- params[0] = ENUM_TO_INT(buffer);
- }
- break;
- case GL_DRAW_BUFFER2_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
- params[0] = ENUM_TO_INT(buffer);
- }
- break;
- case GL_DRAW_BUFFER3_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
- params[0] = ENUM_TO_INT(buffer);
- }
- break;
- case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- CHECK_EXT1(OES_read_format, "GetIntegerv");
- params[0] = _mesa_get_color_read_type(ctx);
- break;
- case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- CHECK_EXT1(OES_read_format, "GetIntegerv");
- params[0] = _mesa_get_color_read_format(ctx);
- break;
- case GL_NUM_FRAGMENT_REGISTERS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 6;
- break;
- case GL_NUM_FRAGMENT_CONSTANTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 8;
- break;
- case GL_NUM_PASSES_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 2;
- break;
- case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 8;
- break;
- case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 16;
- break;
- case GL_COLOR_ALPHA_PAIRING_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(GL_TRUE);
- break;
- case GL_NUM_LOOPBACK_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 3;
- break;
- case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
- params[0] = 3;
- break;
- case GL_STENCIL_BACK_FUNC:
- params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
- break;
- case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[1];
- break;
- case GL_STENCIL_BACK_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[1];
- break;
- case GL_STENCIL_BACK_REF:
- params[0] = ctx->Stencil.Ref[1];
- break;
- case GL_STENCIL_BACK_FAIL:
- params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
- break;
- case GL_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
- params[0] = ctx->DrawBuffer->Name;
- break;
- case GL_RENDERBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
- params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
- break;
- case GL_MAX_COLOR_ATTACHMENTS_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
- params[0] = ctx->Const.MaxColorAttachments;
- break;
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
- params[0] = ctx->Const.MaxRenderbufferSize;
- break;
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_blit, "GetIntegerv");
- params[0] = ctx->ReadBuffer->Name;
- break;
- case GL_PROVOKING_VERTEX_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Light.ProvokingVertex);
- break;
- case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Const.QuadsFollowProvokingVertexConvention);
- break;
- case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
- params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
- break;
- case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
- break;
- case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = ctx->Const.VertexProgram.MaxUniformComponents;
- break;
- case GL_MAX_VARYING_FLOATS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = ctx->Const.MaxVarying * 4;
- break;
- case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = ctx->Const.MaxVertexTextureImageUnits;
- break;
- case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = ctx->Const.MaxCombinedTextureImageUnits;
- break;
- case GL_CURRENT_PROGRAM:
- CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
- params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
- break;
- case GL_MAX_SAMPLES:
- CHECK_EXT1(ARB_framebuffer_object, "GetIntegerv");
- params[0] = ctx->Const.MaxSamples;
- break;
- case GL_VERTEX_ARRAY_BINDING_APPLE:
- CHECK_EXT1(APPLE_vertex_array_object, "GetIntegerv");
- params[0] = ctx->Array.ArrayObj->Name;
- break;
- case GL_TEXTURE_CUBE_MAP_SEAMLESS:
- CHECK_EXT1(ARB_seamless_cube_map, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Texture.CubeMapSeamless);
- break;
- case GL_MAX_SERVER_WAIT_TIMEOUT:
- CHECK_EXT1(ARB_sync, "GetIntegerv");
- params[0] = INT64_TO_INT(ctx->Const.MaxServerWaitTimeout);
- break;
- case GL_NUM_EXTENSIONS:
- params[0] = _mesa_get_extension_count(ctx);
- break;
- case GL_MAJOR_VERSION:
- params[0] = ctx->VersionMajor;
- break;
- case GL_MINOR_VERSION:
- params[0] = ctx->VersionMinor;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_INT(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = v.value_int_n.ints[i];
+ break;
+
+ case TYPE_INT64:
+ params[0] = INT64_TO_INT(((GLint64 *) p)[0]);
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_INT(*(GLboolean*) p);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
}
}
#if FEATURE_ARB_sync
void GLAPIENTRY
-_mesa_GetInteger64v( GLenum pname, GLint64 *params )
+_mesa_GetInteger64v(GLenum pname, GLint64 *params)
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
- if (!params)
- return;
+ d = find_value("glGetInteger64v", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
- if (ctx->NewState)
- _mesa_update_state(ctx);
+ case TYPE_FLOAT_4:
+ params[3] = IROUND64(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ params[2] = IROUND64(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ params[1] = IROUND64(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ params[0] = IROUND64(((GLfloat *) p)[0]);
+ break;
- if (ctx->Driver.GetInteger64v &&
- ctx->Driver.GetInteger64v(ctx, pname, params))
- return;
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_INT64(((GLfloat *) p)[3]);
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_INT64(((GLfloat *) p)[2]);
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_INT64(((GLfloat *) p)[1]);
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]);
+ break;
- switch (pname) {
- case GL_ACCUM_RED_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumRedBits);
- break;
- case GL_ACCUM_GREEN_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumGreenBits);
- break;
- case GL_ACCUM_BLUE_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumBlueBits);
- break;
- case GL_ACCUM_ALPHA_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumAlphaBits);
- break;
- case GL_ACCUM_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT64(ctx->Accum.ClearColor[0]);
- params[1] = FLOAT_TO_INT64(ctx->Accum.ClearColor[1]);
- params[2] = FLOAT_TO_INT64(ctx->Accum.ClearColor[2]);
- params[3] = FLOAT_TO_INT64(ctx->Accum.ClearColor[3]);
- break;
- case GL_ALPHA_BIAS:
- params[0] = IROUND64(ctx->Pixel.AlphaBias);
- break;
- case GL_ALPHA_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.alphaBits);
- break;
- case GL_ALPHA_SCALE:
- params[0] = IROUND64(ctx->Pixel.AlphaScale);
- break;
- case GL_ALPHA_TEST:
- params[0] = BOOLEAN_TO_INT64(ctx->Color.AlphaEnabled);
- break;
- case GL_ALPHA_TEST_FUNC:
- params[0] = ENUM_TO_INT64(ctx->Color.AlphaFunc);
- break;
- case GL_ALPHA_TEST_REF:
- params[0] = FLOAT_TO_INT64(ctx->Color.AlphaRef);
- break;
- case GL_ATTRIB_STACK_DEPTH:
- params[0] = (GLint64)(ctx->AttribStackDepth);
- break;
- case GL_AUTO_NORMAL:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.AutoNormal);
- break;
- case GL_AUX_BUFFERS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.numAuxBuffers);
- break;
- case GL_BLEND:
- params[0] = BOOLEAN_TO_INT64((ctx->Color.BlendEnabled & 1));
- break;
- case GL_BLEND_DST:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_SRC_RGB_EXT:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendSrcRGB);
- break;
- case GL_BLEND_DST_RGB_EXT:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendDstRGB);
- break;
- case GL_BLEND_SRC_ALPHA_EXT:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendSrcA);
- break;
- case GL_BLEND_DST_ALPHA_EXT:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendDstA);
- break;
- case GL_BLEND_EQUATION:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendEquationRGB );
- break;
- case GL_BLEND_EQUATION_ALPHA_EXT:
- params[0] = ENUM_TO_INT64(ctx->Color.BlendEquationA );
- break;
- case GL_BLEND_COLOR_EXT:
- params[0] = FLOAT_TO_INT64(ctx->Color.BlendColor[0]);
- params[1] = FLOAT_TO_INT64(ctx->Color.BlendColor[1]);
- params[2] = FLOAT_TO_INT64(ctx->Color.BlendColor[2]);
- params[3] = FLOAT_TO_INT64(ctx->Color.BlendColor[3]);
- break;
- case GL_BLUE_BIAS:
- params[0] = IROUND64(ctx->Pixel.BlueBias);
- break;
- case GL_BLUE_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.blueBits);
- break;
- case GL_BLUE_SCALE:
- params[0] = IROUND64(ctx->Pixel.BlueScale);
- break;
- case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = (GLint64)(ctx->ClientAttribStackDepth);
- break;
- case GL_CLIP_PLANE0:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
- break;
- case GL_CLIP_PLANE1:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
- break;
- case GL_CLIP_PLANE2:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
- break;
- case GL_CLIP_PLANE3:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
- break;
- case GL_CLIP_PLANE4:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
- break;
- case GL_CLIP_PLANE5:
- params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
- break;
- case GL_COLOR_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT64(ctx->Color.ClearColor[0]);
- params[1] = FLOAT_TO_INT64(ctx->Color.ClearColor[1]);
- params[2] = FLOAT_TO_INT64(ctx->Color.ClearColor[2]);
- params[3] = FLOAT_TO_INT64(ctx->Color.ClearColor[3]);
- break;
- case GL_COLOR_MATERIAL:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.ColorMaterialEnabled);
- break;
- case GL_COLOR_MATERIAL_FACE:
- params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialFace);
- break;
- case GL_COLOR_MATERIAL_PARAMETER:
- params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialMode);
- break;
- case GL_COLOR_WRITEMASK:
- params[0] = (GLint64)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
- params[1] = (GLint64)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
- params[2] = (GLint64)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
- params[3] = (GLint64)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
- break;
- case GL_CULL_FACE:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.CullFlag);
- break;
- case GL_CULL_FACE_MODE:
- params[0] = ENUM_TO_INT64(ctx->Polygon.CullFaceMode);
- break;
- case GL_CURRENT_COLOR:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
- params[1] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
- params[2] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
- params[3] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
- }
- break;
- case GL_CURRENT_INDEX:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
- }
- break;
- case GL_CURRENT_NORMAL:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
- params[1] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
- params[2] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
- }
- break;
- case GL_CURRENT_RASTER_COLOR:
- params[0] = FLOAT_TO_INT64(ctx->Current.RasterColor[0]);
- params[1] = FLOAT_TO_INT64(ctx->Current.RasterColor[1]);
- params[2] = FLOAT_TO_INT64(ctx->Current.RasterColor[2]);
- params[3] = FLOAT_TO_INT64(ctx->Current.RasterColor[3]);
- break;
- case GL_CURRENT_RASTER_DISTANCE:
- params[0] = IROUND64(ctx->Current.RasterDistance);
- break;
- case GL_CURRENT_RASTER_INDEX:
- params[0] = IROUND64(1.0);
- break;
- case GL_CURRENT_RASTER_POSITION:
- params[0] = IROUND64(ctx->Current.RasterPos[0]);
- params[1] = IROUND64(ctx->Current.RasterPos[1]);
- params[2] = IROUND64(ctx->Current.RasterPos[2]);
- params[3] = IROUND64(ctx->Current.RasterPos[3]);
- break;
- case GL_CURRENT_RASTER_SECONDARY_COLOR:
- params[0] = FLOAT_TO_INT64(ctx->Current.RasterSecondaryColor[0]);
- params[1] = FLOAT_TO_INT64(ctx->Current.RasterSecondaryColor[1]);
- params[2] = FLOAT_TO_INT64(ctx->Current.RasterSecondaryColor[2]);
- params[3] = FLOAT_TO_INT64(ctx->Current.RasterSecondaryColor[3]);
- break;
- case GL_CURRENT_RASTER_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(raster tex coords, unit %u)", unit);
- return;
- }
- params[0] = IROUND64(ctx->Current.RasterTexCoords[unit][0]);
- params[1] = IROUND64(ctx->Current.RasterTexCoords[unit][1]);
- params[2] = IROUND64(ctx->Current.RasterTexCoords[unit][2]);
- params[3] = IROUND64(ctx->Current.RasterTexCoords[unit][3]);
- }
- break;
- case GL_CURRENT_RASTER_POSITION_VALID:
- params[0] = BOOLEAN_TO_INT64(ctx->Current.RasterPosValid);
- break;
- case GL_CURRENT_TEXTURE_COORDS:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(current tex coords, unit %u)", unit);
- return;
- }
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]);
- params[1] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]);
- params[2] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]);
- params[3] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]);
- }
- break;
- case GL_DEPTH_BIAS:
- params[0] = IROUND64(ctx->Pixel.DepthBias);
- break;
- case GL_DEPTH_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.depthBits);
- break;
- case GL_DEPTH_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT64(((GLfloat) ctx->Depth.Clear));
- break;
- case GL_DEPTH_FUNC:
- params[0] = ENUM_TO_INT64(ctx->Depth.Func);
- break;
- case GL_DEPTH_RANGE:
- params[0] = FLOAT_TO_INT64(ctx->Viewport.Near);
- params[1] = FLOAT_TO_INT64(ctx->Viewport.Far);
- break;
- case GL_DEPTH_SCALE:
- params[0] = IROUND64(ctx->Pixel.DepthScale);
- break;
- case GL_DEPTH_TEST:
- params[0] = BOOLEAN_TO_INT64(ctx->Depth.Test);
- break;
- case GL_DEPTH_WRITEMASK:
- params[0] = BOOLEAN_TO_INT64(ctx->Depth.Mask);
- break;
- case GL_DITHER:
- params[0] = BOOLEAN_TO_INT64(ctx->Color.DitherFlag);
- break;
- case GL_DOUBLEBUFFER:
- params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.doubleBufferMode);
- break;
- case GL_DRAW_BUFFER:
- params[0] = ENUM_TO_INT64(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_EDGE_FLAG:
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = BOOLEAN_TO_INT64((ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0));
- }
- break;
- case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = (GLint64)(ctx->Feedback.BufferSize);
- break;
- case GL_FEEDBACK_BUFFER_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Feedback.Type);
- break;
- case GL_FOG:
- params[0] = BOOLEAN_TO_INT64(ctx->Fog.Enabled);
- break;
- case GL_FOG_COLOR:
- params[0] = FLOAT_TO_INT64(ctx->Fog.Color[0]);
- params[1] = FLOAT_TO_INT64(ctx->Fog.Color[1]);
- params[2] = FLOAT_TO_INT64(ctx->Fog.Color[2]);
- params[3] = FLOAT_TO_INT64(ctx->Fog.Color[3]);
- break;
- case GL_FOG_DENSITY:
- params[0] = IROUND64(ctx->Fog.Density);
- break;
- case GL_FOG_END:
- params[0] = IROUND64(ctx->Fog.End);
- break;
- case GL_FOG_HINT:
- params[0] = ENUM_TO_INT64(ctx->Hint.Fog);
- break;
- case GL_FOG_INDEX:
- params[0] = IROUND64(ctx->Fog.Index);
- break;
- case GL_FOG_MODE:
- params[0] = ENUM_TO_INT64(ctx->Fog.Mode);
- break;
- case GL_FOG_START:
- params[0] = IROUND64(ctx->Fog.Start);
- break;
- case GL_FRONT_FACE:
- params[0] = ENUM_TO_INT64(ctx->Polygon.FrontFace);
- break;
- case GL_GREEN_BIAS:
- params[0] = IROUND64(ctx->Pixel.GreenBias);
- break;
- case GL_GREEN_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.greenBits);
- break;
- case GL_GREEN_SCALE:
- params[0] = IROUND64(ctx->Pixel.GreenScale);
- break;
- case GL_INDEX_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.indexBits);
- break;
- case GL_INDEX_CLEAR_VALUE:
- params[0] = (GLint64)(ctx->Color.ClearIndex);
- break;
- case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_INT64(GL_FALSE);
- break;
- case GL_INDEX_OFFSET:
- params[0] = (GLint64)(ctx->Pixel.IndexOffset);
- break;
- case GL_INDEX_SHIFT:
- params[0] = (GLint64)(ctx->Pixel.IndexShift);
- break;
- case GL_INDEX_WRITEMASK:
- params[0] = (GLint64)(ctx->Color.IndexMask);
- break;
- case GL_LIGHT0:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[0].Enabled);
- break;
- case GL_LIGHT1:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[1].Enabled);
- break;
- case GL_LIGHT2:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[2].Enabled);
- break;
- case GL_LIGHT3:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[3].Enabled);
- break;
- case GL_LIGHT4:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[4].Enabled);
- break;
- case GL_LIGHT5:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[5].Enabled);
- break;
- case GL_LIGHT6:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[6].Enabled);
- break;
- case GL_LIGHT7:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[7].Enabled);
- break;
- case GL_LIGHTING:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Enabled);
- break;
- case GL_LIGHT_MODEL_AMBIENT:
- params[0] = FLOAT_TO_INT64(ctx->Light.Model.Ambient[0]);
- params[1] = FLOAT_TO_INT64(ctx->Light.Model.Ambient[1]);
- params[2] = FLOAT_TO_INT64(ctx->Light.Model.Ambient[2]);
- params[3] = FLOAT_TO_INT64(ctx->Light.Model.Ambient[3]);
- break;
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- params[0] = ENUM_TO_INT64(ctx->Light.Model.ColorControl);
- break;
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Model.LocalViewer);
- break;
- case GL_LIGHT_MODEL_TWO_SIDE:
- params[0] = BOOLEAN_TO_INT64(ctx->Light.Model.TwoSide);
- break;
- case GL_LINE_SMOOTH:
- params[0] = BOOLEAN_TO_INT64(ctx->Line.SmoothFlag);
- break;
- case GL_LINE_SMOOTH_HINT:
- params[0] = ENUM_TO_INT64(ctx->Hint.LineSmooth);
- break;
- case GL_LINE_STIPPLE:
- params[0] = BOOLEAN_TO_INT64(ctx->Line.StippleFlag);
- break;
- case GL_LINE_STIPPLE_PATTERN:
- params[0] = (GLint64)(ctx->Line.StipplePattern);
- break;
- case GL_LINE_STIPPLE_REPEAT:
- params[0] = (GLint64)(ctx->Line.StippleFactor);
- break;
- case GL_LINE_WIDTH:
- params[0] = IROUND64(ctx->Line.Width);
- break;
- case GL_LINE_WIDTH_GRANULARITY:
- params[0] = IROUND64(ctx->Const.LineWidthGranularity);
- break;
- case GL_LINE_WIDTH_RANGE:
- params[0] = IROUND64(ctx->Const.MinLineWidthAA);
- params[1] = IROUND64(ctx->Const.MaxLineWidthAA);
- break;
- case GL_ALIASED_LINE_WIDTH_RANGE:
- params[0] = IROUND64(ctx->Const.MinLineWidth);
- params[1] = IROUND64(ctx->Const.MaxLineWidth);
- break;
- case GL_LIST_BASE:
- params[0] = (GLint64)(ctx->List.ListBase);
- break;
- case GL_LIST_INDEX:
- params[0] = (GLint64)((ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0));
- break;
- case GL_LIST_MODE:
- {
- GLenum mode;
- if (!ctx->CompileFlag)
- mode = 0;
- else if (ctx->ExecuteFlag)
- mode = GL_COMPILE_AND_EXECUTE;
- else
- mode = GL_COMPILE;
- params[0] = ENUM_TO_INT64(mode);
- }
- break;
- case GL_INDEX_LOGIC_OP:
- params[0] = BOOLEAN_TO_INT64(ctx->Color.IndexLogicOpEnabled);
- break;
- case GL_COLOR_LOGIC_OP:
- params[0] = BOOLEAN_TO_INT64(ctx->Color.ColorLogicOpEnabled);
- break;
- case GL_LOGIC_OP_MODE:
- params[0] = ENUM_TO_INT64(ctx->Color.LogicOp);
- break;
- case GL_MAP1_COLOR_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Color4);
- break;
- case GL_MAP1_GRID_DOMAIN:
- params[0] = IROUND64(ctx->Eval.MapGrid1u1);
- params[1] = IROUND64(ctx->Eval.MapGrid1u2);
- break;
- case GL_MAP1_GRID_SEGMENTS:
- params[0] = (GLint64)(ctx->Eval.MapGrid1un);
- break;
- case GL_MAP1_INDEX:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Index);
- break;
- case GL_MAP1_NORMAL:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Normal);
- break;
- case GL_MAP1_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1TextureCoord1);
- break;
- case GL_MAP1_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1TextureCoord2);
- break;
- case GL_MAP1_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1TextureCoord3);
- break;
- case GL_MAP1_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1TextureCoord4);
- break;
- case GL_MAP1_VERTEX_3:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Vertex3);
- break;
- case GL_MAP1_VERTEX_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Vertex4);
- break;
- case GL_MAP2_COLOR_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Color4);
- break;
- case GL_MAP2_GRID_DOMAIN:
- params[0] = IROUND64(ctx->Eval.MapGrid2u1);
- params[1] = IROUND64(ctx->Eval.MapGrid2u2);
- params[2] = IROUND64(ctx->Eval.MapGrid2v1);
- params[3] = IROUND64(ctx->Eval.MapGrid2v2);
- break;
- case GL_MAP2_GRID_SEGMENTS:
- params[0] = (GLint64)(ctx->Eval.MapGrid2un);
- params[1] = (GLint64)(ctx->Eval.MapGrid2vn);
- break;
- case GL_MAP2_INDEX:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Index);
- break;
- case GL_MAP2_NORMAL:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Normal);
- break;
- case GL_MAP2_TEXTURE_COORD_1:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2TextureCoord1);
- break;
- case GL_MAP2_TEXTURE_COORD_2:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2TextureCoord2);
- break;
- case GL_MAP2_TEXTURE_COORD_3:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2TextureCoord3);
- break;
- case GL_MAP2_TEXTURE_COORD_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2TextureCoord4);
- break;
- case GL_MAP2_VERTEX_3:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Vertex3);
- break;
- case GL_MAP2_VERTEX_4:
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Vertex4);
- break;
- case GL_MAP_COLOR:
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.MapColorFlag);
- break;
- case GL_MAP_STENCIL:
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.MapStencilFlag);
- break;
- case GL_MATRIX_MODE:
- params[0] = ENUM_TO_INT64(ctx->Transform.MatrixMode);
- break;
- case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = (GLint64)(MAX_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = (GLint64)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
- break;
- case GL_MAX_CLIP_PLANES:
- params[0] = (GLint64)(ctx->Const.MaxClipPlanes);
- break;
- case GL_MAX_ELEMENTS_VERTICES:
- params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_ELEMENTS_INDICES:
- params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
- break;
- case GL_MAX_EVAL_ORDER:
- params[0] = (GLint64)(MAX_EVAL_ORDER);
- break;
- case GL_MAX_LIGHTS:
- params[0] = (GLint64)(ctx->Const.MaxLights);
- break;
- case GL_MAX_LIST_NESTING:
- params[0] = (GLint64)(MAX_LIST_NESTING);
- break;
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = (GLint64)(MAX_MODELVIEW_STACK_DEPTH);
- break;
- case GL_MAX_NAME_STACK_DEPTH:
- params[0] = (GLint64)(MAX_NAME_STACK_DEPTH);
- break;
- case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = (GLint64)(MAX_PIXEL_MAP_TABLE);
- break;
- case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = (GLint64)(MAX_PROJECTION_STACK_DEPTH);
- break;
- case GL_MAX_TEXTURE_SIZE:
- params[0] = (GLint64)(1 << (ctx->Const.MaxTextureLevels - 1));
- break;
- case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = (GLint64)(1 << (ctx->Const.Max3DTextureLevels - 1));
- break;
- case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = (GLint64)(MAX_TEXTURE_STACK_DEPTH);
- break;
- case GL_MAX_VIEWPORT_DIMS:
- params[0] = (GLint64)(ctx->Const.MaxViewportWidth);
- params[1] = (GLint64)(ctx->Const.MaxViewportHeight);
- break;
- case GL_MODELVIEW_MATRIX:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[1]);
- params[2] = IROUND64(matrix[2]);
- params[3] = IROUND64(matrix[3]);
- params[4] = IROUND64(matrix[4]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[6]);
- params[7] = IROUND64(matrix[7]);
- params[8] = IROUND64(matrix[8]);
- params[9] = IROUND64(matrix[9]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[11]);
- params[12] = IROUND64(matrix[12]);
- params[13] = IROUND64(matrix[13]);
- params[14] = IROUND64(matrix[14]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_MODELVIEW_STACK_DEPTH:
- params[0] = (GLint64)(ctx->ModelviewMatrixStack.Depth + 1);
- break;
- case GL_NAME_STACK_DEPTH:
- params[0] = (GLint64)(ctx->Select.NameStackDepth);
- break;
- case GL_NORMALIZE:
- params[0] = BOOLEAN_TO_INT64(ctx->Transform.Normalize);
- break;
- case GL_PACK_ALIGNMENT:
- params[0] = (GLint64)(ctx->Pack.Alignment);
- break;
- case GL_PACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_INT64(ctx->Pack.LsbFirst);
- break;
- case GL_PACK_ROW_LENGTH:
- params[0] = (GLint64)(ctx->Pack.RowLength);
- break;
- case GL_PACK_SKIP_PIXELS:
- params[0] = (GLint64)(ctx->Pack.SkipPixels);
- break;
- case GL_PACK_SKIP_ROWS:
- params[0] = (GLint64)(ctx->Pack.SkipRows);
- break;
- case GL_PACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_INT64(ctx->Pack.SwapBytes);
- break;
- case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = (GLint64)(ctx->Pack.SkipImages);
- break;
- case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = (GLint64)(ctx->Pack.ImageHeight);
- break;
- case GL_PACK_INVERT_MESA:
- params[0] = BOOLEAN_TO_INT64(ctx->Pack.Invert);
- break;
- case GL_PERSPECTIVE_CORRECTION_HINT:
- params[0] = ENUM_TO_INT64(ctx->Hint.PerspectiveCorrection);
- break;
- case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.AtoA.Size);
- break;
- case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.BtoB.Size);
- break;
- case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.GtoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.ItoA.Size);
- break;
- case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.ItoB.Size);
- break;
- case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.ItoG.Size);
- break;
- case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.ItoI.Size);
- break;
- case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.ItoR.Size);
- break;
- case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.RtoR.Size);
- break;
- case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = (GLint64)(ctx->PixelMaps.StoS.Size);
- break;
- case GL_POINT_SIZE:
- params[0] = IROUND64(ctx->Point.Size);
- break;
- case GL_POINT_SIZE_GRANULARITY:
- params[0] = IROUND64(ctx->Const.PointSizeGranularity);
- break;
- case GL_POINT_SIZE_RANGE:
- params[0] = IROUND64(ctx->Const.MinPointSizeAA);
- params[1] = IROUND64(ctx->Const.MaxPointSizeAA);
- break;
- case GL_ALIASED_POINT_SIZE_RANGE:
- params[0] = IROUND64(ctx->Const.MinPointSize);
- params[1] = IROUND64(ctx->Const.MaxPointSize);
- break;
- case GL_POINT_SMOOTH:
- params[0] = BOOLEAN_TO_INT64(ctx->Point.SmoothFlag);
- break;
- case GL_POINT_SMOOTH_HINT:
- params[0] = ENUM_TO_INT64(ctx->Hint.PointSmooth);
- break;
- case GL_POINT_SIZE_MIN_EXT:
- params[0] = IROUND64(ctx->Point.MinSize);
- break;
- case GL_POINT_SIZE_MAX_EXT:
- params[0] = IROUND64(ctx->Point.MaxSize);
- break;
- case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
- params[0] = IROUND64(ctx->Point.Threshold);
- break;
- case GL_DISTANCE_ATTENUATION_EXT:
- params[0] = IROUND64(ctx->Point.Params[0]);
- params[1] = IROUND64(ctx->Point.Params[1]);
- params[2] = IROUND64(ctx->Point.Params[2]);
- break;
- case GL_POLYGON_MODE:
- params[0] = ENUM_TO_INT64(ctx->Polygon.FrontMode);
- params[1] = ENUM_TO_INT64(ctx->Polygon.BackMode);
- break;
- case GL_POLYGON_OFFSET_BIAS_EXT:
- params[0] = IROUND64(ctx->Polygon.OffsetUnits);
- break;
- case GL_POLYGON_OFFSET_FACTOR:
- params[0] = IROUND64(ctx->Polygon.OffsetFactor );
- break;
- case GL_POLYGON_OFFSET_UNITS:
- params[0] = IROUND64(ctx->Polygon.OffsetUnits );
- break;
- case GL_POLYGON_OFFSET_POINT:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.OffsetPoint);
- break;
- case GL_POLYGON_OFFSET_LINE:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.OffsetLine);
- break;
- case GL_POLYGON_OFFSET_FILL:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.OffsetFill);
- break;
- case GL_POLYGON_SMOOTH:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.SmoothFlag);
- break;
- case GL_POLYGON_SMOOTH_HINT:
- params[0] = ENUM_TO_INT64(ctx->Hint.PolygonSmooth);
- break;
- case GL_POLYGON_STIPPLE:
- params[0] = BOOLEAN_TO_INT64(ctx->Polygon.StippleFlag);
- break;
- case GL_PROJECTION_MATRIX:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[1]);
- params[2] = IROUND64(matrix[2]);
- params[3] = IROUND64(matrix[3]);
- params[4] = IROUND64(matrix[4]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[6]);
- params[7] = IROUND64(matrix[7]);
- params[8] = IROUND64(matrix[8]);
- params[9] = IROUND64(matrix[9]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[11]);
- params[12] = IROUND64(matrix[12]);
- params[13] = IROUND64(matrix[13]);
- params[14] = IROUND64(matrix[14]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_PROJECTION_STACK_DEPTH:
- params[0] = (GLint64)(ctx->ProjectionMatrixStack.Depth + 1);
- break;
- case GL_READ_BUFFER:
- params[0] = ENUM_TO_INT64(ctx->ReadBuffer->ColorReadBuffer);
- break;
- case GL_RED_BIAS:
- params[0] = IROUND64(ctx->Pixel.RedBias);
- break;
- case GL_RED_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.redBits);
- break;
- case GL_RED_SCALE:
- params[0] = IROUND64(ctx->Pixel.RedScale);
- break;
- case GL_RENDER_MODE:
- params[0] = ENUM_TO_INT64(ctx->RenderMode);
- break;
- case GL_RESCALE_NORMAL:
- params[0] = BOOLEAN_TO_INT64(ctx->Transform.RescaleNormals);
- break;
- case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_INT64(GL_TRUE);
- break;
- case GL_SCISSOR_BOX:
- params[0] = (GLint64)(ctx->Scissor.X);
- params[1] = (GLint64)(ctx->Scissor.Y);
- params[2] = (GLint64)(ctx->Scissor.Width);
- params[3] = (GLint64)(ctx->Scissor.Height);
- break;
- case GL_SCISSOR_TEST:
- params[0] = BOOLEAN_TO_INT64(ctx->Scissor.Enabled);
- break;
- case GL_SELECTION_BUFFER_SIZE:
- params[0] = (GLint64)(ctx->Select.BufferSize);
- break;
- case GL_SHADE_MODEL:
- params[0] = ENUM_TO_INT64(ctx->Light.ShadeModel);
- break;
- case GL_SHARED_TEXTURE_PALETTE_EXT:
- params[0] = BOOLEAN_TO_INT64(ctx->Texture.SharedPalette);
- break;
- case GL_STENCIL_BITS:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.stencilBits);
- break;
- case GL_STENCIL_CLEAR_VALUE:
- params[0] = (GLint64)(ctx->Stencil.Clear);
- break;
- case GL_STENCIL_FAIL:
- params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_FUNC:
- params[0] = ENUM_TO_INT64(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_INT64(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_INT64(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_REF:
- params[0] = (GLint64)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_TEST:
- params[0] = BOOLEAN_TO_INT64(ctx->Stencil.Enabled);
- break;
- case GL_STENCIL_VALUE_MASK:
- params[0] = (GLint64)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STENCIL_WRITEMASK:
- params[0] = (GLint64)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
- break;
- case GL_STEREO:
- params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.stereoMode);
- break;
- case GL_SUBPIXEL_BITS:
- params[0] = (GLint64)(ctx->Const.SubPixelBits);
- break;
- case GL_TEXTURE_1D:
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_1D));
- break;
- case GL_TEXTURE_2D:
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_2D));
- break;
- case GL_TEXTURE_3D:
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_3D));
- break;
- case GL_TEXTURE_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_1D_ARRAY_EXT));
- break;
- case GL_TEXTURE_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
- break;
- case GL_TEXTURE_BINDING_1D:
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D:
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_3D:
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
- break;
- case GL_TEXTURE_GEN_S:
- params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_T:
- params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_R:
- params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_GEN_Q:
- params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
- break;
- case GL_TEXTURE_MATRIX:
- {
- const GLfloat *matrix;
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)",
- unit);
- return;
- }
- matrix = ctx->TextureMatrixStack[unit].Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[1]);
- params[2] = IROUND64(matrix[2]);
- params[3] = IROUND64(matrix[3]);
- params[4] = IROUND64(matrix[4]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[6]);
- params[7] = IROUND64(matrix[7]);
- params[8] = IROUND64(matrix[8]);
- params[9] = IROUND64(matrix[9]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[11]);
- params[12] = IROUND64(matrix[12]);
- params[13] = IROUND64(matrix[13]);
- params[14] = IROUND64(matrix[14]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_TEXTURE_STACK_DEPTH:
- {
- const GLuint unit = ctx->Texture.CurrentUnit;
- if (unit >= ctx->Const.MaxTextureCoordUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGet(texture stack depth, unit %u)", unit);
- return;
- }
- params[0] = (GLint64)(ctx->TextureMatrixStack[unit].Depth + 1);
- }
- break;
- case GL_UNPACK_ALIGNMENT:
- params[0] = (GLint64)(ctx->Unpack.Alignment);
- break;
- case GL_UNPACK_LSB_FIRST:
- params[0] = BOOLEAN_TO_INT64(ctx->Unpack.LsbFirst);
- break;
- case GL_UNPACK_ROW_LENGTH:
- params[0] = (GLint64)(ctx->Unpack.RowLength);
- break;
- case GL_UNPACK_SKIP_PIXELS:
- params[0] = (GLint64)(ctx->Unpack.SkipPixels);
- break;
- case GL_UNPACK_SKIP_ROWS:
- params[0] = (GLint64)(ctx->Unpack.SkipRows);
- break;
- case GL_UNPACK_SWAP_BYTES:
- params[0] = BOOLEAN_TO_INT64(ctx->Unpack.SwapBytes);
- break;
- case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = (GLint64)(ctx->Unpack.SkipImages);
- break;
- case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = (GLint64)(ctx->Unpack.ImageHeight);
- break;
- case GL_UNPACK_CLIENT_STORAGE_APPLE:
- params[0] = BOOLEAN_TO_INT64(ctx->Unpack.ClientStorage);
- break;
- case GL_VIEWPORT:
- params[0] = (GLint64)(ctx->Viewport.X);
- params[1] = (GLint64)(ctx->Viewport.Y);
- params[2] = (GLint64)(ctx->Viewport.Width);
- params[3] = (GLint64)(ctx->Viewport.Height);
- break;
- case GL_ZOOM_X:
- params[0] = IROUND64(ctx->Pixel.ZoomX);
- break;
- case GL_ZOOM_Y:
- params[0] = IROUND64(ctx->Pixel.ZoomY);
- break;
- case GL_VERTEX_ARRAY:
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Vertex.Enabled);
- break;
- case GL_VERTEX_ARRAY_SIZE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Size);
- break;
- case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Vertex.Type);
- break;
- case GL_VERTEX_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Stride);
- break;
- case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Enabled);
- break;
- case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Type);
- break;
- case GL_NORMAL_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.Stride);
- break;
- case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_COLOR_ARRAY:
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Color.Enabled);
- break;
- case GL_COLOR_ARRAY_SIZE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Size);
- break;
- case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Color.Type);
- break;
- case GL_COLOR_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Stride);
- break;
- case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_INDEX_ARRAY:
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Index.Enabled);
- break;
- case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Index.Type);
- break;
- case GL_INDEX_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Index.Stride);
- break;
- case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_TEXTURE_COORD_ARRAY:
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
- break;
- case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
- break;
- case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
- break;
- case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
- break;
- case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_EDGE_FLAG_ARRAY:
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->EdgeFlag.Enabled);
- break;
- case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.Stride);
- break;
- case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = (GLint64)(0);
- break;
- case GL_MAX_TEXTURE_UNITS_ARB:
- CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxTextureUnits);
- break;
- case GL_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
- break;
- case GL_CLIENT_ACTIVE_TEXTURE_ARB:
- CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
- break;
- case GL_TEXTURE_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
- break;
- case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
- break;
- case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
- CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = (GLint64)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
- break;
- case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = (GLint64)(ctx->Hint.TextureCompression);
- break;
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = (GLint64)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
- break;
- case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
- {
- GLint formats[100];
- GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
- ASSERT(n <= 100);
- for (i = 0; i < n; i++)
- params[i] = ENUM_TO_INT64(formats[i]);
- }
- break;
- case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.LockFirst);
- break;
- case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
- CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.LockCount);
- break;
- case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[4]);
- params[2] = IROUND64(matrix[8]);
- params[3] = IROUND64(matrix[12]);
- params[4] = IROUND64(matrix[1]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[9]);
- params[7] = IROUND64(matrix[13]);
- params[8] = IROUND64(matrix[2]);
- params[9] = IROUND64(matrix[6]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[14]);
- params[12] = IROUND64(matrix[3]);
- params[13] = IROUND64(matrix[7]);
- params[14] = IROUND64(matrix[11]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[4]);
- params[2] = IROUND64(matrix[8]);
- params[3] = IROUND64(matrix[12]);
- params[4] = IROUND64(matrix[1]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[9]);
- params[7] = IROUND64(matrix[13]);
- params[8] = IROUND64(matrix[2]);
- params[9] = IROUND64(matrix[6]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[14]);
- params[12] = IROUND64(matrix[3]);
- params[13] = IROUND64(matrix[7]);
- params[14] = IROUND64(matrix[11]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[4]);
- params[2] = IROUND64(matrix[8]);
- params[3] = IROUND64(matrix[12]);
- params[4] = IROUND64(matrix[1]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[9]);
- params[7] = IROUND64(matrix[13]);
- params[8] = IROUND64(matrix[2]);
- params[9] = IROUND64(matrix[6]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[14]);
- params[12] = IROUND64(matrix[3]);
- params[13] = IROUND64(matrix[7]);
- params[14] = IROUND64(matrix[11]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
- {
- const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[4]);
- params[2] = IROUND64(matrix[8]);
- params[3] = IROUND64(matrix[12]);
- params[4] = IROUND64(matrix[1]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[9]);
- params[7] = IROUND64(matrix[13]);
- params[8] = IROUND64(matrix[2]);
- params[9] = IROUND64(matrix[6]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[14]);
- params[12] = IROUND64(matrix[3]);
- params[13] = IROUND64(matrix[7]);
- params[14] = IROUND64(matrix[11]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_SGI:
- {
- const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[1]);
- params[2] = IROUND64(matrix[2]);
- params[3] = IROUND64(matrix[3]);
- params[4] = IROUND64(matrix[4]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[6]);
- params[7] = IROUND64(matrix[7]);
- params[8] = IROUND64(matrix[8]);
- params[9] = IROUND64(matrix[9]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[11]);
- params[12] = IROUND64(matrix[12]);
- params[13] = IROUND64(matrix[13]);
- params[14] = IROUND64(matrix[14]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = (GLint64)(ctx->ColorMatrixStack.Depth + 1);
- break;
- case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = (GLint64)(MAX_COLOR_STACK_DEPTH);
- break;
- case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[3]);
- break;
- case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixBias[0]);
- break;
- case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixBias[1]);
- break;
- case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixBias[2]);
- break;
- case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- params[0] = IROUND64(ctx->Pixel.PostColorMatrixBias[3]);
- break;
- case GL_CONVOLUTION_1D_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.Convolution1DEnabled);
- break;
- case GL_CONVOLUTION_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.Convolution2DEnabled);
- break;
- case GL_SEPARABLE_2D_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.Separable2DEnabled);
- break;
- case GL_POST_CONVOLUTION_RED_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionScale[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionScale[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionScale[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionScale[3]);
- break;
- case GL_POST_CONVOLUTION_RED_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionBias[0]);
- break;
- case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionBias[1]);
- break;
- case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionBias[2]);
- break;
- case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
- CHECK_EXT1(EXT_convolution, "GetInteger64v");
- params[0] = IROUND64(ctx->Pixel.PostConvolutionBias[3]);
- break;
- case GL_HISTOGRAM:
- CHECK_EXT1(EXT_histogram, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.HistogramEnabled);
- break;
- case GL_MINMAX:
- CHECK_EXT1(EXT_histogram, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.MinMaxEnabled);
- break;
- case GL_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]);
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]);
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_color_table, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]);
- break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXT1(SGI_texture_color_table, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
- break;
- case GL_COLOR_SUM_EXT:
- CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Fog.ColorSumEnabled);
- break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
- params[1] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
- params[2] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
- params[3] = FLOAT_TO_INT64(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
- }
- break;
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->SecondaryColor.Enabled);
- break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->SecondaryColor.Type);
- break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Stride);
- break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
- CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Size);
- break;
- case GL_CURRENT_FOG_COORDINATE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- {
- FLUSH_CURRENT(ctx, 0);
- params[0] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
- }
- break;
- case GL_FOG_COORDINATE_ARRAY_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->FogCoord.Enabled);
- break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->FogCoord.Type);
- break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.Stride);
- break;
- case GL_FOG_COORDINATE_SOURCE_EXT:
- CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Fog.FogCoordinateSource);
- break;
- case GL_MAX_TEXTURE_LOD_BIAS_EXT:
- CHECK_EXT1(EXT_texture_lod_bias, "GetInteger64v");
- params[0] = IROUND64(ctx->Const.MaxTextureLodBias);
- break;
- case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
- CHECK_EXT1(EXT_texture_filter_anisotropic, "GetInteger64v");
- params[0] = IROUND64(ctx->Const.MaxTextureMaxAnisotropy);
- break;
- case GL_MULTISAMPLE_ARB:
- params[0] = BOOLEAN_TO_INT64(ctx->Multisample.Enabled);
- break;
- case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleAlphaToCoverage);
- break;
- case GL_SAMPLE_ALPHA_TO_ONE_ARB:
- params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleAlphaToOne);
- break;
- case GL_SAMPLE_COVERAGE_ARB:
- params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleCoverage);
- break;
- case GL_SAMPLE_COVERAGE_VALUE_ARB:
- params[0] = IROUND64(ctx->Multisample.SampleCoverageValue);
- break;
- case GL_SAMPLE_COVERAGE_INVERT_ARB:
- params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleCoverageInvert);
- break;
- case GL_SAMPLE_BUFFERS_ARB:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.sampleBuffers);
- break;
- case GL_SAMPLES_ARB:
- params[0] = (GLint64)(ctx->DrawBuffer->Visual.samples);
- break;
- case GL_RASTER_POSITION_UNCLIPPED_IBM:
- CHECK_EXT1(IBM_rasterpos_clip, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Transform.RasterPositionUnclipped);
- break;
- case GL_POINT_SPRITE_NV:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Point.PointSprite);
- break;
- case GL_POINT_SPRITE_R_MODE_NV:
- CHECK_EXT1(NV_point_sprite, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Point.SpriteRMode);
- break;
- case GL_POINT_SPRITE_COORD_ORIGIN:
- CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Point.SpriteOrigin);
- break;
- case GL_GENERATE_MIPMAP_HINT_SGIS:
- CHECK_EXT1(SGIS_generate_mipmap, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Hint.GenerateMipmap);
- break;
- case GL_VERTEX_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = (GLint64)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
- break;
- case GL_VERTEX_ATTRIB_ARRAY0_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY1_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY2_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY3_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY5_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY6_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY7_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY8_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY9_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY10_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY11_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY12_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY13_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY14_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
- break;
- case GL_VERTEX_ATTRIB_ARRAY15_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
- break;
- case GL_MAP1_VERTEX_ATTRIB0_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[0]);
- break;
- case GL_MAP1_VERTEX_ATTRIB1_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[1]);
- break;
- case GL_MAP1_VERTEX_ATTRIB2_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[2]);
- break;
- case GL_MAP1_VERTEX_ATTRIB3_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[3]);
- break;
- case GL_MAP1_VERTEX_ATTRIB4_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[4]);
- break;
- case GL_MAP1_VERTEX_ATTRIB5_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[5]);
- break;
- case GL_MAP1_VERTEX_ATTRIB6_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[6]);
- break;
- case GL_MAP1_VERTEX_ATTRIB7_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[7]);
- break;
- case GL_MAP1_VERTEX_ATTRIB8_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[8]);
- break;
- case GL_MAP1_VERTEX_ATTRIB9_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[9]);
- break;
- case GL_MAP1_VERTEX_ATTRIB10_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[10]);
- break;
- case GL_MAP1_VERTEX_ATTRIB11_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[11]);
- break;
- case GL_MAP1_VERTEX_ATTRIB12_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[12]);
- break;
- case GL_MAP1_VERTEX_ATTRIB13_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[13]);
- break;
- case GL_MAP1_VERTEX_ATTRIB14_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[14]);
- break;
- case GL_MAP1_VERTEX_ATTRIB15_4_NV:
- CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Attrib[15]);
- break;
- case GL_FRAGMENT_PROGRAM_NV:
- CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->FragmentProgram.Enabled);
- break;
- case GL_FRAGMENT_PROGRAM_BINDING_NV:
- CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
- break;
- case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
- CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = (GLint64)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
- break;
- case GL_TEXTURE_BINDING_RECTANGLE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
- break;
- case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
- CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxTextureRectSize);
- break;
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Stencil.TestTwoSide);
- break;
- case GL_ACTIVE_STENCIL_FACE_EXT:
- CHECK_EXT1(EXT_stencil_two_side, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
- break;
- case GL_MAX_SHININESS_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetInteger64v");
- params[0] = IROUND64(ctx->Const.MaxShininess);
- break;
- case GL_MAX_SPOT_EXPONENT_NV:
- CHECK_EXT1(NV_light_max_exponent, "GetInteger64v");
- params[0] = IROUND64(ctx->Const.MaxSpotExponent);
- break;
- case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayBufferObj->Name);
- break;
- case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
- break;
- case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
- break;
- case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Color.BufferObj->Name);
- break;
- case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->Index.BufferObj->Name);
- break;
- case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
- break;
- case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
- break;
- case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
- break;
- case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
- break;
- case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = (GLint64)(ctx->Array.ElementArrayBufferObj->Name);
- break;
- case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Pack.BufferObj->Name);
- break;
- case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Unpack.BufferObj->Name);
- break;
- case GL_VERTEX_PROGRAM_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->VertexProgram.Enabled);
- break;
- case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->VertexProgram.PointSizeEnabled);
- break;
- case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
- CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->VertexProgram.TwoSideEnabled);
- break;
- case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxProgramMatrixStackDepth);
- break;
- case GL_MAX_PROGRAM_MATRICES_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxProgramMatrices);
- break;
- case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->CurrentStack->Depth + 1);
- break;
- case GL_CURRENT_MATRIX_ARB:
- CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[1]);
- params[2] = IROUND64(matrix[2]);
- params[3] = IROUND64(matrix[3]);
- params[4] = IROUND64(matrix[4]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[6]);
- params[7] = IROUND64(matrix[7]);
- params[8] = IROUND64(matrix[8]);
- params[9] = IROUND64(matrix[9]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[11]);
- params[12] = IROUND64(matrix[12]);
- params[13] = IROUND64(matrix[13]);
- params[14] = IROUND64(matrix[14]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
- CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetInteger64v");
- {
- const GLfloat *matrix = ctx->CurrentStack->Top->m;
- params[0] = IROUND64(matrix[0]);
- params[1] = IROUND64(matrix[4]);
- params[2] = IROUND64(matrix[8]);
- params[3] = IROUND64(matrix[12]);
- params[4] = IROUND64(matrix[1]);
- params[5] = IROUND64(matrix[5]);
- params[6] = IROUND64(matrix[9]);
- params[7] = IROUND64(matrix[13]);
- params[8] = IROUND64(matrix[2]);
- params[9] = IROUND64(matrix[6]);
- params[10] = IROUND64(matrix[10]);
- params[11] = IROUND64(matrix[14]);
- params[12] = IROUND64(matrix[3]);
- params[13] = IROUND64(matrix[7]);
- params[14] = IROUND64(matrix[11]);
- params[15] = IROUND64(matrix[15]);
- }
- break;
- case GL_MAX_VERTEX_ATTRIBS_ARB:
- CHECK_EXT1(ARB_vertex_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.VertexProgram.MaxAttribs);
- break;
- case GL_PROGRAM_ERROR_POSITION_ARB:
- CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Program.ErrorPos);
- break;
- case GL_FRAGMENT_PROGRAM_ARB:
- CHECK_EXT1(ARB_fragment_program, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->FragmentProgram.Enabled);
- break;
- case GL_MAX_TEXTURE_COORDS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxTextureCoordUnits);
- break;
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxTextureImageUnits);
- break;
- case GL_DEPTH_BOUNDS_TEST_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Depth.BoundsTest);
- break;
- case GL_DEPTH_BOUNDS_EXT:
- CHECK_EXT1(EXT_depth_bounds_test, "GetInteger64v");
- params[0] = IROUND64(ctx->Depth.BoundsMin);
- params[1] = IROUND64(ctx->Depth.BoundsMax);
- break;
- case GL_DEPTH_CLAMP:
- CHECK_EXT1(ARB_depth_clamp, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Transform.DepthClamp);
- break;
- case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = (GLint64)(ctx->Const.MaxDrawBuffers);
- break;
- case GL_DRAW_BUFFER0_ARB:
- params[0] = ENUM_TO_INT64(ctx->DrawBuffer->ColorDrawBuffer[0]);
- break;
- case GL_DRAW_BUFFER1_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
- params[0] = ENUM_TO_INT64(buffer);
- }
- break;
- case GL_DRAW_BUFFER2_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
- params[0] = ENUM_TO_INT64(buffer);
- }
- break;
- case GL_DRAW_BUFFER3_ARB:
- {
- GLenum buffer;
- if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
- return;
- }
- buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
- params[0] = ENUM_TO_INT64(buffer);
- }
- break;
- case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = (GLint64)(_mesa_get_color_read_type(ctx));
- break;
- case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = (GLint64)(_mesa_get_color_read_format(ctx));
- break;
- case GL_NUM_FRAGMENT_REGISTERS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(6);
- break;
- case GL_NUM_FRAGMENT_CONSTANTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(8);
- break;
- case GL_NUM_PASSES_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(2);
- break;
- case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(8);
- break;
- case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(16);
- break;
- case GL_COLOR_ALPHA_PAIRING_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(GL_TRUE);
- break;
- case GL_NUM_LOOPBACK_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(3);
- break;
- case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
- CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(3);
- break;
- case GL_STENCIL_BACK_FUNC:
- params[0] = ENUM_TO_INT64(ctx->Stencil.Function[1]);
- break;
- case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = (GLint64)(ctx->Stencil.ValueMask[1]);
- break;
- case GL_STENCIL_BACK_WRITEMASK:
- params[0] = (GLint64)(ctx->Stencil.WriteMask[1]);
- break;
- case GL_STENCIL_BACK_REF:
- params[0] = (GLint64)(ctx->Stencil.Ref[1]);
- break;
- case GL_STENCIL_BACK_FAIL:
- params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- params[0] = ENUM_TO_INT64(ctx->Stencil.ZFailFunc[1]);
- break;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- params[0] = ENUM_TO_INT64(ctx->Stencil.ZPassFunc[1]);
- break;
- case GL_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->DrawBuffer->Name);
- break;
- case GL_RENDERBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
- break;
- case GL_MAX_COLOR_ATTACHMENTS_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxColorAttachments);
- break;
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxRenderbufferSize);
- break;
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- CHECK_EXT1(EXT_framebuffer_blit, "GetInteger64v");
- params[0] = (GLint64)(ctx->ReadBuffer->Name);
- break;
- case GL_PROVOKING_VERTEX_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Light.ProvokingVertex);
- break;
- case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
- CHECK_EXT1(EXT_provoking_vertex, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Const.QuadsFollowProvokingVertexConvention);
- break;
- case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.FragmentProgram.MaxUniformComponents);
- break;
- case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
- CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
- params[0] = ENUM_TO_INT64(ctx->Hint.FragmentShaderDerivative);
- break;
- case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.VertexProgram.MaxUniformComponents);
- break;
- case GL_MAX_VARYING_FLOATS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxVarying * 4);
- break;
- case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxVertexTextureImageUnits);
- break;
- case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
- CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxCombinedTextureImageUnits);
- break;
- case GL_CURRENT_PROGRAM:
- CHECK_EXT1(ARB_shader_objects, "GetInteger64v");
- params[0] = (GLint64)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
- break;
- case GL_MAX_SAMPLES:
- CHECK_EXT1(ARB_framebuffer_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Const.MaxSamples);
- break;
- case GL_VERTEX_ARRAY_BINDING_APPLE:
- CHECK_EXT1(APPLE_vertex_array_object, "GetInteger64v");
- params[0] = (GLint64)(ctx->Array.ArrayObj->Name);
- break;
- case GL_TEXTURE_CUBE_MAP_SEAMLESS:
- CHECK_EXT1(ARB_seamless_cube_map, "GetInteger64v");
- params[0] = BOOLEAN_TO_INT64(ctx->Texture.CubeMapSeamless);
- break;
- case GL_MAX_SERVER_WAIT_TIMEOUT:
- CHECK_EXT1(ARB_sync, "GetInteger64v");
- params[0] = ctx->Const.MaxServerWaitTimeout;
- break;
- case GL_NUM_EXTENSIONS:
- params[0] = (GLint64)(_mesa_get_extension_count(ctx));
- break;
- case GL_MAJOR_VERSION:
- params[0] = (GLint64)(ctx->VersionMajor);
- break;
- case GL_MINOR_VERSION:
- params[0] = (GLint64)(ctx->VersionMinor);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64v(pname=0x%x)", pname);
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = ((GLboolean*) p)[0];
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT64(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT64(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
}
}
#endif /* FEATURE_ARB_sync */
-
void GLAPIENTRY
-_mesa_GetDoublev( GLenum pname, GLdouble *params )
+_mesa_GetDoublev(GLenum pname, GLdouble *params)
{
- const GLfloat magic = -1234.5F;
- GLfloat values[16];
- GLuint i;
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
- if (!params)
- return;
+ d = find_value("glGetDoublev", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
- /* Init temp array to magic numbers so we can figure out how many values
- * are returned by the GetFloatv() call.
- */
- for (i = 0; i < 16; i++)
- values[i] = magic;
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = ((GLfloat *) p)[3];
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = ((GLfloat *) p)[2];
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = ((GLfloat *) p)[1];
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = ((GLfloat *) p)[0];
+ break;
- _mesa_GetFloatv(pname, values);
-
- for (i = 0; i < 16 && values[i] != magic; i++)
- params[i] = (GLdouble) values[i];
+ case TYPE_DOUBLEN:
+ params[0] = ((GLdouble *) p)[0];
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = v.value_int_n.ints[i];
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = *(GLboolean*) p;
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[i];
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[transpose[i]];
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
+ }
}
-void GLAPIENTRY
-_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
+static enum value_type
+find_value_indexed(const char *func, GLenum pname, int index, union value *v)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (!params)
- return;
+ switch (pname) {
- if (ctx->NewState)
- _mesa_update_state(ctx);
+ case GL_BLEND:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_draw_buffers2)
+ goto invalid_enum;
+ v->value_int = (ctx->Color.BlendEnabled >> index) & 1;
+ return TYPE_INT;
- switch (pname) {
- case GL_BLEND:
- CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname);
- }
- params[0] = INT_TO_BOOLEAN(((ctx->Color.BlendEnabled >> index) & 1));
- break;
- case GL_COLOR_WRITEMASK:
- CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname);
- }
- params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0);
- params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0);
- params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0);
- params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanIndexedv(pname=0x%x)", pname);
+ case GL_COLOR_WRITEMASK:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_draw_buffers2)
+ goto invalid_enum;
+ v->value_int_4[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0;
+ v->value_int_4[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0;
+ v->value_int_4[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0;
+ v->value_int_4[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0;
+ return TYPE_INT_4;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_START:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int64 = ctx->TransformFeedback.CurrentObject->Offset[index];
+ return TYPE_INT64;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int64 = ctx->TransformFeedback.CurrentObject->Size[index];
+ return TYPE_INT64;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int = ctx->TransformFeedback.CurrentObject->Buffers[index]->Name;
+ return TYPE_INT;
}
+
+ invalid_enum:
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return TYPE_INVALID;
+ invalid_value:
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return TYPE_INVALID;
}
void GLAPIENTRY
-_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
+_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ union value v;
- if (!params)
- return;
+ switch (find_value_indexed("glGetBooleanIndexedv", pname, index, &v)) {
+ case TYPE_INT:
+ params[0] = INT_TO_BOOLEAN(v.value_int);
+ break;
+ case TYPE_INT_4:
+ params[0] = INT_TO_BOOLEAN(v.value_int_4[0]);
+ params[1] = INT_TO_BOOLEAN(v.value_int_4[1]);
+ params[2] = INT_TO_BOOLEAN(v.value_int_4[2]);
+ params[3] = INT_TO_BOOLEAN(v.value_int_4[3]);
+ break;
+ case TYPE_INT64:
+ params[0] = INT64_TO_BOOLEAN(v.value_int);
+ break;
+ default:
+ assert(0);
+ }
+}
- if (ctx->NewState)
- _mesa_update_state(ctx);
+void GLAPIENTRY
+_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
+{
+ union value v;
- switch (pname) {
- case GL_BLEND:
- CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname);
- }
- params[0] = ((ctx->Color.BlendEnabled >> index) & 1);
- break;
- case GL_COLOR_WRITEMASK:
- CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname);
- }
- params[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0;
- params[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0;
- params[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0;
- params[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerIndexedv(pname=0x%x)", pname);
+ switch (find_value_indexed("glGetIntegerIndexedv", pname, index, &v)) {
+ case TYPE_INT:
+ params[0] = v.value_int;
+ break;
+ case TYPE_INT_4:
+ params[0] = v.value_int_4[0];
+ params[1] = v.value_int_4[1];
+ params[2] = v.value_int_4[2];
+ params[3] = v.value_int_4[3];
+ break;
+ case TYPE_INT64:
+ params[0] = INT64_TO_INT(v.value_int);
+ break;
+ default:
+ assert(0);
}
}
@@ -7643,36 +2364,109 @@ _mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
void GLAPIENTRY
_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (!params)
- return;
+ union value v;
- if (ctx->NewState)
- _mesa_update_state(ctx);
-
- switch (pname) {
- case GL_BLEND:
- CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname);
- }
- params[0] = (GLint64)(((ctx->Color.BlendEnabled >> index) & 1));
- break;
- case GL_COLOR_WRITEMASK:
- CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv");
- if (index >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname);
- }
- params[0] = (GLint64)(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0);
- params[1] = (GLint64)(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0);
- params[2] = (GLint64)(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0);
- params[3] = (GLint64)(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64Indexedv(pname=0x%x)", pname);
+ switch (find_value_indexed("glGetIntegerIndexedv", pname, index, &v)) {
+ case TYPE_INT:
+ params[0] = v.value_int;
+ break;
+ case TYPE_INT_4:
+ params[0] = v.value_int_4[0];
+ params[1] = v.value_int_4[1];
+ params[2] = v.value_int_4[2];
+ params[3] = v.value_int_4[3];
+ break;
+ case TYPE_INT64:
+ params[0] = v.value_int;
+ break;
+ default:
+ assert(0);
}
}
#endif /* FEATURE_ARB_sync */
+#if FEATURE_ES1
+void GLAPIENTRY
+_mesa_GetFixedv(GLenum pname, GLfixed *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetDoublev", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = INT_TO_FIXED(d->offset);
+ break;
+
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_FIXED(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_FIXED(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_FIXED(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_FIXED(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_FIXED(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = INT_TO_FIXED(((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = INT_TO_FIXED(((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = INT_TO_FIXED(((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = INT_TO_FIXED(((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_FIXED(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_FIXED(((GLboolean*) p)[0]);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_FIXED(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_FIXED(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = BOOLEAN_TO_FIXED((*(GLbitfield *) p >> shift) & 1);
+ break;
+ }
+}
+#endif
diff --git a/mesalib/src/mesa/main/get.h b/mesalib/src/mesa/main/get.h
index cc426fc0f..99a004b71 100644
--- a/mesalib/src/mesa/main/get.h
+++ b/mesalib/src/mesa/main/get.h
@@ -32,7 +32,7 @@
#define GET_H
-#include "mtypes.h"
+#include "glheader.h"
extern void GLAPIENTRY
@@ -51,6 +51,9 @@ extern void GLAPIENTRY
_mesa_GetInteger64v( GLenum pname, GLint64 *params );
extern void GLAPIENTRY
+_mesa_GetFixedv(GLenum pname, GLfixed *params);
+
+extern void GLAPIENTRY
_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params );
extern void GLAPIENTRY
diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c
index 51dd5f779..3910047fb 100644
--- a/mesalib/src/mesa/main/getstring.c
+++ b/mesalib/src/mesa/main/getstring.c
@@ -32,6 +32,46 @@
/**
+ * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
+ */
+static const GLubyte *
+shading_language_version(GLcontext *ctx)
+{
+ switch (ctx->API) {
+ case API_OPENGL:
+ if (!ctx->Extensions.ARB_shader_objects) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetString");
+ return (const GLubyte *) 0;
+ }
+
+ switch (ctx->Const.GLSLVersion) {
+ case 110:
+ return (const GLubyte *) "1.10";
+ case 120:
+ return (const GLubyte *) "1.20";
+ case 130:
+ return (const GLubyte *) "1.30";
+ default:
+ _mesa_problem(ctx,
+ "Invalid GLSL version in shading_language_version()");
+ return (const GLubyte *) 0;
+ }
+ break;
+
+ case API_OPENGLES2:
+ return (const GLubyte *) "OpenGL ES GLSL ES 1.0.16";
+
+ case API_OPENGLES:
+ /* fall-through */
+
+ default:
+ _mesa_problem(ctx, "Unexpected API value in shading_language_version()");
+ return (const GLubyte *) 0;
+ }
+}
+
+
+/**
* Query string-valued state. The return value should _not_ be freed by
* the caller.
*
@@ -71,16 +111,10 @@ _mesa_GetString( GLenum name )
case GL_VERSION:
return (const GLubyte *) ctx->VersionString;
case GL_EXTENSIONS:
- if (!ctx->Extensions.String)
- ctx->Extensions.String = _mesa_make_extension_string(ctx);
return (const GLubyte *) ctx->Extensions.String;
-#if FEATURE_ARB_shading_language_100
- case GL_SHADING_LANGUAGE_VERSION_ARB:
- if (ctx->Extensions.ARB_shading_language_120)
- return (const GLubyte *) "1.20";
- else if (ctx->Extensions.ARB_shading_language_100)
- return (const GLubyte *) "1.10";
- goto error;
+#if FEATURE_ARB_shading_language_100 || FEATURE_ES2
+ case GL_SHADING_LANGUAGE_VERSION:
+ return shading_language_version(ctx);
#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program || \
FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
@@ -93,9 +127,6 @@ _mesa_GetString( GLenum name )
}
/* FALL-THROUGH */
#endif
-#if FEATURE_ARB_shading_language_100
- error:
-#endif
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetString" );
return (const GLubyte *) 0;
@@ -155,10 +186,6 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetPointerv %s\n", _mesa_lookup_enum_by_nr(pname));
- if (ctx->Driver.GetPointerv
- && (*ctx->Driver.GetPointerv)(ctx, pname, params))
- return;
-
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
*params = (GLvoid *) ctx->Array.ArrayObj->Vertex.Ptr;
diff --git a/mesalib/src/mesa/main/glheader.h b/mesalib/src/mesa/main/glheader.h
index 77544c88c..45f7b55ad 100644
--- a/mesalib/src/mesa/main/glheader.h
+++ b/mesalib/src/mesa/main/glheader.h
@@ -55,11 +55,11 @@
#include "GL/internal/glcore.h"
-#ifndef GL_FIXED
-#define GL_FIXED 0x140C
+/**
+ * GL_FIXED is defined in glext.h version 64 but these typedefs aren't (yet).
+ */
typedef int GLfixed;
typedef int GLclampx;
-#endif
#ifndef GL_OES_EGL_image
@@ -85,11 +85,61 @@ typedef void *GLeglImageOES;
#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
#endif
+/* GLES 2.0 tokens */
+#ifndef GL_RGB565
+#define GL_RGB565 0x8D62
+#endif
+
+#ifndef GL_TEXTURE_GEN_STR_OES
+#define GL_TEXTURE_GEN_STR_OES 0x8D60
+#endif
+
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+#ifndef GL_OES_matrix_get
+#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
+#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
+#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
+#endif
+
+#ifndef GL_ES_VERSION_2_0
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+#define GL_SHADER_COMPILER 0x8DFA
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#endif
+
+
/**
- * Special, internal token
+ * Internal token to represent a GLSL shader program (a collection of
+ * one or more shaders that get linked together). Note that GLSL
+ * shaders and shader programs share one name space (one hash table)
+ * so we need a value that's different from any of the
+ * GL_VERTEX/FRAGMENT/GEOMETRY_PROGRAM tokens.
*/
#define GL_SHADER_PROGRAM_MESA 0x9999
+/**
+ * Internal token for geometry programs.
+ * Use the value for GL_GEOMETRY_PROGRAM_NV for now.
+ */
+#define MESA_GEOMETRY_PROGRAM 0x8c26
+
+
+
#endif /* GLHEADER_H */
diff --git a/mesalib/src/mesa/main/histogram.c b/mesalib/src/mesa/main/histogram.c
index 3a65bb192..4e482bcd5 100644
--- a/mesalib/src/mesa/main/histogram.c
+++ b/mesalib/src/mesa/main/histogram.c
@@ -29,6 +29,7 @@
#include "context.h"
#include "image.h"
#include "histogram.h"
+#include "macros.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/image.c b/mesalib/src/mesa/main/image.c
index dc8d97728..86aa6d0d7 100644
--- a/mesalib/src/mesa/main/image.c
+++ b/mesalib/src/mesa/main/image.c
@@ -32,7 +32,6 @@
#include "glheader.h"
#include "colormac.h"
-#include "context.h"
#include "enums.h"
#include "image.h"
#include "imports.h"
@@ -274,17 +273,25 @@ _mesa_components_in_format( GLenum format )
case GL_STENCIL_INDEX:
case GL_DEPTH_COMPONENT:
case GL_RED:
+ case GL_RED_INTEGER_EXT:
case GL_GREEN:
+ case GL_GREEN_INTEGER_EXT:
case GL_BLUE:
+ case GL_BLUE_INTEGER_EXT:
case GL_ALPHA:
+ case GL_ALPHA_INTEGER_EXT:
case GL_LUMINANCE:
+ case GL_LUMINANCE_INTEGER_EXT:
case GL_INTENSITY:
return 1;
case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
return 2;
case GL_RGB:
+ case GL_RGB_INTEGER_EXT:
return 3;
case GL_RGBA:
+ case GL_RGBA_INTEGER_EXT:
return 4;
case GL_BGR:
return 3;
@@ -523,6 +530,28 @@ _mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type )
default:
return GL_FALSE;
}
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ return ctx->Extensions.EXT_texture_integer;
+ default:
+ return GL_FALSE;
+ }
+
default:
; /* fall-through */
}
@@ -734,6 +763,32 @@ _mesa_is_depthstencil_format(GLenum format)
}
}
+
+/**
+ * Test if the given image format is a depth or stencil format.
+ */
+GLboolean
+_mesa_is_depth_or_stencil_format(GLenum format)
+{
+ switch (format) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT16:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ case GL_STENCIL_INDEX:
+ case GL_STENCIL_INDEX1_EXT:
+ case GL_STENCIL_INDEX4_EXT:
+ case GL_STENCIL_INDEX8_EXT:
+ case GL_STENCIL_INDEX16_EXT:
+ case GL_DEPTH_STENCIL_EXT:
+ case GL_DEPTH24_STENCIL8_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
/**
* Test if the given image format is a dudv format.
*/
@@ -751,6 +806,64 @@ _mesa_is_dudv_format(GLenum format)
/**
+ * Test if the given format is an integer (non-normalized) format.
+ */
+GLboolean
+_mesa_is_integer_format(GLenum format)
+{
+ switch (format) {
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Test if an image format is a supported compressed format.
+ * \param format the internal format token provided by the user.
+ * \return GL_TRUE if compressed, GL_FALSE if uncompressed
+ */
+GLboolean
+_mesa_is_compressed_format(GLcontext *ctx, GLenum format)
+{
+ switch (format) {
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return ctx->Extensions.EXT_texture_compression_s3tc;
+ case GL_RGB_S3TC:
+ case GL_RGB4_S3TC:
+ case GL_RGBA_S3TC:
+ case GL_RGBA4_S3TC:
+ return ctx->Extensions.S3_s3tc;
+ case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+ return ctx->Extensions.EXT_texture_sRGB
+ && ctx->Extensions.EXT_texture_compression_s3tc;
+ case GL_COMPRESSED_RGB_FXT1_3DFX:
+ case GL_COMPRESSED_RGBA_FXT1_3DFX:
+ return ctx->Extensions.TDFX_texture_compression_FXT1;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
* Return the address of a specific pixel in an image (1D, 2D or 3D).
*
* Pixel unpacking/packing parameters are observed according to \p packing.
@@ -3215,6 +3328,8 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLint redIndex, greenIndex, blueIndex, alphaIndex;
GLint stride;
GLint rComp, bComp, gComp, aComp;
+ GLboolean intFormat;
+ GLfloat rs = 1.0f, gs = 1.0f, bs = 1.0f, as = 1.0f; /* scale factors */
ASSERT(srcFormat == GL_RED ||
srcFormat == GL_GREEN ||
@@ -3229,7 +3344,17 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
srcFormat == GL_BGRA ||
srcFormat == GL_ABGR_EXT ||
srcFormat == GL_DU8DV8_ATI ||
- srcFormat == GL_DUDV_ATI);
+ srcFormat == GL_DUDV_ATI ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
ASSERT(srcType == GL_UNSIGNED_BYTE ||
srcType == GL_BYTE ||
@@ -3256,31 +3381,37 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
switch (srcFormat) {
case GL_RED:
+ case GL_RED_INTEGER_EXT:
redIndex = 0;
greenIndex = blueIndex = alphaIndex = -1;
stride = 1;
break;
case GL_GREEN:
+ case GL_GREEN_INTEGER_EXT:
greenIndex = 0;
redIndex = blueIndex = alphaIndex = -1;
stride = 1;
break;
case GL_BLUE:
+ case GL_BLUE_INTEGER_EXT:
blueIndex = 0;
redIndex = greenIndex = alphaIndex = -1;
stride = 1;
break;
case GL_ALPHA:
+ case GL_ALPHA_INTEGER_EXT:
redIndex = greenIndex = blueIndex = -1;
alphaIndex = 0;
stride = 1;
break;
case GL_LUMINANCE:
+ case GL_LUMINANCE_INTEGER_EXT:
redIndex = greenIndex = blueIndex = 0;
alphaIndex = -1;
stride = 1;
break;
case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
redIndex = greenIndex = blueIndex = 0;
alphaIndex = 1;
stride = 2;
@@ -3290,6 +3421,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
stride = 1;
break;
case GL_RGB:
+ case GL_RGB_INTEGER:
redIndex = 0;
greenIndex = 1;
blueIndex = 2;
@@ -3312,6 +3444,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
stride = 3;
break;
case GL_RGBA:
+ case GL_RGBA_INTEGER:
redIndex = 0;
greenIndex = 1;
blueIndex = 2;
@@ -3358,12 +3491,20 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
return;
}
+ intFormat = _mesa_is_integer_format(srcFormat);
-#define PROCESS(INDEX, CHANNEL, DEFAULT, TYPE, CONVERSION) \
+#define PROCESS(INDEX, CHANNEL, DEFAULT, DEFAULT_INT, TYPE, CONVERSION) \
if ((INDEX) < 0) { \
GLuint i; \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = DEFAULT; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = DEFAULT_INT; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = DEFAULT; \
+ } \
} \
} \
else if (swapBytes) { \
@@ -3377,77 +3518,93 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
else if (sizeof(TYPE) == 4) { \
SWAP4BYTE(value); \
} \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \
+ if (intFormat) \
+ rgba[i][CHANNEL] = (GLfloat) value; \
+ else \
+ rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \
s += stride; \
} \
} \
else { \
const TYPE *s = (const TYPE *) src; \
GLuint i; \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \
- s += stride; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = (GLfloat) s[INDEX]; \
+ s += stride; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \
+ s += stride; \
+ } \
} \
}
switch (srcType) {
case GL_UNSIGNED_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 255, GLubyte, UBYTE_TO_FLOAT);
break;
case GL_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 127, GLbyte, BYTE_TO_FLOAT);
break;
case GL_UNSIGNED_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, GLushort, USHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLushort, USHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLushort, USHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLushort, USHORT_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 0xffff, GLushort, USHORT_TO_FLOAT);
break;
case GL_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, GLshort, SHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLshort, SHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLshort, SHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLshort, SHORT_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 32767, GLshort, SHORT_TO_FLOAT);
break;
case GL_UNSIGNED_INT:
- PROCESS(redIndex, RCOMP, 0.0F, GLuint, UINT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLuint, UINT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLuint, UINT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLuint, UINT_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 0xffffffff, GLuint, UINT_TO_FLOAT);
break;
case GL_INT:
- PROCESS(redIndex, RCOMP, 0.0F, GLint, INT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, GLint, INT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, GLint, INT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLint, INT_TO_FLOAT);
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 2147483647, GLint, INT_TO_FLOAT);
break;
case GL_FLOAT:
- PROCESS(redIndex, RCOMP, 0.0F, GLfloat, (GLfloat));
- PROCESS(greenIndex, GCOMP, 0.0F, GLfloat, (GLfloat));
- PROCESS(blueIndex, BCOMP, 0.0F, GLfloat, (GLfloat));
- PROCESS(alphaIndex, ACOMP, 1.0F, GLfloat, (GLfloat));
+ PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
break;
case GL_HALF_FLOAT_ARB:
- PROCESS(redIndex, RCOMP, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(greenIndex, GCOMP, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(blueIndex, BCOMP, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(alphaIndex, ACOMP, 1.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
break;
case GL_UNSIGNED_BYTE_3_3_2:
{
const GLubyte *ubsrc = (const GLubyte *) src;
GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
for (i = 0; i < n; i ++) {
GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p >> 5) ) * (1.0F / 7.0F);
- rgba[i][gComp] = ((p >> 2) & 0x7) * (1.0F / 7.0F);
- rgba[i][bComp] = ((p ) & 0x3) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p >> 5) ) * rs;
+ rgba[i][gComp] = ((p >> 2) & 0x7) * gs;
+ rgba[i][bComp] = ((p ) & 0x3) * bs;
rgba[i][aComp] = 1.0F;
}
}
@@ -3456,25 +3613,35 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
{
const GLubyte *ubsrc = (const GLubyte *) src;
GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
for (i = 0; i < n; i ++) {
GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p ) & 0x7) * (1.0F / 7.0F);
- rgba[i][gComp] = ((p >> 3) & 0x7) * (1.0F / 7.0F);
- rgba[i][bComp] = ((p >> 6) ) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p ) & 0x7) * rs;
+ rgba[i][gComp] = ((p >> 3) & 0x7) * gs;
+ rgba[i][bComp] = ((p >> 6) ) * bs;
rgba[i][aComp] = 1.0F;
}
}
break;
case GL_UNSIGNED_SHORT_5_6_5:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x3f) * (1.0F / 63.0F);
- rgba[i][bComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p ) & 0x1f) * bs;
rgba[i][aComp] = 1.0F;
}
}
@@ -3483,23 +3650,28 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x3f) * (1.0F / 63.0F);
- rgba[i][bComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p ) & 0x1f) * bs;
rgba[i][aComp] = 1.0F;
}
}
break;
case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x3f) * (1.0F / 63.0F);
- rgba[i][bComp] = ((p >> 11) ) * (1.0F / 31.0F);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p >> 11) ) * bs;
rgba[i][aComp] = 1.0F;
}
}
@@ -3508,24 +3680,27 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x3f) * (1.0F / 63.0F);
- rgba[i][bComp] = ((p >> 11) ) * (1.0F / 31.0F);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p >> 11) ) * bs;
rgba[i][aComp] = 1.0F;
}
}
break;
case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 12) ) * (1.0F / 15.0F);
- rgba[i][gComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F);
- rgba[i][bComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F);
- rgba[i][aComp] = ((p ) & 0xf) * (1.0F / 15.0F);
+ rgba[i][rComp] = ((p >> 12) ) * rs;
+ rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aComp] = ((p ) & 0xf) * as;
}
}
else {
@@ -3533,24 +3708,27 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 12) ) * (1.0F / 15.0F);
- rgba[i][gComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F);
- rgba[i][bComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F);
- rgba[i][aComp] = ((p ) & 0xf) * (1.0F / 15.0F);
+ rgba[i][rComp] = ((p >> 12) ) * rs;
+ rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aComp] = ((p ) & 0xf) * as;
}
}
break;
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0xf) * (1.0F / 15.0F);
- rgba[i][gComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F);
- rgba[i][bComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F);
- rgba[i][aComp] = ((p >> 12) ) * (1.0F / 15.0F);
+ rgba[i][rComp] = ((p ) & 0xf) * rs;
+ rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aComp] = ((p >> 12) ) * as;
}
}
else {
@@ -3558,24 +3736,27 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0xf) * (1.0F / 15.0F);
- rgba[i][gComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F);
- rgba[i][bComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F);
- rgba[i][aComp] = ((p >> 12) ) * (1.0F / 15.0F);
+ rgba[i][rComp] = ((p ) & 0xf) * rs;
+ rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aComp] = ((p >> 12) ) * as;
}
}
break;
case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 6) & 0x1f) * (1.0F / 31.0F);
- rgba[i][bComp] = ((p >> 1) & 0x1f) * (1.0F / 31.0F);
- rgba[i][aComp] = ((p ) & 0x1) * (1.0F / 1.0F);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aComp] = ((p ) & 0x1) * as;
}
}
else {
@@ -3583,24 +3764,27 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 6) & 0x1f) * (1.0F / 31.0F);
- rgba[i][bComp] = ((p >> 1) & 0x1f) * (1.0F / 31.0F);
- rgba[i][aComp] = ((p ) & 0x1) * (1.0F / 1.0F);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aComp] = ((p ) & 0x1) * as;
}
}
break;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
if (swapBytes) {
const GLushort *ussrc = (const GLushort *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x1f) * (1.0F / 31.0F);
- rgba[i][bComp] = ((p >> 10) & 0x1f) * (1.0F / 31.0F);
- rgba[i][aComp] = ((p >> 15) ) * (1.0F / 1.0F);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aComp] = ((p >> 15) ) * as;
}
}
else {
@@ -3608,10 +3792,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F);
- rgba[i][gComp] = ((p >> 5) & 0x1f) * (1.0F / 31.0F);
- rgba[i][bComp] = ((p >> 10) & 0x1f) * (1.0F / 31.0F);
- rgba[i][aComp] = ((p >> 15) ) * (1.0F / 1.0F);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aComp] = ((p >> 15) ) * as;
}
}
break;
@@ -3619,23 +3803,45 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
if (swapBytes) {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ }
}
}
else {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p >> 24) );
+ rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
}
}
break;
@@ -3643,37 +3849,65 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
if (swapBytes) {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p >> 24) );
+ rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
}
}
else {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ }
}
}
break;
case GL_UNSIGNED_INT_10_10_10_2:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
if (swapBytes) {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
SWAP4BYTE(p);
- rgba[i][rComp] = ((p >> 22) ) * (1.0F / 1023.0F);
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][aComp] = ((p ) & 0x3 ) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p >> 22) ) * rs;
+ rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p ) & 0x3 ) * as;
}
}
else {
@@ -3681,24 +3915,30 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = ((p >> 22) ) * (1.0F / 1023.0F);
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][aComp] = ((p ) & 0x3 ) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p >> 22) ) * rs;
+ rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p ) & 0x3 ) * as;
}
}
break;
case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
if (swapBytes) {
const GLuint *uisrc = (const GLuint *) src;
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
SWAP4BYTE(p);
- rgba[i][rComp] = ((p ) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][aComp] = ((p >> 30) ) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p ) & 0x3ff) * rs;
+ rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p >> 30) ) * as;
}
}
else {
@@ -3706,10 +3946,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = ((p ) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * (1.0F / 1023.0F);
- rgba[i][aComp] = ((p >> 30) ) * (1.0F / 3.0F);
+ rgba[i][rComp] = ((p ) & 0x3ff) * rs;
+ rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p >> 30) ) * as;
}
}
break;
@@ -4101,6 +4341,16 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
srcFormat == GL_RGBA ||
srcFormat == GL_BGRA ||
srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT ||
srcFormat == GL_COLOR_INDEX);
ASSERT(srcType == GL_BITMAP ||
diff --git a/mesalib/src/mesa/main/image.h b/mesalib/src/mesa/main/image.h
index 9b34be0df..8b180d6bf 100644
--- a/mesalib/src/mesa/main/image.h
+++ b/mesalib/src/mesa/main/image.h
@@ -73,8 +73,16 @@ extern GLboolean
_mesa_is_depthstencil_format(GLenum format);
extern GLboolean
+_mesa_is_depth_or_stencil_format(GLenum format);
+
+extern GLboolean
_mesa_is_dudv_format(GLenum format);
+extern GLboolean
+_mesa_is_integer_format(GLenum format);
+
+extern GLboolean
+_mesa_is_compressed_format(GLcontext *ctx, GLenum format);
extern GLvoid *
_mesa_image_address( GLuint dimensions,
diff --git a/mesalib/src/mesa/main/imports.c b/mesalib/src/mesa/main/imports.c
index b1389b25f..46e5c932d 100644
--- a/mesalib/src/mesa/main/imports.c
+++ b/mesalib/src/mesa/main/imports.c
@@ -243,41 +243,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
/** \name Math */
/*@{*/
-/** Wrapper around sin() */
-double
-_mesa_sin(double a)
-{
- return sin(a);
-}
-
-/** Single precision wrapper around sin() */
-float
-_mesa_sinf(float a)
-{
- return (float) sin((double) a);
-}
-
-/** Wrapper around cos() */
-double
-_mesa_cos(double a)
-{
- return cos(a);
-}
-
-/** Single precision wrapper around asin() */
-float
-_mesa_asinf(float x)
-{
- return (float) asin((double) x);
-}
-
-/** Single precision wrapper around atan() */
-float
-_mesa_atanf(float x)
-{
- return (float) atan((double) x);
-}
-
/** Wrapper around sqrt() */
double
_mesa_sqrtd(double x)
@@ -486,15 +451,6 @@ _mesa_inv_sqrtf(float n)
#endif
}
-
-/** Wrapper around pow() */
-double
-_mesa_pow(double x, double y)
-{
- return pow(x, y);
-}
-
-
/**
* Find the first bit set in a word.
*/
@@ -800,7 +756,7 @@ _mesa_strdup( const char *s )
float
_mesa_strtof( const char *s, char **end )
{
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
static locale_t loc = NULL;
if (!loc) {
loc = newlocale(LC_CTYPE_MASK, "C", NULL);
diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h
index 1c263aabc..751f20650 100644
--- a/mesalib/src/mesa/main/imports.h
+++ b/mesalib/src/mesa/main/imports.h
@@ -116,6 +116,42 @@ typedef union { GLfloat f; GLint i; } fi_type;
#endif
+/**
+ * \name Work-arounds for platforms that lack C99 math functions
+ */
+/*@{*/
+#if (!defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE < 600)) && !defined(_ISOC99_SOURCE) \
+ && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) \
+ && (!defined(_MSC_VER) || (_MSC_VER < 1400))
+#define acosf(f) ((float) acos(f))
+#define asinf(f) ((float) asin(f))
+#define atan2f(x,y) ((float) atan2(x,y))
+#define atanf(f) ((float) atan(f))
+#define cielf(f) ((float) ciel(f))
+#define cosf(f) ((float) cos(f))
+#define coshf(f) ((float) cosh(f))
+#define expf(f) ((float) exp(f))
+#define exp2f(f) ((float) exp2(f))
+#define floorf(f) ((float) floor(f))
+#define logf(f) ((float) log(f))
+#define log2f(f) ((float) log2(f))
+#define powf(x,y) ((float) pow(x,y))
+#define sinf(f) ((float) sin(f))
+#define sinhf(f) ((float) sinh(f))
+#define sqrtf(f) ((float) sqrt(f))
+#define tanf(f) ((float) tan(f))
+#define tanhf(f) ((float) tanh(f))
+#endif
+
+#if defined(_MSC_VER)
+static INLINE float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
+static INLINE float exp2f(float x) { return powf(2.0f, x); }
+static INLINE float log2f(float x) { return logf(x) * 1.442695041f; }
+static INLINE int isblank(int ch) { return ch == ' ' || ch == '\t'; }
+#define strtoll(p, e, b) _strtoi64(p, e, b)
+#endif
+/*@}*/
+
/***
*** LOG2: Log base 2 of float
***/
@@ -444,42 +480,6 @@ _mesa_next_pow_two_64(uint64_t x)
}
-/***
- *** UNCLAMPED_FLOAT_TO_UBYTE: clamp float to [0,1] and map to ubyte in [0,255]
- *** CLAMPED_FLOAT_TO_UBYTE: map float known to be in [0,1] to ubyte in [0,255]
- ***/
-#if defined(USE_IEEE) && !defined(DEBUG)
-#define IEEE_0996 0x3f7f0000 /* 0.996 or so */
-/* This function/macro is sensitive to precision. Test very carefully
- * if you change it!
- */
-#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F) \
- do { \
- fi_type __tmp; \
- __tmp.f = (F); \
- if (__tmp.i < 0) \
- UB = (GLubyte) 0; \
- else if (__tmp.i >= IEEE_0996) \
- UB = (GLubyte) 255; \
- else { \
- __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; \
- UB = (GLubyte) __tmp.i; \
- } \
- } while (0)
-#define CLAMPED_FLOAT_TO_UBYTE(UB, F) \
- do { \
- fi_type __tmp; \
- __tmp.f = (F) * (255.0F/256.0F) + 32768.0F; \
- UB = (GLubyte) __tmp.i; \
- } while (0)
-#else
-#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \
- ub = ((GLubyte) IROUND(CLAMP((f), 0.0F, 1.0F) * 255.0F))
-#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \
- ub = ((GLubyte) IROUND((f) * 255.0F))
-#endif
-
-
/**
* Return 1 if this is a little endian machine, 0 if big endian.
*/
@@ -522,21 +522,6 @@ extern void
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
extern double
-_mesa_sin(double a);
-
-extern float
-_mesa_sinf(float a);
-
-extern double
-_mesa_cos(double a);
-
-extern float
-_mesa_asinf(float x);
-
-extern float
-_mesa_atanf(float x);
-
-extern double
_mesa_sqrtd(double x);
extern float
@@ -548,9 +533,6 @@ _mesa_inv_sqrtf(float x);
extern void
_mesa_init_sqrt_table(void);
-extern double
-_mesa_pow(double x, double y);
-
extern int
_mesa_ffs(int32_t i);
@@ -584,19 +566,25 @@ extern unsigned int
_mesa_str_checksum(const char *str);
extern int
-_mesa_snprintf( char *str, size_t size, const char *fmt, ... );
+_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4);
extern void
-_mesa_warning( __GLcontext *gc, const char *fmtString, ... );
+_mesa_warning( __GLcontext *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3);
extern void
-_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... );
+_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
extern void
-_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
+_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4);
extern void
-_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... );
+_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
+
+
+#if defined(_MSC_VER) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
#ifdef __cplusplus
}
diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c
index 19dc96892..43ae28c25 100644
--- a/mesalib/src/mesa/main/light.c
+++ b/mesalib/src/mesa/main/light.c
@@ -162,7 +162,7 @@ _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
light->SpotCutoff = params[0];
- light->_CosCutoffNeg = (GLfloat) (_mesa_cos(light->SpotCutoff * DEG2RAD));
+ light->_CosCutoffNeg = (GLfloat) (cos(light->SpotCutoff * DEG2RAD));
if (light->_CosCutoffNeg < 0)
light->_CosCutoff = 0;
else
@@ -599,7 +599,7 @@ _mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
bitmask |= MAT_BIT_FRONT_INDEXES | MAT_BIT_BACK_INDEXES;
break;
default:
- _mesa_error( ctx, GL_INVALID_ENUM, where );
+ _mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
return 0;
}
@@ -610,12 +610,12 @@ _mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
bitmask &= BACK_MATERIAL_BITS;
}
else if (face != GL_FRONT_AND_BACK) {
- _mesa_error( ctx, GL_INVALID_ENUM, where );
+ _mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
return 0;
}
if (bitmask & ~legal) {
- _mesa_error( ctx, GL_INVALID_ENUM, where );
+ _mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
return 0;
}
@@ -950,7 +950,7 @@ validate_spot_exp_table( struct gl_light *l )
for (i = EXP_TABLE_SIZE - 1; i > 0 ;i--) {
if (clamp == 0) {
- tmp = _mesa_pow(i / (GLdouble) (EXP_TABLE_SIZE - 1), exponent);
+ tmp = pow(i / (GLdouble) (EXP_TABLE_SIZE - 1), exponent);
if (tmp < FLT_MIN * 100.0) {
tmp = 0.0;
clamp = 1;
@@ -1012,7 +1012,7 @@ validate_shine_table( GLcontext *ctx, GLuint side, GLfloat shininess )
GLdouble t, x = j / (GLfloat) (SHINE_TABLE_SIZE - 1);
if (x < 0.005) /* underflow check */
x = 0.005;
- t = _mesa_pow(x, shininess);
+ t = pow(x, shininess);
if (t > 1e-20)
m[j] = (GLfloat) t;
else
diff --git a/mesalib/src/mesa/main/light.h b/mesalib/src/mesa/main/light.h
index 9c1a5eefa..b3436114d 100644
--- a/mesalib/src/mesa/main/light.h
+++ b/mesalib/src/mesa/main/light.h
@@ -94,7 +94,7 @@ do { \
int k = (int) f; \
if (k < 0 /* gcc may cast an overflow float value to negative int value*/ \
|| k > SHINE_TABLE_SIZE-2) \
- result = (GLfloat) _mesa_pow( dp, _tab->shininess ); \
+ result = (GLfloat) pow( dp, _tab->shininess ); \
else \
result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]); \
} while (0)
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h
index a8624574d..b2ec0ba9b 100644
--- a/mesalib/src/mesa/main/macros.h
+++ b/mesalib/src/mesa/main/macros.h
@@ -127,6 +127,44 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
#define CLAMPED_FLOAT_TO_USHORT(us, f) \
us = ( (GLushort) IROUND( (f) * 65535.0F) )
+#define UNCLAMPED_FLOAT_TO_SHORT(s, f) \
+ s = ( (GLshort) IROUND( CLAMP((f), -1.0F, 1.0F) * 32767.0F) )
+
+/***
+ *** UNCLAMPED_FLOAT_TO_UBYTE: clamp float to [0,1] and map to ubyte in [0,255]
+ *** CLAMPED_FLOAT_TO_UBYTE: map float known to be in [0,1] to ubyte in [0,255]
+ ***/
+#if defined(USE_IEEE) && !defined(DEBUG)
+#define IEEE_0996 0x3f7f0000 /* 0.996 or so */
+/* This function/macro is sensitive to precision. Test very carefully
+ * if you change it!
+ */
+#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F) \
+ do { \
+ fi_type __tmp; \
+ __tmp.f = (F); \
+ if (__tmp.i < 0) \
+ UB = (GLubyte) 0; \
+ else if (__tmp.i >= IEEE_0996) \
+ UB = (GLubyte) 255; \
+ else { \
+ __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; \
+ UB = (GLubyte) __tmp.i; \
+ } \
+ } while (0)
+#define CLAMPED_FLOAT_TO_UBYTE(UB, F) \
+ do { \
+ fi_type __tmp; \
+ __tmp.f = (F) * (255.0F/256.0F) + 32768.0F; \
+ UB = (GLubyte) __tmp.i; \
+ } while (0)
+#else
+#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \
+ ub = ((GLubyte) IROUND(CLAMP((f), 0.0F, 1.0F) * 255.0F))
+#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \
+ ub = ((GLubyte) IROUND((f) * 255.0F))
+#endif
+
/*@}*/
diff --git a/mesalib/src/mesa/main/mfeatures.h b/mesalib/src/mesa/main/mfeatures.h
index cb96c4d1d..92311ef7f 100644
--- a/mesalib/src/mesa/main/mfeatures.h
+++ b/mesalib/src/mesa/main/mfeatures.h
@@ -42,9 +42,6 @@
/**
* A feature can be anything. But most of them share certain characteristics.
*
- * When a feature defines driver entries, they can be initialized by
- * _MESA_INIT_<FEATURE>_FUNCTIONS
- *
* When a feature defines vtxfmt entries, they can be initialized and
* installed by
* _MESA_INIT_<FEATURE>_VTXFMT
@@ -68,62 +65,85 @@
* enabled or not.
*/
+#ifndef FEATURE_ES1
+#define FEATURE_ES1 0
+#endif
+#ifndef FEATURE_ES2
+#define FEATURE_ES2 0
+#endif
+
+#define FEATURE_ES (FEATURE_ES1 || FEATURE_ES2)
+
+#ifndef FEATURE_GL
+#define FEATURE_GL !FEATURE_ES
+#endif
+
#ifdef IN_DRI_DRIVER
-#define FEATURE_remap_table 1
+#define FEATURE_remap_table 1
#else
-#define FEATURE_remap_table 0
+#define FEATURE_remap_table 0
#endif
-#define FEATURE_accum _HAVE_FULL_GL
-#define FEATURE_arrayelt _HAVE_FULL_GL
-#define FEATURE_attrib_stack _HAVE_FULL_GL
+#define FEATURE_dispatch 1
+#define FEATURE_texgen 1
+#define FEATURE_userclip 1
+
+#define FEATURE_accum FEATURE_GL
+#define FEATURE_arrayelt FEATURE_GL
+#define FEATURE_attrib_stack FEATURE_GL
/* this disables vtxfmt, api_loopback, and api_noop completely */
-#define FEATURE_beginend _HAVE_FULL_GL
-#define FEATURE_colortable _HAVE_FULL_GL
-#define FEATURE_convolve _HAVE_FULL_GL
-#define FEATURE_dispatch _HAVE_FULL_GL
-#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt && FEATURE_beginend)
-#define FEATURE_draw_read_buffer _HAVE_FULL_GL
-#define FEATURE_drawpix _HAVE_FULL_GL
-#define FEATURE_evaluators _HAVE_FULL_GL
-#define FEATURE_feedback _HAVE_FULL_GL
-#define FEATURE_fixedpt 0
-#define FEATURE_histogram _HAVE_FULL_GL
-#define FEATURE_pixel_transfer _HAVE_FULL_GL
-#define FEATURE_point_size_array 0
-#define FEATURE_queryobj _HAVE_FULL_GL
-#define FEATURE_rastpos _HAVE_FULL_GL
-#define FEATURE_texgen _HAVE_FULL_GL
-#define FEATURE_texture_fxt1 _HAVE_FULL_GL
-#define FEATURE_texture_s3tc _HAVE_FULL_GL
-#define FEATURE_userclip _HAVE_FULL_GL
-#define FEATURE_vertex_array_byte 0
-#define FEATURE_es2_glsl 0
-
-#define FEATURE_ARB_fragment_program _HAVE_FULL_GL
-#define FEATURE_ARB_framebuffer_object _HAVE_FULL_GL
-#define FEATURE_ARB_map_buffer_range _HAVE_FULL_GL
-#define FEATURE_ARB_pixel_buffer_object _HAVE_FULL_GL
-#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL
-#define FEATURE_ARB_vertex_program _HAVE_FULL_GL
-#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL
-#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL
-#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
-#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
-#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
-#define FEATURE_ARB_sync _HAVE_FULL_GL
-
-#define FEATURE_EXT_framebuffer_blit _HAVE_FULL_GL
-#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
-#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL
-#define FEATURE_APPLE_object_purgeable _HAVE_FULL_GL
-#define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL
-#define FEATURE_ATI_fragment_shader _HAVE_FULL_GL
-#define FEATURE_NV_fence _HAVE_FULL_GL
-#define FEATURE_NV_fragment_program _HAVE_FULL_GL
-#define FEATURE_NV_vertex_program _HAVE_FULL_GL
-
-#define FEATURE_OES_EGL_image _HAVE_FULL_GL
+#define FEATURE_beginend FEATURE_GL
+#define FEATURE_colortable FEATURE_GL
+#define FEATURE_convolve FEATURE_GL
+#define FEATURE_dlist (FEATURE_GL && FEATURE_arrayelt && FEATURE_beginend)
+#define FEATURE_draw_read_buffer FEATURE_GL
+#define FEATURE_drawpix FEATURE_GL
+#define FEATURE_evaluators FEATURE_GL
+#define FEATURE_feedback FEATURE_GL
+#define FEATURE_histogram FEATURE_GL
+#define FEATURE_pixel_transfer FEATURE_GL
+#define FEATURE_queryobj FEATURE_GL
+#define FEATURE_rastpos FEATURE_GL
+#define FEATURE_texture_fxt1 FEATURE_GL
+#define FEATURE_texture_s3tc FEATURE_GL
+
+#define FEATURE_extra_context_init FEATURE_ES
+#define FEATURE_fixedpt FEATURE_ES
+#define FEATURE_point_size_array FEATURE_ES
+#define FEATURE_vertex_array_byte FEATURE_ES
+
+#define FEATURE_es2_glsl FEATURE_ES2
+
+#define FEATURE_ARB_fragment_program 1
+#define FEATURE_ARB_vertex_program 1
+#define FEATURE_ARB_vertex_shader 1
+#define FEATURE_ARB_fragment_shader 1
+#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
+#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
+#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
+#define FEATURE_ARB_geometry_shader4 FEATURE_ARB_shader_objects
+
+#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object)
+#define FEATURE_ARB_map_buffer_range FEATURE_GL
+#define FEATURE_ARB_pixel_buffer_object (FEATURE_GL && FEATURE_EXT_pixel_buffer_object)
+#define FEATURE_ARB_sync FEATURE_GL
+#define FEATURE_ARB_vertex_buffer_object 1
+
+#define FEATURE_EXT_framebuffer_blit FEATURE_GL
+#define FEATURE_EXT_framebuffer_object 1
+#define FEATURE_EXT_pixel_buffer_object 1
+#define FEATURE_EXT_texture_sRGB FEATURE_GL
+#define FEATURE_EXT_transform_feedback FEATURE_GL
+
+#define FEATURE_APPLE_object_purgeable FEATURE_GL
+#define FEATURE_ATI_fragment_shader FEATURE_GL
+#define FEATURE_NV_fence FEATURE_GL
+#define FEATURE_NV_fragment_program FEATURE_GL
+#define FEATURE_NV_vertex_program FEATURE_GL
+#define FEATURE_OES_EGL_image 1
+#define FEATURE_OES_draw_texture FEATURE_ES1
+#define FEATURE_OES_framebuffer_object FEATURE_ES
+#define FEATURE_OES_mapbuffer FEATURE_ES
#endif /* FEATURES_H */
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index 51f7edfab..3d1a4c49c 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -415,7 +415,7 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
GLuint i, j, k;
const GLuint *rowA = (const GLuint *) srcRowA;
const GLuint *rowB = (const GLuint *) srcRowB;
- GLfloat *dst = (GLfloat *) dstRow;
+ GLuint *dst = (GLuint *) dstRow;
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i] = (GLfloat)(rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4);
@@ -1005,21 +1005,28 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
const GLint dstRowBytes = bpt * dstRowStride;
const GLubyte *srcA, *srcB;
GLubyte *dst;
- GLint row;
+ GLint row, srcRowStep;
/* Compute src and dst pointers, skipping any border */
srcA = srcPtr + border * ((srcWidth + 1) * bpt);
- if (srcHeight > 1)
+ if (srcHeight > 1 && srcHeight > dstHeight) {
+ /* sample from two source rows */
srcB = srcA + srcRowBytes;
- else
+ srcRowStep = 2;
+ }
+ else {
+ /* sample from one source row */
srcB = srcA;
+ srcRowStep = 1;
+ }
+
dst = dstPtr + border * ((dstWidth + 1) * bpt);
for (row = 0; row < dstHeightNB; row++) {
do_row(datatype, comps, srcWidthNB, srcA, srcB,
dstWidthNB, dst);
- srcA += 2 * srcRowBytes;
- srcB += 2 * srcRowBytes;
+ srcA += srcRowStep * srcRowBytes;
+ srcB += srcRowStep * srcRowBytes;
dst += dstRowBytes;
}
@@ -1581,7 +1588,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
struct gl_texture_image *dstImage;
GLint srcWidth, srcHeight, srcDepth;
GLint dstWidth, dstHeight, dstDepth;
- GLint border, bytesPerTexel;
+ GLint border;
GLboolean nextLevel;
/* get src image parameters */
@@ -1623,33 +1630,24 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
dstImage->FetchTexelc = srcImage->FetchTexelc;
dstImage->FetchTexelf = srcImage->FetchTexelf;
- /* Alloc new teximage data buffer.
- * Setup src and dest data pointers.
- */
- if (_mesa_is_format_compressed(dstImage->TexFormat)) {
- GLuint dstCompressedSize =
- _mesa_format_image_size(dstImage->TexFormat, dstImage->Width,
- dstImage->Height, dstImage->Depth);
- ASSERT(dstCompressedSize > 0);
-
- dstImage->Data = _mesa_alloc_texmemory(dstCompressedSize);
+ /* Alloc new teximage data buffer */
+ {
+ GLuint size = _mesa_format_image_size(dstImage->TexFormat,
+ dstWidth, dstHeight, dstDepth);
+ dstImage->Data = _mesa_alloc_texmemory(size);
if (!dstImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
return;
}
+ }
+
+ /* Setup src and dest data pointers */
+ if (_mesa_is_format_compressed(dstImage->TexFormat)) {
/* srcData and dstData are already set */
ASSERT(srcData);
ASSERT(dstData);
}
else {
- bytesPerTexel = _mesa_get_format_bytes(dstImage->TexFormat);
- ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
- dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
- * dstDepth * bytesPerTexel);
- if (!dstImage->Data) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
srcData = (const GLubyte *) srcImage->Data;
dstData = (GLubyte *) dstImage->Data;
}
diff --git a/mesalib/src/mesa/main/mm.c b/mesalib/src/mesa/main/mm.c
index 3ef38e94b..25a029370 100644
--- a/mesalib/src/mesa/main/mm.c
+++ b/mesalib/src/mesa/main/mm.c
@@ -22,6 +22,11 @@
*
*/
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "compiler.h"
#include "mm.h"
diff --git a/mesalib/src/mesa/main/mm.h b/mesalib/src/mesa/main/mm.h
index df340808a..228721ca2 100644
--- a/mesalib/src/mesa/main/mm.h
+++ b/mesalib/src/mesa/main/mm.h
@@ -32,9 +32,6 @@
#define MM_H
-#include "imports.h"
-
-
struct mem_block {
struct mem_block *next, *prev;
struct mem_block *next_free, *prev_free;
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 9d9b475dd..5494be8f4 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -36,12 +36,19 @@
#include "main/glheader.h"
#include "main/config.h"
-#include "main/compiler.h"
#include "main/mfeatures.h"
#include "glapi/glapi.h"
#include "math/m_matrix.h" /* GLmatrix */
#include "main/simple_list.h" /* struct simple_node */
+/* Shader stages. Note that these will become 5 with tessellation.
+ * These MUST have the same values as PIPE_SHADER_*
+ */
+#define MESA_SHADER_VERTEX 0
+#define MESA_SHADER_FRAGMENT 1
+#define MESA_SHADER_GEOMETRY 2
+#define MESA_SHADER_TYPES 3
+
/**
* Color channel data type.
@@ -238,6 +245,78 @@ typedef enum
} gl_vert_result;
+/*********************************************/
+
+/**
+ * Indexes for geometry program attributes.
+ */
+typedef enum
+{
+ GEOM_ATTRIB_POSITION = 0,
+ GEOM_ATTRIB_COLOR0 = 1,
+ GEOM_ATTRIB_COLOR1 = 2,
+ GEOM_ATTRIB_SECONDARY_COLOR0 = 3,
+ GEOM_ATTRIB_SECONDARY_COLOR1 = 4,
+ GEOM_ATTRIB_FOG_FRAG_COORD = 5,
+ GEOM_ATTRIB_POINT_SIZE = 6,
+ GEOM_ATTRIB_CLIP_VERTEX = 7,
+ GEOM_ATTRIB_PRIMITIVE_ID = 8,
+ GEOM_ATTRIB_TEX_COORD = 9,
+
+ GEOM_ATTRIB_VAR0 = 16,
+ GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + MAX_VARYING)
+} gl_geom_attrib;
+
+/**
+ * Bitflags for geometry attributes.
+ * These are used in bitfields in many places.
+ */
+/*@{*/
+#define GEOM_BIT_COLOR0 (1 << GEOM_ATTRIB_COLOR0)
+#define GEOM_BIT_COLOR1 (1 << GEOM_ATTRIB_COLOR1)
+#define GEOM_BIT_SCOLOR0 (1 << GEOM_ATTRIB_SECONDARY_COLOR0)
+#define GEOM_BIT_SCOLOR1 (1 << GEOM_ATTRIB_SECONDARY_COLOR1)
+#define GEOM_BIT_TEX_COORD (1 << GEOM_ATTRIB_TEX_COORD)
+#define GEOM_BIT_FOG_COORD (1 << GEOM_ATTRIB_FOG_FRAG_COORD)
+#define GEOM_BIT_POSITION (1 << GEOM_ATTRIB_POSITION)
+#define GEOM_BIT_POINT_SIDE (1 << GEOM_ATTRIB_POINT_SIZE)
+#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX)
+#define GEOM_BIT_PRIM_ID (1 << GEOM_ATTRIB_PRIMITIVE_ID)
+#define GEOM_BIT_VAR0 (1 << GEOM_ATTRIB_VAR0)
+
+#define GEOM_BIT_VAR(g) (1 << (GEOM_BIT_VAR0 + (g)))
+/*@}*/
+
+
+/**
+ * Indexes for geometry program result attributes
+ */
+/*@{*/
+typedef enum {
+ GEOM_RESULT_POS = 0,
+ GEOM_RESULT_COL0 = 1,
+ GEOM_RESULT_COL1 = 2,
+ GEOM_RESULT_SCOL0 = 3,
+ GEOM_RESULT_SCOL1 = 4,
+ GEOM_RESULT_FOGC = 5,
+ GEOM_RESULT_TEX0 = 6,
+ GEOM_RESULT_TEX1 = 7,
+ GEOM_RESULT_TEX2 = 8,
+ GEOM_RESULT_TEX3 = 9,
+ GEOM_RESULT_TEX4 = 10,
+ GEOM_RESULT_TEX5 = 11,
+ GEOM_RESULT_TEX6 = 12,
+ GEOM_RESULT_TEX7 = 13,
+ GEOM_RESULT_PSIZ = 14,
+ GEOM_RESULT_CLPV = 15,
+ GEOM_RESULT_PRID = 16,
+ GEOM_RESULT_LAYR = 17,
+ GEOM_RESULT_VAR0 = 18, /**< shader varying, should really be 16 */
+ /* ### we need to -2 because var0 is 18 instead 16 like in the others */
+ GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + MAX_VARYING - 2)
+} gl_geom_result;
+/*@}*/
+
/**
* Indexes for fragment program input attributes.
*/
@@ -1076,6 +1155,7 @@ typedef enum
#define T_BIT 2
#define R_BIT 4
#define Q_BIT 8
+#define STR_BITS (S_BIT | T_BIT | R_BIT)
/*@}*/
@@ -1547,12 +1627,15 @@ struct gl_array_attrib
GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
+ /** GL 3.1 (slightly different from GL_NV_primitive_restart) */
+ GLboolean PrimitiveRestart;
+ GLuint RestartIndex;
+
GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
-#if FEATURE_ARB_vertex_buffer_object
+ /* GL_ARB_vertex_buffer_object */
struct gl_buffer_object *ArrayBufferObj;
struct gl_buffer_object *ElementArrayBufferObj;
-#endif
};
@@ -1724,6 +1807,11 @@ struct gl_program
/** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
gl_texture_index SamplerTargets[MAX_SAMPLERS];
+ /** Bitmask of which register files are read/written with indirect
+ * addressing. Mask of (1 << PROGRAM_x) bits.
+ */
+ GLbitfield IndirectRegisterFiles;
+
/** Logical counts */
/*@{*/
GLuint NumInstructions;
@@ -1758,6 +1846,18 @@ struct gl_vertex_program
};
+/** Geometry program object */
+struct gl_geometry_program
+{
+ struct gl_program Base; /**< base class */
+
+ GLint VerticesOut;
+ GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
+ GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
+ GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+};
+
+
/** Fragment program object */
struct gl_fragment_program
{
@@ -1816,6 +1916,26 @@ struct gl_vertex_program_state
/**
+ * Context state for geometry programs.
+ */
+struct gl_geometry_program_state
+{
+ GLboolean Enabled; /**< GL_ARB_GEOMETRY_SHADER4 */
+ GLboolean _Enabled; /**< Enabled and valid program? */
+ struct gl_geometry_program *Current; /**< user-bound geometry program */
+
+ /** Currently enabled and valid program (including internal programs
+ * and compiled shader programs).
+ */
+ struct gl_geometry_program *_Current;
+
+ GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
+
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+};
+
+/**
* Context state for fragment programs.
*/
struct gl_fragment_program_state
@@ -1910,6 +2030,14 @@ struct gl_query_state
/** GL_NV_conditional_render */
struct gl_query_object *CondRenderQuery;
+
+ /** GL_EXT_transform_feedback */
+ struct gl_query_object *PrimitivesGenerated;
+ struct gl_query_object *PrimitivesWritten;
+
+ /** GL_ARB_timer_query */
+ struct gl_query_object *TimeElapsed;
+
GLenum CondRenderMode;
};
@@ -1944,7 +2072,7 @@ struct gl_sl_pragmas
*/
struct gl_shader
{
- GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER (first field!) */
+ GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */
GLuint Name; /**< AKA the handle */
GLint RefCount; /**< Reference count */
GLboolean DeletePending;
@@ -1956,6 +2084,15 @@ struct gl_shader
struct gl_program *Program; /**< Post-compile assembly code */
GLchar *InfoLog;
struct gl_sl_pragmas Pragmas;
+
+ unsigned Version; /**< GLSL version used for linking */
+
+ struct exec_list *ir;
+ struct glsl_symbol_table *symbols;
+
+ /** Shaders containing built-in functions that are used for linking. */
+ struct gl_shader *builtins_to_link[16];
+ unsigned num_builtins_to_link;
};
@@ -1976,15 +2113,41 @@ struct gl_shader_program
/** User-defined attribute bindings (glBindAttribLocation) */
struct gl_program_parameter_list *Attributes;
+ /** Transform feedback varyings */
+ struct {
+ GLenum BufferMode;
+ GLuint NumVarying;
+ GLchar **VaryingNames; /**< Array [NumVarying] of char * */
+ } TransformFeedback;
+
+ /** Geometry shader state - copied into gl_geometry_program at link time */
+ struct {
+ GLint VerticesOut;
+ GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
+ GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
+ GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+ } Geom;
+
/* post-link info: */
struct gl_vertex_program *VertexProgram; /**< Linked vertex program */
struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */
+ struct gl_geometry_program *GeometryProgram; /**< Linked geometry prog */
struct gl_uniform_list *Uniforms;
struct gl_program_parameter_list *Varying;
GLboolean LinkStatus; /**< GL_LINK_STATUS */
GLboolean Validated;
GLboolean _Used; /**< Ever used for drawing? */
GLchar *InfoLog;
+
+ unsigned Version; /**< GLSL version used for linking */
+
+ /**
+ * Per-stage shaders resulting from the first stage of linking.
+ */
+ /*@{*/
+ GLuint _NumLinkedShaders;
+ struct gl_shader *_LinkedShaders[2];
+ /*@}*/
};
@@ -2004,17 +2167,89 @@ struct gl_shader_program
struct gl_shader_state
{
struct gl_shader_program *CurrentProgram; /**< The user-bound program */
+ void *MemPool;
+
+ GLbitfield Flags; /**< Mask of GLSL_x flags */
+};
+
+/**
+ * Compiler options for a single GLSL shaders type
+ */
+struct gl_shader_compiler_options
+{
/** Driver-selectable options: */
- GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */
- GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */
GLboolean EmitCondCodes; /**< Use condition codes? */
- GLboolean EmitComments; /**< Annotated instructions */
GLboolean EmitNVTempInitialization; /**< 0-fill NV temp registers */
- void *MemPool;
- GLbitfield Flags; /**< Mask of GLSL_x flags */
+ /**
+ * Attempts to flatten all ir_if (OPCODE_IF) for GPUs that can't
+ * support control flow.
+ */
+ GLboolean EmitNoIfs;
+ GLboolean EmitNoLoops;
+ GLboolean EmitNoFunctions;
+ GLboolean EmitNoCont; /**< Emit CONT opcode? */
+ GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
+ GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
+
+ /**
+ * \name Forms of indirect addressing the driver cannot do.
+ */
+ /*@{*/
+ GLboolean EmitNoIndirectInput; /**< No indirect addressing of inputs */
+ GLboolean EmitNoIndirectOutput; /**< No indirect addressing of outputs */
+ GLboolean EmitNoIndirectTemp; /**< No indirect addressing of temps */
+ GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */
+ /*@}*/
+
+ GLuint MaxUnrollIterations;
+
struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
};
+/**
+ * Transform feedback object state
+ */
+struct gl_transform_feedback_object
+{
+ GLuint Name; /**< AKA the object ID */
+ GLint RefCount;
+ GLboolean Active; /**< Is transform feedback enabled? */
+ GLboolean Paused; /**< Is transform feedback paused? */
+
+ /** The feedback buffers */
+ GLuint BufferNames[MAX_FEEDBACK_ATTRIBS];
+ struct gl_buffer_object *Buffers[MAX_FEEDBACK_ATTRIBS];
+
+ /** Start of feedback data in dest buffer */
+ GLintptr Offset[MAX_FEEDBACK_ATTRIBS];
+ /** Max data to put into dest buffer (in bytes) */
+ GLsizeiptr Size[MAX_FEEDBACK_ATTRIBS];
+};
+
+
+/**
+ * Context state for transform feedback.
+ */
+struct gl_transform_feedback
+{
+ GLenum Mode; /**< GL_POINTS, GL_LINES or GL_TRIANGLES */
+
+ GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
+
+ /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */
+ struct gl_buffer_object *CurrentBuffer;
+
+ /** The table of all transform feedback objects */
+ struct _mesa_HashTable *Objects;
+
+ /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */
+ struct gl_transform_feedback_object *CurrentObject;
+
+ /** The default xform-fb object (Name==0) */
+ struct gl_transform_feedback_object *DefaultObject;
+};
+
+
/**
* State which can be shared by multiple contexts:
@@ -2047,40 +2282,30 @@ struct gl_shared_state
struct gl_buffer_object *NullBufferObj;
/**
- * \name Vertex/fragment programs
+ * \name Vertex/geometry/fragment programs
*/
/*@{*/
struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */
-#if FEATURE_ARB_vertex_program
struct gl_vertex_program *DefaultVertexProgram;
-#endif
-#if FEATURE_ARB_fragment_program
struct gl_fragment_program *DefaultFragmentProgram;
-#endif
+ struct gl_geometry_program *DefaultGeometryProgram;
/*@}*/
-#if FEATURE_ATI_fragment_shader
+ /* GL_ATI_fragment_shader */
struct _mesa_HashTable *ATIShaders;
struct ati_fragment_shader *DefaultFragmentShader;
-#endif
-#if FEATURE_ARB_vertex_buffer_object || FEATURE_ARB_pixel_buffer_object
struct _mesa_HashTable *BufferObjects;
-#endif
-#if FEATURE_ARB_shader_objects
/** Table of both gl_shader and gl_shader_program objects */
struct _mesa_HashTable *ShaderObjects;
-#endif
-#if FEATURE_EXT_framebuffer_object
+ /* GL_EXT_framebuffer_object */
struct _mesa_HashTable *RenderBuffers;
struct _mesa_HashTable *FrameBuffers;
-#endif
-#if FEATURE_ARB_sync
+ /* GL_ARB_sync */
struct simple_node SyncObjects;
-#endif
void *DriverData; /**< Device driver shared state */
};
@@ -2289,32 +2514,39 @@ struct gl_framebuffer
/**
- * Limits for vertex and fragment programs.
+ * Limits for vertex and fragment programs/shaders.
*/
struct gl_program_constants
{
/* logical limits */
GLuint MaxInstructions;
- GLuint MaxAluInstructions; /* fragment programs only, for now */
- GLuint MaxTexInstructions; /* fragment programs only, for now */
- GLuint MaxTexIndirections; /* fragment programs only, for now */
+ GLuint MaxAluInstructions;
+ GLuint MaxTexInstructions;
+ GLuint MaxTexIndirections;
GLuint MaxAttribs;
GLuint MaxTemps;
- GLuint MaxAddressRegs; /* vertex program only, for now */
+ GLuint MaxAddressRegs;
GLuint MaxParameters;
GLuint MaxLocalParams;
GLuint MaxEnvParams;
/* native/hardware limits */
GLuint MaxNativeInstructions;
- GLuint MaxNativeAluInstructions; /* fragment programs only, for now */
- GLuint MaxNativeTexInstructions; /* fragment programs only, for now */
- GLuint MaxNativeTexIndirections; /* fragment programs only, for now */
+ GLuint MaxNativeAluInstructions;
+ GLuint MaxNativeTexInstructions;
+ GLuint MaxNativeTexIndirections;
GLuint MaxNativeAttribs;
GLuint MaxNativeTemps;
- GLuint MaxNativeAddressRegs; /* vertex program only, for now */
+ GLuint MaxNativeAddressRegs;
GLuint MaxNativeParameters;
/* For shaders */
GLuint MaxUniformComponents;
+ /* GL_ARB_geometry_shader4 */
+ GLuint MaxGeometryTextureImageUnits;
+ GLuint MaxGeometryVaryingComponents;
+ GLuint MaxVertexVaryingComponents;
+ GLuint MaxGeometryUniformComponents;
+ GLuint MaxGeometryOutputVertices;
+ GLuint MaxGeometryTotalOutputComponents;
};
@@ -2361,6 +2593,7 @@ struct gl_constants
struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */
struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */
+ struct gl_program_constants GeometryProgram; /**< GL_ARB_geometry_shader4 */
GLuint MaxProgramMatrices;
GLuint MaxProgramMatrixStackDepth;
@@ -2375,16 +2608,29 @@ struct gl_constants
GLuint MaxVarying; /**< Number of float[4] varying parameters */
- GLbitfield SupportedBumpUnits; /**> units supporting GL_ATI_envmap_bumpmap as targets */
+ GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */
+
+ /** Which texture units support GL_ATI_envmap_bumpmap as targets */
+ GLbitfield SupportedBumpUnits;
/**
* Maximum amount of time, measured in nanseconds, that the server can wait.
*/
GLuint64 MaxServerWaitTimeout;
-
- /**< GL_EXT_provoking_vertex */
+ /** GL_EXT_provoking_vertex */
GLboolean QuadsFollowProvokingVertexConvention;
+
+ /** OpenGL version 3.0 */
+ GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
+
+ /** OpenGL version 3.2 */
+ GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */
+
+ /** GL_EXT_transform_feedback */
+ GLuint MaxTransformFeedbackSeparateAttribs;
+ GLuint MaxTransformFeedbackSeparateComponents;
+ GLuint MaxTransformFeedbackInterleavedComponents;
};
@@ -2395,32 +2641,40 @@ struct gl_constants
struct gl_extensions
{
GLboolean dummy; /* don't remove this! */
+ GLboolean ARB_blend_func_extended;
GLboolean ARB_copy_buffer;
- GLboolean ARB_depth_texture;
+ GLboolean ARB_depth_buffer_float;
GLboolean ARB_depth_clamp;
+ GLboolean ARB_depth_texture;
GLboolean ARB_draw_buffers;
GLboolean ARB_draw_elements_base_vertex;
+ GLboolean ARB_draw_instanced;
GLboolean ARB_fragment_coord_conventions;
GLboolean ARB_fragment_program;
GLboolean ARB_fragment_program_shadow;
GLboolean ARB_fragment_shader;
GLboolean ARB_framebuffer_object;
+ GLboolean ARB_explicit_attrib_location;
+ GLboolean ARB_geometry_shader4;
GLboolean ARB_half_float_pixel;
GLboolean ARB_half_float_vertex;
GLboolean ARB_imaging;
+ GLboolean ARB_instanced_arrays;
GLboolean ARB_map_buffer_range;
GLboolean ARB_multisample;
GLboolean ARB_multitexture;
GLboolean ARB_occlusion_query;
+ GLboolean ARB_occlusion_query2;
GLboolean ARB_point_sprite;
+ GLboolean ARB_sampler_objects;
GLboolean ARB_seamless_cube_map;
GLboolean ARB_shader_objects;
GLboolean ARB_shading_language_100;
- GLboolean ARB_shading_language_120;
GLboolean ARB_shadow;
- GLboolean ARB_shadow_ambient; /* or GL_ARB_shadow_ambient */
+ GLboolean ARB_shadow_ambient;
GLboolean ARB_sync;
GLboolean ARB_texture_border_clamp;
+ GLboolean ARB_texture_buffer_object;
GLboolean ARB_texture_compression;
GLboolean ARB_texture_cube_map;
GLboolean ARB_texture_env_combine;
@@ -2428,12 +2682,19 @@ struct gl_extensions
GLboolean ARB_texture_env_dot3;
GLboolean ARB_texture_float;
GLboolean ARB_texture_mirrored_repeat;
+ GLboolean ARB_texture_multisample;
GLboolean ARB_texture_non_power_of_two;
+ GLboolean ARB_texture_rg;
+ GLboolean ARB_texture_rgb10_a2ui;
+ GLboolean ARB_timer_query;
+ GLboolean ARB_transform_feedback2;
GLboolean ARB_transpose_matrix;
+ GLboolean ARB_uniform_buffer_object;
GLboolean ARB_vertex_array_object;
GLboolean ARB_vertex_buffer_object;
GLboolean ARB_vertex_program;
GLboolean ARB_vertex_shader;
+ GLboolean ARB_vertex_type_2_10_10_10_rev;
GLboolean ARB_window_pos;
GLboolean EXT_abgr;
GLboolean EXT_bgra;
@@ -2455,11 +2716,13 @@ struct gl_extensions
GLboolean EXT_framebuffer_blit;
GLboolean EXT_framebuffer_multisample;
GLboolean EXT_framebuffer_object;
+ GLboolean EXT_framebuffer_sRGB;
GLboolean EXT_gpu_program_parameters;
GLboolean EXT_histogram;
GLboolean EXT_multi_draw_arrays;
GLboolean EXT_paletted_texture;
GLboolean EXT_packed_depth_stencil;
+ GLboolean EXT_packed_float;
GLboolean EXT_packed_pixels;
GLboolean EXT_pixel_buffer_object;
GLboolean EXT_point_parameters;
@@ -2478,14 +2741,18 @@ struct gl_extensions
GLboolean EXT_texture3D;
GLboolean EXT_texture_array;
GLboolean EXT_texture_compression_s3tc;
+ GLboolean EXT_texture_compression_rgtc;
GLboolean EXT_texture_env_add;
GLboolean EXT_texture_env_combine;
GLboolean EXT_texture_env_dot3;
GLboolean EXT_texture_filter_anisotropic;
+ GLboolean EXT_texture_integer;
GLboolean EXT_texture_lod_bias;
GLboolean EXT_texture_mirror_clamp;
+ GLboolean EXT_texture_shared_exponent;
GLboolean EXT_texture_sRGB;
GLboolean EXT_texture_swizzle;
+ GLboolean EXT_transform_feedback;
GLboolean EXT_timer_query;
GLboolean EXT_vertex_array;
GLboolean EXT_vertex_array_bgra;
@@ -2514,6 +2781,7 @@ struct gl_extensions
GLboolean NV_fragment_program_option;
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
+ GLboolean NV_primitive_restart;
GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
@@ -2528,9 +2796,8 @@ struct gl_extensions
GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
-#if FEATURE_OES_draw_texture
+ GLboolean OES_EGL_image;
GLboolean OES_draw_texture;
-#endif /* FEATURE_OES_draw_texture */
/** The extension string */
const GLubyte *String;
/** Number of supported extensions */
@@ -2815,6 +3082,14 @@ struct gl_dlist_state
} Current;
};
+/**
+ * Enum for the OpenGL APIs we know about and may support.
+ */
+typedef enum {
+ API_OPENGL,
+ API_OPENGLES,
+ API_OPENGLES2
+} gl_api;
/**
* Mesa rendering context.
@@ -2833,6 +3108,7 @@ struct __GLcontextRec
/** \name API function pointer tables */
/*@{*/
+ gl_api API;
struct _glapi_table *Save; /**< Display list save functions */
struct _glapi_table *Exec; /**< Execute functions */
struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */
@@ -2947,21 +3223,24 @@ struct __GLcontextRec
struct gl_program_state Program; /**< general program state */
struct gl_vertex_program_state VertexProgram;
struct gl_fragment_program_state FragmentProgram;
+ struct gl_geometry_program_state GeometryProgram;
struct gl_ati_fragment_shader_state ATIFragmentShader;
struct gl_shader_state Shader; /**< GLSL shader object state */
+ struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES];
struct gl_query_state Query; /**< occlusion, timer queries */
+ struct gl_transform_feedback TransformFeedback;
+
struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */
struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */
/*@}*/
struct gl_meta_state *Meta; /**< for "meta" operations */
-#if FEATURE_EXT_framebuffer_object
+ /* GL_EXT_framebuffer_object */
struct gl_renderbuffer *CurrentRenderbuffer;
-#endif
GLenum ErrorValue; /**< Last error code */
diff --git a/mesalib/src/mesa/main/multisample.h b/mesalib/src/mesa/main/multisample.h
index 4305900cc..998488ef4 100644
--- a/mesalib/src/mesa/main/multisample.h
+++ b/mesalib/src/mesa/main/multisample.h
@@ -26,6 +26,7 @@
#ifndef MULTISAMPLE_H
#define MULTISAMPLE_H
+#include "mtypes.h"
extern void GLAPIENTRY
_mesa_SampleCoverageARB(GLclampf value, GLboolean invert);
diff --git a/mesalib/src/mesa/main/nvprogram.c b/mesalib/src/mesa/main/nvprogram.c
new file mode 100644
index 000000000..3a570b7dd
--- /dev/null
+++ b/mesalib/src/mesa/main/nvprogram.c
@@ -0,0 +1,919 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.2
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file nvprogram.c
+ * NVIDIA vertex/fragment program state management functions.
+ * \author Brian Paul
+ */
+
+/*
+ * Regarding GL_NV_fragment/vertex_program, GL_NV_vertex_program1_1, etc:
+ *
+ * Portions of this software may use or implement intellectual
+ * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims
+ * any and all warranties with respect to such intellectual property,
+ * including any use thereof or modifications thereto.
+ */
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/hash.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/nvprogram.h"
+#include "program/arbprogparse.h"
+#include "program/nvfragparse.h"
+#include "program/nvvertparse.h"
+#include "program/program.h"
+#include "program/prog_instruction.h"
+#include "program/prog_parameter.h"
+
+
+
+/**
+ * Execute a vertex state program.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
+{
+ struct gl_vertex_program *vprog;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target != GL_VERTEX_STATE_PROGRAM_NV) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glExecuteProgramNV");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ vprog = (struct gl_vertex_program *) _mesa_lookup_program(ctx, id);
+
+ if (!vprog || vprog->Base.Target != GL_VERTEX_STATE_PROGRAM_NV) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glExecuteProgramNV");
+ return;
+ }
+
+ _mesa_problem(ctx, "glExecuteProgramNV() not supported");
+}
+
+
+/**
+ * Determine if a set of programs is resident in hardware.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+GLboolean GLAPIENTRY
+_mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids,
+ GLboolean *residences)
+{
+ GLint i, j;
+ GLboolean allResident = GL_TRUE;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV(n)");
+ return GL_FALSE;
+ }
+
+ for (i = 0; i < n; i++) {
+ const struct gl_program *prog;
+ if (ids[i] == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV");
+ return GL_FALSE;
+ }
+ prog = _mesa_lookup_program(ctx, ids[i]);
+ if (!prog) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV");
+ return GL_FALSE;
+ }
+ if (prog->Resident) {
+ if (!allResident)
+ residences[i] = GL_TRUE;
+ }
+ else {
+ if (allResident) {
+ allResident = GL_FALSE;
+ for (j = 0; j < i; j++)
+ residences[j] = GL_TRUE;
+ }
+ residences[i] = GL_FALSE;
+ }
+ }
+
+ return allResident;
+}
+
+
+/**
+ * Request that a set of programs be resident in hardware.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(n)");
+ return;
+ }
+
+ /* just error checking for now */
+ for (i = 0; i < n; i++) {
+ struct gl_program *prog;
+
+ if (ids[i] == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)");
+ return;
+ }
+
+ prog = _mesa_lookup_program(ctx, ids[i]);
+ if (!prog) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)");
+ return;
+ }
+
+ /* XXX this is really a hardware thing we should hook out */
+ prog->Resident = GL_TRUE;
+ }
+}
+
+
+/**
+ * Get a program parameter register.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetProgramParameterfvNV(GLenum target, GLuint index,
+ GLenum pname, GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_NV) {
+ if (pname == GL_PROGRAM_PARAMETER_NV) {
+ if (index < MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ COPY_4V(params, ctx->VertexProgram.Parameters[index]);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetProgramParameterfvNV(index)");
+ return;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV(pname)");
+ return;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV(target)");
+ return;
+ }
+}
+
+
+/**
+ * Get a program parameter register.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetProgramParameterdvNV(GLenum target, GLuint index,
+ GLenum pname, GLdouble *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_NV) {
+ if (pname == GL_PROGRAM_PARAMETER_NV) {
+ if (index < MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ COPY_4V(params, ctx->VertexProgram.Parameters[index]);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetProgramParameterdvNV(index)");
+ return;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterdvNV(pname)");
+ return;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterdvNV(target)");
+ return;
+ }
+}
+
+
+/**
+ * Get a program attribute.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params)
+{
+ struct gl_program *prog;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ prog = _mesa_lookup_program(ctx, id);
+ if (!prog) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramivNV");
+ return;
+ }
+
+ switch (pname) {
+ case GL_PROGRAM_TARGET_NV:
+ *params = prog->Target;
+ return;
+ case GL_PROGRAM_LENGTH_NV:
+ *params = prog->String ?(GLint) strlen((char *) prog->String) : 0;
+ return;
+ case GL_PROGRAM_RESIDENT_NV:
+ *params = prog->Resident;
+ return;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivNV(pname)");
+ return;
+ }
+}
+
+
+/**
+ * Get the program source code.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
+{
+ struct gl_program *prog;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname != GL_PROGRAM_STRING_NV) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramStringNV(pname)");
+ return;
+ }
+
+ prog = _mesa_lookup_program(ctx, id);
+ if (!prog) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramStringNV");
+ return;
+ }
+
+ if (prog->String) {
+ memcpy(program, prog->String, strlen((char *) prog->String));
+ }
+ else {
+ program[0] = 0;
+ }
+}
+
+
+/**
+ * Get matrix tracking information.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetTrackMatrixivNV(GLenum target, GLuint address,
+ GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_NV
+ && ctx->Extensions.NV_vertex_program) {
+ GLuint i;
+
+ if ((address & 0x3) || address >= MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetTrackMatrixivNV(address)");
+ return;
+ }
+
+ i = address / 4;
+
+ switch (pname) {
+ case GL_TRACK_MATRIX_NV:
+ params[0] = (GLint) ctx->VertexProgram.TrackMatrix[i];
+ return;
+ case GL_TRACK_MATRIX_TRANSFORM_NV:
+ params[0] = (GLint) ctx->VertexProgram.TrackMatrixTransform[i];
+ return;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetTrackMatrixivNV");
+ return;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetTrackMatrixivNV");
+ return;
+ }
+}
+
+
+/**
+ * Get a vertex (or vertex array) attribute.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct gl_client_array *array;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)");
+ return;
+ }
+
+ array = &ctx->Array.ArrayObj->VertexAttrib[index];
+
+ switch (pname) {
+ case GL_ATTRIB_ARRAY_SIZE_NV:
+ params[0] = array->Size;
+ break;
+ case GL_ATTRIB_ARRAY_STRIDE_NV:
+ params[0] = array->Stride;
+ break;
+ case GL_ATTRIB_ARRAY_TYPE_NV:
+ params[0] = array->Type;
+ break;
+ case GL_CURRENT_ATTRIB_NV:
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribdvNV(index == 0)");
+ return;
+ }
+ FLUSH_CURRENT(ctx, 0);
+ COPY_4V(params, ctx->Current.Attrib[index]);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV");
+ return;
+ }
+}
+
+/**
+ * Get a vertex (or vertex array) attribute.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct gl_client_array *array;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)");
+ return;
+ }
+
+ array = &ctx->Array.ArrayObj->VertexAttrib[index];
+
+ switch (pname) {
+ case GL_ATTRIB_ARRAY_SIZE_NV:
+ params[0] = (GLfloat) array->Size;
+ break;
+ case GL_ATTRIB_ARRAY_STRIDE_NV:
+ params[0] = (GLfloat) array->Stride;
+ break;
+ case GL_ATTRIB_ARRAY_TYPE_NV:
+ params[0] = (GLfloat) array->Type;
+ break;
+ case GL_CURRENT_ATTRIB_NV:
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribfvNV(index == 0)");
+ return;
+ }
+ FLUSH_CURRENT(ctx, 0);
+ COPY_4V(params, ctx->Current.Attrib[index]);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV");
+ return;
+ }
+}
+
+/**
+ * Get a vertex (or vertex array) attribute.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params)
+{
+ const struct gl_client_array *array;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)");
+ return;
+ }
+
+ array = &ctx->Array.ArrayObj->VertexAttrib[index];
+
+ switch (pname) {
+ case GL_ATTRIB_ARRAY_SIZE_NV:
+ params[0] = array->Size;
+ break;
+ case GL_ATTRIB_ARRAY_STRIDE_NV:
+ params[0] = array->Stride;
+ break;
+ case GL_ATTRIB_ARRAY_TYPE_NV:
+ params[0] = array->Type;
+ break;
+ case GL_CURRENT_ATTRIB_NV:
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribivNV(index == 0)");
+ return;
+ }
+ FLUSH_CURRENT(ctx, 0);
+ params[0] = (GLint) ctx->Current.Attrib[index][0];
+ params[1] = (GLint) ctx->Current.Attrib[index][1];
+ params[2] = (GLint) ctx->Current.Attrib[index][2];
+ params[3] = (GLint) ctx->Current.Attrib[index][3];
+ break;
+ case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
+ params[0] = array->BufferObj->Name;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV");
+ return;
+ }
+}
+
+
+/**
+ * Get a vertex array attribute pointer.
+ * \note Not compiled into display lists.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribPointerNV(index)");
+ return;
+ }
+
+ if (pname != GL_ATTRIB_ARRAY_POINTER_NV) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribPointerNV(pname)");
+ return;
+ }
+
+ *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[index].Ptr;
+}
+
+void
+_mesa_emit_nv_temp_initialization(GLcontext *ctx,
+ struct gl_program *program)
+{
+ struct prog_instruction *inst;
+ GLuint i;
+ struct gl_shader_compiler_options* options =
+ &ctx->ShaderCompilerOptions[_mesa_program_target_to_index(program->Target)];
+
+ if (!options->EmitNVTempInitialization)
+ return;
+
+ /* We'll swizzle up a zero temporary so we can use it for the
+ * ARL.
+ */
+ if (program->NumTemporaries == 0)
+ program->NumTemporaries = 1;
+
+ _mesa_insert_instructions(program, 0, program->NumTemporaries + 1);
+
+ for (i = 0; i < program->NumTemporaries; i++) {
+ struct prog_instruction *inst = &program->Instructions[i];
+
+ inst->Opcode = OPCODE_SWZ;
+ inst->DstReg.File = PROGRAM_TEMPORARY;
+ inst->DstReg.Index = i;
+ inst->DstReg.WriteMask = WRITEMASK_XYZW;
+ inst->SrcReg[0].File = PROGRAM_TEMPORARY;
+ inst->SrcReg[0].Index = 0;
+ inst->SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ZERO,
+ SWIZZLE_ZERO,
+ SWIZZLE_ZERO,
+ SWIZZLE_ZERO);
+ }
+
+ inst = &program->Instructions[i];
+ inst->Opcode = OPCODE_ARL;
+ inst->DstReg.File = PROGRAM_ADDRESS;
+ inst->DstReg.Index = 0;
+ inst->DstReg.WriteMask = WRITEMASK_XYZW;
+ inst->SrcReg[0].File = PROGRAM_TEMPORARY;
+ inst->SrcReg[0].Index = 0;
+ inst->SrcReg[0].Swizzle = SWIZZLE_XXXX;
+
+ if (program->NumAddressRegs == 0)
+ program->NumAddressRegs = 1;
+}
+
+void
+_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program)
+{
+ GLuint i;
+
+ program->NumTemporaries = 0;
+ for (i = 0; i < program->NumInstructions; i++) {
+ struct prog_instruction *inst = &program->Instructions[i];
+
+ if (inst->DstReg.File == PROGRAM_TEMPORARY) {
+ program->NumTemporaries = MAX2(program->NumTemporaries,
+ inst->DstReg.Index + 1);
+ }
+ if (inst->SrcReg[0].File == PROGRAM_TEMPORARY) {
+ program->NumTemporaries = MAX2((GLint)program->NumTemporaries,
+ inst->SrcReg[0].Index + 1);
+ }
+ if (inst->SrcReg[1].File == PROGRAM_TEMPORARY) {
+ program->NumTemporaries = MAX2((GLint)program->NumTemporaries,
+ inst->SrcReg[1].Index + 1);
+ }
+ if (inst->SrcReg[2].File == PROGRAM_TEMPORARY) {
+ program->NumTemporaries = MAX2((GLint)program->NumTemporaries,
+ inst->SrcReg[2].Index + 1);
+ }
+ }
+}
+
+/**
+ * Load/parse/compile a program.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
+ const GLubyte *program)
+{
+ struct gl_program *prog;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!ctx->Extensions.NV_vertex_program
+ && !ctx->Extensions.NV_fragment_program) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV()");
+ return;
+ }
+
+ if (id == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glLoadProgramNV(id)");
+ return;
+ }
+
+ if (len < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glLoadProgramNV(len)");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ prog = _mesa_lookup_program(ctx, id);
+
+ if (prog && prog->Target != 0 && prog->Target != target) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(target)");
+ return;
+ }
+
+ if ((target == GL_VERTEX_PROGRAM_NV ||
+ target == GL_VERTEX_STATE_PROGRAM_NV)
+ && ctx->Extensions.NV_vertex_program) {
+ struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog;
+ if (!vprog || prog == &_mesa_DummyProgram) {
+ vprog = (struct gl_vertex_program *)
+ ctx->Driver.NewProgram(ctx, target, id);
+ if (!vprog) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->Programs, id, vprog);
+ }
+
+ if (ctx->Extensions.ARB_vertex_program
+ && (strncmp((char *) program, "!!ARB", 5) == 0)) {
+ _mesa_parse_arb_vertex_program(ctx, target, program, len, vprog);
+ } else {
+ _mesa_parse_nv_vertex_program(ctx, target, program, len, vprog);
+ }
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ if (!fprog || prog == &_mesa_DummyProgram) {
+ fprog = (struct gl_fragment_program *)
+ ctx->Driver.NewProgram(ctx, target, id);
+ if (!fprog) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->Programs, id, fprog);
+ }
+ _mesa_parse_nv_fragment_program(ctx, target, program, len, fprog);
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ if (!fprog || prog == &_mesa_DummyProgram) {
+ fprog = (struct gl_fragment_program *)
+ ctx->Driver.NewProgram(ctx, target, id);
+ if (!fprog) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->Programs, id, fprog);
+ }
+ _mesa_parse_arb_fragment_program(ctx, target, program, len, fprog);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glLoadProgramNV(target)");
+ }
+}
+
+
+
+/**
+ * Set a sequence of program parameter registers.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_ProgramParameters4dvNV(GLenum target, GLuint index,
+ GLuint num, const GLdouble *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
+ GLuint i;
+ if (index + num > MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4dvNV");
+ return;
+ }
+ for (i = 0; i < num; i++) {
+ ctx->VertexProgram.Parameters[index + i][0] = (GLfloat) params[0];
+ ctx->VertexProgram.Parameters[index + i][1] = (GLfloat) params[1];
+ ctx->VertexProgram.Parameters[index + i][2] = (GLfloat) params[2];
+ ctx->VertexProgram.Parameters[index + i][3] = (GLfloat) params[3];
+ params += 4;
+ };
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameters4dvNV");
+ return;
+ }
+}
+
+
+/**
+ * Set a sequence of program parameter registers.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_ProgramParameters4fvNV(GLenum target, GLuint index,
+ GLuint num, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
+ GLuint i;
+ if (index + num > MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4fvNV");
+ return;
+ }
+ for (i = 0; i < num; i++) {
+ COPY_4V(ctx->VertexProgram.Parameters[index + i], params);
+ params += 4;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameters4fvNV");
+ return;
+ }
+}
+
+
+
+/**
+ * Setup tracking of matrices into program parameter registers.
+ * \note Called from the GL API dispatcher.
+ */
+void GLAPIENTRY
+_mesa_TrackMatrixNV(GLenum target, GLuint address,
+ GLenum matrix, GLenum transform)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
+ if (address & 0x3) {
+ /* addr must be multiple of four */
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTrackMatrixNV(address)");
+ return;
+ }
+
+ switch (matrix) {
+ case GL_NONE:
+ case GL_MODELVIEW:
+ case GL_PROJECTION:
+ case GL_TEXTURE:
+ case GL_COLOR:
+ case GL_MODELVIEW_PROJECTION_NV:
+ case GL_MATRIX0_NV:
+ case GL_MATRIX1_NV:
+ case GL_MATRIX2_NV:
+ case GL_MATRIX3_NV:
+ case GL_MATRIX4_NV:
+ case GL_MATRIX5_NV:
+ case GL_MATRIX6_NV:
+ case GL_MATRIX7_NV:
+ /* OK, fallthrough */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(matrix)");
+ return;
+ }
+
+ switch (transform) {
+ case GL_IDENTITY_NV:
+ case GL_INVERSE_NV:
+ case GL_TRANSPOSE_NV:
+ case GL_INVERSE_TRANSPOSE_NV:
+ /* OK, fallthrough */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(transform)");
+ return;
+ }
+
+ ctx->VertexProgram.TrackMatrix[address / 4] = matrix;
+ ctx->VertexProgram.TrackMatrixTransform[address / 4] = transform;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(target)");
+ return;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ struct gl_program *prog;
+ struct gl_fragment_program *fragProg;
+ GLfloat *v;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ prog = _mesa_lookup_program(ctx, id);
+ if (!prog || prog->Target != GL_FRAGMENT_PROGRAM_NV) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramNamedParameterNV");
+ return;
+ }
+
+ if (len <= 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(len)");
+ return;
+ }
+
+ fragProg = (struct gl_fragment_program *) prog;
+ v = _mesa_lookup_parameter_value(fragProg->Base.Parameters, len,
+ (char *) name);
+ if (v) {
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ v[3] = w;
+ return;
+ }
+
+ _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(name)");
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name,
+ const float v[])
+{
+ _mesa_ProgramNamedParameter4fNV(id, len, name, v[0], v[1], v[2], v[3]);
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ _mesa_ProgramNamedParameter4fNV(id, len, name, (GLfloat)x, (GLfloat)y,
+ (GLfloat)z, (GLfloat)w);
+}
+
+
+void GLAPIENTRY
+_mesa_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name,
+ const double v[])
+{
+ _mesa_ProgramNamedParameter4fNV(id, len, name,
+ (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]);
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLfloat *params)
+{
+ struct gl_program *prog;
+ struct gl_fragment_program *fragProg;
+ const GLfloat *v;
+
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ prog = _mesa_lookup_program(ctx, id);
+ if (!prog || prog->Target != GL_FRAGMENT_PROGRAM_NV) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramNamedParameterNV");
+ return;
+ }
+
+ if (len <= 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramNamedParameterNV");
+ return;
+ }
+
+ fragProg = (struct gl_fragment_program *) prog;
+ v = _mesa_lookup_parameter_value(fragProg->Base.Parameters,
+ len, (char *) name);
+ if (v) {
+ params[0] = v[0];
+ params[1] = v[1];
+ params[2] = v[2];
+ params[3] = v[3];
+ return;
+ }
+
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramNamedParameterNV");
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLdouble *params)
+{
+ GLfloat floatParams[4];
+ _mesa_GetProgramNamedParameterfvNV(id, len, name, floatParams);
+ COPY_4V(params, floatParams);
+}
diff --git a/mesalib/src/mesa/main/nvprogram.h b/mesalib/src/mesa/main/nvprogram.h
new file mode 100644
index 000000000..260a25ba9
--- /dev/null
+++ b/mesalib/src/mesa/main/nvprogram.h
@@ -0,0 +1,115 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 5.1
+ *
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Brian Paul
+ */
+
+
+#ifndef NVPROGRAM_H
+#define NVPROGRAM_H
+
+#include "glheader.h"
+#include "mtypes.h"
+
+extern void GLAPIENTRY
+_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params);
+
+extern GLboolean GLAPIENTRY
+_mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences);
+
+extern void GLAPIENTRY
+_mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids);
+
+extern void GLAPIENTRY
+_mesa_GetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_GetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble *params);
+
+extern void GLAPIENTRY
+_mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program);
+
+extern void GLAPIENTRY
+_mesa_GetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params);
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer);
+
+extern void GLAPIENTRY
+_mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+
+extern void GLAPIENTRY
+_mesa_ProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble *params);
+
+extern void GLAPIENTRY
+_mesa_ProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_TrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform);
+
+
+extern void GLAPIENTRY
+_mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+extern void GLAPIENTRY
+_mesa_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name,
+ const float v[]);
+
+extern void GLAPIENTRY
+_mesa_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+
+extern void GLAPIENTRY
+_mesa_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name,
+ const double v[]);
+
+extern void GLAPIENTRY
+_mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLfloat *params);
+
+extern void GLAPIENTRY
+_mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name,
+ GLdouble *params);
+
+extern void
+_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program);
+
+extern void
+_mesa_emit_nv_temp_initialization(GLcontext *ctx,
+ struct gl_program *program);
+
+#endif
diff --git a/mesalib/src/mesa/main/pixelstore.h b/mesalib/src/mesa/main/pixelstore.h
index ee963f9ba..47bff4276 100644
--- a/mesalib/src/mesa/main/pixelstore.h
+++ b/mesalib/src/mesa/main/pixelstore.h
@@ -33,6 +33,7 @@
#include "glheader.h"
+#include "mtypes.h"
extern void GLAPIENTRY
diff --git a/mesalib/src/mesa/main/querymatrix.c b/mesalib/src/mesa/main/querymatrix.c
new file mode 100644
index 000000000..36236eb9a
--- /dev/null
+++ b/mesalib/src/mesa/main/querymatrix.c
@@ -0,0 +1,216 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+/**
+ * Code to implement GL_OES_query_matrix. See the spec at:
+ * http://www.khronos.org/registry/gles/extensions/OES/OES_query_matrix.txt
+ */
+
+
+#include <stdlib.h>
+#include <math.h>
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+
+
+/**
+ * This is from the GL_OES_query_matrix extension specification:
+ *
+ * GLbitfield glQueryMatrixxOES( GLfixed mantissa[16],
+ * GLint exponent[16] )
+ * mantissa[16] contains the contents of the current matrix in GLfixed
+ * format. exponent[16] contains the unbiased exponents applied to the
+ * matrix components, so that the internal representation of component i
+ * is close to mantissa[i] * 2^exponent[i]. The function returns a status
+ * word which is zero if all the components are valid. If
+ * status & (1<<i) != 0, the component i is invalid (e.g., NaN, Inf).
+ * The implementations are not required to keep track of overflows. In
+ * that case, the invalid bits are never set.
+ */
+
+#define INT_TO_FIXED(x) ((GLfixed) ((x) << 16))
+#define FLOAT_TO_FIXED(x) ((GLfixed) ((x) * 65536.0))
+
+#if defined(_MSC_VER)
+/* Oddly, the fpclassify() function doesn't exist in such a form
+ * on MSVC. This is an implementation using slightly different
+ * lower-level Windows functions.
+ */
+#include <float.h>
+
+enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL}
+fpclassify(double x)
+{
+ switch(_fpclass(x)) {
+ case _FPCLASS_SNAN: /* signaling NaN */
+ case _FPCLASS_QNAN: /* quiet NaN */
+ return FP_NAN;
+ case _FPCLASS_NINF: /* negative infinity */
+ case _FPCLASS_PINF: /* positive infinity */
+ return FP_INFINITE;
+ case _FPCLASS_NN: /* negative normal */
+ case _FPCLASS_PN: /* positive normal */
+ return FP_NORMAL;
+ case _FPCLASS_ND: /* negative denormalized */
+ case _FPCLASS_PD: /* positive denormalized */
+ return FP_SUBNORMAL;
+ case _FPCLASS_NZ: /* negative zero */
+ case _FPCLASS_PZ: /* positive zero */
+ return FP_ZERO;
+ default:
+ /* Should never get here; but if we do, this will guarantee
+ * that the pattern is not treated like a number.
+ */
+ return FP_NAN;
+ }
+}
+
+#elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
+ defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
+ (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \
+ (defined(__sun) && defined(__GNUC__))
+
+/* fpclassify is available. */
+
+#elif !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600
+
+enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL}
+fpclassify(double x)
+{
+ /* XXX do something better someday */
+ return FP_NORMAL;
+}
+
+#endif
+
+extern GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
+
+/* The Mesa functions we'll need */
+extern void GL_APIENTRY _mesa_GetIntegerv(GLenum pname, GLint *params);
+extern void GL_APIENTRY _mesa_GetFloatv(GLenum pname, GLfloat *params);
+
+GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16])
+{
+ GLfloat matrix[16];
+ GLint tmp;
+ GLenum currentMode = GL_FALSE;
+ GLenum desiredMatrix = GL_FALSE;
+ /* The bitfield returns 1 for each component that is invalid (i.e.
+ * NaN or Inf). In case of error, everything is invalid.
+ */
+ GLbitfield rv;
+ register unsigned int i;
+ unsigned int bit;
+
+ /* This data structure defines the mapping between the current matrix
+ * mode and the desired matrix identifier.
+ */
+ static struct {
+ GLenum currentMode;
+ GLenum desiredMatrix;
+ } modes[] = {
+ {GL_MODELVIEW, GL_MODELVIEW_MATRIX},
+ {GL_PROJECTION, GL_PROJECTION_MATRIX},
+ {GL_TEXTURE, GL_TEXTURE_MATRIX},
+#if 0
+ /* this doesn't exist in GLES */
+ {GL_COLOR, GL_COLOR_MATRIX},
+#endif
+ };
+
+ /* Call Mesa to get the current matrix in floating-point form. First,
+ * we have to figure out what the current matrix mode is.
+ */
+ _mesa_GetIntegerv(GL_MATRIX_MODE, &tmp);
+ currentMode = (GLenum) tmp;
+
+ /* The mode is either GL_FALSE, if for some reason we failed to query
+ * the mode, or a given mode from the above table. Search for the
+ * returned mode to get the desired matrix; if we don't find it,
+ * we can return immediately, as _mesa_GetInteger() will have
+ * logged the necessary error already.
+ */
+ for (i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) {
+ if (modes[i].currentMode == currentMode) {
+ desiredMatrix = modes[i].desiredMatrix;
+ break;
+ }
+ }
+ if (desiredMatrix == GL_FALSE) {
+ /* Early error means all values are invalid. */
+ return 0xffff;
+ }
+
+ /* Now pull the matrix itself. */
+ _mesa_GetFloatv(desiredMatrix, matrix);
+
+ rv = 0;
+ for (i = 0, bit = 1; i < 16; i++, bit<<=1) {
+ float normalizedFraction;
+ int exp;
+
+ switch (fpclassify(matrix[i])) {
+ /* A "subnormal" or denormalized number is too small to be
+ * represented in normal format; but despite that it's a
+ * valid floating point number. FP_ZERO and FP_NORMAL
+ * are both valid as well. We should be fine treating
+ * these three cases as legitimate floating-point numbers.
+ */
+ case FP_SUBNORMAL:
+ case FP_NORMAL:
+ case FP_ZERO:
+ normalizedFraction = (GLfloat)frexp(matrix[i], &exp);
+ mantissa[i] = FLOAT_TO_FIXED(normalizedFraction);
+ exponent[i] = (GLint) exp;
+ break;
+
+ /* If the entry is not-a-number or an infinity, then the
+ * matrix component is invalid. The invalid flag for
+ * the component is already set; might as well set the
+ * other return values to known values. We'll set
+ * distinct values so that a savvy end user could determine
+ * whether the matrix component was a NaN or an infinity,
+ * but this is more useful for debugging than anything else
+ * since the standard doesn't specify any such magic
+ * values to return.
+ */
+ case FP_NAN:
+ mantissa[i] = INT_TO_FIXED(0);
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+
+ case FP_INFINITE:
+ /* Return +/- 1 based on whether it's a positive or
+ * negative infinity.
+ */
+ if (matrix[i] > 0) {
+ mantissa[i] = INT_TO_FIXED(1);
+ }
+ else {
+ mantissa[i] = -INT_TO_FIXED(1);
+ }
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+
+ /* We should never get here; but here's a catching case
+ * in case fpclassify() is returnings something unexpected.
+ */
+ default:
+ mantissa[i] = INT_TO_FIXED(2);
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+ }
+
+ } /* for each component */
+
+ /* All done */
+ return rv;
+}
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index ba7cfc30f..fd4ee3335 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -130,6 +130,42 @@ _mesa_init_query_object_functions(struct dd_function_table *driver)
}
+/**
+ * Return pointer to the query object binding point for the given target.
+ * \return NULL if invalid target, else the address of binding point
+ */
+static struct gl_query_object **
+get_query_binding_point(GLcontext *ctx, GLenum target)
+{
+ switch (target) {
+ case GL_SAMPLES_PASSED_ARB:
+ if (ctx->Extensions.ARB_occlusion_query)
+ return &ctx->Query.CurrentOcclusionObject;
+ else
+ return NULL;
+ case GL_TIME_ELAPSED_EXT:
+ if (ctx->Extensions.EXT_timer_query)
+ return &ctx->Query.CurrentTimerObject;
+ else
+ return NULL;
+#if FEATURE_EXT_transform_feedback
+ case GL_PRIMITIVES_GENERATED:
+ if (ctx->Extensions.EXT_transform_feedback)
+ return &ctx->Query.PrimitivesGenerated;
+ else
+ return NULL;
+ case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
+ if (ctx->Extensions.EXT_transform_feedback)
+ return &ctx->Query.PrimitivesWritten;
+ else
+ return NULL;
+#endif
+ default:
+ return NULL;
+ }
+}
+
+
void GLAPIENTRY
_mesa_GenQueriesARB(GLsizei n, GLuint *ids)
{
@@ -214,36 +250,16 @@ _mesa_IsQueryARB(GLuint id)
static void GLAPIENTRY
_mesa_BeginQueryARB(GLenum target, GLuint id)
{
- struct gl_query_object *q;
+ struct gl_query_object *q, **bindpt;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_DEPTH);
- switch (target) {
- case GL_SAMPLES_PASSED_ARB:
- if (!ctx->Extensions.ARB_occlusion_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
- return;
- }
- if (ctx->Query.CurrentOcclusionObject) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginQueryARB");
- return;
- }
- break;
- case GL_TIME_ELAPSED_EXT:
- if (!ctx->Extensions.EXT_timer_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
- return;
- }
- if (ctx->Query.CurrentTimerObject) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginQueryARB");
- return;
- }
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
- return;
+ bindpt = get_query_binding_point(ctx, target);
+ if (!bindpt) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
+ return;
}
if (id == 0) {
@@ -275,12 +291,8 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
q->Result = 0;
q->Ready = GL_FALSE;
- if (target == GL_SAMPLES_PASSED_ARB) {
- ctx->Query.CurrentOcclusionObject = q;
- }
- else if (target == GL_TIME_ELAPSED_EXT) {
- ctx->Query.CurrentTimerObject = q;
- }
+ /* XXX should probably refcount query objects */
+ *bindpt = q;
ctx->Driver.BeginQuery(ctx, q);
}
@@ -289,34 +301,22 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
static void GLAPIENTRY
_mesa_EndQueryARB(GLenum target)
{
- struct gl_query_object *q;
+ struct gl_query_object *q, **bindpt;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_DEPTH);
- switch (target) {
- case GL_SAMPLES_PASSED_ARB:
- if (!ctx->Extensions.ARB_occlusion_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
- return;
- }
- q = ctx->Query.CurrentOcclusionObject;
- ctx->Query.CurrentOcclusionObject = NULL;
- break;
- case GL_TIME_ELAPSED_EXT:
- if (!ctx->Extensions.EXT_timer_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
- return;
- }
- q = ctx->Query.CurrentTimerObject;
- ctx->Query.CurrentTimerObject = NULL;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
- return;
+ bindpt = get_query_binding_point(ctx, target);
+ if (!bindpt) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
+ return;
}
+ /* XXX should probably refcount query objects */
+ q = *bindpt;
+ *bindpt = NULL;
+
if (!q || !q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEndQueryARB(no matching glBeginQueryARB)");
@@ -331,30 +331,18 @@ _mesa_EndQueryARB(GLenum target)
void GLAPIENTRY
_mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params)
{
- struct gl_query_object *q;
+ struct gl_query_object *q, **bindpt;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- switch (target) {
- case GL_SAMPLES_PASSED_ARB:
- if (!ctx->Extensions.ARB_occlusion_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
- return;
- }
- q = ctx->Query.CurrentOcclusionObject;
- break;
- case GL_TIME_ELAPSED_EXT:
- if (!ctx->Extensions.EXT_timer_query) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
- return;
- }
- q = ctx->Query.CurrentTimerObject;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivARB(target)");
- return;
+ bindpt = get_query_binding_point(ctx, target);
+ if (!bindpt) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)");
+ return;
}
+ q = *bindpt;
+
switch (pname) {
case GL_QUERY_COUNTER_BITS_ARB:
*params = 8 * sizeof(q->Result);
diff --git a/mesalib/src/mesa/main/queryobj.h b/mesalib/src/mesa/main/queryobj.h
index ba8b5dd00..8746ed15e 100644
--- a/mesalib/src/mesa/main/queryobj.h
+++ b/mesalib/src/mesa/main/queryobj.h
@@ -33,17 +33,6 @@
#if FEATURE_queryobj
-#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) \
- do { \
- (driver)->NewQueryObject = impl ## NewQueryObject; \
- (driver)->DeleteQuery = impl ## DeleteQuery; \
- (driver)->BeginQuery = impl ## BeginQuery; \
- (driver)->EndQuery = impl ## EndQuery; \
- (driver)->WaitQuery = impl ## WaitQuery; \
- (driver)->CheckQuery = impl ## CheckQuery; \
- } while (0)
-
-
static INLINE struct gl_query_object *
_mesa_lookup_query_object(GLcontext *ctx, GLuint id)
{
@@ -78,7 +67,11 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp);
#else /* FEATURE_queryobj */
-#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) do { } while (0)
+static INLINE struct gl_query_object *
+_mesa_lookup_query_object(GLcontext *ctx, GLuint id)
+{
+ return NULL;
+}
static INLINE void
_mesa_init_query_object_functions(struct dd_function_table *driver)
diff --git a/mesalib/src/mesa/main/rastpos.h b/mesalib/src/mesa/main/rastpos.h
index b2127225b..4994616d4 100644
--- a/mesalib/src/mesa/main/rastpos.h
+++ b/mesalib/src/mesa/main/rastpos.h
@@ -37,18 +37,11 @@
#if FEATURE_rastpos
-#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) \
- do { \
- (driver)->RasterPos = impl ## RasterPos; \
- } while (0)
-
extern void
_mesa_init_rastpos_dispatch(struct _glapi_table *disp);
#else /* FEATURE_rastpos */
-#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) do { } while (0)
-
static INLINE void
_mesa_init_rastpos_dispatch(struct _glapi_table *disp)
{
diff --git a/mesalib/src/mesa/main/rbadaptors.c b/mesalib/src/mesa/main/rbadaptors.c
deleted file mode 100644
index 1060c5796..000000000
--- a/mesalib/src/mesa/main/rbadaptors.c
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5.3
- *
- * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * Renderbuffer adaptors.
- * These fuctions are used to convert rendering from core Mesa's GLchan
- * colors to 8 or 16-bit color channels in RGBA renderbuffers.
- * This means Mesa can be compiled for 16 or 32-bit color processing
- * and still render into 8 and 16-bit/channel renderbuffers.
- */
-
-
-#include "glheader.h"
-#include "mtypes.h"
-#include "colormac.h"
-#include "renderbuffer.h"
-#include "rbadaptors.h"
-
-
-static void
-Delete_wrapper(struct gl_renderbuffer *rb)
-{
- /* Decrement reference count on the buffer we're wrapping and delete
- * it if refcount hits zero.
- */
- _mesa_reference_renderbuffer(&rb->Wrapped, NULL);
-
- /* delete myself */
- _mesa_delete_renderbuffer(rb);
-}
-
-
-static GLboolean
-AllocStorage_wrapper(GLcontext *ctx, struct gl_renderbuffer *rb,
- GLenum internalFormat, GLuint width, GLuint height)
-{
- GLboolean b = rb->Wrapped->AllocStorage(ctx, rb->Wrapped, internalFormat,
- width, height);
- if (b) {
- rb->Width = width;
- rb->Height = height;
- }
- return b;
-}
-
-
-static void *
-GetPointer_wrapper(GLcontext *ctx, struct gl_renderbuffer *rb,
- GLint x, GLint y)
-{
- (void) ctx;
- (void) rb;
- (void) x;
- (void) y;
- return NULL;
-}
-
-
-static void
-GetRow_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, void *values)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLushort *values16 = (GLushort *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- ASSERT(count <= MAX_WIDTH);
-
- /* get 8bpp values */
- rb->Wrapped->GetRow(ctx, rb->Wrapped, count, x, y, values8);
-
- /* convert 8bpp to 16bpp */
- for (i = 0; i < 4 * count; i++) {
- values16[i] = (values8[i] << 8) | values8[i];
- }
-}
-
-
-static void
-GetValues_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], void *values)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLushort *values16 = (GLushort *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
-
- rb->Wrapped->GetValues(ctx, rb->Wrapped, count, x, y, values8);
-
- for (i = 0; i < 4 * count; i++) {
- values16[i] = (values8[i] << 8) | values8[i];
- }
-}
-
-
-static void
-PutRow_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLushort *values16 = (GLushort *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 4 * count; i++) {
- values8[i] = values16[i] >> 8;
- }
- rb->Wrapped->PutRow(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutRowRGB_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 3];
- GLushort *values16 = (GLushort *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 3 * count; i++) {
- values8[i] = values16[i] >> 8;
- }
- rb->Wrapped->PutRowRGB(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutMonoRow_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *value, const GLubyte *mask)
-{
- GLubyte value8[4];
- GLushort *value16 = (GLushort *) value;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- value8[0] = value16[0] >> 8;
- value8[1] = value16[1] >> 8;
- value8[2] = value16[2] >> 8;
- value8[3] = value16[3] >> 8;
- rb->Wrapped->PutMonoRow(ctx, rb->Wrapped, count, x, y, value8, mask);
-}
-
-
-static void
-PutValues_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], const void *values,
- const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLushort *values16 = (GLushort *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 4 * count; i++) {
- values8[i] = values16[i] >> 8;
- }
- rb->Wrapped->PutValues(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutMonoValues_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb,
- GLuint count, const GLint x[], const GLint y[],
- const void *value, const GLubyte *mask)
-{
- GLubyte value8[4];
- GLushort *value16 = (GLushort *) value;
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- value8[0] = value16[0] >> 8;
- value8[1] = value16[1] >> 8;
- value8[2] = value16[2] >> 8;
- value8[3] = value16[3] >> 8;
- rb->Wrapped->PutMonoValues(ctx, rb->Wrapped, count, x, y, value8, mask);
-}
-
-
-/**
- * Wrap an 8-bit/channel renderbuffer with a 16-bit/channel
- * renderbuffer adaptor.
- */
-struct gl_renderbuffer *
-_mesa_new_renderbuffer_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8)
-{
- struct gl_renderbuffer *rb16;
-
- rb16 = _mesa_new_renderbuffer(ctx, rb8->Name);
- if (rb16) {
- ASSERT(rb8->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb8->_BaseFormat == GL_RGBA);
-
- _glthread_LOCK_MUTEX(rb8->Mutex);
- rb8->RefCount++;
- _glthread_UNLOCK_MUTEX(rb8->Mutex);
-
- rb16->InternalFormat = rb8->InternalFormat;
- rb16->Format = rb8->Format; /* XXX is this right? */
- rb16->_BaseFormat = rb8->_BaseFormat;
- rb16->DataType = GL_UNSIGNED_SHORT;
- /* Note: passing through underlying bits/channel */
- rb16->Wrapped = rb8;
-
- rb16->AllocStorage = AllocStorage_wrapper;
- rb16->Delete = Delete_wrapper;
- rb16->GetPointer = GetPointer_wrapper;
- rb16->GetRow = GetRow_16wrap8;
- rb16->GetValues = GetValues_16wrap8;
- rb16->PutRow = PutRow_16wrap8;
- rb16->PutRowRGB = PutRowRGB_16wrap8;
- rb16->PutMonoRow = PutMonoRow_16wrap8;
- rb16->PutValues = PutValues_16wrap8;
- rb16->PutMonoValues = PutMonoValues_16wrap8;
- }
- return rb16;
-}
-
-
-
-
-static void
-GetRow_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, void *values)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- ASSERT(count <= MAX_WIDTH);
-
- /* get 8bpp values */
- rb->Wrapped->GetRow(ctx, rb->Wrapped, count, x, y, values8);
-
- /* convert 8bpp to 32bpp */
- for (i = 0; i < 4 * count; i++) {
- values32[i] = UBYTE_TO_FLOAT(values8[i]);
- }
-}
-
-
-static void
-GetValues_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], void *values)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
-
- rb->Wrapped->GetValues(ctx, rb->Wrapped, count, x, y, values8);
-
- for (i = 0; i < 4 * count; i++) {
- values32[i] = UBYTE_TO_FLOAT(values8[i]);
- }
-}
-
-
-static void
-PutRow_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 4 * count; i++) {
- UNCLAMPED_FLOAT_TO_UBYTE(values8[i], values32[i]);
- }
- rb->Wrapped->PutRow(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutRowRGB_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 3];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 3 * count; i++) {
- UNCLAMPED_FLOAT_TO_UBYTE(values8[i], values32[i]);
- }
- rb->Wrapped->PutRowRGB(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutMonoRow_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *value, const GLubyte *mask)
-{
- GLubyte value8[4];
- GLfloat *value32 = (GLfloat *) value;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[0], value32[0]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[1], value32[1]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[2], value32[2]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[3], value32[3]);
- rb->Wrapped->PutMonoRow(ctx, rb->Wrapped, count, x, y, value8, mask);
-}
-
-
-static void
-PutValues_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], const void *values,
- const GLubyte *mask)
-{
- GLubyte values8[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < 4 * count; i++) {
- UNCLAMPED_FLOAT_TO_UBYTE(values8[i], values32[i]);
- }
- rb->Wrapped->PutValues(ctx, rb->Wrapped, count, x, y, values8, mask);
-}
-
-
-static void
-PutMonoValues_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb,
- GLuint count, const GLint x[], const GLint y[],
- const void *value, const GLubyte *mask)
-{
- GLubyte value8[4];
- GLfloat *value32 = (GLfloat *) value;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_BYTE);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[0], value32[0]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[1], value32[1]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[2], value32[2]);
- UNCLAMPED_FLOAT_TO_UBYTE(value8[3], value32[3]);
- rb->Wrapped->PutMonoValues(ctx, rb->Wrapped, count, x, y, value8, mask);
-}
-
-
-/**
- * Wrap an 8-bit/channel renderbuffer with a 32-bit/channel
- * renderbuffer adaptor.
- */
-struct gl_renderbuffer *
-_mesa_new_renderbuffer_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8)
-{
- struct gl_renderbuffer *rb32;
-
- rb32 = _mesa_new_renderbuffer(ctx, rb8->Name);
- if (rb32) {
- ASSERT(rb8->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb8->_BaseFormat == GL_RGBA);
-
- _glthread_LOCK_MUTEX(rb8->Mutex);
- rb8->RefCount++;
- _glthread_UNLOCK_MUTEX(rb8->Mutex);
-
- rb32->InternalFormat = rb8->InternalFormat;
- rb32->Format = rb8->Format; /* XXX is this right? */
- rb32->_BaseFormat = rb8->_BaseFormat;
- rb32->DataType = GL_FLOAT;
- /* Note: passing through underlying bits/channel */
- rb32->Wrapped = rb8;
-
- rb32->AllocStorage = AllocStorage_wrapper;
- rb32->Delete = Delete_wrapper;
- rb32->GetPointer = GetPointer_wrapper;
- rb32->GetRow = GetRow_32wrap8;
- rb32->GetValues = GetValues_32wrap8;
- rb32->PutRow = PutRow_32wrap8;
- rb32->PutRowRGB = PutRowRGB_32wrap8;
- rb32->PutMonoRow = PutMonoRow_32wrap8;
- rb32->PutValues = PutValues_32wrap8;
- rb32->PutMonoValues = PutMonoValues_32wrap8;
- }
- return rb32;
-}
-
-
-
-
-static void
-GetRow_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, void *values)
-{
- GLushort values16[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- ASSERT(count <= MAX_WIDTH);
-
- /* get 16bpp values */
- rb->Wrapped->GetRow(ctx, rb->Wrapped, count, x, y, values16);
-
- /* convert 16bpp to 32bpp */
- for (i = 0; i < 4 * count; i++) {
- values32[i] = USHORT_TO_FLOAT(values16[i]);
- }
-}
-
-
-static void
-GetValues_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], void *values)
-{
- GLushort values16[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
-
- rb->Wrapped->GetValues(ctx, rb->Wrapped, count, x, y, values16);
-
- for (i = 0; i < 4 * count; i++) {
- values32[i] = USHORT_TO_FLOAT(values16[i]);
- }
-}
-
-
-static void
-PutRow_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLushort values16[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- for (i = 0; i < 4 * count; i++) {
- UNCLAMPED_FLOAT_TO_USHORT(values16[i], values32[i]);
- }
- rb->Wrapped->PutRow(ctx, rb->Wrapped, count, x, y, values16, mask);
-}
-
-
-static void
-PutRowRGB_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- GLushort values16[MAX_WIDTH * 3];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- for (i = 0; i < 3 * count; i++) {
- UNCLAMPED_FLOAT_TO_USHORT(values16[i], values32[i]);
- }
- rb->Wrapped->PutRowRGB(ctx, rb->Wrapped, count, x, y, values16, mask);
-}
-
-
-static void
-PutMonoRow_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *value, const GLubyte *mask)
-{
- GLushort value16[4];
- GLfloat *value32 = (GLfloat *) value;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- UNCLAMPED_FLOAT_TO_USHORT(value16[0], value32[0]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[1], value32[1]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[2], value32[2]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[3], value32[3]);
- rb->Wrapped->PutMonoRow(ctx, rb->Wrapped, count, x, y, value16, mask);
-}
-
-
-static void
-PutValues_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
- const GLint x[], const GLint y[], const void *values,
- const GLubyte *mask)
-{
- GLushort values16[MAX_WIDTH * 4];
- GLfloat *values32 = (GLfloat *) values;
- GLuint i;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- for (i = 0; i < 4 * count; i++) {
- UNCLAMPED_FLOAT_TO_USHORT(values16[i], values32[i]);
- }
- rb->Wrapped->PutValues(ctx, rb->Wrapped, count, x, y, values16, mask);
-}
-
-
-static void
-PutMonoValues_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb,
- GLuint count, const GLint x[], const GLint y[],
- const void *value, const GLubyte *mask)
-{
- GLushort value16[4];
- GLfloat *value32 = (GLfloat *) value;
- ASSERT(rb->DataType == GL_FLOAT);
- ASSERT(rb->Wrapped->DataType == GL_UNSIGNED_SHORT);
- UNCLAMPED_FLOAT_TO_USHORT(value16[0], value32[0]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[1], value32[1]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[2], value32[2]);
- UNCLAMPED_FLOAT_TO_USHORT(value16[3], value32[3]);
- rb->Wrapped->PutMonoValues(ctx, rb->Wrapped, count, x, y, value16, mask);
-}
-
-
-/**
- * Wrap an 16-bit/channel renderbuffer with a 32-bit/channel
- * renderbuffer adaptor.
- */
-struct gl_renderbuffer *
-_mesa_new_renderbuffer_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb16)
-{
- struct gl_renderbuffer *rb32;
-
- rb32 = _mesa_new_renderbuffer(ctx, rb16->Name);
- if (rb32) {
- ASSERT(rb16->DataType == GL_UNSIGNED_SHORT);
- ASSERT(rb16->_BaseFormat == GL_RGBA);
-
- _glthread_LOCK_MUTEX(rb16->Mutex);
- rb16->RefCount++;
- _glthread_UNLOCK_MUTEX(rb16->Mutex);
-
- rb32->InternalFormat = rb16->InternalFormat;
- rb32->Format = rb16->Format; /* XXX is this right? */
- rb32->_BaseFormat = rb16->_BaseFormat;
- rb32->DataType = GL_FLOAT;
- /* Note: passing through underlying bits/channel */
- rb32->Wrapped = rb16;
-
- rb32->AllocStorage = AllocStorage_wrapper;
- rb32->Delete = Delete_wrapper;
- rb32->GetPointer = GetPointer_wrapper;
- rb32->GetRow = GetRow_32wrap16;
- rb32->GetValues = GetValues_32wrap16;
- rb32->PutRow = PutRow_32wrap16;
- rb32->PutRowRGB = PutRowRGB_32wrap16;
- rb32->PutMonoRow = PutMonoRow_32wrap16;
- rb32->PutValues = PutValues_32wrap16;
- rb32->PutMonoValues = PutMonoValues_32wrap16;
- }
- return rb32;
-}
diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c
index f4d74e8be..93f2bd31c 100644
--- a/mesalib/src/mesa/main/readpix.c
+++ b/mesalib/src/mesa/main/readpix.c
@@ -103,6 +103,12 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
"glReadPixels(no color buffer)");
return GL_TRUE;
}
+ /* We no longer support CI-mode color buffers so trying to read
+ * GL_COLOR_INDEX pixels is always an error.
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glReadPixels(color buffer is RGB)");
+ return GL_TRUE;
}
break;
case GL_STENCIL_INDEX:
diff --git a/mesalib/src/mesa/main/remap.c b/mesalib/src/mesa/main/remap.c
index 8d9df6b83..2341f8488 100644
--- a/mesalib/src/mesa/main/remap.c
+++ b/mesalib/src/mesa/main/remap.c
@@ -14,12 +14,13 @@
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
*/
@@ -35,25 +36,18 @@
* a dynamic entry, or the corresponding static entry, in glapi.
*/
-#include "remap.h"
-#include "imports.h"
-
-#include "main/dispatch.h"
-
+#include "mfeatures.h"
#if FEATURE_remap_table
-
-#define need_MESA_remap_table
-#include "main/remap_helper.h"
+#include "remap.h"
+#include "imports.h"
+#include "glapi/glapi.h"
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#define MAX_ENTRY_POINTS 16
-
-/* this is global for quick access */
-int driDispatchRemapTable[driDispatchRemapTable_size];
-
+static const char *_mesa_function_pool;
/**
* Return the spec string associated with the given function index.
@@ -66,10 +60,7 @@ int driDispatchRemapTable[driDispatchRemapTable_size];
const char *
_mesa_get_function_spec(GLint func_index)
{
- if (func_index < ARRAY_SIZE(_mesa_function_pool))
- return _mesa_function_pool + func_index;
- else
- return NULL;
+ return _mesa_function_pool + func_index;
}
@@ -161,32 +152,14 @@ _mesa_map_function_array(const struct gl_function_remap *func_array)
/**
- * Map the functions which are already static.
- *
- * When a extension function are incorporated into the ABI, the
- * extension suffix is usually stripped. Mapping such functions
- * makes sure the alternative names are available.
- *
- * Note that functions mapped by _mesa_init_remap_table() are
- * excluded.
- */
-void
-_mesa_map_static_functions(void)
-{
- /* Remap static functions which have alternative names and are in the ABI.
- * This is to be on the safe side. glapi should have defined those names.
- */
- _mesa_map_function_array(MESA_alt_functions);
-}
-
-
-/**
* Initialize the remap table. This is called in one_time_init().
* The remap table needs to be initialized before calling the
* CALL/GET/SET macros defined in main/dispatch.h.
*/
void
-_mesa_init_remap_table(void)
+_mesa_do_init_remap_table(const char *pool,
+ int size,
+ const struct gl_function_pool_remap *remap)
{
static GLboolean initialized = GL_FALSE;
GLint i;
@@ -194,15 +167,16 @@ _mesa_init_remap_table(void)
if (initialized)
return;
initialized = GL_TRUE;
+ _mesa_function_pool = pool;
/* initialize the remap table */
- for (i = 0; i < ARRAY_SIZE(driDispatchRemapTable); i++) {
+ for (i = 0; i < size; i++) {
GLint offset;
const char *spec;
/* sanity check */
- ASSERT(i == MESA_remap_table_functions[i].remap_index);
- spec = _mesa_function_pool + MESA_remap_table_functions[i].pool_index;
+ ASSERT(i == remap[i].remap_index);
+ spec = _mesa_function_pool + remap[i].pool_index;
offset = _mesa_map_function_spec(spec);
/* store the dispatch offset in the remap table */
diff --git a/mesalib/src/mesa/main/remap.h b/mesalib/src/mesa/main/remap.h
index 7fb56e360..a2a55f615 100644
--- a/mesalib/src/mesa/main/remap.h
+++ b/mesalib/src/mesa/main/remap.h
@@ -14,12 +14,13 @@
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
*/
@@ -27,9 +28,18 @@
#define REMAP_H
-#include "main/mtypes.h"
+#include "main/compiler.h"
+#include "main/mfeatures.h"
-struct gl_function_remap;
+struct gl_function_pool_remap {
+ int pool_index;
+ int remap_index;
+};
+
+struct gl_function_remap {
+ int func_index;
+ int dispatch_offset; /* for sanity check */
+};
#if FEATURE_remap_table
@@ -38,9 +48,9 @@ extern int
driDispatchRemapTable[];
extern const char *
-_mesa_get_function_spec(GLint func_index);
+_mesa_get_function_spec(int func_index);
-extern GLint
+extern int
_mesa_map_function_spec(const char *spec);
extern void
@@ -50,17 +60,34 @@ extern void
_mesa_map_static_functions(void);
extern void
+_mesa_map_static_functions_es1(void);
+
+extern void
+_mesa_map_static_functions_es2(void);
+
+extern void
+_mesa_do_init_remap_table(const char *pool,
+ int size,
+ const struct gl_function_pool_remap *remap);
+
+extern void
_mesa_init_remap_table(void);
+extern void
+_mesa_init_remap_table_es1(void);
+
+extern void
+_mesa_init_remap_table_es2(void);
+
#else /* FEATURE_remap_table */
static INLINE const char *
-_mesa_get_function_spec(GLint func_index)
+_mesa_get_function_spec(int func_index)
{
return NULL;
}
-static INLINE GLint
+static INLINE int
_mesa_map_function_spec(const char *spec)
{
return -1;
@@ -76,11 +103,39 @@ _mesa_map_static_functions(void)
{
}
+
+static INLINE void
+_mesa_map_static_functions_es1(void)
+{
+}
+
+static INLINE void
+_mesa_map_static_functions_es2(void)
+{
+}
+
+static INLINE void
+_mesa_do_init_remap_table(const char *pool,
+ int size,
+ const struct gl_function_pool_remap *remap)
+{
+}
+
static INLINE void
_mesa_init_remap_table(void)
{
}
+static INLINE void
+_mesa_init_remap_table_es1(void)
+{
+}
+
+static INLINE void
+_mesa_init_remap_table_es2(void)
+{
+}
+
#endif /* FEATURE_remap_table */
diff --git a/mesalib/src/mesa/main/remap_helper.h b/mesalib/src/mesa/main/remap_helper.h
index ee898efa5..631cc9015 100644
--- a/mesalib/src/mesa/main/remap_helper.h
+++ b/mesalib/src/mesa/main/remap_helper.h
@@ -26,11 +26,7 @@
*/
#include "main/dispatch.h"
-
-struct gl_function_remap {
- GLint func_index;
- GLint dispatch_offset; /* for sanity check */
-};
+#include "main/remap.h"
/* this is internal to remap.c */
#ifdef need_MESA_remap_table
@@ -450,9 +446,9 @@ static const char _mesa_function_pool[] =
"\0"
"glCreateProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[2906]: FragmentLightModelivSGIX (dynamic) */
+ /* _mesa_function_pool[2906]: DeleteTransformFeedbacks (will be remapped) */
"ip\0"
- "glFragmentLightModelivSGIX\0"
+ "glDeleteTransformFeedbacks\0"
"\0"
/* _mesa_function_pool[2937]: UniformMatrix4x3fv (will be remapped) */
"iiip\0"
@@ -668,3711 +664,3801 @@ static const char _mesa_function_pool[] =
"iip\0"
"glGetTexEnvfv\0"
"\0"
- /* _mesa_function_pool[4480]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4480]: BindTransformFeedback (will be remapped) */
+ "ii\0"
+ "glBindTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[4508]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"ffffffffffff\0"
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4533]: Indexub (offset 315) */
+ /* _mesa_function_pool[4561]: Indexub (offset 315) */
"i\0"
"glIndexub\0"
"\0"
- /* _mesa_function_pool[4546]: TexEnvi (offset 186) */
+ /* _mesa_function_pool[4574]: TexEnvi (offset 186) */
"iii\0"
"glTexEnvi\0"
"\0"
- /* _mesa_function_pool[4561]: GetClipPlane (offset 259) */
+ /* _mesa_function_pool[4589]: GetClipPlane (offset 259) */
"ip\0"
"glGetClipPlane\0"
"\0"
- /* _mesa_function_pool[4580]: CombinerParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[4608]: CombinerParameterfvNV (will be remapped) */
"ip\0"
"glCombinerParameterfvNV\0"
"\0"
- /* _mesa_function_pool[4608]: VertexAttribs3dvNV (will be remapped) */
+ /* _mesa_function_pool[4636]: VertexAttribs3dvNV (will be remapped) */
"iip\0"
"glVertexAttribs3dvNV\0"
"\0"
- /* _mesa_function_pool[4634]: VertexAttribs4fvNV (will be remapped) */
+ /* _mesa_function_pool[4662]: VertexAttribs4fvNV (will be remapped) */
"iip\0"
"glVertexAttribs4fvNV\0"
"\0"
- /* _mesa_function_pool[4660]: VertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[4688]: VertexArrayRangeNV (will be remapped) */
"ip\0"
"glVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[4685]: FragmentLightiSGIX (dynamic) */
+ /* _mesa_function_pool[4713]: FragmentLightiSGIX (dynamic) */
"iii\0"
"glFragmentLightiSGIX\0"
"\0"
- /* _mesa_function_pool[4711]: PolygonOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[4739]: PolygonOffsetEXT (will be remapped) */
"ff\0"
"glPolygonOffsetEXT\0"
"\0"
- /* _mesa_function_pool[4734]: PollAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4762]: PollAsyncSGIX (dynamic) */
"p\0"
"glPollAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4753]: DeleteFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[4781]: DeleteFragmentShaderATI (will be remapped) */
"i\0"
"glDeleteFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[4782]: Scaled (offset 301) */
+ /* _mesa_function_pool[4810]: Scaled (offset 301) */
"ddd\0"
"glScaled\0"
"\0"
- /* _mesa_function_pool[4796]: Scalef (offset 302) */
+ /* _mesa_function_pool[4824]: ResumeTransformFeedback (will be remapped) */
+ "\0"
+ "glResumeTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[4852]: Scalef (offset 302) */
"fff\0"
"glScalef\0"
"\0"
- /* _mesa_function_pool[4810]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[4866]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[4848]: MultTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[4904]: MultTransposeMatrixdARB (will be remapped) */
"p\0"
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[4900]: ObjectUnpurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[4956]: ColorMaskIndexedEXT (will be remapped) */
+ "iiiii\0"
+ "glColorMaskIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[4985]: ObjectUnpurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectUnpurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[4930]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[5015]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[4946]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[5031]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[5001]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[5086]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[5015]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[5100]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[5032]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5117]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5090]: Rotated (offset 299) */
+ /* _mesa_function_pool[5175]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5106]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5191]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5130]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5215]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[5152]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[5237]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[5167]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[5252]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[5196]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5281]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[5220]: Color4iv (offset 32) */
+ /* _mesa_function_pool[5305]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[5234]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[5319]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[5255]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[5340]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[5276]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5361]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[5301]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[5386]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[5346]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[5431]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[5390]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[5475]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[5410]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5495]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5470]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[5555]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[5515]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[5600]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[5542]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[5627]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[5575]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[5660]: DrawTransformFeedback (will be remapped) */
+ "ii\0"
+ "glDrawTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[5688]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[5608]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[5721]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[5633]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[5746]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[5651]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[5764]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[5676]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[5789]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[5703]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5816]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5745]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[5858]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[5785]: GenLists (offset 5) */
+ /* _mesa_function_pool[5898]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[5799]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[5912]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[5834]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[5947]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[5868]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[5981]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[5895]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6008]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[5923]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[6036]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[5958]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[6071]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[5986]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[6099]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[6006]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6119]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[6026]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6139]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6046]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6159]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6072]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6185]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6100]: Scissor (offset 176) */
+ /* _mesa_function_pool[6213]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[6116]: Fogf (offset 153) */
+ /* _mesa_function_pool[6229]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[6127]: GetCombinerOutputParameterfvNV (will be remapped) */
- "iiip\0"
- "glGetCombinerOutputParameterfvNV\0"
+ /* _mesa_function_pool[6240]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[6166]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[6285]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[6210]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[6329]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[6251]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[6370]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[6267]: Color4usv (offset 40) */
+ /* _mesa_function_pool[6386]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[6282]: Fogi (offset 155) */
+ /* _mesa_function_pool[6401]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[6293]: DepthRange (offset 288) */
+ /* _mesa_function_pool[6412]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[6310]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[6429]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[6328]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[6447]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[6357]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[6476]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[6374]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[6493]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[6392]: Color4ui (offset 37) */
+ /* _mesa_function_pool[6511]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[6409]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[6528]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[6428]: Color3usv (offset 24) */
+ /* _mesa_function_pool[6547]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[6443]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[6562]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[6463]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[6582]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[6480]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6599]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6529]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[6648]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[6546]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[6665]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[6565]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[6684]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[6584]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[6703]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[6615]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[6734]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[6667]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[6786]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[6684]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[6803]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[6733]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[6852]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[6789]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[6908]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6820]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[6939]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[6874]: Color4us (offset 39) */
+ /* _mesa_function_pool[6993]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[6891]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[7010]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[6981]: Color3bv (offset 10) */
+ /* _mesa_function_pool[7100]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[6995]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[7114]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7050]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7169]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[7096]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7215]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7126]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[7245]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[7163]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[7282]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[7192]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7311]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7234]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[7353]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[7287]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[7406]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[7302]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[7421]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[7324]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[7443]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[7354]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[7473]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[7401]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[7520]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[7445]: ColorTable (offset 339) */
+ /* _mesa_function_pool[7564]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[7498]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[7617]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[7518]: Accum (offset 213) */
+ /* _mesa_function_pool[7637]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[7530]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[7649]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[7551]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[7670]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[7583]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[7702]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[7639]: Finish (offset 216) */
+ /* _mesa_function_pool[7758]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[7650]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[7769]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[7674]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[7793]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[7692]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[7811]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[7735]: HintPGI (dynamic) */
+ /* _mesa_function_pool[7854]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[7749]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[7868]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[7807]: Color4s (offset 33) */
+ /* _mesa_function_pool[7926]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[7823]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[7942]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[7848]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[7967]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[7866]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[7985]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[7883]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[8002]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[7898]: CullParameterdvEXT (will be remapped) */
+ /* _mesa_function_pool[8017]: CullParameterdvEXT (will be remapped) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[7923]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[8042]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[7960]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8079]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7989]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[8108]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[8046]: Color4i (offset 31) */
+ /* _mesa_function_pool[8165]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[8062]: Color4f (offset 29) */
+ /* _mesa_function_pool[8181]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[8078]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[8197]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[8096]: Color4d (offset 27) */
+ /* _mesa_function_pool[8215]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[8112]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[8231]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[8128]: Color4b (offset 25) */
+ /* _mesa_function_pool[8247]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[8144]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[8263]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[8161]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[8280]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[8191]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[8310]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[8209]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[8328]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[8267]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[8386]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[8288]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[8407]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[8307]: ColorMaskIndexedEXT (will be remapped) */
- "iiiii\0"
- "glColorMaskIndexedEXT\0"
+ /* _mesa_function_pool[8426]: GetVertexAttribfvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfvNV\0"
+ "\0"
+ /* _mesa_function_pool[8453]: BeginTransformFeedbackEXT (will be remapped) */
+ "i\0"
+ "glBeginTransformFeedbackEXT\0"
+ "glBeginTransformFeedback\0"
"\0"
- /* _mesa_function_pool[8336]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[8509]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[8358]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[8531]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[8374]: EndList (offset 1) */
+ /* _mesa_function_pool[8547]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[8386]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[8559]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[8410]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[8583]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[8440]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[8613]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[8474]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[8647]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[8492]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[8665]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[8543]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[8716]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[8562]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[8735]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[8577]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[8750]: GenTransformFeedbacks (will be remapped) */
+ "ip\0"
+ "glGenTransformFeedbacks\0"
+ "\0"
+ /* _mesa_function_pool[8778]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[8605]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[8806]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[8661]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[8862]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[8689]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[8890]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[8707]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[8908]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[8755]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[8956]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8794]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[8995]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[8812]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[9013]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[8864]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[9065]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[8898]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[9099]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[8926]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[9127]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[8972]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9173]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[8998]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[9199]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[9013]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[9214]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[9040]: Color3us (offset 23) */
+ /* _mesa_function_pool[9241]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[9056]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[9257]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[9091]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[9292]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[9134]: End (offset 43) */
+ /* _mesa_function_pool[9335]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[9142]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[9343]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[9167]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[9368]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[9193]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[9394]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[9223]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[9424]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[9268]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[9469]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[9314]: Color3ub (offset 19) */
+ /* _mesa_function_pool[9515]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[9330]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9531]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9362]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[9563]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[9387]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9588]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9422]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[9623]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[9445]: Color3ui (offset 21) */
+ /* _mesa_function_pool[9646]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[9461]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[9662]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[9478]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[9679]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[9524]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[9725]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[9551]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[9752]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[9587]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[9788]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[9603]: PixelTransformParameterfvEXT (dynamic) */
- "iip\0"
- "glPixelTransformParameterfvEXT\0"
+ /* _mesa_function_pool[9804]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ "iiipppp\0"
+ "glGetTransformFeedbackVaryingEXT\0"
+ "glGetTransformFeedbackVarying\0"
"\0"
- /* _mesa_function_pool[9639]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[9876]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[9682]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[9919]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[9715]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[9952]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[9744]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[9981]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[9790]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[10027]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[9823]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[10060]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[9847]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[10084]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[9872]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[10109]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[9925]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[10162]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[9982]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[10219]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[10020]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[10257]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[10045]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[10282]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[10088]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10325]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10152]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[10389]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[10196]: GetError (offset 261) */
+ /* _mesa_function_pool[10433]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[10209]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[10446]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[10228]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[10465]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[10245]: Indexdv (offset 45) */
+ /* _mesa_function_pool[10482]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[10258]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[10495]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[10314]: Normal3s (offset 60) */
+ /* _mesa_function_pool[10551]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[10330]: GetObjectParameterivAPPLE (will be remapped) */
+ /* _mesa_function_pool[10567]: GetObjectParameterivAPPLE (will be remapped) */
"iiip\0"
"glGetObjectParameterivAPPLE\0"
"\0"
- /* _mesa_function_pool[10364]: PushName (offset 201) */
+ /* _mesa_function_pool[10601]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[10378]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[10615]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[10423]: CullParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[10660]: CullParameterfvEXT (will be remapped) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[10448]: Normal3i (offset 58) */
+ /* _mesa_function_pool[10685]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[10464]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[10701]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[10499]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[10736]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[10556]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[10793]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[10599]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[10836]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[10628]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[10865]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[10678]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[10915]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[10712]: Normal3b (offset 52) */
+ /* _mesa_function_pool[10949]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[10728]: Normal3d (offset 54) */
+ /* _mesa_function_pool[10965]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[10744]: Normal3f (offset 56) */
+ /* _mesa_function_pool[10981]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[10760]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[10997]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[10805]: Indexi (offset 48) */
+ /* _mesa_function_pool[11042]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[10817]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[11054]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[10850]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[11087]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[10878]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[11115]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[10899]: DepthMask (offset 211) */
+ /* _mesa_function_pool[11136]: BindBufferRangeEXT (will be remapped) */
+ "iiiii\0"
+ "glBindBufferRangeEXT\0"
+ "glBindBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[11182]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[10914]: IsShader (will be remapped) */
+ /* _mesa_function_pool[11197]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[10928]: Indexf (offset 46) */
+ /* _mesa_function_pool[11211]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[10940]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[11223]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[10978]: Indexd (offset 44) */
+ /* _mesa_function_pool[11261]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[10990]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[11273]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[11011]: StencilOp (offset 244) */
+ /* _mesa_function_pool[11294]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[11028]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[11311]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[11050]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[11333]: FramebufferTextureLayer (dynamic) */
+ "iiiii\0"
+ "glFramebufferTextureLayerARB\0"
+ "\0"
+ /* _mesa_function_pool[11369]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[11095]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[11414]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[11111]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[11430]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[11157]: Indexs (offset 50) */
+ /* _mesa_function_pool[11476]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[11169]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[11488]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11189]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[11508]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11211]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[11530]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11249]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[11568]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11281]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[11600]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11308]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[11627]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11323]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[11642]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11340]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[11659]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11355]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11674]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11408]: Color4bv (offset 26) */
+ /* _mesa_function_pool[11727]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11422]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[11741]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11444]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[11763]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11492]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[11811]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11517]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[11836]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11565]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[11884]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11589]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[11908]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[11624]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[11943]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[11642]: LogicOp (offset 242) */
+ /* _mesa_function_pool[11961]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[11655]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[11974]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[11679]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[11998]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[11694]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[12013]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[11770]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[12089]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[11787]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[12106]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[11807]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[12126]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[11834]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[12153]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[11879]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[12198]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[11894]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12213]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11926]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[12245]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[11954]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[12273]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[11978]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[12297]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[12039]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[12358]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[12063]: GenTextures (offset 328) */
+ /* _mesa_function_pool[12382]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[12098]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[12417]: FramebufferTextureARB (will be remapped) */
+ "iiii\0"
+ "glFramebufferTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[12447]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[12115]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[12464]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[12171]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12520]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[12210]: MultiModeDrawArraysIBM (will be remapped) */
+ /* _mesa_function_pool[12559]: MultiModeDrawArraysIBM (will be remapped) */
"pppii\0"
"glMultiModeDrawArraysIBM\0"
"\0"
- /* _mesa_function_pool[12242]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[12591]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12275]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[12624]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12297]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12646]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12325]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[12674]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12343]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[12692]: GetCombinerOutputParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[12731]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12361]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[12749]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12376]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[12764]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12392]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[12780]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12409]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[12797]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12433]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[12821]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12450]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[12838]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12505]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[12893]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12520]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[12908]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12539]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[12927]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12568]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[12956]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[12611]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12999]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[12655]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[13043]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[12671]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[13059]: EndTransformFeedbackEXT (will be remapped) */
+ "\0"
+ "glEndTransformFeedbackEXT\0"
+ "glEndTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[13110]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[12705]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[13144]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[12734]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[13173]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[12779]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[13218]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12835]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[13274]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[12856]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[13295]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[12886]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[13325]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[12921]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[13360]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[12940]: Flush (offset 217) */
+ /* _mesa_function_pool[13379]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[12950]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[13389]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[12965]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[13404]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[12987]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[13426]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[13005]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[13444]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[13048]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[13487]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[13072]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[13511]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[13088]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[13527]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[13106]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[13545]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[13148]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[13587]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[13170]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[13609]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[13190]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[13629]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13231]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[13670]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13286]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[13725]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13304]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[13743]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13328]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[13767]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13346]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[13785]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13364]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[13803]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13418]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[13857]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13460]: Color4ub (offset 35) */
+ /* _mesa_function_pool[13899]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13477]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[13916]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13497]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[13936]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13526]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[13965]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13544]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[13983]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[13604]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[14043]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[13623]: Indexiv (offset 49) */
+ /* _mesa_function_pool[14062]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[13636]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[14075]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[13654]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[14093]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[13698]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[14137]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[13758]: Frustum (offset 289) */
+ /* _mesa_function_pool[14197]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[13776]: GetString (offset 275) */
+ /* _mesa_function_pool[14215]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[13791]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[14230]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[13817]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[14256]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[13832]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[14271]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[13850]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[14289]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[13880]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[14319]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[13898]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[14337]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[13943]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[14382]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[13987]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[14426]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[14030]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[14469]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[14071]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[14510]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[14099]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[14538]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[14134]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[14573]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[14152]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[14591]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[14183]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14622]: DrawArraysInstanced (will be remapped) */
+ "iiii\0"
+ "glDrawArraysInstanced\0"
+ "glDrawArraysInstancedARB\0"
+ "glDrawArraysInstancedEXT\0"
+ "\0"
+ /* _mesa_function_pool[14700]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14217]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[14734]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14242]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[14759]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14298]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[14815]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14317]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[14834]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14333]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[14850]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14381]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[14898]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14427]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[14944]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14444]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[14961]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14471]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14988]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14498]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15015]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14535]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[15052]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[14555]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[15072]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[14576]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[15093]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[14603]: Rectd (offset 86) */
+ /* _mesa_function_pool[15120]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[14617]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[15134]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14643]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[15160]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[14680]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[15197]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[14727]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[15244]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[14746]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[15263]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[14791]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[15308]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14816]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[15333]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[14846]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[15363]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[14893]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[15410]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[14941]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[15458]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[14999]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[15516]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[15033]: Lightfv (offset 160) */
+ /* _mesa_function_pool[15550]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[15048]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[15565]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[15064]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[15581]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[15084]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[15601]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[15106]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[15623]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[15149]: Color4fv (offset 30) */
+ /* _mesa_function_pool[15666]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[15163]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[15680]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[15208]: ProgramLocalParameters4fvEXT (will be remapped) */
- "iiip\0"
- "glProgramLocalParameters4fvEXT\0"
+ /* _mesa_function_pool[15725]: DrawElementsInstanced (will be remapped) */
+ "iiipi\0"
+ "glDrawElementsInstanced\0"
+ "glDrawElementsInstancedARB\0"
+ "glDrawElementsInstancedEXT\0"
"\0"
- /* _mesa_function_pool[15245]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[15810]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15266]: Rects (offset 92) */
+ /* _mesa_function_pool[15831]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15280]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15845]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15314]: Lightiv (offset 162) */
+ /* _mesa_function_pool[15879]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15329]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[15894]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15373]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[15938]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[15421]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[15986]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[15446]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[16011]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[15470]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[16035]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[15515]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[16080]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[15558]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[16123]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[15584]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[16149]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[15610]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[16175]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[15628]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[16193]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[15671]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[16236]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[15725]: Rectdv (offset 87) */
+ /* _mesa_function_pool[16290]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[15738]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[16303]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[15764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[16329]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15823]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[16388]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[15851]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[16416]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[15896]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[16461]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[15923]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[16488]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[15950]: Materialiv (offset 172) */
+ /* _mesa_function_pool[16515]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[15968]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[16533]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[15990]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[16555]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[16025]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16590]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16071]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[16636]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[16124]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[16689]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[16170]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[16735]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[16188]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[16753]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16252]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[16817]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16279]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[16844]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16306]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[16871]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16334]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[16899]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16372]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[16937]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16390]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[16955]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[16414]: TexGeni (offset 192) */
+ /* _mesa_function_pool[16979]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[16429]: TexGenf (offset 190) */
+ /* _mesa_function_pool[16994]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[16444]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[17009]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[16477]: TexGend (offset 188) */
+ /* _mesa_function_pool[17042]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[16492]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[17057]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[16519]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[17084]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[16542]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[17107]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[16561]: GetVertexAttribfvNV (will be remapped) */
- "iip\0"
- "glGetVertexAttribfvNV\0"
+ /* _mesa_function_pool[17126]: BindBufferOffsetEXT (will be remapped) */
+ "iiii\0"
+ "glBindBufferOffsetEXT\0"
"\0"
- /* _mesa_function_pool[16588]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[17154]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[16642]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[17208]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[16666]: VertexAttribs1fvNV (will be remapped) */
- "iip\0"
- "glVertexAttribs1fvNV\0"
+ /* _mesa_function_pool[17232]: DisableIndexedEXT (will be remapped) */
+ "ii\0"
+ "glDisableIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[17256]: BindBufferBaseEXT (will be remapped) */
+ "iii\0"
+ "glBindBufferBaseEXT\0"
+ "glBindBufferBase\0"
"\0"
- /* _mesa_function_pool[16692]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[17298]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16721]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[17327]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[16745]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[17351]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[16792]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[17398]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[16842]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[17448]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[16863]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[17469]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[16890]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[17496]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[16924]: Color4sv (offset 34) */
+ /* _mesa_function_pool[17530]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[16938]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[17544]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[16968]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[17574]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[17000]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[17606]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[17035]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[17641]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[17051]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[17657]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[17084]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[17690]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[17142]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[17748]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[17198]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[17804]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17228]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[17834]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17248]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[17854]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17267]: Color3dv (offset 12) */
+ /* _mesa_function_pool[17873]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17281]: IsTexture (offset 330) */
+ /* _mesa_function_pool[17887]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17311]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[17917]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17334]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[17940]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[17375]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[17981]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[17410]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[18016]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[17429]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[18035]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[17468]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[18074]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[17498]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[18104]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[17530]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[18136]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[17559]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[18165]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[17575]: ObjectPurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[18181]: ObjectPurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectPurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[17603]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[18209]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[17645]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[18251]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[17663]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[18269]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[17689]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[18295]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17738]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[18344]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[17756]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[18362]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[17801]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[18407]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[17835]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[18441]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[17859]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[18465]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[17898]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[18504]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[17927]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[18533]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[17945]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[18551]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[17988]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[18594]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[18008]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[18614]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[18076]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[18682]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[18131]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[18737]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[18169]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[18775]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[18203]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[18809]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18251]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[18857]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18279]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[18885]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18332]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[18938]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18353]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[18959]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[18380]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[18986]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[18412]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[19018]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[18436]: ReplacementCodeusSUN (dynamic) */
- "i\0"
- "glReplacementCodeusSUN\0"
+ /* _mesa_function_pool[19042]: TransformFeedbackVaryingsEXT (will be remapped) */
+ "iipi\0"
+ "glTransformFeedbackVaryingsEXT\0"
+ "glTransformFeedbackVaryings\0"
"\0"
- /* _mesa_function_pool[18462]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[19107]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[18484]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[19129]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[18502]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[19147]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[18525]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[19170]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[18552]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[19197]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[18602]: Color3s (offset 17) */
+ /* _mesa_function_pool[19247]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[18617]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[19262]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[18651]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[19296]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[18704]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[19349]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[18723]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[19368]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[18747]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[19392]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[18791]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[19436]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[18814]: Color3i (offset 15) */
+ /* _mesa_function_pool[19459]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[18829]: FrontFace (offset 157) */
+ /* _mesa_function_pool[19474]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[18844]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[19489]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[18862]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[19507]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[18910]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[19555]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[18928]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[19573]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[18971]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[19616]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[19021]: Color3b (offset 9) */
+ /* _mesa_function_pool[19666]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[19036]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[19681]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[19080]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[19725]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[19104]: Color3f (offset 13) */
+ /* _mesa_function_pool[19749]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[19119]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[19764]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[19139]: Color3d (offset 11) */
+ /* _mesa_function_pool[19784]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[19154]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[19799]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[19169]: Lightf (offset 159) */
+ /* _mesa_function_pool[19814]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[19183]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[19828]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[19209]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[19854]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[19225]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[19870]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[19246]: Lighti (offset 161) */
+ /* _mesa_function_pool[19891]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19260]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[19905]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19291]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[19936]: ProgramLocalParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramLocalParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[19973]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[19320]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[20002]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[19405]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[20087]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[19440]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[20122]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[19485]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[20167]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[19520]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[20202]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[19537]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[20219]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[19554]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[20236]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[19571]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20253]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[19614]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[20296]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[19645]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[20327]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[19700]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[20382]: VertexAttrib3sNV (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3sNV\0"
+ "\0"
+ /* _mesa_function_pool[20407]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[19726]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[20433]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[19771]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[20478]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[19798]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[20505]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[19820]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[20527]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[19847]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[20554]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[19876]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[20583]: ReplacementCodeusSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeusSUN\0"
+ "\0"
+ /* _mesa_function_pool[20609]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[19899]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[20632]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[19918]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[20651]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[19945]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[20678]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[19963]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[20696]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[20008]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[20741]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[20051]: ClearColor (offset 206) */
+ /* _mesa_function_pool[20784]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[20070]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[20803]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[20089]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[20822]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20138]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[20871]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[20165]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[20898]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
"\0"
- /* _mesa_function_pool[20191]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[20924]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[20207]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[20940]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[20255]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[20988]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[20275]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[21008]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[20323]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[21056]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[20347]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21080]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20388]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[21121]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[20420]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[21153]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[20438]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[21171]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[20530]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[21263]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[20561]: Bitmap (offset 8) */
+ /* _mesa_function_pool[21294]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[20579]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[21312]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[20624]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[21357]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[20655]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[21388]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[20691]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[21424]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20734]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[21467]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[20766]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[21499]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[20781]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[21514]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[20799]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[21532]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[20839]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[21572]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[20866]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[21599]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[20885]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[21618]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[20933]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[21666]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[20968]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[21701]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[20995]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[21728]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[21019]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[21752]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[21053]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[21786]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[21105]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[21838]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[21124]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[21857]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[21155]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[21888]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[21193]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[21926]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[21236]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[21969]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[21256]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21989]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21327]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[22060]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[21349]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[22082]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[21369]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[22102]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[21423]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[22156]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[21476]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
- "ppp\0"
- "glReplacementCodeuiColor4ubVertex3fvSUN\0"
+ /* _mesa_function_pool[22209]: ProgramParameteriARB (will be remapped) */
+ "iii\0"
+ "glProgramParameteriARB\0"
"\0"
- /* _mesa_function_pool[21521]: Map1d (offset 220) */
+ /* _mesa_function_pool[22237]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[21537]: Map1f (offset 221) */
+ /* _mesa_function_pool[22253]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[21553]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[22269]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[21612]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[22328]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[21648]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[22364]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[21672]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[22388]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[21693]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[22409]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[21724]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[22440]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[21763]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[22479]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[21785]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[22501]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21839]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[22555]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[21860]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[22576]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[21906]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[22622]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[21921]: Fogiv (offset 156) */
+ /* _mesa_function_pool[22637]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[21933]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[22649]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[21950]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[22666]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[21986]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[22702]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[22007]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[22723]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[22034]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[22750]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[22058]: Rotatef (offset 300) */
+ /* _mesa_function_pool[22774]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[22074]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[22790]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[22116]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[22832]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[22132]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[22848]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[22148]: Clear (offset 203) */
+ /* _mesa_function_pool[22864]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[22159]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[22875]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[22175]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[22891]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[22202]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[22918]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[22236]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[22952]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[22252]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[22968]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[22308]: Ortho (offset 296) */
+ /* _mesa_function_pool[23024]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[22324]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[23040]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[22345]: ListBase (offset 6) */
+ /* _mesa_function_pool[23061]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[22359]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[23075]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[22375]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[23091]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[22431]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[23147]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22523]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[23239]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[22580]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[23296]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[22596]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[23312]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[22622]: Rectiv (offset 91) */
+ /* _mesa_function_pool[23338]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[22635]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[23351]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[22673]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[23389]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[22700]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[23416]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
"\0"
- /* _mesa_function_pool[22727]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[23443]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[22750]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[23466]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[22769]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[23485]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[22788]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[23504]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[22808]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[23524]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[22854]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[23570]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[22869]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[23585]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[22914]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[23630]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[22959]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[23675]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[23005]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[23721]: FramebufferTextureFaceARB (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTextureFaceARB\0"
+ "\0"
+ /* _mesa_function_pool[23756]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[23020]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[23771]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[23068]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[23819]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[23103]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[23854]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[23146]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[23897]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[23163]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[23914]: PauseTransformFeedback (will be remapped) */
+ "\0"
+ "glPauseTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[23941]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[23206]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23984]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[23253]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[24031]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[23341]: DisableIndexedEXT (will be remapped) */
- "ii\0"
- "glDisableIndexedEXT\0"
+ /* _mesa_function_pool[24119]: VertexAttribs1fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[23365]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[24145]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[23410]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[24190]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[23442]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[24222]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[23457]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[24237]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[23483]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[24263]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[23508]: LineWidth (offset 168) */
+ /* _mesa_function_pool[24288]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[23523]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[24303]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[23554]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[24334]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[23592]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[24372]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[23612]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[24392]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[23633]: TexGendv (offset 189) */
+ /* _mesa_function_pool[24413]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[23649]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[24429]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
"\0"
- /* _mesa_function_pool[23672]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[24452]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[23697]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[24477]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[23718]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[24498]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[23752]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[24532]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[23779]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[24559]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[23802]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[24582]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[23828]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[24608]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[23892]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[24672]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[23918]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[24698]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[23962]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[24742]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[23993]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[24773]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[24030]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[24810]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[24051]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[24831]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[24073]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[24853]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[24094]: CallList (offset 2) */
+ /* _mesa_function_pool[24874]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[24108]: Materialfv (offset 170) */
+ /* _mesa_function_pool[24888]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[24126]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[24906]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[24143]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[24923]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[24175]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[24955]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[24220]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[25000]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[24268]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[25048]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[24313]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[25093]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24331]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[25111]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[24384]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[25164]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[24415]: Color3iv (offset 16) */
+ /* _mesa_function_pool[25195]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[24429]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[25209]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[24463]: DrawElements (offset 311) */
+ /* _mesa_function_pool[25243]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[24484]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[25264]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[24510]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[25290]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[24547]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[25327]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24607]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[25387]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[24650]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[25430]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[24705]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[25485]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[24728]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[25508]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[24801]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[25581]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[24824]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[25604]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[24855]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[25635]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24892]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[25672]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[24909]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[25689]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[24925]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[25705]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[24945]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[25725]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[24959]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[25739]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[24978]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[25758]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24998]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[25778]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[25047]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[25827]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[25093]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[25873]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[25112]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[25892]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[25138]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[25918]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[25181]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[25961]: IsTransformFeedback (will be remapped) */
+ "i\0"
+ "glIsTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[25986]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[25226]: Map2d (offset 222) */
+ /* _mesa_function_pool[26031]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[25246]: Map2f (offset 223) */
+ /* _mesa_function_pool[26051]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[25266]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[26071]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[25291]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[26096]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[25308]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[26113]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[25337]: VertexAttrib3sNV (will be remapped) */
- "iiii\0"
- "glVertexAttrib3sNV\0"
+ /* _mesa_function_pool[26142]: FragmentLightModelivSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelivSGIX\0"
"\0"
- /* _mesa_function_pool[25362]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[26173]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[25385]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[26196]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[25402]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[26213]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[25419]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[26230]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[25436]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[26247]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[25454]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[26265]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[25480]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[26291]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[25536]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[26347]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[25555]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[26366]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[25572]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[26383]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[25603]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[26414]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[25643]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[26454]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[25669]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[26480]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[25700]: Materialf (offset 169) */
+ /* _mesa_function_pool[26511]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[25717]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[26528]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[25762]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[26573]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[25787]: Materiali (offset 171) */
+ /* _mesa_function_pool[26598]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[25804]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[26615]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[25830]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[26641]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[25865]: Indexsv (offset 51) */
+ /* _mesa_function_pool[26676]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[25878]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[26689]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[25923]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[26734]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[25942]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[26753]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[25959]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[26770]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[25992]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[26803]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[26010]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[26821]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[26047]: Translated (offset 303) */
+ /* _mesa_function_pool[26858]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[26065]: Translatef (offset 304) */
+ /* _mesa_function_pool[26876]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[26083]: StencilMask (offset 209) */
+ /* _mesa_function_pool[26894]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[26100]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[26911]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[26120]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[26931]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[26138]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[26949]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[26164]: IsList (offset 287) */
+ /* _mesa_function_pool[26975]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[26176]: IsSync (will be remapped) */
+ /* _mesa_function_pool[26987]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[26188]: RenderMode (offset 196) */
+ /* _mesa_function_pool[26999]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[26204]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[27015]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[26237]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[27048]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[26289]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[27100]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[26326]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[27137]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[26354]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[27165]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[26396]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[27207]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[26439]: LoadName (offset 198) */
+ /* _mesa_function_pool[27250]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[26453]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[27264]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[26480]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[27291]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[26498]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[27309]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[26532]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[27343]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[26583]: CullFace (offset 152) */
+ /* _mesa_function_pool[27394]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[26597]: BindTexture (offset 307) */
+ /* _mesa_function_pool[27408]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[26632]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[27443]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[26659]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[27470]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[26705]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[27516]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[26731]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[27542]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[26750]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[27561]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[26770]: Rectsv (offset 93) */
+ /* _mesa_function_pool[27581]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[26783]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[27594]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[26810]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[27621]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[26868]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[27679]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26894]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[27705]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[26957]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[27768]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[27012]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[27823]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[27039]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[27850]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[27060]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[27871]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[27082]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[27893]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[27110]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[27921]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[27134]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[27945]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[27179]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[27990]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[27198]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[28009]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[27225]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[28036]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[27241]: Recti (offset 90) */
+ /* _mesa_function_pool[28052]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[27255]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[28066]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[27294]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[28105]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[27323]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[28134]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[27362]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[28173]: PixelTransformParameterfvEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[28209]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[27384]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[28231]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[27405]: Rectf (offset 88) */
+ /* _mesa_function_pool[28252]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[27419]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[28266]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[27442]: Indexfv (offset 47) */
+ /* _mesa_function_pool[28289]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[27455]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[28302]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[27501]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[28348]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[27553]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[28400]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[27588]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[28435]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[27608]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[28455]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[27635]: IndexMask (offset 212) */
+ /* _mesa_function_pool[28482]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[27650]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[28497]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[27687]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[28534]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[27730]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[28577]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[27746]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[28593]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[27772]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[28619]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[27791]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[28638]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[27813]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[28660]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[27832]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[28679]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[27849]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[28696]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27876]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[28723]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[27890]: Fogfv (offset 154) */
+ /* _mesa_function_pool[28737]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[27902]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[28749]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[27936]: InitNames (offset 197) */
+ /* _mesa_function_pool[28783]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[27950]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[28797]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[27965]: Minmax (offset 368) */
+ /* _mesa_function_pool[28812]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[27991]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[28838]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[28010]: DeformationMap3dSGIX (dynamic) */
+ /* _mesa_function_pool[28857]: DeformationMap3dSGIX (dynamic) */
"iddiiddiiddiip\0"
"glDeformationMap3dSGIX\0"
"\0"
- /* _mesa_function_pool[28049]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[28896]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[28068]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[28915]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[28100]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[28947]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[28122]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[28969]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[28152]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[28999]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[28172]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[29019]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[28190]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[29037]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[28227]: Hint (offset 158) */
+ /* _mesa_function_pool[29074]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[28238]: Color4dv (offset 28) */
+ /* _mesa_function_pool[29085]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[28252]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[29099]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[28295]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[29142]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[28324]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[29171]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[28379]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[29226]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[28429]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[29276]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[28447]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[29294]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[28498]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[29345]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[28545]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[29392]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[28569]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[29416]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[28600]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[29447]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[28615]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[29462]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[28650]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[29497]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[28667]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[29514]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[28687]: Begin (offset 7) */
+ /* _mesa_function_pool[29534]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[28698]: LightModeli (offset 165) */
+ /* _mesa_function_pool[29545]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[28716]: Rectfv (offset 89) */
+ /* _mesa_function_pool[29563]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[28729]: LightModelf (offset 163) */
+ /* _mesa_function_pool[29576]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[28747]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[29594]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[28772]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[29619]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[28790]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[29637]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28826]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[29673]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[28852]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[29699]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[28875]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[29722]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[28914]: Disable (offset 214) */
+ /* _mesa_function_pool[29761]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[28927]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[29774]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[28972]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[29819]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[29038]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[29885]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[29066]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[29913]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[29093]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[29940]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[29127]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[29974]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[29146]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[29993]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[29188]: ColorMask (offset 210) */
+ /* _mesa_function_pool[30035]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[29206]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[30053]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[29231]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[30078]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[29250]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[30097]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[29280]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[30127]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[29313]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[30160]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[29335]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[30182]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[29353]: Enable (offset 215) */
+ /* _mesa_function_pool[30200]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[29365]: LineStipple (offset 167) */
+ /* _mesa_function_pool[30212]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[29383]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[30230]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[29409]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[30256]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[29439]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[30286]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[29466]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[30313]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[29520]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[30367]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[29563]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[30410]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[29596]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[30443]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[29622]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[30469]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[29637]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[30484]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[29668]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[30515]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[29689]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[30536]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[29719]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[30566]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[29759]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[30606]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[29796]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[30643]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[29820]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[30667]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29845]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[30692]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[29866]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[30713]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4381,410 +4467,426 @@ static const char _mesa_function_pool[] =
;
/* these functions need to be remapped */
-static const struct {
- GLint pool_index;
- GLint remap_index;
-} MESA_remap_table_functions[] = {
+static const struct gl_function_pool_remap MESA_remap_table_functions[] = {
{ 1461, AttachShader_remap_index },
- { 8794, CreateProgram_remap_index },
- { 20420, CreateShader_remap_index },
- { 22750, DeleteProgram_remap_index },
- { 16372, DeleteShader_remap_index },
- { 20866, DetachShader_remap_index },
- { 15896, GetAttachedShaders_remap_index },
+ { 8995, CreateProgram_remap_index },
+ { 21153, CreateShader_remap_index },
+ { 23466, DeleteProgram_remap_index },
+ { 16937, DeleteShader_remap_index },
+ { 21599, DetachShader_remap_index },
+ { 16461, GetAttachedShaders_remap_index },
{ 4275, GetProgramInfoLog_remap_index },
{ 361, GetProgramiv_remap_index },
- { 5608, GetShaderInfoLog_remap_index },
- { 27772, GetShaderiv_remap_index },
- { 11879, IsProgram_remap_index },
- { 10914, IsShader_remap_index },
- { 8898, StencilFuncSeparate_remap_index },
+ { 5721, GetShaderInfoLog_remap_index },
+ { 28619, GetShaderiv_remap_index },
+ { 12198, IsProgram_remap_index },
+ { 11197, IsShader_remap_index },
+ { 9099, StencilFuncSeparate_remap_index },
{ 3487, StencilMaskSeparate_remap_index },
- { 6684, StencilOpSeparate_remap_index },
- { 19771, UniformMatrix2x3fv_remap_index },
+ { 6803, StencilOpSeparate_remap_index },
+ { 20478, UniformMatrix2x3fv_remap_index },
{ 2615, UniformMatrix2x4fv_remap_index },
- { 29439, UniformMatrix3x2fv_remap_index },
- { 27198, UniformMatrix3x4fv_remap_index },
- { 14444, UniformMatrix4x2fv_remap_index },
+ { 30286, UniformMatrix3x2fv_remap_index },
+ { 28009, UniformMatrix3x4fv_remap_index },
+ { 14961, UniformMatrix4x2fv_remap_index },
{ 2937, UniformMatrix4x3fv_remap_index },
- { 8812, LoadTransposeMatrixdARB_remap_index },
- { 27501, LoadTransposeMatrixfARB_remap_index },
- { 4848, MultTransposeMatrixdARB_remap_index },
- { 21053, MultTransposeMatrixfARB_remap_index },
+ { 14622, DrawArraysInstanced_remap_index },
+ { 15725, DrawElementsInstanced_remap_index },
+ { 9013, LoadTransposeMatrixdARB_remap_index },
+ { 28348, LoadTransposeMatrixfARB_remap_index },
+ { 4904, MultTransposeMatrixdARB_remap_index },
+ { 21786, MultTransposeMatrixfARB_remap_index },
{ 172, SampleCoverageARB_remap_index },
- { 5032, CompressedTexImage1DARB_remap_index },
- { 21553, CompressedTexImage2DARB_remap_index },
+ { 5117, CompressedTexImage1DARB_remap_index },
+ { 22269, CompressedTexImage2DARB_remap_index },
{ 3550, CompressedTexImage3DARB_remap_index },
- { 16188, CompressedTexSubImage1DARB_remap_index },
+ { 16753, CompressedTexSubImage1DARB_remap_index },
{ 1880, CompressedTexSubImage2DARB_remap_index },
- { 18008, CompressedTexSubImage3DARB_remap_index },
- { 25480, GetCompressedTexImageARB_remap_index },
+ { 18614, CompressedTexSubImage3DARB_remap_index },
+ { 26291, GetCompressedTexImageARB_remap_index },
{ 3395, DisableVertexAttribArrayARB_remap_index },
- { 26810, EnableVertexAttribArrayARB_remap_index },
- { 28615, GetProgramEnvParameterdvARB_remap_index },
- { 20933, GetProgramEnvParameterfvARB_remap_index },
- { 24510, GetProgramLocalParameterdvARB_remap_index },
- { 7126, GetProgramLocalParameterfvARB_remap_index },
- { 16279, GetProgramStringARB_remap_index },
- { 24705, GetProgramivARB_remap_index },
- { 18203, GetVertexAttribdvARB_remap_index },
- { 14333, GetVertexAttribfvARB_remap_index },
- { 8707, GetVertexAttribivARB_remap_index },
- { 17084, ProgramEnvParameter4dARB_remap_index },
- { 22523, ProgramEnvParameter4dvARB_remap_index },
- { 14941, ProgramEnvParameter4fARB_remap_index },
- { 7989, ProgramEnvParameter4fvARB_remap_index },
+ { 27621, EnableVertexAttribArrayARB_remap_index },
+ { 29462, GetProgramEnvParameterdvARB_remap_index },
+ { 21666, GetProgramEnvParameterfvARB_remap_index },
+ { 25290, GetProgramLocalParameterdvARB_remap_index },
+ { 7245, GetProgramLocalParameterfvARB_remap_index },
+ { 16844, GetProgramStringARB_remap_index },
+ { 25485, GetProgramivARB_remap_index },
+ { 18809, GetVertexAttribdvARB_remap_index },
+ { 14850, GetVertexAttribfvARB_remap_index },
+ { 8908, GetVertexAttribivARB_remap_index },
+ { 17690, ProgramEnvParameter4dARB_remap_index },
+ { 23239, ProgramEnvParameter4dvARB_remap_index },
+ { 15458, ProgramEnvParameter4fARB_remap_index },
+ { 8108, ProgramEnvParameter4fvARB_remap_index },
{ 3513, ProgramLocalParameter4dARB_remap_index },
- { 11589, ProgramLocalParameter4dvARB_remap_index },
- { 26289, ProgramLocalParameter4fARB_remap_index },
- { 23068, ProgramLocalParameter4fvARB_remap_index },
- { 25266, ProgramStringARB_remap_index },
- { 17334, VertexAttrib1dARB_remap_index },
- { 13987, VertexAttrib1dvARB_remap_index },
+ { 11908, ProgramLocalParameter4dvARB_remap_index },
+ { 27100, ProgramLocalParameter4fARB_remap_index },
+ { 23819, ProgramLocalParameter4fvARB_remap_index },
+ { 26071, ProgramStringARB_remap_index },
+ { 17940, VertexAttrib1dARB_remap_index },
+ { 14426, VertexAttrib1dvARB_remap_index },
{ 3688, VertexAttrib1fARB_remap_index },
- { 29520, VertexAttrib1fvARB_remap_index },
- { 6210, VertexAttrib1sARB_remap_index },
+ { 30367, VertexAttrib1fvARB_remap_index },
+ { 6329, VertexAttrib1sARB_remap_index },
{ 2054, VertexAttrib1svARB_remap_index },
- { 13418, VertexAttrib2dARB_remap_index },
- { 15515, VertexAttrib2dvARB_remap_index },
+ { 13857, VertexAttrib2dARB_remap_index },
+ { 16080, VertexAttrib2dvARB_remap_index },
{ 1480, VertexAttrib2fARB_remap_index },
- { 15628, VertexAttrib2fvARB_remap_index },
- { 29146, VertexAttrib2sARB_remap_index },
- { 28252, VertexAttrib2svARB_remap_index },
- { 10045, VertexAttrib3dARB_remap_index },
- { 7692, VertexAttrib3dvARB_remap_index },
+ { 16193, VertexAttrib2fvARB_remap_index },
+ { 29993, VertexAttrib2sARB_remap_index },
+ { 29099, VertexAttrib2svARB_remap_index },
+ { 10282, VertexAttrib3dARB_remap_index },
+ { 7811, VertexAttrib3dvARB_remap_index },
{ 1567, VertexAttrib3fARB_remap_index },
- { 20008, VertexAttrib3fvARB_remap_index },
- { 25138, VertexAttrib3sARB_remap_index },
- { 17945, VertexAttrib3svARB_remap_index },
+ { 20741, VertexAttrib3fvARB_remap_index },
+ { 25918, VertexAttrib3sARB_remap_index },
+ { 18551, VertexAttrib3svARB_remap_index },
{ 4301, VertexAttrib4NbvARB_remap_index },
- { 15851, VertexAttrib4NivARB_remap_index },
- { 19963, VertexAttrib4NsvARB_remap_index },
- { 20885, VertexAttrib4NubARB_remap_index },
- { 28498, VertexAttrib4NubvARB_remap_index },
- { 16745, VertexAttrib4NuivARB_remap_index },
+ { 16416, VertexAttrib4NivARB_remap_index },
+ { 20696, VertexAttrib4NsvARB_remap_index },
+ { 21618, VertexAttrib4NubARB_remap_index },
+ { 29345, VertexAttrib4NubvARB_remap_index },
+ { 17351, VertexAttrib4NuivARB_remap_index },
{ 2810, VertexAttrib4NusvARB_remap_index },
- { 9639, VertexAttrib4bvARB_remap_index },
- { 23918, VertexAttrib4dARB_remap_index },
- { 18928, VertexAttrib4dvARB_remap_index },
- { 10152, VertexAttrib4fARB_remap_index },
- { 10556, VertexAttrib4fvARB_remap_index },
- { 9091, VertexAttrib4ivARB_remap_index },
- { 15329, VertexAttrib4sARB_remap_index },
- { 27687, VertexAttrib4svARB_remap_index },
- { 14746, VertexAttrib4ubvARB_remap_index },
- { 27134, VertexAttrib4uivARB_remap_index },
- { 17756, VertexAttrib4usvARB_remap_index },
- { 19645, VertexAttribPointerARB_remap_index },
- { 29280, BindBufferARB_remap_index },
- { 5923, BufferDataARB_remap_index },
+ { 9876, VertexAttrib4bvARB_remap_index },
+ { 24698, VertexAttrib4dARB_remap_index },
+ { 19573, VertexAttrib4dvARB_remap_index },
+ { 10389, VertexAttrib4fARB_remap_index },
+ { 10793, VertexAttrib4fvARB_remap_index },
+ { 9292, VertexAttrib4ivARB_remap_index },
+ { 15894, VertexAttrib4sARB_remap_index },
+ { 28534, VertexAttrib4svARB_remap_index },
+ { 15263, VertexAttrib4ubvARB_remap_index },
+ { 27945, VertexAttrib4uivARB_remap_index },
+ { 18362, VertexAttrib4usvARB_remap_index },
+ { 20327, VertexAttribPointerARB_remap_index },
+ { 30127, BindBufferARB_remap_index },
+ { 6036, BufferDataARB_remap_index },
{ 1382, BufferSubDataARB_remap_index },
- { 27323, DeleteBuffersARB_remap_index },
- { 29563, GenBuffersARB_remap_index },
- { 15671, GetBufferParameterivARB_remap_index },
- { 14893, GetBufferPointervARB_remap_index },
+ { 28134, DeleteBuffersARB_remap_index },
+ { 30410, GenBuffersARB_remap_index },
+ { 16236, GetBufferParameterivARB_remap_index },
+ { 15410, GetBufferPointervARB_remap_index },
{ 1335, GetBufferSubDataARB_remap_index },
- { 27082, IsBufferARB_remap_index },
- { 23523, MapBufferARB_remap_index },
- { 27902, UnmapBufferARB_remap_index },
+ { 27893, IsBufferARB_remap_index },
+ { 24303, MapBufferARB_remap_index },
+ { 28749, UnmapBufferARB_remap_index },
{ 268, BeginQueryARB_remap_index },
- { 17429, DeleteQueriesARB_remap_index },
- { 10850, EndQueryARB_remap_index },
- { 25959, GenQueriesARB_remap_index },
+ { 18035, DeleteQueriesARB_remap_index },
+ { 11087, EndQueryARB_remap_index },
+ { 26770, GenQueriesARB_remap_index },
{ 1772, GetQueryObjectivARB_remap_index },
- { 15373, GetQueryObjectuivARB_remap_index },
+ { 15938, GetQueryObjectuivARB_remap_index },
{ 1624, GetQueryivARB_remap_index },
- { 17663, IsQueryARB_remap_index },
- { 7302, AttachObjectARB_remap_index },
- { 16334, CompileShaderARB_remap_index },
+ { 18269, IsQueryARB_remap_index },
+ { 7421, AttachObjectARB_remap_index },
+ { 16899, CompileShaderARB_remap_index },
{ 2879, CreateProgramObjectARB_remap_index },
- { 5868, CreateShaderObjectARB_remap_index },
- { 12835, DeleteObjectARB_remap_index },
- { 21327, DetachObjectARB_remap_index },
- { 10628, GetActiveUniformARB_remap_index },
- { 8410, GetAttachedObjectsARB_remap_index },
- { 8689, GetHandleARB_remap_index },
- { 29313, GetInfoLogARB_remap_index },
- { 28569, GetObjectParameterfvARB_remap_index },
- { 24384, GetObjectParameterivARB_remap_index },
- { 25717, GetShaderSourceARB_remap_index },
- { 24998, GetUniformLocationARB_remap_index },
- { 21155, GetUniformfvARB_remap_index },
- { 11211, GetUniformivARB_remap_index },
- { 17801, LinkProgramARB_remap_index },
- { 17859, ShaderSourceARB_remap_index },
- { 6584, Uniform1fARB_remap_index },
- { 26498, Uniform1fvARB_remap_index },
- { 19614, Uniform1iARB_remap_index },
- { 18617, Uniform1ivARB_remap_index },
+ { 5981, CreateShaderObjectARB_remap_index },
+ { 13274, DeleteObjectARB_remap_index },
+ { 22060, DetachObjectARB_remap_index },
+ { 10865, GetActiveUniformARB_remap_index },
+ { 8583, GetAttachedObjectsARB_remap_index },
+ { 8890, GetHandleARB_remap_index },
+ { 30160, GetInfoLogARB_remap_index },
+ { 29416, GetObjectParameterfvARB_remap_index },
+ { 25164, GetObjectParameterivARB_remap_index },
+ { 26528, GetShaderSourceARB_remap_index },
+ { 25778, GetUniformLocationARB_remap_index },
+ { 21888, GetUniformfvARB_remap_index },
+ { 11530, GetUniformivARB_remap_index },
+ { 18407, LinkProgramARB_remap_index },
+ { 18465, ShaderSourceARB_remap_index },
+ { 6703, Uniform1fARB_remap_index },
+ { 27309, Uniform1fvARB_remap_index },
+ { 20296, Uniform1iARB_remap_index },
+ { 19262, Uniform1ivARB_remap_index },
{ 2003, Uniform2fARB_remap_index },
- { 12671, Uniform2fvARB_remap_index },
- { 23410, Uniform2iARB_remap_index },
+ { 13110, Uniform2fvARB_remap_index },
+ { 24190, Uniform2iARB_remap_index },
{ 2123, Uniform2ivARB_remap_index },
- { 16444, Uniform3fARB_remap_index },
- { 8440, Uniform3fvARB_remap_index },
- { 5542, Uniform3iARB_remap_index },
- { 14999, Uniform3ivARB_remap_index },
- { 16890, Uniform4fARB_remap_index },
- { 21019, Uniform4fvARB_remap_index },
- { 22202, Uniform4iARB_remap_index },
- { 18169, Uniform4ivARB_remap_index },
- { 7354, UniformMatrix2fvARB_remap_index },
+ { 17009, Uniform3fARB_remap_index },
+ { 8613, Uniform3fvARB_remap_index },
+ { 5627, Uniform3iARB_remap_index },
+ { 15516, Uniform3ivARB_remap_index },
+ { 17496, Uniform4fARB_remap_index },
+ { 21752, Uniform4fvARB_remap_index },
+ { 22918, Uniform4iARB_remap_index },
+ { 18775, Uniform4ivARB_remap_index },
+ { 7473, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
{ 2475, UniformMatrix4fvARB_remap_index },
- { 22635, UseProgramObjectARB_remap_index },
- { 13106, ValidateProgramARB_remap_index },
- { 18971, BindAttribLocationARB_remap_index },
+ { 23351, UseProgramObjectARB_remap_index },
+ { 13545, ValidateProgramARB_remap_index },
+ { 19616, BindAttribLocationARB_remap_index },
{ 4346, GetActiveAttribARB_remap_index },
- { 14680, GetAttribLocationARB_remap_index },
- { 26237, DrawBuffersARB_remap_index },
- { 11694, RenderbufferStorageMultisample_remap_index },
- { 16938, FlushMappedBufferRange_remap_index },
- { 24801, MapBufferRange_remap_index },
- { 14555, BindVertexArray_remap_index },
- { 12965, GenVertexArrays_remap_index },
- { 27012, CopyBufferSubData_remap_index },
- { 27791, ClientWaitSync_remap_index },
+ { 15197, GetAttribLocationARB_remap_index },
+ { 27048, DrawBuffersARB_remap_index },
+ { 12013, RenderbufferStorageMultisample_remap_index },
+ { 12417, FramebufferTextureARB_remap_index },
+ { 23721, FramebufferTextureFaceARB_remap_index },
+ { 22209, ProgramParameteriARB_remap_index },
+ { 17544, FlushMappedBufferRange_remap_index },
+ { 25581, MapBufferRange_remap_index },
+ { 15072, BindVertexArray_remap_index },
+ { 13404, GenVertexArrays_remap_index },
+ { 27823, CopyBufferSubData_remap_index },
+ { 28638, ClientWaitSync_remap_index },
{ 2394, DeleteSync_remap_index },
- { 6251, FenceSync_remap_index },
- { 13477, GetInteger64v_remap_index },
- { 20070, GetSynciv_remap_index },
- { 26176, IsSync_remap_index },
- { 8358, WaitSync_remap_index },
+ { 6370, FenceSync_remap_index },
+ { 13916, GetInteger64v_remap_index },
+ { 20803, GetSynciv_remap_index },
+ { 26987, IsSync_remap_index },
+ { 8531, WaitSync_remap_index },
{ 3363, DrawElementsBaseVertex_remap_index },
- { 27255, DrawRangeElementsBaseVertex_remap_index },
- { 23554, MultiDrawElementsBaseVertex_remap_index },
- { 4711, PolygonOffsetEXT_remap_index },
- { 20655, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 28066, DrawRangeElementsBaseVertex_remap_index },
+ { 24334, MultiDrawElementsBaseVertex_remap_index },
+ { 4480, BindTransformFeedback_remap_index },
+ { 2906, DeleteTransformFeedbacks_remap_index },
+ { 5660, DrawTransformFeedback_remap_index },
+ { 8750, GenTransformFeedbacks_remap_index },
+ { 25961, IsTransformFeedback_remap_index },
+ { 23914, PauseTransformFeedback_remap_index },
+ { 4824, ResumeTransformFeedback_remap_index },
+ { 4739, PolygonOffsetEXT_remap_index },
+ { 21388, GetPixelTexGenParameterfvSGIS_remap_index },
{ 3895, GetPixelTexGenParameterivSGIS_remap_index },
- { 20388, PixelTexGenParameterfSGIS_remap_index },
+ { 21121, PixelTexGenParameterfSGIS_remap_index },
{ 580, PixelTexGenParameterfvSGIS_remap_index },
- { 11249, PixelTexGenParameteriSGIS_remap_index },
- { 12242, PixelTexGenParameterivSGIS_remap_index },
- { 14643, SampleMaskSGIS_remap_index },
- { 17603, SamplePatternSGIS_remap_index },
- { 23483, ColorPointerEXT_remap_index },
- { 15558, EdgeFlagPointerEXT_remap_index },
- { 5196, IndexPointerEXT_remap_index },
- { 5276, NormalPointerEXT_remap_index },
- { 14071, TexCoordPointerEXT_remap_index },
- { 6046, VertexPointerEXT_remap_index },
+ { 11568, PixelTexGenParameteriSGIS_remap_index },
+ { 12591, PixelTexGenParameterivSGIS_remap_index },
+ { 15160, SampleMaskSGIS_remap_index },
+ { 18209, SamplePatternSGIS_remap_index },
+ { 24263, ColorPointerEXT_remap_index },
+ { 16123, EdgeFlagPointerEXT_remap_index },
+ { 5281, IndexPointerEXT_remap_index },
+ { 5361, NormalPointerEXT_remap_index },
+ { 14510, TexCoordPointerEXT_remap_index },
+ { 6159, VertexPointerEXT_remap_index },
{ 3165, PointParameterfEXT_remap_index },
- { 6891, PointParameterfvEXT_remap_index },
- { 28667, LockArraysEXT_remap_index },
- { 13170, UnlockArraysEXT_remap_index },
- { 7898, CullParameterdvEXT_remap_index },
- { 10423, CullParameterfvEXT_remap_index },
+ { 7010, PointParameterfvEXT_remap_index },
+ { 29514, LockArraysEXT_remap_index },
+ { 13609, UnlockArraysEXT_remap_index },
+ { 8017, CullParameterdvEXT_remap_index },
+ { 10660, CullParameterfvEXT_remap_index },
{ 1151, SecondaryColor3bEXT_remap_index },
- { 7050, SecondaryColor3bvEXT_remap_index },
- { 9268, SecondaryColor3dEXT_remap_index },
- { 22808, SecondaryColor3dvEXT_remap_index },
- { 25047, SecondaryColor3fEXT_remap_index },
- { 16124, SecondaryColor3fvEXT_remap_index },
+ { 7169, SecondaryColor3bvEXT_remap_index },
+ { 9469, SecondaryColor3dEXT_remap_index },
+ { 23524, SecondaryColor3dvEXT_remap_index },
+ { 25827, SecondaryColor3fEXT_remap_index },
+ { 16689, SecondaryColor3fvEXT_remap_index },
{ 426, SecondaryColor3iEXT_remap_index },
- { 14381, SecondaryColor3ivEXT_remap_index },
- { 8926, SecondaryColor3sEXT_remap_index },
- { 27455, SecondaryColor3svEXT_remap_index },
- { 24220, SecondaryColor3ubEXT_remap_index },
- { 18862, SecondaryColor3ubvEXT_remap_index },
- { 11444, SecondaryColor3uiEXT_remap_index },
- { 20275, SecondaryColor3uivEXT_remap_index },
- { 23020, SecondaryColor3usEXT_remap_index },
- { 11517, SecondaryColor3usvEXT_remap_index },
- { 10499, SecondaryColorPointerEXT_remap_index },
- { 22869, MultiDrawArraysEXT_remap_index },
- { 18552, MultiDrawElementsEXT_remap_index },
- { 18747, FogCoordPointerEXT_remap_index },
+ { 14898, SecondaryColor3ivEXT_remap_index },
+ { 9127, SecondaryColor3sEXT_remap_index },
+ { 28302, SecondaryColor3svEXT_remap_index },
+ { 25000, SecondaryColor3ubEXT_remap_index },
+ { 19507, SecondaryColor3ubvEXT_remap_index },
+ { 11763, SecondaryColor3uiEXT_remap_index },
+ { 21008, SecondaryColor3uivEXT_remap_index },
+ { 23771, SecondaryColor3usEXT_remap_index },
+ { 11836, SecondaryColor3usvEXT_remap_index },
+ { 10736, SecondaryColorPointerEXT_remap_index },
+ { 23585, MultiDrawArraysEXT_remap_index },
+ { 19197, MultiDrawElementsEXT_remap_index },
+ { 19392, FogCoordPointerEXT_remap_index },
{ 4044, FogCoorddEXT_remap_index },
- { 28068, FogCoorddvEXT_remap_index },
+ { 28915, FogCoorddvEXT_remap_index },
{ 4136, FogCoordfEXT_remap_index },
- { 24143, FogCoordfvEXT_remap_index },
- { 16842, PixelTexGenSGIX_remap_index },
- { 24728, BlendFuncSeparateEXT_remap_index },
- { 5958, FlushVertexArrayRangeNV_remap_index },
- { 4660, VertexArrayRangeNV_remap_index },
- { 25112, CombinerInputNV_remap_index },
+ { 24923, FogCoordfvEXT_remap_index },
+ { 17448, PixelTexGenSGIX_remap_index },
+ { 25508, BlendFuncSeparateEXT_remap_index },
+ { 6071, FlushVertexArrayRangeNV_remap_index },
+ { 4688, VertexArrayRangeNV_remap_index },
+ { 25892, CombinerInputNV_remap_index },
{ 1946, CombinerOutputNV_remap_index },
- { 27608, CombinerParameterfNV_remap_index },
- { 4580, CombinerParameterfvNV_remap_index },
- { 19820, CombinerParameteriNV_remap_index },
- { 29038, CombinerParameterivNV_remap_index },
- { 6328, FinalCombinerInputNV_remap_index },
- { 8755, GetCombinerInputParameterfvNV_remap_index },
- { 28875, GetCombinerInputParameterivNV_remap_index },
- { 6127, GetCombinerOutputParameterfvNV_remap_index },
- { 12171, GetCombinerOutputParameterivNV_remap_index },
- { 5703, GetFinalCombinerInputParameterfvNV_remap_index },
- { 22074, GetFinalCombinerInputParameterivNV_remap_index },
- { 11189, ResizeBuffersMESA_remap_index },
- { 9872, WindowPos2dMESA_remap_index },
+ { 28455, CombinerParameterfNV_remap_index },
+ { 4608, CombinerParameterfvNV_remap_index },
+ { 20527, CombinerParameteriNV_remap_index },
+ { 29885, CombinerParameterivNV_remap_index },
+ { 6447, FinalCombinerInputNV_remap_index },
+ { 8956, GetCombinerInputParameterfvNV_remap_index },
+ { 29722, GetCombinerInputParameterivNV_remap_index },
+ { 12692, GetCombinerOutputParameterfvNV_remap_index },
+ { 12520, GetCombinerOutputParameterivNV_remap_index },
+ { 5816, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 22790, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11508, ResizeBuffersMESA_remap_index },
+ { 10109, WindowPos2dMESA_remap_index },
{ 944, WindowPos2dvMESA_remap_index },
- { 29866, WindowPos2fMESA_remap_index },
- { 6995, WindowPos2fvMESA_remap_index },
- { 16071, WindowPos2iMESA_remap_index },
- { 18076, WindowPos2ivMESA_remap_index },
- { 18651, WindowPos2sMESA_remap_index },
- { 4946, WindowPos2svMESA_remap_index },
- { 6820, WindowPos3dMESA_remap_index },
- { 12450, WindowPos3dvMESA_remap_index },
+ { 30713, WindowPos2fMESA_remap_index },
+ { 7114, WindowPos2fvMESA_remap_index },
+ { 16636, WindowPos2iMESA_remap_index },
+ { 18682, WindowPos2ivMESA_remap_index },
+ { 19296, WindowPos2sMESA_remap_index },
+ { 5031, WindowPos2svMESA_remap_index },
+ { 6939, WindowPos3dMESA_remap_index },
+ { 12838, WindowPos3dvMESA_remap_index },
{ 472, WindowPos3fMESA_remap_index },
- { 13231, WindowPos3fvMESA_remap_index },
- { 21369, WindowPos3iMESA_remap_index },
- { 26957, WindowPos3ivMESA_remap_index },
- { 16588, WindowPos3sMESA_remap_index },
- { 28324, WindowPos3svMESA_remap_index },
- { 9823, WindowPos4dMESA_remap_index },
- { 15084, WindowPos4dvMESA_remap_index },
- { 12409, WindowPos4fMESA_remap_index },
- { 27362, WindowPos4fvMESA_remap_index },
- { 27110, WindowPos4iMESA_remap_index },
- { 11028, WindowPos4ivMESA_remap_index },
- { 16721, WindowPos4sMESA_remap_index },
+ { 13670, WindowPos3fvMESA_remap_index },
+ { 22102, WindowPos3iMESA_remap_index },
+ { 27768, WindowPos3ivMESA_remap_index },
+ { 17154, WindowPos3sMESA_remap_index },
+ { 29171, WindowPos3svMESA_remap_index },
+ { 10060, WindowPos4dMESA_remap_index },
+ { 15601, WindowPos4dvMESA_remap_index },
+ { 12797, WindowPos4fMESA_remap_index },
+ { 28209, WindowPos4fvMESA_remap_index },
+ { 27921, WindowPos4iMESA_remap_index },
+ { 11311, WindowPos4ivMESA_remap_index },
+ { 17327, WindowPos4sMESA_remap_index },
{ 2857, WindowPos4svMESA_remap_index },
- { 12210, MultiModeDrawArraysIBM_remap_index },
- { 25830, MultiModeDrawElementsIBM_remap_index },
- { 10878, DeleteFencesNV_remap_index },
- { 24959, FinishFenceNV_remap_index },
+ { 12559, MultiModeDrawArraysIBM_remap_index },
+ { 26641, MultiModeDrawElementsIBM_remap_index },
+ { 11115, DeleteFencesNV_remap_index },
+ { 25739, FinishFenceNV_remap_index },
{ 3287, GenFencesNV_remap_index },
- { 15064, GetFenceivNV_remap_index },
- { 7287, IsFenceNV_remap_index },
- { 12098, SetFenceNV_remap_index },
+ { 15581, GetFenceivNV_remap_index },
+ { 7406, IsFenceNV_remap_index },
+ { 12447, SetFenceNV_remap_index },
{ 3744, TestFenceNV_remap_index },
- { 28295, AreProgramsResidentNV_remap_index },
- { 27650, BindProgramNV_remap_index },
- { 23103, DeleteProgramsNV_remap_index },
- { 19080, ExecuteProgramNV_remap_index },
- { 29759, GenProgramsNV_remap_index },
- { 20734, GetProgramParameterdvNV_remap_index },
- { 9330, GetProgramParameterfvNV_remap_index },
- { 23457, GetProgramStringNV_remap_index },
- { 21763, GetProgramivNV_remap_index },
- { 20968, GetTrackMatrixivNV_remap_index },
- { 23253, GetVertexAttribPointervNV_remap_index },
- { 22007, GetVertexAttribdvNV_remap_index },
- { 16561, GetVertexAttribfvNV_remap_index },
- { 16252, GetVertexAttribivNV_remap_index },
- { 16968, IsProgramNV_remap_index },
- { 8336, LoadProgramNV_remap_index },
- { 24824, ProgramParameters4dvNV_remap_index },
- { 21693, ProgramParameters4fvNV_remap_index },
- { 18380, RequestResidentProgramsNV_remap_index },
- { 19798, TrackMatrixNV_remap_index },
- { 28852, VertexAttrib1dNV_remap_index },
- { 12039, VertexAttrib1dvNV_remap_index },
- { 25362, VertexAttrib1fNV_remap_index },
+ { 29142, AreProgramsResidentNV_remap_index },
+ { 28497, BindProgramNV_remap_index },
+ { 23854, DeleteProgramsNV_remap_index },
+ { 19725, ExecuteProgramNV_remap_index },
+ { 30606, GenProgramsNV_remap_index },
+ { 21467, GetProgramParameterdvNV_remap_index },
+ { 9531, GetProgramParameterfvNV_remap_index },
+ { 24237, GetProgramStringNV_remap_index },
+ { 22479, GetProgramivNV_remap_index },
+ { 21701, GetTrackMatrixivNV_remap_index },
+ { 24031, GetVertexAttribPointervNV_remap_index },
+ { 22723, GetVertexAttribdvNV_remap_index },
+ { 8426, GetVertexAttribfvNV_remap_index },
+ { 16817, GetVertexAttribivNV_remap_index },
+ { 17574, IsProgramNV_remap_index },
+ { 8509, LoadProgramNV_remap_index },
+ { 25604, ProgramParameters4dvNV_remap_index },
+ { 22409, ProgramParameters4fvNV_remap_index },
+ { 18986, RequestResidentProgramsNV_remap_index },
+ { 20505, TrackMatrixNV_remap_index },
+ { 29699, VertexAttrib1dNV_remap_index },
+ { 12358, VertexAttrib1dvNV_remap_index },
+ { 26173, VertexAttrib1fNV_remap_index },
{ 2245, VertexAttrib1fvNV_remap_index },
- { 27419, VertexAttrib1sNV_remap_index },
- { 13304, VertexAttrib1svNV_remap_index },
+ { 28266, VertexAttrib1sNV_remap_index },
+ { 13743, VertexAttrib1svNV_remap_index },
{ 4251, VertexAttrib2dNV_remap_index },
- { 11954, VertexAttrib2dvNV_remap_index },
- { 17835, VertexAttrib2fNV_remap_index },
- { 11565, VertexAttrib2fvNV_remap_index },
- { 5106, VertexAttrib2sNV_remap_index },
- { 16642, VertexAttrib2svNV_remap_index },
- { 10020, VertexAttrib3dNV_remap_index },
- { 28545, VertexAttrib3dvNV_remap_index },
- { 9142, VertexAttrib3fNV_remap_index },
- { 22034, VertexAttrib3fvNV_remap_index },
- { 25337, VertexAttrib3sNV_remap_index },
- { 20995, VertexAttrib3svNV_remap_index },
- { 25804, VertexAttrib4dNV_remap_index },
- { 29796, VertexAttrib4dvNV_remap_index },
+ { 12273, VertexAttrib2dvNV_remap_index },
+ { 18441, VertexAttrib2fNV_remap_index },
+ { 11884, VertexAttrib2fvNV_remap_index },
+ { 5191, VertexAttrib2sNV_remap_index },
+ { 17208, VertexAttrib2svNV_remap_index },
+ { 10257, VertexAttrib3dNV_remap_index },
+ { 29392, VertexAttrib3dvNV_remap_index },
+ { 9343, VertexAttrib3fNV_remap_index },
+ { 22750, VertexAttrib3fvNV_remap_index },
+ { 20382, VertexAttrib3sNV_remap_index },
+ { 21728, VertexAttrib3svNV_remap_index },
+ { 26615, VertexAttrib4dNV_remap_index },
+ { 30643, VertexAttrib4dvNV_remap_index },
{ 3945, VertexAttrib4fNV_remap_index },
- { 8386, VertexAttrib4fvNV_remap_index },
- { 23802, VertexAttrib4sNV_remap_index },
+ { 8559, VertexAttrib4fvNV_remap_index },
+ { 24582, VertexAttrib4sNV_remap_index },
{ 1293, VertexAttrib4svNV_remap_index },
{ 4409, VertexAttrib4ubNV_remap_index },
{ 734, VertexAttrib4ubvNV_remap_index },
- { 19260, VertexAttribPointerNV_remap_index },
+ { 19905, VertexAttribPointerNV_remap_index },
{ 2097, VertexAttribs1dvNV_remap_index },
- { 16666, VertexAttribs1fvNV_remap_index },
- { 29596, VertexAttribs1svNV_remap_index },
- { 9167, VertexAttribs2dvNV_remap_index },
- { 22596, VertexAttribs2fvNV_remap_index },
- { 15584, VertexAttribs2svNV_remap_index },
- { 4608, VertexAttribs3dvNV_remap_index },
+ { 24119, VertexAttribs1fvNV_remap_index },
+ { 30443, VertexAttribs1svNV_remap_index },
+ { 9368, VertexAttribs2dvNV_remap_index },
+ { 23312, VertexAttribs2fvNV_remap_index },
+ { 16149, VertexAttribs2svNV_remap_index },
+ { 4636, VertexAttribs3dvNV_remap_index },
{ 1977, VertexAttribs3fvNV_remap_index },
- { 26705, VertexAttribs3svNV_remap_index },
- { 23892, VertexAttribs4dvNV_remap_index },
- { 4634, VertexAttribs4fvNV_remap_index },
- { 29383, VertexAttribs4svNV_remap_index },
- { 26453, VertexAttribs4ubvNV_remap_index },
- { 23962, GetTexBumpParameterfvATI_remap_index },
- { 29637, GetTexBumpParameterivATI_remap_index },
- { 16306, TexBumpParameterfvATI_remap_index },
- { 18251, TexBumpParameterivATI_remap_index },
- { 13850, AlphaFragmentOp1ATI_remap_index },
- { 9682, AlphaFragmentOp2ATI_remap_index },
- { 21950, AlphaFragmentOp3ATI_remap_index },
- { 26632, BeginFragmentShaderATI_remap_index },
- { 27849, BindFragmentShaderATI_remap_index },
- { 21124, ColorFragmentOp1ATI_remap_index },
+ { 27516, VertexAttribs3svNV_remap_index },
+ { 24672, VertexAttribs4dvNV_remap_index },
+ { 4662, VertexAttribs4fvNV_remap_index },
+ { 30230, VertexAttribs4svNV_remap_index },
+ { 27264, VertexAttribs4ubvNV_remap_index },
+ { 24742, GetTexBumpParameterfvATI_remap_index },
+ { 30484, GetTexBumpParameterivATI_remap_index },
+ { 16871, TexBumpParameterfvATI_remap_index },
+ { 18857, TexBumpParameterivATI_remap_index },
+ { 14289, AlphaFragmentOp1ATI_remap_index },
+ { 9919, AlphaFragmentOp2ATI_remap_index },
+ { 22666, AlphaFragmentOp3ATI_remap_index },
+ { 27443, BeginFragmentShaderATI_remap_index },
+ { 28696, BindFragmentShaderATI_remap_index },
+ { 21857, ColorFragmentOp1ATI_remap_index },
{ 3823, ColorFragmentOp2ATI_remap_index },
- { 28190, ColorFragmentOp3ATI_remap_index },
- { 4753, DeleteFragmentShaderATI_remap_index },
- { 29820, EndFragmentShaderATI_remap_index },
- { 29066, GenFragmentShadersATI_remap_index },
- { 22727, PassTexCoordATI_remap_index },
- { 6026, SampleMapATI_remap_index },
- { 5799, SetFragmentShaderConstantATI_remap_index },
+ { 29037, ColorFragmentOp3ATI_remap_index },
+ { 4781, DeleteFragmentShaderATI_remap_index },
+ { 30667, EndFragmentShaderATI_remap_index },
+ { 29913, GenFragmentShadersATI_remap_index },
+ { 23443, PassTexCoordATI_remap_index },
+ { 6139, SampleMapATI_remap_index },
+ { 5912, SetFragmentShaderConstantATI_remap_index },
{ 319, PointParameteriNV_remap_index },
- { 12611, PointParameterivNV_remap_index },
- { 25643, ActiveStencilFaceEXT_remap_index },
- { 24484, BindVertexArrayAPPLE_remap_index },
+ { 12999, PointParameterivNV_remap_index },
+ { 26454, ActiveStencilFaceEXT_remap_index },
+ { 25264, BindVertexArrayAPPLE_remap_index },
{ 2522, DeleteVertexArraysAPPLE_remap_index },
- { 15923, GenVertexArraysAPPLE_remap_index },
- { 20799, IsVertexArrayAPPLE_remap_index },
+ { 16488, GenVertexArraysAPPLE_remap_index },
+ { 21532, IsVertexArrayAPPLE_remap_index },
{ 775, GetProgramNamedParameterdvNV_remap_index },
{ 3128, GetProgramNamedParameterfvNV_remap_index },
- { 23993, ProgramNamedParameter4dNV_remap_index },
- { 12886, ProgramNamedParameter4dvNV_remap_index },
- { 7923, ProgramNamedParameter4fNV_remap_index },
- { 10464, ProgramNamedParameter4fvNV_remap_index },
- { 21672, DepthBoundsEXT_remap_index },
+ { 24773, ProgramNamedParameter4dNV_remap_index },
+ { 13325, ProgramNamedParameter4dvNV_remap_index },
+ { 8042, ProgramNamedParameter4fNV_remap_index },
+ { 10701, ProgramNamedParameter4fvNV_remap_index },
+ { 22388, DepthBoundsEXT_remap_index },
{ 1043, BlendEquationSeparateEXT_remap_index },
- { 13005, BindFramebufferEXT_remap_index },
- { 22914, BindRenderbufferEXT_remap_index },
- { 8605, CheckFramebufferStatusEXT_remap_index },
- { 20089, DeleteFramebuffersEXT_remap_index },
- { 28447, DeleteRenderbuffersEXT_remap_index },
- { 11978, FramebufferRenderbufferEXT_remap_index },
- { 12115, FramebufferTexture1DEXT_remap_index },
- { 10258, FramebufferTexture2DEXT_remap_index },
- { 9925, FramebufferTexture3DEXT_remap_index },
- { 20691, GenFramebuffersEXT_remap_index },
- { 15470, GenRenderbuffersEXT_remap_index },
- { 5745, GenerateMipmapEXT_remap_index },
- { 19320, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 28972, GetRenderbufferParameterivEXT_remap_index },
- { 18131, IsFramebufferEXT_remap_index },
- { 29719, IsRenderbufferEXT_remap_index },
- { 7234, RenderbufferStorageEXT_remap_index },
+ { 13444, BindFramebufferEXT_remap_index },
+ { 23630, BindRenderbufferEXT_remap_index },
+ { 8806, CheckFramebufferStatusEXT_remap_index },
+ { 20822, DeleteFramebuffersEXT_remap_index },
+ { 29294, DeleteRenderbuffersEXT_remap_index },
+ { 12297, FramebufferRenderbufferEXT_remap_index },
+ { 12464, FramebufferTexture1DEXT_remap_index },
+ { 10495, FramebufferTexture2DEXT_remap_index },
+ { 10162, FramebufferTexture3DEXT_remap_index },
+ { 21424, GenFramebuffersEXT_remap_index },
+ { 16035, GenRenderbuffersEXT_remap_index },
+ { 5858, GenerateMipmapEXT_remap_index },
+ { 20002, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 29819, GetRenderbufferParameterivEXT_remap_index },
+ { 18737, IsFramebufferEXT_remap_index },
+ { 30566, IsRenderbufferEXT_remap_index },
+ { 7353, RenderbufferStorageEXT_remap_index },
{ 651, BlitFramebufferEXT_remap_index },
- { 12705, BufferParameteriAPPLE_remap_index },
- { 17000, FlushMappedBufferRangeAPPLE_remap_index },
+ { 13144, BufferParameteriAPPLE_remap_index },
+ { 17606, FlushMappedBufferRangeAPPLE_remap_index },
{ 2701, FramebufferTextureLayerEXT_remap_index },
- { 8307, ColorMaskIndexedEXT_remap_index },
- { 23341, DisableIndexedEXT_remap_index },
- { 23649, EnableIndexedEXT_remap_index },
- { 19291, GetBooleanIndexedvEXT_remap_index },
- { 9715, GetIntegerIndexedvEXT_remap_index },
- { 20165, IsEnabledIndexedEXT_remap_index },
+ { 4956, ColorMaskIndexedEXT_remap_index },
+ { 17232, DisableIndexedEXT_remap_index },
+ { 24429, EnableIndexedEXT_remap_index },
+ { 19973, GetBooleanIndexedvEXT_remap_index },
+ { 9952, GetIntegerIndexedvEXT_remap_index },
+ { 20898, IsEnabledIndexedEXT_remap_index },
{ 4074, BeginConditionalRenderNV_remap_index },
- { 22700, EndConditionalRenderNV_remap_index },
- { 26354, ProvokingVertexEXT_remap_index },
- { 9551, GetTexParameterPointervAPPLE_remap_index },
+ { 23416, EndConditionalRenderNV_remap_index },
+ { 8453, BeginTransformFeedbackEXT_remap_index },
+ { 17256, BindBufferBaseEXT_remap_index },
+ { 17126, BindBufferOffsetEXT_remap_index },
+ { 11136, BindBufferRangeEXT_remap_index },
+ { 13059, EndTransformFeedbackEXT_remap_index },
+ { 9804, GetTransformFeedbackVaryingEXT_remap_index },
+ { 19042, TransformFeedbackVaryingsEXT_remap_index },
+ { 27165, ProvokingVertexEXT_remap_index },
+ { 9752, GetTexParameterPointervAPPLE_remap_index },
{ 4436, TextureRangeAPPLE_remap_index },
- { 10330, GetObjectParameterivAPPLE_remap_index },
- { 17575, ObjectPurgeableAPPLE_remap_index },
- { 4900, ObjectUnpurgeableAPPLE_remap_index },
- { 25669, StencilFuncSeparateATI_remap_index },
- { 15990, ProgramEnvParameters4fvEXT_remap_index },
- { 15208, ProgramLocalParameters4fvEXT_remap_index },
- { 12539, GetQueryObjecti64vEXT_remap_index },
- { 9193, GetQueryObjectui64vEXT_remap_index },
- { 21193, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 10817, EGLImageTargetTexture2DOES_remap_index },
+ { 10567, GetObjectParameterivAPPLE_remap_index },
+ { 18181, ObjectPurgeableAPPLE_remap_index },
+ { 4985, ObjectUnpurgeableAPPLE_remap_index },
+ { 26480, StencilFuncSeparateATI_remap_index },
+ { 16555, ProgramEnvParameters4fvEXT_remap_index },
+ { 19936, ProgramLocalParameters4fvEXT_remap_index },
+ { 12927, GetQueryObjecti64vEXT_remap_index },
+ { 9394, GetQueryObjectui64vEXT_remap_index },
+ { 21926, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 11054, EGLImageTargetTexture2DOES_remap_index },
{ -1, -1 }
};
@@ -4793,108 +4895,108 @@ static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
{ 2440, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 9982, _gloffset_BlendEquation },
+ { 10219, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 15106, _gloffset_ColorSubTable },
- { 28379, _gloffset_CopyColorSubTable },
+ { 15623, _gloffset_ColorSubTable },
+ { 29226, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7583, _gloffset_ConvolutionFilter2D },
- { 7749, _gloffset_ConvolutionParameteriv },
- { 8209, _gloffset_ConvolutionParameterfv },
- { 18279, _gloffset_GetSeparableFilter },
- { 21423, _gloffset_SeparableFilter2D },
- { 22252, _gloffset_ConvolutionParameteri },
- { 22375, _gloffset_ConvolutionParameterf },
- { 23828, _gloffset_GetConvolutionParameterfv },
- { 24650, _gloffset_GetConvolutionFilter },
- { 26894, _gloffset_CopyConvolutionFilter2D },
+ { 7702, _gloffset_ConvolutionFilter2D },
+ { 7868, _gloffset_ConvolutionParameteriv },
+ { 8328, _gloffset_ConvolutionParameterfv },
+ { 18885, _gloffset_GetSeparableFilter },
+ { 22156, _gloffset_SeparableFilter2D },
+ { 22968, _gloffset_ConvolutionParameteri },
+ { 23091, _gloffset_ConvolutionParameterf },
+ { 24608, _gloffset_GetConvolutionParameterfv },
+ { 25430, _gloffset_GetConvolutionFilter },
+ { 27705, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13364, _gloffset_CopyTexSubImage3D },
- { 14846, _gloffset_CopyTexImage2D },
- { 21860, _gloffset_CopyTexImage1D },
- { 24331, _gloffset_CopyTexSubImage2D },
- { 26532, _gloffset_CopyTexSubImage1D },
+ { 13803, _gloffset_CopyTexSubImage3D },
+ { 15363, _gloffset_CopyTexImage2D },
+ { 22576, _gloffset_CopyTexImage1D },
+ { 25111, _gloffset_CopyTexSubImage2D },
+ { 27343, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 8492, _gloffset_DrawRangeElements },
+ { 8665, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8864, _gloffset_GetMinmax },
- { 13698, _gloffset_GetHistogramParameterfv },
- { 21785, _gloffset_GetMinmaxParameteriv },
- { 23718, _gloffset_ResetMinmax },
- { 24547, _gloffset_GetHistogramParameteriv },
- { 25603, _gloffset_GetHistogram },
- { 27965, _gloffset_Minmax },
- { 29466, _gloffset_GetMinmaxParameterfv },
+ { 9065, _gloffset_GetMinmax },
+ { 14137, _gloffset_GetHistogramParameterfv },
+ { 22501, _gloffset_GetMinmaxParameteriv },
+ { 24498, _gloffset_ResetMinmax },
+ { 25327, _gloffset_GetHistogramParameteriv },
+ { 26414, _gloffset_GetHistogram },
+ { 28812, _gloffset_Minmax },
+ { 30313, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 7445, _gloffset_ColorTable },
- { 13544, _gloffset_GetColorTable },
- { 20438, _gloffset_GetColorTableParameterfv },
- { 22431, _gloffset_GetColorTableParameteriv },
+ { 7564, _gloffset_ColorTable },
+ { 13983, _gloffset_GetColorTable },
+ { 21171, _gloffset_GetColorTableParameterfv },
+ { 23147, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 6166, _gloffset_TexSubImage1D },
- { 9478, _gloffset_TexSubImage2D },
+ { 6285, _gloffset_TexSubImage1D },
+ { 9679, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
{ 1658, _gloffset_TexImage3D },
- { 20207, _gloffset_TexSubImage3D },
+ { 20940, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
{ 2964, _gloffset_PrioritizeTextures },
- { 6615, _gloffset_AreTexturesResident },
- { 12063, _gloffset_GenTextures },
- { 14030, _gloffset_DeleteTextures },
- { 17281, _gloffset_IsTexture },
- { 26597, _gloffset_BindTexture },
+ { 6734, _gloffset_AreTexturesResident },
+ { 12382, _gloffset_GenTextures },
+ { 14469, _gloffset_DeleteTextures },
+ { 17887, _gloffset_IsTexture },
+ { 27408, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 21612, _gloffset_ArrayElement },
- { 27553, _gloffset_GetPointerv },
- { 29093, _gloffset_DrawArrays },
+ { 22328, _gloffset_ArrayElement },
+ { 28400, _gloffset_GetPointerv },
+ { 29940, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 6733, _gloffset_ColorTableParameteriv },
- { 7445, _gloffset_ColorTable },
- { 13544, _gloffset_GetColorTable },
- { 13654, _gloffset_CopyColorTable },
- { 17142, _gloffset_ColorTableParameterfv },
- { 20438, _gloffset_GetColorTableParameterfv },
- { 22431, _gloffset_GetColorTableParameteriv },
+ { 6852, _gloffset_ColorTableParameteriv },
+ { 7564, _gloffset_ColorTable },
+ { 13983, _gloffset_GetColorTable },
+ { 14093, _gloffset_CopyColorTable },
+ { 17748, _gloffset_ColorTableParameterfv },
+ { 21171, _gloffset_GetColorTableParameterfv },
+ { 23147, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5301, _gloffset_MultiTexCoord3dARB },
- { 5346, _gloffset_MultiTexCoord2iARB },
- { 5470, _gloffset_MultiTexCoord2svARB },
- { 7401, _gloffset_MultiTexCoord2fARB },
- { 9223, _gloffset_MultiTexCoord3fvARB },
- { 9744, _gloffset_MultiTexCoord4sARB },
- { 10378, _gloffset_MultiTexCoord2dvARB },
- { 10760, _gloffset_MultiTexCoord1svARB },
- { 11050, _gloffset_MultiTexCoord3svARB },
- { 11111, _gloffset_MultiTexCoord4iARB },
- { 11834, _gloffset_MultiTexCoord3iARB },
- { 12568, _gloffset_MultiTexCoord1dARB },
- { 12734, _gloffset_MultiTexCoord3dvARB },
- { 13898, _gloffset_MultiTexCoord3ivARB },
- { 13943, _gloffset_MultiTexCoord2sARB },
- { 15163, _gloffset_MultiTexCoord4ivARB },
- { 16792, _gloffset_ClientActiveTextureARB },
- { 19036, _gloffset_MultiTexCoord2dARB },
- { 19440, _gloffset_MultiTexCoord4dvARB },
- { 19726, _gloffset_MultiTexCoord4fvARB },
- { 20579, _gloffset_MultiTexCoord3fARB },
- { 22959, _gloffset_MultiTexCoord4dARB },
- { 23163, _gloffset_MultiTexCoord1sARB },
- { 23365, _gloffset_MultiTexCoord1dvARB },
- { 24175, _gloffset_MultiTexCoord1ivARB },
- { 24268, _gloffset_MultiTexCoord2ivARB },
- { 24607, _gloffset_MultiTexCoord1iARB },
- { 25878, _gloffset_MultiTexCoord4svARB },
- { 26396, _gloffset_MultiTexCoord1fARB },
- { 26659, _gloffset_MultiTexCoord4fARB },
- { 28927, _gloffset_MultiTexCoord2fvARB },
+ { 5386, _gloffset_MultiTexCoord3dARB },
+ { 5431, _gloffset_MultiTexCoord2iARB },
+ { 5555, _gloffset_MultiTexCoord2svARB },
+ { 7520, _gloffset_MultiTexCoord2fARB },
+ { 9424, _gloffset_MultiTexCoord3fvARB },
+ { 9981, _gloffset_MultiTexCoord4sARB },
+ { 10615, _gloffset_MultiTexCoord2dvARB },
+ { 10997, _gloffset_MultiTexCoord1svARB },
+ { 11369, _gloffset_MultiTexCoord3svARB },
+ { 11430, _gloffset_MultiTexCoord4iARB },
+ { 12153, _gloffset_MultiTexCoord3iARB },
+ { 12956, _gloffset_MultiTexCoord1dARB },
+ { 13173, _gloffset_MultiTexCoord3dvARB },
+ { 14337, _gloffset_MultiTexCoord3ivARB },
+ { 14382, _gloffset_MultiTexCoord2sARB },
+ { 15680, _gloffset_MultiTexCoord4ivARB },
+ { 17398, _gloffset_ClientActiveTextureARB },
+ { 19681, _gloffset_MultiTexCoord2dARB },
+ { 20122, _gloffset_MultiTexCoord4dvARB },
+ { 20433, _gloffset_MultiTexCoord4fvARB },
+ { 21312, _gloffset_MultiTexCoord3fARB },
+ { 23675, _gloffset_MultiTexCoord4dARB },
+ { 23941, _gloffset_MultiTexCoord1sARB },
+ { 24145, _gloffset_MultiTexCoord1dvARB },
+ { 24955, _gloffset_MultiTexCoord1ivARB },
+ { 25048, _gloffset_MultiTexCoord2ivARB },
+ { 25387, _gloffset_MultiTexCoord1iARB },
+ { 26689, _gloffset_MultiTexCoord4svARB },
+ { 27207, _gloffset_MultiTexCoord1fARB },
+ { 27470, _gloffset_MultiTexCoord4fARB },
+ { 29774, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -4902,7 +5004,7 @@ static const struct gl_function_remap MESA_alt_functions[] = {
#if defined(need_GL_3DFX_tbuffer)
static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = {
- { 8267, -1 }, /* TbufferMask3DFX */
+ { 8386, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -4956,6 +5058,13 @@ static const struct gl_function_remap GL_ARB_draw_elements_base_vertex_functions
};
#endif
+#if defined(need_GL_ARB_draw_instanced)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_instanced_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_ARB_framebuffer_object)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
@@ -4963,6 +5072,14 @@ static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
};
#endif
+#if defined(need_GL_ARB_geometry_shader4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
+ { 11333, -1 }, /* FramebufferTextureLayer */
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_ARB_map_buffer_range)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
@@ -4973,10 +5090,10 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
#if defined(need_GL_ARB_matrix_palette)
static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
{ 3339, -1 }, /* MatrixIndexusvARB */
- { 11655, -1 }, /* MatrixIndexuivARB */
- { 12856, -1 }, /* MatrixIndexPointerARB */
- { 17530, -1 }, /* CurrentPaletteMatrixARB */
- { 20323, -1 }, /* MatrixIndexubvARB */
+ { 11974, -1 }, /* MatrixIndexuivARB */
+ { 13295, -1 }, /* MatrixIndexPointerARB */
+ { 18136, -1 }, /* CurrentPaletteMatrixARB */
+ { 21056, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5030,6 +5147,13 @@ static const struct gl_function_remap GL_ARB_texture_compression_functions[] = {
};
#endif
+#if defined(need_GL_ARB_transform_feedback2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_transform_feedback2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_ARB_transpose_matrix)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_transpose_matrix_functions[] = {
@@ -5047,15 +5171,15 @@ static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
#if defined(need_GL_ARB_vertex_blend)
static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
{ 2226, -1 }, /* WeightubvARB */
- { 5633, -1 }, /* WeightivARB */
- { 9847, -1 }, /* WeightPointerARB */
- { 12325, -1 }, /* WeightfvARB */
- { 15610, -1 }, /* WeightbvARB */
- { 18704, -1 }, /* WeightusvARB */
- { 21349, -1 }, /* VertexBlendARB */
- { 26480, -1 }, /* WeightsvARB */
- { 28429, -1 }, /* WeightdvARB */
- { 29127, -1 }, /* WeightuivARB */
+ { 5746, -1 }, /* WeightivARB */
+ { 10084, -1 }, /* WeightPointerARB */
+ { 12674, -1 }, /* WeightfvARB */
+ { 16175, -1 }, /* WeightbvARB */
+ { 19349, -1 }, /* WeightusvARB */
+ { 22082, -1 }, /* VertexBlendARB */
+ { 27291, -1 }, /* WeightsvARB */
+ { 29276, -1 }, /* WeightdvARB */
+ { 29974, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5146,15 +5270,15 @@ static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = {
#if defined(need_GL_EXT_blend_minmax)
static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
- { 9982, _gloffset_BlendEquation },
+ { 10219, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 15106, _gloffset_ColorSubTable },
- { 28379, _gloffset_CopyColorSubTable },
+ { 15623, _gloffset_ColorSubTable },
+ { 29226, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5171,55 +5295,55 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = {
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7583, _gloffset_ConvolutionFilter2D },
- { 7749, _gloffset_ConvolutionParameteriv },
- { 8209, _gloffset_ConvolutionParameterfv },
- { 18279, _gloffset_GetSeparableFilter },
- { 21423, _gloffset_SeparableFilter2D },
- { 22252, _gloffset_ConvolutionParameteri },
- { 22375, _gloffset_ConvolutionParameterf },
- { 23828, _gloffset_GetConvolutionParameterfv },
- { 24650, _gloffset_GetConvolutionFilter },
- { 26894, _gloffset_CopyConvolutionFilter2D },
+ { 7702, _gloffset_ConvolutionFilter2D },
+ { 7868, _gloffset_ConvolutionParameteriv },
+ { 8328, _gloffset_ConvolutionParameterfv },
+ { 18885, _gloffset_GetSeparableFilter },
+ { 22156, _gloffset_SeparableFilter2D },
+ { 22968, _gloffset_ConvolutionParameteri },
+ { 23091, _gloffset_ConvolutionParameterf },
+ { 24608, _gloffset_GetConvolutionParameterfv },
+ { 25430, _gloffset_GetConvolutionFilter },
+ { 27705, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 9362, -1 }, /* TangentPointerEXT */
- { 11169, -1 }, /* Binormal3ivEXT */
- { 11787, -1 }, /* Tangent3sEXT */
- { 12921, -1 }, /* Tangent3fvEXT */
- { 16542, -1 }, /* Tangent3dvEXT */
- { 17228, -1 }, /* Binormal3bvEXT */
- { 18332, -1 }, /* Binormal3dEXT */
- { 20255, -1 }, /* Tangent3fEXT */
- { 22324, -1 }, /* Binormal3sEXT */
- { 22769, -1 }, /* Tangent3ivEXT */
- { 22788, -1 }, /* Tangent3dEXT */
- { 23592, -1 }, /* Binormal3svEXT */
- { 24073, -1 }, /* Binormal3fEXT */
- { 24925, -1 }, /* Binormal3dvEXT */
- { 26100, -1 }, /* Tangent3iEXT */
- { 27179, -1 }, /* Tangent3bvEXT */
- { 27588, -1 }, /* Tangent3bEXT */
- { 28152, -1 }, /* Binormal3fvEXT */
- { 28826, -1 }, /* BinormalPointerEXT */
- { 29231, -1 }, /* Tangent3svEXT */
- { 29668, -1 }, /* Binormal3bEXT */
- { 29845, -1 }, /* Binormal3iEXT */
+ { 9563, -1 }, /* TangentPointerEXT */
+ { 11488, -1 }, /* Binormal3ivEXT */
+ { 12106, -1 }, /* Tangent3sEXT */
+ { 13360, -1 }, /* Tangent3fvEXT */
+ { 17107, -1 }, /* Tangent3dvEXT */
+ { 17834, -1 }, /* Binormal3bvEXT */
+ { 18938, -1 }, /* Binormal3dEXT */
+ { 20988, -1 }, /* Tangent3fEXT */
+ { 23040, -1 }, /* Binormal3sEXT */
+ { 23485, -1 }, /* Tangent3ivEXT */
+ { 23504, -1 }, /* Tangent3dEXT */
+ { 24372, -1 }, /* Binormal3svEXT */
+ { 24853, -1 }, /* Binormal3fEXT */
+ { 25705, -1 }, /* Binormal3dvEXT */
+ { 26911, -1 }, /* Tangent3iEXT */
+ { 27990, -1 }, /* Tangent3bvEXT */
+ { 28435, -1 }, /* Tangent3bEXT */
+ { 28999, -1 }, /* Binormal3fvEXT */
+ { 29673, -1 }, /* BinormalPointerEXT */
+ { 30078, -1 }, /* Tangent3svEXT */
+ { 30515, -1 }, /* Binormal3bEXT */
+ { 30692, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13364, _gloffset_CopyTexSubImage3D },
- { 14846, _gloffset_CopyTexImage2D },
- { 21860, _gloffset_CopyTexImage1D },
- { 24331, _gloffset_CopyTexSubImage2D },
- { 26532, _gloffset_CopyTexSubImage1D },
+ { 13803, _gloffset_CopyTexSubImage3D },
+ { 15363, _gloffset_CopyTexImage2D },
+ { 22576, _gloffset_CopyTexImage1D },
+ { 25111, _gloffset_CopyTexSubImage2D },
+ { 27343, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
@@ -5245,9 +5369,16 @@ static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = {
};
#endif
+#if defined(need_GL_EXT_draw_instanced)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 8492, _gloffset_DrawRangeElements },
+ { 8665, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5291,37 +5422,37 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[]
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8864, _gloffset_GetMinmax },
- { 13698, _gloffset_GetHistogramParameterfv },
- { 21785, _gloffset_GetMinmaxParameteriv },
- { 23718, _gloffset_ResetMinmax },
- { 24547, _gloffset_GetHistogramParameteriv },
- { 25603, _gloffset_GetHistogram },
- { 27965, _gloffset_Minmax },
- { 29466, _gloffset_GetMinmaxParameterfv },
+ { 9065, _gloffset_GetMinmax },
+ { 14137, _gloffset_GetHistogramParameterfv },
+ { 22501, _gloffset_GetMinmaxParameteriv },
+ { 24498, _gloffset_ResetMinmax },
+ { 25327, _gloffset_GetHistogramParameteriv },
+ { 26414, _gloffset_GetHistogram },
+ { 28812, _gloffset_Minmax },
+ { 30313, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 10209, -1 }, /* IndexFuncEXT */
+ { 10446, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 18791, -1 }, /* IndexMaterialEXT */
+ { 19436, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 23612, -1 }, /* ApplyTextureEXT */
- { 23672, -1 }, /* TextureMaterialEXT */
- { 23697, -1 }, /* TextureLightEXT */
+ { 24392, -1 }, /* ApplyTextureEXT */
+ { 24452, -1 }, /* TextureMaterialEXT */
+ { 24477, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5342,20 +5473,20 @@ static const struct gl_function_remap GL_EXT_multisample_functions[] = {
#if defined(need_GL_EXT_paletted_texture)
static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
- { 7445, _gloffset_ColorTable },
- { 13544, _gloffset_GetColorTable },
- { 20438, _gloffset_GetColorTableParameterfv },
- { 22431, _gloffset_GetColorTableParameteriv },
+ { 7564, _gloffset_ColorTable },
+ { 13983, _gloffset_GetColorTable },
+ { 21171, _gloffset_GetColorTableParameterfv },
+ { 23147, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 9603, -1 }, /* PixelTransformParameterfvEXT */
- { 19405, -1 }, /* PixelTransformParameterfEXT */
- { 19485, -1 }, /* PixelTransformParameteriEXT */
- { 28790, -1 }, /* PixelTransformParameterivEXT */
+ { 20087, -1 }, /* PixelTransformParameterfEXT */
+ { 20167, -1 }, /* PixelTransformParameteriEXT */
+ { 28173, -1 }, /* PixelTransformParameterfvEXT */
+ { 29637, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5397,8 +5528,8 @@ static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
#if defined(need_GL_EXT_subtexture)
static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
- { 6166, _gloffset_TexSubImage1D },
- { 9478, _gloffset_TexSubImage2D },
+ { 6285, _gloffset_TexSubImage1D },
+ { 9679, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
@@ -5406,7 +5537,7 @@ static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
#if defined(need_GL_EXT_texture3D)
static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
{ 1658, _gloffset_TexImage3D },
- { 20207, _gloffset_TexSubImage3D },
+ { 20940, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5421,18 +5552,18 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
{ 2964, _gloffset_PrioritizeTextures },
- { 6615, _gloffset_AreTexturesResident },
- { 12063, _gloffset_GenTextures },
- { 14030, _gloffset_DeleteTextures },
- { 17281, _gloffset_IsTexture },
- { 26597, _gloffset_BindTexture },
+ { 6734, _gloffset_AreTexturesResident },
+ { 12382, _gloffset_GenTextures },
+ { 14469, _gloffset_DeleteTextures },
+ { 17887, _gloffset_IsTexture },
+ { 27408, _gloffset_BindTexture },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_texture_perturb_normal)
static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = {
- { 12275, -1 }, /* TextureNormalEXT */
+ { 12624, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5444,21 +5575,28 @@ static const struct gl_function_remap GL_EXT_timer_query_functions[] = {
};
#endif
+#if defined(need_GL_EXT_transform_feedback)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_vertex_array)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
- { 21612, _gloffset_ArrayElement },
- { 27553, _gloffset_GetPointerv },
- { 29093, _gloffset_DrawArrays },
+ { 22328, _gloffset_ArrayElement },
+ { 28400, _gloffset_GetPointerv },
+ { 29940, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17311, -1 }, /* VertexWeightfvEXT */
- { 24051, -1 }, /* VertexWeightfEXT */
- { 25572, -1 }, /* VertexWeightPointerEXT */
+ { 17917, -1 }, /* VertexWeightfvEXT */
+ { 24831, -1 }, /* VertexWeightfEXT */
+ { 26383, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
@@ -5467,10 +5605,10 @@ static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
{ 2157, -1 }, /* GetImageTransformParameterfvHP */
{ 3305, -1 }, /* ImageTransformParameterfHP */
- { 9056, -1 }, /* ImageTransformParameterfvHP */
- { 10678, -1 }, /* ImageTransformParameteriHP */
- { 10940, -1 }, /* GetImageTransformParameterivHP */
- { 17375, -1 }, /* ImageTransformParameterivHP */
+ { 9257, -1 }, /* ImageTransformParameterfvHP */
+ { 10915, -1 }, /* ImageTransformParameteriHP */
+ { 11223, -1 }, /* GetImageTransformParameterivHP */
+ { 17981, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5485,13 +5623,13 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] =
#if defined(need_GL_IBM_vertex_array_lists)
static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
{ 3857, -1 }, /* SecondaryColorPointerListIBM */
- { 5167, -1 }, /* NormalPointerListIBM */
- { 6789, -1 }, /* FogCoordPointerListIBM */
- { 7096, -1 }, /* VertexPointerListIBM */
- { 10599, -1 }, /* ColorPointerListIBM */
- { 11894, -1 }, /* TexCoordPointerListIBM */
- { 12297, -1 }, /* IndexPointerListIBM */
- { 29409, -1 }, /* EdgeFlagPointerListIBM */
+ { 5252, -1 }, /* NormalPointerListIBM */
+ { 6908, -1 }, /* FogCoordPointerListIBM */
+ { 7215, -1 }, /* VertexPointerListIBM */
+ { 10836, -1 }, /* ColorPointerListIBM */
+ { 12213, -1 }, /* TexCoordPointerListIBM */
+ { 12646, -1 }, /* IndexPointerListIBM */
+ { 30256, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5505,10 +5643,10 @@ static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] =
#if defined(need_GL_INTEL_parallel_arrays)
static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = {
- { 11281, -1 }, /* VertexPointervINTEL */
- { 13791, -1 }, /* ColorPointervINTEL */
- { 26868, -1 }, /* NormalPointervINTEL */
- { 27294, -1 }, /* TexCoordPointervINTEL */
+ { 11600, -1 }, /* VertexPointervINTEL */
+ { 14230, -1 }, /* ColorPointervINTEL */
+ { 27679, -1 }, /* NormalPointervINTEL */
+ { 28105, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5525,7 +5663,7 @@ static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
{ 1522, -1 }, /* GetDebugLogLengthMESA */
{ 3063, -1 }, /* ClearDebugLogMESA */
{ 4018, -1 }, /* GetDebugLogMESA */
- { 27746, -1 }, /* CreateDebugObjectMESA */
+ { 28593, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5546,15 +5684,15 @@ static const struct gl_function_remap GL_NV_condtitional_render_functions[] = {
#if defined(need_GL_NV_evaluators)
static const struct gl_function_remap GL_NV_evaluators_functions[] = {
- { 5834, -1 }, /* GetMapAttribParameterivNV */
- { 7551, -1 }, /* MapControlPointsNV */
- { 7650, -1 }, /* MapParameterfvNV */
- { 9461, -1 }, /* EvalMapsNV */
- { 15280, -1 }, /* GetMapAttribParameterfvNV */
- { 15446, -1 }, /* MapParameterivNV */
- { 22175, -1 }, /* GetMapParameterivNV */
- { 22673, -1 }, /* GetMapParameterfvNV */
- { 26204, -1 }, /* GetMapControlPointsNV */
+ { 5947, -1 }, /* GetMapAttribParameterivNV */
+ { 7670, -1 }, /* MapControlPointsNV */
+ { 7769, -1 }, /* MapParameterfvNV */
+ { 9662, -1 }, /* EvalMapsNV */
+ { 15845, -1 }, /* GetMapAttribParameterfvNV */
+ { 16011, -1 }, /* MapParameterivNV */
+ { 22891, -1 }, /* GetMapParameterivNV */
+ { 23389, -1 }, /* GetMapParameterfvNV */
+ { 27015, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5589,8 +5727,8 @@ static const struct gl_function_remap GL_NV_register_combiners_functions[] = {
#if defined(need_GL_NV_register_combiners2)
static const struct gl_function_remap GL_NV_register_combiners2_functions[] = {
- { 14183, -1 }, /* CombinerStageParameterfvNV */
- { 14498, -1 }, /* GetCombinerStageParameterfvNV */
+ { 14700, -1 }, /* CombinerStageParameterfvNV */
+ { 15015, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5618,23 +5756,23 @@ static const struct gl_function_remap GL_OES_EGL_image_functions[] = {
#if defined(need_GL_PGI_misc_hints)
static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
- { 7735, -1 }, /* HintPGI */
+ { 7854, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14471, -1 }, /* GetDetailTexFuncSGIS */
- { 14791, -1 }, /* DetailTexFuncSGIS */
+ { 14988, -1 }, /* GetDetailTexFuncSGIS */
+ { 15308, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 24313, -1 }, /* FogFuncSGIS */
- { 24978, -1 }, /* GetFogFuncSGIS */
+ { 25093, -1 }, /* FogFuncSGIS */
+ { 25758, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5662,8 +5800,8 @@ static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
#if defined(need_GL_SGIS_sharpen_texture)
static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
- { 5895, -1 }, /* GetSharpenTexFuncSGIS */
- { 19700, -1 }, /* SharpenTexFuncSGIS */
+ { 6008, -1 }, /* GetSharpenTexFuncSGIS */
+ { 20407, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5671,22 +5809,22 @@ static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
{ 894, -1 }, /* TexImage4DSGIS */
- { 14099, -1 }, /* TexSubImage4DSGIS */
+ { 14538, -1 }, /* TexSubImage4DSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_color_mask)
static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = {
- { 13497, -1 }, /* TextureColorMaskSGIS */
+ { 13936, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 6072, -1 }, /* GetTexFilterFuncSGIS */
- { 14617, -1 }, /* TexFilterFuncSGIS */
+ { 6185, -1 }, /* GetTexFilterFuncSGIS */
+ { 15134, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5695,17 +5833,17 @@ static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
static const struct gl_function_remap GL_SGIX_async_functions[] = {
{ 3014, -1 }, /* AsyncMarkerSGIX */
{ 3997, -1 }, /* FinishAsyncSGIX */
- { 4734, -1 }, /* PollAsyncSGIX */
- { 19847, -1 }, /* DeleteAsyncMarkersSGIX */
- { 19876, -1 }, /* IsAsyncMarkerSGIX */
- { 29206, -1 }, /* GenAsyncMarkersSGIX */
+ { 4762, -1 }, /* PollAsyncSGIX */
+ { 20554, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 20609, -1 }, /* IsAsyncMarkerSGIX */
+ { 30053, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 6443, -1 }, /* FlushRasterSGIX */
+ { 6562, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
@@ -5713,37 +5851,37 @@ static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
#if defined(need_GL_SGIX_fragment_lighting)
static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
{ 2410, -1 }, /* FragmentMaterialfvSGIX */
- { 2906, -1 }, /* FragmentLightModelivSGIX */
- { 4685, -1 }, /* FragmentLightiSGIX */
- { 5575, -1 }, /* GetFragmentMaterialfvSGIX */
- { 7163, -1 }, /* FragmentMaterialfSGIX */
- { 7324, -1 }, /* GetFragmentLightivSGIX */
- { 8161, -1 }, /* FragmentLightModeliSGIX */
- { 9524, -1 }, /* FragmentLightivSGIX */
- { 9790, -1 }, /* GetFragmentMaterialivSGIX */
- { 17198, -1 }, /* FragmentLightModelfSGIX */
- { 17498, -1 }, /* FragmentColorMaterialSGIX */
- { 17898, -1 }, /* FragmentMaterialiSGIX */
- { 19119, -1 }, /* LightEnviSGIX */
- { 20530, -1 }, /* FragmentLightModelfvSGIX */
- { 20839, -1 }, /* FragmentLightfvSGIX */
- { 25454, -1 }, /* FragmentLightfSGIX */
- { 28122, -1 }, /* GetFragmentLightfvSGIX */
- { 29689, -1 }, /* FragmentMaterialivSGIX */
+ { 4713, -1 }, /* FragmentLightiSGIX */
+ { 5688, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 7282, -1 }, /* FragmentMaterialfSGIX */
+ { 7443, -1 }, /* GetFragmentLightivSGIX */
+ { 8280, -1 }, /* FragmentLightModeliSGIX */
+ { 9725, -1 }, /* FragmentLightivSGIX */
+ { 10027, -1 }, /* GetFragmentMaterialivSGIX */
+ { 17804, -1 }, /* FragmentLightModelfSGIX */
+ { 18104, -1 }, /* FragmentColorMaterialSGIX */
+ { 18504, -1 }, /* FragmentMaterialiSGIX */
+ { 19764, -1 }, /* LightEnviSGIX */
+ { 21263, -1 }, /* FragmentLightModelfvSGIX */
+ { 21572, -1 }, /* FragmentLightfvSGIX */
+ { 26142, -1 }, /* FragmentLightModelivSGIX */
+ { 26265, -1 }, /* FragmentLightfSGIX */
+ { 28969, -1 }, /* GetFragmentLightfvSGIX */
+ { 30536, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 19899, -1 }, /* FrameZoomSGIX */
+ { 20632, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 25762, -1 }, /* IglooInterfaceSGIX */
+ { 26573, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
@@ -5751,11 +5889,11 @@ static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
#if defined(need_GL_SGIX_instruments)
static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
{ 2573, -1 }, /* ReadInstrumentsSGIX */
- { 5651, -1 }, /* PollInstrumentsSGIX */
- { 9422, -1 }, /* GetInstrumentsSGIX */
- { 11492, -1 }, /* StartInstrumentsSGIX */
- { 14217, -1 }, /* StopInstrumentsSGIX */
- { 15823, -1 }, /* InstrumentsBufferSGIX */
+ { 5764, -1 }, /* PollInstrumentsSGIX */
+ { 9623, -1 }, /* GetInstrumentsSGIX */
+ { 11811, -1 }, /* StartInstrumentsSGIX */
+ { 14734, -1 }, /* StopInstrumentsSGIX */
+ { 16388, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5764,10 +5902,10 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
{ 1125, -1 }, /* ListParameterfSGIX */
{ 2763, -1 }, /* GetListParameterfvSGIX */
- { 15738, -1 }, /* ListParameteriSGIX */
- { 16492, -1 }, /* ListParameterfvSGIX */
- { 18525, -1 }, /* ListParameterivSGIX */
- { 29250, -1 }, /* GetListParameterivSGIX */
+ { 16303, -1 }, /* ListParameteriSGIX */
+ { 17057, -1 }, /* ListParameterfvSGIX */
+ { 19170, -1 }, /* ListParameterivSGIX */
+ { 30097, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5782,53 +5920,53 @@ static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
#if defined(need_GL_SGIX_polynomial_ffd)
static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
{ 3251, -1 }, /* LoadIdentityDeformationMapSGIX */
- { 14317, -1 }, /* DeformSGIX */
- { 21724, -1 }, /* DeformationMap3fSGIX */
- { 28010, -1 }, /* DeformationMap3dSGIX */
+ { 14834, -1 }, /* DeformSGIX */
+ { 22440, -1 }, /* DeformationMap3fSGIX */
+ { 28857, -1 }, /* DeformationMap3dSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 13048, -1 }, /* ReferencePlaneSGIX */
+ { 13487, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 8577, -1 }, /* SpriteParameterfvSGIX */
- { 18353, -1 }, /* SpriteParameteriSGIX */
- { 23752, -1 }, /* SpriteParameterfSGIX */
- { 26326, -1 }, /* SpriteParameterivSGIX */
+ { 8778, -1 }, /* SpriteParameterfvSGIX */
+ { 18959, -1 }, /* SpriteParameteriSGIX */
+ { 24532, -1 }, /* SpriteParameterfSGIX */
+ { 27137, -1 }, /* SpriteParameterivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_tag_sample_buffer)
static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = {
- { 18412, -1 }, /* TagSampleBufferSGIX */
+ { 19018, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 6733, _gloffset_ColorTableParameteriv },
- { 7445, _gloffset_ColorTable },
- { 13544, _gloffset_GetColorTable },
- { 13654, _gloffset_CopyColorTable },
- { 17142, _gloffset_ColorTableParameterfv },
- { 20438, _gloffset_GetColorTableParameterfv },
- { 22431, _gloffset_GetColorTableParameteriv },
+ { 6852, _gloffset_ColorTableParameteriv },
+ { 7564, _gloffset_ColorTable },
+ { 13983, _gloffset_GetColorTable },
+ { 14093, _gloffset_CopyColorTable },
+ { 17748, _gloffset_ColorTableParameterfv },
+ { 21171, _gloffset_GetColorTableParameterfv },
+ { 23147, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 28100, -1 }, /* FinishTextureSUNX */
+ { 28947, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
@@ -5837,19 +5975,19 @@ static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
{ 3035, -1 }, /* GlobalAlphaFactorubSUN */
{ 4224, -1 }, /* GlobalAlphaFactoriSUN */
- { 5676, -1 }, /* GlobalAlphaFactordSUN */
- { 8661, -1 }, /* GlobalAlphaFactoruiSUN */
- { 9013, -1 }, /* GlobalAlphaFactorbSUN */
- { 11807, -1 }, /* GlobalAlphaFactorfSUN */
- { 11926, -1 }, /* GlobalAlphaFactorusSUN */
- { 20138, -1 }, /* GlobalAlphaFactorsSUN */
+ { 5789, -1 }, /* GlobalAlphaFactordSUN */
+ { 8862, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 9214, -1 }, /* GlobalAlphaFactorbSUN */
+ { 12126, -1 }, /* GlobalAlphaFactorfSUN */
+ { 12245, -1 }, /* GlobalAlphaFactorusSUN */
+ { 20871, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 26138, -1 }, /* DrawMeshArraysSUN */
+ { 26949, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
@@ -5857,12 +5995,12 @@ static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
{ 3971, -1 }, /* ReplacementCodeubSUN */
- { 5515, -1 }, /* ReplacementCodeubvSUN */
- { 16863, -1 }, /* ReplacementCodeusvSUN */
- { 17051, -1 }, /* ReplacementCodePointerSUN */
- { 18436, -1 }, /* ReplacementCodeusSUN */
- { 19183, -1 }, /* ReplacementCodeuiSUN */
- { 26783, -1 }, /* ReplacementCodeuivSUN */
+ { 5600, -1 }, /* ReplacementCodeubvSUN */
+ { 17469, -1 }, /* ReplacementCodeusvSUN */
+ { 17657, -1 }, /* ReplacementCodePointerSUN */
+ { 19828, -1 }, /* ReplacementCodeuiSUN */
+ { 20583, -1 }, /* ReplacementCodeusSUN */
+ { 27594, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
@@ -5878,37 +6016,37 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
{ 2642, -1 }, /* Color4ubVertex3fvSUN */
{ 4105, -1 }, /* Color4ubVertex3fSUN */
{ 4181, -1 }, /* TexCoord2fVertex3fSUN */
- { 4480, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
- { 4810, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 5410, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 6480, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 7192, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 7960, -1 }, /* Color3fVertex3fSUN */
- { 8972, -1 }, /* Color3fVertex3fvSUN */
- { 9387, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 10088, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 11355, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 12779, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 13190, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 14242, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 14576, -1 }, /* Color4ubVertex2fvSUN */
- { 14816, -1 }, /* Normal3fVertex3fSUN */
- { 15764, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 16025, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 16692, -1 }, /* TexCoord2fVertex3fvSUN */
- { 17468, -1 }, /* Color4ubVertex2fSUN */
- { 17689, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 19571, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 19918, -1 }, /* Normal3fVertex3fvSUN */
- { 20347, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 21256, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 21476, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 23206, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 24429, -1 }, /* TexCoord4fVertex4fSUN */
- { 24855, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 25181, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 25308, -1 }, /* TexCoord4fVertex4fvSUN */
- { 26010, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 4508, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 4866, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 5495, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 6240, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 6599, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 7311, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 8079, -1 }, /* Color3fVertex3fSUN */
+ { 9173, -1 }, /* Color3fVertex3fvSUN */
+ { 9588, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 10325, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 11674, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 13218, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13629, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14759, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 15093, -1 }, /* Color4ubVertex2fvSUN */
+ { 15333, -1 }, /* Normal3fVertex3fSUN */
+ { 16329, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 16590, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 17298, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 18074, -1 }, /* Color4ubVertex2fSUN */
+ { 18295, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 20253, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 20651, -1 }, /* Normal3fVertex3fvSUN */
+ { 21080, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 21989, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 23984, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 25209, -1 }, /* TexCoord4fVertex4fSUN */
+ { 25635, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 25986, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 26113, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 26821, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -5919,37 +6057,37 @@ static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5301, _gloffset_MultiTexCoord3dARB },
- { 5346, _gloffset_MultiTexCoord2iARB },
- { 5470, _gloffset_MultiTexCoord2svARB },
- { 7401, _gloffset_MultiTexCoord2fARB },
- { 9223, _gloffset_MultiTexCoord3fvARB },
- { 9744, _gloffset_MultiTexCoord4sARB },
- { 10378, _gloffset_MultiTexCoord2dvARB },
- { 10760, _gloffset_MultiTexCoord1svARB },
- { 11050, _gloffset_MultiTexCoord3svARB },
- { 11111, _gloffset_MultiTexCoord4iARB },
- { 11834, _gloffset_MultiTexCoord3iARB },
- { 12568, _gloffset_MultiTexCoord1dARB },
- { 12734, _gloffset_MultiTexCoord3dvARB },
- { 13898, _gloffset_MultiTexCoord3ivARB },
- { 13943, _gloffset_MultiTexCoord2sARB },
- { 15163, _gloffset_MultiTexCoord4ivARB },
- { 16792, _gloffset_ClientActiveTextureARB },
- { 19036, _gloffset_MultiTexCoord2dARB },
- { 19440, _gloffset_MultiTexCoord4dvARB },
- { 19726, _gloffset_MultiTexCoord4fvARB },
- { 20579, _gloffset_MultiTexCoord3fARB },
- { 22959, _gloffset_MultiTexCoord4dARB },
- { 23163, _gloffset_MultiTexCoord1sARB },
- { 23365, _gloffset_MultiTexCoord1dvARB },
- { 24175, _gloffset_MultiTexCoord1ivARB },
- { 24268, _gloffset_MultiTexCoord2ivARB },
- { 24607, _gloffset_MultiTexCoord1iARB },
- { 25878, _gloffset_MultiTexCoord4svARB },
- { 26396, _gloffset_MultiTexCoord1fARB },
- { 26659, _gloffset_MultiTexCoord4fARB },
- { 28927, _gloffset_MultiTexCoord2fvARB },
+ { 5386, _gloffset_MultiTexCoord3dARB },
+ { 5431, _gloffset_MultiTexCoord2iARB },
+ { 5555, _gloffset_MultiTexCoord2svARB },
+ { 7520, _gloffset_MultiTexCoord2fARB },
+ { 9424, _gloffset_MultiTexCoord3fvARB },
+ { 9981, _gloffset_MultiTexCoord4sARB },
+ { 10615, _gloffset_MultiTexCoord2dvARB },
+ { 10997, _gloffset_MultiTexCoord1svARB },
+ { 11369, _gloffset_MultiTexCoord3svARB },
+ { 11430, _gloffset_MultiTexCoord4iARB },
+ { 12153, _gloffset_MultiTexCoord3iARB },
+ { 12956, _gloffset_MultiTexCoord1dARB },
+ { 13173, _gloffset_MultiTexCoord3dvARB },
+ { 14337, _gloffset_MultiTexCoord3ivARB },
+ { 14382, _gloffset_MultiTexCoord2sARB },
+ { 15680, _gloffset_MultiTexCoord4ivARB },
+ { 17398, _gloffset_ClientActiveTextureARB },
+ { 19681, _gloffset_MultiTexCoord2dARB },
+ { 20122, _gloffset_MultiTexCoord4dvARB },
+ { 20433, _gloffset_MultiTexCoord4fvARB },
+ { 21312, _gloffset_MultiTexCoord3fARB },
+ { 23675, _gloffset_MultiTexCoord4dARB },
+ { 23941, _gloffset_MultiTexCoord1sARB },
+ { 24145, _gloffset_MultiTexCoord1dvARB },
+ { 24955, _gloffset_MultiTexCoord1ivARB },
+ { 25048, _gloffset_MultiTexCoord2ivARB },
+ { 25387, _gloffset_MultiTexCoord1iARB },
+ { 26689, _gloffset_MultiTexCoord4svARB },
+ { 27207, _gloffset_MultiTexCoord1fARB },
+ { 27470, _gloffset_MultiTexCoord4fARB },
+ { 29774, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
@@ -5982,3 +6120,17 @@ static const struct gl_function_remap GL_VERSION_2_1_functions[] = {
};
#endif
+#if defined(need_GL_VERSION_3_0)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_0_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_1)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_1_functions[] = {
+ { -1, -1 }
+};
+#endif
+
diff --git a/mesalib/src/mesa/main/renderbuffer.c b/mesalib/src/mesa/main/renderbuffer.c
index 4d7b0aff0..adc1199d8 100644
--- a/mesalib/src/mesa/main/renderbuffer.c
+++ b/mesalib/src/mesa/main/renderbuffer.c
@@ -49,12 +49,6 @@
#include "fbobject.h"
#include "renderbuffer.h"
-#include "rbadaptors.h"
-
-
-/* 32-bit color index format. Not a public format. */
-#define COLOR_INDEX32 0x424243
-
/*
* Routines for get/put values in common buffer formats follow.
@@ -992,6 +986,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
pixelSize = 4 * sizeof(GLubyte);
break;
case GL_RGBA16:
+ case GL_RGBA16_SNORM:
/* for accum buffer */
rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
rb->DataType = GL_SHORT;
@@ -1091,21 +1086,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoValues = put_mono_values_uint;
pixelSize = sizeof(GLuint);
break;
- case GL_COLOR_INDEX8_EXT:
- case GL_COLOR_INDEX16_EXT:
- case COLOR_INDEX32:
- rb->Format = MESA_FORMAT_CI8;
- rb->DataType = GL_UNSIGNED_BYTE;
- rb->GetPointer = get_pointer_ubyte;
- rb->GetRow = get_row_ubyte;
- rb->GetValues = get_values_ubyte;
- rb->PutRow = put_row_ubyte;
- rb->PutRowRGB = NULL;
- rb->PutMonoRow = put_mono_row_ubyte;
- rb->PutValues = put_values_ubyte;
- rb->PutMonoValues = put_mono_values_ubyte;
- pixelSize = sizeof(GLubyte);
- break;
default:
_mesa_problem(ctx, "Bad internalFormat in _mesa_soft_renderbuffer_storage");
return GL_FALSE;
@@ -1777,7 +1757,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
}
rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
- rb->InternalFormat = GL_RGBA16;
+ rb->InternalFormat = GL_RGBA16_SNORM;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_ACCUM, rb);
@@ -1909,8 +1889,6 @@ void
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
GLuint bufferName, struct gl_renderbuffer *rb)
{
- GLenum baseFormat;
-
assert(fb);
assert(rb);
assert(bufferName < BUFFER_COUNT);
@@ -1931,26 +1909,6 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb,
assert(!rb->Name);
}
- /* If Mesa's compiled with deep color channels (16 or 32 bits / channel)
- * and the device driver is expecting 8-bit values (GLubyte), we can
- * use a "renderbuffer adaptor/wrapper" to do the necessary conversions.
- */
- baseFormat = _mesa_get_format_base_format(rb->Format);
- if (baseFormat == GL_RGBA) {
- if (CHAN_BITS == 16 && rb->DataType == GL_UNSIGNED_BYTE) {
- GET_CURRENT_CONTEXT(ctx);
- rb = _mesa_new_renderbuffer_16wrap8(ctx, rb);
- }
- else if (CHAN_BITS == 32 && rb->DataType == GL_UNSIGNED_BYTE) {
- GET_CURRENT_CONTEXT(ctx);
- rb = _mesa_new_renderbuffer_32wrap8(ctx, rb);
- }
- else if (CHAN_BITS == 32 && rb->DataType == GL_UNSIGNED_SHORT) {
- GET_CURRENT_CONTEXT(ctx);
- rb = _mesa_new_renderbuffer_32wrap16(ctx, rb);
- }
- }
-
fb->Attachment[bufferName].Type = GL_RENDERBUFFER_EXT;
fb->Attachment[bufferName].Complete = GL_TRUE;
_mesa_reference_renderbuffer(&fb->Attachment[bufferName].Renderbuffer, rb);
diff --git a/mesalib/src/mesa/main/renderbuffer.h b/mesalib/src/mesa/main/renderbuffer.h
index 7c205e141..bc92b2698 100644
--- a/mesalib/src/mesa/main/renderbuffer.h
+++ b/mesalib/src/mesa/main/renderbuffer.h
@@ -26,6 +26,11 @@
#ifndef RENDERBUFFER_H
#define RENDERBUFFER_H
+#include "glheader.h"
+#include "mtypes.h"
+
+struct gl_framebuffer;
+struct gl_renderbuffer;
extern void
_mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name);
diff --git a/mesalib/src/mesa/main/restart.c b/mesalib/src/mesa/main/restart.c
new file mode 100644
index 000000000..ff366496f
--- /dev/null
+++ b/mesalib/src/mesa/main/restart.c
@@ -0,0 +1,68 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.9
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "glheader.h"
+#include "imports.h"
+#include "context.h"
+#include "restart.h"
+
+
+/**
+ */
+void GLAPIENTRY
+_mesa_PrimitiveRestart(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestart()");
+ return;
+ }
+
+ /* XXX call into vbo module */
+}
+
+
+
+/**
+ */
+void GLAPIENTRY
+_mesa_PrimitiveRestartIndex(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
+ return;
+ }
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+
+ ctx->Array.RestartIndex = index;
+}
diff --git a/mesalib/src/mesa/main/restart.h b/mesalib/src/mesa/main/restart.h
new file mode 100644
index 000000000..25f58f24c
--- /dev/null
+++ b/mesalib/src/mesa/main/restart.h
@@ -0,0 +1,41 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.9
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef RESTART_H
+#define RESTART_H
+
+#include "glheader.h"
+
+extern void GLAPIENTRY
+_mesa_PrimitiveRestart(void);
+
+
+extern void GLAPIENTRY
+_mesa_PrimitiveRestartIndex(GLuint index);
+
+
+#endif
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
new file mode 100644
index 000000000..c25d2a197
--- /dev/null
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -0,0 +1,1642 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file shaderapi.c
+ * \author Brian Paul
+ *
+ * Implementation of GLSL-related API functions.
+ * The glUniform* functions are in uniforms.c
+ *
+ *
+ * XXX things to do:
+ * 1. Check that the right error code is generated for all _mesa_error() calls.
+ * 2. Insert FLUSH_VERTICES calls in various places
+ */
+
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/dispatch.h"
+#include "main/enums.h"
+#include "main/hash.h"
+#include "main/shaderapi.h"
+#include "main/shaderobj.h"
+#include "program/program.h"
+#include "program/prog_parameter.h"
+#include "program/prog_uniform.h"
+#include "talloc.h"
+
+
+/** Define this to enable shader substitution (see below) */
+#define SHADER_SUBST 0
+
+
+/**
+ * Return mask of GLSL_x flags by examining the MESA_GLSL env var.
+ */
+static GLbitfield
+get_shader_flags(void)
+{
+ GLbitfield flags = 0x0;
+ const char *env = _mesa_getenv("MESA_GLSL");
+
+ if (env) {
+ if (strstr(env, "dump"))
+ flags |= GLSL_DUMP;
+ if (strstr(env, "log"))
+ flags |= GLSL_LOG;
+ if (strstr(env, "nopvert"))
+ flags |= GLSL_NOP_VERT;
+ if (strstr(env, "nopfrag"))
+ flags |= GLSL_NOP_FRAG;
+ if (strstr(env, "nopt"))
+ flags |= GLSL_NO_OPT;
+ else if (strstr(env, "opt"))
+ flags |= GLSL_OPT;
+ if (strstr(env, "uniform"))
+ flags |= GLSL_UNIFORMS;
+ if (strstr(env, "useprog"))
+ flags |= GLSL_USE_PROG;
+ }
+
+ return flags;
+}
+
+
+/**
+ * Initialize context's shader state.
+ */
+void
+_mesa_init_shader_state(GLcontext *ctx)
+{
+ /* Device drivers may override these to control what kind of instructions
+ * are generated by the GLSL compiler.
+ */
+ struct gl_shader_compiler_options options;
+ GLuint i;
+
+ memset(&options, 0, sizeof(options));
+ options.MaxUnrollIterations = 32;
+
+ /* Default pragma settings */
+ options.DefaultPragmas.Optimize = GL_TRUE;
+
+ for(i = 0; i < MESA_SHADER_TYPES; ++i)
+ memcpy(&ctx->ShaderCompilerOptions[i], &options, sizeof(options));
+
+ ctx->Shader.Flags = get_shader_flags();
+}
+
+
+/**
+ * Free the per-context shader-related state.
+ */
+void
+_mesa_free_shader_state(GLcontext *ctx)
+{
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, NULL);
+}
+
+
+/**
+ * Return the size of the given GLSL datatype, in floats (components).
+ */
+GLint
+_mesa_sizeof_glsl_type(GLenum type)
+{
+ switch (type) {
+ case GL_FLOAT:
+ case GL_INT:
+ case GL_BOOL:
+ case GL_SAMPLER_1D:
+ case GL_SAMPLER_2D:
+ case GL_SAMPLER_3D:
+ case GL_SAMPLER_CUBE:
+ case GL_SAMPLER_1D_SHADOW:
+ case GL_SAMPLER_2D_SHADOW:
+ case GL_SAMPLER_2D_RECT_ARB:
+ case GL_SAMPLER_2D_RECT_SHADOW_ARB:
+ case GL_SAMPLER_1D_ARRAY_EXT:
+ case GL_SAMPLER_2D_ARRAY_EXT:
+ case GL_SAMPLER_1D_ARRAY_SHADOW_EXT:
+ case GL_SAMPLER_2D_ARRAY_SHADOW_EXT:
+ case GL_SAMPLER_CUBE_SHADOW_EXT:
+ return 1;
+ case GL_FLOAT_VEC2:
+ case GL_INT_VEC2:
+ case GL_UNSIGNED_INT_VEC2:
+ case GL_BOOL_VEC2:
+ return 2;
+ case GL_FLOAT_VEC3:
+ case GL_INT_VEC3:
+ case GL_UNSIGNED_INT_VEC3:
+ case GL_BOOL_VEC3:
+ return 3;
+ case GL_FLOAT_VEC4:
+ case GL_INT_VEC4:
+ case GL_UNSIGNED_INT_VEC4:
+ case GL_BOOL_VEC4:
+ return 4;
+ case GL_FLOAT_MAT2:
+ case GL_FLOAT_MAT2x3:
+ case GL_FLOAT_MAT2x4:
+ return 8; /* two float[4] vectors */
+ case GL_FLOAT_MAT3:
+ case GL_FLOAT_MAT3x2:
+ case GL_FLOAT_MAT3x4:
+ return 12; /* three float[4] vectors */
+ case GL_FLOAT_MAT4:
+ case GL_FLOAT_MAT4x2:
+ case GL_FLOAT_MAT4x3:
+ return 16; /* four float[4] vectors */
+ default:
+ _mesa_problem(NULL, "Invalid type in _mesa_sizeof_glsl_type()");
+ return 1;
+ }
+}
+
+
+/**
+ * Copy string from <src> to <dst>, up to maxLength characters, returning
+ * length of <dst> in <length>.
+ * \param src the strings source
+ * \param maxLength max chars to copy
+ * \param length returns number of chars copied
+ * \param dst the string destination
+ */
+void
+_mesa_copy_string(GLchar *dst, GLsizei maxLength,
+ GLsizei *length, const GLchar *src)
+{
+ GLsizei len;
+ for (len = 0; len < maxLength - 1 && src && src[len]; len++)
+ dst[len] = src[len];
+ if (maxLength > 0)
+ dst[len] = 0;
+ if (length)
+ *length = len;
+}
+
+
+
+/**
+ * Find the length of the longest transform feedback varying name
+ * which was specified with glTransformFeedbackVaryings().
+ */
+static GLint
+longest_feedback_varying_name(const struct gl_shader_program *shProg)
+{
+ GLuint i;
+ GLint max = 0;
+ for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
+ GLint len = strlen(shProg->TransformFeedback.VaryingNames[i]);
+ if (len > max)
+ max = len;
+ }
+ return max;
+}
+
+
+
+static GLboolean
+is_program(GLcontext *ctx, GLuint name)
+{
+ struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name);
+ return shProg ? GL_TRUE : GL_FALSE;
+}
+
+
+static GLboolean
+is_shader(GLcontext *ctx, GLuint name)
+{
+ struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
+ return shader ? GL_TRUE : GL_FALSE;
+}
+
+
+/**
+ * Attach shader to a shader program.
+ */
+static void
+attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+{
+ struct gl_shader_program *shProg;
+ struct gl_shader *sh;
+ GLuint i, n;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glAttachShader");
+ if (!shProg)
+ return;
+
+ sh = _mesa_lookup_shader_err(ctx, shader, "glAttachShader");
+ if (!sh) {
+ return;
+ }
+
+ n = shProg->NumShaders;
+ for (i = 0; i < n; i++) {
+ if (shProg->Shaders[i] == sh) {
+ /* The shader is already attched to this program. The
+ * GL_ARB_shader_objects spec says:
+ *
+ * "The error INVALID_OPERATION is generated by AttachObjectARB
+ * if <obj> is already attached to <containerObj>."
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glAttachShader");
+ return;
+ }
+ }
+
+ /* grow list */
+ shProg->Shaders = (struct gl_shader **)
+ _mesa_realloc(shProg->Shaders,
+ n * sizeof(struct gl_shader *),
+ (n + 1) * sizeof(struct gl_shader *));
+ if (!shProg->Shaders) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAttachShader");
+ return;
+ }
+
+ /* append */
+ shProg->Shaders[n] = NULL; /* since realloc() didn't zero the new space */
+ _mesa_reference_shader(ctx, &shProg->Shaders[n], sh);
+ shProg->NumShaders++;
+}
+
+
+static GLint
+get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name)
+{
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation");
+
+ if (!shProg) {
+ return -1;
+ }
+
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetAttribLocation(program not linked)");
+ return -1;
+ }
+
+ if (!name)
+ return -1;
+
+ if (shProg->VertexProgram) {
+ const struct gl_program_parameter_list *attribs =
+ shProg->VertexProgram->Base.Attributes;
+ if (attribs) {
+ GLint i = _mesa_lookup_parameter_index(attribs, -1, name);
+ if (i >= 0) {
+ return attribs->Parameters[i].StateIndexes[0];
+ }
+ }
+ }
+ return -1;
+}
+
+
+static void
+bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
+ const GLchar *name)
+{
+ struct gl_shader_program *shProg;
+ const GLint size = -1; /* unknown size */
+ GLint i, oldIndex;
+ GLenum datatype = GL_FLOAT_VEC4;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glBindAttribLocation");
+ if (!shProg) {
+ return;
+ }
+
+ if (!name)
+ return;
+
+ if (strncmp(name, "gl_", 3) == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindAttribLocation(illegal name)");
+ return;
+ }
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(index)");
+ return;
+ }
+
+ if (shProg->LinkStatus) {
+ /* get current index/location for the attribute */
+ oldIndex = get_attrib_location(ctx, program, name);
+ }
+ else {
+ oldIndex = -1;
+ }
+
+ /* this will replace the current value if it's already in the list */
+ i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index);
+ if (i < 0) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation");
+ return;
+ }
+
+ /*
+ * Note that this attribute binding won't go into effect until
+ * glLinkProgram is called again.
+ */
+}
+
+
+static GLuint
+create_shader(GLcontext *ctx, GLenum type)
+{
+ struct gl_shader *sh;
+ GLuint name;
+
+ name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
+
+ switch (type) {
+ case GL_FRAGMENT_SHADER:
+ case GL_VERTEX_SHADER:
+ case GL_GEOMETRY_SHADER_ARB:
+ sh = ctx->Driver.NewShader(ctx, name, type);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)");
+ return 0;
+ }
+
+ _mesa_HashInsert(ctx->Shared->ShaderObjects, name, sh);
+
+ return name;
+}
+
+
+static GLuint
+create_shader_program(GLcontext *ctx)
+{
+ GLuint name;
+ struct gl_shader_program *shProg;
+
+ name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
+
+ shProg = ctx->Driver.NewShaderProgram(ctx, name);
+
+ _mesa_HashInsert(ctx->Shared->ShaderObjects, name, shProg);
+
+ assert(shProg->RefCount == 1);
+
+ return name;
+}
+
+
+/**
+ * Named w/ "2" to indicate OpenGL 2.x vs GL_ARB_fragment_programs's
+ * DeleteProgramARB.
+ */
+static void
+delete_shader_program(GLcontext *ctx, GLuint name)
+{
+ /*
+ * NOTE: deleting shaders/programs works a bit differently than
+ * texture objects (and buffer objects, etc). Shader/program
+ * handles/IDs exist in the hash table until the object is really
+ * deleted (refcount==0). With texture objects, the handle/ID is
+ * removed from the hash table in glDeleteTextures() while the tex
+ * object itself might linger until its refcount goes to zero.
+ */
+ struct gl_shader_program *shProg;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, name, "glDeleteProgram");
+ if (!shProg)
+ return;
+
+ shProg->DeletePending = GL_TRUE;
+
+ /* effectively, decr shProg's refcount */
+ _mesa_reference_shader_program(ctx, &shProg, NULL);
+}
+
+
+static void
+delete_shader(GLcontext *ctx, GLuint shader)
+{
+ struct gl_shader *sh;
+
+ sh = _mesa_lookup_shader_err(ctx, shader, "glDeleteShader");
+ if (!sh)
+ return;
+
+ sh->DeletePending = GL_TRUE;
+
+ /* effectively, decr sh's refcount */
+ _mesa_reference_shader(ctx, &sh, NULL);
+}
+
+
+static void
+detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+{
+ struct gl_shader_program *shProg;
+ GLuint n;
+ GLuint i, j;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glDetachShader");
+ if (!shProg)
+ return;
+
+ n = shProg->NumShaders;
+
+ for (i = 0; i < n; i++) {
+ if (shProg->Shaders[i]->Name == shader) {
+ /* found it */
+ struct gl_shader **newList;
+
+ /* release */
+ _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL);
+
+ /* alloc new, smaller array */
+ newList = (struct gl_shader **)
+ malloc((n - 1) * sizeof(struct gl_shader *));
+ if (!newList) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachShader");
+ return;
+ }
+ for (j = 0; j < i; j++) {
+ newList[j] = shProg->Shaders[j];
+ }
+ while (++i < n)
+ newList[j++] = shProg->Shaders[i];
+ free(shProg->Shaders);
+
+ shProg->Shaders = newList;
+ shProg->NumShaders = n - 1;
+
+#ifdef DEBUG
+ /* sanity check */
+ {
+ for (j = 0; j < shProg->NumShaders; j++) {
+ assert(shProg->Shaders[j]->Type == GL_VERTEX_SHADER ||
+ shProg->Shaders[j]->Type == GL_FRAGMENT_SHADER);
+ assert(shProg->Shaders[j]->RefCount > 0);
+ }
+ }
+#endif
+
+ return;
+ }
+ }
+
+ /* not found */
+ {
+ GLenum err;
+ if (is_shader(ctx, shader))
+ err = GL_INVALID_OPERATION;
+ else if (is_program(ctx, shader))
+ err = GL_INVALID_OPERATION;
+ else
+ err = GL_INVALID_VALUE;
+ _mesa_error(ctx, err, "glDetachProgram(shader)");
+ return;
+ }
+}
+
+
+static void
+get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
+ GLsizei maxLength, GLsizei *length, GLint *size,
+ GLenum *type, GLchar *nameOut)
+{
+ const struct gl_program_parameter_list *attribs = NULL;
+ struct gl_shader_program *shProg;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib");
+ if (!shProg)
+ return;
+
+ if (shProg->VertexProgram)
+ attribs = shProg->VertexProgram->Base.Attributes;
+
+ if (!attribs || index >= attribs->NumParameters) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttrib(index)");
+ return;
+ }
+
+ _mesa_copy_string(nameOut, maxLength, length,
+ attribs->Parameters[index].Name);
+
+ if (size)
+ *size = attribs->Parameters[index].Size
+ / _mesa_sizeof_glsl_type(attribs->Parameters[index].DataType);
+
+ if (type)
+ *type = attribs->Parameters[index].DataType;
+}
+
+
+/**
+ * Return list of shaders attached to shader program.
+ */
+static void
+get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
+ GLsizei *count, GLuint *obj)
+{
+ struct gl_shader_program *shProg =
+ _mesa_lookup_shader_program_err(ctx, program, "glGetAttachedShaders");
+ if (shProg) {
+ GLuint i;
+ for (i = 0; i < (GLuint) maxCount && i < shProg->NumShaders; i++) {
+ obj[i] = shProg->Shaders[i]->Name;
+ }
+ if (count)
+ *count = i;
+ }
+}
+
+
+/**
+ * glGetHandleARB() - return ID/name of currently bound shader program.
+ */
+static GLuint
+get_handle(GLcontext *ctx, GLenum pname)
+{
+ if (pname == GL_PROGRAM_OBJECT_ARB) {
+ if (ctx->Shader.CurrentProgram)
+ return ctx->Shader.CurrentProgram->Name;
+ else
+ return 0;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB");
+ return 0;
+ }
+}
+
+
+/**
+ * glGetProgramiv() - get shader program state.
+ * Note that this is for GLSL shader programs, not ARB vertex/fragment
+ * programs (see glGetProgramivARB).
+ */
+static void
+get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
+{
+ const struct gl_program_parameter_list *attribs;
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program(ctx, program);
+
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramiv(program)");
+ return;
+ }
+
+ if (shProg->VertexProgram)
+ attribs = shProg->VertexProgram->Base.Attributes;
+ else
+ attribs = NULL;
+
+ switch (pname) {
+ case GL_DELETE_STATUS:
+ *params = shProg->DeletePending;
+ break;
+ case GL_LINK_STATUS:
+ *params = shProg->LinkStatus;
+ break;
+ case GL_VALIDATE_STATUS:
+ *params = shProg->Validated;
+ break;
+ case GL_INFO_LOG_LENGTH:
+ *params = shProg->InfoLog ? strlen(shProg->InfoLog) + 1 : 0;
+ break;
+ case GL_ATTACHED_SHADERS:
+ *params = shProg->NumShaders;
+ break;
+ case GL_ACTIVE_ATTRIBUTES:
+ *params = attribs ? attribs->NumParameters : 0;
+ break;
+ case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:
+ *params = _mesa_longest_parameter_name(attribs, PROGRAM_INPUT) + 1;
+ break;
+ case GL_ACTIVE_UNIFORMS:
+ *params = shProg->Uniforms ? shProg->Uniforms->NumUniforms : 0;
+ break;
+ case GL_ACTIVE_UNIFORM_MAX_LENGTH:
+ *params = _mesa_longest_uniform_name(shProg->Uniforms);
+ if (*params > 0)
+ (*params)++; /* add one for terminating zero */
+ break;
+ case GL_PROGRAM_BINARY_LENGTH_OES:
+ *params = 0;
+ break;
+#if FEATURE_EXT_transform_feedback
+ case GL_TRANSFORM_FEEDBACK_VARYINGS:
+ *params = shProg->TransformFeedback.NumVarying;
+ break;
+ case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH:
+ *params = longest_feedback_varying_name(shProg) + 1;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_MODE:
+ *params = shProg->TransformFeedback.BufferMode;
+ break;
+#endif
+#if FEATURE_ARB_geometry_shader4
+ case GL_GEOMETRY_VERTICES_OUT_ARB:
+ *params = shProg->Geom.VerticesOut;
+ break;
+ case GL_GEOMETRY_INPUT_TYPE_ARB:
+ *params = shProg->Geom.InputType;
+ break;
+ case GL_GEOMETRY_OUTPUT_TYPE_ARB:
+ *params = shProg->Geom.OutputType;
+ break;
+#endif
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)");
+ return;
+ }
+}
+
+
+/**
+ * glGetShaderiv() - get GLSL shader state
+ */
+static void
+get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
+{
+ struct gl_shader *shader =
+ _mesa_lookup_shader_err(ctx, name, "glGetShaderiv");
+
+ if (!shader) {
+ return;
+ }
+
+ switch (pname) {
+ case GL_SHADER_TYPE:
+ *params = shader->Type;
+ break;
+ case GL_DELETE_STATUS:
+ *params = shader->DeletePending;
+ break;
+ case GL_COMPILE_STATUS:
+ *params = shader->CompileStatus;
+ break;
+ case GL_INFO_LOG_LENGTH:
+ *params = shader->InfoLog ? strlen(shader->InfoLog) + 1 : 0;
+ break;
+ case GL_SHADER_SOURCE_LENGTH:
+ *params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)");
+ return;
+ }
+}
+
+
+static void
+get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog)
+{
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program(ctx, program);
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramInfoLog(program)");
+ return;
+ }
+ _mesa_copy_string(infoLog, bufSize, length, shProg->InfoLog);
+}
+
+
+static void
+get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog)
+{
+ struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
+ if (!sh) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderInfoLog(shader)");
+ return;
+ }
+ _mesa_copy_string(infoLog, bufSize, length, sh->InfoLog);
+}
+
+
+/**
+ * Return shader source code.
+ */
+static void
+get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
+ GLsizei *length, GLchar *sourceOut)
+{
+ struct gl_shader *sh;
+ sh = _mesa_lookup_shader_err(ctx, shader, "glGetShaderSource");
+ if (!sh) {
+ return;
+ }
+ _mesa_copy_string(sourceOut, maxLength, length, sh->Source);
+}
+
+
+/**
+ * Set/replace shader source code.
+ */
+static void
+shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
+{
+ struct gl_shader *sh;
+
+ sh = _mesa_lookup_shader_err(ctx, shader, "glShaderSource");
+ if (!sh)
+ return;
+
+ /* free old shader source string and install new one */
+ if (sh->Source) {
+ free((void *) sh->Source);
+ }
+ sh->Source = source;
+ sh->CompileStatus = GL_FALSE;
+#ifdef DEBUG
+ sh->SourceChecksum = _mesa_str_checksum(sh->Source);
+#endif
+}
+
+
+/**
+ * Compile a shader.
+ */
+static void
+compile_shader(GLcontext *ctx, GLuint shaderObj)
+{
+ struct gl_shader *sh;
+ struct gl_shader_compiler_options *options;
+
+ sh = _mesa_lookup_shader_err(ctx, shaderObj, "glCompileShader");
+ if (!sh)
+ return;
+
+ options = &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(sh->Type)];
+
+ /* set default pragma state for shader */
+ sh->Pragmas = options->DefaultPragmas;
+
+ /* this call will set the sh->CompileStatus field to indicate if
+ * compilation was successful.
+ */
+ _mesa_glsl_compile_shader(ctx, sh);
+}
+
+
+/**
+ * Link a program's shaders.
+ */
+static void
+link_program(GLcontext *ctx, GLuint program)
+{
+ struct gl_shader_program *shProg;
+ struct gl_transform_feedback_object *obj =
+ ctx->TransformFeedback.CurrentObject;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glLinkProgram");
+ if (!shProg)
+ return;
+
+ if (obj->Active && shProg == ctx->Shader.CurrentProgram) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glLinkProgram(transform feedback active");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ _mesa_glsl_link_shader(ctx, shProg);
+
+ /* debug code */
+ if (0) {
+ GLuint i;
+
+ printf("Link %u shaders in program %u: %s\n",
+ shProg->NumShaders, shProg->Name,
+ shProg->LinkStatus ? "Success" : "Failed");
+
+ for (i = 0; i < shProg->NumShaders; i++) {
+ printf(" shader %u, type 0x%x\n",
+ shProg->Shaders[i]->Name,
+ shProg->Shaders[i]->Type);
+ }
+ }
+}
+
+
+/**
+ * Print basic shader info (for debug).
+ */
+static void
+print_shader_info(const struct gl_shader_program *shProg)
+{
+ GLuint i;
+
+ printf("Mesa: glUseProgram(%u)\n", shProg->Name);
+ for (i = 0; i < shProg->NumShaders; i++) {
+ const char *s;
+ switch (shProg->Shaders[i]->Type) {
+ case GL_VERTEX_SHADER:
+ s = "vertex";
+ break;
+ case GL_FRAGMENT_SHADER:
+ s = "fragment";
+ break;
+ case GL_GEOMETRY_SHADER:
+ s = "geometry";
+ break;
+ default:
+ s = "";
+ }
+ printf(" %s shader %u, checksum %u\n", s,
+ shProg->Shaders[i]->Name,
+ shProg->Shaders[i]->SourceChecksum);
+ }
+ if (shProg->VertexProgram)
+ printf(" vert prog %u\n", shProg->VertexProgram->Base.Id);
+ if (shProg->FragmentProgram)
+ printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id);
+}
+
+
+/**
+ * Use the named shader program for subsequent rendering.
+ */
+void
+_mesa_use_program(GLcontext *ctx, GLuint program)
+{
+ struct gl_shader_program *shProg;
+ struct gl_transform_feedback_object *obj =
+ ctx->TransformFeedback.CurrentObject;
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgram(transform feedback active)");
+ return;
+ }
+
+ if (ctx->Shader.CurrentProgram &&
+ ctx->Shader.CurrentProgram->Name == program) {
+ /* no-op */
+ return;
+ }
+
+ if (program) {
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glUseProgram");
+ if (!shProg) {
+ return;
+ }
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgram(program %u not linked)", program);
+ return;
+ }
+
+ /* debug code */
+ if (ctx->Shader.Flags & GLSL_USE_PROG) {
+ print_shader_info(shProg);
+ }
+ }
+ else {
+ shProg = NULL;
+ }
+
+ if (ctx->Shader.CurrentProgram != shProg) {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, shProg);
+ }
+
+ if (ctx->Driver.UseProgram)
+ ctx->Driver.UseProgram(ctx, shProg);
+}
+
+
+/**
+ * Validate a program's samplers.
+ * Specifically, check that there aren't two samplers of different types
+ * pointing to the same texture unit.
+ * \return GL_TRUE if valid, GL_FALSE if invalid
+ */
+static GLboolean
+validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
+{
+ static const char *targetName[] = {
+ "TEXTURE_2D_ARRAY",
+ "TEXTURE_1D_ARRAY",
+ "TEXTURE_CUBE",
+ "TEXTURE_3D",
+ "TEXTURE_RECT",
+ "TEXTURE_2D",
+ "TEXTURE_1D",
+ };
+ GLint targetUsed[MAX_TEXTURE_IMAGE_UNITS];
+ GLbitfield samplersUsed = prog->SamplersUsed;
+ GLuint i;
+
+ assert(Elements(targetName) == NUM_TEXTURE_TARGETS);
+
+ if (samplersUsed == 0x0)
+ return GL_TRUE;
+
+ for (i = 0; i < Elements(targetUsed); i++)
+ targetUsed[i] = -1;
+
+ /* walk over bits which are set in 'samplers' */
+ while (samplersUsed) {
+ GLuint unit;
+ gl_texture_index target;
+ GLint sampler = _mesa_ffs(samplersUsed) - 1;
+ assert(sampler >= 0);
+ assert(sampler < MAX_TEXTURE_IMAGE_UNITS);
+ unit = prog->SamplerUnits[sampler];
+ target = prog->SamplerTargets[sampler];
+ if (targetUsed[unit] != -1 && targetUsed[unit] != target) {
+ _mesa_snprintf(errMsg, 100,
+ "Texture unit %d is accessed both as %s and %s",
+ unit, targetName[targetUsed[unit]], targetName[target]);
+ return GL_FALSE;
+ }
+ targetUsed[unit] = target;
+ samplersUsed ^= (1 << sampler);
+ }
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Do validation of the given shader program.
+ * \param errMsg returns error message if validation fails.
+ * \return GL_TRUE if valid, GL_FALSE if invalid (and set errMsg)
+ */
+static GLboolean
+validate_shader_program(GLcontext *ctx,
+ const struct gl_shader_program *shProg,
+ char *errMsg)
+{
+ const struct gl_vertex_program *vp = shProg->VertexProgram;
+ const struct gl_fragment_program *fp = shProg->FragmentProgram;
+
+ if (!shProg->LinkStatus) {
+ return GL_FALSE;
+ }
+
+ /* From the GL spec, a program is invalid if any of these are true:
+
+ any two active samplers in the current program object are of
+ different types, but refer to the same texture image unit,
+
+ any active sampler in the current program object refers to a texture
+ image unit where fixed-function fragment processing accesses a
+ texture target that does not match the sampler type, or
+
+ the sum of the number of active samplers in the program and the
+ number of texture image units enabled for fixed-function fragment
+ processing exceeds the combined limit on the total number of texture
+ image units allowed.
+ */
+
+
+ /*
+ * Check: any two active samplers in the current program object are of
+ * different types, but refer to the same texture image unit,
+ */
+ if (vp && !validate_samplers(ctx, &vp->Base, errMsg)) {
+ return GL_FALSE;
+ }
+ if (fp && !validate_samplers(ctx, &fp->Base, errMsg)) {
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Called via glValidateProgram()
+ */
+static void
+validate_program(GLcontext *ctx, GLuint program)
+{
+ struct gl_shader_program *shProg;
+ char errMsg[100];
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glValidateProgram");
+ if (!shProg) {
+ return;
+ }
+
+ shProg->Validated = validate_shader_program(ctx, shProg, errMsg);
+ if (!shProg->Validated) {
+ /* update info log */
+ if (shProg->InfoLog) {
+ talloc_free(shProg->InfoLog);
+ }
+ shProg->InfoLog = talloc_strdup(shProg, errMsg);
+ }
+}
+
+
+
+void GLAPIENTRY
+_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ attach_shader(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
+_mesa_AttachShader(GLuint program, GLuint shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ attach_shader(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
+_mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
+ const GLcharARB *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ bind_attrib_location(ctx, program, index, name);
+}
+
+
+void GLAPIENTRY
+_mesa_CompileShaderARB(GLhandleARB shaderObj)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ compile_shader(ctx, shaderObj);
+}
+
+
+GLuint GLAPIENTRY
+_mesa_CreateShader(GLenum type)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader(ctx, type);
+}
+
+
+GLhandleARB GLAPIENTRY
+_mesa_CreateShaderObjectARB(GLenum type)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader(ctx, type);
+}
+
+
+GLuint GLAPIENTRY
+_mesa_CreateProgram(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader_program(ctx);
+}
+
+
+GLhandleARB GLAPIENTRY
+_mesa_CreateProgramObjectARB(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader_program(ctx);
+}
+
+
+void GLAPIENTRY
+_mesa_DeleteObjectARB(GLhandleARB obj)
+{
+ if (obj) {
+ GET_CURRENT_CONTEXT(ctx);
+ if (is_program(ctx, obj)) {
+ delete_shader_program(ctx, obj);
+ }
+ else if (is_shader(ctx, obj)) {
+ delete_shader(ctx, obj);
+ }
+ else {
+ /* error? */
+ }
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_DeleteProgram(GLuint name)
+{
+ if (name) {
+ GET_CURRENT_CONTEXT(ctx);
+ delete_shader_program(ctx, name);
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_DeleteShader(GLuint name)
+{
+ if (name) {
+ GET_CURRENT_CONTEXT(ctx);
+ delete_shader(ctx, name);
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ detach_shader(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
+_mesa_DetachShader(GLuint program, GLuint shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ detach_shader(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
+_mesa_GetActiveAttribARB(GLhandleARB program, GLuint index,
+ GLsizei maxLength, GLsizei * length, GLint * size,
+ GLenum * type, GLcharARB * name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_active_attrib(ctx, program, index, maxLength, length, size, type, name);
+}
+
+
+void GLAPIENTRY
+_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
+ GLsizei * count, GLhandleARB * obj)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_attached_shaders(ctx, container, maxCount, count, obj);
+}
+
+
+void GLAPIENTRY
+_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
+ GLsizei *count, GLuint *obj)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_attached_shaders(ctx, program, maxCount, count, obj);
+}
+
+
+GLint GLAPIENTRY
+_mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return get_attrib_location(ctx, program, name);
+}
+
+
+void GLAPIENTRY
+_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
+ GLcharARB * infoLog)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (is_program(ctx, object)) {
+ get_program_info_log(ctx, object, maxLength, length, infoLog);
+ }
+ else if (is_shader(ctx, object)) {
+ get_shader_info_log(ctx, object, maxLength, length, infoLog);
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetInfoLogARB");
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ /* Implement in terms of GetProgramiv, GetShaderiv */
+ if (is_program(ctx, object)) {
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_PROGRAM_OBJECT_ARB;
+ }
+ else {
+ get_programiv(ctx, object, pname, params);
+ }
+ }
+ else if (is_shader(ctx, object)) {
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_SHADER_OBJECT_ARB;
+ }
+ else {
+ get_shaderiv(ctx, object, pname, params);
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB");
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname,
+ GLfloat *params)
+{
+ GLint iparams[1]; /* XXX is one element enough? */
+ _mesa_GetObjectParameterivARB(object, pname, iparams);
+ params[0] = (GLfloat) iparams[0];
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_programiv(ctx, program, pname, params);
+}
+
+
+void GLAPIENTRY
+_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_shaderiv(ctx, shader, pname, params);
+}
+
+
+void GLAPIENTRY
+_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_program_info_log(ctx, program, bufSize, length, infoLog);
+}
+
+
+void GLAPIENTRY
+_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_shader_info_log(ctx, shader, bufSize, length, infoLog);
+}
+
+
+void GLAPIENTRY
+_mesa_GetShaderSourceARB(GLhandleARB shader, GLsizei maxLength,
+ GLsizei *length, GLcharARB *sourceOut)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ get_shader_source(ctx, shader, maxLength, length, sourceOut);
+}
+
+
+GLhandleARB GLAPIENTRY
+_mesa_GetHandleARB(GLenum pname)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return get_handle(ctx, pname);
+}
+
+
+GLboolean GLAPIENTRY
+_mesa_IsProgram(GLuint name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return is_program(ctx, name);
+}
+
+
+GLboolean GLAPIENTRY
+_mesa_IsShader(GLuint name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return is_shader(ctx, name);
+}
+
+
+void GLAPIENTRY
+_mesa_LinkProgramARB(GLhandleARB programObj)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ link_program(ctx, programObj);
+}
+
+
+
+/**
+ * Read shader source code from a file.
+ * Useful for debugging to override an app's shader.
+ */
+static GLcharARB *
+read_shader(const char *fname)
+{
+ const int max = 50*1000;
+ FILE *f = fopen(fname, "r");
+ GLcharARB *buffer, *shader;
+ int len;
+
+ if (!f) {
+ return NULL;
+ }
+
+ buffer = (char *) malloc(max);
+ len = fread(buffer, 1, max, f);
+ buffer[len] = 0;
+
+ fclose(f);
+
+ shader = _mesa_strdup(buffer);
+ free(buffer);
+
+ return shader;
+}
+
+
+/**
+ * Called via glShaderSource() and glShaderSourceARB() API functions.
+ * Basically, concatenate the source code strings into one long string
+ * and pass it to _mesa_shader_source().
+ */
+void GLAPIENTRY
+_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
+ const GLcharARB ** string, const GLint * length)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint *offsets;
+ GLsizei i, totalLength;
+ GLcharARB *source;
+ GLuint checksum;
+
+ if (!shaderObj || string == NULL) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB");
+ return;
+ }
+
+ /*
+ * This array holds offsets of where the appropriate string ends, thus the
+ * last element will be set to the total length of the source code.
+ */
+ offsets = (GLint *) malloc(count * sizeof(GLint));
+ if (offsets == NULL) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
+ return;
+ }
+
+ for (i = 0; i < count; i++) {
+ if (string[i] == NULL) {
+ free((GLvoid *) offsets);
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)");
+ return;
+ }
+ if (length == NULL || length[i] < 0)
+ offsets[i] = strlen(string[i]);
+ else
+ offsets[i] = length[i];
+ /* accumulate string lengths */
+ if (i > 0)
+ offsets[i] += offsets[i - 1];
+ }
+
+ /* Total length of source string is sum off all strings plus two.
+ * One extra byte for terminating zero, another extra byte to silence
+ * valgrind warnings in the parser/grammer code.
+ */
+ totalLength = offsets[count - 1] + 2;
+ source = (GLcharARB *) malloc(totalLength * sizeof(GLcharARB));
+ if (source == NULL) {
+ free((GLvoid *) offsets);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
+ return;
+ }
+
+ for (i = 0; i < count; i++) {
+ GLint start = (i > 0) ? offsets[i - 1] : 0;
+ memcpy(source + start, string[i],
+ (offsets[i] - start) * sizeof(GLcharARB));
+ }
+ source[totalLength - 1] = '\0';
+ source[totalLength - 2] = '\0';
+
+ if (SHADER_SUBST) {
+ /* Compute the shader's source code checksum then try to open a file
+ * named newshader_<CHECKSUM>. If it exists, use it in place of the
+ * original shader source code. For debugging.
+ */
+ char filename[100];
+ GLcharARB *newSource;
+
+ checksum = _mesa_str_checksum(source);
+
+ _mesa_snprintf(filename, sizeof(filename), "newshader_%d", checksum);
+
+ newSource = read_shader(filename);
+ if (newSource) {
+ fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n",
+ shaderObj, checksum, filename);
+ free(source);
+ source = newSource;
+ }
+ }
+
+ shader_source(ctx, shaderObj, source);
+
+ if (SHADER_SUBST) {
+ struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj);
+ if (sh)
+ sh->SourceChecksum = checksum; /* save original checksum */
+ }
+
+ free(offsets);
+}
+
+
+void GLAPIENTRY
+_mesa_UseProgramObjectARB(GLhandleARB program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ _mesa_use_program(ctx, program);
+}
+
+
+void GLAPIENTRY
+_mesa_ValidateProgramARB(GLhandleARB program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ validate_program(ctx, program);
+}
+
+#ifdef FEATURE_ES2
+
+void GLAPIENTRY
+_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
+ GLint* range, GLint* precision)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+
+void GLAPIENTRY
+_mesa_ReleaseShaderCompiler(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+
+void GLAPIENTRY
+_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
+ const void* binary, GLint length)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+#endif /* FEATURE_ES2 */
+
+
+#if FEATURE_ARB_geometry_shader4
+
+void GLAPIENTRY
+_mesa_ProgramParameteriARB(GLuint program, GLenum pname,
+ GLint value)
+{
+ struct gl_shader_program *shProg;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glProgramParameteri");
+ if (!shProg)
+ return;
+
+ switch (pname) {
+ case GL_GEOMETRY_VERTICES_OUT_ARB:
+ if (value < 1 ||
+ value > ctx->Const.GeometryProgram.MaxGeometryOutputVertices) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glProgramParameteri(GL_GEOMETRY_VERTICES_OUT_ARB=%d",
+ value);
+ return;
+ }
+ shProg->Geom.VerticesOut = value;
+ break;
+ case GL_GEOMETRY_INPUT_TYPE_ARB:
+ switch (value) {
+ case GL_POINTS:
+ case GL_LINES:
+ case GL_LINES_ADJACENCY_ARB:
+ case GL_TRIANGLES:
+ case GL_TRIANGLES_ADJACENCY_ARB:
+ shProg->Geom.InputType = value;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glProgramParameteri(geometry input type = %s",
+ _mesa_lookup_enum_by_nr(value));
+ return;
+ }
+ break;
+ case GL_GEOMETRY_OUTPUT_TYPE_ARB:
+ switch (value) {
+ case GL_POINTS:
+ case GL_LINE_STRIP:
+ case GL_TRIANGLE_STRIP:
+ shProg->Geom.OutputType = value;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glProgramParameteri(geometry output type = %s",
+ _mesa_lookup_enum_by_nr(value));
+ return;
+ }
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameteriARB(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
+ break;
+ }
+}
+
+#endif
+
+
+/**
+ * Plug in shader-related functions into API dispatch table.
+ */
+void
+_mesa_init_shader_dispatch(struct _glapi_table *exec)
+{
+#if FEATURE_GL
+ /* GL_ARB_vertex/fragment_shader */
+ SET_DeleteObjectARB(exec, _mesa_DeleteObjectARB);
+ SET_GetHandleARB(exec, _mesa_GetHandleARB);
+ SET_DetachObjectARB(exec, _mesa_DetachObjectARB);
+ SET_CreateShaderObjectARB(exec, _mesa_CreateShaderObjectARB);
+ SET_ShaderSourceARB(exec, _mesa_ShaderSourceARB);
+ SET_CompileShaderARB(exec, _mesa_CompileShaderARB);
+ SET_CreateProgramObjectARB(exec, _mesa_CreateProgramObjectARB);
+ SET_AttachObjectARB(exec, _mesa_AttachObjectARB);
+ SET_LinkProgramARB(exec, _mesa_LinkProgramARB);
+ SET_UseProgramObjectARB(exec, _mesa_UseProgramObjectARB);
+ SET_ValidateProgramARB(exec, _mesa_ValidateProgramARB);
+ SET_GetObjectParameterfvARB(exec, _mesa_GetObjectParameterfvARB);
+ SET_GetObjectParameterivARB(exec, _mesa_GetObjectParameterivARB);
+ SET_GetInfoLogARB(exec, _mesa_GetInfoLogARB);
+ SET_GetAttachedObjectsARB(exec, _mesa_GetAttachedObjectsARB);
+ SET_GetShaderSourceARB(exec, _mesa_GetShaderSourceARB);
+
+ /* OpenGL 2.0 */
+ SET_AttachShader(exec, _mesa_AttachShader);
+ SET_CreateProgram(exec, _mesa_CreateProgram);
+ SET_CreateShader(exec, _mesa_CreateShader);
+ SET_DeleteProgram(exec, _mesa_DeleteProgram);
+ SET_DeleteShader(exec, _mesa_DeleteShader);
+ SET_DetachShader(exec, _mesa_DetachShader);
+ SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders);
+ SET_GetProgramiv(exec, _mesa_GetProgramiv);
+ SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog);
+ SET_GetShaderiv(exec, _mesa_GetShaderiv);
+ SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog);
+ SET_IsProgram(exec, _mesa_IsProgram);
+ SET_IsShader(exec, _mesa_IsShader);
+
+#if FEATURE_ARB_vertex_shader
+ SET_BindAttribLocationARB(exec, _mesa_BindAttribLocationARB);
+ SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
+ SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
+#endif
+
+#if FEATURE_ARB_geometry_shader4
+ SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
+#endif
+#endif /* FEATURE_GL */
+}
+
diff --git a/mesalib/src/mesa/main/shaderapi.h b/mesalib/src/mesa/main/shaderapi.h
new file mode 100644
index 000000000..16e22530d
--- /dev/null
+++ b/mesalib/src/mesa/main/shaderapi.h
@@ -0,0 +1,169 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef SHADERAPI_H
+#define SHADERAPI_H
+
+
+#include "glheader.h"
+#include "mtypes.h"
+
+
+extern GLint
+_mesa_sizeof_glsl_type(GLenum type);
+
+extern void
+_mesa_copy_string(GLchar *dst, GLsizei maxLength,
+ GLsizei *length, const GLchar *src);
+
+extern void
+_mesa_use_program(GLcontext *ctx, GLuint program);
+
+
+extern void
+_mesa_init_shader_dispatch(struct _glapi_table *exec);
+
+
+
+extern void GLAPIENTRY
+_mesa_AttachObjectARB(GLhandleARB, GLhandleARB);
+
+extern void GLAPIENTRY
+_mesa_CompileShaderARB(GLhandleARB);
+
+extern GLhandleARB GLAPIENTRY
+_mesa_CreateProgramObjectARB(void);
+
+extern GLhandleARB GLAPIENTRY
+_mesa_CreateShaderObjectARB(GLenum type);
+
+extern void GLAPIENTRY
+_mesa_DeleteObjectARB(GLhandleARB obj);
+
+extern void GLAPIENTRY
+_mesa_DetachObjectARB(GLhandleARB, GLhandleARB);
+
+extern void GLAPIENTRY
+_mesa_GetAttachedObjectsARB(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
+
+extern GLhandleARB GLAPIENTRY
+_mesa_GetHandleARB(GLenum pname);
+
+extern void GLAPIENTRY
+_mesa_GetInfoLogARB(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+
+extern void GLAPIENTRY
+_mesa_GetObjectParameterfvARB(GLhandleARB, GLenum, GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_GetObjectParameterivARB(GLhandleARB, GLenum, GLint *);
+
+extern void GLAPIENTRY
+_mesa_GetShaderSourceARB(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsProgram(GLuint name);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsShader(GLuint name);
+
+extern void GLAPIENTRY
+_mesa_LinkProgramARB(GLhandleARB programObj);
+
+extern void GLAPIENTRY
+_mesa_ShaderSourceARB(GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
+
+extern void GLAPIENTRY
+_mesa_UseProgramObjectARB(GLhandleARB);
+
+extern void GLAPIENTRY
+_mesa_ValidateProgramARB(GLhandleARB);
+
+
+extern void GLAPIENTRY
+_mesa_BindAttribLocationARB(GLhandleARB, GLuint, const GLcharARB *);
+
+extern void GLAPIENTRY
+_mesa_GetActiveAttribARB(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *,
+ GLenum *, GLcharARB *);
+
+extern GLint GLAPIENTRY
+_mesa_GetAttribLocationARB(GLhandleARB, const GLcharARB *);
+
+
+
+extern void GLAPIENTRY
+_mesa_AttachShader(GLuint program, GLuint shader);
+
+extern GLuint GLAPIENTRY
+_mesa_CreateShader(GLenum);
+
+extern GLuint GLAPIENTRY
+_mesa_CreateProgram(void);
+
+extern void GLAPIENTRY
+_mesa_DeleteProgram(GLuint program);
+
+extern void GLAPIENTRY
+_mesa_DeleteShader(GLuint shader);
+
+extern void GLAPIENTRY
+_mesa_DetachShader(GLuint program, GLuint shader);
+
+extern void GLAPIENTRY
+_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
+ GLsizei *count, GLuint *obj);
+
+extern void GLAPIENTRY
+_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog);
+
+extern void GLAPIENTRY
+_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
+ GLsizei *length, GLchar *infoLog);
+
+
+extern void GLAPIENTRY
+_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
+ GLint *range, GLint *precision);
+
+extern void GLAPIENTRY
+_mesa_ReleaseShaderCompiler(void);
+
+extern void GLAPIENTRY
+_mesa_ShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat,
+ const void* binary, GLint length);
+
+extern void GLAPIENTRY
+_mesa_ProgramParameteriARB(GLuint program, GLenum pname,
+ GLint value);
+
+#endif /* SHADERAPI_H */
diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c
new file mode 100644
index 000000000..2de8f2798
--- /dev/null
+++ b/mesalib/src/mesa/main/shaderobj.c
@@ -0,0 +1,408 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file shaderobj.c
+ * \author Brian Paul
+ *
+ */
+
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/hash.h"
+#include "main/shaderobj.h"
+#include "program/program.h"
+#include "program/prog_parameter.h"
+#include "program/prog_uniform.h"
+#include "talloc.h"
+
+/**********************************************************************/
+/*** Shader object functions ***/
+/**********************************************************************/
+
+
+/**
+ * Set ptr to point to sh.
+ * If ptr is pointing to another shader, decrement its refcount (and delete
+ * if refcount hits zero).
+ * Then set ptr to point to sh, incrementing its refcount.
+ */
+void
+_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
+ struct gl_shader *sh)
+{
+ assert(ptr);
+ if (*ptr == sh) {
+ /* no-op */
+ return;
+ }
+ if (*ptr) {
+ /* Unreference the old shader */
+ GLboolean deleteFlag = GL_FALSE;
+ struct gl_shader *old = *ptr;
+
+ ASSERT(old->RefCount > 0);
+ old->RefCount--;
+ /*printf("SHADER DECR %p (%d) to %d\n",
+ (void*) old, old->Name, old->RefCount);*/
+ deleteFlag = (old->RefCount == 0);
+
+ if (deleteFlag) {
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ ctx->Driver.DeleteShader(ctx, old);
+ }
+
+ *ptr = NULL;
+ }
+ assert(!*ptr);
+
+ if (sh) {
+ /* reference new */
+ sh->RefCount++;
+ /*printf("SHADER INCR %p (%d) to %d\n",
+ (void*) sh, sh->Name, sh->RefCount);*/
+ *ptr = sh;
+ }
+}
+
+void
+_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader)
+{
+ shader->RefCount = 1;
+}
+
+/**
+ * Allocate a new gl_shader object, initialize it.
+ * Called via ctx->Driver.NewShader()
+ */
+struct gl_shader *
+_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type)
+{
+ struct gl_shader *shader;
+ assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
+ type == GL_GEOMETRY_SHADER_ARB);
+ shader = talloc_zero(NULL, struct gl_shader);
+ if (shader) {
+ shader->Type = type;
+ shader->Name = name;
+ _mesa_init_shader(ctx, shader);
+ }
+ return shader;
+}
+
+
+/**
+ * Delete a shader object.
+ * Called via ctx->Driver.DeleteShader().
+ */
+static void
+_mesa_delete_shader(GLcontext *ctx, struct gl_shader *sh)
+{
+ if (sh->Source)
+ free((void *) sh->Source);
+ _mesa_reference_program(ctx, &sh->Program, NULL);
+ talloc_free(sh);
+}
+
+
+/**
+ * Lookup a GLSL shader object.
+ */
+struct gl_shader *
+_mesa_lookup_shader(GLcontext *ctx, GLuint name)
+{
+ if (name) {
+ struct gl_shader *sh = (struct gl_shader *)
+ _mesa_HashLookup(ctx->Shared->ShaderObjects, name);
+ /* Note that both gl_shader and gl_shader_program objects are kept
+ * in the same hash table. Check the object's type to be sure it's
+ * what we're expecting.
+ */
+ if (sh && sh->Type == GL_SHADER_PROGRAM_MESA) {
+ return NULL;
+ }
+ return sh;
+ }
+ return NULL;
+}
+
+
+/**
+ * As above, but record an error if shader is not found.
+ */
+struct gl_shader *
+_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller)
+{
+ if (!name) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
+ return NULL;
+ }
+ else {
+ struct gl_shader *sh = (struct gl_shader *)
+ _mesa_HashLookup(ctx->Shared->ShaderObjects, name);
+ if (!sh) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
+ return NULL;
+ }
+ if (sh->Type == GL_SHADER_PROGRAM_MESA) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
+ return NULL;
+ }
+ return sh;
+ }
+}
+
+
+
+/**********************************************************************/
+/*** Shader Program object functions ***/
+/**********************************************************************/
+
+
+/**
+ * Set ptr to point to shProg.
+ * If ptr is pointing to another object, decrement its refcount (and delete
+ * if refcount hits zero).
+ * Then set ptr to point to shProg, incrementing its refcount.
+ */
+void
+_mesa_reference_shader_program(GLcontext *ctx,
+ struct gl_shader_program **ptr,
+ struct gl_shader_program *shProg)
+{
+ assert(ptr);
+ if (*ptr == shProg) {
+ /* no-op */
+ return;
+ }
+ if (*ptr) {
+ /* Unreference the old shader program */
+ GLboolean deleteFlag = GL_FALSE;
+ struct gl_shader_program *old = *ptr;
+
+ ASSERT(old->RefCount > 0);
+ old->RefCount--;
+#if 0
+ printf("ShaderProgram %p ID=%u RefCount-- to %d\n",
+ (void *) old, old->Name, old->RefCount);
+#endif
+ deleteFlag = (old->RefCount == 0);
+
+ if (deleteFlag) {
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ ctx->Driver.DeleteShaderProgram(ctx, old);
+ }
+
+ *ptr = NULL;
+ }
+ assert(!*ptr);
+
+ if (shProg) {
+ shProg->RefCount++;
+#if 0
+ printf("ShaderProgram %p ID=%u RefCount++ to %d\n",
+ (void *) shProg, shProg->Name, shProg->RefCount);
+#endif
+ *ptr = shProg;
+ }
+}
+
+void
+_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog)
+{
+ prog->Type = GL_SHADER_PROGRAM_MESA;
+ prog->RefCount = 1;
+ prog->Attributes = _mesa_new_parameter_list();
+#if FEATURE_ARB_geometry_shader4
+ prog->Geom.VerticesOut = 0;
+ prog->Geom.InputType = GL_TRIANGLES;
+ prog->Geom.OutputType = GL_TRIANGLE_STRIP;
+#endif
+}
+
+/**
+ * Allocate a new gl_shader_program object, initialize it.
+ * Called via ctx->Driver.NewShaderProgram()
+ */
+static struct gl_shader_program *
+_mesa_new_shader_program(GLcontext *ctx, GLuint name)
+{
+ struct gl_shader_program *shProg;
+ shProg = talloc_zero(NULL, struct gl_shader_program);
+ if (shProg) {
+ shProg->Name = name;
+ _mesa_init_shader_program(ctx, shProg);
+ }
+ return shProg;
+}
+
+
+/**
+ * Clear (free) the shader program state that gets produced by linking.
+ */
+void
+_mesa_clear_shader_program_data(GLcontext *ctx,
+ struct gl_shader_program *shProg)
+{
+ _mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL);
+ _mesa_reference_fragprog(ctx, &shProg->FragmentProgram, NULL);
+ _mesa_reference_geomprog(ctx, &shProg->GeometryProgram, NULL);
+
+ if (shProg->Uniforms) {
+ _mesa_free_uniform_list(shProg->Uniforms);
+ shProg->Uniforms = NULL;
+ }
+
+ if (shProg->Varying) {
+ _mesa_free_parameter_list(shProg->Varying);
+ shProg->Varying = NULL;
+ }
+}
+
+
+/**
+ * Free all the data that hangs off a shader program object, but not the
+ * object itself.
+ */
+void
+_mesa_free_shader_program_data(GLcontext *ctx,
+ struct gl_shader_program *shProg)
+{
+ GLuint i;
+
+ assert(shProg->Type == GL_SHADER_PROGRAM_MESA);
+
+ _mesa_clear_shader_program_data(ctx, shProg);
+
+ if (shProg->Attributes) {
+ _mesa_free_parameter_list(shProg->Attributes);
+ shProg->Attributes = NULL;
+ }
+
+ /* detach shaders */
+ for (i = 0; i < shProg->NumShaders; i++) {
+ _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL);
+ }
+ shProg->NumShaders = 0;
+
+ if (shProg->Shaders) {
+ free(shProg->Shaders);
+ shProg->Shaders = NULL;
+ }
+
+ if (shProg->InfoLog) {
+ talloc_free(shProg->InfoLog);
+ shProg->InfoLog = NULL;
+ }
+
+ /* Transform feedback varying vars */
+ for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
+ free(shProg->TransformFeedback.VaryingNames[i]);
+ }
+ free(shProg->TransformFeedback.VaryingNames);
+ shProg->TransformFeedback.VaryingNames = NULL;
+ shProg->TransformFeedback.NumVarying = 0;
+
+
+ for (i = 0; i < shProg->_NumLinkedShaders; i++) {
+ ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[i]);
+ }
+ shProg->_NumLinkedShaders = 0;
+}
+
+
+/**
+ * Free/delete a shader program object.
+ * Called via ctx->Driver.DeleteShaderProgram().
+ */
+static void
+_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
+{
+ _mesa_free_shader_program_data(ctx, shProg);
+
+ talloc_free(shProg);
+}
+
+
+/**
+ * Lookup a GLSL program object.
+ */
+struct gl_shader_program *
+_mesa_lookup_shader_program(GLcontext *ctx, GLuint name)
+{
+ struct gl_shader_program *shProg;
+ if (name) {
+ shProg = (struct gl_shader_program *)
+ _mesa_HashLookup(ctx->Shared->ShaderObjects, name);
+ /* Note that both gl_shader and gl_shader_program objects are kept
+ * in the same hash table. Check the object's type to be sure it's
+ * what we're expecting.
+ */
+ if (shProg && shProg->Type != GL_SHADER_PROGRAM_MESA) {
+ return NULL;
+ }
+ return shProg;
+ }
+ return NULL;
+}
+
+
+/**
+ * As above, but record an error if program is not found.
+ */
+struct gl_shader_program *
+_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name,
+ const char *caller)
+{
+ if (!name) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
+ return NULL;
+ }
+ else {
+ struct gl_shader_program *shProg = (struct gl_shader_program *)
+ _mesa_HashLookup(ctx->Shared->ShaderObjects, name);
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
+ return NULL;
+ }
+ if (shProg->Type != GL_SHADER_PROGRAM_MESA) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
+ return NULL;
+ }
+ return shProg;
+ }
+}
+
+
+void
+_mesa_init_shader_object_functions(struct dd_function_table *driver)
+{
+ driver->NewShader = _mesa_new_shader;
+ driver->DeleteShader = _mesa_delete_shader;
+ driver->NewShaderProgram = _mesa_new_shader_program;
+ driver->DeleteShaderProgram = _mesa_delete_shader_program;
+ driver->CompileShader = _mesa_ir_compile_shader;
+ driver->LinkShader = _mesa_ir_link_shader;
+}
diff --git a/mesalib/src/mesa/main/shaderobj.h b/mesalib/src/mesa/main/shaderobj.h
new file mode 100644
index 000000000..cbe7ae7b0
--- /dev/null
+++ b/mesalib/src/mesa/main/shaderobj.h
@@ -0,0 +1,134 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.3
+ *
+ * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef SHADEROBJ_H
+#define SHADEROBJ_H
+
+
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "program/ir_to_mesa.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/**
+ * Internal functions
+ */
+
+extern void
+_mesa_init_shader_state(GLcontext * ctx);
+
+extern void
+_mesa_free_shader_state(GLcontext *ctx);
+
+
+extern void
+_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
+ struct gl_shader *sh);
+
+extern struct gl_shader *
+_mesa_lookup_shader(GLcontext *ctx, GLuint name);
+
+extern struct gl_shader *
+_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller);
+
+
+
+extern void
+_mesa_reference_shader_program(GLcontext *ctx,
+ struct gl_shader_program **ptr,
+ struct gl_shader_program *shProg);
+extern void
+_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader);
+
+extern struct gl_shader *
+_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
+
+extern void
+_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog);
+
+extern struct gl_shader_program *
+_mesa_lookup_shader_program(GLcontext *ctx, GLuint name);
+
+extern struct gl_shader_program *
+_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name,
+ const char *caller);
+
+extern void
+_mesa_clear_shader_program_data(GLcontext *ctx,
+ struct gl_shader_program *shProg);
+
+extern void
+_mesa_free_shader_program_data(GLcontext *ctx,
+ struct gl_shader_program *shProg);
+
+
+
+extern void
+_mesa_init_shader_object_functions(struct dd_function_table *driver);
+
+extern void
+_mesa_init_shader_state(GLcontext *ctx);
+
+extern void
+_mesa_free_shader_state(GLcontext *ctx);
+
+static INLINE GLuint
+_mesa_shader_type_to_index(GLenum v)
+{
+ switch(v)
+ {
+ case GL_VERTEX_SHADER:
+ return MESA_SHADER_VERTEX;
+ case GL_FRAGMENT_SHADER:
+ return MESA_SHADER_FRAGMENT;
+ case GL_GEOMETRY_SHADER:
+ return MESA_SHADER_GEOMETRY;
+ default:
+ ASSERT(0);
+ return ~0;
+ }
+}
+
+static INLINE GLenum
+_mesa_shader_index_to_type(GLuint i)
+{
+ GLenum enums[MESA_SHADER_TYPES] = {
+ GL_VERTEX_SHADER,
+ GL_FRAGMENT_SHADER,
+ GL_GEOMETRY_SHADER ,
+ };
+ if(i >= MESA_SHADER_TYPES)
+ return 0;
+ else
+ return enums[i];
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SHADEROBJ_H */
diff --git a/mesalib/src/mesa/main/shaders.c b/mesalib/src/mesa/main/shaders.c
deleted file mode 100644
index f382680b4..000000000
--- a/mesalib/src/mesa/main/shaders.c
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.3
- *
- * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include "glheader.h"
-#include "context.h"
-#include "shaders.h"
-#include "shader/shader_api.h"
-
-
-/** Define this to enable shader substitution (see below) */
-#define SHADER_SUBST 0
-
-
-
-/**
- * These are basically just wrappers/adaptors for calling the
- * ctx->Driver.foobar() GLSL-related functions.
- *
- * Things are biased toward the OpenGL 2.0 functions rather than the
- * ARB extensions (i.e. the ARB functions are layered on the 2.0 functions).
- *
- * The general idea here is to allow enough modularity such that a
- * completely different GLSL implemenation can be plugged in and co-exist
- * with Mesa's native GLSL code.
- */
-
-
-
-void GLAPIENTRY
-_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.AttachShader(ctx, program, shader);
-}
-
-
-void GLAPIENTRY
-_mesa_AttachShader(GLuint program, GLuint shader)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.AttachShader(ctx, program, shader);
-}
-
-
-void GLAPIENTRY
-_mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
- const GLcharARB *name)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.BindAttribLocation(ctx, program, index, name);
-}
-
-
-void GLAPIENTRY
-_mesa_CompileShaderARB(GLhandleARB shaderObj)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.CompileShader(ctx, shaderObj);
-}
-
-
-GLuint GLAPIENTRY
-_mesa_CreateShader(GLenum type)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.CreateShader(ctx, type);
-}
-
-
-GLhandleARB GLAPIENTRY
-_mesa_CreateShaderObjectARB(GLenum type)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.CreateShader(ctx, type);
-}
-
-
-GLuint GLAPIENTRY
-_mesa_CreateProgram(void)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.CreateProgram(ctx);
-}
-
-
-GLhandleARB GLAPIENTRY
-_mesa_CreateProgramObjectARB(void)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.CreateProgram(ctx);
-}
-
-
-void GLAPIENTRY
-_mesa_DeleteObjectARB(GLhandleARB obj)
-{
- if (obj) {
- GET_CURRENT_CONTEXT(ctx);
- if (ctx->Driver.IsProgram(ctx, obj)) {
- ctx->Driver.DeleteProgram2(ctx, obj);
- }
- else if (ctx->Driver.IsShader(ctx, obj)) {
- ctx->Driver.DeleteShader(ctx, obj);
- }
- else {
- /* error? */
- }
- }
-}
-
-
-void GLAPIENTRY
-_mesa_DeleteProgram(GLuint name)
-{
- if (name) {
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.DeleteProgram2(ctx, name);
- }
-}
-
-
-void GLAPIENTRY
-_mesa_DeleteShader(GLuint name)
-{
- if (name) {
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.DeleteShader(ctx, name);
- }
-}
-
-
-void GLAPIENTRY
-_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.DetachShader(ctx, program, shader);
-}
-
-
-void GLAPIENTRY
-_mesa_DetachShader(GLuint program, GLuint shader)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.DetachShader(ctx, program, shader);
-}
-
-
-void GLAPIENTRY
-_mesa_GetActiveAttribARB(GLhandleARB program, GLuint index,
- GLsizei maxLength, GLsizei * length, GLint * size,
- GLenum * type, GLcharARB * name)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetActiveAttrib(ctx, program, index, maxLength, length, size,
- type, name);
-}
-
-
-void GLAPIENTRY
-_mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
- GLsizei maxLength, GLsizei * length, GLint * size,
- GLenum * type, GLcharARB * name)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetActiveUniform(ctx, program, index, maxLength, length, size,
- type, name);
-}
-
-
-void GLAPIENTRY
-_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
- GLsizei * count, GLhandleARB * obj)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetAttachedShaders(ctx, container, maxCount, count, obj);
-}
-
-
-void GLAPIENTRY
-_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
- GLsizei *count, GLuint *obj)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetAttachedShaders(ctx, program, maxCount, count, obj);
-}
-
-
-GLint GLAPIENTRY
-_mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.GetAttribLocation(ctx, program, name);
-}
-
-
-void GLAPIENTRY
-_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
- GLcharARB * infoLog)
-{
- GET_CURRENT_CONTEXT(ctx);
- /* Implement in terms of GetProgramInfoLog, GetShaderInfoLog */
- if (ctx->Driver.IsProgram(ctx, object)) {
- ctx->Driver.GetProgramInfoLog(ctx, object, maxLength, length, infoLog);
- }
- else if (ctx->Driver.IsShader(ctx, object)) {
- ctx->Driver.GetShaderInfoLog(ctx, object, maxLength, length, infoLog);
- }
- else {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetInfoLogARB");
- }
-}
-
-
-void GLAPIENTRY
-_mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- /* Implement in terms of GetProgramiv, GetShaderiv */
- if (ctx->Driver.IsProgram(ctx, object)) {
- if (pname == GL_OBJECT_TYPE_ARB) {
- *params = GL_PROGRAM_OBJECT_ARB;
- }
- else {
- ctx->Driver.GetProgramiv(ctx, object, pname, params);
- }
- }
- else if (ctx->Driver.IsShader(ctx, object)) {
- if (pname == GL_OBJECT_TYPE_ARB) {
- *params = GL_SHADER_OBJECT_ARB;
- }
- else {
- ctx->Driver.GetShaderiv(ctx, object, pname, params);
- }
- }
- else {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB");
- }
-}
-
-
-void GLAPIENTRY
-_mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname,
- GLfloat *params)
-{
- GLint iparams[1]; /* XXX is one element enough? */
- _mesa_GetObjectParameterivARB(object, pname, iparams);
- params[0] = (GLfloat) iparams[0];
-}
-
-
-void GLAPIENTRY
-_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetProgramiv(ctx, program, pname, params);
-}
-
-
-void GLAPIENTRY
-_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetShaderiv(ctx, shader, pname, params);
-}
-
-
-void GLAPIENTRY
-_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetProgramInfoLog(ctx, program, bufSize, length, infoLog);
-}
-
-
-void GLAPIENTRY
-_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetShaderInfoLog(ctx, shader, bufSize, length, infoLog);
-}
-
-
-void GLAPIENTRY
-_mesa_GetShaderSourceARB(GLhandleARB shader, GLsizei maxLength,
- GLsizei *length, GLcharARB *sourceOut)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetShaderSource(ctx, shader, maxLength, length, sourceOut);
-}
-
-
-void GLAPIENTRY
-_mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat * params)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetUniformfv(ctx, program, location, params);
-}
-
-
-void GLAPIENTRY
-_mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.GetUniformiv(ctx, program, location, params);
-}
-
-
-
-#if 0
-GLint GLAPIENTRY
-_mesa_GetUniformLocation(GLuint program, const GLcharARB *name)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.GetUniformLocation(ctx, program, name);
-}
-#endif
-
-
-GLhandleARB GLAPIENTRY
-_mesa_GetHandleARB(GLenum pname)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.GetHandle(ctx, pname);
-}
-
-
-GLint GLAPIENTRY
-_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.GetUniformLocation(ctx, programObj, name);
-}
-
-
-GLboolean GLAPIENTRY
-_mesa_IsProgram(GLuint name)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.IsProgram(ctx, name);
-}
-
-
-GLboolean GLAPIENTRY
-_mesa_IsShader(GLuint name)
-{
- GET_CURRENT_CONTEXT(ctx);
- return ctx->Driver.IsShader(ctx, name);
-}
-
-
-void GLAPIENTRY
-_mesa_LinkProgramARB(GLhandleARB programObj)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.LinkProgram(ctx, programObj);
-}
-
-
-
-/**
- * Read shader source code from a file.
- * Useful for debugging to override an app's shader.
- */
-static GLcharARB *
-_mesa_read_shader(const char *fname)
-{
- const int max = 50*1000;
- FILE *f = fopen(fname, "r");
- GLcharARB *buffer, *shader;
- int len;
-
- if (!f) {
- return NULL;
- }
-
- buffer = (char *) malloc(max);
- len = fread(buffer, 1, max, f);
- buffer[len] = 0;
-
- fclose(f);
-
- shader = _mesa_strdup(buffer);
- free(buffer);
-
- return shader;
-}
-
-
-/**
- * Called via glShaderSource() and glShaderSourceARB() API functions.
- * Basically, concatenate the source code strings into one long string
- * and pass it to ctx->Driver.ShaderSource().
- */
-void GLAPIENTRY
-_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
- const GLcharARB ** string, const GLint * length)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint *offsets;
- GLsizei i, totalLength;
- GLcharARB *source;
- GLuint checksum;
-
- if (!shaderObj || string == NULL) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB");
- return;
- }
-
- /*
- * This array holds offsets of where the appropriate string ends, thus the
- * last element will be set to the total length of the source code.
- */
- offsets = (GLint *) malloc(count * sizeof(GLint));
- if (offsets == NULL) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
- return;
- }
-
- for (i = 0; i < count; i++) {
- if (string[i] == NULL) {
- free((GLvoid *) offsets);
- _mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)");
- return;
- }
- if (length == NULL || length[i] < 0)
- offsets[i] = strlen(string[i]);
- else
- offsets[i] = length[i];
- /* accumulate string lengths */
- if (i > 0)
- offsets[i] += offsets[i - 1];
- }
-
- /* Total length of source string is sum off all strings plus two.
- * One extra byte for terminating zero, another extra byte to silence
- * valgrind warnings in the parser/grammer code.
- */
- totalLength = offsets[count - 1] + 2;
- source = (GLcharARB *) malloc(totalLength * sizeof(GLcharARB));
- if (source == NULL) {
- free((GLvoid *) offsets);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
- return;
- }
-
- for (i = 0; i < count; i++) {
- GLint start = (i > 0) ? offsets[i - 1] : 0;
- memcpy(source + start, string[i],
- (offsets[i] - start) * sizeof(GLcharARB));
- }
- source[totalLength - 1] = '\0';
- source[totalLength - 2] = '\0';
-
- if (SHADER_SUBST) {
- /* Compute the shader's source code checksum then try to open a file
- * named newshader_<CHECKSUM>. If it exists, use it in place of the
- * original shader source code. For debugging.
- */
- char filename[100];
- GLcharARB *newSource;
-
- checksum = _mesa_str_checksum(source);
-
- sprintf(filename, "newshader_%d", checksum);
-
- newSource = _mesa_read_shader(filename);
- if (newSource) {
- fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n",
- shaderObj, checksum, filename);
- free(source);
- source = newSource;
- }
- }
-
- ctx->Driver.ShaderSource(ctx, shaderObj, source);
-
- if (SHADER_SUBST) {
- struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj);
- if (sh)
- sh->SourceChecksum = checksum; /* save original checksum */
- }
-
- free(offsets);
-}
-
-
-void GLAPIENTRY
-_mesa_Uniform1fARB(GLint location, GLfloat v0)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, 1, &v0, GL_FLOAT);
-}
-
-void GLAPIENTRY
-_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLfloat v[2];
- v[0] = v0;
- v[1] = v1;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC2);
-}
-
-void GLAPIENTRY
-_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLfloat v[3];
- v[0] = v0;
- v[1] = v1;
- v[2] = v2;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC3);
-}
-
-void GLAPIENTRY
-_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
- GLfloat v3)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLfloat v[4];
- v[0] = v0;
- v[1] = v1;
- v[2] = v2;
- v[3] = v3;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC4);
-}
-
-void GLAPIENTRY
-_mesa_Uniform1iARB(GLint location, GLint v0)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, 1, &v0, GL_INT);
-}
-
-void GLAPIENTRY
-_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint v[2];
- v[0] = v0;
- v[1] = v1;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC2);
-}
-
-void GLAPIENTRY
-_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint v[3];
- v[0] = v0;
- v[1] = v1;
- v[2] = v2;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC3);
-}
-
-void GLAPIENTRY
-_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint v[4];
- v[0] = v0;
- v[1] = v1;
- v[2] = v2;
- v[3] = v3;
- ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC4);
-}
-
-void GLAPIENTRY
-_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT);
-}
-
-void GLAPIENTRY
-_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC2);
-}
-
-void GLAPIENTRY
-_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC3);
-}
-
-void GLAPIENTRY
-_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC4);
-}
-
-void GLAPIENTRY
-_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_INT);
-}
-
-void GLAPIENTRY
-_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC2);
-}
-
-void GLAPIENTRY
-_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC3);
-}
-
-void GLAPIENTRY
-_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC4);
-}
-
-
-void GLAPIENTRY
-_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 2, 2, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 3, 3, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat * value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 4, 4, location, count, transpose, value);
-}
-
-
-/**
- * Non-square UniformMatrix are OpenGL 2.1
- */
-void GLAPIENTRY
-_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 2, 3, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 3, 2, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 2, 4, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 4, 2, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 3, 4, location, count, transpose, value);
-}
-
-void GLAPIENTRY
-_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.UniformMatrix(ctx, 4, 3, location, count, transpose, value);
-}
-
-
-void GLAPIENTRY
-_mesa_UseProgramObjectARB(GLhandleARB program)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- ctx->Driver.UseProgram(ctx, program);
-}
-
-
-void GLAPIENTRY
-_mesa_ValidateProgramARB(GLhandleARB program)
-{
- GET_CURRENT_CONTEXT(ctx);
- ctx->Driver.ValidateProgram(ctx, program);
-}
-
diff --git a/mesalib/src/mesa/main/shaders.h b/mesalib/src/mesa/main/shaders.h
deleted file mode 100644
index 17339ccf6..000000000
--- a/mesalib/src/mesa/main/shaders.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5.3
- *
- * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef SHADERS_H
-#define SHADERS_H
-
-
-#include "glheader.h"
-#include "mtypes.h"
-
-
-extern void GLAPIENTRY
-_mesa_DeleteObjectARB(GLhandleARB obj);
-
-extern GLhandleARB GLAPIENTRY
-_mesa_GetHandleARB(GLenum pname);
-
-extern void GLAPIENTRY
-_mesa_DetachObjectARB (GLhandleARB, GLhandleARB);
-
-extern GLhandleARB GLAPIENTRY
-_mesa_CreateShaderObjectARB (GLenum);
-
-extern void GLAPIENTRY
-_mesa_ShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
-
-extern void GLAPIENTRY
-_mesa_CompileShaderARB (GLhandleARB);
-
-extern GLhandleARB GLAPIENTRY
-_mesa_CreateProgramObjectARB (void);
-
-extern void GLAPIENTRY
-_mesa_AttachObjectARB (GLhandleARB, GLhandleARB);
-
-extern void GLAPIENTRY
-_mesa_LinkProgramARB (GLhandleARB);
-
-extern void GLAPIENTRY
-_mesa_UseProgramObjectARB (GLhandleARB);
-
-extern void GLAPIENTRY
-_mesa_ValidateProgramARB (GLhandleARB);
-
-extern void GLAPIENTRY
-_mesa_Uniform1fARB (GLint, GLfloat);
-
-extern void GLAPIENTRY
-_mesa_Uniform2fARB (GLint, GLfloat, GLfloat);
-
-extern void GLAPIENTRY
-_mesa_Uniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
-
-extern void GLAPIENTRY
-_mesa_Uniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
-
-extern void GLAPIENTRY
-_mesa_Uniform1iARB (GLint, GLint);
-
-extern void GLAPIENTRY
-_mesa_Uniform2iARB (GLint, GLint, GLint);
-
-extern void GLAPIENTRY
-_mesa_Uniform3iARB (GLint, GLint, GLint, GLint);
-
-extern void GLAPIENTRY
-_mesa_Uniform4iARB (GLint, GLint, GLint, GLint, GLint);
-
-extern void GLAPIENTRY
-_mesa_Uniform1fvARB (GLint, GLsizei, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_Uniform2fvARB (GLint, GLsizei, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_Uniform3fvARB (GLint, GLsizei, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_Uniform4fvARB (GLint, GLsizei, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_Uniform1ivARB (GLint, GLsizei, const GLint *);
-
-extern void GLAPIENTRY
-_mesa_Uniform2ivARB (GLint, GLsizei, const GLint *);
-
-extern void GLAPIENTRY
-_mesa_Uniform3ivARB (GLint, GLsizei, const GLint *);
-
-extern void GLAPIENTRY
-_mesa_Uniform4ivARB (GLint, GLsizei, const GLint *);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_GetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_GetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
-
-extern void GLAPIENTRY
-_mesa_GetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
-
-extern void GLAPIENTRY
-_mesa_GetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
-
-extern GLint GLAPIENTRY
-_mesa_GetUniformLocationARB (GLhandleARB, const GLcharARB *);
-
-extern void GLAPIENTRY
-_mesa_GetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
-
-extern void GLAPIENTRY
-_mesa_GetUniformfvARB (GLhandleARB, GLint, GLfloat *);
-
-extern void GLAPIENTRY
-_mesa_GetUniformivARB (GLhandleARB, GLint, GLint *);
-
-extern void GLAPIENTRY
-_mesa_GetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
-
-#if FEATURE_ARB_vertex_shader
-
-extern void GLAPIENTRY
-_mesa_BindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
-
-extern void GLAPIENTRY
-_mesa_GetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
-
-extern GLint GLAPIENTRY
-_mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *);
-
-#endif /* FEATURE_ARB_vertex_shader */
-
-
-/* 2.0 */
-extern void GLAPIENTRY
-_mesa_AttachShader(GLuint program, GLuint shader);
-
-extern GLuint GLAPIENTRY
-_mesa_CreateShader(GLenum);
-
-extern GLuint GLAPIENTRY
-_mesa_CreateProgram(void);
-
-extern void GLAPIENTRY
-_mesa_DeleteProgram(GLuint program);
-
-extern void GLAPIENTRY
-_mesa_DeleteShader(GLuint shader);
-
-extern void GLAPIENTRY
-_mesa_DetachShader(GLuint program, GLuint shader);
-
-extern void GLAPIENTRY
-_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
- GLsizei *count, GLuint *obj);
-
-extern void GLAPIENTRY
-_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
-
-extern void GLAPIENTRY
-_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
-
-extern GLboolean GLAPIENTRY
-_mesa_IsProgram(GLuint program);
-
-extern GLboolean GLAPIENTRY
-_mesa_IsShader(GLuint shader);
-
-
-
-/* 2.1 */
-extern void GLAPIENTRY
-_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *value);
-
-
-#endif /* SHADERS_H */
diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c
index e364e2404..a56c70fa7 100644
--- a/mesalib/src/mesa/main/shared.c
+++ b/mesalib/src/mesa/main/shared.c
@@ -32,18 +32,15 @@
#include "imports.h"
#include "mtypes.h"
#include "hash.h"
-#include "arrayobj.h"
+#if FEATURE_ATI_fragment_shader
+#include "atifragshader.h"
+#endif
#include "bufferobj.h"
#include "shared.h"
-#include "shader/program.h"
-#include "shader/shader_api.h"
+#include "program/program.h"
#include "dlist.h"
-#if FEATURE_ATI_fragment_shader
-#include "shader/atifragshader.h"
-#endif
-#if FEATURE_ARB_sync
+#include "shaderobj.h"
#include "syncobj.h"
-#endif
/**
* Allocate and initialize a shared context state structure.
@@ -123,9 +120,7 @@ _mesa_alloc_shared_state(GLcontext *ctx)
shared->RenderBuffers = _mesa_NewHashTable();
#endif
-#if FEATURE_ARB_sync
make_empty_list(& shared->SyncObjects);
-#endif
return shared;
}
@@ -228,12 +223,12 @@ delete_shader_cb(GLuint id, void *data, void *userData)
GLcontext *ctx = (GLcontext *) userData;
struct gl_shader *sh = (struct gl_shader *) data;
if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) {
- _mesa_free_shader(ctx, sh);
+ ctx->Driver.DeleteShader(ctx, sh);
}
else {
struct gl_shader_program *shProg = (struct gl_shader_program *) data;
ASSERT(shProg->Type == GL_SHADER_PROGRAM_MESA);
- _mesa_free_shader_program(ctx, shProg);
+ ctx->Driver.DeleteShaderProgram(ctx, shProg);
}
}
@@ -289,6 +284,10 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
{
GLuint i;
+ /* Free the dummy/fallback texture object */
+ if (shared->FallbackTex)
+ ctx->Driver.DeleteTexture(ctx, shared->FallbackTex);
+
/*
* Free display lists
*/
@@ -334,7 +333,6 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
_mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL);
#endif
-#if FEATURE_ARB_sync
{
struct simple_node *node;
struct simple_node *temp;
@@ -343,7 +341,6 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
_mesa_unref_sync_object(ctx, (struct gl_sync_object *) node);
}
}
-#endif
/*
* Free texture objects (after FBOs since some textures might have
diff --git a/mesalib/src/mesa/main/shared.h b/mesalib/src/mesa/main/shared.h
index ef164a145..5166a0ce5 100644
--- a/mesalib/src/mesa/main/shared.h
+++ b/mesalib/src/mesa/main/shared.h
@@ -25,6 +25,7 @@
#ifndef SHARED_H
#define SHARED_H
+#include "mtypes.h"
struct gl_shared_state *
_mesa_alloc_shared_state(GLcontext *ctx);
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index b971cc976..4a3dffe4c 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -41,8 +41,8 @@
#include "light.h"
#include "matrix.h"
#include "pixel.h"
-#include "shader/program.h"
-#include "shader/prog_parameter.h"
+#include "program/program.h"
+#include "program/prog_parameter.h"
#include "state.h"
#include "stencil.h"
#include "texenvprogram.h"
@@ -250,6 +250,7 @@ update_program(GLcontext *ctx)
const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
+ const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
GLbitfield new_state = 0x0;
/*
@@ -291,6 +292,15 @@ update_program(GLcontext *ctx)
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
+ if (shProg && shProg->LinkStatus && shProg->GeometryProgram) {
+ /* Use shader programs */
+ _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
+ shProg->GeometryProgram);
+ } else {
+ /* no fragment program */
+ _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
+ }
+
/* Examine vertex program after fragment program as
* _mesa_get_fixed_func_vertex_program() needs to know active
* fragprog inputs.
@@ -327,7 +337,15 @@ update_program(GLcontext *ctx)
(struct gl_program *) ctx->FragmentProgram._Current);
}
}
-
+
+ if (ctx->GeometryProgram._Current != prevGP) {
+ new_state |= _NEW_PROGRAM;
+ if (ctx->Driver.BindProgram) {
+ ctx->Driver.BindProgram(ctx, MESA_GEOMETRY_PROGRAM,
+ (struct gl_program *) ctx->GeometryProgram._Current);
+ }
+ }
+
if (ctx->VertexProgram._Current != prevVP) {
new_state |= _NEW_PROGRAM;
if (ctx->Driver.BindProgram) {
@@ -356,6 +374,16 @@ update_program_constants(GLcontext *ctx)
}
}
+ if (ctx->GeometryProgram._Current) {
+ const struct gl_program_parameter_list *params =
+ ctx->GeometryProgram._Current->Base.Parameters;
+ /*FIXME: StateFlags is always 0 because we have unnamed constant
+ * not state changes */
+ if (params /*&& params->StateFlags & ctx->NewState*/) {
+ new_state |= _NEW_PROGRAM_CONSTANTS;
+ }
+ }
+
if (ctx->VertexProgram._Current) {
const struct gl_program_parameter_list *params =
ctx->VertexProgram._Current->Base.Parameters;
@@ -537,7 +565,7 @@ _mesa_update_state_locked( GLcontext *ctx )
/* Determine which state flags effect vertex/fragment program state */
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
- prog_flags |= (_NEW_TEXTURE | _NEW_FOG |
+ prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE | _NEW_FOG |
_NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE |
_NEW_PROGRAM);
}
diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c
index 5b7aaa1d0..791092d9d 100644
--- a/mesalib/src/mesa/main/syncobj.c
+++ b/mesalib/src/mesa/main/syncobj.c
@@ -59,6 +59,8 @@
#include "imports.h"
#include "context.h"
#include "macros.h"
+#include "get.h"
+#include "dispatch.h"
#if FEATURE_ARB_sync
#include "syncobj.h"
@@ -136,6 +138,19 @@ _mesa_init_sync_object_functions(struct dd_function_table *driver)
}
+void GLAPIENTRY
+_mesa_init_sync_dispatch(struct _glapi_table *disp)
+{
+ SET_IsSync(disp, _mesa_IsSync);
+ SET_DeleteSync(disp, _mesa_DeleteSync);
+ SET_FenceSync(disp, _mesa_FenceSync);
+ SET_ClientWaitSync(disp, _mesa_ClientWaitSync);
+ SET_WaitSync(disp, _mesa_WaitSync);
+ SET_GetInteger64v(disp, _mesa_GetInteger64v);
+ SET_GetSynciv(disp, _mesa_GetSynciv);
+}
+
+
/**
* Allocate/init the context state related to sync objects.
*/
diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h
index 161ea4411..326df650f 100644
--- a/mesalib/src/mesa/main/syncobj.h
+++ b/mesalib/src/mesa/main/syncobj.h
@@ -31,12 +31,19 @@
#ifndef SYNCOBJ_H
#define SYNCOBJ_H
-#include "context.h"
+#include "main/mtypes.h"
+
+struct dd_function_table;
+
+#if FEATURE_ARB_sync
extern void GLAPIENTRY
_mesa_init_sync_object_functions(struct dd_function_table *driver);
extern void GLAPIENTRY
+_mesa_init_sync_dispatch(struct _glapi_table *disp);
+
+extern void GLAPIENTRY
_mesa_init_sync(GLcontext *);
extern void GLAPIENTRY
@@ -67,4 +74,42 @@ extern void GLAPIENTRY
_mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length,
GLint *values);
+#else /* FEATURE_ARB_sync */
+
+#include "main/compiler.h"
+
+static INLINE void
+_mesa_init_sync_object_functions(struct dd_function_table *driver)
+{
+}
+
+static INLINE void
+_mesa_init_sync_dispatch(struct _glapi_table *disp)
+{
+}
+
+static INLINE void
+_mesa_init_sync(GLcontext *ctx)
+{
+}
+
+static INLINE void
+_mesa_free_sync_data(GLcontext *ctx)
+{
+}
+
+static INLINE void
+_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+{
+ ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+{
+ ASSERT_NO_FEATURE();
+}
+
+#endif /* FEATURE_ARB_sync */
+
#endif /* SYNCOBJ_H */
diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c
index cff6de89e..e911524cb 100644
--- a/mesalib/src/mesa/main/texcompress.c
+++ b/mesalib/src/mesa/main/texcompress.c
@@ -33,7 +33,6 @@
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
-#include "context.h"
#include "formats.h"
#include "texcompress.h"
@@ -107,6 +106,24 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all)
}
#endif /* FEATURE_EXT_texture_sRGB */
return n;
+
+#if FEATURE_ES1 || FEATURE_ES2
+ if (formats) {
+ formats[n++] = GL_PALETTE4_RGB8_OES;
+ formats[n++] = GL_PALETTE4_RGBA8_OES;
+ formats[n++] = GL_PALETTE4_R5_G6_B5_OES;
+ formats[n++] = GL_PALETTE4_RGBA4_OES;
+ formats[n++] = GL_PALETTE4_RGB5_A1_OES;
+ formats[n++] = GL_PALETTE8_RGB8_OES;
+ formats[n++] = GL_PALETTE8_RGBA8_OES;
+ formats[n++] = GL_PALETTE8_R5_G6_B5_OES;
+ formats[n++] = GL_PALETTE8_RGBA4_OES;
+ formats[n++] = GL_PALETTE8_RGB5_A1_OES;
+ }
+ else {
+ n += 10;
+ }
+#endif
}
diff --git a/mesalib/src/mesa/main/texcompress_fxt1.c b/mesalib/src/mesa/main/texcompress_fxt1.c
index 04acf05e5..c8b45bd3a 100644
--- a/mesalib/src/mesa/main/texcompress_fxt1.c
+++ b/mesalib/src/mesa/main/texcompress_fxt1.c
@@ -32,9 +32,9 @@
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
-#include "context.h"
#include "convolve.h"
#include "image.h"
+#include "macros.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
diff --git a/mesalib/src/mesa/main/texcompress_fxt1.h b/mesalib/src/mesa/main/texcompress_fxt1.h
index d63ca71e2..38048b26c 100644
--- a/mesalib/src/mesa/main/texcompress_fxt1.h
+++ b/mesalib/src/mesa/main/texcompress_fxt1.h
@@ -25,9 +25,11 @@
#ifndef TEXCOMPRESS_FXT1_H
#define TEXCOMPRESS_FXT1_H
-#include "main/mtypes.h"
+#include "glheader.h"
#include "texstore.h"
+struct gl_texture_image;
+
#if FEATURE_texture_fxt1
extern GLboolean
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c
index fcd28a4b4..45a2f9c17 100644
--- a/mesalib/src/mesa/main/texcompress_s3tc.c
+++ b/mesalib/src/mesa/main/texcompress_s3tc.c
@@ -36,10 +36,10 @@
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
-#include "context.h"
#include "convolve.h"
#include "dlopen.h"
#include "image.h"
+#include "macros.h"
#include "texcompress.h"
#include "texcompress_s3tc.h"
#include "texstore.h"
@@ -48,7 +48,7 @@
#if FEATURE_texture_s3tc
-#ifdef __MINGW32__
+#if defined(_WIN32) || defined(WIN32)
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
#define RTLD_GLOBAL 0
@@ -78,7 +78,7 @@ nonlinear_to_linear(GLubyte cs8)
table[i] = cs / 12.92f;
}
else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
@@ -149,7 +149,6 @@ _mesa_init_texture_s3tc( GLcontext *ctx )
}
if (dxtlibhandle) {
ctx->Mesa_DXTn = GL_TRUE;
- _mesa_warning(ctx, "software DXTn compression/decompression available");
}
#else
(void) ctx;
@@ -168,7 +167,8 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1);
+ ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1 ||
+ dstFormat == MESA_FORMAT_SRGB_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -231,7 +231,8 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -293,7 +294,8 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT3);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -354,7 +356,8 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT5);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
diff --git a/mesalib/src/mesa/main/texenv.c b/mesalib/src/mesa/main/texenv.c
index 4442fb8cf..3a55128c7 100644
--- a/mesalib/src/mesa/main/texenv.c
+++ b/mesalib/src/mesa/main/texenv.c
@@ -196,57 +196,34 @@ set_combiner_source(GLcontext *ctx,
/*
* Translate pname to (term, alpha).
+ *
+ * The enums were given sequential values for a reason.
*/
switch (pname) {
case GL_SOURCE0_RGB:
- term = 0;
- alpha = GL_FALSE;
- break;
case GL_SOURCE1_RGB:
- term = 1;
- alpha = GL_FALSE;
- break;
case GL_SOURCE2_RGB:
- term = 2;
- alpha = GL_FALSE;
- break;
case GL_SOURCE3_RGB_NV:
- if (ctx->Extensions.NV_texture_env_combine4) {
- term = 3;
- alpha = GL_FALSE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
+ term = pname - GL_SOURCE0_RGB;
+ alpha = GL_FALSE;
break;
case GL_SOURCE0_ALPHA:
- term = 0;
- alpha = GL_TRUE;
- break;
case GL_SOURCE1_ALPHA:
- term = 1;
- alpha = GL_TRUE;
- break;
case GL_SOURCE2_ALPHA:
- term = 2;
- alpha = GL_TRUE;
- break;
case GL_SOURCE3_ALPHA_NV:
- if (ctx->Extensions.NV_texture_env_combine4) {
- term = 3;
- alpha = GL_TRUE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
+ term = pname - GL_SOURCE0_ALPHA;
+ alpha = GL_TRUE;
break;
default:
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
return;
}
+ if ((term == 3) && !ctx->Extensions.NV_texture_env_combine4) {
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
+ return;
+ }
+
assert(term < MAX_COMBINER_TERMS);
/*
@@ -310,68 +287,33 @@ set_combiner_operand(GLcontext *ctx,
return;
}
+ /* The enums were given sequential values for a reason.
+ */
switch (pname) {
case GL_OPERAND0_RGB:
- term = 0;
- alpha = GL_FALSE;
- break;
case GL_OPERAND1_RGB:
- term = 1;
- alpha = GL_FALSE;
- break;
case GL_OPERAND2_RGB:
- if (ctx->Extensions.ARB_texture_env_combine) {
- term = 2;
- alpha = GL_FALSE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
- break;
case GL_OPERAND3_RGB_NV:
- if (ctx->Extensions.NV_texture_env_combine4) {
- term = 3;
- alpha = GL_FALSE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
+ term = pname - GL_OPERAND0_RGB;
+ alpha = GL_FALSE;
break;
case GL_OPERAND0_ALPHA:
- term = 0;
- alpha = GL_TRUE;
- break;
case GL_OPERAND1_ALPHA:
- term = 1;
- alpha = GL_TRUE;
- break;
case GL_OPERAND2_ALPHA:
- if (ctx->Extensions.ARB_texture_env_combine) {
- term = 2;
- alpha = GL_TRUE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
- break;
case GL_OPERAND3_ALPHA_NV:
- if (ctx->Extensions.NV_texture_env_combine4) {
- term = 3;
- alpha = GL_TRUE;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
+ term = pname - GL_OPERAND0_ALPHA;
+ alpha = GL_TRUE;
break;
default:
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
return;
}
+ if ((term == 3) && !ctx->Extensions.NV_texture_env_combine4) {
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
+ return;
+ }
+
assert(term < MAX_COMBINER_TERMS);
/*
@@ -380,10 +322,23 @@ set_combiner_operand(GLcontext *ctx,
switch (param) {
case GL_SRC_COLOR:
case GL_ONE_MINUS_SRC_COLOR:
- legal = !alpha;
+ /* The color input can only be used with GL_OPERAND[01]_RGB in the EXT
+ * version. In the ARB and NV versions they can be used for any RGB
+ * operand.
+ */
+ legal = !alpha
+ && ((term < 2) || ctx->Extensions.ARB_texture_env_combine
+ || ctx->Extensions.NV_texture_env_combine4);
break;
- case GL_SRC_ALPHA:
case GL_ONE_MINUS_SRC_ALPHA:
+ /* GL_ONE_MINUS_SRC_ALPHA can only be used with
+ * GL_OPERAND[01]_(RGB|ALPHA) in the EXT version. In the ARB and NV
+ * versions it can be used for any operand.
+ */
+ legal = (term < 2) || ctx->Extensions.ARB_texture_env_combine
+ || ctx->Extensions.NV_texture_env_combine4;
+ break;
+ case GL_SRC_ALPHA:
legal = GL_TRUE;
break;
default:
diff --git a/mesalib/src/mesa/main/texenvprogram.c b/mesalib/src/mesa/main/texenvprogram.c
index 964ba13c7..20f02cefe 100644
--- a/mesalib/src/mesa/main/texenvprogram.c
+++ b/mesalib/src/mesa/main/texenvprogram.c
@@ -28,13 +28,13 @@
#include "glheader.h"
#include "imports.h"
-#include "shader/program.h"
-#include "shader/prog_parameter.h"
-#include "shader/prog_cache.h"
-#include "shader/prog_instruction.h"
-#include "shader/prog_print.h"
-#include "shader/prog_statevars.h"
-#include "shader/programopt.h"
+#include "program/program.h"
+#include "program/prog_parameter.h"
+#include "program/prog_cache.h"
+#include "program/prog_instruction.h"
+#include "program/prog_print.h"
+#include "program/prog_statevars.h"
+#include "program/programopt.h"
#include "texenvprogram.h"
@@ -98,6 +98,7 @@ struct state_key {
GLuint fog_enabled:1;
GLuint fog_mode:2; /**< FOG_x */
GLuint inputs_available:12;
+ GLuint num_draw_buffers:4;
/* NOTE: This array of structs must be last! (see "keySize" below) */
struct {
@@ -485,6 +486,9 @@ static GLuint make_state_key( GLcontext *ctx, struct state_key *key )
inputs_referenced |= FRAG_BIT_FOGC; /* maybe */
}
+ /* _NEW_BUFFERS */
+ key->num_draw_buffers = ctx->DrawBuffer->_NumColorDrawBuffers;
+
key->inputs_available = (inputs_available & inputs_referenced);
/* compute size of state key, ignoring unused texture units */
@@ -903,7 +907,7 @@ static struct ureg get_zero( struct texenv_fragment_program *p )
static void program_error( struct texenv_fragment_program *p, const char *msg )
{
- _mesa_problem(NULL, msg);
+ _mesa_problem(NULL, "%s", msg);
p->error = 1;
}
@@ -1199,11 +1203,14 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
else
alpha_saturate = GL_FALSE;
- /* If this is the very last calculation, emit direct to output reg:
+ /* If this is the very last calculation (and various other conditions
+ * are met), emit directly to the color output register. Otherwise,
+ * emit to a temporary register.
*/
if (key->separate_specular ||
unit != p->last_tex_stage ||
alpha_shift ||
+ key->num_draw_buffers != 1 ||
rgb_shift)
dest = get_temp( p );
else
@@ -1438,10 +1445,10 @@ create_new_program(GLcontext *ctx, struct state_key *key,
p.program->Base.Parameters = _mesa_new_parameter_list();
p.program->Base.InputsRead = 0x0;
- if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
+ if (key->num_draw_buffers == 1)
p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
else {
- for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++)
+ for (i = 0; i < key->num_draw_buffers; i++)
p.program->Base.OutputsWritten |= (1 << (FRAG_RESULT_DATA0 + i));
}
@@ -1493,8 +1500,8 @@ create_new_program(GLcontext *ctx, struct state_key *key,
cf = get_source( &p, SRC_PREVIOUS, 0 );
- for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
- if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
+ for (i = 0; i < key->num_draw_buffers; i++) {
+ if (key->num_draw_buffers == 1)
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR );
else {
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_DATA0 + i );
diff --git a/mesalib/src/mesa/main/texfetch.c b/mesalib/src/mesa/main/texfetch.c
index b37039429..c03bc71cd 100644
--- a/mesalib/src/mesa/main/texfetch.c
+++ b/mesalib/src/mesa/main/texfetch.c
@@ -34,7 +34,7 @@
#include "colormac.h"
-#include "context.h"
+#include "macros.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_s3tc.h"
@@ -60,7 +60,7 @@ nonlinear_to_linear(GLubyte cs8)
table[i] = cs / 12.92f;
}
else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
@@ -115,7 +115,7 @@ static void store_null_texel(struct gl_texture_image *texImage,
* XXX this is somewhat temporary.
*/
static struct {
- GLuint Name;
+ gl_format Name;
FetchTexelFuncF Fetch1D;
FetchTexelFuncF Fetch2D;
FetchTexelFuncF Fetch3D;
@@ -124,222 +124,13 @@ static struct {
texfetch_funcs[MESA_FORMAT_COUNT] =
{
{
- MESA_FORMAT_SRGB8,
- fetch_texel_1d_srgb8,
- fetch_texel_2d_srgb8,
- fetch_texel_3d_srgb8,
- store_texel_srgb8
- },
- {
- MESA_FORMAT_SRGBA8,
- fetch_texel_1d_srgba8,
- fetch_texel_2d_srgba8,
- fetch_texel_3d_srgba8,
- store_texel_srgba8
- },
- {
- MESA_FORMAT_SARGB8,
- fetch_texel_1d_sargb8,
- fetch_texel_2d_sargb8,
- fetch_texel_3d_sargb8,
- store_texel_sargb8
- },
- {
- MESA_FORMAT_SL8,
- fetch_texel_1d_sl8,
- fetch_texel_2d_sl8,
- fetch_texel_3d_sl8,
- store_texel_sl8
- },
- {
- MESA_FORMAT_SLA8,
- fetch_texel_1d_sla8,
- fetch_texel_2d_sla8,
- fetch_texel_3d_sla8,
- store_texel_sla8
- },
- {
- MESA_FORMAT_RGB_FXT1,
- NULL,
- _mesa_fetch_texel_2d_f_rgb_fxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGBA_FXT1,
- NULL,
- _mesa_fetch_texel_2d_f_rgba_fxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGB_DXT1,
- NULL,
- _mesa_fetch_texel_2d_f_rgb_dxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGBA_DXT1,
- NULL,
- _mesa_fetch_texel_2d_f_rgba_dxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGBA_DXT3,
- NULL,
- _mesa_fetch_texel_2d_f_rgba_dxt3,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGBA_DXT5,
- NULL,
- _mesa_fetch_texel_2d_f_rgba_dxt5,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_SRGB_DXT1,
- NULL,
- _mesa_fetch_texel_2d_f_srgb_dxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_SRGBA_DXT1,
- NULL,
- _mesa_fetch_texel_2d_f_srgba_dxt1,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_SRGBA_DXT3,
- NULL,
- _mesa_fetch_texel_2d_f_srgba_dxt3,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_SRGBA_DXT5,
- NULL,
- _mesa_fetch_texel_2d_f_srgba_dxt5,
- NULL,
- NULL
- },
- {
- MESA_FORMAT_RGBA_FLOAT32,
- fetch_texel_1d_f_rgba_f32,
- fetch_texel_2d_f_rgba_f32,
- fetch_texel_3d_f_rgba_f32,
- store_texel_rgba_f32
- },
- {
- MESA_FORMAT_RGBA_FLOAT16,
- fetch_texel_1d_f_rgba_f16,
- fetch_texel_2d_f_rgba_f16,
- fetch_texel_3d_f_rgba_f16,
- store_texel_rgba_f16
- },
- {
- MESA_FORMAT_RGB_FLOAT32,
- fetch_texel_1d_f_rgb_f32,
- fetch_texel_2d_f_rgb_f32,
- fetch_texel_3d_f_rgb_f32,
- store_texel_rgb_f32
- },
- {
- MESA_FORMAT_RGB_FLOAT16,
- fetch_texel_1d_f_rgb_f16,
- fetch_texel_2d_f_rgb_f16,
- fetch_texel_3d_f_rgb_f16,
- store_texel_rgb_f16
- },
- {
- MESA_FORMAT_ALPHA_FLOAT32,
- fetch_texel_1d_f_alpha_f32,
- fetch_texel_2d_f_alpha_f32,
- fetch_texel_3d_f_alpha_f32,
- store_texel_alpha_f32
- },
- {
- MESA_FORMAT_ALPHA_FLOAT16,
- fetch_texel_1d_f_alpha_f16,
- fetch_texel_2d_f_alpha_f16,
- fetch_texel_3d_f_alpha_f16,
- store_texel_alpha_f16
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT32,
- fetch_texel_1d_f_luminance_f32,
- fetch_texel_2d_f_luminance_f32,
- fetch_texel_3d_f_luminance_f32,
- store_texel_luminance_f32
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT16,
- fetch_texel_1d_f_luminance_f16,
- fetch_texel_2d_f_luminance_f16,
- fetch_texel_3d_f_luminance_f16,
- store_texel_luminance_f16
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
- fetch_texel_1d_f_luminance_alpha_f32,
- fetch_texel_2d_f_luminance_alpha_f32,
- fetch_texel_3d_f_luminance_alpha_f32,
- store_texel_luminance_alpha_f32
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
- fetch_texel_1d_f_luminance_alpha_f16,
- fetch_texel_2d_f_luminance_alpha_f16,
- fetch_texel_3d_f_luminance_alpha_f16,
- store_texel_luminance_alpha_f16
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT32,
- fetch_texel_1d_f_intensity_f32,
- fetch_texel_2d_f_intensity_f32,
- fetch_texel_3d_f_intensity_f32,
- store_texel_intensity_f32
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT16,
- fetch_texel_1d_f_intensity_f16,
- fetch_texel_2d_f_intensity_f16,
- fetch_texel_3d_f_intensity_f16,
- store_texel_intensity_f16
- },
- {
- MESA_FORMAT_DUDV8,
- fetch_texel_1d_dudv8,
- fetch_texel_2d_dudv8,
- fetch_texel_3d_dudv8,
- NULL
- },
- {
- MESA_FORMAT_SIGNED_RGBA8888,
- fetch_texel_1d_signed_rgba8888,
- fetch_texel_2d_signed_rgba8888,
- fetch_texel_3d_signed_rgba8888,
- store_texel_signed_rgba8888
- },
- {
- MESA_FORMAT_SIGNED_RGBA8888_REV,
- fetch_texel_1d_signed_rgba8888_rev,
- fetch_texel_2d_signed_rgba8888_rev,
- fetch_texel_3d_signed_rgba8888_rev,
- store_texel_signed_rgba8888_rev
- },
- {
- MESA_FORMAT_SIGNED_RGBA_16,
- NULL, /* XXX to do */
- NULL,
- NULL,
- NULL
+ MESA_FORMAT_NONE,
+ fetch_null_texelf,
+ fetch_null_texelf,
+ fetch_null_texelf,
+ store_null_texel
},
+
{
MESA_FORMAT_RGBA8888,
fetch_texel_1d_f_rgba8888,
@@ -563,6 +354,330 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
fetch_texel_2d_f_z32,
fetch_texel_3d_f_z32,
store_texel_z32
+ },
+ {
+ MESA_FORMAT_S8,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGB8,
+ fetch_texel_1d_srgb8,
+ fetch_texel_2d_srgb8,
+ fetch_texel_3d_srgb8,
+ store_texel_srgb8
+ },
+ {
+ MESA_FORMAT_SRGBA8,
+ fetch_texel_1d_srgba8,
+ fetch_texel_2d_srgba8,
+ fetch_texel_3d_srgba8,
+ store_texel_srgba8
+ },
+ {
+ MESA_FORMAT_SARGB8,
+ fetch_texel_1d_sargb8,
+ fetch_texel_2d_sargb8,
+ fetch_texel_3d_sargb8,
+ store_texel_sargb8
+ },
+ {
+ MESA_FORMAT_SL8,
+ fetch_texel_1d_sl8,
+ fetch_texel_2d_sl8,
+ fetch_texel_3d_sl8,
+ store_texel_sl8
+ },
+ {
+ MESA_FORMAT_SLA8,
+ fetch_texel_1d_sla8,
+ fetch_texel_2d_sla8,
+ fetch_texel_3d_sla8,
+ store_texel_sla8
+ },
+ {
+ MESA_FORMAT_SRGB_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgb_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT3,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt3,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT5,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt5,
+ NULL,
+ NULL
+ },
+
+ {
+ MESA_FORMAT_RGB_FXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgb_fxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_FXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_fxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGB_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgb_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT3,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt3,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT5,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt5,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT32,
+ fetch_texel_1d_f_rgba_f32,
+ fetch_texel_2d_f_rgba_f32,
+ fetch_texel_3d_f_rgba_f32,
+ store_texel_rgba_f32
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT16,
+ fetch_texel_1d_f_rgba_f16,
+ fetch_texel_2d_f_rgba_f16,
+ fetch_texel_3d_f_rgba_f16,
+ store_texel_rgba_f16
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT32,
+ fetch_texel_1d_f_rgb_f32,
+ fetch_texel_2d_f_rgb_f32,
+ fetch_texel_3d_f_rgb_f32,
+ store_texel_rgb_f32
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT16,
+ fetch_texel_1d_f_rgb_f16,
+ fetch_texel_2d_f_rgb_f16,
+ fetch_texel_3d_f_rgb_f16,
+ store_texel_rgb_f16
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT32,
+ fetch_texel_1d_f_alpha_f32,
+ fetch_texel_2d_f_alpha_f32,
+ fetch_texel_3d_f_alpha_f32,
+ store_texel_alpha_f32
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT16,
+ fetch_texel_1d_f_alpha_f16,
+ fetch_texel_2d_f_alpha_f16,
+ fetch_texel_3d_f_alpha_f16,
+ store_texel_alpha_f16
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT32,
+ fetch_texel_1d_f_luminance_f32,
+ fetch_texel_2d_f_luminance_f32,
+ fetch_texel_3d_f_luminance_f32,
+ store_texel_luminance_f32
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT16,
+ fetch_texel_1d_f_luminance_f16,
+ fetch_texel_2d_f_luminance_f16,
+ fetch_texel_3d_f_luminance_f16,
+ store_texel_luminance_f16
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
+ fetch_texel_1d_f_luminance_alpha_f32,
+ fetch_texel_2d_f_luminance_alpha_f32,
+ fetch_texel_3d_f_luminance_alpha_f32,
+ store_texel_luminance_alpha_f32
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
+ fetch_texel_1d_f_luminance_alpha_f16,
+ fetch_texel_2d_f_luminance_alpha_f16,
+ fetch_texel_3d_f_luminance_alpha_f16,
+ store_texel_luminance_alpha_f16
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT32,
+ fetch_texel_1d_f_intensity_f32,
+ fetch_texel_2d_f_intensity_f32,
+ fetch_texel_3d_f_intensity_f32,
+ store_texel_intensity_f32
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT16,
+ fetch_texel_1d_f_intensity_f16,
+ fetch_texel_2d_f_intensity_f16,
+ fetch_texel_3d_f_intensity_f16,
+ store_texel_intensity_f16
+ },
+
+ /* non-normalized, signed int */
+ {
+ MESA_FORMAT_RGBA_INT8,
+ fetch_texel_1d_rgba_int8,
+ fetch_texel_2d_rgba_int8,
+ fetch_texel_3d_rgba_int8,
+ store_texel_rgba_int8
+ },
+ {
+ MESA_FORMAT_RGBA_INT16,
+ fetch_texel_1d_rgba_int16,
+ fetch_texel_2d_rgba_int16,
+ fetch_texel_3d_rgba_int16,
+ store_texel_rgba_int16
+ },
+ {
+ MESA_FORMAT_RGBA_INT32,
+ fetch_texel_1d_rgba_int32,
+ fetch_texel_2d_rgba_int32,
+ fetch_texel_3d_rgba_int32,
+ store_texel_rgba_int32
+ },
+
+ /* non-normalized, unsigned int */
+ {
+ MESA_FORMAT_RGBA_UINT8,
+ fetch_texel_1d_rgba_uint8,
+ fetch_texel_2d_rgba_uint8,
+ fetch_texel_3d_rgba_uint8,
+ store_texel_rgba_uint8
+ },
+ {
+ MESA_FORMAT_RGBA_UINT16,
+ fetch_texel_1d_rgba_uint16,
+ fetch_texel_2d_rgba_uint16,
+ fetch_texel_3d_rgba_uint16,
+ store_texel_rgba_uint16
+ },
+ {
+ MESA_FORMAT_RGBA_UINT32,
+ fetch_texel_1d_rgba_uint32,
+ fetch_texel_2d_rgba_uint32,
+ fetch_texel_3d_rgba_uint32,
+ store_texel_rgba_uint32
+ },
+
+ /* dudv */
+ {
+ MESA_FORMAT_DUDV8,
+ fetch_texel_1d_dudv8,
+ fetch_texel_2d_dudv8,
+ fetch_texel_3d_dudv8,
+ NULL
+ },
+
+ /* signed, normalized */
+ {
+ MESA_FORMAT_SIGNED_R8,
+ fetch_texel_1d_signed_r8,
+ fetch_texel_2d_signed_r8,
+ fetch_texel_3d_signed_r8,
+ store_texel_signed_r8
+ },
+ {
+ MESA_FORMAT_SIGNED_RG88,
+ fetch_texel_1d_signed_rg88,
+ fetch_texel_2d_signed_rg88,
+ fetch_texel_3d_signed_rg88,
+ store_texel_signed_rg88
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBX8888,
+ fetch_texel_1d_signed_rgbx8888,
+ fetch_texel_2d_signed_rgbx8888,
+ fetch_texel_3d_signed_rgbx8888,
+ store_texel_signed_rgbx8888
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888,
+ fetch_texel_1d_signed_rgba8888,
+ fetch_texel_2d_signed_rgba8888,
+ fetch_texel_3d_signed_rgba8888,
+ store_texel_signed_rgba8888
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888_REV,
+ fetch_texel_1d_signed_rgba8888_rev,
+ fetch_texel_2d_signed_rgba8888_rev,
+ fetch_texel_3d_signed_rgba8888_rev,
+ store_texel_signed_rgba8888_rev
+ },
+ {
+ MESA_FORMAT_SIGNED_R_16,
+ fetch_texel_1d_signed_r_16,
+ fetch_texel_2d_signed_r_16,
+ fetch_texel_3d_signed_r_16,
+ store_texel_signed_r_16
+ },
+ {
+ MESA_FORMAT_SIGNED_RG_16,
+ fetch_texel_1d_signed_rg_16,
+ fetch_texel_2d_signed_rg_16,
+ fetch_texel_3d_signed_rg_16,
+ store_texel_signed_rg_16
+ },
+ {
+ MESA_FORMAT_SIGNED_RGB_16,
+ fetch_texel_1d_signed_rgb_16,
+ fetch_texel_2d_signed_rgb_16,
+ fetch_texel_3d_signed_rgb_16,
+ store_texel_signed_rgb_16
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA_16,
+ fetch_texel_1d_signed_rgba_16,
+ fetch_texel_2d_signed_rgba_16,
+ fetch_texel_3d_signed_rgba_16,
+ store_texel_signed_rgba_16
+ },
+ {
+ MESA_FORMAT_RGBA_16,
+ fetch_texel_1d_rgba_16,
+ fetch_texel_2d_rgba_16,
+ fetch_texel_3d_rgba_16,
+ store_texel_rgba_16
}
};
@@ -570,49 +685,39 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
static FetchTexelFuncF
_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
{
- FetchTexelFuncF f = NULL;
- GLuint i;
- /* XXX replace loop with direct table lookup */
- for (i = 0; i < MESA_FORMAT_COUNT; i++) {
- if (texfetch_funcs[i].Name == format) {
- switch (dims) {
- case 1:
- f = texfetch_funcs[i].Fetch1D;
- break;
- case 2:
- f = texfetch_funcs[i].Fetch2D;
- break;
- case 3:
- f = texfetch_funcs[i].Fetch3D;
- break;
- }
- if (!f)
- f = fetch_null_texelf;
- return f;
- }
+#ifdef DEBUG
+ /* check that the table entries are sorted by format name */
+ gl_format fmt;
+ for (fmt = 0; fmt < MESA_FORMAT_COUNT; fmt++) {
+ assert(texfetch_funcs[fmt].Name == fmt);
+ }
+#endif
+
+ assert(Elements(texfetch_funcs) == MESA_FORMAT_COUNT);
+ assert(format < MESA_FORMAT_COUNT);
+
+ switch (dims) {
+ case 1:
+ return texfetch_funcs[format].Fetch1D;
+ case 2:
+ return texfetch_funcs[format].Fetch2D;
+ case 3:
+ return texfetch_funcs[format].Fetch3D;
+ default:
+ assert(0 && "bad dims in _mesa_get_texel_fetch_func");
+ return NULL;
}
- return NULL;
}
StoreTexelFunc
_mesa_get_texel_store_func(gl_format format)
{
- GLuint i;
- /* XXX replace loop with direct table lookup */
- for (i = 0; i < MESA_FORMAT_COUNT; i++) {
- if (texfetch_funcs[i].Name == format) {
- if (texfetch_funcs[i].StoreTexel)
- return texfetch_funcs[i].StoreTexel;
- else
- return store_null_texel;
- }
- }
- return NULL;
+ assert(format < MESA_FORMAT_COUNT);
+ return texfetch_funcs[format].StoreTexel;
}
-
/**
* Adaptor for fetching a GLchan texel from a float-valued texture.
*/
diff --git a/mesalib/src/mesa/main/texfetch_tmp.h b/mesalib/src/mesa/main/texfetch_tmp.h
index b11ed5c39..f94355437 100644
--- a/mesalib/src/mesa/main/texfetch_tmp.h
+++ b/mesalib/src/mesa/main/texfetch_tmp.h
@@ -1195,6 +1195,174 @@ static void store_texel_sla8(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_RGBA_INT8 **************************************************/
+
+static void
+FETCH(rgba_int8)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_int8(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLbyte *rgba = (const GLbyte *) texel;
+ GLbyte *dst = TEXEL_ADDR(GLbyte, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_RGBA_INT16 **************************************************/
+
+static void
+FETCH(rgba_int16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLshort *src = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_int16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLshort *rgba = (const GLshort *) texel;
+ GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_RGBA_INT32 **************************************************/
+
+static void
+FETCH(rgba_int32)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLint *src = TEXEL_ADDR(GLint, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_int32(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLint *rgba = (const GLint *) texel;
+ GLint *dst = TEXEL_ADDR(GLint, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_RGBA_UINT8 **************************************************/
+
+static void
+FETCH(rgba_uint8)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_uint8(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_RGBA_UINT16 **************************************************/
+
+static void
+FETCH(rgba_uint16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_uint16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_RGBA_UINT32 **************************************************/
+
+static void
+FETCH(rgba_uint32)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 4);
+ texel[RCOMP] = (GLfloat) src[0];
+ texel[GCOMP] = (GLfloat) src[1];
+ texel[BCOMP] = (GLfloat) src[2];
+ texel[ACOMP] = (GLfloat) src[3];
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_uint32(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLuint *rgba = (const GLuint *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
/* MESA_FORMAT_DUDV8 ********************************************************/
/* this format by definition produces 0,0,0,1 as rgba values,
@@ -1209,6 +1377,76 @@ static void FETCH(dudv8)(const struct gl_texture_image *texImage,
texel[ACOMP] = 0;
}
+
+/* MESA_FORMAT_SIGNED_R8 ***********************************************/
+
+static void FETCH(signed_r8)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX( s );
+ texel[GCOMP] = 0.0F;
+ texel[BCOMP] = 0.0F;
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void store_texel_signed_r8(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLbyte *rgba = (const GLbyte *) texel;
+ GLbyte *dst = TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
+ *dst = rgba[RCOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_SIGNED_RG88 ***********************************************/
+
+static void FETCH(signed_rg88)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLushort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) );
+ texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s & 0xff) );
+ texel[BCOMP] = 0.0F;
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void store_texel_signed_rg88(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLbyte *rg = (const GLbyte *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 2);
+ *dst = PACK_COLOR_88(rg[RCOMP], rg[GCOMP]);
+}
+#endif
+
+
+/* MESA_FORMAT_SIGNED_RGBX8888 ***********************************************/
+
+static void FETCH(signed_rgbx8888)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) );
+ texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) );
+ texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) );
+ texel[ACOMP] = 1.0f;
+}
+
+#if DIM == 3
+static void store_texel_signed_rgbx8888(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLbyte *rgba = (const GLbyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_8888(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], 255);
+}
+#endif
+
+
/* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/
static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage,
@@ -1253,6 +1491,142 @@ static void store_texel_signed_rgba8888_rev(struct gl_texture_image *texImage,
+/* MESA_FORMAT_SIGNED_R_16 ***********************************************/
+
+static void
+FETCH(signed_r_16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
+ texel[RCOMP] = SHORT_TO_FLOAT_TEX( s );
+ texel[GCOMP] = 0.0F;
+ texel[BCOMP] = 0.0F;
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void
+store_texel_signed_r_16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLshort *rgba = (const GLshort *) texel;
+ GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
+ *dst = rgba[0];
+}
+#endif
+
+
+/* MESA_FORMAT_SIGNED_RG_16 ***********************************************/
+
+static void
+FETCH(signed_rg_16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 2);
+ texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] );
+ texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] );
+ texel[BCOMP] = 0.0F;
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void
+store_texel_signed_rg_16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLshort *rgba = (const GLshort *) texel;
+ GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 2);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
+
+static void
+FETCH(signed_rgb_16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 3);
+ texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] );
+ texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] );
+ texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[2] );
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void
+store_texel_signed_rgb_16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLshort *rgba = (const GLshort *) texel;
+ GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 3);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+}
+#endif
+
+
+/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
+
+static void
+FETCH(signed_rgba_16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
+ texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] );
+ texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] );
+ texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[2] );
+ texel[ACOMP] = SHORT_TO_FLOAT_TEX( s[3] );
+}
+
+#if DIM == 3
+static void
+store_texel_signed_rgba_16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLshort *rgba = (const GLshort *) texel;
+ GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+
+/* MESA_FORMAT_RGBA_16 ***********************************************/
+
+static void
+FETCH(rgba_16)(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ const GLushort *s = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
+ texel[RCOMP] = USHORT_TO_FLOAT( s[0] );
+ texel[GCOMP] = USHORT_TO_FLOAT( s[1] );
+ texel[BCOMP] = USHORT_TO_FLOAT( s[2] );
+ texel[ACOMP] = USHORT_TO_FLOAT( s[3] );
+}
+
+#if DIM == 3
+static void
+store_texel_rgba_16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
+ dst[0] = rgba[RCOMP];
+ dst[1] = rgba[GCOMP];
+ dst[2] = rgba[BCOMP];
+ dst[3] = rgba[ACOMP];
+}
+#endif
+
+
+
/* MESA_FORMAT_YCBCR *********************************************************/
/* Fetch texel from 1D, 2D or 3D ycbcr texture, return 4 GLfloats.
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c
index 096945a64..b9271ef58 100644
--- a/mesalib/src/mesa/main/texformat.c
+++ b/mesalib/src/mesa/main/texformat.c
@@ -61,12 +61,9 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
(void) type;
switch (internalFormat) {
- /* RGBA formats */
+ /* shallow RGBA formats */
case 4:
case GL_RGBA:
- case GL_RGB10_A2:
- case GL_RGBA12:
- case GL_RGBA16:
case GL_RGBA8:
return MESA_FORMAT_RGBA8888;
case GL_RGB5_A1:
@@ -76,12 +73,15 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGBA4:
return MESA_FORMAT_ARGB4444;
- /* RGB formats */
+ /* deep RGBA formats */
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ return MESA_FORMAT_RGBA_16;
+
+ /* shallow RGB formats */
case 3:
case GL_RGB:
- case GL_RGB10:
- case GL_RGB12:
- case GL_RGB16:
case GL_RGB8:
return MESA_FORMAT_RGB888;
case GL_R3_G3_B2:
@@ -91,6 +91,12 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGB5:
return MESA_FORMAT_RGB565;
+ /* deep RGB formats */
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ return MESA_FORMAT_RGBA_16;
+
/* Alpha formats */
case GL_ALPHA:
case GL_ALPHA4:
@@ -294,6 +300,32 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
}
}
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor >= 31) {
+ switch (internalFormat) {
+ case GL_RED_SNORM:
+ case GL_R8_SNORM:
+ return MESA_FORMAT_SIGNED_R8;
+ case GL_RG_SNORM:
+ case GL_RG8_SNORM:
+ return MESA_FORMAT_SIGNED_RG88;
+ case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
+ return MESA_FORMAT_SIGNED_RGBX8888;
+ case GL_RGBA_SNORM:
+ case GL_RGBA8_SNORM:
+ return MESA_FORMAT_SIGNED_RGBA8888;
+ case GL_R16_SNORM:
+ return MESA_FORMAT_SIGNED_R_16;
+ case GL_RG16_SNORM:
+ return MESA_FORMAT_SIGNED_RG_16;
+ case GL_RGB16_SNORM:
+ return MESA_FORMAT_SIGNED_RGB_16;
+ case GL_RGBA16_SNORM:
+ return MESA_FORMAT_SIGNED_RGBA_16;
+ default:
+ ; /* fall-through */
+ }
+ }
#if FEATURE_EXT_texture_sRGB
if (ctx->Extensions.EXT_texture_sRGB) {
@@ -350,6 +382,53 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
}
#endif /* FEATURE_EXT_texture_sRGB */
+ if (ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ return MESA_FORMAT_RGBA_UINT32;
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ return MESA_FORMAT_RGBA_UINT16;
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ return MESA_FORMAT_RGBA_UINT8;
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ return MESA_FORMAT_RGBA_INT32;
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ return MESA_FORMAT_RGBA_INT16;
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ return MESA_FORMAT_RGBA_INT8;
+ }
+ }
+
_mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
return MESA_FORMAT_NONE;
}
diff --git a/mesalib/src/mesa/main/texgen.c b/mesalib/src/mesa/main/texgen.c
index e70ea3029..108ea4cd4 100644
--- a/mesalib/src/mesa/main/texgen.c
+++ b/mesalib/src/mesa/main/texgen.c
@@ -192,6 +192,38 @@ _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
_mesa_TexGenfv( coord, pname, p );
}
+#if FEATURE_ES1
+
+void GLAPIENTRY
+_es_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ _mesa_GetTexGenfv(GL_S, pname, params);
+}
+
+
+void GLAPIENTRY
+_es_TexGenf(GLenum coord, GLenum pname, GLfloat param)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ /* set S, T, and R at the same time */
+ _mesa_TexGenf(GL_S, pname, param);
+ _mesa_TexGenf(GL_T, pname, param);
+ _mesa_TexGenf(GL_R, pname, param);
+}
+
+
+void GLAPIENTRY
+_es_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ /* set S, T, and R at the same time */
+ _mesa_TexGenfv(GL_S, pname, params);
+ _mesa_TexGenfv(GL_T, pname, params);
+ _mesa_TexGenfv(GL_R, pname, params);
+}
+
+#endif
static void GLAPIENTRY
_mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
diff --git a/mesalib/src/mesa/main/texgen.h b/mesalib/src/mesa/main/texgen.h
index eb4626033..9ed802383 100644
--- a/mesalib/src/mesa/main/texgen.h
+++ b/mesalib/src/mesa/main/texgen.h
@@ -27,15 +27,13 @@
#define TEXGEN_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+struct _glapi_table;
-#if FEATURE_texgen
-#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) \
- do { \
- (driver)->TexGen = impl ## TexGen; \
- } while (0)
+#if FEATURE_texgen
extern void GLAPIENTRY
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
@@ -52,9 +50,18 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
extern void
_mesa_init_texgen_dispatch(struct _glapi_table *disp);
-#else /* FEATURE_texgen */
-#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) do { } while (0)
+extern void GLAPIENTRY
+_es_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params);
+
+extern void GLAPIENTRY
+_es_TexGenf(GLenum coord, GLenum pname, GLfloat param);
+
+extern void GLAPIENTRY
+_es_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params);
+
+
+#else /* FEATURE_texgen */
static void
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c
index 7ad91805b..00134ea9f 100644
--- a/mesalib/src/mesa/main/texgetimage.c
+++ b/mesalib/src/mesa/main/texgetimage.c
@@ -224,7 +224,7 @@ linear_to_nonlinear(GLfloat cl)
cs = 12.92f * cl;
}
else {
- cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
+ cs = (GLfloat)(1.055 * pow(cl, 0.41666) - 0.055);
}
return cs;
}
diff --git a/mesalib/src/mesa/main/texgetimage.h b/mesalib/src/mesa/main/texgetimage.h
index 088d27c7e..866ab7049 100644
--- a/mesalib/src/mesa/main/texgetimage.h
+++ b/mesalib/src/mesa/main/texgetimage.h
@@ -27,6 +27,7 @@
#ifndef TEXGETIMAGE_H
#define TEXGETIMAGE_H
+#include "mtypes.h"
extern void
_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index d72e91b3a..ca1bd6096 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -46,6 +46,7 @@
#include "texfetch.h"
#include "teximage.h"
#include "texstate.h"
+#include "texpal.h"
#include "mtypes.h"
@@ -347,41 +348,136 @@ _mesa_base_tex_format( GLcontext *ctx, GLint internalFormat )
case GL_SLUMINANCE8_EXT:
return GL_LUMINANCE;
default:
- ; /* fallthrough */
+ ; /* fallthrough */
}
}
-
#endif /* FEATURE_EXT_texture_sRGB */
- return -1; /* error */
-}
+ if (ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
+ case GL_RGBA8UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGBA32UI_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGBA32I_EXT:
+ return GL_RGBA;
+ case GL_RGB8UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_RGB8I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_RGB32I_EXT:
+ return GL_RGB;
+ case GL_ALPHA8UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_ALPHA32I_EXT:
+ return GL_ALPHA;
+ case GL_INTENSITY8UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_INTENSITY32I_EXT:
+ return GL_INTENSITY;
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+ if (ctx->Extensions.ARB_texture_rg) {
+ switch (internalFormat) {
+ case GL_R8:
+ case GL_R16:
+ case GL_R16F:
+ case GL_R32F:
+ case GL_R8I:
+ case GL_R8UI:
+ case GL_R16I:
+ case GL_R16UI:
+ case GL_R32I:
+ case GL_R32UI:
+ return GL_R;
+ case GL_RG:
+ case GL_RG_INTEGER:
+ case GL_RG8:
+ case GL_RG16:
+ case GL_RG16F:
+ case GL_RG32F:
+ case GL_RG8I:
+ case GL_RG8UI:
+ case GL_RG16I:
+ case GL_RG16UI:
+ case GL_RG32I:
+ case GL_RG32UI:
+ return GL_RG;
+ default:
+ ; /* fallthrough */
+ }
+ }
-/**
- * Test if it is a supported compressed format.
- *
- * \param internalFormat the internal format token provided by the user.
- *
- * \ret GL_TRUE if \p internalFormat is a supported compressed format, or
- * GL_FALSE otherwise.
- *
- * Currently only GL_COMPRESSED_RGB_FXT1_3DFX and GL_COMPRESSED_RGBA_FXT1_3DFX
- * are supported.
- */
-static GLboolean
-is_compressed_format(GLcontext *ctx, GLenum internalFormat)
-{
- GLint supported[100]; /* 100 should be plenty */
- GLuint i, n;
+ if (ctx->Extensions.EXT_texture_shared_exponent) {
+ switch (internalFormat) {
+ case GL_RGB9_E5_EXT:
+ return GL_RGB;
+ default:
+ ; /* fallthrough */
+ }
+ }
- n = _mesa_get_compressed_formats(ctx, supported, GL_TRUE);
- ASSERT(n < 100);
- for (i = 0; i < n; i++) {
- if ((GLint) internalFormat == supported[i]) {
- return GL_TRUE;
+ if (ctx->Extensions.EXT_packed_float) {
+ switch (internalFormat) {
+ case GL_R11F_G11F_B10F_EXT:
+ return GL_RGB;
+ default:
+ ; /* fallthrough */
}
}
- return GL_FALSE;
+
+ if (ctx->Extensions.ARB_depth_buffer_float) {
+ switch (internalFormat) {
+ case GL_DEPTH_COMPONENT32F:
+ return GL_DEPTH_COMPONENT;
+ case GL_DEPTH32F_STENCIL8:
+ return GL_DEPTH_STENCIL;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_compression_rgtc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RED:
+ case GL_COMPRESSED_RED_RGTC1_EXT:
+ case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
+ return GL_RED;
+ case GL_COMPRESSED_RG:
+ case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
+ case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
+ return GL_RG;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ return -1; /* error */
}
@@ -1307,9 +1403,9 @@ texture_error_check( GLcontext *ctx, GLenum target,
if (type != GL_UNSIGNED_SHORT_8_8_MESA &&
type != GL_UNSIGNED_SHORT_8_8_REV_MESA) {
char message[100];
- sprintf(message,
- "glTexImage%d(format/type YCBCR mismatch", dimensions);
- _mesa_error(ctx, GL_INVALID_ENUM, message);
+ _mesa_snprintf(message, sizeof(message),
+ "glTexImage%dD(format/type YCBCR mismatch", dimensions);
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s", message);
return GL_TRUE; /* error */
}
if (target != GL_TEXTURE_2D &&
@@ -1323,10 +1419,10 @@ texture_error_check( GLcontext *ctx, GLenum target,
if (border != 0) {
if (!isProxy) {
char message[100];
- sprintf(message,
- "glTexImage%d(format=GL_YCBCR_MESA and border=%d)",
- dimensions, border);
- _mesa_error(ctx, GL_INVALID_VALUE, message);
+ _mesa_snprintf(message, sizeof(message),
+ "glTexImage%dD(format=GL_YCBCR_MESA and border=%d)",
+ dimensions, border);
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", message);
}
return GL_TRUE;
}
@@ -1349,16 +1445,16 @@ texture_error_check( GLcontext *ctx, GLenum target,
}
/* additional checks for compressed textures */
- if (is_compressed_format(ctx, internalFormat)) {
+ if (_mesa_is_compressed_format(ctx, internalFormat)) {
if (!target_can_be_compressed(ctx, target) && !isProxy) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexImage%d(target)", dimensions);
+ "glTexImage%dD(target)", dimensions);
return GL_TRUE;
}
if (border != 0) {
if (!isProxy) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexImage%D(border!=0)", dimensions);
+ "glTexImage%dD(border!=0)", dimensions);
}
return GL_TRUE;
}
@@ -1536,7 +1632,7 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexSubImage%D(target=%s)", dimensions,
+ "glTexSubImage%dD(target=%s)", dimensions,
_mesa_lookup_enum_by_nr(target));
return GL_TRUE;
}
@@ -1547,19 +1643,19 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
/* offset must be multiple of block size */
if ((xoffset % bw != 0) || (yoffset % bh != 0)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(xoffset = %d, yoffset = %d)",
+ "glTexSubImage%dD(xoffset = %d, yoffset = %d)",
dimensions, xoffset, yoffset);
return GL_TRUE;
}
/* size must be multiple of bw by bh or equal to whole texture size */
if ((width % bw != 0) && (GLuint) width != destTex->Width) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(width = %d)", dimensions, width);
+ "glTexSubImage%dD(width = %d)", dimensions, width);
return GL_TRUE;
}
if ((height % bh != 0) && (GLuint) height != destTex->Height) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(height = %d)", dimensions, height);
+ "glTexSubImage%dD(height = %d)", dimensions, height);
return GL_TRUE;
}
}
@@ -1715,15 +1811,15 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
- if (is_compressed_format(ctx, internalFormat)) {
+ if (_mesa_is_compressed_format(ctx, internalFormat)) {
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glCopyTexImage%d(target)", dimensions);
+ "glCopyTexImage%dD(target)", dimensions);
return GL_TRUE;
}
if (border != 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexImage%D(border!=0)", dimensions);
+ "glCopyTexImage%dD(border!=0)", dimensions);
return GL_TRUE;
}
}
@@ -1731,7 +1827,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
/* make sure we have depth/stencil buffers */
if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexImage%D(no depth)", dimensions);
+ "glCopyTexImage%dD(no depth)", dimensions);
return GL_TRUE;
}
}
@@ -1739,7 +1835,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
/* make sure we have depth/stencil buffers */
if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexImage%D(no depth/stencil buffer)", dimensions);
+ "glCopyTexImage%dD(no depth/stencil buffer)", dimensions);
return GL_TRUE;
}
}
@@ -1904,24 +2000,24 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
if (_mesa_is_format_compressed(teximage->TexFormat)) {
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glCopyTexSubImage%d(target)", dimensions);
+ "glCopyTexSubImage%dD(target)", dimensions);
return GL_TRUE;
}
/* offset must be multiple of 4 */
if ((xoffset & 3) || (yoffset & 3)) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyTexSubImage%D(xoffset or yoffset)", dimensions);
+ "glCopyTexSubImage%dD(xoffset or yoffset)", dimensions);
return GL_TRUE;
}
/* size must be multiple of 4 */
if ((width & 3) != 0 && (GLuint) width != teximage->Width) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyTexSubImage%D(width)", dimensions);
+ "glCopyTexSubImage%dD(width)", dimensions);
return GL_TRUE;
}
if ((height & 3) != 0 && (GLuint) height != teximage->Height) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyTexSubImage%D(height)", dimensions);
+ "glCopyTexSubImage%dD(height)", dimensions);
return GL_TRUE;
}
}
@@ -1941,7 +2037,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) {
if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexSubImage%D(no depth buffer)",
+ "glCopyTexSubImage%dD(no depth buffer)",
dimensions);
return GL_TRUE;
}
@@ -1949,7 +2045,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexSubImage%D(no depth/stencil buffer)",
+ "glCopyTexSubImage%dD(no depth/stencil buffer)",
dimensions);
return GL_TRUE;
}
@@ -2087,6 +2183,45 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height)
}
+/**
+ * Choose the actual hardware format for a texture image.
+ * Try to use the same format as the previous image level when possible.
+ * Otherwise, ask the driver for the best format.
+ * It's important to try to choose a consistant format for all levels
+ * for efficient texture memory layout/allocation. In particular, this
+ * comes up during automatic mipmap generation.
+ */
+void
+_mesa_choose_texture_format(GLcontext *ctx,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLenum target, GLint level,
+ GLenum internalFormat, GLenum format, GLenum type)
+{
+ /* see if we've already chosen a format for the previous level */
+ if (level > 0) {
+ struct gl_texture_image *prevImage =
+ _mesa_select_tex_image(ctx, texObj, target, level - 1);
+ /* See if the prev level is defined and has an internal format which
+ * matches the new internal format.
+ */
+ if (prevImage &&
+ prevImage->Width > 0 &&
+ prevImage->InternalFormat == internalFormat) {
+ /* use the same format */
+ texImage->TexFormat = prevImage->TexFormat;
+ return;
+ }
+ }
+
+ /* choose format from scratch */
+ texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ format, type);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+}
+
+
+
/*
* Called from the API. Note that width includes the border.
*/
@@ -2147,11 +2282,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
postConvWidth, 1, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- format, type);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage1D);
@@ -2186,12 +2318,14 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
}
else {
/* no error, set the tex image parameters */
+ struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
ASSERT(texImage);
_mesa_init_teximage_fields(ctx, target, texImage,
postConvWidth, 1, 1,
border, internalFormat);
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
}
}
else {
@@ -2267,11 +2401,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
postConvWidth, postConvHeight, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- format, type);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage2D);
@@ -2313,11 +2444,13 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
}
else {
/* no error, set the tex image parameters */
+ struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
_mesa_init_teximage_fields(ctx, target, texImage,
postConvWidth, postConvHeight, 1,
border, internalFormat);
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
}
}
else {
@@ -2383,11 +2516,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
width, height, depth,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- format, type);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage3D);
@@ -2424,10 +2554,12 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
}
else {
/* no error, set the tex image parameters */
+ struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
_mesa_init_teximage_fields(ctx, target, texImage, width, height,
depth, border, internalFormat);
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, format, type);
}
}
else {
@@ -2457,6 +2589,12 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetTexture2DOES(unsupported)");
+ return;
+ }
+
if (target != GL_TEXTURE_2D) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glEGLImageTargetTexture2D(target=%d)", target);
@@ -2734,11 +2872,8 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- GL_NONE, GL_NONE);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
ASSERT(ctx->Driver.CopyTexImage1D);
ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat,
@@ -2815,11 +2950,8 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
postConvWidth, postConvHeight, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- GL_NONE, GL_NONE);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
ASSERT(ctx->Driver.CopyTexImage2D);
ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat,
@@ -3103,11 +3235,15 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
/* 3D compressed textures not allowed */
return GL_INVALID_ENUM;
}
+ else {
+ assert(0);
+ return GL_INVALID_ENUM;
+ }
maxTextureSize = 1 << (maxLevels - 1);
/* This will detect any invalid internalFormat value */
- if (!is_compressed_format(ctx, internalFormat))
+ if (!_mesa_is_compressed_format(ctx, internalFormat))
return GL_INVALID_ENUM;
/* This should really never fail */
@@ -3212,7 +3348,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
maxTextureSize = 1 << (maxLevels - 1);
/* this will catch any invalid compressed format token */
- if (!is_compressed_format(ctx, format))
+ if (!_mesa_is_compressed_format(ctx, format))
return GL_INVALID_ENUM;
if (width < 1 || width > maxTextureSize)
@@ -3340,11 +3476,8 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- GL_NONE, GL_NONE);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
ASSERT(ctx->Driver.CompressedTexImage1D);
ctx->Driver.CompressedTexImage1D(ctx, target, level,
@@ -3392,6 +3525,8 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
_mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
border, internalFormat);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
}
_mesa_unlock_texture(ctx, texObj);
}
@@ -3402,7 +3537,6 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
}
}
-
void GLAPIENTRY
_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
GLenum internalFormat, GLsizei width,
@@ -3418,6 +3552,24 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_lookup_enum_by_nr(internalFormat),
width, height, border, imageSize, data);
+#if FEATURE_ES
+ switch (internalFormat) {
+ case GL_PALETTE4_RGB8_OES:
+ case GL_PALETTE4_RGBA8_OES:
+ case GL_PALETTE4_R5_G6_B5_OES:
+ case GL_PALETTE4_RGBA4_OES:
+ case GL_PALETTE4_RGB5_A1_OES:
+ case GL_PALETTE8_RGB8_OES:
+ case GL_PALETTE8_RGBA8_OES:
+ case GL_PALETTE8_R5_G6_B5_OES:
+ case GL_PALETTE8_RGBA4_OES:
+ case GL_PALETTE8_RGB5_A1_OES:
+ _mesa_cpal_compressed_teximage2d(target, level, internalFormat,
+ width, height, imageSize, data);
+ return;
+ }
+#endif
+
if (target == GL_TEXTURE_2D ||
(ctx->Extensions.ARB_texture_cube_map &&
target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
@@ -3450,11 +3602,8 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
border, internalFormat);
- /* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- GL_NONE, GL_NONE);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
ASSERT(ctx->Driver.CompressedTexImage2D);
ctx->Driver.CompressedTexImage2D(ctx, target, level,
@@ -3504,6 +3653,8 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
_mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
border, internalFormat);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
}
_mesa_unlock_texture(ctx, texObj);
}
@@ -3560,10 +3711,8 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
border, internalFormat);
/* Choose actual texture format */
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- GL_NONE, GL_NONE);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
ASSERT(ctx->Driver.CompressedTexImage3D);
ctx->Driver.CompressedTexImage3D(ctx, target, level,
@@ -3612,6 +3761,8 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
_mesa_init_teximage_fields(ctx, target, texImage, width, height,
depth, border, internalFormat);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
}
_mesa_unlock_texture(ctx, texObj);
}
diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h
index d82cc9852..0dcacab3c 100644
--- a/mesalib/src/mesa/main/teximage.h
+++ b/mesalib/src/mesa/main/teximage.h
@@ -73,6 +73,14 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
extern void
+_mesa_choose_texture_format(GLcontext *ctx,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLenum target, GLint level,
+ GLenum internalFormat, GLenum format, GLenum type);
+
+
+extern void
_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage);
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 2753b55c3..1df165cf6 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -40,7 +40,7 @@
#include "teximage.h"
#include "texobj.h"
#include "mtypes.h"
-#include "shader/prog_instruction.h"
+#include "program/prog_instruction.h"
@@ -416,7 +416,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
*/
if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) {
char s[100];
- sprintf(s, "base level = %d is invalid", baseLevel);
+ _mesa_snprintf(s, sizeof(s), "base level = %d is invalid", baseLevel);
incomplete(t, s);
t->_Complete = GL_FALSE;
return;
@@ -425,7 +425,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
/* Always need the base level image */
if (!t->Image[0][baseLevel]) {
char s[100];
- sprintf(s, "Image[baseLevel=%d] == NULL", baseLevel);
+ _mesa_snprintf(s, sizeof(s), "Image[baseLevel=%d] == NULL", baseLevel);
incomplete(t, s);
t->_Complete = GL_FALSE;
return;
diff --git a/mesalib/src/mesa/main/texpal.c b/mesalib/src/mesa/main/texpal.c
new file mode 100644
index 000000000..a25e7aa4f
--- /dev/null
+++ b/mesalib/src/mesa/main/texpal.c
@@ -0,0 +1,204 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+/**
+ * Code to convert compressed/paletted texture images to ordinary images.
+ * See the GL_OES_compressed_paletted_texture spec at
+ * http://khronos.org/registry/gles/extensions/OES/OES_compressed_paletted_texture.txt
+ *
+ * XXX this makes it impossible to add hardware support...
+ */
+
+
+#include "glheader.h"
+#include "compiler.h" /* for ASSERT */
+#include "context.h"
+#include "mtypes.h"
+#include "imports.h"
+#include "pixelstore.h"
+#include "teximage.h"
+#include "texpal.h"
+
+#if FEATURE_ES
+
+
+static const struct cpal_format_info {
+ GLenum cpal_format;
+ GLenum format;
+ GLenum type;
+ GLuint palette_size;
+ GLuint size;
+} formats[] = {
+ { GL_PALETTE4_RGB8_OES, GL_RGB, GL_UNSIGNED_BYTE, 16, 3 },
+ { GL_PALETTE4_RGBA8_OES, GL_RGBA, GL_UNSIGNED_BYTE, 16, 4 },
+ { GL_PALETTE4_R5_G6_B5_OES, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 16, 2 },
+ { GL_PALETTE4_RGBA4_OES, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 16, 2 },
+ { GL_PALETTE4_RGB5_A1_OES, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 16, 2 },
+ { GL_PALETTE8_RGB8_OES, GL_RGB, GL_UNSIGNED_BYTE, 256, 3 },
+ { GL_PALETTE8_RGBA8_OES, GL_RGBA, GL_UNSIGNED_BYTE, 256, 4 },
+ { GL_PALETTE8_R5_G6_B5_OES, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 256, 2 },
+ { GL_PALETTE8_RGBA4_OES, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 256, 2 },
+ { GL_PALETTE8_RGB5_A1_OES, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 256, 2 }
+};
+
+
+/**
+ * Get a color/entry from the palette.
+ */
+static GLuint
+get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette,
+ GLuint index, GLubyte *pixel)
+{
+ memcpy(pixel, palette + info->size * index, info->size);
+ return info->size;
+}
+
+
+/**
+ * Convert paletted texture to color texture.
+ */
+static void
+paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette,
+ const void *indices, GLuint num_pixels, GLubyte *image)
+{
+ GLubyte *pix = image;
+ GLuint remain, i;
+
+ if (info->palette_size == 16) {
+ /* 4 bits per index */
+ const GLubyte *ind = (const GLubyte *) indices;
+
+ /* two pixels per iteration */
+ remain = num_pixels % 2;
+ for (i = 0; i < num_pixels / 2; i++) {
+ pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix);
+ pix += get_palette_entry(info, palette, ind[i] & 0xf, pix);
+ }
+ if (remain) {
+ get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix);
+ }
+ }
+ else {
+ /* 8 bits per index */
+ const GLubyte *ind = (const GLubyte *) indices;
+ for (i = 0; i < num_pixels; i++)
+ pix += get_palette_entry(info, palette, ind[i], pix);
+ }
+}
+
+
+static const struct cpal_format_info *
+cpal_get_info(GLint level, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLsizei imageSize)
+{
+ const struct cpal_format_info *info;
+ GLint lvl, num_levels;
+ GLsizei w, h, expect_size;
+
+ info = &formats[internalFormat - GL_PALETTE4_RGB8_OES];
+ ASSERT(info->cpal_format == internalFormat);
+
+ if (level > 0) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE,
+ "glCompressedTexImage2D(level=%d)", level);
+ return NULL;
+ }
+
+ num_levels = -level + 1;
+ expect_size = info->palette_size * info->size;
+ for (lvl = 0; lvl < num_levels; lvl++) {
+ w = width >> lvl;
+ if (!w)
+ w = 1;
+ h = height >> lvl;
+ if (!h)
+ h = 1;
+
+ if (info->palette_size == 16)
+ expect_size += (w * h + 1) / 2;
+ else
+ expect_size += w * h;
+ }
+ if (expect_size > imageSize) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE,
+ "glCompressedTexImage2D(imageSize=%d)", imageSize);
+ return NULL;
+ }
+ return info;
+}
+
+/**
+ * Convert a call to glCompressedTexImage2D() where internalFormat is a
+ * compressed palette format into a regular GLubyte/RGBA glTexImage2D() call.
+ */
+void
+_mesa_cpal_compressed_teximage2d(GLenum target, GLint level,
+ GLenum internalFormat,
+ GLsizei width, GLsizei height,
+ GLsizei imageSize, const void *palette)
+{
+ const struct cpal_format_info *info;
+ GLint lvl, num_levels;
+ const GLubyte *indices;
+ GLint saved_align, align;
+ GET_CURRENT_CONTEXT(ctx);
+
+ info = cpal_get_info(level, internalFormat, width, height, imageSize);
+ if (!info)
+ return;
+
+ info = &formats[internalFormat - GL_PALETTE4_RGB8_OES];
+ ASSERT(info->cpal_format == internalFormat);
+ num_levels = -level + 1;
+
+ /* first image follows the palette */
+ indices = (const GLubyte *) palette + info->palette_size * info->size;
+
+ saved_align = ctx->Unpack.Alignment;
+ align = saved_align;
+
+ for (lvl = 0; lvl < num_levels; lvl++) {
+ GLsizei w, h;
+ GLuint num_texels;
+ GLubyte *image = NULL;
+
+ w = width >> lvl;
+ if (!w)
+ w = 1;
+ h = height >> lvl;
+ if (!h)
+ h = 1;
+ num_texels = w * h;
+ if (w * info->size % align) {
+ _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ align = 1;
+ }
+
+ /* allocate and fill dest image buffer */
+ if (palette) {
+ image = (GLubyte *) malloc(num_texels * info->size);
+ paletted_to_color(info, palette, indices, num_texels, image);
+ }
+
+ _mesa_TexImage2D(target, lvl, info->format, w, h, 0,
+ info->format, info->type, image);
+ if (image)
+ free(image);
+
+ /* advance index pointer to point to next src mipmap */
+ if (info->palette_size == 16)
+ indices += (num_texels + 1) / 2;
+ else
+ indices += num_texels;
+ }
+
+ if (saved_align != align)
+ _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, saved_align);
+}
+
+#endif
diff --git a/mesalib/src/mesa/main/rbadaptors.h b/mesalib/src/mesa/main/texpal.h
index 1d45b287d..eeff5a9e2 100644
--- a/mesalib/src/mesa/main/rbadaptors.h
+++ b/mesalib/src/mesa/main/texpal.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.8
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2010 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -23,18 +23,16 @@
*/
-#ifndef RBADAPTORS_H
-#define RBADAPTORS_H
+#ifndef TEXPAL_H
+#define TEXPAL_H
-extern struct gl_renderbuffer *
-_mesa_new_renderbuffer_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8);
+#include "main/glheader.h"
+extern void
+_mesa_cpal_compressed_teximage2d(GLenum target, GLint level,
+ GLenum internalFormat,
+ GLsizei width, GLsizei height,
+ GLsizei imageSize, const void *palette);
-extern struct gl_renderbuffer *
-_mesa_new_renderbuffer_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8);
-extern struct gl_renderbuffer *
-_mesa_new_renderbuffer_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb16);
-
-
-#endif /* RBADAPTORS_H */
+#endif /* TEXPAL_H */
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index 0fde89b50..745a0aeec 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -39,7 +39,7 @@
#include "main/texparam.h"
#include "main/teximage.h"
#include "main/texstate.h"
-#include "shader/prog_instruction.h"
+#include "program/prog_instruction.h"
/**
@@ -371,7 +371,7 @@ set_tex_parameteri(GLcontext *ctx,
}
return GL_FALSE;
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
texObj->CropRect[0] = params[0];
texObj->CropRect[1] = params[1];
@@ -604,7 +604,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
}
break;
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
{
/* convert float params to int */
@@ -940,6 +940,18 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
"glGetTexLevelParameter[if]v(pname)");
}
break;
+ case GL_TEXTURE_SHARED_SIZE:
+ if (ctx->VersionMajor >= 3) {
+ /* XXX return number of exponent bits for shared exponent texture
+ * formats, like GL_RGB9_E5.
+ */
+ *params = 0;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetTexLevelParameter[if]v(pname)");
+ }
+ break;
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
@@ -1148,7 +1160,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
else
error = GL_TRUE;
break;
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
params[0] = obj->CropRect[0];
params[1] = obj->CropRect[1];
@@ -1318,7 +1330,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
error = GL_TRUE;
}
break;
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
params[0] = obj->CropRect[0];
params[1] = obj->CropRect[1];
diff --git a/mesalib/src/mesa/main/texrender.c b/mesalib/src/mesa/main/texrender.c
index d29af5a5b..c68105b39 100644
--- a/mesalib/src/mesa/main/texrender.c
+++ b/mesalib/src/mesa/main/texrender.c
@@ -1,6 +1,7 @@
#include "context.h"
#include "colormac.h"
+#include "macros.h"
#include "texfetch.h"
#include "texrender.h"
#include "renderbuffer.h"
diff --git a/mesalib/src/mesa/main/texrender.h b/mesalib/src/mesa/main/texrender.h
index 7c3fb0871..1e87d594a 100644
--- a/mesalib/src/mesa/main/texrender.h
+++ b/mesalib/src/mesa/main/texrender.h
@@ -1,6 +1,7 @@
#ifndef TEXRENDER_H
#define TEXRENDER_H
+#include "mtypes.h"
extern void
_mesa_render_texture(GLcontext *ctx,
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index fce17c2b6..dae173d1b 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -528,7 +528,7 @@ update_texture_state( GLcontext *ctx )
/* Get the bitmask of texture target enables.
* enableBits will be a mask of the TEXTURE_*_BIT flags indicating
* which texture targets are enabled (fixed function) or referenced
- * by a fragment shader/program. When multiple flags are set, we'll
+ * by a fragment program/program. When multiple flags are set, we'll
* settle on the one with highest priority (see below).
*/
if (vprog) {
diff --git a/mesalib/src/mesa/main/texstate.h b/mesalib/src/mesa/main/texstate.h
index 17ac68000..912cb6779 100644
--- a/mesalib/src/mesa/main/texstate.h
+++ b/mesalib/src/mesa/main/texstate.h
@@ -32,6 +32,7 @@
#define TEXSTATE_H
+#include "compiler.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index 65e3fcaa9..2989fdb72 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -55,7 +55,6 @@
#include "glheader.h"
#include "bufferobj.h"
#include "colormac.h"
-#include "context.h"
#include "convolve.h"
#include "image.h"
#include "macros.h"
@@ -2225,6 +2224,140 @@ _mesa_texstore_al1616(TEXSTORE_PARAMS)
static GLboolean
+_mesa_texstore_rgba_16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_16);
+ ASSERT(texelBytes == 8);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r, g, b, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[1]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[2]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[3]);
+ dstUS[col*4+0] = r;
+ dstUS[col*4+1] = g;
+ dstUS[col*4+2] = b;
+ dstUS[col*4+3] = a;
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_R_16 ||
+ dstFormat == MESA_FORMAT_SIGNED_RG_16 ||
+ dstFormat == MESA_FORMAT_SIGNED_RGB_16 ||
+ dstFormat == MESA_FORMAT_SIGNED_RGBA_16);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGBA &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA_16 &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ const GLuint comps = _mesa_get_format_bytes(dstFormat) / 2;
+ GLint img, row, col;
+
+ if (!tempImage)
+ return GL_FALSE;
+
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+
+ /* Note: tempImage is always float[4] / RGBA. We convert to 1, 2,
+ * 3 or 4 components/pixel here.
+ */
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dstRowS = (GLshort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLuint c;
+ for (c = 0; c < comps; c++) {
+ GLshort p;
+ UNCLAMPED_FLOAT_TO_SHORT(p, src[col * 4 + c]);
+ dstRowS[col * comps + c] = p;
+ }
+ }
+ dstRow += dstRowStride;
+ src += 4 * srcWidth;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS)
{
const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
@@ -2551,6 +2684,147 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
return GL_TRUE;
}
+
+/**
+ * Store a texture in MESA_FORMAT_SIGNED_R8 format.
+ */
+static GLboolean
+_mesa_texstore_signed_r8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_R8);
+ ASSERT(texelBytes == 1);
+
+ /* XXX look at adding optimized paths */
+ {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *srcRow = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte *dstB = (GLubyte *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dstB[col] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a texture in MESA_FORMAT_SIGNED_RG88 format.
+ */
+static GLboolean
+_mesa_texstore_signed_rg88(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RG88);
+ ASSERT(texelBytes == 1);
+
+ /* XXX look at adding optimized paths */
+ {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *srcRow = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_88(FLOAT_TO_BYTE_TEX(srcRow[RCOMP]),
+ FLOAT_TO_BYTE_TEX(srcRow[GCOMP]));
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a texture in MESA_FORMAT_SIGNED_RGBX8888.
+ */
+static GLboolean
+_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888);
+ ASSERT(texelBytes == 4);
+
+ {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *srcRow = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888( FLOAT_TO_BYTE_TEX(srcRow[RCOMP]),
+ FLOAT_TO_BYTE_TEX(srcRow[GCOMP]),
+ FLOAT_TO_BYTE_TEX(srcRow[BCOMP]),
+ 0xff );
+ srcRow += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
/**
* Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or MESA_FORMAT_SIGNED_RGBA8888_REV
*/
@@ -2672,6 +2946,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
return GL_TRUE;
}
+
/**
* Store a combined depth/stencil texture image.
*/
@@ -3002,6 +3277,392 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
}
+/* non-normalized, signed int8 */
+static GLboolean
+_mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT8);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLbyte));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLbyte *dstTexel = (GLbyte *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLbyte) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, signed int16 */
+static GLboolean
+_mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT16);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLshort));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dstTexel = (GLshort *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLint) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, signed int32 */
+static GLboolean
+_mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT32);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLint));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLint *dstTexel = (GLint *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLint) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int8 */
+static GLboolean
+_mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT8);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLubyte));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte *dstTexel = (GLubyte *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLubyte) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int16 */
+static GLboolean
+_mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT16);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLushort));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstTexel = (GLushort *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLushort) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int32 */
+static GLboolean
+_mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT32);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLuint));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstTexel = (GLuint *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLuint) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
+
#if FEATURE_EXT_texture_sRGB
static GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS)
@@ -3196,10 +3857,28 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 },
{ MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 },
{ MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 },
+
+ { MESA_FORMAT_RGBA_INT8, _mesa_texstore_rgba_int8 },
+ { MESA_FORMAT_RGBA_INT16, _mesa_texstore_rgba_int16 },
+ { MESA_FORMAT_RGBA_INT32, _mesa_texstore_rgba_int32 },
+ { MESA_FORMAT_RGBA_UINT8, _mesa_texstore_rgba_uint8 },
+ { MESA_FORMAT_RGBA_UINT16, _mesa_texstore_rgba_uint16 },
+ { MESA_FORMAT_RGBA_UINT32, _mesa_texstore_rgba_uint32 },
+
{ MESA_FORMAT_DUDV8, _mesa_texstore_dudv8 },
+
+ { MESA_FORMAT_SIGNED_R8, _mesa_texstore_signed_r8 },
+ { MESA_FORMAT_SIGNED_RG88, _mesa_texstore_signed_rg88 },
+ { MESA_FORMAT_SIGNED_RGBX8888, _mesa_texstore_signed_rgbx8888 },
+
{ MESA_FORMAT_SIGNED_RGBA8888, _mesa_texstore_signed_rgba8888 },
{ MESA_FORMAT_SIGNED_RGBA8888_REV, _mesa_texstore_signed_rgba8888 },
- { MESA_FORMAT_SIGNED_RGBA_16, NULL },
+
+ { MESA_FORMAT_SIGNED_R_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_SIGNED_RG_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_SIGNED_RGB_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_SIGNED_RGBA_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 }
};
diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c
new file mode 100644
index 000000000..5c8c1fd22
--- /dev/null
+++ b/mesalib/src/mesa/main/transformfeedback.c
@@ -0,0 +1,944 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*
+ * Vertex transform feedback support.
+ *
+ * Authors:
+ * Brian Paul
+ */
+
+
+#include "buffers.h"
+#include "bufferobj.h"
+#include "context.h"
+#include "hash.h"
+#include "transformfeedback.h"
+#include "shaderapi.h"
+#include "shaderobj.h"
+#include "main/dispatch.h"
+
+#include "program/prog_parameter.h"
+//#include "program/shader_api.h"
+
+
+#if FEATURE_EXT_transform_feedback
+
+
+/**
+ * Do reference counting of transform feedback buffers.
+ */
+static void
+reference_transform_feedback_object(struct gl_transform_feedback_object **ptr,
+ struct gl_transform_feedback_object *obj)
+{
+ if (*ptr == obj)
+ return;
+
+ if (*ptr) {
+ /* Unreference the old object */
+ struct gl_transform_feedback_object *oldObj = *ptr;
+
+ ASSERT(oldObj->RefCount > 0);
+ oldObj->RefCount--;
+
+ if (oldObj->RefCount == 0) {
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx)
+ ctx->Driver.DeleteTransformFeedback(ctx, oldObj);
+ }
+
+ *ptr = NULL;
+ }
+ ASSERT(!*ptr);
+
+ if (obj) {
+ /* reference new object */
+ if (obj->RefCount == 0) {
+ _mesa_problem(NULL, "referencing deleted transform feedback object");
+ *ptr = NULL;
+ }
+ else {
+ obj->RefCount++;
+ *ptr = obj;
+ }
+ }
+}
+
+
+/**
+ * Check if the given primitive mode (as in glBegin(mode)) is compatible
+ * with the current transform feedback mode (if it's enabled).
+ * This is to be called from glBegin(), glDrawArrays(), glDrawElements(), etc.
+ *
+ * \return GL_TRUE if the mode is OK, GL_FALSE otherwise.
+ */
+GLboolean
+_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode)
+{
+ if (ctx->TransformFeedback.CurrentObject->Active) {
+ switch (mode) {
+ case GL_POINTS:
+ return ctx->TransformFeedback.Mode == GL_POINTS;
+ case GL_LINES:
+ case GL_LINE_STRIP:
+ case GL_LINE_LOOP:
+ return ctx->TransformFeedback.Mode == GL_LINES;
+ default:
+ return ctx->TransformFeedback.Mode == GL_TRIANGLES;
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Check that all the buffer objects currently bound for transform
+ * feedback actually exist. Raise a GL_INVALID_OPERATION error if
+ * any buffers are missing.
+ * \return GL_TRUE for success, GL_FALSE if error
+ */
+GLboolean
+_mesa_validate_transform_feedback_buffers(GLcontext *ctx)
+{
+ /* XXX to do */
+ return GL_TRUE;
+}
+
+
+
+/**
+ * Per-context init for transform feedback.
+ */
+void
+_mesa_init_transform_feedback(GLcontext *ctx)
+{
+ /* core mesa expects this, even a dummy one, to be available */
+ ASSERT(ctx->Driver.NewTransformFeedback);
+
+ ctx->TransformFeedback.DefaultObject =
+ ctx->Driver.NewTransformFeedback(ctx, 0);
+
+ assert(ctx->TransformFeedback.DefaultObject->RefCount == 1);
+
+ reference_transform_feedback_object(&ctx->TransformFeedback.CurrentObject,
+ ctx->TransformFeedback.DefaultObject);
+
+ assert(ctx->TransformFeedback.DefaultObject->RefCount == 2);
+
+ ctx->TransformFeedback.Objects = _mesa_NewHashTable();
+
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ ctx->Shared->NullBufferObj);
+}
+
+
+
+/**
+ * Callback for _mesa_HashDeleteAll().
+ */
+static void
+delete_cb(GLuint key, void *data, void *userData)
+{
+ GLcontext *ctx = (GLcontext *) userData;
+ struct gl_transform_feedback_object *obj =
+ (struct gl_transform_feedback_object *) data;
+
+ ctx->Driver.DeleteTransformFeedback(ctx, obj);
+}
+
+
+/**
+ * Per-context free/clean-up for transform feedback.
+ */
+void
+_mesa_free_transform_feedback(GLcontext *ctx)
+{
+ /* core mesa expects this, even a dummy one, to be available */
+ ASSERT(ctx->Driver.NewTransformFeedback);
+
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ NULL);
+
+ /* Delete all feedback objects */
+ _mesa_HashDeleteAll(ctx->TransformFeedback.Objects, delete_cb, ctx);
+ _mesa_DeleteHashTable(ctx->TransformFeedback.Objects);
+
+ /* Delete the default feedback object */
+ assert(ctx->Driver.DeleteTransformFeedback);
+ ctx->Driver.DeleteTransformFeedback(ctx,
+ ctx->TransformFeedback.DefaultObject);
+
+ ctx->TransformFeedback.CurrentObject = NULL;
+}
+
+
+#else /* FEATURE_EXT_transform_feedback */
+
+/* forward declarations */
+static struct gl_transform_feedback_object *
+new_transform_feedback(GLcontext *ctx, GLuint name);
+
+static void
+delete_transform_feedback(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj);
+
+/* dummy per-context init/clean-up for transform feedback */
+void
+_mesa_init_transform_feedback(GLcontext *ctx)
+{
+ ctx->TransformFeedback.DefaultObject = new_transform_feedback(ctx, 0);
+ ctx->TransformFeedback.CurrentObject = ctx->TransformFeedback.DefaultObject;
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ ctx->Shared->NullBufferObj);
+}
+
+void
+_mesa_free_transform_feedback(GLcontext *ctx)
+{
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ NULL);
+ ctx->TransformFeedback.CurrentObject = NULL;
+ delete_transform_feedback(ctx, ctx->TransformFeedback.DefaultObject);
+}
+
+#endif /* FEATURE_EXT_transform_feedback */
+
+
+/** Default fallback for ctx->Driver.NewTransformFeedback() */
+static struct gl_transform_feedback_object *
+new_transform_feedback(GLcontext *ctx, GLuint name)
+{
+ struct gl_transform_feedback_object *obj;
+ obj = CALLOC_STRUCT(gl_transform_feedback_object);
+ if (obj) {
+ obj->Name = name;
+ obj->RefCount = 1;
+ }
+ return obj;
+}
+
+/** Default fallback for ctx->Driver.DeleteTransformFeedback() */
+static void
+delete_transform_feedback(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj)
+{
+ GLuint i;
+
+ for (i = 0; i < Elements(obj->Buffers); i++) {
+ _mesa_reference_buffer_object(ctx, &obj->Buffers[i], NULL);
+ }
+
+ free(obj);
+}
+
+
+#if FEATURE_EXT_transform_feedback
+
+
+/** Default fallback for ctx->Driver.BeginTransformFeedback() */
+static void
+begin_transform_feedback(GLcontext *ctx, GLenum mode,
+ struct gl_transform_feedback_object *obj)
+{
+ /* nop */
+}
+
+/** Default fallback for ctx->Driver.EndTransformFeedback() */
+static void
+end_transform_feedback(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj)
+{
+ /* nop */
+}
+
+/** Default fallback for ctx->Driver.PauseTransformFeedback() */
+static void
+pause_transform_feedback(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj)
+{
+ /* nop */
+}
+
+/** Default fallback for ctx->Driver.ResumeTransformFeedback() */
+static void
+resume_transform_feedback(GLcontext *ctx,
+ struct gl_transform_feedback_object *obj)
+{
+ /* nop */
+}
+
+/** Default fallback for ctx->Driver.DrawTransformFeedback() */
+static void
+draw_transform_feedback(GLcontext *ctx, GLenum mode,
+ struct gl_transform_feedback_object *obj)
+{
+ /* XXX to do */
+ /*
+ * Get number of vertices in obj's feedback buffer.
+ * Call ctx->Exec.DrawArrays(mode, 0, count);
+ */
+}
+
+
+/**
+ * Plug in default device driver functions for transform feedback.
+ * Most drivers will override some/all of these.
+ */
+void
+_mesa_init_transform_feedback_functions(struct dd_function_table *driver)
+{
+ driver->NewTransformFeedback = new_transform_feedback;
+ driver->DeleteTransformFeedback = delete_transform_feedback;
+ driver->BeginTransformFeedback = begin_transform_feedback;
+ driver->EndTransformFeedback = end_transform_feedback;
+ driver->PauseTransformFeedback = pause_transform_feedback;
+ driver->ResumeTransformFeedback = resume_transform_feedback;
+ driver->DrawTransformFeedback = draw_transform_feedback;
+}
+
+
+void
+_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp)
+{
+ SET_BeginTransformFeedbackEXT(disp, _mesa_BeginTransformFeedback);
+ SET_EndTransformFeedbackEXT(disp, _mesa_EndTransformFeedback);
+ SET_BindBufferRangeEXT(disp, _mesa_BindBufferRange);
+ SET_BindBufferBaseEXT(disp, _mesa_BindBufferBase);
+ SET_BindBufferOffsetEXT(disp, _mesa_BindBufferOffsetEXT);
+ SET_TransformFeedbackVaryingsEXT(disp, _mesa_TransformFeedbackVaryings);
+ SET_GetTransformFeedbackVaryingEXT(disp, _mesa_GetTransformFeedbackVarying);
+}
+
+
+/**
+ ** Begin API functions
+ **/
+
+
+void GLAPIENTRY
+_mesa_BeginTransformFeedback(GLenum mode)
+{
+ struct gl_transform_feedback_object *obj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ switch (mode) {
+ case GL_POINTS:
+ case GL_LINES:
+ case GL_TRIANGLES:
+ /* legal */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBeginTransformFeedback(mode)");
+ return;
+ }
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBeginTransformFeedback(already active)");
+ return;
+ }
+
+ obj->Active = GL_TRUE;
+ ctx->TransformFeedback.Mode = mode;
+
+ assert(ctx->Driver.BeginTransformFeedback);
+ ctx->Driver.BeginTransformFeedback(ctx, mode, obj);
+}
+
+
+void GLAPIENTRY
+_mesa_EndTransformFeedback(void)
+{
+ struct gl_transform_feedback_object *obj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (!obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEndTransformFeedback(not active)");
+ return;
+ }
+
+ ctx->TransformFeedback.CurrentObject->Active = GL_FALSE;
+
+ assert(ctx->Driver.EndTransformFeedback);
+ ctx->Driver.EndTransformFeedback(ctx, obj);
+}
+
+
+/**
+ * Helper used by BindBufferRange() and BindBufferBase().
+ */
+static void
+bind_buffer_range(GLcontext *ctx, GLuint index,
+ struct gl_buffer_object *bufObj,
+ GLintptr offset, GLsizeiptr size)
+{
+ struct gl_transform_feedback_object *obj =
+ ctx->TransformFeedback.CurrentObject;
+
+ /* The general binding point */
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ bufObj);
+
+ /* The per-attribute binding point */
+ _mesa_reference_buffer_object(ctx,
+ &obj->Buffers[index],
+ bufObj);
+
+ obj->BufferNames[index] = bufObj->Name;
+
+ obj->Offset[index] = offset;
+ obj->Size[index] = size;
+}
+
+
+/**
+ * Specify a buffer object to receive vertex shader results. Plus,
+ * specify the starting offset to place the results, and max size.
+ */
+void GLAPIENTRY
+_mesa_BindBufferRange(GLenum target, GLuint index,
+ GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ struct gl_transform_feedback_object *obj;
+ struct gl_buffer_object *bufObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (target != GL_TRANSFORM_FEEDBACK_BUFFER) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferRange(target)");
+ return;
+ }
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferRange(transform feedback active)");
+ return;
+ }
+
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(index=%d)", index);
+ return;
+ }
+
+ if ((size <= 0) || (size & 0x3)) {
+ /* must be positive and multiple of four */
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(size%d)", (int) size);
+ return;
+ }
+
+ if (offset & 0x3) {
+ /* must be multiple of four */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBindBufferRange(offset=%d)", (int) offset);
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferRange(invalid buffer=%u)", buffer);
+ return;
+ }
+
+ if (offset + size >= bufObj->Size) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBindBufferRange(offset + size %d > buffer size %d)",
+ (int) (offset + size), (int) (bufObj->Size));
+ return;
+ }
+
+ bind_buffer_range(ctx, index, bufObj, offset, size);
+}
+
+
+/**
+ * Specify a buffer object to receive vertex shader results.
+ * As above, but start at offset = 0.
+ */
+void GLAPIENTRY
+_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ struct gl_transform_feedback_object *obj;
+ struct gl_buffer_object *bufObj;
+ GLsizeiptr size;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (target != GL_TRANSFORM_FEEDBACK_BUFFER) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferBase(target)");
+ return;
+ }
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferRange(transform feedback active)");
+ return;
+ }
+
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferBase(index=%d)", index);
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferBase(invalid buffer=%u)", buffer);
+ return;
+ }
+
+ /* default size is the buffer size rounded down to nearest
+ * multiple of four.
+ */
+ size = bufObj->Size & ~0x3;
+
+ bind_buffer_range(ctx, index, bufObj, 0, size);
+}
+
+
+/**
+ * Specify a buffer object to receive vertex shader results, plus the
+ * offset in the buffer to start placing results.
+ * This function is part of GL_EXT_transform_feedback, but not GL3.
+ */
+void GLAPIENTRY
+_mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
+ GLintptr offset)
+{
+ struct gl_transform_feedback_object *obj;
+ struct gl_buffer_object *bufObj;
+ GET_CURRENT_CONTEXT(ctx);
+ GLsizeiptr size;
+
+ if (target != GL_TRANSFORM_FEEDBACK_BUFFER) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferOffsetEXT(target)");
+ return;
+ }
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferRange(transform feedback active)");
+ return;
+ }
+
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBindBufferOffsetEXT(index=%d)", index);
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferOffsetEXT(invalid buffer=%u)", buffer);
+ return;
+ }
+
+ /* default size is the buffer size rounded down to nearest
+ * multiple of four.
+ */
+ size = (bufObj->Size - offset) & ~0x3;
+
+ bind_buffer_range(ctx, index, bufObj, offset, size);
+}
+
+
+/**
+ * This function specifies the vertex shader outputs to be written
+ * to the feedback buffer(s), and in what order.
+ */
+void GLAPIENTRY
+_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
+ const GLchar **varyings, GLenum bufferMode)
+{
+ struct gl_shader_program *shProg;
+ GLuint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ switch (bufferMode) {
+ case GL_INTERLEAVED_ATTRIBS:
+ break;
+ case GL_SEPARATE_ATTRIBS:
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glTransformFeedbackVaryings(bufferMode)");
+ return;
+ }
+
+ if (count < 0 || count > ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTransformFeedbackVaryings(count=%d)", count);
+ return;
+ }
+
+ shProg = _mesa_lookup_shader_program(ctx, program);
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTransformFeedbackVaryings(program=%u)", program);
+ return;
+ }
+
+ /* free existing varyings, if any */
+ for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
+ free(shProg->TransformFeedback.VaryingNames[i]);
+ }
+ free(shProg->TransformFeedback.VaryingNames);
+
+ /* allocate new memory for varying names */
+ shProg->TransformFeedback.VaryingNames =
+ (GLchar **) malloc(count * sizeof(GLchar *));
+
+ if (!shProg->TransformFeedback.VaryingNames) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTransformFeedbackVaryings()");
+ return;
+ }
+
+ /* Save the new names and the count */
+ for (i = 0; i < (GLuint) count; i++) {
+ shProg->TransformFeedback.VaryingNames[i] = _mesa_strdup(varyings[i]);
+ }
+ shProg->TransformFeedback.NumVarying = count;
+
+ shProg->TransformFeedback.BufferMode = bufferMode;
+
+ /* The varyings won't be used until shader link time */
+}
+
+
+/**
+ * Get info about the vertex shader's outputs which are to be written
+ * to the feedback buffer(s).
+ */
+void GLAPIENTRY
+_mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
+ GLsizei bufSize, GLsizei *length,
+ GLsizei *size, GLenum *type, GLchar *name)
+{
+ const struct gl_shader_program *shProg;
+ const GLchar *varyingName;
+ GLint v;
+ GET_CURRENT_CONTEXT(ctx);
+
+ shProg = _mesa_lookup_shader_program(ctx, program);
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetTransformFeedbackVaryings(program=%u)", program);
+ return;
+ }
+
+ if (index >= shProg->TransformFeedback.NumVarying) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetTransformFeedbackVaryings(index=%u)", index);
+ return;
+ }
+
+ varyingName = shProg->TransformFeedback.VaryingNames[index];
+
+ v = _mesa_lookup_parameter_index(shProg->Varying, -1, varyingName);
+ if (v >= 0) {
+ struct gl_program_parameter *param = &shProg->Varying->Parameters[v];
+
+ /* return the varying's name and length */
+ _mesa_copy_string(name, bufSize, length, varyingName);
+
+ /* return the datatype and value's size (in datatype units) */
+ if (type)
+ *type = param->DataType;
+ if (size)
+ *size = param->Size;
+ }
+ else {
+ name[0] = 0;
+ if (length)
+ *length = 0;
+ if (type)
+ *type = 0;
+ if (size)
+ *size = 0;
+ }
+}
+
+
+
+static struct gl_transform_feedback_object *
+lookup_transform_feedback_object(GLcontext *ctx, GLuint name)
+{
+ if (name == 0) {
+ return ctx->TransformFeedback.DefaultObject;
+ }
+ else
+ return (struct gl_transform_feedback_object *)
+ _mesa_HashLookup(ctx->TransformFeedback.Objects, name);
+}
+
+
+/**
+ * Create new transform feedback objects. Transform feedback objects
+ * encapsulate the state related to transform feedback to allow quickly
+ * switching state (and drawing the results, below).
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_GenTransformFeedbacks(GLsizei n, GLuint *names)
+{
+ GLuint first;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenTransformFeedbacks(n < 0)");
+ return;
+ }
+
+ if (!names)
+ return;
+
+ /* we don't need contiguous IDs, but this might be faster */
+ first = _mesa_HashFindFreeKeyBlock(ctx->TransformFeedback.Objects, n);
+ if (first) {
+ GLsizei i;
+ for (i = 0; i < n; i++) {
+ struct gl_transform_feedback_object *obj
+ = ctx->Driver.NewTransformFeedback(ctx, first + i);
+ if (!obj) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTransformFeedbacks");
+ return;
+ }
+ names[i] = first + i;
+ _mesa_HashInsert(ctx->TransformFeedback.Objects, first + i, obj);
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTransformFeedbacks");
+ }
+}
+
+
+/**
+ * Is the given ID a transform feedback object?
+ * Part of GL_ARB_transform_feedback2.
+ */
+GLboolean GLAPIENTRY
+_mesa_IsTransformFeedback(GLuint name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (name && lookup_transform_feedback_object(ctx, name))
+ return GL_TRUE;
+ else
+ return GL_FALSE;
+}
+
+
+/**
+ * Bind the given transform feedback object.
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_BindTransformFeedback(GLenum target, GLuint name)
+{
+ struct gl_transform_feedback_object *obj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (target != GL_TRANSFORM_FEEDBACK) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindTransformFeedback(target)");
+ return;
+ }
+
+ if (ctx->TransformFeedback.CurrentObject->Active &&
+ !ctx->TransformFeedback.CurrentObject->Paused) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindTransformFeedback(transform is active, or not paused)");
+ return;
+ }
+
+ obj = lookup_transform_feedback_object(ctx, name);
+ if (!obj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindTransformFeedback(name=%u)", name);
+ return;
+ }
+
+ reference_transform_feedback_object(&ctx->TransformFeedback.CurrentObject,
+ obj);
+}
+
+
+/**
+ * Delete the given transform feedback objects.
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTransformFeedbacks(n < 0)");
+ return;
+ }
+
+ if (!names)
+ return;
+
+ for (i = 0; i < n; i++) {
+ if (names[i] > 0) {
+ struct gl_transform_feedback_object *obj
+ = lookup_transform_feedback_object(ctx, names[i]);
+ if (obj) {
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDeleteTransformFeedbacks(object %u is active)",
+ names[i]);
+ return;
+ }
+ _mesa_HashRemove(ctx->TransformFeedback.Objects, names[i]);
+ /* unref, but object may not be deleted until later */
+ reference_transform_feedback_object(&obj, NULL);
+ }
+ }
+ }
+}
+
+
+/**
+ * Pause transform feedback.
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_PauseTransformFeedback(void)
+{
+ struct gl_transform_feedback_object *obj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (!obj->Active || obj->Paused) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glPauseTransformFeedback(feedback not active or already paused)");
+ return;
+ }
+
+ obj->Paused = GL_TRUE;
+
+ assert(ctx->Driver.PauseTransformFeedback);
+ ctx->Driver.PauseTransformFeedback(ctx, obj);
+}
+
+
+/**
+ * Resume transform feedback.
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_ResumeTransformFeedback(void)
+{
+ struct gl_transform_feedback_object *obj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ obj = ctx->TransformFeedback.CurrentObject;
+
+ if (!obj->Active || !obj->Paused) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glPauseTransformFeedback(feedback not active or not paused)");
+ return;
+ }
+
+ obj->Paused = GL_FALSE;
+
+ assert(ctx->Driver.ResumeTransformFeedback);
+ ctx->Driver.ResumeTransformFeedback(ctx, obj);
+}
+
+
+/**
+ * Draw the vertex data in a transform feedback object.
+ * \param mode GL_POINTS, GL_LINES, GL_TRIANGLE_STRIP, etc.
+ * \param name the transform feedback object
+ * The number of vertices comes from the transform feedback object.
+ * User still has to setup of the vertex attribute info with
+ * glVertexPointer, glColorPointer, etc.
+ * Part of GL_ARB_transform_feedback2.
+ */
+void GLAPIENTRY
+_mesa_DrawTransformFeedback(GLenum mode, GLuint name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_transform_feedback_object *obj =
+ lookup_transform_feedback_object(ctx, name);
+
+ if (mode > GL_POLYGON) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glDrawTransformFeedback(mode=0x%x)", mode);
+ return;
+ }
+ if (!obj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawTransformFeedback(name = %u)", name);
+ return;
+ }
+
+ /* XXX check if EndTransformFeedback has never been called while
+ * the object was bound
+ */
+
+ assert(ctx->Driver.DrawTransformFeedback);
+ ctx->Driver.DrawTransformFeedback(ctx, mode, obj);
+}
+
+
+/*
+XXX misc to do:
+
+glGet*() for
+
+GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED
+GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE
+GL_TRANSFORM_FEEDBACK_BINDING
+*/
+
+
+#endif /* FEATURE_EXT_transform_feedback */
diff --git a/mesalib/src/mesa/main/transformfeedback.h b/mesalib/src/mesa/main/transformfeedback.h
new file mode 100644
index 000000000..4d38522d6
--- /dev/null
+++ b/mesalib/src/mesa/main/transformfeedback.h
@@ -0,0 +1,132 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef TRANSFORM_FEEDBACK_H
+#define TRANSFORM_FEEDBACK_H
+
+#include "main/mtypes.h"
+
+
+extern void
+_mesa_init_transform_feedback(GLcontext *ctx);
+
+extern void
+_mesa_free_transform_feedback(GLcontext *ctx);
+
+#if FEATURE_EXT_transform_feedback
+
+extern GLboolean
+_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode);
+
+extern GLboolean
+_mesa_validate_transform_feedback_buffers(GLcontext *ctx);
+
+
+extern void
+_mesa_init_transform_feedback_functions(struct dd_function_table *driver);
+
+extern void
+_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp);
+
+
+/*** GL_EXT_transform_feedback ***/
+
+extern void GLAPIENTRY
+_mesa_BeginTransformFeedback(GLenum mode);
+
+extern void GLAPIENTRY
+_mesa_EndTransformFeedback(void);
+
+extern void GLAPIENTRY
+_mesa_BindBufferRange(GLenum target, GLuint index,
+ GLuint buffer, GLintptr offset, GLsizeiptr size);
+
+extern void GLAPIENTRY
+_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer);
+
+extern void GLAPIENTRY
+_mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
+ GLintptr offset);
+
+extern void GLAPIENTRY
+_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
+ const GLchar **varyings, GLenum bufferMode);
+
+extern void GLAPIENTRY
+_mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
+ GLsizei bufSize, GLsizei *length,
+ GLsizei *size, GLenum *type, GLchar *name);
+
+
+
+/*** GL_ARB_transform_feedback2 ***/
+
+extern void GLAPIENTRY
+_mesa_GenTransformFeedbacks(GLsizei n, GLuint *names);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsTransformFeedback(GLuint name);
+
+extern void GLAPIENTRY
+_mesa_BindTransformFeedback(GLenum target, GLuint name);
+
+extern void GLAPIENTRY
+_mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names);
+
+extern void GLAPIENTRY
+_mesa_PauseTransformFeedback(void);
+
+extern void GLAPIENTRY
+_mesa_ResumeTransformFeedback(void);
+
+extern void GLAPIENTRY
+_mesa_DrawTransformFeedback(GLenum mode, GLuint name);
+
+#else /* FEATURE_EXT_transform_feedback */
+
+static INLINE GLboolean
+_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode)
+{
+ return GL_TRUE;
+}
+
+static INLINE GLboolean
+_mesa_validate_transform_feedback_buffers(GLcontext *ctx)
+{
+ return GL_TRUE;
+}
+
+static INLINE void
+_mesa_init_transform_feedback_functions(struct dd_function_table *driver)
+{
+}
+
+static INLINE void
+_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_EXT_transform_feedback */
+
+#endif /* TRANSFORM_FEEDBACK_H */
diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c
new file mode 100644
index 000000000..a5d7da51f
--- /dev/null
+++ b/mesalib/src/mesa/main/uniforms.c
@@ -0,0 +1,1382 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file uniforms.c
+ * Functions related to GLSL uniform variables.
+ * \author Brian Paul
+ */
+
+/**
+ * XXX things to do:
+ * 1. Check that the right error code is generated for all _mesa_error() calls.
+ * 2. Insert FLUSH_VERTICES calls in various places
+ */
+
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/dispatch.h"
+#include "main/shaderapi.h"
+#include "main/shaderobj.h"
+#include "main/uniforms.h"
+#include "program/prog_parameter.h"
+#include "program/prog_statevars.h"
+#include "program/prog_uniform.h"
+
+
+
+static GLenum
+base_uniform_type(GLenum type)
+{
+ switch (type) {
+#if 0 /* not needed, for now */
+ case GL_BOOL:
+ case GL_BOOL_VEC2:
+ case GL_BOOL_VEC3:
+ case GL_BOOL_VEC4:
+ return GL_BOOL;
+#endif
+ case GL_FLOAT:
+ case GL_FLOAT_VEC2:
+ case GL_FLOAT_VEC3:
+ case GL_FLOAT_VEC4:
+ return GL_FLOAT;
+ case GL_UNSIGNED_INT:
+ case GL_UNSIGNED_INT_VEC2:
+ case GL_UNSIGNED_INT_VEC3:
+ case GL_UNSIGNED_INT_VEC4:
+ return GL_UNSIGNED_INT;
+ case GL_INT:
+ case GL_INT_VEC2:
+ case GL_INT_VEC3:
+ case GL_INT_VEC4:
+ return GL_INT;
+ default:
+ _mesa_problem(NULL, "Invalid type in base_uniform_type()");
+ return GL_FLOAT;
+ }
+}
+
+
+static GLboolean
+is_boolean_type(GLenum type)
+{
+ switch (type) {
+ case GL_BOOL:
+ case GL_BOOL_VEC2:
+ case GL_BOOL_VEC3:
+ case GL_BOOL_VEC4:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+static GLboolean
+is_sampler_type(GLenum type)
+{
+ switch (type) {
+ case GL_SAMPLER_1D:
+ case GL_SAMPLER_2D:
+ case GL_SAMPLER_3D:
+ case GL_SAMPLER_CUBE:
+ case GL_SAMPLER_1D_SHADOW:
+ case GL_SAMPLER_2D_SHADOW:
+ case GL_SAMPLER_2D_RECT_ARB:
+ case GL_SAMPLER_2D_RECT_SHADOW_ARB:
+ case GL_SAMPLER_1D_ARRAY_EXT:
+ case GL_SAMPLER_2D_ARRAY_EXT:
+ case GL_SAMPLER_1D_ARRAY_SHADOW_EXT:
+ case GL_SAMPLER_2D_ARRAY_SHADOW_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+static struct gl_program_parameter *
+get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index)
+{
+ const struct gl_program *prog = NULL;
+ GLint progPos;
+
+ progPos = shProg->Uniforms->Uniforms[index].VertPos;
+ if (progPos >= 0) {
+ prog = &shProg->VertexProgram->Base;
+ }
+ else {
+ progPos = shProg->Uniforms->Uniforms[index].FragPos;
+ if (progPos >= 0) {
+ prog = &shProg->FragmentProgram->Base;
+ } else {
+ progPos = shProg->Uniforms->Uniforms[index].GeomPos;
+ if (progPos >= 0) {
+ prog = &shProg->GeometryProgram->Base;
+ }
+ }
+ }
+
+ if (!prog || progPos < 0)
+ return NULL; /* should never happen */
+
+ return &prog->Parameters->Parameters[progPos];
+}
+
+
+/**
+ * Called by glGetActiveUniform().
+ */
+static void
+_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
+ GLsizei maxLength, GLsizei *length, GLint *size,
+ GLenum *type, GLchar *nameOut)
+{
+ const struct gl_shader_program *shProg;
+ const struct gl_program *prog = NULL;
+ const struct gl_program_parameter *param;
+ GLint progPos;
+
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform");
+ if (!shProg)
+ return;
+
+ if (!shProg->Uniforms || index >= shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)");
+ return;
+ }
+
+ progPos = shProg->Uniforms->Uniforms[index].VertPos;
+ if (progPos >= 0) {
+ prog = &shProg->VertexProgram->Base;
+ }
+ else {
+ progPos = shProg->Uniforms->Uniforms[index].FragPos;
+ if (progPos >= 0) {
+ prog = &shProg->FragmentProgram->Base;
+ } else {
+ progPos = shProg->Uniforms->Uniforms[index].GeomPos;
+ if (progPos >= 0) {
+ prog = &shProg->GeometryProgram->Base;
+ }
+ }
+ }
+
+ if (!prog || progPos < 0)
+ return; /* should never happen */
+
+ ASSERT(progPos < prog->Parameters->NumParameters);
+ param = &prog->Parameters->Parameters[progPos];
+
+ if (nameOut) {
+ _mesa_copy_string(nameOut, maxLength, length, param->Name);
+ }
+
+ if (size) {
+ GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
+ if ((GLint) param->Size > typeSize) {
+ /* This is an array.
+ * Array elements are placed on vector[4] boundaries so they're
+ * a multiple of four floats. We round typeSize up to next multiple
+ * of four to get the right size below.
+ */
+ typeSize = (typeSize + 3) & ~3;
+ }
+ /* Note that the returned size is in units of the <type>, not bytes */
+ *size = param->Size / typeSize;
+ }
+
+ if (type) {
+ *type = param->DataType;
+ }
+}
+
+
+
+static void
+get_matrix_dims(GLenum type, GLint *rows, GLint *cols)
+{
+ switch (type) {
+ case GL_FLOAT_MAT2:
+ *rows = *cols = 2;
+ break;
+ case GL_FLOAT_MAT2x3:
+ *rows = 3;
+ *cols = 2;
+ break;
+ case GL_FLOAT_MAT2x4:
+ *rows = 4;
+ *cols = 2;
+ break;
+ case GL_FLOAT_MAT3:
+ *rows = 3;
+ *cols = 3;
+ break;
+ case GL_FLOAT_MAT3x2:
+ *rows = 2;
+ *cols = 3;
+ break;
+ case GL_FLOAT_MAT3x4:
+ *rows = 4;
+ *cols = 3;
+ break;
+ case GL_FLOAT_MAT4:
+ *rows = 4;
+ *cols = 4;
+ break;
+ case GL_FLOAT_MAT4x2:
+ *rows = 2;
+ *cols = 4;
+ break;
+ case GL_FLOAT_MAT4x3:
+ *rows = 3;
+ *cols = 4;
+ break;
+ default:
+ *rows = *cols = 0;
+ }
+}
+
+
+/**
+ * Determine the number of rows and columns occupied by a uniform
+ * according to its datatype. For non-matrix types (such as GL_FLOAT_VEC4),
+ * the number of rows = 1 and cols = number of elements in the vector.
+ */
+static void
+get_uniform_rows_cols(const struct gl_program_parameter *p,
+ GLint *rows, GLint *cols)
+{
+ get_matrix_dims(p->DataType, rows, cols);
+ if (*rows == 0 && *cols == 0) {
+ /* not a matrix type, probably a float or vector */
+ if (p->Size <= 4) {
+ *rows = 1;
+ *cols = p->Size;
+ }
+ else {
+ *rows = p->Size / 4 + 1;
+ if (p->Size % 4 == 0)
+ *cols = 4;
+ else
+ *cols = p->Size % 4;
+ }
+ }
+}
+
+
+/**
+ * Helper for get_uniform[fi]v() functions.
+ * Given a shader program name and uniform location, return a pointer
+ * to the shader program and return the program parameter position.
+ */
+static void
+lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location,
+ struct gl_program **progOut, GLint *paramPosOut)
+{
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program_err(ctx, program, "glGetUniform[if]v");
+ struct gl_program *prog = NULL;
+ GLint progPos = -1;
+
+ /* if shProg is NULL, we'll have already recorded an error */
+
+ if (shProg) {
+ if (!shProg->Uniforms ||
+ location < 0 ||
+ location >= (GLint) shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(location)");
+ }
+ else {
+ /* OK, find the gl_program and program parameter location */
+ progPos = shProg->Uniforms->Uniforms[location].VertPos;
+ if (progPos >= 0) {
+ prog = &shProg->VertexProgram->Base;
+ }
+ else {
+ progPos = shProg->Uniforms->Uniforms[location].FragPos;
+ if (progPos >= 0) {
+ prog = &shProg->FragmentProgram->Base;
+ } else {
+ progPos = shProg->Uniforms->Uniforms[location].GeomPos;
+ if (progPos >= 0) {
+ prog = &shProg->GeometryProgram->Base;
+ }
+ }
+ }
+ }
+ }
+
+ *progOut = prog;
+ *paramPosOut = progPos;
+}
+
+
+/**
+ * GLGL uniform arrays and structs require special handling.
+ *
+ * The GL_ARB_shader_objects spec says that if you use
+ * glGetUniformLocation to get the location of an array, you CANNOT
+ * access other elements of the array by adding an offset to the
+ * returned location. For example, you must call
+ * glGetUniformLocation("foo[16]") if you want to set the 16th element
+ * of the array with glUniform().
+ *
+ * HOWEVER, some other OpenGL drivers allow accessing array elements
+ * by adding an offset to the returned array location. And some apps
+ * seem to depend on that behaviour.
+ *
+ * Mesa's gl_uniform_list doesn't directly support this since each
+ * entry in the list describes one uniform variable, not one uniform
+ * element. We could insert dummy entries in the list for each array
+ * element after [0] but that causes complications elsewhere.
+ *
+ * We solve this problem by encoding two values in the location that's
+ * returned by glGetUniformLocation():
+ * a) index into gl_uniform_list::Uniforms[] for the uniform
+ * b) an array/field offset (0 for simple types)
+ *
+ * These two values are encoded in the high and low halves of a GLint.
+ * By putting the uniform number in the high part and the offset in the
+ * low part, we can support the unofficial ability to index into arrays
+ * by adding offsets to the location value.
+ */
+static void
+merge_location_offset(GLint *location, GLint offset)
+{
+ *location = (*location << 16) | offset;
+}
+
+
+/**
+ * Separate the uniform location and parameter offset. See above.
+ */
+static void
+split_location_offset(GLint *location, GLint *offset)
+{
+ *offset = *location & 0xffff;
+ *location = *location >> 16;
+}
+
+
+
+/**
+ * Called via glGetUniformfv().
+ */
+static void
+_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
+ GLfloat *params)
+{
+ struct gl_program *prog;
+ GLint paramPos;
+ GLint offset;
+
+ split_location_offset(&location, &offset);
+
+ lookup_uniform_parameter(ctx, program, location, &prog, &paramPos);
+
+ if (prog) {
+ const struct gl_program_parameter *p =
+ &prog->Parameters->Parameters[paramPos];
+ GLint rows, cols, i, j, k;
+
+ get_uniform_rows_cols(p, &rows, &cols);
+
+ k = 0;
+ for (i = 0; i < rows; i++) {
+ for (j = 0; j < cols; j++ ) {
+ params[k++] = prog->Parameters->ParameterValues[paramPos+i][j];
+ }
+ }
+ }
+}
+
+
+/**
+ * Called via glGetUniformiv().
+ * \sa _mesa_get_uniformfv, only difference is a cast.
+ */
+static void
+_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
+ GLint *params)
+{
+ struct gl_program *prog;
+ GLint paramPos;
+ GLint offset;
+
+ split_location_offset(&location, &offset);
+
+ lookup_uniform_parameter(ctx, program, location, &prog, &paramPos);
+
+ if (prog) {
+ const struct gl_program_parameter *p =
+ &prog->Parameters->Parameters[paramPos];
+ GLint rows, cols, i, j, k;
+
+ get_uniform_rows_cols(p, &rows, &cols);
+
+ k = 0;
+ for (i = 0; i < rows; i++) {
+ for (j = 0; j < cols; j++ ) {
+ params[k++] = (GLint) prog->Parameters->ParameterValues[paramPos+i][j];
+ }
+ }
+ }
+}
+
+
+/**
+ * Called via glGetUniformLocation().
+ *
+ * The return value will encode two values, the uniform location and an
+ * offset (used for arrays, structs).
+ */
+GLint
+_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg,
+ const GLchar *name)
+{
+ GLint offset = 0, location = -1;
+
+ if (shProg->LinkStatus == GL_FALSE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)");
+ return -1;
+ }
+
+ /* XXX we should return -1 if the uniform was declared, but not
+ * actually used.
+ */
+
+ /* XXX we need to be able to parse uniform names for structs and arrays
+ * such as:
+ * mymatrix[1]
+ * mystruct.field1
+ */
+
+ {
+ /* handle 1-dimension arrays here... */
+ char *c = strchr(name, '[');
+ if (c) {
+ /* truncate name at [ */
+ const GLint len = c - name;
+ GLchar *newName = malloc(len + 1);
+ if (!newName)
+ return -1; /* out of mem */
+ memcpy(newName, name, len);
+ newName[len] = 0;
+
+ location = _mesa_lookup_uniform(shProg->Uniforms, newName);
+ if (location >= 0) {
+ const GLint element = atoi(c + 1);
+ if (element > 0) {
+ /* get type of the uniform array element */
+ struct gl_program_parameter *p;
+ p = get_uniform_parameter(shProg, location);
+ if (p) {
+ GLint rows, cols;
+ get_matrix_dims(p->DataType, &rows, &cols);
+ if (rows < 1)
+ rows = 1;
+ offset = element * rows;
+ }
+ }
+ }
+
+ free(newName);
+ }
+ }
+
+ if (location < 0) {
+ location = _mesa_lookup_uniform(shProg->Uniforms, name);
+ }
+
+ if (location >= 0) {
+ merge_location_offset(&location, offset);
+ }
+
+ return location;
+}
+
+
+
+/**
+ * Update the vertex/fragment program's TexturesUsed array.
+ *
+ * This needs to be called after glUniform(set sampler var) is called.
+ * A call to glUniform(samplerVar, value) causes a sampler to point to a
+ * particular texture unit. We know the sampler's texture target
+ * (1D/2D/3D/etc) from compile time but the sampler's texture unit is
+ * set by glUniform() calls.
+ *
+ * So, scan the program->SamplerUnits[] and program->SamplerTargets[]
+ * information to update the prog->TexturesUsed[] values.
+ * Each value of TexturesUsed[unit] is one of zero, TEXTURE_1D_INDEX,
+ * TEXTURE_2D_INDEX, TEXTURE_3D_INDEX, etc.
+ * We'll use that info for state validation before rendering.
+ */
+void
+_mesa_update_shader_textures_used(struct gl_program *prog)
+{
+ GLuint s;
+
+ memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
+
+ for (s = 0; s < MAX_SAMPLERS; s++) {
+ if (prog->SamplersUsed & (1 << s)) {
+ GLuint unit = prog->SamplerUnits[s];
+ GLuint tgt = prog->SamplerTargets[s];
+ assert(unit < MAX_TEXTURE_IMAGE_UNITS);
+ assert(tgt < NUM_TEXTURE_TARGETS);
+ prog->TexturesUsed[unit] |= (1 << tgt);
+ }
+ }
+}
+
+
+/**
+ * Check if the type given by userType is allowed to set a uniform of the
+ * target type. Generally, equivalence is required, but setting Boolean
+ * uniforms can be done with glUniformiv or glUniformfv.
+ */
+static GLboolean
+compatible_types(GLenum userType, GLenum targetType)
+{
+ if (userType == targetType)
+ return GL_TRUE;
+
+ if (targetType == GL_BOOL && (userType == GL_FLOAT ||
+ userType == GL_UNSIGNED_INT ||
+ userType == GL_INT))
+ return GL_TRUE;
+
+ if (targetType == GL_BOOL_VEC2 && (userType == GL_FLOAT_VEC2 ||
+ userType == GL_UNSIGNED_INT_VEC2 ||
+ userType == GL_INT_VEC2))
+ return GL_TRUE;
+
+ if (targetType == GL_BOOL_VEC3 && (userType == GL_FLOAT_VEC3 ||
+ userType == GL_UNSIGNED_INT_VEC3 ||
+ userType == GL_INT_VEC3))
+ return GL_TRUE;
+
+ if (targetType == GL_BOOL_VEC4 && (userType == GL_FLOAT_VEC4 ||
+ userType == GL_UNSIGNED_INT_VEC4 ||
+ userType == GL_INT_VEC4))
+ return GL_TRUE;
+
+ if (is_sampler_type(targetType) && userType == GL_INT)
+ return GL_TRUE;
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Set the value of a program's uniform variable.
+ * \param program the program whose uniform to update
+ * \param index the index of the program parameter for the uniform
+ * \param offset additional parameter slot offset (for arrays)
+ * \param type the incoming datatype of 'values'
+ * \param count the number of uniforms to set
+ * \param elems number of elements per uniform (1, 2, 3 or 4)
+ * \param values the new values, of datatype 'type'
+ */
+static void
+set_program_uniform(GLcontext *ctx, struct gl_program *program,
+ GLint index, GLint offset,
+ GLenum type, GLsizei count, GLint elems,
+ const void *values)
+{
+ const struct gl_program_parameter *param =
+ &program->Parameters->Parameters[index];
+
+ assert(offset >= 0);
+ assert(elems >= 1);
+ assert(elems <= 4);
+
+ if (!compatible_types(type, param->DataType)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(type mismatch)");
+ return;
+ }
+
+ if (index + offset > (GLint) program->Parameters->Size) {
+ /* out of bounds! */
+ return;
+ }
+
+ if (param->Type == PROGRAM_SAMPLER) {
+ /* This controls which texture unit which is used by a sampler */
+ GLboolean changed = GL_FALSE;
+ GLint i;
+
+ /* this should have been caught by the compatible_types() check */
+ ASSERT(type == GL_INT);
+
+ /* loop over number of samplers to change */
+ for (i = 0; i < count; i++) {
+ GLuint sampler =
+ (GLuint) program->Parameters->ParameterValues[index + offset + i][0];
+ GLuint texUnit = ((GLuint *) values)[i];
+
+ /* check that the sampler (tex unit index) is legal */
+ if (texUnit >= ctx->Const.MaxTextureImageUnits) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glUniform1(invalid sampler/tex unit index for '%s')",
+ param->Name);
+ return;
+ }
+
+ /* This maps a sampler to a texture unit: */
+ if (sampler < MAX_SAMPLERS) {
+#if 0
+ printf("Set program %p sampler %d '%s' to unit %u\n",
+ program, sampler, param->Name, texUnit);
+#endif
+ if (program->SamplerUnits[sampler] != texUnit) {
+ program->SamplerUnits[sampler] = texUnit;
+ changed = GL_TRUE;
+ }
+ }
+ }
+
+ if (changed) {
+ /* When a sampler's value changes it usually requires rewriting
+ * a GPU program's TEX instructions since there may not be a
+ * sampler->texture lookup table. We signal this with the
+ * ProgramStringNotify() callback.
+ */
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE | _NEW_PROGRAM);
+ _mesa_update_shader_textures_used(program);
+ /* Do we need to care about the return value here?
+ * This should not be the first time the driver was notified of
+ * this program.
+ */
+ (void) ctx->Driver.ProgramStringNotify(ctx, program->Target, program);
+ }
+ }
+ else {
+ /* ordinary uniform variable */
+ const GLboolean isUniformBool = is_boolean_type(param->DataType);
+ const GLenum basicType = base_uniform_type(type);
+ const GLint slots = (param->Size + 3) / 4;
+ const GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
+ GLsizei k, i;
+
+ if ((GLint) param->Size > typeSize) {
+ /* an array */
+ /* we'll ignore extra data below */
+ }
+ else {
+ /* non-array: count must be at most one; count == 0 is handled by the loop below */
+ if (count > 1) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUniform(uniform '%s' is not an array)",
+ param->Name);
+ return;
+ }
+ }
+
+ /* loop over number of array elements */
+ for (k = 0; k < count; k++) {
+ GLfloat *uniformVal;
+
+ if (offset + k >= slots) {
+ /* Extra array data is ignored */
+ break;
+ }
+
+ /* uniformVal (the destination) is always float[4] */
+ uniformVal = program->Parameters->ParameterValues[index + offset + k];
+
+ if (basicType == GL_INT) {
+ /* convert user's ints to floats */
+ const GLint *iValues = ((const GLint *) values) + k * elems;
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = (GLfloat) iValues[i];
+ }
+ }
+ else if (basicType == GL_UNSIGNED_INT) {
+ /* convert user's uints to floats */
+ const GLuint *iValues = ((const GLuint *) values) + k * elems;
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = (GLfloat) iValues[i];
+ }
+ }
+ else {
+ const GLfloat *fValues = ((const GLfloat *) values) + k * elems;
+ assert(basicType == GL_FLOAT);
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = fValues[i];
+ }
+ }
+
+ /* if the uniform is bool-valued, convert to 1.0 or 0.0 */
+ if (isUniformBool) {
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = uniformVal[i] ? 1.0f : 0.0f;
+ }
+ }
+ }
+ }
+}
+
+
+/**
+ * Called via glUniform*() functions.
+ */
+void
+_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shProg,
+ GLint location, GLsizei count,
+ const GLvoid *values, GLenum type)
+{
+ struct gl_uniform *uniform;
+ GLint elems, offset;
+
+ if (!shProg || !shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)");
+ return;
+ }
+
+ if (location == -1)
+ return; /* The standard specifies this as a no-op */
+
+ if (location < -1) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(location=%d)",
+ location);
+ return;
+ }
+
+ split_location_offset(&location, &offset);
+
+ if (location < 0 || location >= (GLint) shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location=%d)", location);
+ return;
+ }
+
+ if (count < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(count < 0)");
+ return;
+ }
+
+ elems = _mesa_sizeof_glsl_type(type);
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ uniform = &shProg->Uniforms->Uniforms[location];
+
+ if (ctx->Shader.Flags & GLSL_UNIFORMS) {
+ const GLenum basicType = base_uniform_type(type);
+ GLint i;
+ printf("Mesa: set program %u uniform %s (loc %d) to: ",
+ shProg->Name, uniform->Name, location);
+ if (basicType == GL_INT) {
+ const GLint *v = (const GLint *) values;
+ for (i = 0; i < count * elems; i++) {
+ printf("%d ", v[i]);
+ }
+ }
+ else if (basicType == GL_UNSIGNED_INT) {
+ const GLuint *v = (const GLuint *) values;
+ for (i = 0; i < count * elems; i++) {
+ printf("%u ", v[i]);
+ }
+ }
+ else {
+ const GLfloat *v = (const GLfloat *) values;
+ assert(basicType == GL_FLOAT);
+ for (i = 0; i < count * elems; i++) {
+ printf("%g ", v[i]);
+ }
+ }
+ printf("\n");
+ }
+
+ /* A uniform var may be used by both a vertex shader and a fragment
+ * shader. We may need to update one or both shader's uniform here:
+ */
+ if (shProg->VertexProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->VertPos;
+ if (index >= 0) {
+ set_program_uniform(ctx, &shProg->VertexProgram->Base,
+ index, offset, type, count, elems, values);
+ }
+ }
+
+ if (shProg->FragmentProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->FragPos;
+ if (index >= 0) {
+ set_program_uniform(ctx, &shProg->FragmentProgram->Base,
+ index, offset, type, count, elems, values);
+ }
+ }
+
+ if (shProg->GeometryProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->GeomPos;
+ if (index >= 0) {
+ set_program_uniform(ctx, &shProg->GeometryProgram->Base,
+ index, offset, type, count, elems, values);
+ }
+ }
+
+ uniform->Initialized = GL_TRUE;
+}
+
+
+/**
+ * Set a matrix-valued program parameter.
+ */
+static void
+set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program,
+ GLuint index, GLuint offset,
+ GLuint count, GLuint rows, GLuint cols,
+ GLboolean transpose, const GLfloat *values)
+{
+ GLuint mat, row, col;
+ GLuint src = 0;
+ const struct gl_program_parameter * param = &program->Parameters->Parameters[index];
+ const GLuint slots = (param->Size + 3) / 4;
+ const GLint typeSize = _mesa_sizeof_glsl_type(param->DataType);
+ GLint nr, nc;
+
+ /* check that the number of rows, columns is correct */
+ get_matrix_dims(param->DataType, &nr, &nc);
+ if (rows != nr || cols != nc) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUniformMatrix(matrix size mismatch)");
+ return;
+ }
+
+ if ((GLint) param->Size <= typeSize) {
+ /* non-array: count must be at most one; count == 0 is handled by the loop below */
+ if (count > 1) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUniformMatrix(uniform is not an array)");
+ return;
+ }
+ }
+
+ /*
+ * Note: the _columns_ of a matrix are stored in program registers, not
+ * the rows. So, the loops below look a little funny.
+ * XXX could optimize this a bit...
+ */
+
+ /* loop over matrices */
+ for (mat = 0; mat < count; mat++) {
+
+ /* each matrix: */
+ for (col = 0; col < cols; col++) {
+ GLfloat *v;
+ if (offset >= slots) {
+ /* Ignore writes beyond the end of (the used part of) an array */
+ return;
+ }
+ v = program->Parameters->ParameterValues[index + offset];
+ for (row = 0; row < rows; row++) {
+ if (transpose) {
+ v[row] = values[src + row * cols + col];
+ }
+ else {
+ v[row] = values[src + col * rows + row];
+ }
+ }
+
+ offset++;
+ }
+
+ src += rows * cols; /* next matrix */
+ }
+}
+
+
+/**
+ * Called by glUniformMatrix*() functions.
+ * Note: cols=2, rows=4 ==> array[2] of vec4
+ */
+void
+_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg,
+ GLint cols, GLint rows,
+ GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *values)
+{
+ struct gl_uniform *uniform;
+ GLint offset;
+
+ if (!shProg || !shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUniformMatrix(program not linked)");
+ return;
+ }
+
+ if (location == -1)
+ return; /* The standard specifies this as a no-op */
+
+ if (location < -1) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix(location)");
+ return;
+ }
+
+ split_location_offset(&location, &offset);
+
+ if (location < 0 || location >= (GLint) shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix(location)");
+ return;
+ }
+ if (values == NULL) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
+
+ uniform = &shProg->Uniforms->Uniforms[location];
+
+ if (shProg->VertexProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->VertPos;
+ if (index >= 0) {
+ set_program_uniform_matrix(ctx, &shProg->VertexProgram->Base,
+ index, offset,
+ count, rows, cols, transpose, values);
+ }
+ }
+
+ if (shProg->FragmentProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->FragPos;
+ if (index >= 0) {
+ set_program_uniform_matrix(ctx, &shProg->FragmentProgram->Base,
+ index, offset,
+ count, rows, cols, transpose, values);
+ }
+ }
+
+ if (shProg->GeometryProgram) {
+ /* convert uniform location to program parameter index */
+ GLint index = uniform->GeomPos;
+ if (index >= 0) {
+ set_program_uniform_matrix(ctx, &shProg->GeometryProgram->Base,
+ index, offset,
+ count, rows, cols, transpose, values);
+ }
+ }
+
+ uniform->Initialized = GL_TRUE;
+}
+
+
+void GLAPIENTRY
+_mesa_Uniform1fARB(GLint location, GLfloat v0)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_FLOAT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat v[2];
+ v[0] = v0;
+ v[1] = v1;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat v[3];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
+ GLfloat v3)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat v[4];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ v[3] = v3;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC4);
+}
+
+void GLAPIENTRY
+_mesa_Uniform1iARB(GLint location, GLint v0)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_INT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint v[2];
+ v[0] = v0;
+ v[1] = v1;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint v[3];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint v[4];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ v[3] = v3;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC4);
+}
+
+void GLAPIENTRY
+_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC4);
+}
+
+void GLAPIENTRY
+_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC4);
+}
+
+
+/** OpenGL 3.0 GLuint-valued functions **/
+void GLAPIENTRY
+_mesa_Uniform1ui(GLint location, GLuint v0)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_UNSIGNED_INT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint v[2];
+ v[0] = v0;
+ v[1] = v1;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint v[3];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint v[4];
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ v[3] = v3;
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+}
+
+void GLAPIENTRY
+_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT);
+}
+
+void GLAPIENTRY
+_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+}
+
+void GLAPIENTRY
+_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+}
+
+void GLAPIENTRY
+_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+}
+
+
+
+void GLAPIENTRY
+_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 2, 2, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 3, 3, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat * value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 4, 4, location, count, transpose, value);
+}
+
+
+/**
+ * Non-square UniformMatrix are OpenGL 2.1
+ */
+void GLAPIENTRY
+_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 2, 3, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 3, 2, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 2, 4, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 4, 2, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 3, 4, location, count, transpose, value);
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ 4, 3, location, count, transpose, value);
+}
+
+
+void GLAPIENTRY
+_mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_get_uniformfv(ctx, program, location, params);
+}
+
+
+void GLAPIENTRY
+_mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_get_uniformiv(ctx, program, location, params);
+}
+
+
+GLint GLAPIENTRY
+_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
+{
+ struct gl_shader_program *shProg;
+
+ GET_CURRENT_CONTEXT(ctx);
+
+ shProg = _mesa_lookup_shader_program_err(ctx, programObj,
+ "glGetUniformLocation");
+ if (!shProg)
+ return -1;
+
+ return _mesa_get_uniform_location(ctx, shProg, name);
+}
+
+
+void GLAPIENTRY
+_mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
+ GLsizei maxLength, GLsizei * length, GLint * size,
+ GLenum * type, GLcharARB * name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_get_active_uniform(ctx, program, index, maxLength, length, size,
+ type, name);
+}
+
+
+/**
+ * Plug in shader uniform-related functions into API dispatch table.
+ */
+void
+_mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
+{
+#if FEATURE_GL
+ SET_Uniform1fARB(exec, _mesa_Uniform1fARB);
+ SET_Uniform2fARB(exec, _mesa_Uniform2fARB);
+ SET_Uniform3fARB(exec, _mesa_Uniform3fARB);
+ SET_Uniform4fARB(exec, _mesa_Uniform4fARB);
+ SET_Uniform1iARB(exec, _mesa_Uniform1iARB);
+ SET_Uniform2iARB(exec, _mesa_Uniform2iARB);
+ SET_Uniform3iARB(exec, _mesa_Uniform3iARB);
+ SET_Uniform4iARB(exec, _mesa_Uniform4iARB);
+ SET_Uniform1fvARB(exec, _mesa_Uniform1fvARB);
+ SET_Uniform2fvARB(exec, _mesa_Uniform2fvARB);
+ SET_Uniform3fvARB(exec, _mesa_Uniform3fvARB);
+ SET_Uniform4fvARB(exec, _mesa_Uniform4fvARB);
+ SET_Uniform1ivARB(exec, _mesa_Uniform1ivARB);
+ SET_Uniform2ivARB(exec, _mesa_Uniform2ivARB);
+ SET_Uniform3ivARB(exec, _mesa_Uniform3ivARB);
+ SET_Uniform4ivARB(exec, _mesa_Uniform4ivARB);
+ SET_UniformMatrix2fvARB(exec, _mesa_UniformMatrix2fvARB);
+ SET_UniformMatrix3fvARB(exec, _mesa_UniformMatrix3fvARB);
+ SET_UniformMatrix4fvARB(exec, _mesa_UniformMatrix4fvARB);
+
+ SET_GetActiveUniformARB(exec, _mesa_GetActiveUniformARB);
+ SET_GetUniformLocationARB(exec, _mesa_GetUniformLocationARB);
+ SET_GetUniformfvARB(exec, _mesa_GetUniformfvARB);
+ SET_GetUniformivARB(exec, _mesa_GetUniformivARB);
+
+ /* OpenGL 2.1 */
+ SET_UniformMatrix2x3fv(exec, _mesa_UniformMatrix2x3fv);
+ SET_UniformMatrix3x2fv(exec, _mesa_UniformMatrix3x2fv);
+ SET_UniformMatrix2x4fv(exec, _mesa_UniformMatrix2x4fv);
+ SET_UniformMatrix4x2fv(exec, _mesa_UniformMatrix4x2fv);
+ SET_UniformMatrix3x4fv(exec, _mesa_UniformMatrix3x4fv);
+ SET_UniformMatrix4x3fv(exec, _mesa_UniformMatrix4x3fv);
+
+ /* OpenGL 3.0 */
+ /* XXX finish dispatch */
+ (void) _mesa_Uniform1ui;
+ (void) _mesa_Uniform2ui;
+ (void) _mesa_Uniform3ui;
+ (void) _mesa_Uniform4ui;
+ (void) _mesa_Uniform1uiv;
+ (void) _mesa_Uniform2uiv;
+ (void) _mesa_Uniform3uiv;
+ (void) _mesa_Uniform4uiv;
+#endif /* FEATURE_GL */
+}
diff --git a/mesalib/src/mesa/main/uniforms.h b/mesalib/src/mesa/main/uniforms.h
new file mode 100644
index 000000000..f823c6144
--- /dev/null
+++ b/mesalib/src/mesa/main/uniforms.h
@@ -0,0 +1,175 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef UNIFORMS_H
+#define UNIFORMS_H
+
+#include "glheader.h"
+
+struct gl_program;
+struct _glapi_table;
+
+extern void GLAPIENTRY
+_mesa_Uniform1fARB(GLint, GLfloat);
+
+extern void GLAPIENTRY
+_mesa_Uniform2fARB(GLint, GLfloat, GLfloat);
+
+extern void GLAPIENTRY
+_mesa_Uniform3fARB(GLint, GLfloat, GLfloat, GLfloat);
+
+extern void GLAPIENTRY
+_mesa_Uniform4fARB(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+
+extern void GLAPIENTRY
+_mesa_Uniform1iARB(GLint, GLint);
+
+extern void GLAPIENTRY
+_mesa_Uniform2iARB(GLint, GLint, GLint);
+
+extern void GLAPIENTRY
+_mesa_Uniform3iARB(GLint, GLint, GLint, GLint);
+
+extern void GLAPIENTRY
+_mesa_Uniform4iARB(GLint, GLint, GLint, GLint, GLint);
+
+extern void GLAPIENTRY
+_mesa_Uniform1fvARB(GLint, GLsizei, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_Uniform2fvARB(GLint, GLsizei, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_Uniform3fvARB(GLint, GLsizei, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_Uniform4fvARB(GLint, GLsizei, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_Uniform1ivARB(GLint, GLsizei, const GLint *);
+
+extern void GLAPIENTRY
+_mesa_Uniform2ivARB(GLint, GLsizei, const GLint *);
+
+extern void GLAPIENTRY
+_mesa_Uniform3ivARB(GLint, GLsizei, const GLint *);
+
+extern void GLAPIENTRY
+_mesa_Uniform4ivARB(GLint, GLsizei, const GLint *);
+
+extern void GLAPIENTRY
+_mesa_Uniform1ui(GLint location, GLuint v0);
+
+extern void GLAPIENTRY
+_mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1);
+
+extern void GLAPIENTRY
+_mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+
+extern void GLAPIENTRY
+_mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+
+extern void GLAPIENTRY
+_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value);
+
+extern void GLAPIENTRY
+_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value);
+
+extern void GLAPIENTRY
+_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value);
+
+extern void GLAPIENTRY
+_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value);
+
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix2fvARB(GLint, GLsizei, GLboolean, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix3fvARB(GLint, GLsizei, GLboolean, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix4fvARB(GLint, GLsizei, GLboolean, const GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *value);
+
+
+extern void GLAPIENTRY
+_mesa_GetActiveUniformARB(GLhandleARB, GLuint, GLsizei, GLsizei *,
+ GLint *, GLenum *, GLcharARB *);
+
+extern void GLAPIENTRY
+_mesa_GetUniformfvARB(GLhandleARB, GLint, GLfloat *);
+
+extern void GLAPIENTRY
+_mesa_GetUniformivARB(GLhandleARB, GLint, GLint *);
+
+extern GLint GLAPIENTRY
+_mesa_GetUniformLocationARB(GLhandleARB, const GLcharARB *);
+
+GLint
+_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg,
+ const GLchar *name);
+
+void
+_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shader_program,
+ GLint location, GLsizei count,
+ const GLvoid *values, GLenum type);
+
+void
+_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg,
+ GLint cols, GLint rows,
+ GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *values);
+
+extern void
+_mesa_update_shader_textures_used(struct gl_program *prog);
+
+
+extern void
+_mesa_init_shader_uniform_dispatch(struct _glapi_table *exec);
+
+#endif /* UNIFORMS_H */
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index b4128f84d..d19de7ff6 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -31,6 +31,7 @@
#include "enable.h"
#include "enums.h"
#include "hash.h"
+#include "macros.h"
#include "mtypes.h"
#include "varray.h"
#include "arrayobj.h"
@@ -710,6 +711,266 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
#endif
+/**
+ * New in GL3:
+ * Set an integer-valued vertex attribute array.
+ * Note that these arrays DO NOT alias the conventional GL vertex arrays
+ * (position, normal, color, fog, texcoord, etc).
+ */
+void GLAPIENTRY
+_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type,
+ GLboolean normalized,
+ GLsizei stride, const GLvoid *ptr)
+{
+ /* NOTE: until we have integer-valued vertex attributes, just
+ * route this through the regular glVertexAttribPointer() function.
+ */
+ _mesa_VertexAttribPointerARB(index, size, type, normalized, stride, ptr);
+}
+
+
+
+void GLAPIENTRY
+_mesa_EnableVertexAttribArrayARB(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glEnableVertexAttribArrayARB(index)");
+ return;
+ }
+
+ ASSERT(index < Elements(ctx->Array.ArrayObj->VertexAttrib));
+
+ FLUSH_VERTICES(ctx, _NEW_ARRAY);
+ ctx->Array.ArrayObj->VertexAttrib[index].Enabled = GL_TRUE;
+ ctx->Array.ArrayObj->_Enabled |= _NEW_ARRAY_ATTRIB(index);
+ ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
+}
+
+
+void GLAPIENTRY
+_mesa_DisableVertexAttribArrayARB(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glEnableVertexAttribArrayARB(index)");
+ return;
+ }
+
+ ASSERT(index < Elements(ctx->Array.ArrayObj->VertexAttrib));
+
+ FLUSH_VERTICES(ctx, _NEW_ARRAY);
+ ctx->Array.ArrayObj->VertexAttrib[index].Enabled = GL_FALSE;
+ ctx->Array.ArrayObj->_Enabled &= ~_NEW_ARRAY_ATTRIB(index);
+ ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
+}
+
+
+/**
+ * Return info for a vertex attribute array (no alias with legacy
+ * vertex attributes (pos, normal, color, etc)). This function does
+ * not handle the 4-element GL_CURRENT_VERTEX_ATTRIB_ARB query.
+ */
+static GLuint
+get_vertex_array_attrib(GLcontext *ctx, GLuint index, GLenum pname,
+ const char *caller)
+{
+ const struct gl_client_array *array;
+
+ if (index >= MAX_VERTEX_GENERIC_ATTRIBS) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index);
+ return 0;
+ }
+
+ ASSERT(index < Elements(ctx->Array.ArrayObj->VertexAttrib));
+
+ array = &ctx->Array.ArrayObj->VertexAttrib[index];
+
+ switch (pname) {
+ case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
+ return array->Enabled;
+ case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
+ return array->Size;
+ case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
+ return array->Stride;
+ case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
+ return array->Type;
+ case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB:
+ return array->Normalized;
+ case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
+ return array->BufferObj->Name;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", caller, pname);
+ return 0;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribfv(index==0)");
+ }
+ else {
+ const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+ FLUSH_CURRENT(ctx, 0);
+ COPY_4V(params, v);
+ }
+ }
+ else {
+ params[0] = (GLfloat) get_vertex_array_attrib(ctx, index, pname,
+ "glGetVertexAttribfv");
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribdv(index==0)");
+ }
+ else {
+ const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+ FLUSH_CURRENT(ctx, 0);
+ params[0] = (GLdouble) v[0];
+ params[1] = (GLdouble) v[1];
+ params[2] = (GLdouble) v[2];
+ params[3] = (GLdouble) v[3];
+ }
+ }
+ else {
+ params[0] = (GLdouble) get_vertex_array_attrib(ctx, index, pname,
+ "glGetVertexAttribdv");
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribiv(index==0)");
+ }
+ else {
+ const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+ FLUSH_CURRENT(ctx, 0);
+ /* XXX should floats in[0,1] be scaled to full int range? */
+ params[0] = (GLint) v[0];
+ params[1] = (GLint) v[1];
+ params[2] = (GLint) v[2];
+ params[3] = (GLint) v[3];
+ }
+ }
+ else {
+ params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname,
+ "glGetVertexAttribiv");
+ }
+}
+
+
+/** GL 3.0 */
+void GLAPIENTRY
+_mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribIiv(index==0)");
+ }
+ else {
+ const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+ FLUSH_CURRENT(ctx, 0);
+ /* XXX we don't have true integer-valued vertex attribs yet */
+ params[0] = (GLint) v[0];
+ params[1] = (GLint) v[1];
+ params[2] = (GLint) v[2];
+ params[3] = (GLint) v[3];
+ }
+ }
+ else {
+ params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname,
+ "glGetVertexAttribIiv");
+ }
+}
+
+
+/** GL 3.0 */
+void GLAPIENTRY
+_mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
+ if (index == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexAttribIuiv(index==0)");
+ }
+ else {
+ const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+ FLUSH_CURRENT(ctx, 0);
+ /* XXX we don't have true integer-valued vertex attribs yet */
+ params[0] = (GLuint) v[0];
+ params[1] = (GLuint) v[1];
+ params[2] = (GLuint) v[2];
+ params[3] = (GLuint) v[3];
+ }
+ }
+ else {
+ params[0] = get_vertex_array_attrib(ctx, index, pname,
+ "glGetVertexAttribIuiv");
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribPointerARB(index)");
+ return;
+ }
+
+ if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribPointerARB(pname)");
+ return;
+ }
+
+ ASSERT(index < Elements(ctx->Array.ArrayObj->VertexAttrib));
+
+ *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[index].Ptr;
+}
+
+
void GLAPIENTRY
_mesa_VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
GLsizei count, const GLvoid *ptr)
@@ -995,8 +1256,8 @@ _mesa_UnlockArraysEXT( void )
/* GL_EXT_multi_draw_arrays */
/* Somebody forgot to spec the first and count parameters as const! <sigh> */
void GLAPIENTRY
-_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
- GLsizei *count, GLsizei primcount )
+_mesa_MultiDrawArraysEXT( GLenum mode, const GLint *first,
+ const GLsizei *count, GLsizei primcount )
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
@@ -1054,6 +1315,27 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
/**
+ * GL 3.1 glPrimitiveRestartIndex().
+ */
+void GLAPIENTRY
+_mesa_PrimitiveRestartIndex(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
+ return;
+ }
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+
+ ctx->Array.RestartIndex = index;
+}
+
+
+/**
* Copy one client vertex array to another.
*/
void
@@ -1086,10 +1368,10 @@ print_array(const char *name, GLint index, const struct gl_client_array *array)
printf(" %s[%d]: ", name, index);
else
printf(" %s: ", name);
- printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %u), MaxElem=%u\n",
+ printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu), MaxElem=%u\n",
array->Ptr, array->Type, array->Size,
array->_ElementSize, array->StrideB,
- array->BufferObj->Name, array->BufferObj->Size,
+ array->BufferObj->Name, (unsigned long) array->BufferObj->Size,
array->_MaxElement);
}
diff --git a/mesalib/src/mesa/main/varray.h b/mesalib/src/mesa/main/varray.h
index ef790c504..c7c3e3ec7 100644
--- a/mesalib/src/mesa/main/varray.h
+++ b/mesalib/src/mesa/main/varray.h
@@ -116,14 +116,51 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
GLboolean normalized, GLsizei stride,
const GLvoid *pointer);
+void GLAPIENTRY
+_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type,
+ GLboolean normalized,
+ GLsizei stride, const GLvoid *ptr);
+
+
+extern void GLAPIENTRY
+_mesa_EnableVertexAttribArrayARB(GLuint index);
+
+
+extern void GLAPIENTRY
+_mesa_DisableVertexAttribArrayARB(GLuint index);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+
+
+extern void GLAPIENTRY
+_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer);
+
extern void GLAPIENTRY
_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer);
extern void GLAPIENTRY
-_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
- GLsizei *count, GLsizei primcount );
+_mesa_MultiDrawArraysEXT( GLenum mode, const GLint *first,
+ const GLsizei *count, GLsizei primcount );
extern void GLAPIENTRY
_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
@@ -174,6 +211,9 @@ _mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
const GLvoid *indices,
GLint basevertex);
+extern void GLAPIENTRY
+_mesa_PrimitiveRestartIndex(GLuint index);
+
extern void
_mesa_copy_client_array(GLcontext *ctx,
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c
index a39b68065..5997ca00f 100644
--- a/mesalib/src/mesa/main/version.c
+++ b/mesalib/src/mesa/main/version.c
@@ -32,8 +32,11 @@
* Return major and minor version numbers.
*/
static void
-compute_version(const GLcontext *ctx, GLuint *major, GLuint *minor)
+compute_version(GLcontext *ctx)
{
+ GLuint major, minor;
+ static const int max = 100;
+
const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample &&
ctx->Extensions.ARB_multitexture &&
ctx->Extensions.ARB_texture_border_clamp &&
@@ -81,50 +84,201 @@ compute_version(const GLcontext *ctx, GLuint *major, GLuint *minor)
(ctx->Extensions.EXT_stencil_two_side
|| ctx->Extensions.ATI_separate_stencil));
const GLboolean ver_2_1 = (ver_2_0 &&
- ctx->Extensions.ARB_shading_language_120 &&
+ ctx->Const.GLSLVersion >= 120 &&
ctx->Extensions.EXT_pixel_buffer_object &&
ctx->Extensions.EXT_texture_sRGB);
- if (ver_2_1) {
- *major = 2;
- *minor = 1;
+ const GLboolean ver_3_0 = (ver_2_1 &&
+ ctx->Extensions.ARB_half_float_pixel &&
+ ctx->Extensions.ARB_map_buffer_range &&
+ ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.APPLE_vertex_array_object &&
+ ctx->Extensions.EXT_draw_buffers2 &&
+ ctx->Extensions.EXT_framebuffer_blit &&
+ ctx->Extensions.EXT_framebuffer_multisample &&
+ ctx->Extensions.EXT_framebuffer_object &&
+ ctx->Extensions.EXT_framebuffer_sRGB &&
+ ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.EXT_packed_float &&
+ ctx->Extensions.EXT_texture_array &&
+ ctx->Extensions.EXT_texture_compression_rgtc &&
+ ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.EXT_texture_shared_exponent &&
+ ctx->Extensions.EXT_transform_feedback &&
+ ctx->Extensions.NV_conditional_render);
+ const GLboolean ver_3_1 = (ver_3_0 &&
+ ctx->Extensions.ARB_copy_buffer &&
+ ctx->Extensions.ARB_draw_instanced &&
+ ctx->Extensions.ARB_texture_buffer_object &&
+ ctx->Extensions.ARB_uniform_buffer_object &&
+ ctx->Extensions.NV_primitive_restart &&
+ ctx->Extensions.NV_texture_rectangle &&
+ ctx->Const.MaxVertexTextureImageUnits >= 16);
+ const GLboolean ver_3_2 = (ver_3_1 &&
+ ctx->Extensions.ARB_depth_clamp &&
+ ctx->Extensions.ARB_draw_elements_base_vertex &&
+ ctx->Extensions.ARB_fragment_coord_conventions &&
+ ctx->Extensions.ARB_geometry_shader4 &&
+ ctx->Extensions.EXT_provoking_vertex &&
+ ctx->Extensions.ARB_seamless_cube_map &&
+ ctx->Extensions.ARB_sync &&
+ ctx->Extensions.ARB_texture_multisample &&
+ ctx->Extensions.EXT_vertex_array_bgra);
+ const GLboolean ver_3_3 = (ver_3_2 &&
+ ctx->Extensions.ARB_blend_func_extended &&
+ ctx->Extensions.ARB_explicit_attrib_location &&
+ ctx->Extensions.ARB_instanced_arrays &&
+ ctx->Extensions.ARB_occlusion_query2 &&
+ ctx->Extensions.ARB_sampler_objects &&
+ ctx->Extensions.ARB_texture_rgb10_a2ui &&
+ ctx->Extensions.ARB_timer_query &&
+ ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+ ctx->Extensions.EXT_texture_swizzle);
+
+ if (ver_3_3) {
+ major = 3;
+ minor = 3;
+ }
+ else if (ver_3_2) {
+ major = 3;
+ minor = 2;
+ }
+ else if (ver_3_1) {
+ major = 3;
+ minor = 1;
+ }
+ else if (ver_3_0) {
+ major = 3;
+ minor = 0;
+ }
+ else if (ver_2_1) {
+ major = 2;
+ minor = 1;
}
else if (ver_2_0) {
- *major = 2;
- *minor = 0;
+ major = 2;
+ minor = 0;
}
else if (ver_1_5) {
- *major = 1;
- *minor = 5;
+ major = 1;
+ minor = 5;
}
else if (ver_1_4) {
- *major = 1;
- *minor = 4;
+ major = 1;
+ minor = 4;
}
else if (ver_1_3) {
- *major = 1;
- *minor = 3;
+ major = 1;
+ minor = 3;
}
else {
- *major = 1;
- *minor = 2;
+ major = 1;
+ minor = 2;
+ }
+
+ ctx->VersionMajor = major;
+ ctx->VersionMinor = minor;
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "%u.%u Mesa " MESA_VERSION_STRING,
+ ctx->VersionMajor, ctx->VersionMinor);
}
}
+static void
+compute_version_es1(GLcontext *ctx)
+{
+ static const int max = 100;
+
+ /* OpenGL ES 1.0 is derived from OpenGL 1.3 */
+ const GLboolean ver_1_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.EXT_texture_env_add &&
+ ctx->Extensions.ARB_texture_env_combine &&
+ ctx->Extensions.ARB_texture_env_dot3);
+ /* OpenGL ES 1.1 is derived from OpenGL 1.5 */
+ const GLboolean ver_1_1 = (ver_1_0 &&
+ ctx->Extensions.EXT_point_parameters &&
+ ctx->Extensions.SGIS_generate_mipmap &&
+ ctx->Extensions.ARB_vertex_buffer_object);
+
+ if (ver_1_1) {
+ ctx->VersionMajor = 1;
+ ctx->VersionMinor = 1;
+ } else if (ver_1_0) {
+ ctx->VersionMajor = 1;
+ ctx->VersionMinor = 0;
+ } else {
+ _mesa_problem(ctx, "Incomplete OpenGL ES 1.0 support.");
+ }
+
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "OpenGL ES-CM 1.%d Mesa " MESA_VERSION_STRING,
+ ctx->VersionMinor);
+ }
+}
+
+static void
+compute_version_es2(GLcontext *ctx)
+{
+ static const int max = 100;
+
+ /* OpenGL ES 2.0 is derived from OpenGL 2.0 */
+ const GLboolean ver_2_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.ARB_texture_cube_map &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.ARB_vertex_buffer_object &&
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two &&
+ ctx->Extensions.EXT_blend_equation_separate);
+ if (ver_2_0) {
+ ctx->VersionMajor = 2;
+ ctx->VersionMinor = 0;
+ } else {
+ _mesa_problem(ctx, "Incomplete OpenGL ES 2.0 support.");
+ }
+
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "OpenGL ES 2.0 Mesa " MESA_VERSION_STRING);
+ }
+}
/**
* Set the context's VersionMajor, VersionMinor, VersionString fields.
- * This should only be called once as part of context initialization.
+ * This should only be called once as part of context initialization
+ * or to perform version check for GLX_ARB_create_context_profile.
*/
void
_mesa_compute_version(GLcontext *ctx)
{
- static const int max = 100;
+ if (ctx->VersionMajor)
+ return;
- compute_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor);
-
- ctx->VersionString = (char *) malloc(max);
- if (ctx->VersionString) {
- _mesa_snprintf(ctx->VersionString, max, "%u.%u Mesa " MESA_VERSION_STRING,
- ctx->VersionMajor, ctx->VersionMinor);
+ switch (ctx->API) {
+ case API_OPENGL:
+ compute_version(ctx);
+ break;
+ case API_OPENGLES:
+ compute_version_es1(ctx);
+ break;
+ case API_OPENGLES2:
+ compute_version_es2(ctx);
+ break;
}
+
}
diff --git a/mesalib/src/mesa/main/version.h b/mesalib/src/mesa/main/version.h
index 9955be24a..1289ca985 100644
--- a/mesalib/src/mesa/main/version.h
+++ b/mesalib/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.8
+ * Version: 7.9
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -33,9 +33,9 @@
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 8
-#define MESA_PATCH 2
-#define MESA_VERSION_STRING "7.8.2"
+#define MESA_MINOR 9
+#define MESA_PATCH 0
+#define MESA_VERSION_STRING "7.9"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/mesalib/src/mesa/main/viewport.h b/mesalib/src/mesa/main/viewport.h
index f08fef279..ec054a7c5 100644
--- a/mesalib/src/mesa/main/viewport.h
+++ b/mesalib/src/mesa/main/viewport.h
@@ -27,6 +27,8 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
+#include "glheader.h"
+#include "mtypes.h"
extern void GLAPIENTRY
_mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c
index 0dd3e5e52..ca352e88e 100644
--- a/mesalib/src/mesa/main/vtxfmt.c
+++ b/mesalib/src/mesa/main/vtxfmt.c
@@ -140,6 +140,8 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex);
SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex);
SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex);
+ SET_DrawArraysInstanced(tab, vfmt->DrawArraysInstanced);
+ SET_DrawElementsInstanced(tab, vfmt->DrawElementsInstanced);
/* GL_NV_vertex_program */
SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV);
diff --git a/mesalib/src/mesa/main/vtxfmt.h b/mesalib/src/mesa/main/vtxfmt.h
index fb6c23abe..aad38b87c 100644
--- a/mesalib/src/mesa/main/vtxfmt.h
+++ b/mesalib/src/mesa/main/vtxfmt.h
@@ -33,6 +33,9 @@
#ifndef _VTXFMT_H_
#define _VTXFMT_H_
+#include "compiler.h"
+#include "mtypes.h"
+
#if FEATURE_beginend
extern void _mesa_init_exec_vtxfmt( GLcontext *ctx );
diff --git a/mesalib/src/mesa/main/vtxfmt_tmp.h b/mesalib/src/mesa/main/vtxfmt_tmp.h
index 037c4b188..9ec6ea49a 100644
--- a/mesalib/src/mesa/main/vtxfmt_tmp.h
+++ b/mesalib/src/mesa/main/vtxfmt_tmp.h
@@ -391,6 +391,25 @@ static void GLAPIENTRY TAG(MultiDrawElementsBaseVertex)( GLenum mode,
primcount, basevertex ));
}
+static void GLAPIENTRY
+TAG(DrawArraysInstanced)(GLenum mode, GLint first,
+ GLsizei count, GLsizei primcount)
+{
+ PRE_LOOPBACK( DrawArraysInstanced );
+ CALL_DrawArraysInstanced(GET_DISPATCH(), (mode, first, count, primcount));
+}
+
+static void GLAPIENTRY
+TAG(DrawElementsInstanced)(GLenum mode, GLsizei count,
+ GLenum type, const GLvoid *indices,
+ GLsizei primcount)
+{
+ PRE_LOOPBACK( DrawElementsInstanced );
+ CALL_DrawElementsInstanced(GET_DISPATCH(),
+ (mode, count, type, indices, primcount));
+}
+
+
static void GLAPIENTRY TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 )
{
PRE_LOOPBACK( EvalMesh1 );
@@ -574,6 +593,8 @@ static GLvertexformat TAG(vtxfmt) = {
TAG(DrawElementsBaseVertex),
TAG(DrawRangeElementsBaseVertex),
TAG(MultiDrawElementsBaseVertex),
+ TAG(DrawArraysInstanced),
+ TAG(DrawElementsInstanced),
TAG(EvalMesh1),
TAG(EvalMesh2)
};