iris: store copy of the border color in the border color hash table

Color can be allocated on the stack since 809a81ec3a.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3909
Fixes: 809a81ec3a ("iris: Properly support alpha and luminance-alpha formats")

Debugged-by: Filip Strömbäck
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7885>
(cherry picked from commit 90515f90c8)
This commit is contained in:
Marcin Ślusarz 2020-12-02 14:40:02 +01:00 committed by Dylan Baker
parent 03802858b4
commit bd95f95dc5
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@
"description": "iris: store copy of the border color in the border color hash table",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "809a81ec3a0b8666ec426a88b86fb133ae5f1bcb"
},

View file

@ -147,7 +147,7 @@ iris_upload_border_color(struct iris_context *ice,
memcpy(pool->map + offset, color, sizeof(*color));
pool->insert_point += BC_ALIGNMENT;
_mesa_hash_table_insert_pre_hashed(pool->ht, hash, color,
_mesa_hash_table_insert_pre_hashed(pool->ht, hash, pool->map + offset,
(void *) (uintptr_t) offset);
return offset;
}