summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-09-12 10:57:40 +0100
committerDave Airlie <[email protected]>2011-09-14 11:18:07 +0100
commit093dc9e548537e6c77e33064a584f849ad90dfa5 (patch)
tree4a3ecd84f123cd89a29fea6700603a5da53d62cb /src/mesa/drivers/common
parentb06613c6cc029c3ff200430b0706b5229c4508bd (diff)
mesa: introduce a clear color union to be used for int/unsigned buffers
This introduces a new gl_color_union union and moves the current ClearColorUnclamped to use it, it removes current ClearColor completely and renames CCU to CC, then all drivers are modified to expected unclamped floats instead. also fixes st to use translated color in one place it wasn't. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 2ebcd35bd11..482bd98a254 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1569,10 +1569,10 @@ _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers)
/* vertex colors */
for (i = 0; i < 4; i++) {
- verts[i].r = ctx->Color.ClearColorUnclamped[0];
- verts[i].g = ctx->Color.ClearColorUnclamped[1];
- verts[i].b = ctx->Color.ClearColorUnclamped[2];
- verts[i].a = ctx->Color.ClearColorUnclamped[3];
+ verts[i].r = ctx->Color.ClearColor.f[0];
+ verts[i].g = ctx->Color.ClearColor.f[1];
+ verts[i].b = ctx->Color.ClearColor.f[2];
+ verts[i].a = ctx->Color.ClearColor.f[3];
}
/* upload new vertex data */
@@ -1679,7 +1679,7 @@ _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers)
_mesa_UseProgramObjectARB(clear->ShaderProg);
_mesa_Uniform4fvARB(clear->ColorLocation, 1,
- ctx->Color.ClearColorUnclamped);
+ ctx->Color.ClearColor.f);
_mesa_BindVertexArray(clear->ArrayObj);
_mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO);