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 <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12438>
This commit is contained in:
@@ -202,10 +202,15 @@ struct iris_base_prog_key {
|
|||||||
unsigned program_string_id;
|
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_vue_prog_key {
|
||||||
struct iris_base_prog_key base;
|
struct iris_base_prog_key base;
|
||||||
|
|
||||||
unsigned nr_userclip_plane_consts:4;
|
unsigned nr_userclip_plane_consts:4;
|
||||||
|
unsigned padding:28;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iris_vs_prog_key {
|
struct iris_vs_prog_key {
|
||||||
|
Reference in New Issue
Block a user