llvmpipe: fix UAF in lp_scene_is_resource_referenced.
What does this MR do and why?
llvmpipe: fix UAF in lp_scene_is_resource_referenced.
Patch from Martin Stransky
reworked slightly by airlied
This is the patch from #9074 that Martin wrote, with some changes from me, I want to throw it at CI and look a bit more into it.