Fix reference counting of texture images.
- Only unbind (orphan and release) images when the texture destructs.
- Let images hold just one reference to the parent texture.
- Check if textures and images only reference each other and garbage collect.
Bug 26851951
Change-Id: I2b0bcc283bf545d948e91288c531eac7cc14d122
Reviewed-on: https://swiftshader-review.googlesource.com/4711
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 files changed