src/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
// Test whether a redefined texture level is compatible with the currently allocated image.  Returns
// true if the given size and format match the corresponding mip in the allocated image (taking
// base level into account).  This could return false when:
//
// - Defining a texture level that is outside the range of the image levels.  In this case, changes
//   to this level should remain staged until the texture is redefined to include this level.
// - Redefining a texture level that is within the range of the image levels, but has a different
//   size or format.  In this case too, changes to this level should remain staged as the texture
//   is no longer complete as is.
Test whether a redefined texture level is compatible with the currently allocated image.  Returns
true if the given size and format match the corresponding mip in the allocated image (taking
base level into account).  This could return false when.

Defining a texture level that is outside the range of the image levels.  In this case, changes
to this level should remain staged until the texture is redefined to include this level.
Redefining a texture level that is within the range of the image levels, but has a different
size or format.  In this case too, changes to this level should remain staged as the texture
is no longer complete as is.
Test whether a redefined texture level is compatible with the currently allocated image . Returns true if the given size and format match the corresponding mip in the allocated image ( taking base level into account ) . This could return false when . Defining a texture level that is outside the range of the image levels . In this case changes to this level should remain staged until the texture is redefined to include this level . Redefining a texture level that is within the range of the image levels but has a different size or format . In this case too changes to this level should remain staged as the texture is no longer complete as is .
bool IsTextureLevelDefinitionCompatibleWithImage(const vk::ImageHelper &image,
                                                 gl::LevelIndex textureLevelIndexGL,
                                                 const gl::Extents &size,
                                                 const vk::Format &format)
{
    ASSERT(IsTextureLevelInAllocatedImage(image, textureLevelIndexGL));
    vk::LevelIndex imageLevelIndexVk = image.toVkLevel(textureLevelIndexGL);
    return size == image.getLevelExtents(imageLevelIndexVk) && format == image.getFormat();
}
bool IsTextureLevelDefinitionCompatibleWithImage ( const vk :: ImageHelper & image , gl :: LevelIndex textureLevelIndexGL , const gl :: Extents & size , const vk :: Format & format ) { ASSERT ( IsTextureLevelInAllocatedImage ( image , textureLevelIndexGL ) ) ; vk :: LevelIndex imageLevelIndexVk = image . toVkLevel ( textureLevelIndexGL ) ; return size == image . getLevelExtents ( imageLevelIndexVk ) && format == image . getFormat ( ) ; }
Test whether a redefined texture level is compatible with the currently allocated image.
Test whether a redefined texture level is compatible with the currently allocated image .