This commit is contained in:
Бранимир Караџић 2022-05-13 17:41:30 -07:00
parent 8274f8a6e2
commit ae5706693f
1 changed files with 5 additions and 2 deletions

View File

@ -4707,8 +4707,10 @@ namespace bgfx { namespace d3d11
void TextureD3D11::overrideInternal(uintptr_t _ptr)
{
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc{};
const bool readable = (m_srv != NULL);
if (readable) {
if (readable)
{
m_srv->GetDesc(&srvDesc);
}
@ -4716,7 +4718,8 @@ namespace bgfx { namespace d3d11
m_flags |= BGFX_SAMPLER_INTERNAL_SHARED;
m_ptr = (ID3D11Resource*)_ptr;
if (readable) {
if (readable)
{
s_renderD3D11->m_device->CreateShaderResourceView(m_ptr, &srvDesc, &m_srv);
}
}