On 15 August 2012 19:17, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>These changes are required to enable dual-src-blending test cases to use the<br>
shared code:<br>
Generate fragment shader which outputs relevant color values.<br>
Modify compute_expected_color() function to support dual-src-blending.<br>
<br>
</div>V2: Removed unnecessary blitting code in case of dual-src-blending.<br>
    Also set src1_alpha to 1.0 when sample-alpha-to-one is enabled.<br>
<div><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
---<br>
 .../alpha-to-coverage-no-draw-buffer-zero.cpp      |    3 +-<br>
 .../alpha-to-one-msaa-disabled.cpp                 |    3 +-<br>
 .../alpha-to-one-single-sample-buffer.cpp          |    3 +-<br>
 .../draw-buffers-alpha-to-coverage.cpp             |    3 +-<br>
 .../draw-buffers-alpha-to-one.cpp                  |    3 +-<br>
</div> .../draw-buffers-common.cpp                        |  180 +++++++++++++++----<br>
<div> .../draw-buffers-common.h                          |    2 +-<br>
 .../int-draw-buffers-alpha-to-coverage.cpp         |    3 +-<br>
 .../int-draw-buffers-alpha-to-one.cpp              |    3 +-<br>
 .../sample-alpha-to-coverage.cpp                   |    5 +-<br>
 .../sample-alpha-to-one.cpp                        |    3 +-<br>
</div> 11 files changed, 162 insertions(+), 49 deletions(-)<br>
<br>
diff --git a/tests/spec/ext_framebuffer_multisample/alpha-to-coverage-no-draw-buffer-zero.cpp b/tests/spec/ext_framebuffer_multisample/alpha-to-coverage-no-draw-buffer-zero.cpp<br>
index ef60778..18ac8eb 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/alpha-to-coverage-no-draw-buffer-zero.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/alpha-to-coverage-no-draw-buffer-zero.cpp<br>
@@ -97,7 +97,8 @@ piglit_init(int argc, char **argv)<br>
<div>                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_NONE /* color_buffer_zero_format */);<br>
-       shader_compile();<br>
</div>+       shader_compile(true /* sample_alpha_to_coverage */,<br>
<div>+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/alpha-to-one-msaa-disabled.cpp b/tests/spec/ext_framebuffer_multisample/alpha-to-one-msaa-disabled.cpp<br>
index 2ad09fd..c0e1ea7 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/alpha-to-one-msaa-disabled.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/alpha-to-one-msaa-disabled.cpp<br>
@@ -87,7 +87,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(false /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/alpha-to-one-single-sample-buffer.cpp b/tests/spec/ext_framebuffer_multisample/alpha-to-one-single-sample-buffer.cpp<br>
</div>index 6bc390a..4f58e02 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/alpha-to-one-single-sample-buffer.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/alpha-to-one-single-sample-buffer.cpp<br>
@@ -65,7 +65,8 @@ piglit_init(int argc, char **argv)<br>
<div>                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(false /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
</div><div><div>diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-coverage.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-coverage.cpp<br>
index 20a69bc..31213f6 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-coverage.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-coverage.cpp<br>
@@ -95,7 +95,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(true /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-one.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-one.cpp<br>
index 66bfd1c..53127aa 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-one.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-alpha-to-one.cpp<br>
@@ -116,7 +116,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(false /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp<br>
</div></div>index 8876568..0f51ec1 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp<br>
@@ -88,6 +88,7 @@ static int pattern_width;<br>
<div> static int pattern_height;<br>
<br>
 static bool is_buffer_zero_integer_format = false;<br>
+static bool is_dual_src_blending = false;<br>
</div><div> static GLenum draw_buffer_zero_format;<br>
<br>
 static const int num_components = 4; /* for RGBA formats */<br>
</div>@@ -116,30 +117,31 @@ static const char *vert =<br>
<div><div>        "  gl_Position = vec4(eye_pos.xy, 2 * depth - 1.0, 1.0);\n"<br>
        "}\n";<br>
<br>
-/* Fragment shader outputs to three draw buffers. Output different alpha values<br>
- * to different draw buffers. This is required to verify that alpha values from<br>
- * draw buffer zero are used to determine the fragment coverage value for all<br>
- * the draw buffers.<br>
+/* Fragment shader generates three different color outputs. Different color<br>
+ * values are generated based on if sample_alpha_to_coverage / dual_src_blend<br>
+ * are enabled or not.<br>
  */<br>
 static const char *frag_template =<br>
        "#version 130\n"<br>
+       "#define DUAL_SRC_BLEND %d\n"<br>
+       "#define ALPHA_TO_COVERAGE %d\n"<br>
        "#define OUT_TYPE %s\n"<br>
        "out OUT_TYPE frag_out_0;\n"<br>
        "out vec4 frag_out_1;\n"<br>
        "out vec4 frag_out_2;\n"<br>
        "uniform OUT_TYPE frag_0_color;\n"<br>
        "uniform vec4 color;\n"<br>
-       "uniform bool alphatocoverage;\n"<br>
        "void main()\n"<br>
        "{\n"<br>
        "  frag_out_0 = frag_0_color;\n"<br>
-       "  if(alphatocoverage) {\n"<br>
+       "  #if DUAL_SRC_BLEND\n"<br>
+       "    frag_out_1 = vec4(color.rgb, 1.0 - color.a / 2.0);\n"<br>
+       "  #elif ALPHA_TO_COVERAGE\n"<br>
        "    frag_out_1 = vec4(color.rgb, color.a / 2);\n"<br>
        "    frag_out_2 = vec4(color.rgb, color.a / 4);\n"<br>
-       "  }\n"<br>
-       "  else {\n"<br>
+       "  #else\n"<br>
        "    frag_out_1 = frag_out_2 = color;\n"<br>
-       "  }\n"<br>
+       "  #endif\n"<br>
        "}\n";<br>
<br>
 const char *<br>
</div></div>@@ -151,16 +153,19 @@ get_out_type_glsl(void)<br>
<div>                return "vec4";<br>
 }<br>
 void<br>
-shader_compile(void)<br>
+shader_compile(bool sample_alpha_to_coverage, bool dual_src_blend)<br>
 {<br>
+       is_dual_src_blending = dual_src_blend;<br>
</div><div>        /* Compile program */<br>
        GLint vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vert);<br>
<br>
+       /* Generate appropriate fragment shader program */<br>
        const char *out_type_glsl = get_out_type_glsl();;<br>
         unsigned frag_alloc_len = strlen(frag_template) +<br>
                                  strlen(out_type_glsl) + 1;<br>
        char *frag = (char *) malloc(frag_alloc_len);<br>
-       sprintf(frag, frag_template, out_type_glsl);<br>
+       sprintf(frag, frag_template, is_dual_src_blending,<br>
+               sample_alpha_to_coverage, out_type_glsl);<br>
<br>
        GLint fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, frag);<br>
        prog = piglit_link_simple_program(vs, fs);<br>
</div>@@ -170,12 +175,18 @@ shader_compile(void)<br>
<div>        }<br>
        free(frag);<br>
<br>
-       glBindFragDataLocation(prog, 0, "frag_out_0");<br>
-       /* For multiple draw buffers */<br>
-       if (num_draw_buffers > 1) {<br>
+       if (is_dual_src_blending) {<br>
+               glBindFragDataLocationIndexed(prog, 0, 0, "frag_out_0");<br>
+               glBindFragDataLocationIndexed(prog, 0, 1, "frag_out_1");<br>
+<br>
+       }<br>
+       else if (num_draw_buffers > 1) {<br>
+               glBindFragDataLocation(prog, 0, "frag_out_0");<br>
                glBindFragDataLocation(prog, 1, "frag_out_1");<br>
                glBindFragDataLocation(prog, 2, "frag_out_2");<br>
        }<br>
+       else<br>
+               glBindFragDataLocation(prog, 0, "frag_out_0");<br>
<br>
        glBindAttribLocation(prog, 0, "pos");<br>
        glEnableVertexAttribArray(0);<br>
</div>@@ -331,6 +342,76 @@ draw_pattern(bool sample_alpha_to_coverage,<br>
        free(integer_color);<br>
<div><div> }<br>
<br>
+float<br>
+get_alpha_blend_factor(float src0_alpha, float src1_alpha,<br>
+                      bool compute_src)<br>
+{<br>
+       GLint blend_func;<br>
+       if(compute_src)<br>
+               glGetIntegerv(GL_BLEND_SRC_RGB, &blend_func);<br>
+       else<br>
+               glGetIntegerv(GL_BLEND_DST_RGB, &blend_func);<br>
+<br>
+       switch(blend_func) {<br>
+               case GL_SRC_ALPHA:<br>
+                       return src0_alpha;<br>
+                       break;<br>
+               case GL_ONE_MINUS_SRC_ALPHA:<br>
+                       return (1.0 - src0_alpha);<br>
+                       break;<br>
+               case GL_SRC1_ALPHA:<br>
+                       return src1_alpha;<br>
+                       break;<br>
+               case GL_ONE_MINUS_SRC1_ALPHA:<br>
+                       return (1.0 - src1_alpha);<br>
+                       break;<br>
+               default:<br>
+                       printf("Blend function is not supported"<br>
+                              " by test case\n");<br>
+       }<br>
</div></div>+       return -1;<br>
+}<br>
<div>+<br>
+void<br>
+compute_blend_color(float *frag_color, int rect_count,<br>
+                   bool sample_alpha_to_one)<br>
+{<br>
+       float src_blend_factor, dst_blend_factor;<br>
+       /* Taking in to account alpha values output by<br>
+        * fragment shader.<br>
+        */<br>
+       float src0_alpha = color[rect_count * num_components + 3];<br>
+       float src1_alpha =  1.0 - src0_alpha / 2.0;<br>
+<br>
+       if(sample_alpha_to_one && num_samples) {<br>
</div>+               /* Set fragment src0_alpha, src1_alpha to 1.0 and use them<br>
+                * to compute blending factors.<br>
<div>+                */<br>
+               src0_alpha = 1.0;<br>
</div>+               src1_alpha = 1.0;<br>
<div>+       }<br>
+<br>
+       src_blend_factor = get_alpha_blend_factor(src0_alpha,<br>
+                                                 src1_alpha,<br>
+                                                 true);<br>
+       dst_blend_factor = get_alpha_blend_factor(src0_alpha,<br>
+                                                 src1_alpha,<br>
+                                                 false);<br>
+       /* Using default BlendEquation, blend_color is:<br>
+        * src0_color * src_blend_factor + dst_color * dst_blend_factor<br>
+        */<br>
+       for (int j = 0; j < num_components; j++) {<br>
+               float blend_color=<br>
</div>+               color[rect_count * num_components + j] *<br>
<div>+               src_blend_factor +<br>
+               bg_color[j] *<br>
+               dst_blend_factor;<br>
+<br>
+               frag_color[rect_count * num_components + j] =<br>
+                       (blend_color > 1) ? 1.0 : blend_color;<br>
+       }<br>
+}<br>
+<br>
 void<br>
 compute_expected_color(bool sample_alpha_to_coverage,<br>
                       bool sample_alpha_to_one,<br>
</div>@@ -339,18 +420,9 @@ compute_expected_color(bool sample_alpha_to_coverage,<br>
<div>        unsigned buffer_idx_offset = draw_buffer_count *<br>
                                     num_rects *<br>
                                     num_components;<br>
-       /* Coverage value decides the number of samples in multisample buffer<br>
-        * covered by an incoming fragment, which will then receive the<br>
-        * fragment data. When the multisample buffer is resolved it gets<br>
-        * blended with the background color which is written to the remaining<br>
-        * samples.<br>
-        * Page 254 (page 270 of the PDF) of the OpenGL 3.0 spec says:<br>
-        * "The method of combination is not specified, though a simple average<br>
-        * computed independently for each color component is recommended."<br>
-        * This is followed by NVIDIA and AMD in their proprietary drivers.<br>
-        */<br>
</div><div>        for (int i = 0; i < num_rects; i++) {<br>
<br>
+               float *frag_color = NULL;<br>
                float samples_used = coverage[i] * num_samples;<br>
                /* Expected color values are computed only for integer<br>
                 * number of samples_used. Non-integer values may result<br>
</div>@@ -359,21 +431,49 @@ compute_expected_color(bool sample_alpha_to_coverage,<br>
<div>                if(samples_used == (int) samples_used) {<br>
                        int rect_idx_offset = buffer_idx_offset +<br>
                                              i * num_components;<br>
</div>+                       frag_color = (float *) malloc(num_rects *<br>
<div>+                                                     num_components *<br>
+                                                     sizeof(float));<br>
+<br>
+                       /* Do dual source blending computations */<br>
+                       if(is_dual_src_blending) {<br>
</div>+                               compute_blend_color(frag_color,<br>
<div>+                                                   i /* rect_count */,<br>
+                                                   sample_alpha_to_one);<br>
+                       }<br>
+                       else {<br>
</div>+                               memcpy(frag_color, color,<br>
+                                      num_rects * num_components *<br>
+                                      sizeof(float));<br>
+                       }<br>
<div>+<br>
+                       /* Coverage value decides the number of samples in<br>
+                        * multisample buffer covered by an incoming fragment,<br>
+                        * which will then receive the fragment data. When the<br>
+                        * multisample buffer is resolved it gets blended with<br>
+                        * the background color which is written to the<br>
+                        * remaining samples. Page 254 (page 270 of the PDF) of<br>
+                        * the OpenGL 3.0 spec says: "The method of combination<br>
+                        * is not specified, though a simple average computed<br>
+                        * independently for each color component is recommended."<br>
+                        * This is followed by NVIDIA and AMD in their proprietary<br>
+                        * linux drivers.<br>
+                        */<br>
                        for (int j = 0; j < num_components - 1 ; j++) {<br>
<br>
                                expected_color[rect_idx_offset + j] =<br>
-                               color[i * num_components + j] * coverage[i] +<br>
+                               frag_color[i * num_components + j] * coverage[i] +<br>
                                bg_color[j] * (1 - coverage[i]);<br>
                        }<br>
<br>
                        /* Compute expected alpha values of draw buffers */<br>
</div>-                       float frag_alpha = color[i * num_components + 3];<br>
+                       float frag_alpha = frag_color[i * num_components + 3];<br>
<div>                        int alpha_idx = rect_idx_offset + 3;<br>
<br>
                        if ((!num_samples &&<br>
                             !sample_alpha_to_coverage) ||<br>
                            is_buffer_zero_integer_format) {<br>
-                               /* Taking in account alpha values modified by<br>
</div><div>+                               /* Taking in to account alpha values output by<br>
</div><div>                                 * fragment shader.<br>
                                 */<br>
                                expected_color[alpha_idx] =<br>
</div>@@ -382,7 +482,7 @@ compute_expected_color(bool sample_alpha_to_coverage,<br>
<div>                                        frag_alpha;<br>
                        }<br>
                        else if (sample_alpha_to_coverage) {<br>
-                               /* Taking in account alpha values modified by<br>
</div><div>+                               /* Taking in to account alpha values output by<br>
</div>                                 * fragment shader.<br>
                                 */<br>
                                frag_alpha /= (1 << draw_buffer_count);<br>
@@ -402,6 +502,7 @@ compute_expected_color(bool sample_alpha_to_coverage,<br>
                                        sample_alpha_to_one ? 1.0 : frag_alpha;<br>
                        }<br>
                }<br>
+               free(frag_color);<br>
        }<br>
<br>
 }<br>
@@ -448,11 +549,11 @@ compute_expected(bool sample_alpha_to_coverage,<br>
                /* Don't compute expected color for color buffer zero<br>
                 * if no renderbuffer is attached to it.<br>
                 */<br>
-               if(draw_buffer_count == 0 && draw_buffer_zero_format == GL_NONE)<br>
-                       return;<br>
-               compute_expected_color(sample_alpha_to_coverage,<br>
-                                      sample_alpha_to_one,<br>
-                                      draw_buffer_count);<br>
+               if(draw_buffer_count ||<br>
+                  draw_buffer_zero_format != GL_NONE)<br>
+                       compute_expected_color(sample_alpha_to_coverage,<br>
+                                              sample_alpha_to_one,<br>
+                                              draw_buffer_count);<br></blockquote><div><br>Was this hunk intentional?  It looks like it undoes my suggestion for improving "[PATCH 1/2] msaa: Make few changes to shared code to accomodate no-draw-buffer-zero test".<br>
<br>In any case, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>        }<br>
        else if (buffer_to_test == GL_DEPTH_BUFFER_BIT)<br>
                compute_expected_depth();<br>
</div>@@ -645,15 +746,16 @@ draw_test_image(bool sample_alpha_to_coverage, bool sample_alpha_to_one)<br>
<div>                                  pattern_width, pattern_height + y_offset,<br>
                                  buffer_to_test, GL_NEAREST);<br>
<br>
-               if(buffer_to_test == GL_COLOR_BUFFER_BIT)<br>
-                       draw_image_to_window_system_fb(i /* draw_buffer_count */,<br>
</div>+               if(buffer_to_test == GL_COLOR_BUFFER_BIT) {<br>
+                       draw_image_to_window_system_fb(i /*draw_buffer_count*/,<br>
<div>                                                       false /* rhs */);<br>
+               }<br>
<br>
</div><div>                /* Expected color values for all the draw buffers are computed<br>
                 * to aid probe_framebuffer_color() and probe_framebuffer_depth()<br>
                 * in verification.<br>
                 */<br>
-               if(sample_alpha_to_coverage) {<br>
+               if(sample_alpha_to_coverage || is_dual_src_blending) {<br>
                        /* Expected color is different for different draw<br>
                         * buffers<br>
                         */<br>
</div>@@ -716,8 +818,10 @@ draw_reference_image(bool sample_alpha_to_coverage, bool sample_alpha_to_one)<br>
<div>                                  pattern_width, pattern_height + y_offset,<br>
                                  buffer_to_test, GL_NEAREST);<br>
<br>
-               draw_image_to_window_system_fb(i /* buffer_count */,<br>
-                                              true  /* rhs */ );<br>
+               if(buffer_to_test == GL_COLOR_BUFFER_BIT) {<br>
</div>+                       draw_image_to_window_system_fb(i /*draw_buffer_count*/,<br>
<div>+                                                      true /* rhs */);<br>
+               }<br>
        }<br>
 }<br>
<br>
</div><div>diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.h b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.h<br>
index b36bed3..43a8e42 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.h<br>
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.h<br>
@@ -63,4 +63,4 @@ bool probe_framebuffer_color(void);<br>
  */<br>
 bool probe_framebuffer_depth(void);<br>
<br>
-void shader_compile(void);<br>
+void shader_compile(bool sample_alpha_to_coverage, bool dual_src_blend);<br>
diff --git a/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-coverage.cpp b/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-coverage.cpp<br>
index 40b9ddf..cfd90e5 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-coverage.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-coverage.cpp<br>
@@ -96,7 +96,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA8I);<br>
-       shader_compile();<br>
+       shader_compile(true /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-one.cpp b/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-one.cpp<br>
</div>index 7dae6bf..9827db8 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-one.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/int-draw-buffers-alpha-to-one.cpp<br>
@@ -93,7 +93,8 @@ piglit_init(int argc, char **argv)<br>
<div>                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA8I);<br>
-       shader_compile();<br>
</div>+       shader_compile(false /* sample_alpha_to_coverage */,<br>
<div><div>+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/sample-alpha-to-coverage.cpp b/tests/spec/ext_framebuffer_multisample/sample-alpha-to-coverage.cpp<br>
index 0559adc..38e4ae9 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/sample-alpha-to-coverage.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/sample-alpha-to-coverage.cpp<br>
@@ -28,7 +28,7 @@<br>
  *<br>
  * Verify sample alpha to coverage with multisample FBO<br>
  *<br>
- * When rendering to multiple draw buffers, fragment's alpha value should be<br>
+ * When rendering to multisample FBO, fragment's alpha value should be<br>
  * used to determine the coverage value.<br>
  *<br>
  * This test operates by drawing a pattern in multisample FBO to generate<br>
@@ -103,7 +103,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      buffer_to_test,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(true /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
diff --git a/tests/spec/ext_framebuffer_multisample/sample-alpha-to-one.cpp b/tests/spec/ext_framebuffer_multisample/sample-alpha-to-one.cpp<br>
index 76d056f..85a08d5 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/sample-alpha-to-one.cpp<br>
+++ b/tests/spec/ext_framebuffer_multisample/sample-alpha-to-one.cpp<br>
@@ -87,7 +87,8 @@ piglit_init(int argc, char **argv)<br>
                                      num_attachments,<br>
                                      GL_COLOR_BUFFER_BIT,<br>
                                      GL_RGBA);<br>
-       shader_compile();<br>
+       shader_compile(false /* sample_alpha_to_coverage */,<br>
+                      false /* dual_src_blend */);<br>
 }<br>
<br>
 enum piglit_result<br>
--<br>
1.7.7.6<br>
<br>
</div></div></blockquote></div><br>