Commit de37ad1754e2c7b587231a4861a782a5b4be8d92

Charlie Lao 2022-02-16T15:30:46

Vulkan: Call releaseStagedUpdates before releaseImage When Texture is destroyed, we call TextureVk::releaseAndDeleteImageAndViews(). Right now it calls releaseImage() first and then calls releaseStagedUpdates(). The correct order should be releaseStagedUpdates() before releaseImages(). Otherwise for EGLImages, releaseImages will set mImage to nullptr which will make releaseStagedUpdates skip and leave the staged updates there which causes problem since context gets destroyed while EGLImage still hold onto staging buffer belongs to this context's shared group. Bug: b/219646764 Change-Id: I04a005b742a0d90b981a2f399a5e03b03e3a0adb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469727 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Charlie Lao <cclao@google.com>