This commit is contained in:
Branimir Karadžić 2016-01-18 15:20:19 -08:00
parent ec5333e69d
commit da38788fb1

View File

@ -4162,10 +4162,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
void TextureD3D11::destroy()
{
s_renderD3D11->m_srvUavLru.invalidateWithParent(getHandle().idx);
DX_RELEASE(m_srv, 0);
DX_RELEASE(m_uav, 0);
if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) )
{
DX_RELEASE(m_srv, 0);
DX_RELEASE(m_uav, 0);
DX_RELEASE(m_ptr, 0);
}
}
@ -4175,6 +4175,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
destroy();
m_flags |= BGFX_TEXTURE_INTERNAL_SHARED;
m_ptr = (ID3D11Resource*)_ptr;
s_renderD3D11->m_device->CreateShaderResourceView(m_ptr, NULL, &m_srv);
}
void TextureD3D11::update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem)