summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12/TextureCache.cpp
diff options
context:
space:
mode:
authorMathew Maidment <mathew1800@gmail.com>2016-02-16 22:54:04 -0500
committerMathew Maidment <mathew1800@gmail.com>2016-02-16 22:54:04 -0500
commit05e431d5b5b351d67e6d202ad5960e48f7612a58 (patch)
treee84d56a71475932c65bcc15bf65872c17206b74a /Source/Core/VideoBackends/D3D12/TextureCache.cpp
parent96e48c3c9fe682ffaf40eb8276a028c90e8c55dc (diff)
parent6b08194728fe024b6064abd5a5d244f88304ae86 (diff)
Merge pull request #3645 from lioncash/dxmem
D3D12: Get rid of most explicit delete and new usages
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/TextureCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D12/TextureCache.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D12/TextureCache.cpp b/Source/Core/VideoBackends/D3D12/TextureCache.cpp
index cafe0dc651..d88fce86c7 100644
--- a/Source/Core/VideoBackends/D3D12/TextureCache.cpp
+++ b/Source/Core/VideoBackends/D3D12/TextureCache.cpp
@@ -563,7 +563,7 @@ TextureCache::TextureCache()
m_palette_pixel_shaders[GX_TL_RGB565] = GetConvertShader12(std::string("RGB565"));
m_palette_pixel_shaders[GX_TL_RGB5A3] = GetConvertShader12(std::string("RGB5A3"));
- m_palette_stream_buffer = new D3DStreamBuffer(sizeof(u16) * 256 * 1024, sizeof(u16) * 256 * 1024 * 16, nullptr);
+ m_palette_stream_buffer = std::make_unique<D3DStreamBuffer>(sizeof(u16) * 256 * 1024, sizeof(u16) * 256 * 1024 * 16, nullptr);
// Right now, there are only two variants of palette_uniform data. So, we'll just create an upload heap to permanently store both of these.
CheckHR(
@@ -604,8 +604,6 @@ TextureCache::~TextureCache()
s_efb_copy_stream_buffer.reset();
- SAFE_DELETE(m_palette_stream_buffer);
-
if (s_texture_cache_entry_readback_buffer)
{
D3D::command_list_mgr->DestroyResourceAfterCurrentCommandListExecuted(s_texture_cache_entry_readback_buffer);