summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-01-26 12:09:58 -0800
committerEric Anholt <eric@anholt.net>2010-01-26 13:24:21 -0800
commitbe43a4bf026f4bcc053c57626a856c8f0ff5dcd5 (patch)
tree6aa246906652064c6be196d086be87ca2830d70a
parenta6249501cc2d330f74bea2e1857b1e76119af562 (diff)
vpfp-generic: Check for ARB_fragment_coord_conventions or SKIP when required.
-rw-r--r--tests/shaders/vpfp-generic.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/shaders/vpfp-generic.cpp b/tests/shaders/vpfp-generic.cpp
index a80be6619..9ae5a3b17 100644
--- a/tests/shaders/vpfp-generic.cpp
+++ b/tests/shaders/vpfp-generic.cpp
@@ -385,6 +385,7 @@ static void Reshape(int width, int height)
extern "C" void piglit_init(int argc, char **argv)
{
int i;
+ const char *fp;
for(i = 1; i < argc; ++i) {
if (!Filename)
@@ -396,12 +397,19 @@ extern "C" void piglit_init(int argc, char **argv)
}
tests.read(Filename);
+ fp = tests.fragment_program_code.c_str();
+
if (!GLEW_VERSION_1_3) {
printf("Requires OpenGL 1.3\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
}
+ if (strstr(fp, "OPTION ARB_fragment_coord_origin_upper_left") ||
+ strstr(fp, "OPTION ARB_fragment_coord_pixel_center_integer")) {
+ piglit_require_extension("GL_ARB_fragment_coord_conventions");
+ }
+
piglit_require_fragment_program();
piglit_require_vertex_program();
if (tests.nv_vertex_program)