summaryrefslogtreecommitdiff
path: root/tests/texturing/depth-tex-modes-rg.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-06-08 15:13:32 -0700
committerBrian Paul <brianp@vmware.com>2014-06-09 07:06:14 -0700
commit6d0dc88c96947143379015a653be3df63440225b (patch)
tree4c1bd02f198b8fab57d195286271fd8e42fb3b59 /tests/texturing/depth-tex-modes-rg.c
parent35a5ee470eec3384a60cb38fed3536bc6afdee1b (diff)
depth-tex-modes-rg: fix initial window size
Use the larger of the default window size and the size required by the test parameters. Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'tests/texturing/depth-tex-modes-rg.c')
-rw-r--r--tests/texturing/depth-tex-modes-rg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/texturing/depth-tex-modes-rg.c b/tests/texturing/depth-tex-modes-rg.c
index 4cf8aec01..61ab560f8 100644
--- a/tests/texturing/depth-tex-modes-rg.c
+++ b/tests/texturing/depth-tex-modes-rg.c
@@ -39,12 +39,16 @@ static const GLenum depth_texture_modes[] = {
#define TEST_ROWS 4
#define TEST_COLS ARRAY_SIZE(depth_texture_modes)
+#define TEST_WIDTH (1+(TEST_COLS*(BOX_SIZE+1)))
+#define TEST_HEIGHT (1+(TEST_ROWS*(BOX_SIZE+1)))
+
+
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
- config.window_width = 1+(TEST_COLS*(BOX_SIZE+1));
- config.window_height = 1+(TEST_ROWS*(BOX_SIZE+1));
+ config.window_width = MAX2(TEST_WIDTH, config.window_width);
+ config.window_height = MAX2(TEST_HEIGHT, config.window_height);
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
PIGLIT_GL_TEST_CONFIG_END