]> git.cworth.org Git - apitrace/blobdiff - specs/gltypes.py
stash: Trace and replay of gnome-shell works
[apitrace] / specs / gltypes.py
index 23af3279e54f2e51a33e8ebba9ad6166131a7d36..0c1b7aee9e9c5bc32d67ae2175246e2f8c626ca7 100644 (file)
@@ -237,3 +237,26 @@ GLbitfield_barrier = Flags(GLbitfield, [
 size_bgra = FakeEnum(GLint, [
     "GL_BGRA",
 ])
+
+
+def GLindexBuffer(countExpr, typeExpr):
+    # Indices arguments are polymorphic:
+    # - offsets when element array buffer is bound
+    # - or a blob otherwise.
+    sizeExpr = '%s*_gl_type_size(%s)' % (countExpr, typeExpr)
+    return Polymorphic('_element_array_buffer_binding()', [
+            ('0', Blob(Const(GLvoid), sizeExpr)),
+        ],
+        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),
+)