summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/blend.c
diff options
context:
space:
mode:
authorLaura Ekstrand <laura@jlekstrand.net>2015-02-03 11:42:17 -0800
committerFredrik Höglund <fredrik@kde.org>2015-05-14 15:48:14 +0200
commitc1fe8d841c4746a6371dde569c6c88c6c2bad4e6 (patch)
treef5f5ecc6274deb932dceee3390951b31b6038bb8 /src/mesa/main/blend.c
parent9036a6c0aa0637a1cd756836006dc8565b15a478 (diff)
downloadexternal_mesa3d-c1fe8d841c4746a6371dde569c6c88c6c2bad4e6.zip
external_mesa3d-c1fe8d841c4746a6371dde569c6c88c6c2bad4e6.tar.gz
external_mesa3d-c1fe8d841c4746a6371dde569c6c88c6c2bad4e6.tar.bz2
main: Refactor _mesa_[update|get]_clamp_vertex_color.
Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Diffstat (limited to 'src/mesa/main/blend.c')
-rw-r--r--src/mesa/main/blend.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 774fc88..ee76b47 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -769,7 +769,7 @@ _mesa_ClampColor(GLenum target, GLenum clamp)
}
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.ClampVertexColor = clamp;
- _mesa_update_clamp_vertex_color(ctx);
+ _mesa_update_clamp_vertex_color(ctx, ctx->DrawBuffer);
break;
case GL_CLAMP_FRAGMENT_COLOR_ARB:
if (ctx->API == API_OPENGL_CORE &&
@@ -814,9 +814,10 @@ _mesa_get_clamp_fragment_color(const struct gl_context *ctx)
}
GLboolean
-_mesa_get_clamp_vertex_color(const struct gl_context *ctx)
+_mesa_get_clamp_vertex_color(const struct gl_context *ctx,
+ const struct gl_framebuffer *drawFb)
{
- return get_clamp_color(ctx->DrawBuffer, ctx->Light.ClampVertexColor);
+ return get_clamp_color(drawFb, ctx->Light.ClampVertexColor);
}
GLboolean
@@ -848,9 +849,11 @@ _mesa_update_clamp_fragment_color(struct gl_context *ctx)
* Update the ctx->Color._ClampVertexColor field
*/
void
-_mesa_update_clamp_vertex_color(struct gl_context *ctx)
+_mesa_update_clamp_vertex_color(struct gl_context *ctx,
+ const struct gl_framebuffer *drawFb)
{
- ctx->Light._ClampVertexColor = _mesa_get_clamp_vertex_color(ctx);
+ ctx->Light._ClampVertexColor =
+ _mesa_get_clamp_vertex_color(ctx, drawFb);
}
/**