aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 13c4f3369..386eed290 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -684,7 +684,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
{
struct pipe_rasterizer_state rasterizer;
memset(&rasterizer, 0, sizeof(rasterizer));
- rasterizer.clamp_fragment_color = ctx->Color._ClampFragmentColor;
+ rasterizer.clamp_fragment_color = !st->clamp_frag_color_in_shader &&
+ ctx->Color._ClampFragmentColor;
rasterizer.gl_rasterization_rules = 1;
rasterizer.depth_clip = !ctx->Transform.DepthClamp;
rasterizer.scissor = ctx->Scissor.Enabled;
@@ -1007,6 +1008,8 @@ get_color_fp_variant(struct st_context *st)
ctx->Pixel.AlphaBias != 0.0 ||
ctx->Pixel.AlphaScale != 1.0);
key.pixelMaps = ctx->Pixel.MapColorFlag;
+ key.clamp_color = st->clamp_frag_color_in_shader &&
+ st->ctx->Color._ClampFragmentColor;
fpv = st_get_fp_variant(st, st->fp, &key);