[D3D12] Shutdown immediate textures in the destructor
This commit is contained in:
parent
bfb781d293
commit
b0dd9b6fd0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue