summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-07-26 15:32:11 -0700
committerEric Anholt <[email protected]>2016-07-31 19:23:03 -0700
commit26ff7e373f5675a0a60c97a11ef557ad8b1bfbe5 (patch)
tree8a0a7c7d66c3c6c7fe3b4171d0d912ab424dbe16 /src
parentb730960e779c842d27192f812b33686f025431ff (diff)
vc4: Zero-initialize the hardware sampler view structure.
Fixes failure to initialize the force_first_level flag, causing failures in piglit levelclamp.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c2
1 files changed, 1 insertions, 1 deletions
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)