GLsizeiptr size;
GLenum usage;
bool data_null; /* If set, no data follows for "data" */
- /* Next size bytes are GLvoid data[size] */
+ /* Next size bytes are GLubyte data[size] */
};
void
const GLenum target = cmd->target;
const GLsizeiptr size = cmd->size;
const GLenum usage = cmd->usage;
- const char *variable_data = (const char *) (cmd + 1);
- const GLvoid *data = (const GLvoid *) variable_data;
+ const void *data;
if (cmd->data_null)
data = NULL;
else
- variable_data += size;
+ data = (const void *) (cmd + 1);
CALL_BufferData(ctx->CurrentServerDispatch, (target, size, data, usage));
}
cmd->target = target;
cmd->size = size;
cmd->usage = usage;
- char *variable_data = (char *) (cmd + 1);
cmd->data_null = !data;
- if (!cmd->data_null) {
+ if (data) {
+ char *variable_data = (char *) (cmd + 1);
memcpy(variable_data, data, size);
- variable_data += size;
}
_mesa_post_marshal_hook(ctx);
} else {
GLenum target;
GLintptr offset;
GLsizeiptr size;
- /* Next size bytes are GLvoid data[size] */
+ /* Next size bytes are GLubyte data[size] */
};
void
const GLenum target = cmd->target;
const GLintptr offset = cmd->offset;
const GLsizeiptr size = cmd->size;
- const char *variable_data = (const char *) (cmd + 1);
- const GLvoid *data = (const GLvoid *) variable_data;
+ const void *data = (const void *) (cmd + 1);
- variable_data += size;
CALL_BufferSubData(ctx->CurrentServerDispatch,
(target, offset, size, data));
}
cmd->size = size;
char *variable_data = (char *) (cmd + 1);
memcpy(variable_data, data, size);
- variable_data += size;
_mesa_post_marshal_hook(ctx);
} else {
_mesa_glthread_finish(ctx);