Mammoth update to the Python code generator scripts that live in
src/mesa/glapi. Basically, the scripts that did simple things (like gl_offsets.py) were simple, and the scripts that did more complicated things (like glX_proto_send.py) were getting progressively more and more out of control. So, I re-write the foundation classes on which everything is based. One problem with the existing code is that the division between the GL API database representation and the way the output code is generated was either blury or nonexistant. The new code somewhat follows the Model-View-Controller pattern, minus the Controller. There is a distinct set of classes that model the API data, and there is a distinct set of classes that generate code from that data. One big change is in the class that represents GL functions (was glFunction, is now gl_function). There used to be an instance of this calls for each function and for each alias to that function. For example, there was an instance for PointParameterivSGIS, PointParameterivEXT, PointParameterivARB, and PointParameteriv. In the new code, there is one instance. Each instance has a list of entrypoint names for the function. In the next revision, this will allow a couple useful things. The script will be able to verify that the parameters, return type, and GLX protocol for a function and all it's aliases match. It will also allow aliases to be represented in the XML more compactly. Instead of repeating all the information, an alias can be listed as: <function name="PointParameterivARB" alias="PointParameterivEXT"/> Because the data representation was changed, the order that the alias functions are processed by the scripts also changed. This accounts for at least 2,700 of the ~3,600 lines of diffs in the generated code. Most of the remaining ~900 lines of diffs are the result of bugs *fixed* by the new scripts. The old scripts also generated code with some bugs in it. These bugs were discovered while the new code was being written. These changes were discussed on the mesa3d-dev mailing list back at the end of May: http://marc.theaimsgroup.com/?t=111714569000004&r=1&w=2 Xorg bug: 3197, 3208
This commit is contained in:
parent
f292e13a20
commit
66a5548fbb
|
@ -1,13 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# $Id: getprocaddress.py,v 1.6 2004/11/27 19:57:46 brianp Exp $
|
||||
# $Id: getprocaddress.py,v 1.7 2005/06/21 23:42:43 idr Exp $
|
||||
|
||||
# Helper for the getprocaddress.c test.
|
||||
|
||||
from xml.sax import saxutils
|
||||
from xml.sax import make_parser
|
||||
from xml.sax.handler import feature_namespaces
|
||||
|
||||
import sys, getopt, re
|
||||
sys.path.append("../../src/mesa/glapi/" )
|
||||
import gl_XML
|
||||
|
@ -30,16 +26,19 @@ def FindTestFunctions():
|
|||
return functions
|
||||
|
||||
|
||||
class PrintExports(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_exports.py (from Mesa)"
|
||||
|
||||
class PrintExports(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "getprocaddress.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
|
||||
self.tests = FindTestFunctions()
|
||||
self.prevCategory = ""
|
||||
return
|
||||
|
||||
|
||||
def printRealHeader(self):
|
||||
print """
|
||||
|
@ -50,22 +49,28 @@ struct name_test_pair {
|
|||
|
||||
static struct name_test_pair functions[] = {"""
|
||||
|
||||
def printRealFooter(self):
|
||||
print"""
|
||||
{ NULL, NULL }
|
||||
};
|
||||
"""
|
||||
def printBody(self, api):
|
||||
prev_category = None
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
if f.category != self.prevCategory:
|
||||
print ' { "-%s", NULL},' % f.category
|
||||
self.prevCategory = f.category
|
||||
for f in api.functionIterateByOffset():
|
||||
[category, num] = api.get_category_for_name( f.name )
|
||||
if category != prev_category:
|
||||
print ' { "-%s", NULL},' % category
|
||||
prev_category = category
|
||||
|
||||
if f.name in self.tests:
|
||||
test = "test_%s" % f.name
|
||||
else:
|
||||
test = "NULL"
|
||||
print ' { "gl%s", %s },' % (f.name, test)
|
||||
for name in f.entry_points:
|
||||
if name in self.tests:
|
||||
test = "test_%s" % name
|
||||
break
|
||||
|
||||
print ' { "gl%s", %s },' % (f.name, test)
|
||||
|
||||
print ''
|
||||
print ' { NULL, NULL }'
|
||||
print '};'
|
||||
print ''
|
||||
return
|
||||
|
||||
|
||||
|
@ -81,15 +86,8 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintExports()
|
||||
printer = PrintExports()
|
||||
|
||||
parser = make_parser()
|
||||
parser.setFeature(feature_namespaces, 0)
|
||||
parser.setContentHandler(dh)
|
||||
api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() )
|
||||
|
||||
f = open(file_name)
|
||||
|
||||
parser.parse(f)
|
||||
dh.printHeader()
|
||||
dh.printFunctions()
|
||||
dh.printFooter()
|
||||
printer.Print( api )
|
||||
|
|
|
@ -4401,7 +4401,7 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint
|
|||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLsop_DeleteTextures 144
|
||||
#define X_GLvop_DeleteTextures 12
|
||||
void
|
||||
__indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
|
||||
{
|
||||
|
@ -4409,16 +4409,10 @@ __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
|
|||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
|
||||
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
|
||||
#ifdef USE_XCB
|
||||
XCBConnection *c = XCBConnectionOfDisplay(dpy);
|
||||
(void) __glXFlushRenderBuffer(gc, gc->pc);
|
||||
XCBGlxDeleteTextures(c, gc->currentContextTag, n, textures);
|
||||
#else
|
||||
GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTextures, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4));
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
#endif /* USE_XCB */
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -4482,7 +4476,7 @@ __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclam
|
|||
emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4));
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(priorities), (n * 4));
|
||||
(void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6443,13 +6437,13 @@ void
|
|||
__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 16 + __GLX_PAD(len);
|
||||
if (__builtin_expect(len >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(program), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(program), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6462,12 +6456,12 @@ __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdou
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6479,9 +6473,9 @@ __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble *
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(params), 32);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6522,13 +6516,13 @@ void
|
|||
__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 8));
|
||||
const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
|
||||
if (__builtin_expect(num >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 8));
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6539,13 +6533,13 @@ void
|
|||
__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 4));
|
||||
const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
|
||||
if (__builtin_expect(num >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 4));
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -6993,12 +6987,12 @@ void
|
|||
__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 8));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 8));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7009,12 +7003,12 @@ void
|
|||
__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 4));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 4));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7025,12 +7019,12 @@ void
|
|||
__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 2));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 2));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7041,12 +7035,12 @@ void
|
|||
__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 8));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 8));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7057,12 +7051,12 @@ void
|
|||
__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 4));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 4));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7073,12 +7067,12 @@ void
|
|||
__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 2));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 2));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7089,12 +7083,12 @@ void
|
|||
__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 8));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 8));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7105,12 +7099,12 @@ void
|
|||
__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 4));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 4));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7121,12 +7115,12 @@ void
|
|||
__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 2));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 2));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7137,12 +7131,12 @@ void
|
|||
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 1));
|
||||
const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 1));
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7322,7 +7316,7 @@ void
|
|||
__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 16 + __GLX_PAD(len);
|
||||
if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) {
|
||||
if (cmdlen <= gc->maxSmallRenderCommandSize) {
|
||||
if ( (gc->pc + cmdlen) > gc->bufEnd ) {
|
||||
|
@ -7332,7 +7326,7 @@ __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const G
|
|||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(string), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(string), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7345,7 +7339,7 @@ __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const G
|
|||
(void) memcpy((void *)(pc + 8), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(pc + 12), (void *)(&format), 4);
|
||||
(void) memcpy((void *)(pc + 16), (void *)(&len), 4);
|
||||
__glXSendLargeCommand(gc, pc, 20, string, (len * 1));
|
||||
__glXSendLargeCommand(gc, pc, 20, string, len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7357,12 +7351,12 @@ __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, G
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7374,9 +7368,9 @@ __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdoub
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(params), 32);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7419,12 +7413,12 @@ __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x,
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7436,9 +7430,9 @@ __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdo
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44;
|
||||
emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(params), 32);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7513,7 +7507,7 @@ void
|
|||
__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 28 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 28 + __GLX_PAD(len);
|
||||
if (__builtin_expect(len >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
|
||||
|
@ -7522,7 +7516,7 @@ __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * n
|
|||
(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4);
|
||||
(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7533,7 +7527,7 @@ void
|
|||
__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 44 + __GLX_PAD(len);
|
||||
if (__builtin_expect(len >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
|
@ -7542,7 +7536,7 @@ __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * n
|
|||
(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(gc->pc + 44), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7553,13 +7547,13 @@ void
|
|||
__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 28 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 28 + __GLX_PAD(len);
|
||||
if (__builtin_expect(len >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(v), 16);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(name), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7570,13 +7564,13 @@ void
|
|||
__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 44 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 44 + __GLX_PAD(len);
|
||||
if (__builtin_expect(len >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(gc->pc + 44), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(gc->pc + 44), (void *)(name), len);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7588,12 +7582,12 @@ __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte
|
|||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 8 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 8 + __GLX_PAD(len);
|
||||
if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(pc + 4), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(pc + 8), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(pc + 8), (void *)(name), len);
|
||||
(void) __glXReadReply(dpy, 4, params, GL_TRUE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
|
@ -7606,12 +7600,12 @@ __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte
|
|||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 8 + __GLX_PAD((len * 1));
|
||||
const GLuint cmdlen = 8 + __GLX_PAD(len);
|
||||
if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&id), 4);
|
||||
(void) memcpy((void *)(pc + 4), (void *)(&len), 4);
|
||||
(void) memcpy((void *)(pc + 8), (void *)(name), (len * 1));
|
||||
(void) memcpy((void *)(pc + 8), (void *)(name), len);
|
||||
(void) __glXReadReply(dpy, 8, params, GL_TRUE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
|
@ -7630,6 +7624,9 @@ __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
|
|||
XCBConnection *c = XCBConnectionOfDisplay(dpy);
|
||||
(void) __glXFlushRenderBuffer(gc, gc->pc);
|
||||
XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL);
|
||||
if (XCBGlxGenQueriesARBDataLength(reply) == 0)
|
||||
(void)memcpy(ids, &reply->datum, sizeof(reply->datum));
|
||||
else
|
||||
(void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint));
|
||||
free(reply);
|
||||
#else
|
||||
|
@ -7856,8 +7853,8 @@ __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7869,8 +7866,8 @@ __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 16;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7934,9 +7931,9 @@ __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 24;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -7948,8 +7945,8 @@ __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 24;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(v), 16);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -8015,10 +8012,10 @@ __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 32;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -8030,8 +8027,8 @@ __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 32;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(v), 24);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(v), 24);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -8099,11 +8096,11 @@ __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z,
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 40;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8);
|
||||
(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8);
|
||||
(void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -8115,8 +8112,8 @@ __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
|
|||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 40;
|
||||
emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32);
|
||||
(void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(v), 32);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
@ -8208,3 +8205,271 @@ __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
|
|||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLvop_IsRenderbufferEXT 1422
|
||||
GLboolean
|
||||
__indirect_glIsRenderbufferEXT(GLuint renderbuffer)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
GLboolean retval = (GLboolean) 0;
|
||||
const GLuint cmdlen = 4;
|
||||
if (__builtin_expect(dpy != NULL, 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4);
|
||||
retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define X_GLrop_BindRenderbufferEXT 4316
|
||||
void
|
||||
__indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12;
|
||||
emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLrop_DeleteRenderbuffersEXT 4317
|
||||
void
|
||||
__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
}
|
||||
|
||||
#define X_GLvop_GenRenderbuffersEXT 1423
|
||||
void
|
||||
__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 4;
|
||||
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
||||
(void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#define X_GLrop_RenderbufferStorageEXT 4318
|
||||
void
|
||||
__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 20;
|
||||
emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLvop_GetRenderbufferParameterivEXT 1424
|
||||
void
|
||||
__indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 8;
|
||||
if (__builtin_expect(dpy != NULL, 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
|
||||
(void) __glXReadReply(dpy, 4, params, GL_FALSE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#define X_GLvop_IsFramebufferEXT 1425
|
||||
GLboolean
|
||||
__indirect_glIsFramebufferEXT(GLuint framebuffer)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
GLboolean retval = (GLboolean) 0;
|
||||
const GLuint cmdlen = 4;
|
||||
if (__builtin_expect(dpy != NULL, 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4);
|
||||
retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define X_GLrop_BindFramebufferEXT 4319
|
||||
void
|
||||
__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 12;
|
||||
emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLrop_DeleteFramebuffersEXT 4320
|
||||
void
|
||||
__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
|
||||
if (__builtin_expect(n >= 0, 1)) {
|
||||
emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4));
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
}
|
||||
|
||||
#define X_GLvop_GenFramebuffersEXT 1426
|
||||
void
|
||||
__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 4;
|
||||
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
||||
(void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#define X_GLvop_CheckFramebufferStatusEXT 1427
|
||||
GLenum
|
||||
__indirect_glCheckFramebufferStatusEXT(GLenum target)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
GLenum retval = (GLenum) 0;
|
||||
const GLuint cmdlen = 4;
|
||||
if (__builtin_expect(dpy != NULL, 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
|
||||
retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define X_GLrop_FramebufferTexture1DEXT 4321
|
||||
void
|
||||
__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 24;
|
||||
emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLrop_FramebufferTexture2DEXT 4322
|
||||
void
|
||||
__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 24;
|
||||
emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLrop_FramebufferTexture3DEXT 4323
|
||||
void
|
||||
__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 28;
|
||||
emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4);
|
||||
(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4);
|
||||
(void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLrop_FramebufferRenderbufferEXT 4324
|
||||
void
|
||||
__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 20;
|
||||
emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4);
|
||||
(void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4);
|
||||
(void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
|
||||
void
|
||||
__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
Display * const dpy = gc->currentDpy;
|
||||
const GLuint cmdlen = 12;
|
||||
if (__builtin_expect(dpy != NULL, 1)) {
|
||||
GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen);
|
||||
(void) memcpy((void *)(pc + 0), (void *)(&target), 4);
|
||||
(void) memcpy((void *)(pc + 4), (void *)(&attachment), 4);
|
||||
(void) memcpy((void *)(pc + 8), (void *)(&pname), 4);
|
||||
(void) __glXReadReply(dpy, 4, params, GL_FALSE);
|
||||
UnlockDisplay(dpy); SyncHandle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#define X_GLrop_GenerateMipmapEXT 4325
|
||||
void
|
||||
__indirect_glGenerateMipmapEXT(GLenum target)
|
||||
{
|
||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||
const GLuint cmdlen = 8;
|
||||
emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
|
||||
(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
|
||||
gc->pc += cmdlen;
|
||||
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
|
||||
}
|
||||
|
||||
|
||||
# undef FASTCALL
|
||||
# undef NOINLINE
|
||||
|
|
|
@ -682,6 +682,23 @@ extern HIDDEN void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshor
|
|||
extern HIDDEN void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v);
|
||||
extern HIDDEN void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
extern HIDDEN void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v);
|
||||
extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
|
||||
extern HIDDEN void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
|
||||
extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
|
||||
extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer);
|
||||
extern HIDDEN void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
||||
extern HIDDEN void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
|
||||
extern HIDDEN void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers);
|
||||
extern HIDDEN GLenum __indirect_glCheckFramebufferStatusEXT(GLenum target);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
extern HIDDEN void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
|
||||
extern HIDDEN void __indirect_glGenerateMipmapEXT(GLenum target);
|
||||
|
||||
# undef HIDDEN
|
||||
# undef FASTCALL
|
||||
|
|
|
@ -72,7 +72,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
|
||||
/* now, initialize the entries we understand */
|
||||
|
||||
/* GL_VERSION_1_0 */
|
||||
/* 1.0 */
|
||||
|
||||
glAPI->NewList = __indirect_glNewList;
|
||||
glAPI->EndList = __indirect_glEndList;
|
||||
|
@ -381,7 +381,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->Translatef = __indirect_glTranslatef;
|
||||
glAPI->Viewport = __indirect_glViewport;
|
||||
|
||||
/* GL_VERSION_1_1 */
|
||||
/* 1.1 */
|
||||
|
||||
glAPI->ArrayElement = __indirect_glArrayElement;
|
||||
glAPI->BindTexture = __indirect_glBindTexture;
|
||||
|
@ -414,7 +414,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->PopClientAttrib = __indirect_glPopClientAttrib;
|
||||
glAPI->PushClientAttrib = __indirect_glPushClientAttrib;
|
||||
|
||||
/* GL_VERSION_1_2 */
|
||||
/* 1.2 */
|
||||
|
||||
glAPI->BlendColor = __indirect_glBlendColor;
|
||||
glAPI->BlendEquation = __indirect_glBlendEquation;
|
||||
|
@ -455,18 +455,8 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->TexSubImage3D = __indirect_glTexSubImage3D;
|
||||
glAPI->CopyTexSubImage3D = __indirect_glCopyTexSubImage3D;
|
||||
|
||||
/* GL_ARB_multitexture */
|
||||
/* 1. GL_ARB_multitexture */
|
||||
|
||||
glAPI->ActiveTextureARB = __indirect_glActiveTextureARB;
|
||||
glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB;
|
||||
glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB;
|
||||
glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB;
|
||||
glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB;
|
||||
glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB;
|
||||
glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB;
|
||||
glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB;
|
||||
glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB;
|
||||
glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB;
|
||||
glAPI->MultiTexCoord2dARB = __indirect_glMultiTexCoord2dARB;
|
||||
glAPI->MultiTexCoord2dvARB = __indirect_glMultiTexCoord2dvARB;
|
||||
glAPI->MultiTexCoord2fARB = __indirect_glMultiTexCoord2fARB;
|
||||
|
@ -491,79 +481,29 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->MultiTexCoord4ivARB = __indirect_glMultiTexCoord4ivARB;
|
||||
glAPI->MultiTexCoord4sARB = __indirect_glMultiTexCoord4sARB;
|
||||
glAPI->MultiTexCoord4svARB = __indirect_glMultiTexCoord4svARB;
|
||||
glAPI->ActiveTextureARB = __indirect_glActiveTextureARB;
|
||||
glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB;
|
||||
glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB;
|
||||
glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB;
|
||||
glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB;
|
||||
glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB;
|
||||
glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB;
|
||||
glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB;
|
||||
glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB;
|
||||
glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
/* 3. GL_ARB_transpose_matrix */
|
||||
|
||||
glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB;
|
||||
glAPI->LoadTransposeMatrixdARB = __indirect_glLoadTransposeMatrixdARB;
|
||||
glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB;
|
||||
glAPI->MultTransposeMatrixdARB = __indirect_glMultTransposeMatrixdARB;
|
||||
|
||||
/* GL_ARB_multisample */
|
||||
/* 5. GL_ARB_multisample */
|
||||
|
||||
glAPI->SampleCoverageARB = __indirect_glSampleCoverageARB;
|
||||
|
||||
/* GL_ARB_draw_buffers */
|
||||
|
||||
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
|
||||
|
||||
/* GL_EXT_texture_object */
|
||||
|
||||
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
|
||||
glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
|
||||
glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
|
||||
|
||||
/* GL_SGIS_multisample */
|
||||
|
||||
glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS;
|
||||
glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS;
|
||||
|
||||
/* GL_EXT_vertex_array */
|
||||
|
||||
glAPI->ColorPointerEXT = __indirect_glColorPointerEXT;
|
||||
glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT;
|
||||
glAPI->IndexPointerEXT = __indirect_glIndexPointerEXT;
|
||||
glAPI->NormalPointerEXT = __indirect_glNormalPointerEXT;
|
||||
glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT;
|
||||
glAPI->VertexPointerEXT = __indirect_glVertexPointerEXT;
|
||||
|
||||
/* GL_EXT_point_parameters */
|
||||
|
||||
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
|
||||
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
|
||||
|
||||
/* GL_MESA_window_pos */
|
||||
|
||||
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
|
||||
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
|
||||
glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA;
|
||||
glAPI->WindowPos2fvMESA = __indirect_glWindowPos2fvMESA;
|
||||
glAPI->WindowPos2iMESA = __indirect_glWindowPos2iMESA;
|
||||
glAPI->WindowPos2ivMESA = __indirect_glWindowPos2ivMESA;
|
||||
glAPI->WindowPos2sMESA = __indirect_glWindowPos2sMESA;
|
||||
glAPI->WindowPos2svMESA = __indirect_glWindowPos2svMESA;
|
||||
glAPI->WindowPos3dMESA = __indirect_glWindowPos3dMESA;
|
||||
glAPI->WindowPos3dvMESA = __indirect_glWindowPos3dvMESA;
|
||||
glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA;
|
||||
glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA;
|
||||
glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA;
|
||||
glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
|
||||
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
|
||||
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
|
||||
|
||||
/* GL_EXT_blend_func_separate */
|
||||
|
||||
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
|
||||
|
||||
/* GL_EXT_fog_coord */
|
||||
|
||||
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
|
||||
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
|
||||
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
|
||||
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
|
||||
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
|
||||
|
||||
/* GL_ARB_texture_compression */
|
||||
/* 12. GL_ARB_texture_compression */
|
||||
|
||||
glAPI->CompressedTexImage3DARB = __indirect_glCompressedTexImage3DARB;
|
||||
glAPI->CompressedTexImage2DARB = __indirect_glCompressedTexImage2DARB;
|
||||
|
@ -573,120 +513,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->CompressedTexSubImage1DARB = __indirect_glCompressedTexSubImage1DARB;
|
||||
glAPI->GetCompressedTexImageARB = __indirect_glGetCompressedTexImageARB;
|
||||
|
||||
/* GL_EXT_secondary_color */
|
||||
|
||||
glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT;
|
||||
glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT;
|
||||
glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT;
|
||||
glAPI->SecondaryColor3dvEXT = __indirect_glSecondaryColor3dvEXT;
|
||||
glAPI->SecondaryColor3fEXT = __indirect_glSecondaryColor3fEXT;
|
||||
glAPI->SecondaryColor3fvEXT = __indirect_glSecondaryColor3fvEXT;
|
||||
glAPI->SecondaryColor3iEXT = __indirect_glSecondaryColor3iEXT;
|
||||
glAPI->SecondaryColor3ivEXT = __indirect_glSecondaryColor3ivEXT;
|
||||
glAPI->SecondaryColor3sEXT = __indirect_glSecondaryColor3sEXT;
|
||||
glAPI->SecondaryColor3svEXT = __indirect_glSecondaryColor3svEXT;
|
||||
glAPI->SecondaryColor3ubEXT = __indirect_glSecondaryColor3ubEXT;
|
||||
glAPI->SecondaryColor3ubvEXT = __indirect_glSecondaryColor3ubvEXT;
|
||||
glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT;
|
||||
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
|
||||
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
|
||||
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
|
||||
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV;
|
||||
glAPI->BindProgramNV = __indirect_glBindProgramNV;
|
||||
glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV;
|
||||
glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV;
|
||||
glAPI->GenProgramsNV = __indirect_glGenProgramsNV;
|
||||
glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV;
|
||||
glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV;
|
||||
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
|
||||
glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV;
|
||||
glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
|
||||
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
|
||||
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV;
|
||||
glAPI->IsProgramNV = __indirect_glIsProgramNV;
|
||||
glAPI->LoadProgramNV = __indirect_glLoadProgramNV;
|
||||
glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV;
|
||||
glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV;
|
||||
glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV;
|
||||
glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV;
|
||||
glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV;
|
||||
glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV;
|
||||
glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV;
|
||||
glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV;
|
||||
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
|
||||
glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB;
|
||||
glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB;
|
||||
glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB;
|
||||
glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB;
|
||||
glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB;
|
||||
glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB;
|
||||
glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB;
|
||||
glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB;
|
||||
glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB;
|
||||
glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB;
|
||||
glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB;
|
||||
glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB;
|
||||
glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB;
|
||||
glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB;
|
||||
glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB;
|
||||
glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB;
|
||||
glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB;
|
||||
glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB;
|
||||
glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB;
|
||||
glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB;
|
||||
glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB;
|
||||
glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB;
|
||||
glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB;
|
||||
glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB;
|
||||
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
|
||||
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV;
|
||||
glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV;
|
||||
glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV;
|
||||
glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV;
|
||||
glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV;
|
||||
glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV;
|
||||
glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV;
|
||||
glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV;
|
||||
glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV;
|
||||
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
|
||||
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
|
||||
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
|
||||
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
|
||||
|
||||
/* GL_NV_point_sprite */
|
||||
|
||||
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
|
||||
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
|
||||
|
||||
/* GL_EXT_multi_draw_arrays */
|
||||
|
||||
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
|
||||
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
|
||||
|
||||
/* GL_EXT_stencil_two_side */
|
||||
|
||||
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
/* 26. GL_ARB_vertex_program */
|
||||
|
||||
glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB;
|
||||
glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB;
|
||||
|
@ -716,8 +543,209 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB;
|
||||
glAPI->GetProgramivARB = __indirect_glGetProgramivARB;
|
||||
glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB;
|
||||
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
|
||||
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
|
||||
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
|
||||
glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB;
|
||||
glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB;
|
||||
glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB;
|
||||
glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB;
|
||||
glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB;
|
||||
glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB;
|
||||
glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB;
|
||||
glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB;
|
||||
glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB;
|
||||
glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB;
|
||||
glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB;
|
||||
glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB;
|
||||
glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB;
|
||||
glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB;
|
||||
glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB;
|
||||
glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB;
|
||||
glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB;
|
||||
glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB;
|
||||
glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB;
|
||||
glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB;
|
||||
glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB;
|
||||
glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB;
|
||||
glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB;
|
||||
glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB;
|
||||
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
|
||||
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
|
||||
|
||||
/* GL_NV_fragment_program */
|
||||
/* 29. GL_ARB_occlusion_query */
|
||||
|
||||
glAPI->EndQueryARB = __indirect_glEndQueryARB;
|
||||
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
|
||||
glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB;
|
||||
glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB;
|
||||
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
|
||||
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
|
||||
glAPI->IsQueryARB = __indirect_glIsQueryARB;
|
||||
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
|
||||
|
||||
/* 37. GL_ARB_draw_buffers */
|
||||
|
||||
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
|
||||
|
||||
/* 20. GL_EXT_texture_object */
|
||||
|
||||
glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
|
||||
glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
|
||||
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
|
||||
|
||||
/* 25. GL_SGIS_multisample */
|
||||
|
||||
glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS;
|
||||
glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS;
|
||||
|
||||
/* 30. GL_EXT_vertex_array */
|
||||
|
||||
glAPI->ColorPointerEXT = __indirect_glColorPointerEXT;
|
||||
glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT;
|
||||
glAPI->IndexPointerEXT = __indirect_glIndexPointerEXT;
|
||||
glAPI->NormalPointerEXT = __indirect_glNormalPointerEXT;
|
||||
glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT;
|
||||
glAPI->VertexPointerEXT = __indirect_glVertexPointerEXT;
|
||||
|
||||
/* 54. GL_EXT_point_parameters */
|
||||
|
||||
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
|
||||
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
|
||||
|
||||
/* 145. GL_EXT_secondary_color */
|
||||
|
||||
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
|
||||
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
|
||||
glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT;
|
||||
glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT;
|
||||
glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT;
|
||||
glAPI->SecondaryColor3dvEXT = __indirect_glSecondaryColor3dvEXT;
|
||||
glAPI->SecondaryColor3fEXT = __indirect_glSecondaryColor3fEXT;
|
||||
glAPI->SecondaryColor3fvEXT = __indirect_glSecondaryColor3fvEXT;
|
||||
glAPI->SecondaryColor3iEXT = __indirect_glSecondaryColor3iEXT;
|
||||
glAPI->SecondaryColor3ivEXT = __indirect_glSecondaryColor3ivEXT;
|
||||
glAPI->SecondaryColor3sEXT = __indirect_glSecondaryColor3sEXT;
|
||||
glAPI->SecondaryColor3svEXT = __indirect_glSecondaryColor3svEXT;
|
||||
glAPI->SecondaryColor3ubEXT = __indirect_glSecondaryColor3ubEXT;
|
||||
glAPI->SecondaryColor3ubvEXT = __indirect_glSecondaryColor3ubvEXT;
|
||||
glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT;
|
||||
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
|
||||
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
|
||||
|
||||
/* 148. GL_EXT_multi_draw_arrays */
|
||||
|
||||
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
|
||||
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
|
||||
|
||||
/* 149. GL_EXT_fog_coord */
|
||||
|
||||
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
|
||||
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
|
||||
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
|
||||
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
|
||||
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
|
||||
|
||||
/* 173. GL_EXT_blend_func_separate */
|
||||
|
||||
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
|
||||
|
||||
/* 197. GL_MESA_window_pos */
|
||||
|
||||
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
|
||||
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
|
||||
glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA;
|
||||
glAPI->WindowPos2fvMESA = __indirect_glWindowPos2fvMESA;
|
||||
glAPI->WindowPos2iMESA = __indirect_glWindowPos2iMESA;
|
||||
glAPI->WindowPos2ivMESA = __indirect_glWindowPos2ivMESA;
|
||||
glAPI->WindowPos2sMESA = __indirect_glWindowPos2sMESA;
|
||||
glAPI->WindowPos2svMESA = __indirect_glWindowPos2svMESA;
|
||||
glAPI->WindowPos3dMESA = __indirect_glWindowPos3dMESA;
|
||||
glAPI->WindowPos3dvMESA = __indirect_glWindowPos3dvMESA;
|
||||
glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA;
|
||||
glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA;
|
||||
glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA;
|
||||
glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
|
||||
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
|
||||
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
|
||||
|
||||
/* 233. GL_NV_vertex_program */
|
||||
|
||||
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
|
||||
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
|
||||
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
|
||||
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
|
||||
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
|
||||
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
|
||||
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
|
||||
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
|
||||
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
|
||||
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
|
||||
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
|
||||
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
|
||||
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
|
||||
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
|
||||
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
|
||||
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
|
||||
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
|
||||
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
|
||||
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
|
||||
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
|
||||
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
|
||||
glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV;
|
||||
glAPI->BindProgramNV = __indirect_glBindProgramNV;
|
||||
glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV;
|
||||
glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV;
|
||||
glAPI->GenProgramsNV = __indirect_glGenProgramsNV;
|
||||
glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV;
|
||||
glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV;
|
||||
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
|
||||
glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV;
|
||||
glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV;
|
||||
glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV;
|
||||
glAPI->IsProgramNV = __indirect_glIsProgramNV;
|
||||
glAPI->LoadProgramNV = __indirect_glLoadProgramNV;
|
||||
glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV;
|
||||
glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV;
|
||||
glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV;
|
||||
glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV;
|
||||
glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV;
|
||||
glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV;
|
||||
glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV;
|
||||
glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV;
|
||||
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
|
||||
glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV;
|
||||
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
|
||||
glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV;
|
||||
glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV;
|
||||
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
|
||||
glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV;
|
||||
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
|
||||
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
|
||||
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
|
||||
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
|
||||
glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV;
|
||||
glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV;
|
||||
glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV;
|
||||
glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV;
|
||||
glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV;
|
||||
glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV;
|
||||
glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV;
|
||||
glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV;
|
||||
glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV;
|
||||
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
|
||||
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
|
||||
|
||||
/* 262. GL_NV_point_sprite */
|
||||
|
||||
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
|
||||
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
|
||||
|
||||
/* 268. GL_EXT_stencil_two_side */
|
||||
|
||||
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
|
||||
|
||||
/* 282. GL_NV_fragment_program */
|
||||
|
||||
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
|
||||
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
|
||||
|
@ -726,48 +754,25 @@ __GLapi * __glXNewIndirectAPI( void )
|
|||
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
|
||||
glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV;
|
||||
|
||||
/* GL_ARB_occlusion_query */
|
||||
/* 310. GL_EXT_framebuffer_object */
|
||||
|
||||
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
|
||||
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
|
||||
glAPI->IsQueryARB = __indirect_glIsQueryARB;
|
||||
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
|
||||
glAPI->EndQueryARB = __indirect_glEndQueryARB;
|
||||
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
|
||||
glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB;
|
||||
glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
|
||||
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
|
||||
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
|
||||
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
|
||||
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
|
||||
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
|
||||
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
|
||||
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
|
||||
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
|
||||
glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV;
|
||||
glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV;
|
||||
glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV;
|
||||
glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV;
|
||||
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
|
||||
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
|
||||
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
|
||||
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
|
||||
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
|
||||
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
|
||||
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
|
||||
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
|
||||
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
|
||||
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
|
||||
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
|
||||
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
|
||||
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
|
||||
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
|
||||
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
|
||||
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
|
||||
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
|
||||
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
|
||||
glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
|
||||
glAPI->BindFramebufferEXT = __indirect_glBindFramebufferEXT;
|
||||
glAPI->DeleteFramebuffersEXT = __indirect_glDeleteFramebuffersEXT;
|
||||
glAPI->GenFramebuffersEXT = __indirect_glGenFramebuffersEXT;
|
||||
glAPI->CheckFramebufferStatusEXT = __indirect_glCheckFramebufferStatusEXT;
|
||||
glAPI->FramebufferTexture1DEXT = __indirect_glFramebufferTexture1DEXT;
|
||||
glAPI->FramebufferTexture2DEXT = __indirect_glFramebufferTexture2DEXT;
|
||||
glAPI->FramebufferTexture3DEXT = __indirect_glFramebufferTexture3DEXT;
|
||||
glAPI->FramebufferRenderbufferEXT = __indirect_glFramebufferRenderbufferEXT;
|
||||
glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT;
|
||||
glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT;
|
||||
glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
|
||||
glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT;
|
||||
glAPI->DeleteRenderbuffersEXT = __indirect_glDeleteRenderbuffersEXT;
|
||||
glAPI->GenRenderbuffersEXT = __indirect_glGenRenderbuffersEXT;
|
||||
|
||||
return glAPI;
|
||||
}
|
||||
|
|
|
@ -334,22 +334,18 @@ __glPointParameterfvEXT_size( GLenum e )
|
|||
switch( e ) {
|
||||
case GL_POINT_SIZE_MIN:
|
||||
/* case GL_POINT_SIZE_MIN_ARB:*/
|
||||
/* case GL_POINT_SIZE_MIN_EXT:*/
|
||||
/* case GL_POINT_SIZE_MIN_SGIS:*/
|
||||
case GL_POINT_SIZE_MAX:
|
||||
/* case GL_POINT_SIZE_MAX_ARB:*/
|
||||
/* case GL_POINT_SIZE_MAX_EXT:*/
|
||||
/* case GL_POINT_SIZE_MAX_SGIS:*/
|
||||
case GL_POINT_FADE_THRESHOLD_SIZE:
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_EXT:*/
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
|
||||
case GL_POINT_SPRITE_R_MODE_NV:
|
||||
case GL_POINT_SPRITE_COORD_ORIGIN:
|
||||
return 1;
|
||||
case GL_POINT_DISTANCE_ATTENUATION:
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_EXT:*/
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
|
||||
return 3;
|
||||
default: return 0;
|
||||
|
@ -369,3 +365,8 @@ ALIAS( Map2f, Map2d )
|
|||
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
|
||||
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
|
||||
ALIAS( PointParameterivNV, PointParameterfvEXT )
|
||||
|
||||
# undef HAVE_ALIAS
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
# undef INTERNAL
|
||||
|
|
|
@ -13,26 +13,14 @@ OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h \
|
|||
../../glx/x11/indirect_size.h \
|
||||
../../glx/x11/indirect_size.c
|
||||
|
||||
COMMON = gl_XML.pyo license.pyo gl_API.xml
|
||||
COMMON_GLX = $(COMMON) glX_XML.pyo
|
||||
COMMON = gl_XML.py license.py gl_API.xml typeexpr.py
|
||||
COMMON_GLX = $(COMMON) glX_XML.py glX_proto_common.py
|
||||
|
||||
PYTHON2 = python
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
|
||||
all: $(OUTPUTS)
|
||||
|
||||
gl_XML.pyo: gl_XML.py
|
||||
rm -f gl_XML.pyo > /dev/null
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_XML.py
|
||||
|
||||
glX_XML.pyo: glX_XML.py $(COMMON)
|
||||
rm -f glX_XML.pyo > /dev/null
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_XML.py
|
||||
|
||||
license.pyo: license.py
|
||||
rm -f license.pyo > /dev/null
|
||||
$(PYTHON2) $(PYTHON_FLAGS) license.py
|
||||
|
||||
glprocs.h: $(COMMON) gl_procs.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_procs.py > glprocs.h
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
|
@ -30,286 +30,65 @@ import license
|
|||
import sys, getopt, string
|
||||
|
||||
|
||||
class glXItemFactory(gl_XML.glItemFactory):
|
||||
"""Factory to create GLX protocol oriented objects derived from glItem."""
|
||||
class glx_item_factory(gl_XML.gl_item_factory):
|
||||
"""Factory to create GLX protocol oriented objects derived from gl_item."""
|
||||
|
||||
def create(self, context, name, attrs):
|
||||
def create_item(self, name, element, context):
|
||||
if name == "function":
|
||||
return glXFunction(context, name, attrs)
|
||||
return glx_function(element, context)
|
||||
elif name == "enum":
|
||||
return glXEnum(context, name, attrs)
|
||||
elif name == "param":
|
||||
return glXParameter(context, name, attrs)
|
||||
return glx_enum(element, context)
|
||||
elif name == "api":
|
||||
return glx_api(self)
|
||||
else:
|
||||
return gl_XML.glItemFactory.create(self, context, name, attrs)
|
||||
|
||||
class glXEnumFunction:
|
||||
def __init__(self, name, context):
|
||||
self.name = name
|
||||
self.context = context
|
||||
self.mode = 0
|
||||
self.sig = None
|
||||
|
||||
# "enums" is a set of lists. The element in the set is the
|
||||
# value of the enum. The list is the list of names for that
|
||||
# value. For example, [0x8126] = {"POINT_SIZE_MIN",
|
||||
# "POINT_SIZE_MIN_ARB", "POINT_SIZE_MIN_EXT",
|
||||
# "POINT_SIZE_MIN_SGIS"}.
|
||||
|
||||
self.enums = {}
|
||||
|
||||
# "count" is indexed by count values. Each element of count
|
||||
# is a list of index to "enums" that have that number of
|
||||
# associated data elements. For example, [4] =
|
||||
# {GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION,
|
||||
# GL_AMBIENT_AND_DIFFUSE} (the enum names are used here,
|
||||
# but the actual hexadecimal values would be in the array).
|
||||
|
||||
self.count = {}
|
||||
return gl_XML.gl_item_factory.create_item(self, name, element, context)
|
||||
|
||||
|
||||
def append(self, count, value, name):
|
||||
if self.enums.has_key( value ):
|
||||
self.enums[value].append(name)
|
||||
else:
|
||||
if not self.count.has_key(count):
|
||||
self.count[count] = []
|
||||
|
||||
self.enums[value] = []
|
||||
self.enums[value].append(name)
|
||||
self.count[count].append(value)
|
||||
|
||||
|
||||
def signature( self ):
|
||||
if self.sig == None:
|
||||
self.sig = ""
|
||||
for i in self.count:
|
||||
self.count[i].sort()
|
||||
for e in self.count[i]:
|
||||
self.sig += "%04x,%u," % (e, i)
|
||||
|
||||
return self.sig
|
||||
|
||||
|
||||
def set_mode( self, mode ):
|
||||
"""Mark an enum-function as a 'set' function."""
|
||||
|
||||
self.mode = mode
|
||||
|
||||
|
||||
def is_set( self ):
|
||||
return self.mode
|
||||
|
||||
|
||||
def PrintUsingTable(self):
|
||||
"""Emit the body of the __gl*_size function using a pair
|
||||
of look-up tables and a mask. The mask is calculated such
|
||||
that (e & mask) is unique for all the valid values of e for
|
||||
this function. The result of (e & mask) is used as an index
|
||||
into the first look-up table. If it matches e, then the
|
||||
same entry of the second table is returned. Otherwise zero
|
||||
is returned.
|
||||
class glx_enum(gl_XML.gl_enum):
|
||||
def __init__(self, element, context):
|
||||
gl_XML.gl_enum.__init__(self, element, context)
|
||||
|
||||
It seems like this should cause better code to be generated.
|
||||
However, on x86 at least, the resulting .o file is about 20%
|
||||
larger then the switch-statment version. I am leaving this
|
||||
code in because the results may be different on other
|
||||
platforms (e.g., PowerPC or x86-64)."""
|
||||
self.functions = {}
|
||||
|
||||
return 0
|
||||
count = 0
|
||||
for a in self.enums:
|
||||
count += 1
|
||||
child = element.children
|
||||
while child:
|
||||
if child.type == "element" and child.name == "size":
|
||||
n = child.nsProp( "name", None )
|
||||
c = child.nsProp( "count", None )
|
||||
m = child.nsProp( "mode", None )
|
||||
|
||||
if not c:
|
||||
c = self.default_count
|
||||
|
||||
if self.count.has_key(-1):
|
||||
return 0
|
||||
if m == "get":
|
||||
mode = 0
|
||||
else:
|
||||
mode = 1
|
||||
|
||||
# Determine if there is some mask M, such that M = (2^N) - 1,
|
||||
# that will generate unique values for all of the enums.
|
||||
if not self.functions.has_key(n):
|
||||
self.functions[ n ] = [c, mode]
|
||||
|
||||
mask = 0
|
||||
for i in [1, 2, 3, 4, 5, 6, 7, 8]:
|
||||
mask = (1 << i) - 1
|
||||
child = child.next
|
||||
|
||||
fail = 0;
|
||||
for a in self.enums:
|
||||
for b in self.enums:
|
||||
if a != b:
|
||||
if (a & mask) == (b & mask):
|
||||
fail = 1;
|
||||
|
||||
if not fail:
|
||||
break;
|
||||
else:
|
||||
mask = 0
|
||||
|
||||
if (mask != 0) and (mask < (2 * count)):
|
||||
masked_enums = {}
|
||||
masked_count = {}
|
||||
|
||||
for i in range(0, mask + 1):
|
||||
masked_enums[i] = "0";
|
||||
masked_count[i] = 0;
|
||||
|
||||
for c in self.count:
|
||||
for e in self.count[c]:
|
||||
i = e & mask
|
||||
masked_enums[i] = '0x%04x /* %s */' % (e, self.enums[e][0])
|
||||
masked_count[i] = c
|
||||
|
||||
|
||||
print ' static const GLushort a[%u] = {' % (mask + 1)
|
||||
for e in masked_enums:
|
||||
print ' %s, ' % (masked_enums[e])
|
||||
print ' };'
|
||||
|
||||
print ' static const GLubyte b[%u] = {' % (mask + 1)
|
||||
for c in masked_count:
|
||||
print ' %u, ' % (masked_count[c])
|
||||
print ' };'
|
||||
|
||||
print ' const unsigned idx = (e & 0x%02xU);' % (mask)
|
||||
print ''
|
||||
print ' return (e == a[idx]) ? (GLint) b[idx] : 0;'
|
||||
return 1;
|
||||
else:
|
||||
return 0;
|
||||
|
||||
def PrintUsingSwitch(self, name):
|
||||
"""Emit the body of the __gl*_size function using a
|
||||
switch-statement."""
|
||||
|
||||
print ' switch( e ) {'
|
||||
|
||||
for c in self.count:
|
||||
for e in self.count[c]:
|
||||
first = 1
|
||||
|
||||
# There may be multiple enums with the same
|
||||
# value. This happens has extensions are
|
||||
# promoted from vendor-specific or EXT to
|
||||
# ARB and to the core. Emit the first one as
|
||||
# a case label, and emit the others as
|
||||
# commented-out case labels.
|
||||
|
||||
for j in self.enums[e]:
|
||||
if first:
|
||||
print ' case %s:' % (j)
|
||||
first = 0
|
||||
else:
|
||||
print '/* case %s:*/' % (j)
|
||||
|
||||
if c == -1:
|
||||
print ' return __gl%s_variable_size( e );' % (name)
|
||||
else:
|
||||
print ' return %u;' % (c)
|
||||
|
||||
print ' default: return 0;'
|
||||
print ' }'
|
||||
|
||||
|
||||
def Print(self, name):
|
||||
print 'INTERNAL PURE FASTCALL GLint'
|
||||
print '__gl%s_size( GLenum e )' % (name)
|
||||
print '{'
|
||||
|
||||
if not self.PrintUsingTable():
|
||||
self.PrintUsingSwitch(name)
|
||||
|
||||
print '}'
|
||||
print ''
|
||||
|
||||
|
||||
|
||||
class glXEnum(gl_XML.glEnum):
|
||||
def __init__(self, context, name, attrs):
|
||||
gl_XML.glEnum.__init__(self, context, name, attrs)
|
||||
|
||||
|
||||
def startElementNS(self, name, qname, attrs):
|
||||
[uri, true_name] = name
|
||||
if true_name == "size":
|
||||
[temp_n, c, mode] = self.process_attributes(attrs)
|
||||
|
||||
if temp_n == "Get":
|
||||
names = ["GetIntegerv", "GetBooleanv", "GetFloatv", "GetDoublev" ]
|
||||
else:
|
||||
names = [ temp_n ]
|
||||
|
||||
for n in names:
|
||||
if not self.context.glx_enum_functions.has_key( n ):
|
||||
f = self.context.createEnumFunction( n )
|
||||
f.set_mode( mode )
|
||||
self.context.glx_enum_functions[ f.name ] = f
|
||||
|
||||
self.context.glx_enum_functions[ n ].append( c, self.value, self.name )
|
||||
else:
|
||||
gl_XML.glEnum.startElementNS(self, name, qname, attrs)
|
||||
return
|
||||
|
||||
|
||||
class glXParameter(gl_XML.glParameter):
|
||||
def __init__(self, context, name, attrs):
|
||||
self.order = 1;
|
||||
gl_XML.glParameter.__init__(self, context, name, attrs);
|
||||
class glx_function(gl_XML.gl_function):
|
||||
def __init__(self, element, context):
|
||||
self.glx_rop = 0
|
||||
self.glx_sop = 0
|
||||
self.glx_vendorpriv = 0
|
||||
|
||||
# If this is set to true, it means that GLdouble parameters should be
|
||||
# written to the GLX protocol packet in the order they appear in the
|
||||
# prototype. This is different from the "classic" ordering. In the
|
||||
# classic ordering GLdoubles are written to the protocol packet first,
|
||||
# followed by non-doubles. NV_vertex_program was the first extension
|
||||
# to break with this tradition.
|
||||
|
||||
class glXParameterIterator:
|
||||
"""Class to iterate over a list of glXParameters.
|
||||
self.glx_doubles_in_order = 0
|
||||
|
||||
Objects of this class are returned by the parameterIterator method of
|
||||
the glXFunction class. They are used to iterate over the list of
|
||||
parameters to the function."""
|
||||
|
||||
def __init__(self, data, skip_output, max_order):
|
||||
self.data = data
|
||||
self.index = 0
|
||||
self.order = 0
|
||||
self.skip_output = skip_output
|
||||
self.max_order = max_order
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def next(self):
|
||||
if len( self.data ) == 0:
|
||||
raise StopIteration
|
||||
|
||||
while 1:
|
||||
if self.index == len( self.data ):
|
||||
if self.order == self.max_order:
|
||||
raise StopIteration
|
||||
else:
|
||||
self.order += 1
|
||||
self.index = 0
|
||||
|
||||
i = self.index
|
||||
self.index += 1
|
||||
|
||||
if self.data[i].order == self.order and not (self.data[i].is_output and self.skip_output):
|
||||
return self.data[i]
|
||||
|
||||
|
||||
class glXFunction(gl_XML.glFunction):
|
||||
glx_rop = 0
|
||||
glx_sop = 0
|
||||
glx_vendorpriv = 0
|
||||
|
||||
# If this is set to true, it means that GLdouble parameters should be
|
||||
# written to the GLX protocol packet in the order they appear in the
|
||||
# prototype. This is different from the "classic" ordering. In the
|
||||
# classic ordering GLdoubles are written to the protocol packet first,
|
||||
# followed by non-doubles. NV_vertex_program was the first extension
|
||||
# to break with this tradition.
|
||||
|
||||
glx_doubles_in_order = 0
|
||||
|
||||
vectorequiv = None
|
||||
can_be_large = 0
|
||||
|
||||
def __init__(self, context, name, attrs):
|
||||
self.vectorequiv = attrs.get((None, 'vectorequiv'), None)
|
||||
self.counter = None
|
||||
self.vectorequiv = None
|
||||
self.output = None
|
||||
self.can_be_large = 0
|
||||
self.reply_always_array = 0
|
||||
|
@ -320,147 +99,250 @@ class glXFunction(gl_XML.glFunction):
|
|||
self.client_handcode = 0
|
||||
self.ignore = 0
|
||||
|
||||
gl_XML.glFunction.__init__(self, context, name, attrs)
|
||||
self.count_parameter_list = []
|
||||
self.counter_list = []
|
||||
self.parameters_by_name = {}
|
||||
self.offsets_calculated = 0
|
||||
|
||||
gl_XML.gl_function.__init__(self, element, context)
|
||||
return
|
||||
|
||||
|
||||
def parameterIterator(self, skip_output, max_order):
|
||||
return glXParameterIterator(self.fn_parameters, skip_output, max_order)
|
||||
def process_element(self, element):
|
||||
gl_XML.gl_function.process_element(self, element)
|
||||
|
||||
self.vectorequiv = element.nsProp( "vectorequiv", None )
|
||||
|
||||
|
||||
if element.nsProp( "name", None ) == self.name:
|
||||
for param in self.parameters:
|
||||
self.parameters_by_name[ param.name ] = param
|
||||
|
||||
if len(param.count_parameter_list):
|
||||
self.count_parameter_list.extend( param.count_parameter_list )
|
||||
|
||||
if param.counter and param.counter not in self.counter_list:
|
||||
self.counter_list.append(param.counter)
|
||||
|
||||
|
||||
child = element.children
|
||||
while child:
|
||||
if child.type == "element":
|
||||
if child.name == "glx":
|
||||
rop = child.nsProp( 'rop', None )
|
||||
sop = child.nsProp( 'sop', None )
|
||||
vop = child.nsProp( 'vendorpriv', None )
|
||||
|
||||
if rop:
|
||||
self.glx_rop = int(rop)
|
||||
else:
|
||||
self.glx_rop = 0
|
||||
|
||||
if sop:
|
||||
self.glx_sop = int(sop)
|
||||
else:
|
||||
self.glx_sop = 0
|
||||
|
||||
if vop:
|
||||
self.glx_vendorpriv = int(vop)
|
||||
else:
|
||||
self.glx_vendorpriv = 0
|
||||
|
||||
self.img_reset = child.nsProp( 'img_reset', None )
|
||||
|
||||
# The 'handcode' attribute can be one of 'true',
|
||||
# 'false', 'client', or 'server'.
|
||||
|
||||
handcode = child.nsProp( 'handcode', None )
|
||||
if handcode == "false":
|
||||
self.server_handcode = 0
|
||||
self.client_handcode = 0
|
||||
elif handcode == "true":
|
||||
self.server_handcode = 1
|
||||
self.client_handcode = 1
|
||||
elif handcode == "client":
|
||||
self.server_handcode = 0
|
||||
self.client_handcode = 1
|
||||
elif handcode == "server":
|
||||
self.server_handcode = 1
|
||||
self.client_handcode = 0
|
||||
else:
|
||||
raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name))
|
||||
|
||||
self.ignore = gl_XML.is_attr_true( child, 'ignore' )
|
||||
self.can_be_large = gl_XML.is_attr_true( child, 'large' )
|
||||
self.glx_doubles_in_order = gl_XML.is_attr_true( child, 'doubles_in_order' )
|
||||
self.reply_always_array = gl_XML.is_attr_true( child, 'always_array' )
|
||||
self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply' )
|
||||
|
||||
child = child.next
|
||||
|
||||
|
||||
# Do some validation of the GLX protocol information. As
|
||||
# new tests are discovered, they should be added here.
|
||||
|
||||
for param in self.parameters:
|
||||
if param.is_output and self.glx_rop != 0:
|
||||
raise RuntimeError("Render / RenderLarge commands cannot have outputs (%s)." % (self.name))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def has_variable_size_request(self):
|
||||
"""Determine if the GLX request packet is variable sized.
|
||||
|
||||
The GLX request packet is variable sized in several common
|
||||
situations.
|
||||
|
||||
def startElementNS(self, name, qname, attrs):
|
||||
"""Process elements within a function that are specific to GLX."""
|
||||
1. The function has a non-output parameter that is counted
|
||||
by another parameter (e.g., the 'textures' parameter of
|
||||
glDeleteTextures).
|
||||
|
||||
2. The function has a non-output parameter whose count is
|
||||
determined by another parameter that is an enum (e.g., the
|
||||
'params' parameter of glLightfv).
|
||||
|
||||
3. The function has a non-output parameter that is an
|
||||
image.
|
||||
|
||||
[uri, true_name] = name
|
||||
if true_name == "glx":
|
||||
self.glx_rop = int(attrs.get((None, 'rop'), "0"))
|
||||
self.glx_sop = int(attrs.get((None, 'sop'), "0"))
|
||||
self.glx_vendorpriv = int(attrs.get((None, 'vendorpriv'), "0"))
|
||||
self.img_reset = attrs.get((None, 'img_reset'), None)
|
||||
4. The function must be hand-coded on the server.
|
||||
"""
|
||||
|
||||
# The 'handcode' attribute can be one of 'true',
|
||||
# 'false', 'client', or 'server'.
|
||||
if self.glx_rop == 0:
|
||||
return 0
|
||||
|
||||
handcode = attrs.get((None, 'handcode'), "false")
|
||||
if handcode == "false":
|
||||
self.server_handcode = 0
|
||||
self.client_handcode = 0
|
||||
elif handcode == "true":
|
||||
self.server_handcode = 1
|
||||
self.client_handcode = 1
|
||||
elif handcode == "client":
|
||||
self.server_handcode = 0
|
||||
self.client_handcode = 1
|
||||
elif handcode == "server":
|
||||
self.server_handcode = 1
|
||||
self.client_handcode = 0
|
||||
else:
|
||||
raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name))
|
||||
if self.server_handcode or self.images:
|
||||
return 1
|
||||
|
||||
self.ignore = gl_XML.is_attr_true( attrs, 'ignore' )
|
||||
self.can_be_large = gl_XML.is_attr_true( attrs, 'large' )
|
||||
self.glx_doubles_in_order = gl_XML.is_attr_true( attrs, 'doubles_in_order' )
|
||||
self.reply_always_array = gl_XML.is_attr_true( attrs, 'always_array' )
|
||||
self.dimensions_in_reply = gl_XML.is_attr_true( attrs, 'dimensions_in_reply' )
|
||||
else:
|
||||
gl_XML.glFunction.startElementNS(self, name, qname, attrs)
|
||||
for param in self.parameters:
|
||||
if not param.is_output:
|
||||
if param.counter or len(param.count_parameter_list):
|
||||
return 1
|
||||
|
||||
|
||||
def endElementNS(self, name, qname):
|
||||
[uri, true_name] = name
|
||||
if true_name == "function":
|
||||
# Mark any function that does not have GLX protocol
|
||||
# defined as "ignore". This prevents bad things from
|
||||
# happening when people add new functions to the GL
|
||||
# API XML without adding any GLX section.
|
||||
#
|
||||
# This will also mark functions that don't have a
|
||||
# dispatch offset at ignored.
|
||||
|
||||
if (self.fn_offset == -1 and not self.fn_alias) or not (self.client_handcode or self.server_handcode or self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.fn_alias):
|
||||
#if not self.ignore:
|
||||
# if self.fn_offset == -1:
|
||||
# print '/* %s ignored becuase no offset assigned. */' % (self.name)
|
||||
# else:
|
||||
# print '/* %s ignored becuase no GLX opcode assigned. */' % (self.name)
|
||||
|
||||
self.ignore = 1
|
||||
|
||||
return gl_XML.glFunction.endElementNS(self, name, qname)
|
||||
|
||||
|
||||
def append(self, tag_name, p):
|
||||
gl_XML.glFunction.append(self, tag_name, p)
|
||||
|
||||
if p.is_variable_length_array():
|
||||
p.order = 2;
|
||||
elif not self.glx_doubles_in_order and p.p_type.size == 8:
|
||||
p.order = 0;
|
||||
|
||||
if p.is_counter:
|
||||
self.counter = p.name
|
||||
|
||||
if p.is_output:
|
||||
self.output = p
|
||||
|
||||
return
|
||||
return 0
|
||||
|
||||
|
||||
def variable_length_parameter(self):
|
||||
if len(self.variable_length_parameters):
|
||||
return self.variable_length_parameters[0]
|
||||
|
||||
for param in self.parameters:
|
||||
if not param.is_output:
|
||||
if param.counter or len(param.count_parameter_list):
|
||||
return param
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def output_parameter(self):
|
||||
for param in self.fn_parameters:
|
||||
if param.is_output:
|
||||
return param
|
||||
def calculate_offsets(self):
|
||||
if not self.offsets_calculated:
|
||||
# Calculate the offset of the first function parameter
|
||||
# in the GLX command packet. This byte offset is
|
||||
# measured from the end of the Render / RenderLarge
|
||||
# header. The offset for all non-pixel commends is
|
||||
# zero. The offset for pixel commands depends on the
|
||||
# number of dimensions of the pixel data.
|
||||
|
||||
return None
|
||||
if len(self.images) and not self.images[0].is_output:
|
||||
[dim, junk, junk, junk, junk] = self.images[0].get_dimensions()
|
||||
|
||||
# The base size is the size of the pixel pack info
|
||||
# header used by images with the specified number
|
||||
# of dimensions.
|
||||
|
||||
def offset_of_first_parameter(self):
|
||||
"""Get the offset of the first parameter in the command.
|
||||
|
||||
Gets the offset of the first function parameter in the GLX
|
||||
command packet. This byte offset is measured from the end
|
||||
of the Render / RenderLarge header. The offset for all non-
|
||||
pixel commends is zero. The offset for pixel commands depends
|
||||
on the number of dimensions of the pixel data."""
|
||||
|
||||
if self.image and not self.image.is_output:
|
||||
[dim, junk, junk, junk, junk] = self.dimensions()
|
||||
|
||||
# The base size is the size of the pixel pack info
|
||||
# header used by images with the specified number
|
||||
# of dimensions.
|
||||
|
||||
if dim <= 2:
|
||||
return 20
|
||||
elif dim <= 4:
|
||||
return 36
|
||||
if dim <= 2:
|
||||
offset = 20
|
||||
elif dim <= 4:
|
||||
offset = 36
|
||||
else:
|
||||
raise RuntimeError('Invalid number of dimensions %u for parameter "%s" in function "%s".' % (dim, self.image.name, self.name))
|
||||
else:
|
||||
raise RuntimeError('Invalid number of dimensions %u for parameter "%s" in function "%s".' % (dim, self.image.name, self.name))
|
||||
else:
|
||||
return 0
|
||||
offset = 0
|
||||
|
||||
for param in self.parameterIterateGlxSend():
|
||||
if param.img_null_flag:
|
||||
offset += 4
|
||||
|
||||
if param.name != self.img_reset:
|
||||
param.offset = offset
|
||||
if not param.is_variable_length():
|
||||
offset += param.size()
|
||||
|
||||
if self.pad_after( param ):
|
||||
offset += 4
|
||||
|
||||
|
||||
self.offsets_calculated = 1
|
||||
return
|
||||
|
||||
|
||||
def offset_of(self, param_name):
|
||||
self.calculate_offsets()
|
||||
return self.parameters_by_name[ param_name ].offset
|
||||
|
||||
|
||||
def parameterIterateGlxSend(self, include_variable_parameters = 1):
|
||||
"""Create an iterator for parameters in GLX request order."""
|
||||
|
||||
# The parameter lists are usually quite short, so it's easier
|
||||
# (i.e., less code) to just generate a new list with the
|
||||
# required elements than it is to create a new iterator class.
|
||||
|
||||
temp = [ [], [], [] ]
|
||||
for param in self.parameters:
|
||||
if param.is_output: continue
|
||||
|
||||
if param.is_variable_length():
|
||||
temp[2].append( param )
|
||||
elif not self.glx_doubles_in_order and param.is_64_bit():
|
||||
temp[0].append( param )
|
||||
else:
|
||||
temp[1].append( param )
|
||||
|
||||
parameters = temp[0]
|
||||
parameters.extend( temp[1] )
|
||||
if include_variable_parameters:
|
||||
parameters.extend( temp[2] )
|
||||
return parameters.__iter__()
|
||||
|
||||
|
||||
def parameterIterateCounters(self):
|
||||
temp = []
|
||||
for name in self.counter_list:
|
||||
temp.append( self.parameters_by_name[ name ] )
|
||||
|
||||
return temp.__iter__()
|
||||
|
||||
|
||||
def parameterIterateOutputs(self):
|
||||
temp = []
|
||||
for p in self.parameters:
|
||||
if p.is_output:
|
||||
temp.append( p )
|
||||
|
||||
return temp
|
||||
|
||||
|
||||
def command_fixed_length(self):
|
||||
"""Return the length, in bytes as an integer, of the
|
||||
fixed-size portion of the command."""
|
||||
|
||||
size = self.offset_of_first_parameter()
|
||||
if len(self.parameters) == 0:
|
||||
return 0
|
||||
|
||||
self.calculate_offsets()
|
||||
|
||||
for p in gl_XML.glFunction.parameterIterator(self):
|
||||
if not p.is_output and p.name != self.img_reset:
|
||||
size += p.size()
|
||||
if self.pad_after(p):
|
||||
size = 0
|
||||
for param in self.parameterIterateGlxSend(0):
|
||||
if param.name != self.img_reset:
|
||||
if size == 0:
|
||||
size = param.offset + param.size()
|
||||
else:
|
||||
size += param.size()
|
||||
|
||||
if self.pad_after( param ):
|
||||
size += 4
|
||||
|
||||
if self.image and (self.image.img_null_flag or self.image.is_output):
|
||||
size += 4
|
||||
for param in self.images:
|
||||
if param.img_null_flag or param.is_output:
|
||||
size += 4
|
||||
|
||||
return size
|
||||
|
||||
|
@ -470,9 +352,15 @@ class glXFunction(gl_XML.glFunction):
|
|||
portion of the command."""
|
||||
|
||||
size_string = ""
|
||||
for p in gl_XML.glFunction.parameterIterator(self):
|
||||
if (not p.is_output) and (p.size() == 0):
|
||||
size_string = size_string + " + __GLX_PAD(%s)" % (p.size_string())
|
||||
for p in self.parameterIterateGlxSend():
|
||||
if (not p.is_output) and (p.is_variable_length() or p.is_image()):
|
||||
# FIXME Replace the 1 in the size_string call
|
||||
# FIXME w/0 to eliminate some un-needed parnes
|
||||
# FIXME This would already be done, but it
|
||||
# FIXME adds some extra diffs to the generated
|
||||
# FIXME code.
|
||||
|
||||
size_string = size_string + " + __GLX_PAD(%s)" % (p.size_string(1))
|
||||
|
||||
return size_string
|
||||
|
||||
|
@ -506,9 +394,15 @@ class glXFunction(gl_XML.glFunction):
|
|||
else:
|
||||
return self.opcode_value()
|
||||
|
||||
|
||||
def opcode_value(self):
|
||||
"""Get the unique protocol opcode for the glXFunction"""
|
||||
|
||||
if (self.glx_rop == 0) and self.vectorequiv:
|
||||
equiv = self.context.functions_by_name[ self.vectorequiv ]
|
||||
self.glx_rop = equiv.glx_rop
|
||||
|
||||
|
||||
if self.glx_rop != 0:
|
||||
return self.glx_rop
|
||||
elif self.glx_sop != 0:
|
||||
|
@ -518,6 +412,7 @@ class glXFunction(gl_XML.glFunction):
|
|||
else:
|
||||
return -1
|
||||
|
||||
|
||||
def opcode_rop_basename(self):
|
||||
"""Return either the name to be used for GLX protocol enum.
|
||||
|
||||
|
@ -530,9 +425,16 @@ class glXFunction(gl_XML.glFunction):
|
|||
else:
|
||||
return self.vectorequiv
|
||||
|
||||
|
||||
def opcode_name(self):
|
||||
"""Get the unique protocol enum name for the glXFunction"""
|
||||
|
||||
if (self.glx_rop == 0) and self.vectorequiv:
|
||||
equiv = self.context.functions_by_name[ self.vectorequiv ]
|
||||
self.glx_rop = equiv.glx_rop
|
||||
self.glx_doubles_in_order = equiv.glx_doubles_in_order
|
||||
|
||||
|
||||
if self.glx_rop != 0:
|
||||
return "X_GLrop_%s" % (self.opcode_rop_basename())
|
||||
elif self.glx_sop != 0:
|
||||
|
@ -562,154 +464,66 @@ class glXFunction(gl_XML.glFunction):
|
|||
return self.opcode_name()
|
||||
|
||||
|
||||
def return_string(self):
|
||||
if self.fn_return_type != 'void':
|
||||
return "return retval;"
|
||||
else:
|
||||
return "return;"
|
||||
|
||||
|
||||
def needs_reply(self):
|
||||
return self.fn_return_type != 'void' or self.output != None
|
||||
try:
|
||||
x = self._needs_reply
|
||||
except Exception, e:
|
||||
x = 0
|
||||
if self.return_type != 'void':
|
||||
x = 1
|
||||
|
||||
for param in self.parameters:
|
||||
if param.is_output:
|
||||
x = 1
|
||||
break
|
||||
|
||||
def dimensions(self):
|
||||
"""Determine the dimensions of an image.
|
||||
|
||||
Returns a tuple representing the number of dimensions and the
|
||||
string name of each of the dimensions of an image, If the
|
||||
function is not a pixel function, the number of dimensions
|
||||
will be zero."""
|
||||
self._needs_reply = x
|
||||
|
||||
if not self.image:
|
||||
return [0, "0", "0", "0", "0"]
|
||||
else:
|
||||
dim = 1
|
||||
w = self.image.width
|
||||
|
||||
if self.image.height:
|
||||
dim = 2
|
||||
h = self.image.height
|
||||
else:
|
||||
h = "1"
|
||||
|
||||
if self.image.depth:
|
||||
dim = 3
|
||||
d = self.image.depth
|
||||
else:
|
||||
d = "1"
|
||||
|
||||
if self.image.extent:
|
||||
dim = 4
|
||||
e = self.image.extent
|
||||
else:
|
||||
e = "1"
|
||||
|
||||
return [dim, w, h, d, e]
|
||||
return x
|
||||
|
||||
|
||||
def pad_after(self, p):
|
||||
"""Returns the name of the field inserted after the
|
||||
specified field to pad out the command header."""
|
||||
|
||||
if self.image and self.image.img_pad_dimensions:
|
||||
if not self.image.height:
|
||||
if p.name == self.image.width:
|
||||
return "height"
|
||||
elif p.name == self.image.img_xoff:
|
||||
return "yoffset"
|
||||
elif not self.image.extent:
|
||||
if p.name == self.image.depth:
|
||||
# Should this be "size4d"?
|
||||
return "extent"
|
||||
elif p.name == self.image.img_zoff:
|
||||
return "woffset"
|
||||
for image in self.images:
|
||||
if image.img_pad_dimensions:
|
||||
if not image.height:
|
||||
if p.name == image.width:
|
||||
return "height"
|
||||
elif p.name == image.img_xoff:
|
||||
return "yoffset"
|
||||
elif not image.extent:
|
||||
if p.name == image.depth:
|
||||
# Should this be "size4d"?
|
||||
return "extent"
|
||||
elif p.name == image.img_zoff:
|
||||
return "woffset"
|
||||
|
||||
return None
|
||||
|
||||
|
||||
class glXFunctionIterator(gl_XML.glFunctionIterator):
|
||||
class glx_function_iterator:
|
||||
"""Class to iterate over a list of glXFunctions"""
|
||||
|
||||
def __init__(self, context):
|
||||
self.context = context
|
||||
self.keys = context.functions.keys()
|
||||
self.keys.sort()
|
||||
|
||||
for self.index in range(0, len(self.keys)):
|
||||
if self.keys[ self.index ] >= 0: break
|
||||
|
||||
self.iterator = context.functionIterateByOffset()
|
||||
return
|
||||
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
|
||||
def next(self):
|
||||
if self.index == len(self.keys):
|
||||
raise StopIteration
|
||||
|
||||
f = self.context.functions[ self.keys[ self.index ] ]
|
||||
self.index += 1
|
||||
|
||||
if f.ignore:
|
||||
f = self.iterator.next()
|
||||
if f.ignore or not (f.glx_rop or f.glx_sop or f.glx_vendorpriv or f.vectorequiv or f.client_handcode):
|
||||
return self.next()
|
||||
else:
|
||||
return f
|
||||
|
||||
|
||||
class GlxProto(gl_XML.FilterGLAPISpecBase):
|
||||
name = "glX_proto_send.py (from Mesa)"
|
||||
class glx_api(gl_XML.gl_api):
|
||||
def functionIterateGlx(self):
|
||||
return glx_function_iterator(self)
|
||||
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
self.factory = glXItemFactory()
|
||||
self.glx_enum_functions = {}
|
||||
|
||||
|
||||
def endElementNS(self, name, qname):
|
||||
[uri, true_name] = name
|
||||
if true_name == 'OpenGLAPI':
|
||||
# Once all the parsing is done, we have to go back and
|
||||
# fix-up some cross references between different
|
||||
# functions.
|
||||
|
||||
for k in self.functions:
|
||||
f = self.functions[k]
|
||||
if f.vectorequiv != None:
|
||||
equiv = self.find_function(f.vectorequiv)
|
||||
if equiv != None:
|
||||
f.glx_doubles_in_order = equiv.glx_doubles_in_order
|
||||
f.glx_rop = equiv.glx_rop
|
||||
else:
|
||||
raise RuntimeError("Could not find the vector equiv. function %s for %s!" % (f.name, f.vectorequiv))
|
||||
else:
|
||||
gl_XML.FilterGLAPISpecBase.endElementNS(self, name, qname)
|
||||
return
|
||||
|
||||
|
||||
def createEnumFunction(self, n):
|
||||
return glXEnumFunction(n, self)
|
||||
|
||||
|
||||
def functionIterator(self):
|
||||
return glXFunctionIterator(self)
|
||||
|
||||
|
||||
def size_call(self, func):
|
||||
"""Create C code to calculate 'compsize'.
|
||||
|
||||
Creates code to calculate 'compsize'. If the function does
|
||||
not need 'compsize' to be calculated, None will be
|
||||
returned."""
|
||||
|
||||
if not func.image and not func.count_parameter_list:
|
||||
return None
|
||||
|
||||
if not func.image:
|
||||
parameters = string.join( func.count_parameter_list, "," )
|
||||
compsize = "__gl%s_size(%s)" % (func.name, parameters)
|
||||
else:
|
||||
[dim, w, h, d, junk] = func.dimensions()
|
||||
|
||||
compsize = '__glImageSize(%s, %s, %s, %s, %s, %s)' % (w, h, d, func.image.img_format, func.image.img_type, func.image.img_target)
|
||||
if not func.image.img_send_null:
|
||||
compsize = '(%s != NULL) ? %s : 0' % (func.image.name, compsize)
|
||||
|
||||
return compsize
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
|
@ -25,28 +25,22 @@
|
|||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import gl_XML
|
||||
import glX_XML
|
||||
import license
|
||||
import gl_XML, glX_XML, glX_proto_common, license
|
||||
import sys, getopt
|
||||
|
||||
|
||||
class glXDocItemFactory(glX_XML.glXItemFactory):
|
||||
class glx_doc_item_factory(glX_proto_common.glx_proto_item_factory):
|
||||
"""Factory to create GLX protocol documentation oriented objects derived from glItem."""
|
||||
|
||||
def create(self, context, name, attrs):
|
||||
if name == "param":
|
||||
return glXDocParameter(context, name, attrs)
|
||||
def create_item(self, name, element, context):
|
||||
if name == "parameter":
|
||||
return glx_doc_parameter(element, context)
|
||||
else:
|
||||
return glX_XML.glXItemFactory.create(self, context, name, attrs)
|
||||
|
||||
class glXDocParameter(gl_XML.glParameter):
|
||||
def __init__(self, context, name, attrs):
|
||||
self.order = 1;
|
||||
gl_XML.glParameter.__init__(self, context, name, attrs);
|
||||
return glX_proto_common.glx_proto_item_factory.create_item(self, name, element, context)
|
||||
|
||||
|
||||
def packet_type(self):
|
||||
class glx_doc_parameter(gl_XML.gl_parameter):
|
||||
def packet_type(self, type_dict):
|
||||
"""Get the type string for the packet header
|
||||
|
||||
GLX protocol documentation uses type names like CARD32,
|
||||
|
@ -57,13 +51,15 @@ class glXDocParameter(gl_XML.glParameter):
|
|||
if self.is_array():
|
||||
list_of = "LISTof"
|
||||
|
||||
if self.p_type.glx_name == "":
|
||||
t_name = self.get_base_type_string()
|
||||
if not type_dict.has_key( t_name ):
|
||||
type_name = "CARD8"
|
||||
else:
|
||||
type_name = self.p_type.glx_name
|
||||
type_name = type_dict[ t_name ]
|
||||
|
||||
return "%s%s" % (list_of, type_name)
|
||||
|
||||
|
||||
def packet_size(self):
|
||||
p = None
|
||||
s = self.size()
|
||||
|
@ -89,16 +85,16 @@ class glXDocParameter(gl_XML.glParameter):
|
|||
|
||||
return [str(s), p]
|
||||
|
||||
class PrintGlxProtoText(glX_XML.GlxProto):
|
||||
class PrintGlxProtoText(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
glX_XML.GlxProto.__init__(self)
|
||||
self.factory = glXDocItemFactory()
|
||||
self.last_category = ""
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
self.license = ""
|
||||
|
||||
|
||||
def printHeader(self):
|
||||
return
|
||||
|
||||
|
||||
def body_size(self, f):
|
||||
# At some point, refactor this function and
|
||||
# glXFunction::command_payload_length.
|
||||
|
@ -107,7 +103,7 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
size_str = ""
|
||||
pad_str = ""
|
||||
plus = ""
|
||||
for p in f.parameterIterator(1, 2):
|
||||
for p in f.parameterIterateGlxSend():
|
||||
[s, pad] = p.packet_size()
|
||||
try:
|
||||
size += int(s)
|
||||
|
@ -120,6 +116,7 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
|
||||
return [size, size_str, pad_str]
|
||||
|
||||
|
||||
def print_render_header(self, f):
|
||||
[size, size_str, pad_str] = self.body_size(f)
|
||||
size += 4;
|
||||
|
@ -162,6 +159,7 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
|
||||
return
|
||||
|
||||
|
||||
def print_reply(self, f):
|
||||
print ' =>'
|
||||
print ' 1 1 reply'
|
||||
|
@ -176,33 +174,39 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
print ' 4 m reply length, m = (n == 1 ? 0 : n)'
|
||||
|
||||
|
||||
output = None
|
||||
for x in f.parameterIterateOutputs():
|
||||
output = x
|
||||
break
|
||||
|
||||
|
||||
unused = 24
|
||||
if f.fn_return_type != 'void':
|
||||
print ' 4 %-15s return value' % (f.fn_return_type)
|
||||
if f.return_type != 'void':
|
||||
print ' 4 %-15s return value' % (f.return_type)
|
||||
unused -= 4
|
||||
elif f.output != None:
|
||||
elif output != None:
|
||||
print ' 4 unused'
|
||||
unused -= 4
|
||||
|
||||
if f.output != None:
|
||||
if output != None:
|
||||
print ' 4 CARD32 n'
|
||||
unused -= 4
|
||||
|
||||
if f.output != None:
|
||||
if output != None:
|
||||
if not f.reply_always_array:
|
||||
print ''
|
||||
print ' if (n = 1) this follows:'
|
||||
print ''
|
||||
print ' 4 CARD32 %s' % (f.output.name)
|
||||
print ' 4 CARD32 %s' % (output.name)
|
||||
print ' %-2u unused' % (unused - 4)
|
||||
print ''
|
||||
print ' otherwise this follows:'
|
||||
print ''
|
||||
|
||||
print ' %-2u unused' % (unused)
|
||||
p = f.output
|
||||
[s, pad] = p.packet_size()
|
||||
print ' %-8s %-15s %s' % (s, p.packet_type(), p.name)
|
||||
|
||||
[s, pad] = output.packet_size()
|
||||
print ' %-8s %-15s %s' % (s, output.packet_type( self.type_map ), output.name)
|
||||
if pad != None:
|
||||
try:
|
||||
bytes = int(s)
|
||||
|
@ -215,9 +219,9 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
|
||||
|
||||
def print_body(self, f):
|
||||
for p in f.parameterIterator(1, 2):
|
||||
for p in f.parameterIterateGlxSend():
|
||||
[s, pad] = p.packet_size()
|
||||
print ' %-8s %-15s %s' % (s, p.packet_type(), p.name)
|
||||
print ' %-8s %-15s %s' % (s, p.packet_type( self.type_map ), p.name)
|
||||
if pad != None:
|
||||
try:
|
||||
bytes = int(s)
|
||||
|
@ -226,26 +230,35 @@ class PrintGlxProtoText(glX_XML.GlxProto):
|
|||
except Exception,e:
|
||||
print ' %-8s %-15s unused, %s=pad(%s)' % (pad, "", pad, s)
|
||||
|
||||
def printFunction(self, f):
|
||||
def printBody(self, api):
|
||||
self.type_map = {}
|
||||
for t in api.typeIterate():
|
||||
self.type_map[ "GL" + t.name ] = t.glx_name
|
||||
|
||||
|
||||
# At some point this should be expanded to support pixel
|
||||
# functions, but I'm not going to lose any sleep over it now.
|
||||
|
||||
if f.client_handcode or f.server_handcode or f.vectorequiv or f.image:
|
||||
return
|
||||
for f in api.functionIterateByOffset():
|
||||
if f.client_handcode or f.server_handcode or f.vectorequiv or len(f.get_images()):
|
||||
continue
|
||||
|
||||
print ' %s' % (f.name)
|
||||
|
||||
if f.glx_rop != 0:
|
||||
self.print_render_header(f)
|
||||
else:
|
||||
self.print_single_header(f)
|
||||
|
||||
self.print_body(f)
|
||||
if f.glx_rop:
|
||||
print ' %s' % (f.name)
|
||||
self.print_render_header(f)
|
||||
elif f.glx_sop or f.glx_vendorpriv:
|
||||
print ' %s' % (f.name)
|
||||
self.print_single_header(f)
|
||||
else:
|
||||
continue
|
||||
|
||||
if f.needs_reply():
|
||||
self.print_reply(f)
|
||||
self.print_body(f)
|
||||
|
||||
print ''
|
||||
if f.needs_reply():
|
||||
self.print_reply(f)
|
||||
|
||||
print ''
|
||||
return
|
||||
|
||||
|
||||
|
@ -261,5 +274,7 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintGlxProtoText()
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name, glx_doc_item_factory() )
|
||||
|
||||
printer = PrintGlxProtoText()
|
||||
printer.Print( api )
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import gl_XML, glX_XML
|
||||
import string
|
||||
|
||||
|
||||
class glx_proto_item_factory(glX_XML.glx_item_factory):
|
||||
"""Factory to create GLX protocol oriented objects derived from gl_item."""
|
||||
|
||||
def create_item(self, name, element, context):
|
||||
if name == "type":
|
||||
return glx_proto_type(element, context)
|
||||
else:
|
||||
return glX_XML.glx_item_factory.create_item(self, name, element, context)
|
||||
|
||||
|
||||
class glx_proto_type(gl_XML.gl_type):
|
||||
def __init__(self, element, context):
|
||||
gl_XML.gl_type.__init__(self, element, context)
|
||||
|
||||
self.glx_name = element.nsProp( "glx_name", None )
|
||||
return
|
||||
|
||||
|
||||
class glx_print_proto(gl_XML.gl_print_base):
|
||||
def size_call(self, func):
|
||||
"""Create C code to calculate 'compsize'.
|
||||
|
||||
Creates code to calculate 'compsize'. If the function does
|
||||
not need 'compsize' to be calculated, None will be
|
||||
returned."""
|
||||
|
||||
compsize = None
|
||||
|
||||
for param in func.parameterIterator():
|
||||
if not param.is_output:
|
||||
if param.is_image():
|
||||
[dim, w, h, d, junk] = param.get_dimensions()
|
||||
|
||||
compsize = '__glImageSize(%s, %s, %s, %s, %s, %s)' % (w, h, d, param.img_format, param.img_type, param.img_target)
|
||||
if not param.img_send_null:
|
||||
compsize = '(%s != NULL) ? %s : 0' % (param.name, compsize)
|
||||
|
||||
return compsize
|
||||
|
||||
elif len(param.count_parameter_list):
|
||||
parameters = string.join( param.count_parameter_list, "," )
|
||||
compsize = "__gl%s_size(%s)" % (func.name, parameters)
|
||||
|
||||
return compsize
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def emit_packet_size_calculation(self, f, bias):
|
||||
# compsize is only used in the command size calculation if
|
||||
# the function has a non-output parameter that has a non-empty
|
||||
# counter_parameter_list.
|
||||
|
||||
compsize = self.size_call(f)
|
||||
if compsize:
|
||||
print ' const GLuint compsize = %s;' % (compsize)
|
||||
|
||||
if bias:
|
||||
print ' const GLuint cmdlen = %s - %u;' % (f.command_length(), bias)
|
||||
else:
|
||||
print ' const GLuint cmdlen = %s;' % (f.command_length())
|
||||
|
||||
#print ''
|
||||
return compsize
|
File diff suppressed because it is too large
Load Diff
|
@ -25,104 +25,262 @@
|
|||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import gl_XML
|
||||
import glX_XML
|
||||
import gl_XML, glX_XML
|
||||
import license
|
||||
import sys, getopt, copy
|
||||
import sys, getopt, copy, string
|
||||
|
||||
|
||||
class SizeStubFunctionIterator(glX_XML.glXFunctionIterator):
|
||||
"""Iterate over functions that need "size" information.
|
||||
class glx_enum_function:
|
||||
def __init__(self, func_name, enum_dict):
|
||||
self.name = func_name
|
||||
self.mode = 1
|
||||
self.sig = None
|
||||
|
||||
Iterate over the functions that have variable sized data. First the
|
||||
"set"-type functions are iterated followed by the "get"-type
|
||||
functions.
|
||||
"""
|
||||
# "enums" is a set of lists. The element in the set is the
|
||||
# value of the enum. The list is the list of names for that
|
||||
# value. For example, [0x8126] = {"POINT_SIZE_MIN",
|
||||
# "POINT_SIZE_MIN_ARB", "POINT_SIZE_MIN_EXT",
|
||||
# "POINT_SIZE_MIN_SGIS"}.
|
||||
|
||||
def __init__(self, context):
|
||||
self.data = []
|
||||
self.index = 0
|
||||
self.enums = {}
|
||||
|
||||
set_functions = []
|
||||
get_functions = []
|
||||
extra_data = []
|
||||
# "count" is indexed by count values. Each element of count
|
||||
# is a list of index to "enums" that have that number of
|
||||
# associated data elements. For example, [4] =
|
||||
# {GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION,
|
||||
# GL_AMBIENT_AND_DIFFUSE} (the enum names are used here,
|
||||
# but the actual hexadecimal values would be in the array).
|
||||
|
||||
for f in gl_XML.glFunctionIterator(context):
|
||||
if context.glx_enum_functions.has_key(f.name):
|
||||
ef = context.glx_enum_functions[f.name]
|
||||
if ef.is_set():
|
||||
set_functions.append(f)
|
||||
self.count = {}
|
||||
|
||||
|
||||
# Fill self.count and self.enums using the dictionary of enums
|
||||
# that was passed in.
|
||||
|
||||
mode_set = 0
|
||||
for enum_name in enum_dict:
|
||||
e = enum_dict[ enum_name ]
|
||||
|
||||
if e.functions.has_key( func_name ):
|
||||
[count, mode] = e.functions[ func_name ]
|
||||
|
||||
if mode_set and mode != self.mode:
|
||||
raise RuntimeError("Not all enums for %s have the same mode." % (func_name))
|
||||
|
||||
self.mode = mode
|
||||
|
||||
if self.enums.has_key( e.value ):
|
||||
if e.name not in self.enums[ e.value ]:
|
||||
self.enums[ e.value ].append( e )
|
||||
else:
|
||||
get_functions.append(f)
|
||||
if not self.count.has_key( count ):
|
||||
self.count[ count ] = []
|
||||
|
||||
self.enums[ e.value ] = [ e ]
|
||||
self.count[ count ].append( e.value )
|
||||
|
||||
if (context.which_functions & PrintGlxSizeStubs_c.do_set) != 0:
|
||||
self.data += set_functions
|
||||
elif context.get_alias_set:
|
||||
extra_data = set_functions
|
||||
|
||||
if (context.which_functions & PrintGlxSizeStubs_c.do_get) != 0:
|
||||
self.data += get_functions
|
||||
|
||||
|
||||
for f in extra_data + self.data:
|
||||
sig = context.glx_enum_functions[f.name].signature()
|
||||
|
||||
if not context.glx_enum_sigs.has_key(sig):
|
||||
context.glx_enum_sigs[sig] = f.name;
|
||||
|
||||
return
|
||||
|
||||
|
||||
def next(self):
|
||||
if self.index == len(self.data):
|
||||
raise StopIteration
|
||||
|
||||
f = self.data[ self.index ]
|
||||
self.index += 1
|
||||
|
||||
return f
|
||||
|
||||
|
||||
class glXServerEnumFunction(glX_XML.glXEnumFunction):
|
||||
def signature( self ):
|
||||
if self.sig == None:
|
||||
sig = glX_XML.glXEnumFunction.signature(self)
|
||||
self.sig = ""
|
||||
for i in self.count:
|
||||
if i == None:
|
||||
raise RuntimeError("i is None. WTF?")
|
||||
|
||||
f = self.context.find_function( self.name )
|
||||
p = f.variable_length_parameter()
|
||||
self.count[i].sort()
|
||||
for e in self.count[i]:
|
||||
self.sig += "%04x,%u," % (e, i)
|
||||
|
||||
return self.sig
|
||||
|
||||
try:
|
||||
sig += "%u" % (p.p_type.size)
|
||||
except Exception,e:
|
||||
print '%s' % (self.name)
|
||||
raise e
|
||||
|
||||
def is_set( self ):
|
||||
return self.mode
|
||||
|
||||
|
||||
def PrintUsingTable(self):
|
||||
"""Emit the body of the __gl*_size function using a pair
|
||||
of look-up tables and a mask. The mask is calculated such
|
||||
that (e & mask) is unique for all the valid values of e for
|
||||
this function. The result of (e & mask) is used as an index
|
||||
into the first look-up table. If it matches e, then the
|
||||
same entry of the second table is returned. Otherwise zero
|
||||
is returned.
|
||||
|
||||
It seems like this should cause better code to be generated.
|
||||
However, on x86 at least, the resulting .o file is about 20%
|
||||
larger then the switch-statment version. I am leaving this
|
||||
code in because the results may be different on other
|
||||
platforms (e.g., PowerPC or x86-64)."""
|
||||
|
||||
return 0
|
||||
count = 0
|
||||
for a in self.enums:
|
||||
count += 1
|
||||
|
||||
if self.count.has_key(-1):
|
||||
return 0
|
||||
|
||||
# Determine if there is some mask M, such that M = (2^N) - 1,
|
||||
# that will generate unique values for all of the enums.
|
||||
|
||||
mask = 0
|
||||
for i in [1, 2, 3, 4, 5, 6, 7, 8]:
|
||||
mask = (1 << i) - 1
|
||||
|
||||
fail = 0;
|
||||
for a in self.enums:
|
||||
for b in self.enums:
|
||||
if a != b:
|
||||
if (a & mask) == (b & mask):
|
||||
fail = 1;
|
||||
|
||||
if not fail:
|
||||
break;
|
||||
else:
|
||||
mask = 0
|
||||
|
||||
if (mask != 0) and (mask < (2 * count)):
|
||||
masked_enums = {}
|
||||
masked_count = {}
|
||||
|
||||
for i in range(0, mask + 1):
|
||||
masked_enums[i] = "0";
|
||||
masked_count[i] = 0;
|
||||
|
||||
for c in self.count:
|
||||
for e in self.count[c]:
|
||||
i = e & mask
|
||||
enum_obj = self.enums[e][0]
|
||||
masked_enums[i] = '0x%04x /* %s */' % (e, enum_obj.name )
|
||||
masked_count[i] = c
|
||||
|
||||
|
||||
print ' static const GLushort a[%u] = {' % (mask + 1)
|
||||
for e in masked_enums:
|
||||
print ' %s, ' % (masked_enums[e])
|
||||
print ' };'
|
||||
|
||||
print ' static const GLubyte b[%u] = {' % (mask + 1)
|
||||
for c in masked_count:
|
||||
print ' %u, ' % (masked_count[c])
|
||||
print ' };'
|
||||
|
||||
print ' const unsigned idx = (e & 0x%02xU);' % (mask)
|
||||
print ''
|
||||
print ' return (e == a[idx]) ? (GLint) b[idx] : 0;'
|
||||
return 1;
|
||||
else:
|
||||
return 0;
|
||||
|
||||
|
||||
def PrintUsingSwitch(self, name):
|
||||
"""Emit the body of the __gl*_size function using a
|
||||
switch-statement."""
|
||||
|
||||
print ' switch( e ) {'
|
||||
|
||||
for c in self.count:
|
||||
for e in self.count[c]:
|
||||
first = 1
|
||||
|
||||
# There may be multiple enums with the same
|
||||
# value. This happens has extensions are
|
||||
# promoted from vendor-specific or EXT to
|
||||
# ARB and to the core. Emit the first one as
|
||||
# a case label, and emit the others as
|
||||
# commented-out case labels.
|
||||
|
||||
list = {}
|
||||
for enum_obj in self.enums[e]:
|
||||
list[ enum_obj.priority() ] = enum_obj.name
|
||||
|
||||
keys = list.keys()
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
j = list[k]
|
||||
if first:
|
||||
print ' case GL_%s:' % (j)
|
||||
first = 0
|
||||
else:
|
||||
print '/* case GL_%s:*/' % (j)
|
||||
|
||||
if c == -1:
|
||||
print ' return __gl%s_variable_size( e );' % (name)
|
||||
else:
|
||||
print ' return %u;' % (c)
|
||||
|
||||
print ' default: return 0;'
|
||||
print ' }'
|
||||
|
||||
|
||||
def Print(self, name):
|
||||
print 'INTERNAL PURE FASTCALL GLint'
|
||||
print '__gl%s_size( GLenum e )' % (name)
|
||||
print '{'
|
||||
|
||||
if not self.PrintUsingTable():
|
||||
self.PrintUsingSwitch(name)
|
||||
|
||||
print '}'
|
||||
print ''
|
||||
|
||||
|
||||
class glx_server_enum_function(glx_enum_function):
|
||||
def __init__(self, func, enum_dict):
|
||||
glx_enum_function.__init__(self, func.name, enum_dict)
|
||||
|
||||
self.function = func
|
||||
return
|
||||
|
||||
|
||||
def signature( self ):
|
||||
if self.sig == None:
|
||||
sig = glx_enum_function.signature(self)
|
||||
|
||||
p = self.function.variable_length_parameter()
|
||||
if p:
|
||||
sig += "%u" % (p.size())
|
||||
|
||||
self.sig = sig
|
||||
|
||||
return self.sig;
|
||||
|
||||
|
||||
def Print(self, name):
|
||||
f = self.context.find_function( self.name )
|
||||
self.context.common_func_print_just_header( f )
|
||||
def Print(self, name, printer):
|
||||
f = self.function
|
||||
printer.common_func_print_just_header( f )
|
||||
|
||||
fixup = []
|
||||
o = 0
|
||||
for p in f.parameterIterator(1, 1):
|
||||
if f.count_parameter_list.count(p.name) or p.name == f.counter:
|
||||
self.context.common_emit_one_arg(p, o, "pc", " ", 0)
|
||||
fixup.append(p.name)
|
||||
|
||||
foo = {}
|
||||
for param_name in f.count_parameter_list:
|
||||
o = f.offset_of( param_name )
|
||||
foo[o] = param_name
|
||||
|
||||
for param_name in f.counter_list:
|
||||
o = f.offset_of( param_name )
|
||||
foo[o] = param_name
|
||||
|
||||
keys = foo.keys()
|
||||
keys.sort()
|
||||
for o in keys:
|
||||
p = f.parameters_by_name[ foo[o] ]
|
||||
|
||||
printer.common_emit_one_arg(p, "pc", " ", 0)
|
||||
fixup.append( p.name )
|
||||
|
||||
o += p.size()
|
||||
|
||||
print ' GLsizei compsize;'
|
||||
print ''
|
||||
|
||||
self.context.common_emit_fixups(fixup)
|
||||
printer.common_emit_fixups(fixup)
|
||||
|
||||
print ''
|
||||
print ' compsize = %s;' % (context.size_call(context, f))
|
||||
print ' compsize = __gl%s_size(%s);' % (f.name, string.join(f.count_parameter_list, ","))
|
||||
p = f.variable_length_parameter()
|
||||
print ' return __GLX_PAD(%s);' % (p.size_string())
|
||||
|
||||
|
@ -130,34 +288,26 @@ class glXServerEnumFunction(glX_XML.glXEnumFunction):
|
|||
print ''
|
||||
|
||||
|
||||
class PrintGlxSizeStubs_common(glX_XML.GlxProto):
|
||||
class PrintGlxSizeStubs_common(gl_XML.gl_print_base):
|
||||
do_get = (1 << 0)
|
||||
do_set = (1 << 1)
|
||||
do_get_alias_set = (1 << 2)
|
||||
|
||||
def __init__(self, which_functions):
|
||||
glX_XML.GlxProto.__init__(self)
|
||||
self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2004", "IBM")
|
||||
self.aliases = []
|
||||
self.glx_enum_sigs = {}
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "glX_proto_size.py (from Mesa)"
|
||||
self.which_functions = which_functions
|
||||
self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2004", "IBM")
|
||||
|
||||
if (((which_functions & PrintGlxSizeStubs_common.do_set) != 0) and ((which_functions & PrintGlxSizeStubs_common.do_get) != 0)) or ((which_functions & PrintGlxSizeStubs_common.do_get_alias_set) != 0):
|
||||
self.get_alias_set = 1
|
||||
else:
|
||||
self.get_alias_set = 0
|
||||
|
||||
|
||||
def functionIterator(self):
|
||||
return SizeStubFunctionIterator(self)
|
||||
self.emit_set = ((which_functions & PrintGlxSizeStubs_common.do_set) != 0)
|
||||
self.emit_get = ((which_functions & PrintGlxSizeStubs_common.do_get) != 0)
|
||||
return
|
||||
|
||||
|
||||
class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common):
|
||||
def printRealHeader(self):
|
||||
print ''
|
||||
print '#include <GL/gl.h>'
|
||||
if self.which_functions & self.do_get:
|
||||
if self.emit_get:
|
||||
print '#include "indirect_size_get.h"'
|
||||
|
||||
print '#include "indirect_size.h"'
|
||||
|
@ -186,20 +336,26 @@ class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common):
|
|||
print ''
|
||||
|
||||
|
||||
def printRealFooter(self):
|
||||
for a in self.aliases:
|
||||
print a
|
||||
def printBody(self, api):
|
||||
enum_sigs = {}
|
||||
aliases = []
|
||||
|
||||
for func in api.functionIterateGlx():
|
||||
ef = glx_enum_function( func.name, api.enums_by_name )
|
||||
if len(ef.enums) == 0:
|
||||
continue
|
||||
|
||||
if (ef.is_set() and self.emit_set) or (not ef.is_set() and self.emit_get):
|
||||
sig = ef.signature()
|
||||
if enum_sigs.has_key( sig ):
|
||||
aliases.append( [func.name, enum_sigs[ sig ]] )
|
||||
else:
|
||||
enum_sigs[ sig ] = func.name
|
||||
ef.Print( func.name )
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
ef = self.glx_enum_functions[f.name]
|
||||
n = self.glx_enum_sigs[ ef.signature() ];
|
||||
|
||||
if n != f.name:
|
||||
a = 'ALIAS( %s, %s )' % (f.name, n)
|
||||
self.aliases.append(a)
|
||||
else:
|
||||
ef.Print( f.name )
|
||||
for [alias_name, real_name] in aliases:
|
||||
print 'ALIAS( %s, %s )' % (alias_name, real_name)
|
||||
|
||||
|
||||
|
||||
|
@ -221,12 +377,17 @@ class PrintGlxSizeStubs_h(PrintGlxSizeStubs_common):
|
|||
print ''
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
ef = self.glx_enum_functions[f.name]
|
||||
print 'extern INTERNAL PURE FASTCALL GLint __gl%s_size(GLenum);' % (f.name)
|
||||
def printBody(self, api):
|
||||
for func in api.functionIterateGlx():
|
||||
ef = glx_enum_function( func.name, api.enums_by_name )
|
||||
if len(ef.enums) == 0:
|
||||
continue
|
||||
|
||||
if (ef.is_set() and self.emit_set) or (not ef.is_set() and self.emit_get):
|
||||
print 'extern INTERNAL PURE FASTCALL GLint __gl%s_size(GLenum);' % (func.name)
|
||||
|
||||
|
||||
class PrintGlxReqSize_common(glX_XML.GlxProto):
|
||||
class PrintGlxReqSize_common(gl_XML.gl_print_base):
|
||||
"""Common base class for PrintGlxSizeReq_h and PrintGlxSizeReq_h.
|
||||
|
||||
The main purpose of this common base class is to provide the infrastructure
|
||||
|
@ -234,33 +395,10 @@ class PrintGlxReqSize_common(glX_XML.GlxProto):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
glX_XML.GlxProto.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "glX_proto_size.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005", "IBM")
|
||||
self.aliases = []
|
||||
self.glx_enum_sigs = {}
|
||||
self.size_functions = []
|
||||
|
||||
|
||||
def endElementNS(self, name, qname):
|
||||
[uri, true_name] = name
|
||||
if true_name == "function":
|
||||
f = self.current_object
|
||||
if f.glx_rop and not f.ignore and f.fn_alias == None and f.vectorequiv == None:
|
||||
|
||||
if self.glx_enum_functions.has_key(f.name) or f.image or f.server_handcode:
|
||||
self.size_functions.append( f )
|
||||
else:
|
||||
for p in f.parameterIterator(1,2):
|
||||
if p.counter and not p.is_output:
|
||||
self.size_functions.append( f )
|
||||
break
|
||||
|
||||
glX_XML.GlxProto.endElementNS(self, name, qname)
|
||||
|
||||
|
||||
def functionIterator(self):
|
||||
return self.size_functions
|
||||
|
||||
|
||||
class PrintGlxReqSize_h(PrintGlxReqSize_common):
|
||||
|
@ -276,8 +414,10 @@ class PrintGlxReqSize_h(PrintGlxReqSize_common):
|
|||
print ''
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
print 'extern PURE HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap);' % (f.name)
|
||||
def printBody(self, api):
|
||||
for func in api.functionIterateGlx():
|
||||
if not func.ignore and func.has_variable_size_request():
|
||||
print 'extern PURE HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap);' % (func.name)
|
||||
|
||||
|
||||
class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
||||
|
@ -286,10 +426,6 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
self.counter_sigs = {}
|
||||
|
||||
|
||||
def createEnumFunction(self, n):
|
||||
return glXServerEnumFunction(n, self)
|
||||
|
||||
|
||||
def printRealHeader(self):
|
||||
print ''
|
||||
print '#include <GL/gl.h>'
|
||||
|
@ -317,38 +453,58 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
print ''
|
||||
|
||||
|
||||
def printRealFooter(self):
|
||||
for a in self.aliases:
|
||||
print a
|
||||
def printBody(self, api):
|
||||
aliases = []
|
||||
enum_functions = {}
|
||||
enum_sigs = {}
|
||||
|
||||
for func in api.functionIterateGlx():
|
||||
if not func.has_variable_size_request(): continue
|
||||
|
||||
ef = glx_server_enum_function( func, api.enums_by_name )
|
||||
if len(ef.enums) == 0: continue
|
||||
|
||||
sig = ef.signature()
|
||||
|
||||
if not enum_functions.has_key(func.name):
|
||||
enum_functions[ func.name ] = sig
|
||||
|
||||
if not enum_sigs.has_key( sig ):
|
||||
enum_sigs[ sig ] = ef
|
||||
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
# Even though server-handcode fuctions are on "the list",
|
||||
# and prototypes are generated for them, there isn't enough
|
||||
# information to generate a size function. If there was
|
||||
# enough information, they probably wouldn't need to be
|
||||
# handcoded in the first place!
|
||||
for func in api.functionIterateGlx():
|
||||
# Even though server-handcode fuctions are on "the
|
||||
# list", and prototypes are generated for them, there
|
||||
# isn't enough information to generate a size
|
||||
# function. If there was enough information, they
|
||||
# probably wouldn't need to be handcoded in the first
|
||||
# place!
|
||||
|
||||
if f.server_handcode: return
|
||||
if func.server_handcode: continue
|
||||
if not func.has_variable_size_request(): continue
|
||||
|
||||
if self.glx_enum_functions.has_key(f.name):
|
||||
ef = self.glx_enum_functions[f.name]
|
||||
if enum_functions.has_key(func.name):
|
||||
sig = enum_functions[func.name]
|
||||
ef = enum_sigs[ sig ]
|
||||
|
||||
sig = ef.signature();
|
||||
if self.glx_enum_sigs.has_key(sig):
|
||||
n = self.glx_enum_sigs[sig];
|
||||
a = 'ALIAS( %s, %s )' % (f.name, n)
|
||||
self.aliases.append(a)
|
||||
else:
|
||||
ef.Print( f.name )
|
||||
self.glx_enum_sigs[sig] = f.name;
|
||||
elif f.image:
|
||||
self.printPixelFunction(f)
|
||||
else:
|
||||
for p in f.parameterIterator(1,2):
|
||||
if p.counter and not p.is_output:
|
||||
self.printCountedFunction(f)
|
||||
break
|
||||
if ef.name != func.name:
|
||||
aliases.append( [func.name, ef.name] )
|
||||
else:
|
||||
ef.Print( func.name, self )
|
||||
|
||||
elif func.images:
|
||||
self.printPixelFunction(func)
|
||||
elif func.has_variable_size_request():
|
||||
a = self.printCountedFunction(func)
|
||||
if a: aliases.append(a)
|
||||
|
||||
|
||||
for [alias_name, real_name] in aliases:
|
||||
print 'ALIAS( %s, %s )' % (alias_name, real_name)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def common_emit_fixups(self, fixup):
|
||||
|
@ -363,9 +519,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
return
|
||||
|
||||
|
||||
def common_emit_one_arg(self, p, offset, pc, indent, adjust):
|
||||
dst = '%s %s' % (p.p_type_string, p.name)
|
||||
src = '(%s *)' % (p.p_type_string)
|
||||
def common_emit_one_arg(self, p, pc, indent, adjust):
|
||||
offset = p.offset
|
||||
dst = p.string()
|
||||
src = '(%s *)' % (p.type_string())
|
||||
print '%s%-18s = *%11s(%s + %u);' % (indent, dst, src, pc, offset + adjust);
|
||||
return
|
||||
|
||||
|
@ -379,10 +536,9 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
def printPixelFunction(self, f):
|
||||
self.common_func_print_just_header(f)
|
||||
|
||||
f.offset_of( f.parameters[0].name )
|
||||
[dim, w, h, d, junk] = f.dimensions()
|
||||
|
||||
offset = f.offset_of_first_parameter()
|
||||
|
||||
print ' GLint row_length = * (GLint *)(pc + 4);'
|
||||
|
||||
if dim < 3:
|
||||
|
@ -398,19 +554,18 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
print ' GLint skip_images = * (GLint *)(pc + 20);'
|
||||
print ' GLint alignment = * (GLint *)(pc + 32);'
|
||||
|
||||
for p in f.parameterIterator(1, 2):
|
||||
if p.name in [w, h, d, f.image.img_format, f.image.img_type, f.image.img_target]:
|
||||
self.common_emit_one_arg(p, offset, "pc", " ", 0 )
|
||||
img = f.images[0]
|
||||
for p in f.parameterIterateGlxSend():
|
||||
if p.name in [w, h, d, img.img_format, img.img_type, img.img_target]:
|
||||
self.common_emit_one_arg( p, "pc", " ", 0 )
|
||||
fixup.append( p.name )
|
||||
|
||||
offset += p.size()
|
||||
|
||||
print ''
|
||||
|
||||
self.common_emit_fixups(fixup)
|
||||
|
||||
print ''
|
||||
print ' return __glXImageSize(%s, %s, %s, %s, %s, %s,' % (f.image.img_format, f.image.img_type, f.image.img_target, w, h, d )
|
||||
print ' return __glXImageSize(%s, %s, %s, %s, %s, %s,' % (img.img_format, img.img_type, img.img_target, w, h, d )
|
||||
print ' image_height, row_length, skip_images,'
|
||||
print ' skip_rows, alignment);'
|
||||
print '}'
|
||||
|
@ -433,38 +588,34 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
# that is being done, calculate a unique signature for this
|
||||
# function.
|
||||
|
||||
for p in f.parameterIterator(1,2):
|
||||
for p in f.parameterIterateGlxSend():
|
||||
if p.is_counter:
|
||||
param_offsets[ p.name ] = offset
|
||||
fixup.append( p.name )
|
||||
params.append( [p, offset] )
|
||||
params.append( p )
|
||||
elif p.counter:
|
||||
s = p.p_type.size
|
||||
s = p.size()
|
||||
if s == 0: s = 1
|
||||
|
||||
sig += "(%u,%u)" % (param_offsets[p.counter], s)
|
||||
sig += "(%u,%u)" % (f.offset_of(p.counter), s)
|
||||
size += '%s%s' % (plus, p.size_string())
|
||||
plus = ' + '
|
||||
|
||||
|
||||
offset += p.size()
|
||||
|
||||
|
||||
# If the calculated signature matches a function that has
|
||||
# already be emitted, don't emit this function. Instead, add
|
||||
# it to the list of function aliases.
|
||||
|
||||
if self.counter_sigs.has_key(sig):
|
||||
n = self.counter_sigs[sig];
|
||||
a = 'ALIAS( %s, %s )' % (f.name, n)
|
||||
self.aliases.append(a)
|
||||
alias = [f.name, n]
|
||||
else:
|
||||
alias = None
|
||||
self.counter_sigs[sig] = f.name
|
||||
|
||||
self.common_func_print_just_header(f)
|
||||
|
||||
for [p, offset] in params:
|
||||
self.common_emit_one_arg(p, offset, "pc", " ", 0 )
|
||||
for p in params:
|
||||
self.common_emit_one_arg(p, "pc", " ", 0 )
|
||||
|
||||
|
||||
print ''
|
||||
|
@ -475,7 +626,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
|
|||
print '}'
|
||||
print ''
|
||||
|
||||
return
|
||||
return alias
|
||||
|
||||
|
||||
def show_usage():
|
||||
|
@ -494,7 +645,7 @@ if __name__ == '__main__':
|
|||
file_name = "gl_API.xml"
|
||||
|
||||
try:
|
||||
(args, trail) = getopt.getopt(sys.argv[1:], "f:m:h:", ["only-get", "only-set", "get-alias-set", "header-tag"])
|
||||
(args, trail) = getopt.getopt(sys.argv[1:], "f:m:h:", ["only-get", "only-set", "header-tag"])
|
||||
except Exception,e:
|
||||
show_usage()
|
||||
|
||||
|
@ -511,22 +662,23 @@ if __name__ == '__main__':
|
|||
which_functions = PrintGlxSizeStubs_common.do_get
|
||||
elif arg == "--only-set":
|
||||
which_functions = PrintGlxSizeStubs_common.do_set
|
||||
elif arg == "--get-alias-set":
|
||||
which_functions |= PrintGlxSizeStubs_common.do_get_alias_set
|
||||
elif (arg == '-h') or (arg == "--header-tag"):
|
||||
header_tag = val
|
||||
|
||||
if mode == "size_c":
|
||||
dh = PrintGlxSizeStubs_c( which_functions )
|
||||
printer = PrintGlxSizeStubs_c( which_functions )
|
||||
elif mode == "size_h":
|
||||
dh = PrintGlxSizeStubs_h( which_functions )
|
||||
printer = PrintGlxSizeStubs_h( which_functions )
|
||||
if header_tag:
|
||||
dh.header_tag = header_tag
|
||||
printer.header_tag = header_tag
|
||||
elif mode == "reqsize_c":
|
||||
dh = PrintGlxReqSize_c()
|
||||
printer = PrintGlxReqSize_c()
|
||||
elif mode == "reqsize_h":
|
||||
dh = PrintGlxReqSize_h()
|
||||
printer = PrintGlxReqSize_h()
|
||||
else:
|
||||
show_usage()
|
||||
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name, glX_XML.glx_item_factory() )
|
||||
|
||||
|
||||
printer.Print( api )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!ELEMENT OpenGLAPI (category+)>
|
||||
<!ELEMENT OpenGLAPI (category?, xi:include?, OpenGLAPI?)+>
|
||||
<!ELEMENT category (type*, enum*, function*)*>
|
||||
<!ELEMENT type EMPTY>
|
||||
<!ELEMENT enum (size*)>
|
||||
|
@ -8,10 +8,24 @@
|
|||
<!ELEMENT return EMPTY>
|
||||
<!ELEMENT glx EMPTY>
|
||||
|
||||
<!ELEMENT xi:include (xi:fallback)?>
|
||||
<!ATTLIST xi:include
|
||||
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
|
||||
href CDATA #REQUIRED
|
||||
parse (xml|text) "xml"
|
||||
encoding CDATA #IMPLIED>
|
||||
<!ELEMENT xi:fallback ANY>
|
||||
<!ATTLIST xi:fallback
|
||||
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude">
|
||||
|
||||
|
||||
<!ATTLIST category name NMTOKEN #REQUIRED
|
||||
number NMTOKEN #IMPLIED>
|
||||
number NMTOKEN #IMPLIED
|
||||
window_system NMTOKEN #IMPLIED>
|
||||
<!ATTLIST type name NMTOKEN #REQUIRED
|
||||
size NMTOKEN #REQUIRED
|
||||
float (true | false) "false"
|
||||
unsigned (true | false) "false"
|
||||
glx_name NMTOKEN #IMPLIED>
|
||||
<!ATTLIST enum name NMTOKEN #REQUIRED
|
||||
count CDATA #IMPLIED
|
||||
|
|
|
@ -1078,26 +1078,26 @@
|
|||
<enum name="SCISSOR_BIT" value="0x00080000"/>
|
||||
<enum name="ALL_ATTRIB_BITS" value="0x000FFFFF"/>
|
||||
|
||||
<type name="double" size="8" glx_name="FLOAT64"/>
|
||||
<type name="clampd" size="8" glx_name="FLOAT64"/>
|
||||
<type name="double" size="8" float="true" glx_name="FLOAT64"/>
|
||||
<type name="clampd" size="8" float="true" glx_name="FLOAT64"/>
|
||||
|
||||
<type name="float" size="4" glx_name="FLOAT32"/>
|
||||
<type name="clampf" size="4" glx_name="FLOAT32"/>
|
||||
<type name="float" size="4" float="true" glx_name="FLOAT32"/>
|
||||
<type name="clampf" size="4" float="true" glx_name="FLOAT32"/>
|
||||
|
||||
<type name="int" size="4" glx_name="CARD32"/>
|
||||
<type name="uint" size="4" glx_name="CARD32"/>
|
||||
<type name="sizei" size="4" glx_name="CARD32"/>
|
||||
<type name="enum" size="4" glx_name="ENUM"/>
|
||||
<type name="bitfield" size="4" glx_name="CARD32"/>
|
||||
<type name="int" size="4" glx_name="CARD32"/>
|
||||
<type name="uint" size="4" unsigned="true" glx_name="CARD32"/>
|
||||
<type name="sizei" size="4" unsigned="true" glx_name="CARD32"/>
|
||||
<type name="enum" size="4" unsigned="true" glx_name="ENUM"/>
|
||||
<type name="bitfield" size="4" unsigned="true" glx_name="CARD32"/>
|
||||
|
||||
<type name="short" size="2" glx_name="CARD16"/>
|
||||
<type name="ushort" size="2" glx_name="CARD16"/>
|
||||
<type name="short" size="2" glx_name="CARD16"/>
|
||||
<type name="ushort" size="2" unsigned="true" glx_name="CARD16"/>
|
||||
|
||||
<type name="byte" size="1" glx_name="CARD8"/>
|
||||
<type name="ubyte" size="1" glx_name="CARD8"/>
|
||||
<type name="boolean" size="1" glx_name="CARD8"/>
|
||||
<type name="byte" size="1" glx_name="CARD8"/>
|
||||
<type name="ubyte" size="1" unsigned="true" glx_name="CARD8"/>
|
||||
<type name="boolean" size="1" unsigned="true" glx_name="CARD8"/>
|
||||
|
||||
<type name="void" size="0"/>
|
||||
<type name="void" size="1"/>
|
||||
|
||||
<function name="NewList" offset="0">
|
||||
<param name="list" type="GLuint"/>
|
||||
|
@ -4909,8 +4909,8 @@
|
|||
<enum name="SRC1_ALPHA" value="0x8589"/>
|
||||
<enum name="SRC2_ALPHA" value="0x858A"/>
|
||||
|
||||
<type name="intptr" size="4" glx_name="CARD32"/>
|
||||
<type name="sizeiptr" size="4" glx_name="CARD32"/>
|
||||
<type name="intptr" size="4" glx_name="CARD32"/>
|
||||
<type name="sizeiptr" size="4" unsigned="true" glx_name="CARD32"/>
|
||||
|
||||
<function name="BindBuffer" alias="BindBufferARB">
|
||||
<param name="target" type="GLenum"/>
|
||||
|
@ -6622,8 +6622,8 @@
|
|||
<enum name="DYNAMIC_READ_ARB" value="0x88E9"/>
|
||||
<enum name="DYNAMIC_COPY_ARB" value="0x88EA"/>
|
||||
|
||||
<type name="intptrARB" size="4"/>
|
||||
<type name="sizeiptrARB" size="4"/>
|
||||
<type name="intptrARB" size="4"/>
|
||||
<type name="sizeiptrARB" unsigned="true" size="4"/>
|
||||
|
||||
<function name="BindBufferARB" offset="688">
|
||||
<param name="target" type="GLenum"/>
|
||||
|
@ -11378,158 +11378,7 @@
|
|||
<enum name="MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB" count="1" value="0x8B4C"/>
|
||||
</category>
|
||||
|
||||
<category name="GL_EXT_framebuffer_object" number="310">
|
||||
<enum name="FRAMEBUFFER_EXT" value="0x8D40"/>
|
||||
<enum name="RENDERBUFFER_EXT" value="0x8D41"/>
|
||||
<enum name="STENCIL_INDEX_EXT" value="0x8D45"/>
|
||||
<enum name="STENCIL_INDEX1_EXT" value="0x8D46"/>
|
||||
<enum name="STENCIL_INDEX4_EXT" value="0x8D47"/>
|
||||
<enum name="STENCIL_INDEX8_EXT" value="0x8D48"/>
|
||||
<enum name="STENCIL_INDEX16_EXT" value="0x8D49"/>
|
||||
<enum name="RENDERBUFFER_WIDTH_EXT" value="0x8D42"/>
|
||||
<enum name="RENDERBUFFER_HEIGHT_EXT" value="0x8D43"/>
|
||||
<enum name="RENDERBUFFER_INTERNAL_FORMAT_EXT" value="0x8D44"/>
|
||||
<enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT" value="0x8CD0"/>
|
||||
<enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT" value="0x8CD1"/>
|
||||
<enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT" value="0x8CD2"/>
|
||||
<enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT" value="0x8CD3"/>
|
||||
<enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT" value="0x8CD4"/>
|
||||
<enum name="COLOR_ATTACHMENT0_EXT" value="0x8CE0"/>
|
||||
<enum name="COLOR_ATTACHMENT1_EXT" value="0x8CE1"/>
|
||||
<enum name="COLOR_ATTACHMENT2_EXT" value="0x8CE2"/>
|
||||
<enum name="COLOR_ATTACHMENT3_EXT" value="0x8CE3"/>
|
||||
<enum name="COLOR_ATTACHMENT4_EXT" value="0x8CE4"/>
|
||||
<enum name="COLOR_ATTACHMENT5_EXT" value="0x8CE5"/>
|
||||
<enum name="COLOR_ATTACHMENT6_EXT" value="0x8CE6"/>
|
||||
<enum name="COLOR_ATTACHMENT7_EXT" value="0x8CE7"/>
|
||||
<enum name="COLOR_ATTACHMENT8_EXT" value="0x8CE8"/>
|
||||
<enum name="COLOR_ATTACHMENT9_EXT" value="0x8CE9"/>
|
||||
<enum name="COLOR_ATTACHMENT10_EXT" value="0x8CEA"/>
|
||||
<enum name="COLOR_ATTACHMENT11_EXT" value="0x8CEB"/>
|
||||
<enum name="COLOR_ATTACHMENT12_EXT" value="0x8CEC"/>
|
||||
<enum name="COLOR_ATTACHMENT13_EXT" value="0x8CED"/>
|
||||
<enum name="COLOR_ATTACHMENT14_EXT" value="0x8CEE"/>
|
||||
<enum name="COLOR_ATTACHMENT15_EXT" value="0x8CEF"/>
|
||||
<enum name="DEPTH_ATTACHMENT_EXT" value="0x8D00"/>
|
||||
<enum name="STENCIL_ATTACHMENT_EXT" value="0x8D20"/>
|
||||
<enum name="FRAMEBUFFER_COMPLETE_EXT" value="0x8CD5"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT" value="0x8CD6"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT" value="0x8CD7"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT" value="0x8CD8"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT" value="0x8CD9"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_FORMATS_EXT" value="0x8CDA"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" value="0x8CDB"/>
|
||||
<enum name="FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" value="0x8CDC"/>
|
||||
<enum name="FRAMEBUFFER_UNSUPPORTED_EXT" value="0x8CDD"/>
|
||||
<enum name="FRAMEBUFFER_STATUS_ERROR_EXT" value="0x8CDE"/>
|
||||
<enum name="FRAMEBUFFER_BINDING_EXT" value="0x8CA6"/>
|
||||
<enum name="RENDERBUFFER_BINDING_EXT" value="0x8CA7"/>
|
||||
<enum name="MAX_COLOR_ATTACHMENTS_EXT" value="0x8CDF"/>
|
||||
<enum name="MAX_RENDERBUFFER_SIZE_EXT" value="0x84E8"/>
|
||||
<enum name="INVALID_FRAMEBUFFER_OPERATION_EXT" value="0x0506"/>
|
||||
|
||||
<function name="IsRenderbufferEXT" offset="796">
|
||||
<param name="renderbuffer" type="GLuint"/>
|
||||
<return type="GLboolean"/>
|
||||
</function>
|
||||
|
||||
<function name="BindRenderbufferEXT" offset="797">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="renderbuffer" type="GLuint"/>
|
||||
</function>
|
||||
|
||||
<function name="DeleteRenderbuffersEXT" offset="798">
|
||||
<param name="n" type="GLsizei"/>
|
||||
<param name="renderbuffers" type="const GLuint *"/>
|
||||
</function>
|
||||
|
||||
<function name="GenRenderbuffersEXT" offset="799">
|
||||
<param name="n" type="GLsizei"/>
|
||||
<param name="renderbuffers" type="GLuint *"/>
|
||||
</function>
|
||||
|
||||
<function name="RenderbufferStorageEXT" offset="800">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="internalformat" type="GLenum"/>
|
||||
<param name="width" type="GLsizei"/>
|
||||
<param name="height" type="GLsizei"/>
|
||||
</function>
|
||||
|
||||
<function name="GetRenderbufferParameterivEXT" offset="801">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="pname" type="GLenum"/>
|
||||
<param name="params" type="GLint *"/>
|
||||
</function>
|
||||
|
||||
<function name="IsFramebufferEXT" offset="802">
|
||||
<param name="framebuffer" type="GLuint"/>
|
||||
<return type="GLboolean"/>
|
||||
</function>
|
||||
|
||||
<function name="BindFramebufferEXT" offset="803">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="framebuffer" type="GLuint"/>
|
||||
</function>
|
||||
|
||||
<function name="DeleteFramebuffersEXT" offset="804">
|
||||
<param name="n" type="GLsizei"/>
|
||||
<param name="framebuffers" type="const GLuint *"/>
|
||||
</function>
|
||||
|
||||
<function name="GenFramebuffersEXT" offset="805">
|
||||
<param name="n" type="GLsizei"/>
|
||||
<param name="framebuffers" type="GLuint *"/>
|
||||
</function>
|
||||
|
||||
<function name="CheckFramebufferStatusEXT" offset="806">
|
||||
<param name="target" type="GLenum"/>
|
||||
<return type="GLenum"/>
|
||||
</function>
|
||||
|
||||
<function name="FramebufferTexture1DEXT" offset="807">
|
||||
<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"/>
|
||||
</function>
|
||||
|
||||
<function name="FramebufferTexture2DEXT" offset="808">
|
||||
<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"/>
|
||||
</function>
|
||||
|
||||
<function name="FramebufferTexture3DEXT" offset="809">
|
||||
<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"/>
|
||||
</function>
|
||||
|
||||
<function name="FramebufferRenderbufferEXT" offset="810">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="attachment" type="GLenum"/>
|
||||
<param name="renderbuffertarget" type="GLenum"/>
|
||||
<param name="renderbuffer" type="GLuint"/>
|
||||
</function>
|
||||
|
||||
<function name="GetFramebufferAttachmentParameterivEXT" offset="811">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="attachment" type="GLenum"/>
|
||||
<param name="pname" type="GLenum"/>
|
||||
<param name="params" type="GLint *"/>
|
||||
</function>
|
||||
|
||||
<function name="GenerateMipmapEXT" offset="812">
|
||||
<param name="target" type="GLenum"/>
|
||||
</function>
|
||||
</category>
|
||||
|
||||
<xi:include href="EXT_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<!-- Extension number 307 is a GLX extension. -->
|
||||
<!-- Extension number 308 is a GLX extension. -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004
|
||||
# All Rights Reserved.
|
||||
|
@ -25,15 +25,13 @@
|
|||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import gl_XML
|
||||
import license
|
||||
import gl_XML, license
|
||||
import sys, getopt
|
||||
|
||||
class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_SPARC_asm.py (from Mesa)"
|
||||
|
||||
class PrintGenericStubs(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
self.name = "gl_SPARC_asm.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
|
@ -68,6 +66,8 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
|||
print '\tnop'
|
||||
print '#endif'
|
||||
print ''
|
||||
print '#define GL_STUB_ALIAS(fn,alias) GLOBL_FN(fn) ; fn = alias'
|
||||
print ''
|
||||
print '.text'
|
||||
print '.align 32'
|
||||
print 'GLOBL_FN(__glapi_sparc_icache_flush)'
|
||||
|
@ -79,20 +79,30 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
|||
print '.data'
|
||||
print '.align 64'
|
||||
print ''
|
||||
return
|
||||
|
||||
|
||||
def printBody(self, api):
|
||||
print 'GLOBL_FN(_mesa_sparc_glapi_begin)'
|
||||
print '_mesa_sparc_glapi_begin:'
|
||||
print ''
|
||||
return
|
||||
|
||||
def printRealFooter(self):
|
||||
for f in api.functionIterateByOffset():
|
||||
print '\tGL_STUB(gl%s, _gloffset_%s)' % (f.name, f.name)
|
||||
|
||||
print ''
|
||||
print 'GLOBL_FN(_mesa_sparc_glapi_end)'
|
||||
print '_mesa_sparc_glapi_end:'
|
||||
print ''
|
||||
|
||||
|
||||
for f in api.functionIterateByOffset():
|
||||
for n in f.entry_points:
|
||||
if n != f.name:
|
||||
print '\tGL_STUB_ALIAS(gl%s, gl%s)' % (n, f.name)
|
||||
|
||||
return
|
||||
|
||||
def printFunction(self, f):
|
||||
print '\tGL_STUB(gl%s, _gloffset_%s)' % (f.name, f.real_name)
|
||||
return
|
||||
|
||||
def show_usage():
|
||||
print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0]
|
||||
|
@ -114,9 +124,11 @@ if __name__ == '__main__':
|
|||
file_name = val
|
||||
|
||||
if mode == "generic":
|
||||
dh = PrintGenericStubs()
|
||||
printer = PrintGenericStubs()
|
||||
else:
|
||||
print "ERROR: Invalid mode \"%s\" specified." % mode
|
||||
show_usage()
|
||||
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer.Print( api )
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
@ -29,54 +29,57 @@ import gl_XML
|
|||
import license
|
||||
import sys, getopt
|
||||
|
||||
class PrintGlOffsets(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_apitemp.py (from Mesa)"
|
||||
|
||||
class PrintGlOffsets(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "gl_apitemp.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
|
||||
def printFunction(self, f):
|
||||
self.undef_list.append( "KEYWORD1" )
|
||||
self.undef_list.append( "KEYWORD2" )
|
||||
self.undef_list.append( "NAME" )
|
||||
self.undef_list.append( "DISPATCH" )
|
||||
self.undef_list.append( "RETURN_DISPATCH" )
|
||||
self.undef_list.append( "DISPATCH_TABLE_NAME" )
|
||||
self.undef_list.append( "UNUSED_TABLE_NAME" )
|
||||
self.undef_list.append( "TABLE_ENTRY" )
|
||||
|
||||
|
||||
def printFunction(self, f, name):
|
||||
p_string = ""
|
||||
o_string = ""
|
||||
t_string = ""
|
||||
comma = ""
|
||||
|
||||
for p in f.parameterIterator():
|
||||
cast = ""
|
||||
|
||||
if p.is_pointer:
|
||||
t = "%p"
|
||||
if p.is_pointer():
|
||||
cast = "(const void *) "
|
||||
elif p.p_type_string == 'GLenum':
|
||||
t = "0x%x"
|
||||
elif p.p_type_string in ['GLfloat', 'GLdouble', 'GLclampf', 'GLclampd']:
|
||||
t = "%f"
|
||||
else:
|
||||
t = "%d"
|
||||
cast = ""
|
||||
|
||||
t_string = t_string + comma + t
|
||||
t_string = t_string + comma + p.format_string()
|
||||
p_string = p_string + comma + p.name
|
||||
o_string = o_string + comma + cast + p.name
|
||||
comma = ", "
|
||||
|
||||
|
||||
if f.fn_return_type != 'void':
|
||||
if f.return_type != 'void':
|
||||
dispatch = "RETURN_DISPATCH"
|
||||
else:
|
||||
dispatch = "DISPATCH"
|
||||
|
||||
print 'KEYWORD1 %s KEYWORD2 NAME(%s)(%s)' \
|
||||
% (f.fn_return_type, f.name, f.get_parameter_string())
|
||||
% (f.return_type, name, f.get_parameter_string())
|
||||
print '{'
|
||||
if p_string == "":
|
||||
print ' %s(%s, (), (F, "gl%s();\\n"));' \
|
||||
% (dispatch, f.real_name, f.name)
|
||||
% (dispatch, f.name, name)
|
||||
else:
|
||||
print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
|
||||
% (dispatch, f.real_name, p_string, f.name, t_string, o_string)
|
||||
% (dispatch, f.name, p_string, name, t_string, o_string)
|
||||
print '}'
|
||||
print ''
|
||||
return
|
||||
|
@ -130,7 +133,7 @@ class PrintGlOffsets(gl_XML.FilterGLAPISpecBase):
|
|||
|
||||
|
||||
|
||||
def printInitDispatch(self):
|
||||
def printInitDispatch(self, api):
|
||||
print """
|
||||
#endif /* defined( NAME ) */
|
||||
|
||||
|
@ -145,9 +148,7 @@ class PrintGlOffsets(gl_XML.FilterGLAPISpecBase):
|
|||
#endif
|
||||
|
||||
static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
|
||||
for f in self.functionIterator():
|
||||
if f.fn_offset < 0: continue
|
||||
|
||||
for f in api.functionIterateByOffset():
|
||||
print ' TABLE_ENTRY(%s),' % (f.name)
|
||||
|
||||
print ' /* A whole bunch of no-op functions. These might be called'
|
||||
|
@ -162,7 +163,8 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
|
|||
print ''
|
||||
return
|
||||
|
||||
def printAliasedTable(self):
|
||||
|
||||
def printAliasedTable(self, api):
|
||||
print """
|
||||
/*
|
||||
* This is just used to silence compiler warnings.
|
||||
|
@ -171,30 +173,27 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
|
|||
#ifdef UNUSED_TABLE_NAME
|
||||
static _glapi_proc UNUSED_TABLE_NAME[] = {"""
|
||||
|
||||
for f in self.functionIterator():
|
||||
if f.fn_offset < 0:
|
||||
print ' TABLE_ENTRY(%s),' % (f.name)
|
||||
for f in api.functionIterateByOffset():
|
||||
for n in f.entry_points:
|
||||
if n != f.name:
|
||||
print ' TABLE_ENTRY(%s),' % (n)
|
||||
|
||||
print '};'
|
||||
print '#endif /*UNUSED_TABLE_NAME*/'
|
||||
print ''
|
||||
return
|
||||
|
||||
def printRealFooter(self):
|
||||
self.printInitDispatch()
|
||||
self.printAliasedTable()
|
||||
print"""
|
||||
#undef KEYWORD1
|
||||
#undef KEYWORD2
|
||||
#undef NAME
|
||||
#undef DISPATCH
|
||||
#undef RETURN_DISPATCH
|
||||
#undef DISPATCH_TABLE_NAME
|
||||
#undef UNUSED_TABLE_NAME
|
||||
#undef TABLE_ENTRY
|
||||
"""
|
||||
|
||||
def printBody(self, api):
|
||||
for func in api.functionIterateByOffset():
|
||||
for n in func.entry_points:
|
||||
self.printFunction( func, n )
|
||||
|
||||
self.printInitDispatch(api)
|
||||
self.printAliasedTable(api)
|
||||
return
|
||||
|
||||
|
||||
def show_usage():
|
||||
print "Usage: %s [-f input_file_name]" % sys.argv[0]
|
||||
sys.exit(1)
|
||||
|
@ -211,5 +210,7 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintGlOffsets()
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer = PrintGlOffsets()
|
||||
printer.Print(api)
|
||||
|
|
|
@ -30,10 +30,10 @@ import license
|
|||
import gl_XML
|
||||
import sys, getopt
|
||||
|
||||
class PrintGlEnums(gl_XML.FilterGLAPISpecBase):
|
||||
class PrintGlEnums(gl_XML.gl_print_base):
|
||||
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "gl_enums.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
|
@ -53,7 +53,7 @@ class PrintGlEnums(gl_XML.FilterGLAPISpecBase):
|
|||
print ''
|
||||
return
|
||||
|
||||
def printBody(self):
|
||||
def print_code(self):
|
||||
print """
|
||||
#define Elements(x) sizeof(x)/sizeof(*x)
|
||||
|
||||
|
@ -124,7 +124,10 @@ int _mesa_lookup_enum_by_name( const char *symbol )
|
|||
"""
|
||||
return
|
||||
|
||||
def printFunctions(self):
|
||||
|
||||
def printBody(self, api):
|
||||
self.process_enums( api )
|
||||
|
||||
keys = self.enum_table.keys()
|
||||
keys.sort()
|
||||
|
||||
|
@ -175,50 +178,21 @@ int _mesa_lookup_enum_by_name( const char *symbol )
|
|||
print '};'
|
||||
|
||||
|
||||
self.printBody();
|
||||
self.print_code()
|
||||
return
|
||||
|
||||
|
||||
def append(self, object_type, obj):
|
||||
if object_type == "enum":
|
||||
def process_enums(self, api):
|
||||
self.enum_table = {}
|
||||
|
||||
for obj in api.enumIterateByName():
|
||||
if obj.value not in self.enum_table:
|
||||
self.enum_table[ obj.value ] = []
|
||||
|
||||
|
||||
# Prevent duplicate names in the enum table.
|
||||
|
||||
found_it = 0
|
||||
for [n, junk] in self.enum_table[ obj.value ]:
|
||||
if n == obj.name:
|
||||
found_it = 1
|
||||
break
|
||||
|
||||
if not found_it:
|
||||
|
||||
# Calculate a "priority" for this enum name.
|
||||
# When we lookup an enum by number, there may
|
||||
# be many possible names, but only one can be
|
||||
# returned. The priority is used by this
|
||||
# script to select which name is the "best".
|
||||
#
|
||||
# Highest precedence is given to "core" name.
|
||||
# ARB extension names have the next highest,
|
||||
# followed by EXT extension names. Vendor
|
||||
# extension names are the lowest.
|
||||
|
||||
if obj.category.startswith( "GL_VERSION_" ):
|
||||
priority = 0
|
||||
elif obj.category.startswith( "GL_ARB_" ):
|
||||
priority = 1
|
||||
elif obj.category.startswith( "GL_EXT_" ):
|
||||
priority = 2
|
||||
else:
|
||||
priority = 3
|
||||
|
||||
self.enum_table[ obj.value ].append( [obj.name, priority] )
|
||||
|
||||
else:
|
||||
gl_XML.FilterGLAPISpecBase.append(self, object_type, obj)
|
||||
name = "GL_" + obj.name
|
||||
priority = obj.priority()
|
||||
self.enum_table[ obj.value ].append( [name, priority] )
|
||||
|
||||
|
||||
def show_usage():
|
||||
|
@ -237,5 +211,7 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintGlEnums()
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer = PrintGlEnums()
|
||||
printer.Print( api )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
@ -29,19 +29,20 @@ import gl_XML
|
|||
import license
|
||||
import sys, getopt
|
||||
|
||||
class PrintGlOffsets(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_offsets.py (from Mesa)"
|
||||
|
||||
class PrintGlOffsets(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "gl_offsets.py (from Mesa)"
|
||||
self.header_tag = '_GLAPI_OFFSETS_H_'
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
return
|
||||
|
||||
def printFunction(self, f):
|
||||
if f.fn_offset < 0: return
|
||||
print '#define _gloffset_%s %d' % (f.name, f.fn_offset)
|
||||
def printBody(self, api):
|
||||
for f in api.functionIterateByOffset():
|
||||
print '#define _gloffset_%s %d' % (f.name, f.offset)
|
||||
|
||||
|
||||
def show_usage():
|
||||
|
@ -60,5 +61,7 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintGlOffsets()
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer = PrintGlOffsets()
|
||||
printer.Print( api )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
@ -29,12 +29,12 @@ import license
|
|||
import gl_XML
|
||||
import sys, getopt
|
||||
|
||||
class PrintGlProcs(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_procs.py (from Mesa)"
|
||||
|
||||
class PrintGlProcs(gl_XML.gl_print_base):
|
||||
def __init__(self, long_strings):
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.long_strings = long_strings
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
self.name = "gl_procs.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
|
@ -66,29 +66,43 @@ class PrintGlProcs(gl_XML.FilterGLAPISpecBase):
|
|||
print '#undef NAME_FUNC_OFFSET'
|
||||
return
|
||||
|
||||
def printFunctionString(self, f):
|
||||
def printFunctionString(self, name):
|
||||
if self.long_strings:
|
||||
print ' "gl%s\\0"' % (f.name)
|
||||
print ' "gl%s\\0"' % (name)
|
||||
else:
|
||||
print " 'g','l',",
|
||||
for c in f.name:
|
||||
for c in name:
|
||||
print "'%s'," % (c),
|
||||
|
||||
print "'\\0',"
|
||||
|
||||
def printFunctionOffset(self, f, offset_of_name):
|
||||
print ' NAME_FUNC_OFFSET( % 5u, gl%s, _gloffset_%s ),' % (offset_of_name, f.name, f.real_name)
|
||||
|
||||
|
||||
def printFunctions(self):
|
||||
def printBody(self, api):
|
||||
print ''
|
||||
if self.long_strings:
|
||||
print 'static const char gl_string_table[] ='
|
||||
else:
|
||||
print 'static const char gl_string_table[] = {'
|
||||
|
||||
for f in self.functionIterator():
|
||||
self.printFunctionString(f)
|
||||
base_offset = 0
|
||||
table = []
|
||||
for func in api.functionIterateByOffset():
|
||||
self.printFunctionString( func.name )
|
||||
table.append((base_offset, func.name, func.name))
|
||||
|
||||
# The length of the function's name, plus 2 for "gl",
|
||||
# plus 1 for the NUL.
|
||||
|
||||
base_offset += len(func.name) + 3
|
||||
|
||||
|
||||
for func in api.functionIterateByOffset():
|
||||
for n in func.entry_points:
|
||||
if n != func.name:
|
||||
self.printFunctionString( n )
|
||||
table.append((base_offset, n, func.name))
|
||||
base_offset += len(n) + 3
|
||||
|
||||
|
||||
if self.long_strings:
|
||||
print ' ;'
|
||||
|
@ -98,15 +112,8 @@ class PrintGlProcs(gl_XML.FilterGLAPISpecBase):
|
|||
print ''
|
||||
print 'static const glprocs_table_t static_functions[] = {'
|
||||
|
||||
base_offset = 0
|
||||
|
||||
for f in self.functionIterator():
|
||||
self.printFunctionOffset(f, base_offset)
|
||||
|
||||
# The length of the function's name, plus 2 for "gl",
|
||||
# plus 1 for the NUL.
|
||||
|
||||
base_offset += len(f.name) + 3
|
||||
for (offset, disp_name, real_name) in table:
|
||||
print ' NAME_FUNC_OFFSET( % 5u, gl%s, _gloffset_%s ),' % (offset, disp_name, real_name)
|
||||
|
||||
print ' NAME_FUNC_OFFSET( -1, NULL, 0 )'
|
||||
print '};'
|
||||
|
@ -142,5 +149,7 @@ if __name__ == '__main__':
|
|||
else:
|
||||
show_usage()
|
||||
|
||||
dh = PrintGlProcs( long_string )
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer = PrintGlProcs( long_string )
|
||||
printer.Print( api )
|
||||
|
|
|
@ -29,23 +29,23 @@ import gl_XML
|
|||
import license
|
||||
import sys, getopt
|
||||
|
||||
class PrintGlTable(gl_XML.FilterGLAPISpecBase):
|
||||
class PrintGlTable(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.header_tag = '_GLAPI_TABLE_H_'
|
||||
self.name = "gl_table.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
return
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
if f.fn_offset < 0: return
|
||||
def printBody(self, api):
|
||||
for f in api.functionIterateByOffset():
|
||||
arg_string = f.get_parameter_string()
|
||||
print ' %s (GLAPIENTRYP %s)(%s); /* %d */' % (f.return_type, f.name, arg_string, f.offset)
|
||||
|
||||
arg_string = f.get_parameter_string()
|
||||
print ' %s (GLAPIENTRYP %s)(%s); /* %d */' % \
|
||||
(f.fn_return_type, f.name, arg_string, f.fn_offset)
|
||||
|
||||
def printRealHeader(self):
|
||||
print '#ifndef GLAPIENTRYP'
|
||||
|
@ -56,6 +56,7 @@ class PrintGlTable(gl_XML.FilterGLAPISpecBase):
|
|||
print '{'
|
||||
return
|
||||
|
||||
|
||||
def printRealFooter(self):
|
||||
print '};'
|
||||
return
|
||||
|
@ -77,5 +78,7 @@ if __name__ == '__main__':
|
|||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintGlTable()
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer = PrintGlTable()
|
||||
printer.Print( api )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2004, 2005
|
||||
# All Rights Reserved.
|
||||
|
@ -25,32 +25,29 @@
|
|||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import gl_XML
|
||||
import license
|
||||
import gl_XML, license
|
||||
import sys, getopt
|
||||
|
||||
class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_x86_asm.py (from Mesa)"
|
||||
class PrintGenericStubs(gl_XML.gl_print_base):
|
||||
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "gl_x86_asm.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004, 2005""", "BRIAN PAUL, IBM")
|
||||
return
|
||||
|
||||
|
||||
def get_stack_size(self, f):
|
||||
size = 0
|
||||
for p in f.parameterIterator():
|
||||
t = p.p_type
|
||||
|
||||
if p.is_array() or t.size != 8:
|
||||
size += 4
|
||||
else:
|
||||
size += 8
|
||||
size += p.get_stack_size()
|
||||
|
||||
return size
|
||||
|
||||
|
||||
def printRealHeader(self):
|
||||
print '#include "assyntax.h"'
|
||||
print '#include "glapioffsets.h"'
|
||||
|
@ -183,6 +180,7 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
|||
print ''
|
||||
return
|
||||
|
||||
|
||||
def printRealFooter(self):
|
||||
print ''
|
||||
print '\t\tGLOBL\tGLNAME(gl_dispatch_functions_end)'
|
||||
|
@ -206,16 +204,24 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
|
|||
print '#endif /* __WIN32__ */'
|
||||
return
|
||||
|
||||
def printFunction(self, f):
|
||||
stack = self.get_stack_size(f)
|
||||
|
||||
alt = "%s@%u" % (f.name, stack)
|
||||
if f.fn_alias == None:
|
||||
print '\tGL_STUB(%s, _gloffset_%s, %s)' % (f.name, f.real_name, alt)
|
||||
else:
|
||||
alias_alt = "%s@%u" % (f.real_name, stack)
|
||||
print '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % \
|
||||
(f.name, f.real_name, alt, f.real_name, alias_alt)
|
||||
def printBody(self, api):
|
||||
for f in api.functionIterateByOffset():
|
||||
stack = self.get_stack_size(f)
|
||||
|
||||
alt = "%s@%u" % (f.name, stack)
|
||||
print '\tGL_STUB(%s, _gloffset_%s, %s)' % (f.name, f.name, alt)
|
||||
|
||||
for f in api.functionIterateByOffset():
|
||||
stack = self.get_stack_size(f)
|
||||
|
||||
alt = "%s@%u" % (f.name, stack)
|
||||
|
||||
for n in f.entry_points:
|
||||
if n != f.name:
|
||||
alt2 = "%s@%u" % (n, stack)
|
||||
print '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, f.name, alt)
|
||||
|
||||
return
|
||||
|
||||
def show_usage():
|
||||
|
@ -238,9 +244,11 @@ if __name__ == '__main__':
|
|||
file_name = val
|
||||
|
||||
if mode == "generic":
|
||||
dh = PrintGenericStubs()
|
||||
printer = PrintGenericStubs()
|
||||
else:
|
||||
print "ERROR: Invalid mode \"%s\" specified." % mode
|
||||
show_usage()
|
||||
|
||||
gl_XML.parse_GL_API( dh, file_name )
|
||||
api = gl_XML.parse_GL_API( file_name )
|
||||
|
||||
printer.Print( api )
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,288 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# (C) Copyright IBM Corporation 2005
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# Authors:
|
||||
# Ian Romanick <idr@us.ibm.com>
|
||||
|
||||
import string, copy
|
||||
|
||||
class type_node:
|
||||
def __init__(self):
|
||||
self.pointer = 0
|
||||
self.const = 0
|
||||
self.signed = 1
|
||||
self.integer = 1
|
||||
|
||||
# If elements is set to non-zero, then field is an array.
|
||||
self.elements = 0
|
||||
|
||||
self.name = None
|
||||
self.size = 0
|
||||
return
|
||||
|
||||
|
||||
def string(self):
|
||||
s = ""
|
||||
|
||||
if self.pointer:
|
||||
s = "* "
|
||||
|
||||
if self.const:
|
||||
s += "const "
|
||||
|
||||
if not self.pointer:
|
||||
if self.integer:
|
||||
if self.signed:
|
||||
s += "signed "
|
||||
else:
|
||||
s += "unsigned "
|
||||
|
||||
if self.name:
|
||||
s += "%s " % (self.name)
|
||||
|
||||
return s
|
||||
|
||||
|
||||
class type_table:
|
||||
def __init__(self):
|
||||
self.types_by_name = {}
|
||||
return
|
||||
|
||||
|
||||
def add_type(self, type_expr):
|
||||
self.types_by_name[ type_expr.get_base_name() ] = type_expr
|
||||
return
|
||||
|
||||
|
||||
def find_type(self, name):
|
||||
if name in self.types_by_name:
|
||||
return self.types_by_name[ name ]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def create_initial_types():
|
||||
tt = type_table()
|
||||
|
||||
basic_types = [ ["char", 1, 1], \
|
||||
["short", 2, 1], \
|
||||
["int", 4, 1], \
|
||||
["long", 4, 1], \
|
||||
["float", 4, 0], \
|
||||
["double", 8, 0], \
|
||||
["enum", 4, 1] ]
|
||||
|
||||
|
||||
for [type_name, type_size, integer] in basic_types:
|
||||
te = type_expression(None)
|
||||
tn = type_node()
|
||||
tn.name = type_name
|
||||
tn.size = type_size
|
||||
tn.integer = integer
|
||||
te.expr.append(tn)
|
||||
tt.add_type( te )
|
||||
|
||||
type_expression.built_in_types = tt
|
||||
return
|
||||
|
||||
|
||||
class type_expression:
|
||||
built_in_types = None
|
||||
|
||||
def __init__(self, type_string, extra_types = None):
|
||||
self.expr = []
|
||||
|
||||
if not type_string: return
|
||||
|
||||
self.original_string = type_string
|
||||
|
||||
if not type_expression.built_in_types:
|
||||
raise RuntimeError("create_initial_types must be called before creating type_expression objects.")
|
||||
|
||||
|
||||
elements = string.split( string.replace( type_string, "*", " * " ) )
|
||||
|
||||
const = 0
|
||||
t = None
|
||||
signed = 0
|
||||
unsigned = 0
|
||||
|
||||
for i in elements:
|
||||
if i == "const":
|
||||
if t and t.pointer:
|
||||
t.const = 1
|
||||
else:
|
||||
const = 1
|
||||
elif i == "signed":
|
||||
signed = 1
|
||||
elif i == "unsigned":
|
||||
unsigned = 1
|
||||
elif i == "*":
|
||||
# This is a quirky special-case because of the
|
||||
# way the C works for types. If 'unsigned' is
|
||||
# specified all by itself, it is treated the
|
||||
# same as "unsigned int".
|
||||
|
||||
if unsigned:
|
||||
self.set_base_type( "int", signed, unsigned, const, extra_types )
|
||||
const = 0
|
||||
signed = 0
|
||||
unsigned = 0
|
||||
|
||||
if not self.expr:
|
||||
raise RuntimeError("Invalid type expression (dangling pointer)")
|
||||
|
||||
if signed:
|
||||
raise RuntimeError("Invalid type expression (signed / unsigned applied to pointer)")
|
||||
|
||||
t = type_node()
|
||||
t.pointer = 1
|
||||
self.expr.append( t )
|
||||
else:
|
||||
if self.expr:
|
||||
raise RuntimeError('Invalid type expression (garbage after pointer qualifier -> "%s")' % (self.original_string))
|
||||
|
||||
self.set_base_type( i, signed, unsigned, const, extra_types )
|
||||
const = 0
|
||||
signed = 0
|
||||
unsigned = 0
|
||||
|
||||
if signed and unsigned:
|
||||
raise RuntimeError("Invalid type expression (both signed and unsigned specified)")
|
||||
|
||||
|
||||
if const:
|
||||
raise RuntimeError("Invalid type expression (dangling const)")
|
||||
|
||||
if unsigned:
|
||||
raise RuntimeError("Invalid type expression (dangling signed)")
|
||||
|
||||
if signed:
|
||||
raise RuntimeError("Invalid type expression (dangling unsigned)")
|
||||
|
||||
return
|
||||
|
||||
|
||||
def set_base_type(self, type_name, signed, unsigned, const, extra_types):
|
||||
te = type_expression.built_in_types.find_type( type_name )
|
||||
if not te:
|
||||
te = extra_types.find_type( type_name )
|
||||
|
||||
if not te:
|
||||
raise RuntimeError('Unknown base type "%s".' % (type_name))
|
||||
|
||||
self.expr = copy.deepcopy(te.expr)
|
||||
|
||||
t = self.expr[ len(self.expr) - 1 ]
|
||||
t.const = const
|
||||
if signed:
|
||||
t.signed = 1
|
||||
elif unsigned:
|
||||
t.signed = 0
|
||||
|
||||
|
||||
def set_base_type_node(self, tn):
|
||||
self.expr = [tn]
|
||||
return
|
||||
|
||||
|
||||
def set_elements(self, count):
|
||||
tn = self.expr[0]
|
||||
|
||||
tn.elements = count
|
||||
return
|
||||
|
||||
|
||||
def string(self):
|
||||
s = ""
|
||||
for t in self.expr:
|
||||
s += t.string()
|
||||
|
||||
return s
|
||||
|
||||
|
||||
def get_base_type_node(self):
|
||||
return self.expr[0]
|
||||
|
||||
|
||||
def get_base_name(self):
|
||||
if len(self.expr):
|
||||
return self.expr[0].name
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def get_element_size(self):
|
||||
tn = self.expr[0]
|
||||
|
||||
if tn.elements:
|
||||
return tn.elements * tn.size
|
||||
else:
|
||||
return tn.size
|
||||
|
||||
|
||||
def get_element_count(self):
|
||||
tn = self.expr[0]
|
||||
return tn.elements
|
||||
|
||||
|
||||
def get_stack_size(self):
|
||||
tn = self.expr[ len(self.expr) - 1 ]
|
||||
|
||||
if tn.elements or tn.pointer:
|
||||
return 4
|
||||
elif not tn.integer:
|
||||
return tn.size
|
||||
else:
|
||||
return 4
|
||||
|
||||
|
||||
def is_pointer(self):
|
||||
tn = self.expr[ len(self.expr) - 1 ]
|
||||
return tn.pointer
|
||||
|
||||
|
||||
def format_string(self):
|
||||
tn = self.expr[ len(self.expr) - 1 ]
|
||||
if tn.pointer:
|
||||
return "%p"
|
||||
elif not tn.integer:
|
||||
return "%f"
|
||||
else:
|
||||
return "%d"
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
types_to_try = [ "int", "int *", "const int *", "int * const", "const int * const", \
|
||||
"unsigned * const *", \
|
||||
"float", "const double", "double * const"]
|
||||
|
||||
create_initial_types()
|
||||
|
||||
for t in types_to_try:
|
||||
print 'Trying "%s"...' % (t)
|
||||
te = type_expression( t )
|
||||
print 'Got "%s" (%u, %u).' % (te.string(), te.get_stack_size(), te.get_element_size())
|
File diff suppressed because it is too large
Load Diff
|
@ -969,6 +969,44 @@ GLNAME(gl_dispatch_functions_start):
|
|||
GL_STUB(StencilFuncSeparate, _gloffset_StencilFuncSeparate, StencilFuncSeparate@16)
|
||||
GL_STUB(StencilOpSeparate, _gloffset_StencilOpSeparate, StencilOpSeparate@16)
|
||||
GL_STUB(StencilMaskSeparate, _gloffset_StencilMaskSeparate, StencilMaskSeparate@8)
|
||||
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
|
||||
GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8)
|
||||
GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12)
|
||||
GL_STUB_ALIAS(CopyTexImage1DEXT, _gloffset_CopyTexImage1D, CopyTexImage1DEXT@28, CopyTexImage1D, CopyTexImage1D@28)
|
||||
GL_STUB_ALIAS(CopyTexImage2DEXT, _gloffset_CopyTexImage2D, CopyTexImage2DEXT@32, CopyTexImage2D, CopyTexImage2D@32)
|
||||
GL_STUB_ALIAS(CopyTexSubImage1DEXT, _gloffset_CopyTexSubImage1D, CopyTexSubImage1DEXT@24, CopyTexSubImage1D, CopyTexSubImage1D@24)
|
||||
GL_STUB_ALIAS(CopyTexSubImage2DEXT, _gloffset_CopyTexSubImage2D, CopyTexSubImage2DEXT@32, CopyTexSubImage2D, CopyTexSubImage2D@32)
|
||||
GL_STUB_ALIAS(DeleteTexturesEXT, _gloffset_DeleteTextures, DeleteTexturesEXT@8, DeleteTextures, DeleteTextures@8)
|
||||
GL_STUB_ALIAS(GetPointervEXT, _gloffset_GetPointerv, GetPointervEXT@8, GetPointerv, GetPointerv@8)
|
||||
GL_STUB_ALIAS(PrioritizeTexturesEXT, _gloffset_PrioritizeTextures, PrioritizeTexturesEXT@12, PrioritizeTextures, PrioritizeTextures@12)
|
||||
GL_STUB_ALIAS(TexSubImage1DEXT, _gloffset_TexSubImage1D, TexSubImage1DEXT@28, TexSubImage1D, TexSubImage1D@28)
|
||||
GL_STUB_ALIAS(TexSubImage2DEXT, _gloffset_TexSubImage2D, TexSubImage2DEXT@36, TexSubImage2D, TexSubImage2D@36)
|
||||
GL_STUB_ALIAS(BlendColorEXT, _gloffset_BlendColor, BlendColorEXT@16, BlendColor, BlendColor@16)
|
||||
GL_STUB_ALIAS(BlendEquationEXT, _gloffset_BlendEquation, BlendEquationEXT@4, BlendEquation, BlendEquation@4)
|
||||
GL_STUB_ALIAS(DrawRangeElementsEXT, _gloffset_DrawRangeElements, DrawRangeElementsEXT@24, DrawRangeElements, DrawRangeElements@24)
|
||||
GL_STUB_ALIAS(ColorTableSGI, _gloffset_ColorTable, ColorTableSGI@24, ColorTable, ColorTable@24)
|
||||
GL_STUB_ALIAS(ColorTableEXT, _gloffset_ColorTable, ColorTableEXT@24, ColorTable, ColorTable@24)
|
||||
GL_STUB_ALIAS(ColorTableParameterfvSGI, _gloffset_ColorTableParameterfv, ColorTableParameterfvSGI@12, ColorTableParameterfv, ColorTableParameterfv@12)
|
||||
GL_STUB_ALIAS(ColorTableParameterivSGI, _gloffset_ColorTableParameteriv, ColorTableParameterivSGI@12, ColorTableParameteriv, ColorTableParameteriv@12)
|
||||
GL_STUB_ALIAS(CopyColorTableSGI, _gloffset_CopyColorTable, CopyColorTableSGI@20, CopyColorTable, CopyColorTable@20)
|
||||
GL_STUB_ALIAS(ColorSubTableEXT, _gloffset_ColorSubTable, ColorSubTableEXT@24, ColorSubTable, ColorSubTable@24)
|
||||
GL_STUB_ALIAS(CopyColorSubTableEXT, _gloffset_CopyColorSubTable, CopyColorSubTableEXT@20, CopyColorSubTable, CopyColorSubTable@20)
|
||||
GL_STUB_ALIAS(ConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D, ConvolutionFilter1DEXT@24, ConvolutionFilter1D, ConvolutionFilter1D@24)
|
||||
GL_STUB_ALIAS(ConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D, ConvolutionFilter2DEXT@28, ConvolutionFilter2D, ConvolutionFilter2D@28)
|
||||
GL_STUB_ALIAS(ConvolutionParameterfEXT, _gloffset_ConvolutionParameterf, ConvolutionParameterfEXT@12, ConvolutionParameterf, ConvolutionParameterf@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv, ConvolutionParameterfvEXT@12, ConvolutionParameterfv, ConvolutionParameterfv@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameteriEXT, _gloffset_ConvolutionParameteri, ConvolutionParameteriEXT@12, ConvolutionParameteri, ConvolutionParameteri@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv, ConvolutionParameterivEXT@12, ConvolutionParameteriv, ConvolutionParameteriv@12)
|
||||
GL_STUB_ALIAS(CopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D, CopyConvolutionFilter1DEXT@20, CopyConvolutionFilter1D, CopyConvolutionFilter1D@20)
|
||||
GL_STUB_ALIAS(CopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D, CopyConvolutionFilter2DEXT@24, CopyConvolutionFilter2D, CopyConvolutionFilter2D@24)
|
||||
GL_STUB_ALIAS(SeparableFilter2DEXT, _gloffset_SeparableFilter2D, SeparableFilter2DEXT@32, SeparableFilter2D, SeparableFilter2D@32)
|
||||
GL_STUB_ALIAS(HistogramEXT, _gloffset_Histogram, HistogramEXT@16, Histogram, Histogram@16)
|
||||
GL_STUB_ALIAS(MinmaxEXT, _gloffset_Minmax, MinmaxEXT@12, Minmax, Minmax@12)
|
||||
GL_STUB_ALIAS(ResetHistogramEXT, _gloffset_ResetHistogram, ResetHistogramEXT@4, ResetHistogram, ResetHistogram@4)
|
||||
GL_STUB_ALIAS(ResetMinmaxEXT, _gloffset_ResetMinmax, ResetMinmaxEXT@4, ResetMinmax, ResetMinmax@4)
|
||||
GL_STUB_ALIAS(TexImage3DEXT, _gloffset_TexImage3D, TexImage3DEXT@40, TexImage3D, TexImage3D@40)
|
||||
GL_STUB_ALIAS(TexSubImage3DEXT, _gloffset_TexSubImage3D, TexSubImage3DEXT@44, TexSubImage3D, TexSubImage3D@44)
|
||||
GL_STUB_ALIAS(CopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D, CopyTexSubImage3DEXT@36, CopyTexSubImage3D, CopyTexSubImage3D@36)
|
||||
GL_STUB_ALIAS(ActiveTexture, _gloffset_ActiveTextureARB, ActiveTexture@4, ActiveTextureARB, ActiveTextureARB@4)
|
||||
GL_STUB_ALIAS(ClientActiveTexture, _gloffset_ClientActiveTextureARB, ClientActiveTexture@4, ClientActiveTextureARB, ClientActiveTextureARB@4)
|
||||
GL_STUB_ALIAS(MultiTexCoord1d, _gloffset_MultiTexCoord1dARB, MultiTexCoord1d@12, MultiTexCoord1dARB, MultiTexCoord1dARB@12)
|
||||
|
@ -1008,6 +1046,54 @@ GLNAME(gl_dispatch_functions_start):
|
|||
GL_STUB_ALIAS(MultTransposeMatrixf, _gloffset_MultTransposeMatrixfARB, MultTransposeMatrixf@4, MultTransposeMatrixfARB, MultTransposeMatrixfARB@4)
|
||||
GL_STUB_ALIAS(MultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB, MultTransposeMatrixd@4, MultTransposeMatrixdARB, MultTransposeMatrixdARB@4)
|
||||
GL_STUB_ALIAS(SampleCoverage, _gloffset_SampleCoverageARB, SampleCoverage@8, SampleCoverageARB, SampleCoverageARB@8)
|
||||
GL_STUB_ALIAS(DrawBuffersATI, _gloffset_DrawBuffersARB, DrawBuffersATI@8, DrawBuffersARB, DrawBuffersARB@8)
|
||||
GL_STUB_ALIAS(SampleMaskEXT, _gloffset_SampleMaskSGIS, SampleMaskEXT@8, SampleMaskSGIS, SampleMaskSGIS@8)
|
||||
GL_STUB_ALIAS(SamplePatternEXT, _gloffset_SamplePatternSGIS, SamplePatternEXT@4, SamplePatternSGIS, SamplePatternSGIS@4)
|
||||
GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, PointParameterfSGIS@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfv, _gloffset_PointParameterfvEXT, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfvARB, _gloffset_PointParameterfvEXT, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfvSGIS, _gloffset_PointParameterfvEXT, PointParameterfvSGIS@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
GL_STUB_ALIAS(WindowPos2d, _gloffset_WindowPos2dMESA, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16)
|
||||
GL_STUB_ALIAS(WindowPos2dARB, _gloffset_WindowPos2dMESA, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16)
|
||||
GL_STUB_ALIAS(WindowPos2dv, _gloffset_WindowPos2dvMESA, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2dvARB, _gloffset_WindowPos2dvMESA, WindowPos2dvARB@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2f, _gloffset_WindowPos2fMESA, WindowPos2f@8, WindowPos2fMESA, WindowPos2fMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2fARB, _gloffset_WindowPos2fMESA, WindowPos2fARB@8, WindowPos2fMESA, WindowPos2fMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2fv, _gloffset_WindowPos2fvMESA, WindowPos2fv@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2fvARB, _gloffset_WindowPos2fvMESA, WindowPos2fvARB@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2i, _gloffset_WindowPos2iMESA, WindowPos2i@8, WindowPos2iMESA, WindowPos2iMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2iARB, _gloffset_WindowPos2iMESA, WindowPos2iARB@8, WindowPos2iMESA, WindowPos2iMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2iv, _gloffset_WindowPos2ivMESA, WindowPos2iv@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2ivARB, _gloffset_WindowPos2ivMESA, WindowPos2ivARB@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2s, _gloffset_WindowPos2sMESA, WindowPos2s@8, WindowPos2sMESA, WindowPos2sMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2sARB, _gloffset_WindowPos2sMESA, WindowPos2sARB@8, WindowPos2sMESA, WindowPos2sMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2sv, _gloffset_WindowPos2svMESA, WindowPos2sv@4, WindowPos2svMESA, WindowPos2svMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2svARB, _gloffset_WindowPos2svMESA, WindowPos2svARB@4, WindowPos2svMESA, WindowPos2svMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3d, _gloffset_WindowPos3dMESA, WindowPos3d@24, WindowPos3dMESA, WindowPos3dMESA@24)
|
||||
GL_STUB_ALIAS(WindowPos3dARB, _gloffset_WindowPos3dMESA, WindowPos3dARB@24, WindowPos3dMESA, WindowPos3dMESA@24)
|
||||
GL_STUB_ALIAS(WindowPos3dv, _gloffset_WindowPos3dvMESA, WindowPos3dv@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3dvARB, _gloffset_WindowPos3dvMESA, WindowPos3dvARB@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3f, _gloffset_WindowPos3fMESA, WindowPos3f@12, WindowPos3fMESA, WindowPos3fMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3fARB, _gloffset_WindowPos3fMESA, WindowPos3fARB@12, WindowPos3fMESA, WindowPos3fMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3fv, _gloffset_WindowPos3fvMESA, WindowPos3fv@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3fvARB, _gloffset_WindowPos3fvMESA, WindowPos3fvARB@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3i, _gloffset_WindowPos3iMESA, WindowPos3i@12, WindowPos3iMESA, WindowPos3iMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3iARB, _gloffset_WindowPos3iMESA, WindowPos3iARB@12, WindowPos3iMESA, WindowPos3iMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3iv, _gloffset_WindowPos3ivMESA, WindowPos3iv@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3ivARB, _gloffset_WindowPos3ivMESA, WindowPos3ivARB@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3s, _gloffset_WindowPos3sMESA, WindowPos3s@12, WindowPos3sMESA, WindowPos3sMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3sARB, _gloffset_WindowPos3sMESA, WindowPos3sARB@12, WindowPos3sMESA, WindowPos3sMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3sv, _gloffset_WindowPos3svMESA, WindowPos3sv@4, WindowPos3svMESA, WindowPos3svMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3svARB, _gloffset_WindowPos3svMESA, WindowPos3svARB@4, WindowPos3svMESA, WindowPos3svMESA@4)
|
||||
GL_STUB_ALIAS(BlendFuncSeparate, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
|
||||
GL_STUB_ALIAS(BlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateINGR@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
|
||||
GL_STUB_ALIAS(FogCoordf, _gloffset_FogCoordfEXT, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordfv, _gloffset_FogCoordfvEXT, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordd, _gloffset_FogCoorddEXT, FogCoordd@8, FogCoorddEXT, FogCoorddEXT@8)
|
||||
GL_STUB_ALIAS(FogCoorddv, _gloffset_FogCoorddvEXT, FogCoorddv@4, FogCoorddvEXT, FogCoorddvEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordPointer, _gloffset_FogCoordPointerEXT, FogCoordPointer@12, FogCoordPointerEXT, FogCoordPointerEXT@12)
|
||||
GL_STUB_ALIAS(CompressedTexImage3D, _gloffset_CompressedTexImage3DARB, CompressedTexImage3D@36, CompressedTexImage3DARB, CompressedTexImage3DARB@36)
|
||||
GL_STUB_ALIAS(CompressedTexImage2D, _gloffset_CompressedTexImage2DARB, CompressedTexImage2D@32, CompressedTexImage2DARB, CompressedTexImage2DARB@32)
|
||||
GL_STUB_ALIAS(CompressedTexImage1D, _gloffset_CompressedTexImage1DARB, CompressedTexImage1D@28, CompressedTexImage1DARB, CompressedTexImage1DARB@28)
|
||||
|
@ -1015,18 +1101,6 @@ GLNAME(gl_dispatch_functions_start):
|
|||
GL_STUB_ALIAS(CompressedTexSubImage2D, _gloffset_CompressedTexSubImage2DARB, CompressedTexSubImage2D@36, CompressedTexSubImage2DARB, CompressedTexSubImage2DARB@36)
|
||||
GL_STUB_ALIAS(CompressedTexSubImage1D, _gloffset_CompressedTexSubImage1DARB, CompressedTexSubImage1D@28, CompressedTexSubImage1DARB, CompressedTexSubImage1DARB@28)
|
||||
GL_STUB_ALIAS(GetCompressedTexImage, _gloffset_GetCompressedTexImageARB, GetCompressedTexImage@12, GetCompressedTexImageARB, GetCompressedTexImageARB@12)
|
||||
GL_STUB_ALIAS(BlendFuncSeparate, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
|
||||
GL_STUB_ALIAS(FogCoordf, _gloffset_FogCoordfEXT, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordfv, _gloffset_FogCoordfvEXT, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordd, _gloffset_FogCoorddEXT, FogCoordd@8, FogCoorddEXT, FogCoorddEXT@8)
|
||||
GL_STUB_ALIAS(FogCoorddv, _gloffset_FogCoorddvEXT, FogCoorddv@4, FogCoorddvEXT, FogCoorddvEXT@4)
|
||||
GL_STUB_ALIAS(FogCoordPointer, _gloffset_FogCoordPointerEXT, FogCoordPointer@12, FogCoordPointerEXT, FogCoordPointerEXT@12)
|
||||
GL_STUB_ALIAS(MultiDrawArrays, _gloffset_MultiDrawArraysEXT, MultiDrawArrays@16, MultiDrawArraysEXT, MultiDrawArraysEXT@16)
|
||||
GL_STUB_ALIAS(MultiDrawElements, _gloffset_MultiDrawElementsEXT, MultiDrawElements@20, MultiDrawElementsEXT, MultiDrawElementsEXT@20)
|
||||
GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfv, _gloffset_PointParameterfvEXT, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
|
||||
GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
|
||||
GL_STUB_ALIAS(SecondaryColor3b, _gloffset_SecondaryColor3bEXT, SecondaryColor3b@12, SecondaryColor3bEXT, SecondaryColor3bEXT@12)
|
||||
GL_STUB_ALIAS(SecondaryColor3bv, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bv@4, SecondaryColor3bvEXT, SecondaryColor3bvEXT@4)
|
||||
GL_STUB_ALIAS(SecondaryColor3d, _gloffset_SecondaryColor3dEXT, SecondaryColor3d@24, SecondaryColor3dEXT, SecondaryColor3dEXT@24)
|
||||
|
@ -1044,22 +1118,15 @@ GLNAME(gl_dispatch_functions_start):
|
|||
GL_STUB_ALIAS(SecondaryColor3us, _gloffset_SecondaryColor3usEXT, SecondaryColor3us@12, SecondaryColor3usEXT, SecondaryColor3usEXT@12)
|
||||
GL_STUB_ALIAS(SecondaryColor3usv, _gloffset_SecondaryColor3usvEXT, SecondaryColor3usv@4, SecondaryColor3usvEXT, SecondaryColor3usvEXT@4)
|
||||
GL_STUB_ALIAS(SecondaryColorPointer, _gloffset_SecondaryColorPointerEXT, SecondaryColorPointer@16, SecondaryColorPointerEXT, SecondaryColorPointerEXT@16)
|
||||
GL_STUB_ALIAS(WindowPos2d, _gloffset_WindowPos2dMESA, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16)
|
||||
GL_STUB_ALIAS(WindowPos2dv, _gloffset_WindowPos2dvMESA, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2f, _gloffset_WindowPos2fMESA, WindowPos2f@8, WindowPos2fMESA, WindowPos2fMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2fv, _gloffset_WindowPos2fvMESA, WindowPos2fv@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2i, _gloffset_WindowPos2iMESA, WindowPos2i@8, WindowPos2iMESA, WindowPos2iMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2iv, _gloffset_WindowPos2ivMESA, WindowPos2iv@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2s, _gloffset_WindowPos2sMESA, WindowPos2s@8, WindowPos2sMESA, WindowPos2sMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2sv, _gloffset_WindowPos2svMESA, WindowPos2sv@4, WindowPos2svMESA, WindowPos2svMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3d, _gloffset_WindowPos3dMESA, WindowPos3d@24, WindowPos3dMESA, WindowPos3dMESA@24)
|
||||
GL_STUB_ALIAS(WindowPos3dv, _gloffset_WindowPos3dvMESA, WindowPos3dv@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3f, _gloffset_WindowPos3fMESA, WindowPos3f@12, WindowPos3fMESA, WindowPos3fMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3fv, _gloffset_WindowPos3fvMESA, WindowPos3fv@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3i, _gloffset_WindowPos3iMESA, WindowPos3i@12, WindowPos3iMESA, WindowPos3iMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3iv, _gloffset_WindowPos3ivMESA, WindowPos3iv@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3s, _gloffset_WindowPos3sMESA, WindowPos3s@12, WindowPos3sMESA, WindowPos3sMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3sv, _gloffset_WindowPos3svMESA, WindowPos3sv@4, WindowPos3svMESA, WindowPos3svMESA@4)
|
||||
GL_STUB_ALIAS(BindProgramARB, _gloffset_BindProgramNV, BindProgramARB@8, BindProgramNV, BindProgramNV@8)
|
||||
GL_STUB_ALIAS(DeleteProgramsARB, _gloffset_DeleteProgramsNV, DeleteProgramsARB@8, DeleteProgramsNV, DeleteProgramsNV@8)
|
||||
GL_STUB_ALIAS(GenProgramsARB, _gloffset_GenProgramsNV, GenProgramsARB@8, GenProgramsNV, GenProgramsNV@8)
|
||||
GL_STUB_ALIAS(GetVertexAttribPointervARB, _gloffset_GetVertexAttribPointervNV, GetVertexAttribPointervARB@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
|
||||
GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
|
||||
GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
|
||||
GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
|
||||
GL_STUB_ALIAS(MultiDrawArrays, _gloffset_MultiDrawArraysEXT, MultiDrawArrays@16, MultiDrawArraysEXT, MultiDrawArraysEXT@16)
|
||||
GL_STUB_ALIAS(MultiDrawElements, _gloffset_MultiDrawElementsEXT, MultiDrawElements@20, MultiDrawElementsEXT, MultiDrawElementsEXT@20)
|
||||
GL_STUB_ALIAS(BindBuffer, _gloffset_BindBufferARB, BindBuffer@8, BindBufferARB, BindBufferARB@8)
|
||||
GL_STUB_ALIAS(BufferData, _gloffset_BufferDataARB, BufferData@16, BufferDataARB, BufferDataARB@16)
|
||||
GL_STUB_ALIAS(BufferSubData, _gloffset_BufferSubDataARB, BufferSubData@16, BufferSubDataARB, BufferSubDataARB@16)
|
||||
|
@ -1079,74 +1146,7 @@ GLNAME(gl_dispatch_functions_start):
|
|||
GL_STUB_ALIAS(GetQueryiv, _gloffset_GetQueryivARB, GetQueryiv@12, GetQueryivARB, GetQueryivARB@12)
|
||||
GL_STUB_ALIAS(GetQueryObjectiv, _gloffset_GetQueryObjectivARB, GetQueryObjectiv@12, GetQueryObjectivARB, GetQueryObjectivARB@12)
|
||||
GL_STUB_ALIAS(GetQueryObjectuiv, _gloffset_GetQueryObjectuivARB, GetQueryObjectuiv@12, GetQueryObjectuivARB, GetQueryObjectuivARB@12)
|
||||
GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfvARB, _gloffset_PointParameterfvEXT, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
GL_STUB_ALIAS(WindowPos2dARB, _gloffset_WindowPos2dMESA, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16)
|
||||
GL_STUB_ALIAS(WindowPos2fARB, _gloffset_WindowPos2fMESA, WindowPos2fARB@8, WindowPos2fMESA, WindowPos2fMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2iARB, _gloffset_WindowPos2iMESA, WindowPos2iARB@8, WindowPos2iMESA, WindowPos2iMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2sARB, _gloffset_WindowPos2sMESA, WindowPos2sARB@8, WindowPos2sMESA, WindowPos2sMESA@8)
|
||||
GL_STUB_ALIAS(WindowPos2dvARB, _gloffset_WindowPos2dvMESA, WindowPos2dvARB@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2fvARB, _gloffset_WindowPos2fvMESA, WindowPos2fvARB@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2ivARB, _gloffset_WindowPos2ivMESA, WindowPos2ivARB@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos2svARB, _gloffset_WindowPos2svMESA, WindowPos2svARB@4, WindowPos2svMESA, WindowPos2svMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3dARB, _gloffset_WindowPos3dMESA, WindowPos3dARB@24, WindowPos3dMESA, WindowPos3dMESA@24)
|
||||
GL_STUB_ALIAS(WindowPos3fARB, _gloffset_WindowPos3fMESA, WindowPos3fARB@12, WindowPos3fMESA, WindowPos3fMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3iARB, _gloffset_WindowPos3iMESA, WindowPos3iARB@12, WindowPos3iMESA, WindowPos3iMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3sARB, _gloffset_WindowPos3sMESA, WindowPos3sARB@12, WindowPos3sMESA, WindowPos3sMESA@12)
|
||||
GL_STUB_ALIAS(WindowPos3dvARB, _gloffset_WindowPos3dvMESA, WindowPos3dvARB@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3fvARB, _gloffset_WindowPos3fvMESA, WindowPos3fvARB@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3ivARB, _gloffset_WindowPos3ivMESA, WindowPos3ivARB@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
|
||||
GL_STUB_ALIAS(WindowPos3svARB, _gloffset_WindowPos3svMESA, WindowPos3svARB@4, WindowPos3svMESA, WindowPos3svMESA@4)
|
||||
GL_STUB_ALIAS(BindProgramARB, _gloffset_BindProgramNV, BindProgramARB@8, BindProgramNV, BindProgramNV@8)
|
||||
GL_STUB_ALIAS(DeleteProgramsARB, _gloffset_DeleteProgramsNV, DeleteProgramsARB@8, DeleteProgramsNV, DeleteProgramsNV@8)
|
||||
GL_STUB_ALIAS(GenProgramsARB, _gloffset_GenProgramsNV, GenProgramsARB@8, GenProgramsNV, GenProgramsNV@8)
|
||||
GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
|
||||
GL_STUB_ALIAS(GetVertexAttribPointervARB, _gloffset_GetVertexAttribPointervNV, GetVertexAttribPointervARB@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
|
||||
GL_STUB_ALIAS(BlendColorEXT, _gloffset_BlendColor, BlendColorEXT@16, BlendColor, BlendColor@16)
|
||||
GL_STUB_ALIAS(TexImage3DEXT, _gloffset_TexImage3D, TexImage3DEXT@40, TexImage3D, TexImage3D@40)
|
||||
GL_STUB_ALIAS(TexSubImage3DEXT, _gloffset_TexSubImage3D, TexSubImage3DEXT@44, TexSubImage3D, TexSubImage3D@44)
|
||||
GL_STUB_ALIAS(TexSubImage1DEXT, _gloffset_TexSubImage1D, TexSubImage1DEXT@28, TexSubImage1D, TexSubImage1D@28)
|
||||
GL_STUB_ALIAS(TexSubImage2DEXT, _gloffset_TexSubImage2D, TexSubImage2DEXT@36, TexSubImage2D, TexSubImage2D@36)
|
||||
GL_STUB_ALIAS(CopyTexImage1DEXT, _gloffset_CopyTexImage1D, CopyTexImage1DEXT@28, CopyTexImage1D, CopyTexImage1D@28)
|
||||
GL_STUB_ALIAS(CopyTexImage2DEXT, _gloffset_CopyTexImage2D, CopyTexImage2DEXT@32, CopyTexImage2D, CopyTexImage2D@32)
|
||||
GL_STUB_ALIAS(CopyTexSubImage1DEXT, _gloffset_CopyTexSubImage1D, CopyTexSubImage1DEXT@24, CopyTexSubImage1D, CopyTexSubImage1D@24)
|
||||
GL_STUB_ALIAS(CopyTexSubImage2DEXT, _gloffset_CopyTexSubImage2D, CopyTexSubImage2DEXT@32, CopyTexSubImage2D, CopyTexSubImage2D@32)
|
||||
GL_STUB_ALIAS(CopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D, CopyTexSubImage3DEXT@36, CopyTexSubImage3D, CopyTexSubImage3D@36)
|
||||
GL_STUB_ALIAS(HistogramEXT, _gloffset_Histogram, HistogramEXT@16, Histogram, Histogram@16)
|
||||
GL_STUB_ALIAS(MinmaxEXT, _gloffset_Minmax, MinmaxEXT@12, Minmax, Minmax@12)
|
||||
GL_STUB_ALIAS(ResetHistogramEXT, _gloffset_ResetHistogram, ResetHistogramEXT@4, ResetHistogram, ResetHistogram@4)
|
||||
GL_STUB_ALIAS(ResetMinmaxEXT, _gloffset_ResetMinmax, ResetMinmaxEXT@4, ResetMinmax, ResetMinmax@4)
|
||||
GL_STUB_ALIAS(ConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D, ConvolutionFilter1DEXT@24, ConvolutionFilter1D, ConvolutionFilter1D@24)
|
||||
GL_STUB_ALIAS(ConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D, ConvolutionFilter2DEXT@28, ConvolutionFilter2D, ConvolutionFilter2D@28)
|
||||
GL_STUB_ALIAS(ConvolutionParameterfEXT, _gloffset_ConvolutionParameterf, ConvolutionParameterfEXT@12, ConvolutionParameterf, ConvolutionParameterf@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv, ConvolutionParameterfvEXT@12, ConvolutionParameterfv, ConvolutionParameterfv@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameteriEXT, _gloffset_ConvolutionParameteri, ConvolutionParameteriEXT@12, ConvolutionParameteri, ConvolutionParameteri@12)
|
||||
GL_STUB_ALIAS(ConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv, ConvolutionParameterivEXT@12, ConvolutionParameteriv, ConvolutionParameteriv@12)
|
||||
GL_STUB_ALIAS(CopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D, CopyConvolutionFilter1DEXT@20, CopyConvolutionFilter1D, CopyConvolutionFilter1D@20)
|
||||
GL_STUB_ALIAS(CopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D, CopyConvolutionFilter2DEXT@24, CopyConvolutionFilter2D, CopyConvolutionFilter2D@24)
|
||||
GL_STUB_ALIAS(SeparableFilter2DEXT, _gloffset_SeparableFilter2D, SeparableFilter2DEXT@32, SeparableFilter2D, SeparableFilter2D@32)
|
||||
GL_STUB_ALIAS(ColorTableSGI, _gloffset_ColorTable, ColorTableSGI@24, ColorTable, ColorTable@24)
|
||||
GL_STUB_ALIAS(ColorTableParameterfvSGI, _gloffset_ColorTableParameterfv, ColorTableParameterfvSGI@12, ColorTableParameterfv, ColorTableParameterfv@12)
|
||||
GL_STUB_ALIAS(ColorTableParameterivSGI, _gloffset_ColorTableParameteriv, ColorTableParameterivSGI@12, ColorTableParameteriv, ColorTableParameteriv@12)
|
||||
GL_STUB_ALIAS(CopyColorTableSGI, _gloffset_CopyColorTable, CopyColorTableSGI@20, CopyColorTable, CopyColorTable@20)
|
||||
GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8)
|
||||
GL_STUB_ALIAS(DeleteTexturesEXT, _gloffset_DeleteTextures, DeleteTexturesEXT@8, DeleteTextures, DeleteTextures@8)
|
||||
GL_STUB_ALIAS(PrioritizeTexturesEXT, _gloffset_PrioritizeTextures, PrioritizeTexturesEXT@12, PrioritizeTextures, PrioritizeTextures@12)
|
||||
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
|
||||
GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12)
|
||||
GL_STUB_ALIAS(GetPointervEXT, _gloffset_GetPointerv, GetPointervEXT@8, GetPointerv, GetPointerv@8)
|
||||
GL_STUB_ALIAS(BlendEquationEXT, _gloffset_BlendEquation, BlendEquationEXT@4, BlendEquation, BlendEquation@4)
|
||||
GL_STUB_ALIAS(ColorSubTableEXT, _gloffset_ColorSubTable, ColorSubTableEXT@24, ColorSubTable, ColorSubTable@24)
|
||||
GL_STUB_ALIAS(CopyColorSubTableEXT, _gloffset_CopyColorSubTable, CopyColorSubTableEXT@20, CopyColorSubTable, CopyColorSubTable@20)
|
||||
GL_STUB_ALIAS(ColorTableEXT, _gloffset_ColorTable, ColorTableEXT@24, ColorTable, ColorTable@24)
|
||||
GL_STUB_ALIAS(DrawRangeElementsEXT, _gloffset_DrawRangeElements, DrawRangeElementsEXT@24, DrawRangeElements, DrawRangeElements@24)
|
||||
GL_STUB_ALIAS(SampleMaskEXT, _gloffset_SampleMaskSGIS, SampleMaskEXT@8, SampleMaskSGIS, SampleMaskSGIS@8)
|
||||
GL_STUB_ALIAS(SamplePatternEXT, _gloffset_SamplePatternSGIS, SamplePatternEXT@4, SamplePatternSGIS, SamplePatternSGIS@4)
|
||||
GL_STUB_ALIAS(DrawBuffersATI, _gloffset_DrawBuffersARB, DrawBuffersATI@8, DrawBuffersARB, DrawBuffersARB@8)
|
||||
GL_STUB_ALIAS(BlendEquationSeparateATI, _gloffset_BlendEquationSeparateEXT, BlendEquationSeparateATI@8, BlendEquationSeparateEXT, BlendEquationSeparateEXT@8)
|
||||
GL_STUB_ALIAS(BlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateINGR@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
|
||||
GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, PointParameterfSGIS@8, PointParameterfEXT, PointParameterfEXT@8)
|
||||
GL_STUB_ALIAS(PointParameterfvSGIS, _gloffset_PointParameterfvEXT, PointParameterfvSGIS@8, PointParameterfvEXT, PointParameterfvEXT@8)
|
||||
|
||||
GLOBL GLNAME(gl_dispatch_functions_end)
|
||||
HIDDEN(GLNAME(gl_dispatch_functions_end))
|
||||
|
|
Loading…
Reference in New Issue