diff options
author | Marek Olšák <[email protected]> | 2012-08-04 13:32:21 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-08-15 19:20:57 +0200 |
commit | 03b78ceb50b97611bcaa2d2354ff5b505306b0a1 (patch) | |
tree | bda50f89370a73f757400031bd1491962278197f /src/mesa/state_tracker | |
parent | e06d6168cb4367728fac68264757a700932c2f73 (diff) |
st/mesa: don't clamp fragment color with integer colorbuffer
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 6 |
4 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 204f505a69f..d9e9d21f688 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -239,7 +239,8 @@ static void update_raster_state( struct st_context *st ) /* _NEW_FRAG_CLAMP */ raster->clamp_fragment_color = !st->clamp_frag_color_in_shader && - ctx->Color._ClampFragmentColor; + ctx->Color._ClampFragmentColor && + !ctx->DrawBuffer->_IntegerColor; raster->gl_rasterization_rules = 1; /* _NEW_RASTERIZER_DISCARD */ diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index ae3491097b4..45e7a117f5c 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -85,7 +85,8 @@ update_fp( struct st_context *st ) /* _NEW_FRAG_CLAMP */ key.clamp_color = st->clamp_frag_color_in_shader && - st->ctx->Color._ClampFragmentColor; + st->ctx->Color._ClampFragmentColor && + !st->ctx->DrawBuffer->_IntegerColor; st->fp_variant = st_get_fp_variant(st, stfp, &key); @@ -106,7 +107,7 @@ update_fp( struct st_context *st ) const struct st_tracked_state st_update_fp = { "st_update_fp", /* name */ { /* dirty */ - 0, /* mesa */ + _NEW_BUFFERS, /* mesa */ ST_NEW_FRAGMENT_PROGRAM /* st */ }, update_fp /* update */ diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 3c17bd6c359..7d9ccc1e5a0 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -424,7 +424,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, key.st = st; key.bitmap = GL_TRUE; key.clamp_color = st->clamp_frag_color_in_shader && - st->ctx->Color._ClampFragmentColor; + st->ctx->Color._ClampFragmentColor && + !st->ctx->DrawBuffer->_IntegerColor; fpv = st_get_fp_variant(st, st->fp, &key); diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 88068ac6078..9f1b427a940 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -697,7 +697,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 = !st->clamp_frag_color_in_shader && - ctx->Color._ClampFragmentColor; + ctx->Color._ClampFragmentColor && + !ctx->DrawBuffer->_IntegerColor; rasterizer.gl_rasterization_rules = 1; rasterizer.depth_clip = !ctx->Transform.DepthClamp; rasterizer.scissor = ctx->Scissor.Enabled; @@ -1026,7 +1027,8 @@ get_color_fp_variant(struct st_context *st) ctx->Pixel.AlphaScale != 1.0); key.pixelMaps = ctx->Pixel.MapColorFlag; key.clamp_color = st->clamp_frag_color_in_shader && - st->ctx->Color._ClampFragmentColor; + st->ctx->Color._ClampFragmentColor && + !st->ctx->DrawBuffer->_IntegerColor; fpv = st_get_fp_variant(st, st->fp, &key); |