mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-06-08 00:23:52 +00:00
- Adding max supported texture size (16K) check to KTX2 header parser
This commit is contained in:
@@ -19581,6 +19581,13 @@ namespace basist
|
||||
return false;
|
||||
}
|
||||
|
||||
// Sanity check the dimensions
|
||||
if ((m_header.m_pixel_width > BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION) || (m_header.m_pixel_height > BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION))
|
||||
{
|
||||
BASISU_DEVEL_ERROR("ktx2_transcoder::init: Texture is too large\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Face count must be 1 or 6
|
||||
if ((m_header.m_face_count != 1) && (m_header.m_face_count != 6))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user