summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-03-04 22:37:10 +1000
committerStenzek <stenzek@gmail.com>2017-03-04 22:37:10 +1000
commit725d5bc3a1949c177933e07eff4aac0200e9b3b2 (patch)
tree86e44c4d7064e33eaee30ac7eb0abadd83b158d9 /Source/Core/VideoBackends
parent526fa9bc85e6297c0b82463820bd12fc9e204c4c (diff)
D3D11: Drop unused method ReplaceRGBATexture2D
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DTexture.cpp34
-rw-r--r--Source/Core/VideoBackends/D3D/D3DTexture.h7
2 files changed, 0 insertions, 41 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DTexture.cpp b/Source/Core/VideoBackends/D3D/D3DTexture.cpp
index fb5e710711..abafce3e90 100644
--- a/Source/Core/VideoBackends/D3D/D3DTexture.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DTexture.cpp
@@ -11,40 +11,6 @@
namespace DX11
{
-namespace D3D
-{
-void ReplaceRGBATexture2D(ID3D11Texture2D* pTexture, const u8* buffer, unsigned int width,
- unsigned int height, unsigned int src_pitch, unsigned int level,
- D3D11_USAGE usage)
-{
- if (usage == D3D11_USAGE_DYNAMIC || usage == D3D11_USAGE_STAGING)
- {
- D3D11_MAPPED_SUBRESOURCE map;
- D3D::context->Map(pTexture, level, D3D11_MAP_WRITE_DISCARD, 0, &map);
- if (src_pitch == map.RowPitch)
- {
- memcpy(map.pData, buffer, map.RowPitch * height);
- }
- else
- {
- // Source row size is aligned to texture block size. This can result in a different
- // pitch to what the driver returns, so copy whichever is smaller.
- unsigned int copy_size = std::min(src_pitch, map.RowPitch);
- for (unsigned int y = 0; y < height; ++y)
- memcpy((u8*)map.pData + y * map.RowPitch, buffer + y * src_pitch, copy_size);
- }
- D3D::context->Unmap(pTexture, level);
- }
- else
- {
- D3D11_BOX dest_region = CD3D11_BOX(0, 0, 0, width, height, 1);
- D3D::context->UpdateSubresource(pTexture, level, &dest_region, buffer, src_pitch,
- src_pitch * height);
- }
-}
-
-} // namespace
-
D3DTexture2D* D3DTexture2D::Create(unsigned int width, unsigned int height, D3D11_BIND_FLAG bind,
D3D11_USAGE usage, DXGI_FORMAT fmt, unsigned int levels,
unsigned int slices, D3D11_SUBRESOURCE_DATA* data)
diff --git a/Source/Core/VideoBackends/D3D/D3DTexture.h b/Source/Core/VideoBackends/D3D/D3DTexture.h
index 7ce8f45ac1..2908ccf6ce 100644
--- a/Source/Core/VideoBackends/D3D/D3DTexture.h
+++ b/Source/Core/VideoBackends/D3D/D3DTexture.h
@@ -9,13 +9,6 @@
namespace DX11
{
-namespace D3D
-{
-void ReplaceRGBATexture2D(ID3D11Texture2D* pTexture, const u8* buffer, unsigned int width,
- unsigned int height, unsigned int src_pitch, unsigned int level,
- D3D11_USAGE usage);
-}
-
class D3DTexture2D
{
public: