summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 50147f329f6..70b57b917c9 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -71,6 +71,8 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
}
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA);
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ _swrast_span_default_secondary_color(ctx, &span);
if (ctx->Depth.Test)
_swrast_span_default_z(ctx, &span);
if (swrast->_FogEnabled)
@@ -441,7 +443,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_Z);
_swrast_span_default_color(ctx, &span);
-
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ _swrast_span_default_secondary_color(ctx, &span);
if (swrast->_FogEnabled)
_swrast_span_default_fog(ctx, &span);
if (ctx->Texture._EnabledCoordUnits)
@@ -562,6 +565,8 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
return;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA);
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ _swrast_span_default_secondary_color(ctx, &span);
if (ctx->Depth.Test)
_swrast_span_default_z(ctx, &span);
if (swrast->_FogEnabled)