[Piglit] [PATCH] pbo: fix MSVC compile error

Brian Paul brianp at vmware.com
Thu Jan 8 14:56:26 PST 2015


Arrays can't be dimensioned by variables.
---
 tests/spec/gl-2.1/pbo.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/spec/gl-2.1/pbo.c b/tests/spec/gl-2.1/pbo.c
index b6c51e9..26b7138 100644
--- a/tests/spec/gl-2.1/pbo.c
+++ b/tests/spec/gl-2.1/pbo.c
@@ -526,16 +526,15 @@ test_tex_image(void)
 	GLenum pack = GL_PIXEL_PACK_BUFFER_ARB;
 	GLenum unpack = GL_PIXEL_UNPACK_BUFFER_ARB;
 	int texture_size = TEXSIZE * TEXSIZE * 3;
-	GLfloat t1[texture_size];
-	GLfloat t2[texture_size];
+	GLfloat t1[TEXSIZE * TEXSIZE * 3];
+	GLfloat t2[TEXSIZE * TEXSIZE * 3];
 	GLfloat *pbo_mem = NULL;
 	int i, j;
 	GLfloat green[3] = { 1.0, 1.0, 0.0 };
 	GLfloat black[3] = { 0.0, 0.0, 0.0 };
-	int window_size = WINSIZE * WINSIZE * 3;
-	GLfloat buf[window_size];
-	GLfloat exp_tex[texture_size];
-	GLfloat exp_win[window_size];
+	GLfloat buf[WINSIZE * WINSIZE * 3];
+	GLfloat exp_tex[TEXSIZE * TEXSIZE * 3];
+	GLfloat exp_win[WINSIZE * WINSIZE * 3];
 	GLfloat tolerance[4];
 
 	piglit_compute_probe_tolerance(GL_RGB, tolerance);
-- 
1.9.1



More information about the Piglit mailing list