[Piglit] [PATCH] arb_vertex_type_10f_11f_11f_rev: remove GL3isms from tests
Chris Forbes
chrisf at ijw.co.nz
Fri Mar 21 01:58:52 PDT 2014
While the extension does technically require GL3, it's only
really required for the new error language added to
VertexAttribIPointer.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
tests/spec/arb_vertex_type_10f_11f_11f_rev/api-errors.c | 8 +++++---
.../spec/arb_vertex_type_10f_11f_11f_rev/draw-vertices.c | 15 +++++++--------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/tests/spec/arb_vertex_type_10f_11f_11f_rev/api-errors.c b/tests/spec/arb_vertex_type_10f_11f_11f_rev/api-errors.c
index 4dd1d79..843f8d5 100644
--- a/tests/spec/arb_vertex_type_10f_11f_11f_rev/api-errors.c
+++ b/tests/spec/arb_vertex_type_10f_11f_11f_rev/api-errors.c
@@ -30,7 +30,7 @@
#include "piglit-util-gl-common.h"
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 30;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
@@ -147,8 +147,10 @@ test_vertex_attribs()
* VertexAttribLPointer, ... if <type> is UNSIGNED_INT_10F_11F_11F_REV.
*/
- glVertexAttribIPointer(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, 0, (GLvoid *)0);
- TEST("VertexAttribIPointer-not-allowed", GL_INVALID_ENUM);
+ if (piglit_get_gl_version() >= 30) {
+ glVertexAttribIPointer(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, 0, (GLvoid *)0);
+ TEST("VertexAttribIPointer-not-allowed", GL_INVALID_ENUM);
+ }
if (piglit_is_extension_supported("GL_ARB_vertex_attrib_64bit")) {
glVertexAttribLPointer(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, 0, (GLvoid *)0);
diff --git a/tests/spec/arb_vertex_type_10f_11f_11f_rev/draw-vertices.c b/tests/spec/arb_vertex_type_10f_11f_11f_rev/draw-vertices.c
index 9eb894d..8e754ed 100644
--- a/tests/spec/arb_vertex_type_10f_11f_11f_rev/draw-vertices.c
+++ b/tests/spec/arb_vertex_type_10f_11f_11f_rev/draw-vertices.c
@@ -32,7 +32,7 @@
#include "r11g11b10f.h"
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 30;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
config.window_width = 128;
config.window_height = 128;
@@ -111,19 +111,18 @@ piglit_init(int argc, char **argv)
glEnableVertexAttribArray(1);
prog = piglit_build_simple_program(
- "#version 130\n"
- "#extension GL_ARB_explicit_attrib_location: require\n"
- "layout(location=0) in vec2 p;\n"
- "layout(location=1) in vec3 c;\n"
- "out vec3 color;\n"
+ "attribute vec2 p;\n"
+ "attribute vec3 c;\n"
+ "varying vec3 color;\n"
"void main() { gl_Position = vec4(p, 0, 1); color = c; }\n",
- "#version 130\n"
- "in vec3 color;\n"
+ "varying vec3 color;\n"
"void main() { gl_FragColor = vec4(color,1); }\n"
);
if (!prog)
piglit_report_result(PIGLIT_FAIL);
glUseProgram(prog);
+ glBindAttribLocation(prog, 0, "p");
+ glBindAttribLocation(prog, 1, "c");
}
--
1.9.1
More information about the Piglit
mailing list