From: Mao, Marc Date: Wed, 18 Aug 2021 04:56:58 +0000 (+0300) Subject: iris: declare padding for iris_vue_prog_key X-Git-Tag: upstream/22.3.5~19094 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fae1e99a15d12b82f65c77c90425335fec7562f1;p=platform%2Fupstream%2Fmesa.git iris: declare padding for iris_vue_prog_key Otherwise with some compilers/environments (Android) padding may contain garbage and memcmp of the key will fail. Cc: mesa-stable Signed-off-by: Tapani Pälli Reviewed-by: Kenneth Graunke Part-of: --- diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index d820cb0..60d2cd2 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -202,10 +202,15 @@ struct iris_base_prog_key { unsigned program_string_id; }; +/** + * Note, we need to take care to have padding explicitly declared + * for key since we will directly memcmp the whole struct. + */ struct iris_vue_prog_key { struct iris_base_prog_key base; unsigned nr_userclip_plane_consts:4; + unsigned padding:28; }; struct iris_vs_prog_key {