wg_engine: fixed target texture update

Allows the target texture to be updated without forcing the size to changed.
This commit is contained in:
Benjamin 2025-04-30 16:37:13 -07:00 committed by Sergii Liebodkin
parent e0b8fcc93e
commit 40453a4986

View file

@ -383,8 +383,8 @@ bool WgRenderer::target(WGPUDevice device, WGPUInstance instance, void* target,
return true;
}
// update retnder targets dimentions
if ((mTargetSurface.w != width) || (mTargetSurface.h != height)) {
// update render targets dimentions
if ((mTargetSurface.w != width) || (mTargetSurface.h != height) || (targetTexture != (WGPUTexture)target)) {
// release render tagets
mRenderStoragePool.release(mContext);
mRenderStorageRoot.release(mContext);