summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-14 10:20:29 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-14 10:23:56 -0600
commitc45a525cdc4bd5f9b35c4f6abae6a65f3279e2c4 (patch)
tree88dec52c30b99a03ac9cb4df1d7289b33682ab68 /src/mesa/vbo/vbo_exec_api.c
parentee55eaa609aee9ffd7ddbc839d7d6161727cee3a (diff)
mesa: revert fast-track glColor and similar calls when not immediate mode rendering
Revert commit d08cd68d3f5456b69ad504ede2b090c0bb6474db This change caused some glean tests to fail. The alpha value of colors was always 1.0 instead of the value from glColor4fv(). The mesa color array found in st_draw() has size=3 instead of size=4.
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 35dc0e768f..b7f4d8a307 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -309,23 +309,16 @@ static void vbo_exec_fixup_vertex( GLcontext *ctx,
GLuint attr, GLuint sz )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- static const GLfloat id[4] = { 0, 0, 0, 1 };
int i;
- if (exec->vtx.prim_count == 0) {
- GLfloat *current = (GLfloat *)vbo_context(ctx)->currval[attr].Ptr;
- exec->vtx.attrptr[attr] = current;
- memcpy(current, id, sizeof(id));
- ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
- return;
- }
- else if (sz > exec->vtx.attrsz[attr]) {
+ if (sz > exec->vtx.attrsz[attr]) {
/* New size is larger. Need to flush existing vertices and get
* an enlarged vertex format.
*/
vbo_exec_wrap_upgrade_vertex( exec, attr, sz );
}
else if (sz < exec->vtx.active_sz[attr]) {
+ static const GLfloat id[4] = { 0, 0, 0, 1 };
/* New size is smaller - just need to fill in some
* zeros. Don't need to flush or wrap.