From 26ff7e373f5675a0a60c97a11ef557ad8b1bfbe5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 26 Jul 2016 15:32:11 -0700 Subject: [PATCH] vc4: Zero-initialize the hardware sampler view structure. Fixes failure to initialize the force_first_level flag, causing failures in piglit levelclamp. --- src/gallium/drivers/vc4/vc4_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index df9e1a3ab03..19aae35c65a 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -586,7 +586,7 @@ static struct pipe_sampler_view * vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, const struct pipe_sampler_view *cso) { - struct vc4_sampler_view *so = malloc(sizeof(*so)); + struct vc4_sampler_view *so = CALLOC_STRUCT(vc4_sampler_view); struct vc4_resource *rsc = vc4_resource(prsc); if (!so) -- 2.30.2