Mesa (master): vc4: Zero-initialize the hardware sampler view structure.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Aug 1 03:05:39 UTC 2016
Module: Mesa
Branch: master
Commit: 26ff7e373f5675a0a60c97a11ef557ad8b1bfbe5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26ff7e373f5675a0a60c97a11ef557ad8b1bfbe5
Author: Eric Anholt <eric at anholt.net>
Date: Tue Jul 26 15:32:11 2016 -0700
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 df9e1a3..19aae35 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)
More information about the mesa-commit
mailing list