diff options
author | José Fonseca <jfonseca@vmware.com> | 2012-10-26 15:04:46 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2012-10-26 16:02:59 +0100 |
commit | 91332e455a530b86f897874919da29efa563fdf3 (patch) | |
tree | 26eea0cc28b2397e93a6951534f97c46d177f04a /src/gallium/tests/graw | |
parent | 2532f0d063d8326c1ba6fdb3394bb355326c4190 (diff) | |
download | external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.zip external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.tar.gz external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.tar.bz2 |
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.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/fs-frontface.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/fs-test.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/fs-write-z.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/gs-test.c | 2 | ||||
-rw-r--r-- | src/gallium/tests/graw/quad-sample.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/quad-tex.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/shader-leak.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/tex-srgb.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/tex-swizzle.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/tri-gs.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/tri-instanced.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/tri.c | 1 | ||||
-rw-r--r-- | src/gallium/tests/graw/vs-test.c | 2 |
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 893170f..eac9627 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 d46ce55..5f9d8d2 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 04b5732..f310344 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 3eee2b2..0bcecd7 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 21ec7b7..e9b0829 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 6f4b9f6..ca6fe3e 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 dc3a737..02d78ad 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 f24490e..6100af3 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 ea07b8d..af3e1c3 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 0709447..7dc35eb 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 7406fbc..be1f035 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 d3de15c..ce81c9c 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 f6b2aa9..7b6507e 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 6c6f065..7fb97d8 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, |