src/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
// Test whether a texture level is within the range of levels for which the current image is
// allocated.  This is used to ensure out-of-range updates are staged in the image, and not
// attempted to be directly applied.
Test whether a texture level is within the range of levels for which the current image is
allocated.  This is used to ensure out-of-range updates are staged in the image, and not
attempted to be directly applied.
Test whether a texture level is within the range of levels for which the current image is allocated . This is used to ensure out - of - range updates are staged in the image and not attempted to be directly applied .
bool IsTextureLevelInAllocatedImage(const vk::ImageHelper &image,
                                    gl::LevelIndex textureLevelIndexGL)
{
    gl::LevelIndex imageBaseLevel = image.getBaseLevel();
    if (textureLevelIndexGL < imageBaseLevel)
    {
        return false;
    }
    vk::LevelIndex imageLevelIndexVk = image.toVkLevel(textureLevelIndexGL);
    return imageLevelIndexVk < vk::LevelIndex(image.getLevelCount());
}
bool IsTextureLevelInAllocatedImage ( const vk :: ImageHelper & image , gl :: LevelIndex textureLevelIndexGL ) { gl :: LevelIndex imageBaseLevel = image . getBaseLevel ( ) ; if ( textureLevelIndexGL < imageBaseLevel ) { return false ; } vk :: LevelIndex imageLevelIndexVk = image . toVkLevel ( textureLevelIndexGL ) ; return imageLevelIndexVk < vk :: LevelIndex ( image . getLevelCount ( ) ) ; }
Test whether a texture level is within the range of levels for which the current image is
allocated.
Test whether a texture level is within the range of levels for which the current image is allocated .