Texture handles were resolved to pointers when updating a SamplerGroup, as that point the handle was checked for use-after-free. However, the texture could be destroyed later while still active in the SamplerGroup, this would result in using the pointer which now contains garbage.
We now keep the handle and resolve the texture when binding samplers to the program; which will also perform the use-after-free check.
Texture handles were resolved to pointers when updating a SamplerGroup, as that point the handle was checked for use-after-free. However, the texture could be destroyed later while still active in the SamplerGroup, this would result in using the pointer which now contains garbage.
We now keep the handle and resolve the texture when binding samplers to the program; which will also perform the use-after-free check.