summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-07-11 13:56:13 -0700
committerEric Anholt <eric@anholt.net>2011-07-11 17:07:42 -0700
commitf2a95048282199fe75969df30ec836089e5fa460 (patch)
tree630d5503ca92ad1e2190bd61004c99ea0ee3d7eb
parentfab1b2dd04af90d573be100acc43e761d3db6838 (diff)
getuniform-02: Fix when using ARB_shader_objectsutility-wrapper
-rw-r--r--tests/shaders/getuniform-02.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/tests/shaders/getuniform-02.c b/tests/shaders/getuniform-02.c
index 8874cb7df..f5c5dd645 100644
--- a/tests/shaders/getuniform-02.c
+++ b/tests/shaders/getuniform-02.c
@@ -85,7 +85,7 @@ piglit_init(int argc, char **argv)
piglit_UseProgram(prog);
- glGetProgramiv(prog, GL_ACTIVE_UNIFORMS, &numUniforms);
+ piglit_GetProgramiv(prog, GL_ACTIVE_UNIFORMS, &numUniforms);
if (numUniforms != expectedNum) {
printf("%s: incorrect number of uniforms (found %d, expected %d)\n",
TestName, numUniforms, expectedNum);
@@ -100,8 +100,9 @@ piglit_init(int argc, char **argv)
GLenum type, expectedType;
GLint loc;
- glGetActiveUniformARB(prog, i, sizeof(name), &len, &size, &type, name);
- loc = glGetUniformLocation(prog, name);
+ piglit_GetActiveUniform(prog,
+ i, sizeof(name), &len, &size, &type, name);
+ loc = piglit_GetUniformLocation(prog, name);
if (loc < 0) {
printf("%s: bad uniform location for %s: %d\n", TestName, name, loc);
@@ -136,47 +137,47 @@ piglit_init(int argc, char **argv)
/* Check setting/getting values */
- loc_f1 = glGetUniformLocation(prog, "f1");
- loc_f2 = glGetUniformLocation(prog, "f2");
- loc_sa = glGetUniformLocation(prog, "s.a");
- loc_sd = glGetUniformLocation(prog, "s.d");
- loc_v1 = glGetUniformLocation(prog, "v[1]");
+ loc_f1 = piglit_GetUniformLocation(prog, "f1");
+ loc_f2 = piglit_GetUniformLocation(prog, "f2");
+ loc_sa = piglit_GetUniformLocation(prog, "s.a");
+ loc_sd = piglit_GetUniformLocation(prog, "s.d");
+ loc_v1 = piglit_GetUniformLocation(prog, "v[1]");
- glUniform1fARB(loc_f1, 5.0);
- glUniform1fARB(loc_f2, 10.0);
- glUniform1fARB(loc_sa, 15.0);
- glUniform1fARB(loc_sd, 20.0);
- glUniform4fvARB(loc_v1, 1, vVals);
+ piglit_Uniform1f(loc_f1, 5.0);
+ piglit_Uniform1f(loc_f2, 10.0);
+ piglit_Uniform1f(loc_sa, 15.0);
+ piglit_Uniform1f(loc_sd, 20.0);
+ piglit_Uniform4fv(loc_v1, 1, vVals);
- glGetUniformfvARB(prog, loc_f1, v);
+ piglit_GetUniformfv(prog, loc_f1, v);
if (v[0] != 5.0) {
printf("%s: wrong value for f1 (found %f, expected %f)\n",
TestName, v[0], 5.0);
piglit_report_result(PIGLIT_FAIL);
}
- glGetUniformfvARB(prog, loc_f2, v);
+ piglit_GetUniformfv(prog, loc_f2, v);
if (v[0] != 10.0) {
printf("%s: wrong value for f2 (found %f, expected %f)\n",
TestName, v[0], 10.0);
piglit_report_result(PIGLIT_FAIL);
}
- glGetUniformfvARB(prog, loc_sa, v);
+ piglit_GetUniformfv(prog, loc_sa, v);
if (v[0] != 15.0) {
printf("%s: wrong value for s.a (found %f, expected %f)\n",
TestName, v[0], 15.0);
piglit_report_result(PIGLIT_FAIL);
}
- glGetUniformfvARB(prog, loc_sd, v);
+ piglit_GetUniformfv(prog, loc_sd, v);
if (v[0] != 20.0) {
printf("%s: wrong value for s.d (found %f, expected %f)\n",
TestName, v[0], 20.0);
piglit_report_result(PIGLIT_FAIL);
}
- glGetUniformfvARB(prog, loc_v1, v);
+ piglit_GetUniformfv(prog, loc_v1, v);
if (v[0] != 30.0 ||
v[1] != 31.0 ||
v[2] != 32.0 ||