/* Custom Mesa types to save space. */
+typedef unsigned char GLenum8; /* only for primitive modes */
typedef unsigned short GLenum16;
typedef unsigned char GLbitfield8;
typedef unsigned short GLbitfield16;
{
struct marshal_cmd_base cmd_base;
bool index_bounds_valid;
- GLenum16 mode;
+ GLenum8 mode;
GLenum16 type;
GLsizei count;
GLsizei instance_count;
struct marshal_cmd_DrawElementsInstancedBaseVertexBaseInstance *cmd;
cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DrawElementsInstancedBaseVertexBaseInstance, cmd_size);
- cmd->mode = MIN2(mode, 0xffff);
+ cmd->mode = MIN2(mode, 0xff); /* primitive types go from 0 to 14 */
cmd->type = MIN2(type, 0xffff);
cmd->count = count;
cmd->indices = indices;
{
struct marshal_cmd_base cmd_base;
bool has_base_vertex;
- GLenum16 mode;
+ GLenum8 mode;
GLenum16 type;
GLsizei draw_count;
GLuint user_buffer_mask;
}
cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiDrawElementsBaseVertex, cmd_size);
- cmd->mode = MIN2(mode, 0xffff);
+ cmd->mode = MIN2(mode, 0xff); /* primitive types go from 0 to 14 */
cmd->type = MIN2(type, 0xffff);
cmd->draw_count = draw_count;
cmd->user_buffer_mask = user_buffer_mask;