diff options
author | Timothy Arceri <[email protected]> | 2017-03-30 21:24:13 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-31 13:43:38 +1100 |
commit | 94224950ddb609bfbee1ffb0ca3621c0bda6101f (patch) | |
tree | c067934e927f9cfb3815aaef063165affb2167f7 /src/mesa/drivers | |
parent | 2e70de7d2f703cf81cbe114a99f6328045143c26 (diff) |
mesa: move FLUSH_VERTICES() call to meta
There is no need for this to be in the common code.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index d8deaaf3713..efbc93402e1 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -321,13 +321,14 @@ _mesa_meta_setup_vertex_objects(struct gl_context *ctx, GL_DYNAMIC_DRAW, __func__); /* setup vertex arrays */ + FLUSH_VERTICES(ctx, 0); if (use_generic_attributes) { assert(color_size == 0); _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_GENERIC(0), vertex_size, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, x), true); + offsetof(struct vertex, x)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(0), *buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, @@ -336,7 +337,7 @@ _mesa_meta_setup_vertex_objects(struct gl_context *ctx, _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_GENERIC(1), texcoord_size, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, tex), false); + offsetof(struct vertex, tex)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(1), *buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, @@ -346,7 +347,7 @@ _mesa_meta_setup_vertex_objects(struct gl_context *ctx, _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_POS, vertex_size, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, x), true); + offsetof(struct vertex, x)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS, *buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS); @@ -355,7 +356,7 @@ _mesa_meta_setup_vertex_objects(struct gl_context *ctx, _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_TEX(0), vertex_size, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, tex), false); + offsetof(struct vertex, tex)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(0), *buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_TEX(0)); @@ -365,7 +366,7 @@ _mesa_meta_setup_vertex_objects(struct gl_context *ctx, _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_COLOR0, vertex_size, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, r), false); + offsetof(struct vertex, r)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_COLOR0, *buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_COLOR0); @@ -3319,20 +3320,22 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GL_DYNAMIC_DRAW, __func__); /* setup vertex arrays */ + FLUSH_VERTICES(ctx, 0); _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_POS, 3, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, x), true); + offsetof(struct vertex, x)); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS, drawtex->buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS); for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { + FLUSH_VERTICES(ctx, 0); _mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_TEX(i), 2, GL_FLOAT, GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, - offsetof(struct vertex, st[i]), true); + offsetof(struct vertex, st[i])); _mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(i), drawtex->buf_obj, 0, sizeof(struct vertex)); _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_TEX(i)); |