diff --git a/.pick_status.json b/.pick_status.json index aefb6c9f338..27367ea6ec7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5971,7 +5971,7 @@ "description": "ac/surface: fix valgrind warnings in DCC retile tile lookups", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "a37aeb128d5f7cf2fa5b8c61566bbd9f2c224a28" }, diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 5eb79f1b4e5..94c42dc3132 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -128,13 +128,14 @@ ac_compute_dcc_retile_tile_indices(struct ac_addrlib *addrlib, unsigned bpp, unsigned swizzle_mode, bool rb_aligned, bool pipe_aligned) { - struct dcc_retile_tile_key key = (struct dcc_retile_tile_key) { - .family = info->family, - .bpp = bpp, - .swizzle_mode = swizzle_mode, - .rb_aligned = rb_aligned, - .pipe_aligned = pipe_aligned - }; + struct dcc_retile_tile_key key; + memset(&key, 0, sizeof(key)); + + key.family = info->family; + key.bpp = bpp; + key.swizzle_mode = swizzle_mode; + key.rb_aligned = rb_aligned; + key.pipe_aligned = pipe_aligned; struct hash_entry *entry = _mesa_hash_table_search(addrlib->dcc_retile_tile_indices, &key); if (entry)