iris: refcount separate screen objects for resource tracking
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 4 May 2021 19:08:07 +0000 (15:08 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 11 May 2021 14:50:19 +0000 (14:50 +0000)
commiteb63c7decedb6188122f01d9851c44aa8d1d0e33
tree3fdc85dd3acdf806b538e3f985e79b733f95a80e
parent9a5c9ff342e84949dd8c7cfc745d75548c8ac5ae
iris: refcount separate screen objects for resource tracking

this screen object can never, ever be accessed like this in a resource,
as it may have previously been replaced by a wrapper (e.g., driver trace)
which will then explode when it is accessed directly

instead, keep a separate screen ref on the resource which is known to be
the actual driver object and not a wrapper

Fixes: 0a497eb1303 ("iris: make resources take a ref on the screen object")

Reviewed-by: Lionel Landwerlin lionel.g.landwerlin@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10632>
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_resource.h