Fix clearing compressed textures with Vulkan backend
When making sure a texture's data is initialized in ANGLE, it
is illegal to attempt to clear it when using the Vulkan backend.
The Vulkan spec, regarding vkCmdClearColorImage, mentions that:
"image must not have a compressed or depth/stencil format"
The proper way of initializing the memory of a compressed image
in Vulkan is to do a buffer to image copy instead. This was added
to ImageHelper::stageRobustResourceClear() so that it may now
handle compressed textures properly.
Bug: angleproject:4092
Change-Id: I073ed0603d9e92e787b9be8992751dbc0c8978db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2165636Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Showing
Please
register
or
sign in
to comment