diff options
author | Jason Ekstrand <[email protected]> | 2016-08-25 02:37:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-08-30 15:08:23 -0700 |
commit | d316cec1c1e3a77f63332f99883ffeeeb21a6f5e (patch) | |
tree | 33c421fb4bd1211bab93eda5c6e3a1a77a282428 | |
parent | d5899b3010d1e6d49429024b6f61354d3258993f (diff) |
anv/descriptor_set: memset anv_descriptor_set_layout
We hash this data structure so we can't afford to have uninitialized data
even if it is just structure padding.
Signed-off-by: Jason Ekstrand <[email protected]>
Cc: "12.0" <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index cf1fe15d3c2..4ab1802facb 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -67,9 +67,8 @@ VkResult anv_CreateDescriptorSetLayout( struct anv_sampler **samplers = (struct anv_sampler **)&set_layout->binding[max_binding + 1]; + memset(set_layout, 0, sizeof(*set_layout)); set_layout->binding_count = max_binding + 1; - set_layout->shader_stages = 0; - set_layout->size = 0; for (uint32_t b = 0; b <= max_binding; b++) { /* Initialize all binding_layout entries to -1 */ |