wg_engine: fixed target surface update

Allows the target surface to be updated without forcing the size to changed.
This commit is contained in:
Benjamin 2025-05-06 07:54:50 -07:00 committed by GitHub
parent 6008120d35
commit 7c9bead192
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,7 +384,7 @@ bool WgRenderer::target(WGPUDevice device, WGPUInstance instance, void* target,
}
// update render targets dimentions
if ((mTargetSurface.w != width) || (mTargetSurface.h != height) || (targetTexture != (WGPUTexture)target)) {
if ((mTargetSurface.w != width) || (mTargetSurface.h != height) || (type == 0 ? (surface != (WGPUSurface)target) : (targetTexture != (WGPUTexture)target))) {
// release render tagets
mRenderStoragePool.release(mContext);
mRenderStorageRoot.release(mContext);