From: Eric Anholt Date: Tue, 26 Jul 2016 22:32:11 +0000 (-0700) Subject: vc4: Zero-initialize the hardware sampler view structure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26ff7e373f5675a0a60c97a11ef557ad8b1bfbe5;hp=b730960e779c842d27192f812b33686f025431ff;p=mesa.git vc4: Zero-initialize the hardware sampler view structure. Fixes failure to initialize the force_first_level flag, causing failures in piglit levelclamp. --- 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)