diff options
author | Ian Romanick <[email protected]> | 2005-01-03 21:03:03 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2005-01-03 21:03:03 +0000 |
commit | 3276c192b7bfe4fd21967224b3d13e1c1681758e (patch) | |
tree | b2b931bdf910a81cfddda3c08409f883047d3376 /src | |
parent | dd1a817c501ae52b92d9ebf02876152d7a42ec27 (diff) |
The opcode and command length fields of RenderLarge commands were
mistakenly emitted in the wrong order.
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/x11/indirect.c | 16 | ||||
-rw-r--r-- | src/mesa/glapi/glX_proto_send.py | 16 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index 965a4a2961a..e8f716f90d6 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -276,8 +276,8 @@ __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists) const GLint op = X_GLrop_CallLists; const GLuint cmdlenLarge = cmdlen + 4; GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&op), 4); - (void) memcpy((void *)(pc + 4), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 4), (void *)(&op), 4); (void) memcpy((void *)(pc + 8), (void *)(&n), 4); (void) memcpy((void *)(pc + 12), (void *)(&type), 4); __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n)); @@ -2992,8 +2992,8 @@ __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values) const GLint op = X_GLrop_PixelMapfv; const GLuint cmdlenLarge = cmdlen + 4; GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&op), 4); - (void) memcpy((void *)(pc + 4), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 4), (void *)(&op), 4); (void) memcpy((void *)(pc + 8), (void *)(&map), 4); (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); @@ -3023,8 +3023,8 @@ __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values) const GLint op = X_GLrop_PixelMapuiv; const GLuint cmdlenLarge = cmdlen + 4; GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&op), 4); - (void) memcpy((void *)(pc + 4), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 4), (void *)(&op), 4); (void) memcpy((void *)(pc + 8), (void *)(&map), 4); (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); @@ -3054,8 +3054,8 @@ __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values) const GLint op = X_GLrop_PixelMapusv; const GLuint cmdlenLarge = cmdlen + 4; GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); - (void) memcpy((void *)(pc + 0), (void *)(&op), 4); - (void) memcpy((void *)(pc + 4), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); + (void) memcpy((void *)(pc + 4), (void *)(&op), 4); (void) memcpy((void *)(pc + 8), (void *)(&map), 4); (void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2)); diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py index 023b07ee3bd..15d1fa69fd3 100644 --- a/src/mesa/glapi/glX_proto_send.py +++ b/src/mesa/glapi/glX_proto_send.py @@ -181,6 +181,15 @@ generic_%u_byte( GLint rop, const void * ptr ) return offset + def large_emit_begin(self, indent, f): + print '%s const GLint op = %s;' % (indent, f.opcode_real_name()) + print '%s const GLuint cmdlenLarge = cmdlen + 4;' % (indent) + print '%s GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);' % (indent) + print '%s (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);' % (indent) + print '%s (void) memcpy((void *)(pc + 4), (void *)(&op), 4);' % (indent) + return + + def common_func_print_just_header(self, f): print '#define %s %d' % (f.opcode_name(), f.opcode_value()) @@ -316,11 +325,8 @@ generic_%u_byte( GLint rop, const void * ptr ) if f.can_be_large: print '%s}' % (indent) print '%selse {' % (indent) - print '%s const GLint op = %s;' % (indent, f.opcode_real_name()) - print '%s const GLuint cmdlenLarge = cmdlen + 4;' % (indent) - print '%s GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);' % (indent) - print '%s (void) memcpy((void *)(pc + 0), (void *)(&op), 4);' % (indent) - print '%s (void) memcpy((void *)(pc + 4), (void *)(&cmdlenLarge), 4);' % (indent) + + self.large_emit_begin(indent, f) offset = self.common_emit_args(f, "pc", indent, 8, 1) p = f.variable_length_parameter() |