st/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBs
authorMarek Olšák <marek.olsak@amd.com>
Fri, 16 Sep 2016 20:39:15 +0000 (22:39 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 19 Oct 2016 17:26:30 +0000 (19:26 +0200)
v2: rebased

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_blend.c
src/mesa/state_tracker/st_atom_depth.c

index 76d6a644a58290109c03794360c31f9834f30edc..b8d65bde29ebf48ace9f6835932924a453604952 100644 (file)
@@ -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.
        */
index 267b42c539f50709f223d1116de2c9de5aca3215..7092c3f83ec9d0868b67194645e5d2648695b930 100644 (file)
@@ -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;