summaryrefslogtreecommitdiff
path: root/src/glx
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/glx
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/glx')
-rw-r--r--src/glx/x11/indirect.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index e8f716f90d..a9b52e2aa2 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -119,10 +119,10 @@ static FASTCALL NOINLINE void
generic_3_byte( GLint rop, const void * ptr )
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 7;
+ const GLuint cmdlen = 8;
emit_header(gc->pc, rop, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), ptr, 3);
+ (void) memcpy((void *)(gc->pc + 4), ptr, 4);
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -143,10 +143,10 @@ static FASTCALL NOINLINE void
generic_6_byte( GLint rop, const void * ptr )
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 10;
+ const GLuint cmdlen = 12;
emit_header(gc->pc, rop, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), ptr, 6);
+ (void) memcpy((void *)(gc->pc + 4), ptr, 8);
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}