From: José Fonseca <[email protected]>

Not supported by MSVC.
---
 tests/texturing/shaders/textureGather.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/texturing/shaders/textureGather.c 
b/tests/texturing/shaders/textureGather.c
index cb7fef0..bd48790 100644
--- a/tests/texturing/shaders/textureGather.c
+++ b/tests/texturing/shaders/textureGather.c
@@ -201,7 +201,9 @@ static void
 upload_verts(void)
 {
        if (stage == VS) {
-               float v[4 * texture_width * texture_height], *pv = v;
+               size_t size = 4 * texture_width * texture_height * 
sizeof(float);
+               float *v = (float *)malloc(size);
+               float *pv = v;
                int i, j;
                for (j = 0; j < texture_height; j++)
                        for (i = 0; i < texture_width; i++) {
@@ -210,7 +212,8 @@ upload_verts(void)
                                *pv++ = 0;
                                *pv++ = 1;
                        }
-               glBufferData(GL_ARRAY_BUFFER, sizeof(v), v, GL_STATIC_DRAW);
+               glBufferData(GL_ARRAY_BUFFER, size, v, GL_STATIC_DRAW);
+               free(v);
        }
        else {
                static const float verts[] = {
-- 
1.9.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to