diff options
author | Michel Dänzer <[email protected]> | 2016-09-27 18:17:12 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2016-09-28 10:39:22 +0900 |
commit | 8d8c440ebf1a41dd235a67f3f1538cf47adec013 (patch) | |
tree | 1c9b734272ac19e8a70a06a232135183365e636c /src | |
parent | 3eb0baeecfed7a2de2b323e1b5d90e2b14dfc803 (diff) |
gallium/radeon: Initialize pipe_resource::next to NULL
Fixes lots of piglit tests crashing due to using uninitialized memory.
Fixes: ecd6fce2611e ("mesa/st: support lowering multi-planar YUV")
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 2e8b6f44d56..cbbcc293e12 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -511,6 +511,7 @@ r600_alloc_buffer_struct(struct pipe_screen *screen, rbuffer = MALLOC_STRUCT(r600_resource); rbuffer->b.b = *templ; + rbuffer->b.b.next = NULL; pipe_reference_init(&rbuffer->b.b.reference, 1); rbuffer->b.b.screen = screen; rbuffer->b.vtbl = &r600_buffer_vtbl; diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index b2ed93cff2d..6ad5f85ee0c 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1040,6 +1040,7 @@ r600_texture_create_object(struct pipe_screen *screen, resource = &rtex->resource; resource->b.b = *base; + resource->b.b.next = NULL; resource->b.vtbl = &r600_texture_vtbl; pipe_reference_init(&resource->b.b.reference, 1); resource->b.b.screen = screen; |