|
|
@@ -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);
|
|
|
}
|
|
|
}
|