iris: make resources take a ref on the screen object
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 6 Mar 2020 13:58:37 +0000 (15:58 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 11 Apr 2020 19:04:28 +0000 (22:04 +0300)
commit0a497eb1303d23f04ad7d9c28abf953a9105e32a
treec137738d9aa1ab23108d69ae30d761f6c714a86f
parent7557f1605968c39d680545d5b8457d17eea3b922
iris: make resources take a ref on the screen object

Because St creates resources from a screen and attach them onto
another we need to ensure the resources associated to a screen &
bufmgr stay around until we don't need them anymore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_screen.h