mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 10:32:39 +08:00
Add a new class to manage a set of default device resources. (#12936)
This commit is contained in:
@@ -74,6 +74,13 @@ void TextureValidator::doInit(const TextureInfo &info) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TextureType::TEX1D_ARRAY: {
|
||||
if (std::min(info.width, info.height) > 1 || std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize
|
||||
|| info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) {
|
||||
CC_ASSERT(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TextureType::TEX2D_ARRAY: {
|
||||
if (std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize
|
||||
|| info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) {
|
||||
|
||||
Reference in New Issue
Block a user