[D3D12] Shutdown immediate textures in the destructor

This commit is contained in:
Triang3l 2018-08-18 15:25:30 +03:00
parent bfb781d293
commit b0dd9b6fd0
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,7 @@ class D3D12ImmediateTexture : public ImmediateTexture {
D3D12ImmediateTexture(uint32_t width, uint32_t height,
ImmediateTextureFilter filter, bool repeat);
~D3D12ImmediateTexture() override;
bool Initialize(ID3D12Device* device);
void Shutdown();
@ -54,6 +55,8 @@ D3D12ImmediateTexture::D3D12ImmediateTexture(uint32_t width, uint32_t height,
handle = reinterpret_cast<uintptr_t>(this);
}
D3D12ImmediateTexture::~D3D12ImmediateTexture() { Shutdown(); }
bool D3D12ImmediateTexture::Initialize(ID3D12Device* device) {
// The first operation will likely be copying the contents.
state_ = D3D12_RESOURCE_STATE_COPY_DEST;