st/mesa: check correctly if multisampling is enabled
[mesa.git] / src / mesa / state_tracker / st_atom_blend.c
index 74289979c11212844f2efd7207e05d73e0f77141..43b16f8905d767d1572c0629834f0d353abd5800 100644 (file)
@@ -39,6 +39,7 @@
 #include "pipe/p_defines.h"
 #include "cso_cache/cso_context.h"
 
+#include "framebuffer.h"
 #include "main/macros.h"
 
 /**
@@ -265,8 +266,7 @@ st_update_blend( struct st_context *st )
 
    blend->dither = ctx->Color.DitherFlag;
 
-   if (ctx->Multisample.Enabled &&
-       ctx->DrawBuffer->Visual.sampleBuffers > 0 &&
+   if (_mesa_is_multisample_enabled(ctx) &&
        !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
       /* Unlike in gallium/d3d10 these operations are only performed
        * if both msaa is enabled and we have a multisample buffer.