mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 02:10:12 +01:00
mesa: don't flush vertices and don't flag _NEW_COLOR in ClearColor, ClearIndex
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
9f3985238f
commit
3140d132ef
1 changed files with 12 additions and 37 deletions
|
|
@ -46,10 +46,6 @@ _mesa_ClearIndex( GLfloat c )
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (ctx->Color.ClearIndex == (GLuint) c)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.ClearIndex = (GLuint) c;
|
||||
}
|
||||
|
||||
|
|
@ -71,19 +67,12 @@ _mesa_ClearIndex( GLfloat c )
|
|||
void GLAPIENTRY
|
||||
_mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
|
||||
{
|
||||
GLfloat tmp[4];
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
tmp[0] = red;
|
||||
tmp[1] = green;
|
||||
tmp[2] = blue;
|
||||
tmp[3] = alpha;
|
||||
|
||||
if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.f))
|
||||
return; /* no change */
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
COPY_4V(ctx->Color.ClearColor.f, tmp);
|
||||
ctx->Color.ClearColor.f[0] = red;
|
||||
ctx->Color.ClearColor.f[1] = green;
|
||||
ctx->Color.ClearColor.f[2] = blue;
|
||||
ctx->Color.ClearColor.f[3] = alpha;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -93,19 +82,12 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
|
|||
void GLAPIENTRY
|
||||
_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
|
||||
{
|
||||
GLint tmp[4];
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
tmp[0] = r;
|
||||
tmp[1] = g;
|
||||
tmp[2] = b;
|
||||
tmp[3] = a;
|
||||
|
||||
if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.i))
|
||||
return; /* no change */
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
COPY_4V(ctx->Color.ClearColor.i, tmp);
|
||||
ctx->Color.ClearColor.i[0] = r;
|
||||
ctx->Color.ClearColor.i[1] = g;
|
||||
ctx->Color.ClearColor.i[2] = b;
|
||||
ctx->Color.ClearColor.i[3] = a;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -115,19 +97,12 @@ _mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
|
|||
void GLAPIENTRY
|
||||
_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
|
||||
{
|
||||
GLuint tmp[4];
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
tmp[0] = r;
|
||||
tmp[1] = g;
|
||||
tmp[2] = b;
|
||||
tmp[3] = a;
|
||||
|
||||
if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.ui))
|
||||
return; /* no change */
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
COPY_4V(ctx->Color.ClearColor.ui, tmp);
|
||||
ctx->Color.ClearColor.ui[0] = r;
|
||||
ctx->Color.ClearColor.ui[1] = g;
|
||||
ctx->Color.ClearColor.ui[2] = b;
|
||||
ctx->Color.ClearColor.ui[3] = a;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue