diff --git a/native/cocos/renderer/gfx-validator/TextureValidator.cpp b/native/cocos/renderer/gfx-validator/TextureValidator.cpp index c0bc45a239..8b9ec6cb66 100644 --- a/native/cocos/renderer/gfx-validator/TextureValidator.cpp +++ b/native/cocos/renderer/gfx-validator/TextureValidator.cpp @@ -120,6 +120,8 @@ void TextureValidator::doInit(const TextureViewInfo &info) { _inited = true; _isTextureView = true; CC_ASSERT(info.texture && static_cast(info.texture)->isInited()); + // TextureView format should equal to the corresponding Texture format. + CC_ASSERT(info.texture->getFormat() == info.format); /////////// execute ///////////