Fixes the backend logic for setting/creating 3DTextures in D3D11

This commit is contained in:
Areloch 2020-08-07 01:10:36 -05:00
parent 2b686bf713
commit 45d304ee31
6 changed files with 49 additions and 24 deletions

View file

@ -133,6 +133,11 @@ void GFXD3D11TextureManager::_innerCreateTexture( GFXD3D11TextureObject *retTex,
AssertFatal(false, "GFXD3D11TextureManager::_createTexture - failed to create volume texture!");
}
if (!retTex->mProfile->isSystemMemory())
{
createResourceView(height, width, depth, d3dTextureFormat, numMipLevels, bindFlags, retTex);
}
retTex->mTextureSize.set(width, height, depth);
retTex->get3DTex()->GetDesc(&desc);
retTex->mMipLevels = numMipLevels;
@ -588,4 +593,4 @@ void GFXD3D11TextureManager::createResourceView(U32 height, U32 width, U32 depth
hr = D3D11DEVICE->CreateDepthStencilView(resource,&desc, tex->getDSViewPtr());
AssertFatal(SUCCEEDED(hr), "CreateDepthStencilView:: failed to create view!");
}
}
}