[Piglit] [PATCH 4/3] fbo-blending-formats: Fixup expected Luminance value for DST_ALPHA blending
Carl Worth
cworth at cworth.org
Tue Jan 22 13:59:33 PST 2013
When a format is used with LUMINANCE and no ALPHA, our computation of
the expected result should use an implicit destination alpha value of
1.0 rather than the alpha value of the rendered color.
---
Here are two more patches on top of my previous series to fix the
testing of fbo-blending-formats and friends.
These two patches fix additional bugs in the tests that were uncovered
by patches 1 and 2 in this series.
With these two additional patches in place, I now have a series of
commits to mesa that eliminate all failures introduced by this series
of commits to piglit. So I am confident that the tests are much more
correct than previously and test failures are likely to indicate
actual bugs in the OpenGL implementation.
tests/fbo/fbo-blending-formats.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c
index 63a6b89..79f440c 100644
--- a/tests/fbo/fbo-blending-formats.c
+++ b/tests/fbo/fbo-blending-formats.c
@@ -122,6 +122,7 @@ static enum piglit_result test_format(const struct format_desc *format)
dst4[2]*(1-dst4[3]) + src4[2]*dst4[3],
dst4[3]*(1-dst4[3]) + src4[3]*dst4[3]};
float res4i = dst4[0]*(1-dst4[0]) + src4[0]*dst4[0]; /* intensity */
+ float res4l = src4[0]; /* luminance without alpha */
float pos5[] = {0.66, -1.0, 0.33, 2.0};
float dst5[] = {0.6, 0.4, 0.8, fix_alpha(0.5)};
@@ -188,7 +189,7 @@ static enum piglit_result test_format(const struct format_desc *format)
res1[3] = 1;
res2[3] = 1;
res3[3] = 1;
- res4[3] = 1;
+ res4[3] = 1; res4[0] = res4l;
res5[3] = 1;
}
} else {
--
1.7.10.4
More information about the Piglit
mailing list