Mesa (master): iris: store copy of the border color in the border color hash table

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 4 11:29:23 UTC 2020


Module: Mesa
Branch: master
Commit: 90515f90c8523bbf637a4dfdbce959adc45b4834
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=90515f90c8523bbf637a4dfdbce959adc45b4834

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Wed Dec  2 14:40:02 2020 +0100

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

Color can be allocated on the stack since 809a81ec3a0.

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

Debugged-by: Filip Strömbäck
Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7885>

---

 src/gallium/drivers/iris/iris_border_color.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_border_color.c b/src/gallium/drivers/iris/iris_border_color.c
index ebed3e4445d..5f6bea9a79f 100644
--- a/src/gallium/drivers/iris/iris_border_color.c
+++ b/src/gallium/drivers/iris/iris_border_color.c
@@ -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;
 }



More information about the mesa-commit mailing list