[Mesa-dev] [PATCH] radv: clear dynamic_shader_stages on create

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Aug 28 00:10:18 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Mon, Aug 28, 2017, at 01:13, Grazvydas Ignotas wrote:
> Valgrind reports it's being used uninitialized.
> 
> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
> ---
>  src/amd/vulkan/radv_descriptor_set.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/amd/vulkan/radv_descriptor_set.c
> b/src/amd/vulkan/radv_descriptor_set.c
> index 7cee9d4..314ab5a 100644
> --- a/src/amd/vulkan/radv_descriptor_set.c
> +++ b/src/amd/vulkan/radv_descriptor_set.c
> @@ -64,10 +64,11 @@ VkResult radv_CreateDescriptorSetLayout(
>  	/* We just allocate all the samplers at the end of the struct */
>  	uint32_t *samplers = (uint32_t*)&set_layout->binding[max_binding + 1];
>  
>  	set_layout->binding_count = max_binding + 1;
>  	set_layout->shader_stages = 0;
> +       set_layout->dynamic_shader_stages = 0;
>  	set_layout->size = 0;
>  
>  	memset(set_layout->binding, 0, size - sizeof(struct radv_descriptor_set_layout));
>  
>  	uint32_t buffer_count = 0;
> -- 
> 2.7.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list