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));
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));
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));
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));
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())
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()