zink: fix rp hash table
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 9 Dec 2020 20:26:30 +0000 (15:26 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 18 Dec 2020 16:45:52 +0000 (16:45 +0000)
commit354b2f7f75813357232199853e9aa0e4f3ad4848
tree302e3af4a4ca272d7156a6bbb64a4a57fc0f33fe
parentec34b3f117a70b8ff348850a9aae40b73d94c06e
zink: fix rp hash table

hash table keys for inserted items have to be valid memory ranges for the
lifetime of the corresponding entry, so using a stack-allocated key like this
is broken and doesn't accurately return the correct renderpass

Fixes a872f4636924: ("zink: cache render-passes")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8011>
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_render_pass.c
src/gallium/drivers/zink/zink_render_pass.h