From 8e68f79eebd430baef9c01e2f851cb44c618cd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 8 Jun 2026 20:49:50 -0700 Subject: [PATCH] Fixed blit crash with BackbufferRatio textures after window resize. Closes #3134. (#3741) --- src/bgfx_p.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 375a137d1..95af6fe62 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -5402,12 +5402,17 @@ namespace bgfx void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, uint16_t _numLayers) { - const TextureRef& ref = m_textureRef[_handle.idx]; + TextureRef& ref = m_textureRef[_handle.idx]; BX_ASSERT(BackbufferRatio::Count != ref.m_bbRatio, ""); getTextureSizeFromRatio(BackbufferRatio::Enum(ref.m_bbRatio), _width, _height); _numMips = calcNumMips(1 < _numMips, _width, _height); + ref.m_width = _width; + ref.m_height = _height; + ref.m_numMips = _numMips; + ref.m_numLayers = _numLayers; + BX_TRACE("Resize %3d: %4dx%d %s" , _handle.idx , _width