summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-11-01 10:07:17 -0700
committerEric Anholt <eric@anholt.net>2012-11-14 11:36:35 -0800
commitf8f47025f93a9daaf1e6477b570630815fd9aa5b (patch)
treeb4fa80d646171573f5e09e8874ee15228708e5ca
parent19f601dcdb29cd3b366210425154054316189b08 (diff)
clearbuffer-display-lists: Fix initial clear color test.
The test claimed that the default value was 0,0,0,1, but the GL 3.0 spec page 263 disagrees. The test saw 0,0,0,1 when it was written because a visual with no alpha happened to be chosen, but there's no guarantee that you don't have alpha, so fix the test, and ask for alpha in the test so that we can reliably check those bits. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--tests/spec/gl-3.0/api/clearbuffer-common.c2
-rw-r--r--tests/spec/gl-3.0/api/clearbuffer-display-lists.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/spec/gl-3.0/api/clearbuffer-common.c b/tests/spec/gl-3.0/api/clearbuffer-common.c
index dec9fafd..d225a8a2 100644
--- a/tests/spec/gl-3.0/api/clearbuffer-common.c
+++ b/tests/spec/gl-3.0/api/clearbuffer-common.c
@@ -36,7 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 100;
config.window_height = 100;
- config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+ config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
index 621fd817..4d9bda2f 100644
--- a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
+++ b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
@@ -36,7 +36,7 @@
void piglit_init(int argc, char **argv)
{
- static const float initial_color[4] = { 0.0, 0.0, 0.0, 1.0 };
+ static const float initial_color[4] = { 0.0, 0.0, 0.0, 0.0 };
static const float first[4] = { 0.5, 0.4, 0.3, 1.0 };
static const float second[4] = { 0.8, 0.0, 0.8, 1.0 };
static const float third[4] = { 1.0, 0.3, 0.7, 1.0 };
@@ -47,7 +47,7 @@ void piglit_init(int argc, char **argv)
glClear(GL_COLOR_BUFFER_BIT);
/* Probe the color buffer before creating display list. Default clear
- * color is (0.0, 0.0, 0.0, 1.0)
+ * color is (0.0, 0.0, 0.0, 0.0)
*/
pass = piglit_probe_rect_rgba(0, 0,
piglit_width, piglit_height,