Skip to content

Commit

Permalink
only recreate textureview on vulkan (#17144)
Browse files Browse the repository at this point in the history
  • Loading branch information
minggo authored Jun 13, 2024
1 parent 5782c50 commit c360a37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions native/cocos/core/assets/SimpleTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ void SimpleTexture::setMipRange(uint32_t baseLevel, uint32_t maxLevel) {
}
// create a new texture view before the destruction of the previous one to bypass the bug that
// vulkan destroys textureview in use. This is a temporary solution, should be fixed later.
#ifdef CC_USE_VULKAN
gfx::Texture *textureView = createTextureView(device);
tryDestroyTextureView();
_gfxTextureView = textureView;
#endif
}

bool SimpleTexture::isUsingOfflineMipmaps() {
Expand Down

0 comments on commit c360a37

Please sign in to comment.