summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests/graw
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-10-26 15:04:46 +0100
committerJosé Fonseca <[email protected]>2012-10-26 16:02:59 +0100
commit91332e455a530b86f897874919da29efa563fdf3 (patch)
tree26eea0cc28b2397e93a6951534f97c46d177f04a /src/gallium/tests/graw
parent2532f0d063d8326c1ba6fdb3394bb355326c4190 (diff)
graw: Ensure new members are zeroed.
Several new state members were added, and they were not being zeroed, causing random crashes.
Diffstat (limited to 'src/gallium/tests/graw')
-rw-r--r--src/gallium/tests/graw/fs-fragcoord.c1
-rw-r--r--src/gallium/tests/graw/fs-frontface.c1
-rw-r--r--src/gallium/tests/graw/fs-test.c1
-rw-r--r--src/gallium/tests/graw/fs-write-z.c1
-rw-r--r--src/gallium/tests/graw/gs-test.c2
-rw-r--r--src/gallium/tests/graw/quad-sample.c1
-rw-r--r--src/gallium/tests/graw/quad-tex.c1
-rw-r--r--src/gallium/tests/graw/shader-leak.c1
-rw-r--r--src/gallium/tests/graw/tex-srgb.c1
-rw-r--r--src/gallium/tests/graw/tex-swizzle.c1
-rw-r--r--src/gallium/tests/graw/tri-gs.c1
-rw-r--r--src/gallium/tests/graw/tri-instanced.c1
-rw-r--r--src/gallium/tests/graw/tri.c1
-rw-r--r--src/gallium/tests/graw/vs-test.c2
14 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/tests/graw/fs-fragcoord.c b/src/gallium/tests/graw/fs-fragcoord.c
index 893170fe597..eac9627e860 100644
--- a/src/gallium/tests/graw/fs-fragcoord.c
+++ b/src/gallium/tests/graw/fs-fragcoord.c
@@ -64,6 +64,7 @@ set_vertices(void)
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/fs-frontface.c b/src/gallium/tests/graw/fs-frontface.c
index d46ce554069..5f9d8d2d910 100644
--- a/src/gallium/tests/graw/fs-frontface.c
+++ b/src/gallium/tests/graw/fs-frontface.c
@@ -86,6 +86,7 @@ set_vertices(void)
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index 04b57323d8a..f31034406f6 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -213,6 +213,7 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 3, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/fs-write-z.c b/src/gallium/tests/graw/fs-write-z.c
index 3eee2b2ab4e..0bcecd7436a 100644
--- a/src/gallium/tests/graw/fs-write-z.c
+++ b/src/gallium/tests/graw/fs-write-z.c
@@ -90,6 +90,7 @@ set_vertices(void)
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index 21ec7b7b0b5..e9b0829e6ce 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -248,6 +248,8 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 4, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
+
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
if (draw_strip) {
diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c
index 6f4b9f6e7e8..ca6fe3ec9f2 100644
--- a/src/gallium/tests/graw/quad-sample.c
+++ b/src/gallium/tests/graw/quad-sample.c
@@ -97,6 +97,7 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 2, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c
index dc3a73796e7..02d78ad1fa8 100644
--- a/src/gallium/tests/graw/quad-tex.c
+++ b/src/gallium/tests/graw/quad-tex.c
@@ -53,6 +53,7 @@ static void set_vertices( void )
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c
index f24490e349f..6100af3192c 100644
--- a/src/gallium/tests/graw/shader-leak.c
+++ b/src/gallium/tests/graw/shader-leak.c
@@ -87,6 +87,7 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 2, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/tex-srgb.c b/src/gallium/tests/graw/tex-srgb.c
index ea07b8d692d..af3e1c36f15 100644
--- a/src/gallium/tests/graw/tex-srgb.c
+++ b/src/gallium/tests/graw/tex-srgb.c
@@ -69,6 +69,7 @@ set_vertices(struct vertex *verts, unsigned num_verts)
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/tex-swizzle.c b/src/gallium/tests/graw/tex-swizzle.c
index 0709447f33e..7dc35eb43a3 100644
--- a/src/gallium/tests/graw/tex-swizzle.c
+++ b/src/gallium/tests/graw/tex-swizzle.c
@@ -51,6 +51,7 @@ static void set_vertices(void)
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c
index 7406fbc8956..be1f0352029 100644
--- a/src/gallium/tests/graw/tri-gs.c
+++ b/src/gallium/tests/graw/tri-gs.c
@@ -88,6 +88,7 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 2, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c
index d3de15c32c0..ce81c9c0217 100644
--- a/src/gallium/tests/graw/tri-instanced.c
+++ b/src/gallium/tests/graw/tri-instanced.c
@@ -130,6 +130,7 @@ static void set_vertices( void )
handle = ctx->create_vertex_elements_state(ctx, 3, ve);
ctx->bind_vertex_elements_state(ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
/* vertex data */
vbuf[0].stride = sizeof( struct vertex );
diff --git a/src/gallium/tests/graw/tri.c b/src/gallium/tests/graw/tri.c
index f6b2aa96c9d..7b6507eab11 100644
--- a/src/gallium/tests/graw/tri.c
+++ b/src/gallium/tests/graw/tri.c
@@ -52,6 +52,7 @@ static void set_vertices( void )
handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index 6c6f065af53..7fb97d84948 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -170,6 +170,8 @@ static void set_vertices( void )
}
}
+ memset(&vbuf, 0, sizeof vbuf);
+
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
vbuf.buffer = pipe_buffer_create_with_data(ctx,