diff options
author | José Fonseca <[email protected]> | 2010-04-24 10:33:44 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-04-24 11:39:09 +0100 |
commit | 53499c64b212c68527f84f5e672cdfc95935f643 (patch) | |
tree | 837e6b4a69b370e9d594f3c4a985061d0b9a341a /src/gallium/auxiliary | |
parent | a523b622036117e8bc1be0a1496d4368562e9702 (diff) |
cso_cache: Ensure irrelevant state of the blend state is zeroed.
Otherwise drivers that bake the full blend state in a key end up having
uninitialized memory in their key.
Courtesy of valgrind.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 6fd4bd36428..6d0b4207986 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -349,6 +349,7 @@ enum pipe_error cso_set_blend(struct cso_context *ctx, if (!cso) return PIPE_ERROR_OUT_OF_MEMORY; + memset(&cso->state, 0, sizeof cso->state); memcpy(&cso->state, templ, key_size); cso->data = ctx->pipe->create_blend_state(ctx->pipe, &cso->state); cso->delete_state = (cso_state_callback)ctx->pipe->delete_blend_state; |