radv: Init variant entry with memset.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 21 Jan 2018 21:03:02 +0000 (22:03 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 21 Jan 2018 23:07:39 +0000 (00:07 +0100)
This gets memcpy'd and written driectly, and due to alignment, this
resulted in uninitialized gaps. This makes those gaps go away.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_pipeline_cache.c

index a6508ae1b27b3a51c02b0ef506a768a02cb002d2..db48895817e4e1cd1000e0b94b756f84cb631bab 100644 (file)
@@ -380,6 +380,7 @@ radv_pipeline_cache_insert_shaders(struct radv_device *device,
 
        char* p = entry->code;
        struct cache_entry_variant_info info;
+       memset(&info, 0, sizeof(info));
 
        for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
                if (!variants[i])