From: José Fonseca Date: Sun, 14 Apr 2013 13:45:04 +0000 (+0100) Subject: gltrace: Better handling of GetPerfMonitorCounterInfoAMD X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=fbc5192c8164986f8960815cfbc29730625dd8cf;p=apitrace gltrace: Better handling of GetPerfMonitorCounterInfoAMD --- diff --git a/specs/glapi.py b/specs/glapi.py index b0c0a27..82b7902 100644 --- a/specs/glapi.py +++ b/specs/glapi.py @@ -2690,7 +2690,7 @@ glapi.addFunctions([ GlFunction(Void, "glGetPerfMonitorCountersAMD", [(GLuint, "group"), Out(Pointer(GLint), "numCounters"), Out(Pointer(GLint), "maxActiveCounters"), (GLsizei, "counterSize"), Out(Array(GLuint, "counterSize"), "counters")], sideeffects=False), GlFunction(Void, "glGetPerfMonitorGroupStringAMD", [(GLuint, "group"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "groupString")], sideeffects=False), GlFunction(Void, "glGetPerfMonitorCounterStringAMD", [(GLuint, "group"), (GLuint, "counter"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "counterString")], sideeffects=False), - GlFunction(Void, "glGetPerfMonitorCounterInfoAMD", [(GLuint, "group"), (GLuint, "counter"), (GLenum, "pname"), Out(OpaqueBlob(GLvoid, "_glGetPerfMonitorCounterInfoAMD_size(pname)"), "data")], sideeffects=False), + GlFunction(Void, "glGetPerfMonitorCounterInfoAMD", [(GLuint, "group"), (GLuint, "counter"), (GLenum, "pname"), Out(GLperfMonitorCounterInfoAMD, "data")], sideeffects=False), GlFunction(Void, "glGenPerfMonitorsAMD", [(GLsizei, "n"), Out(Array(GLuint, "n"), "monitors")]), GlFunction(Void, "glDeletePerfMonitorsAMD", [(GLsizei, "n"), (Array(GLuint, "n"), "monitors")]), GlFunction(Void, "glSelectPerfMonitorCountersAMD", [(GLuint, "monitor"), (GLboolean, "enable"), (GLuint, "group"), (GLint, "numCounters"), (Array(GLuint, "numCounters"), "counterList")]), diff --git a/specs/gltypes.py b/specs/gltypes.py index a04990d..0c1b7ae 100644 --- a/specs/gltypes.py +++ b/specs/gltypes.py @@ -250,3 +250,13 @@ def GLindexBuffer(countExpr, typeExpr): IntPointer("const GLvoid *"), contextLess=False, ) + + +# GL_AMD_performance_monitor +GLperfMonitorCounterInfoAMD = Polymorphic('pname', [ + ('GL_COUNTER_TYPE_AMD', Pointer(GLenum)), + ('GL_PERCENTAGE_AMD', Pointer(Float)), + ('GL_COUNTER_RANGE_AMD', Array(Float, 2)), + ], + OpaquePointer(GLvoid), +) diff --git a/wrappers/trace.py b/wrappers/trace.py index 61a2cb9..d9c2900 100644 --- a/wrappers/trace.py +++ b/wrappers/trace.py @@ -138,7 +138,7 @@ class ComplexValueSerializer(stdapi.OnceVisitor): def visitPolymorphic(self, polymorphic): if not polymorphic.contextLess: return - print 'static void _write__%s(int selector, const %s & value) {' % (polymorphic.tag, polymorphic.expr) + print 'static void _write__%s(int selector, %s const & value) {' % (polymorphic.tag, polymorphic.expr) print ' switch (selector) {' for cases, type in polymorphic.iterSwitch(): for case in cases: