summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glX_proto_send.py
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-01-07 02:29:42 +0000
committerIan Romanick <idr@us.ibm.com>2005-01-07 02:29:42 +0000
commit3385d7cec3308129f6f1fc5990023417e4e4be47 (patch)
tree944a3633e511b03e5f2e63eb816c1584955db236 /src/mesa/glapi/glX_proto_send.py
parentba5ceda7e0f55fb59a674a5439a44464cae4b28d (diff)
The generic_*_byte functions did not rount the command size to a
multiple of 4 correctly in some cases.
Diffstat (limited to 'src/mesa/glapi/glX_proto_send.py')
-rw-r--r--src/mesa/glapi/glX_proto_send.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index 15d1fa69fd..7a93ef10b6 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -142,6 +142,7 @@ setup_vendor_request( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
print "/* Missing GLX protocol for %s. */" % (f.name)
def print_generic_function(self, n):
+ size = (n + 3) & ~3
print """static FASTCALL NOINLINE void
generic_%u_byte( GLint rop, const void * ptr )
{
@@ -153,7 +154,7 @@ generic_%u_byte( GLint rop, const void * ptr )
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
-""" % (n, n + 4, n)
+""" % (n, size + 4, size)
def common_emit_one_arg(self, p, offset, pc, indent, adjust):