summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-10-15 07:35:34 +0300
committerTapani Pälli <tapani.palli@intel.com>2015-10-15 07:35:34 +0300
commitf151582347ba55bc4ab200f5b429a1a56d335426 (patch)
tree9862c60d5c889ce484c32f63a6c0b335d67b7126
parent2331db9287d7e7c5690eba8c4fb9a9b133ce4d88 (diff)
gles-3.0: fix build errors (trivial)
read-depth.c:130:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode read-depth.c:141:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reported-By: Jan Vesely <jan.vesely@rutgers.edu>
-rw-r--r--tests/spec/gles-3.0/read-depth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/spec/gles-3.0/read-depth.c b/tests/spec/gles-3.0/read-depth.c
index 16df47edf..733ddfee5 100644
--- a/tests/spec/gles-3.0/read-depth.c
+++ b/tests/spec/gles-3.0/read-depth.c
@@ -122,12 +122,14 @@ piglit_display(void)
{
GLboolean pass = true;
const float step = 0.1;
+ unsigned j;
+ float i;
glEnable(GL_DEPTH_TEST);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
/* Loop through formats listed in 'tests'. */
- for (unsigned j = 0; j < ARRAY_SIZE(tests); j += 2) {
+ for (j = 0; j < ARRAY_SIZE(tests); j += 2) {
float expect = 0.0;
@@ -138,7 +140,7 @@ piglit_display(void)
/* Step from -1.0 to 1.0, linear depth. Render a rectangle at
* depth i, read pixel and verify expected depth value.
*/
- for (float i = -1.0; !equals(i, 1.0 + step); i += step) {
+ for (i = -1.0; !equals(i, 1.0 + step); i += step) {
glClear(GL_DEPTH_BUFFER_BIT);
glUniform1f(glGetUniformLocation(prog, "depth"), i);