summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-09-16 22:39:15 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-10-19 19:26:30 +0200
commit54f8efeb022de8686db18c49daf14e6771f0fda1 (patch)
treee69e34bab5b0fcc1b69e39eab5efbade685bc9c3
parentc64da9d4997692bd25253dfc19e34d6fa335a58b (diff)
downloadexternal_mesa3d-54f8efeb022de8686db18c49daf14e6771f0fda1.zip
external_mesa3d-54f8efeb022de8686db18c49daf14e6771f0fda1.tar.gz
external_mesa3d-54f8efeb022de8686db18c49daf14e6771f0fda1.tar.bz2
st/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBs
v2: rebased Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c3
-rw-r--r--src/mesa/state_tracker/st_atom_depth.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 76d6a644..b8d65bd 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -266,7 +266,8 @@ update_blend( struct st_context *st )
blend->dither = ctx->Color.DitherFlag;
if (ctx->Multisample.Enabled &&
- ctx->DrawBuffer->Visual.sampleBuffers > 0) {
+ ctx->DrawBuffer->Visual.sampleBuffers > 0 &&
+ !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
/* Unlike in gallium/d3d10 these operations are only performed
* if both msaa is enabled and we have a multisample buffer.
*/
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 267b42c..7092c3f 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -149,7 +149,8 @@ update_depth_stencil_alpha(struct st_context *st)
}
}
- if (ctx->Color.AlphaEnabled) {
+ if (ctx->Color.AlphaEnabled &&
+ !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
dsa->alpha.enabled = 1;
dsa->alpha.func = st_compare_func_to_pipe(ctx->Color.AlphaFunc);
dsa->alpha.ref_value = ctx->Color.AlphaRefUnclamped;