panfrost: Add explicit padding to pan_blend_shader_key

So the hash function doesn't end up hashing uninitialized values.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reported-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: bbff09b952 ("panfrost: Move the blend shader cache at the device level")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
This commit is contained in:
Boris Brezillon 2021-06-04 14:41:06 +02:00 committed by Marge Bot
parent 27367cf018
commit 6b7b8eb046

View file

@ -71,11 +71,12 @@ struct pan_blend_state {
struct pan_blend_shader_key {
enum pipe_format format;
nir_alu_type src0_type, src1_type;
unsigned rt : 3;
unsigned has_constants : 1;
unsigned logicop_enable : 1;
unsigned logicop_func:4;
unsigned nr_samples : 5;
uint32_t rt : 3;
uint32_t has_constants : 1;
uint32_t logicop_enable : 1;
uint32_t logicop_func:4;
uint32_t nr_samples : 5;
uint32_t padding : 18;
struct pan_blend_equation equation;
};