mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Cleanup.
This commit is contained in:
parent
ec5333e69d
commit
da38788fb1
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue