From: Ian Romanick <ian.d.roman...@intel.com>

There were two bugs here.  First, GL_EXT_blend_color and
GL_EXT_blend_func_separate were only tested if the version is 1.4.  This
is unnecessary because those extensions are part of OpenGL 1.4.  Second,
GL_EXT_blend_minmax was typoed GL_EXT_blend_min_max.

Increases the number of subtests on RV250 (which supports OpenGL 1.3,
GL_EXT_blend_subtract, GL_EXT_blend_minmax, GL_EXT_blend_color,
GL_EXT_blend_func_separate, and GL_EXT_blend_equation_separate) from 72
to 27,552.  This is the same number of tests that run on Broadwell
(which supports OpenGL 4.5).  R100, NV10, NV20, and i830 should also see
the number of subtests increase.

Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
---
 tests/spec/gl-1.0/blend.c | 43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/tests/spec/gl-1.0/blend.c b/tests/spec/gl-1.0/blend.c
index 3c6a793e7..0cacf69cb 100644
--- a/tests/spec/gl-1.0/blend.c
+++ b/tests/spec/gl-1.0/blend.c
@@ -709,34 +709,31 @@ run_all_factor_sets(void)
        unsigned num_operators_rgb, num_operators_a;
 
        /* Find out what kind of GL blending capability we have. */
-       have_sep_func = false;
-       have_blend_equation = false;
-       have_blend_equation_sep = false;
-       have_blend_color = false;
-       if (gl_version >= 14)
-       {
-               have_blend_equation = true;
-                       
-               if (piglit_is_extension_supported(
-                       "GL_EXT_blend_func_separate")) {
-                       have_sep_func = true;
-               }
-
-               if (piglit_is_extension_supported("GL_EXT_blend_color")) {
-                       have_blend_color = true;
-               }
-       }
-       else if (piglit_is_extension_supported("GL_EXT_blend_subtract") &&
-                piglit_is_extension_supported("GL_EXT_blend_min_max")) {
+       if (gl_version >= 14) {
                have_blend_equation = true;
+               have_blend_color = true;
+               have_sep_func = true;
+       } else {
+               /* glBlendEquation is added by either extension.
+                * However, there is only one table of operators to
+                * test, and it includes the operators from both
+                * extensions.  In Mesa, only R100 supports
+                * GL_EXT_blend_subtract but not GL_EXT_blend_minmax.
+                */
+               have_blend_equation =
+                       piglit_is_extension_supported("GL_EXT_blend_subtract") 
&&
+                       piglit_is_extension_supported("GL_EXT_blend_minmax");
+               have_blend_color =
+                       piglit_is_extension_supported("GL_EXT_blend_color");
+               have_sep_func =
+                       
piglit_is_extension_supported("GL_EXT_blend_func_separate");
        }
 
        if (gl_version >= 20) {
                have_blend_equation_sep = true;
-       }
-       else if (piglit_is_extension_supported(
-               "GL_EXT_blend_equation_separate")) {
-               have_blend_equation_sep = true;
+       } else {
+               have_blend_equation_sep =
+                       
piglit_is_extension_supported("GL_EXT_blend_equation_separate");
        }
 
        if (have_blend_color) {
-- 
2.14.3

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to