summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@gmail.com>2012-05-12 13:50:03 +0200
committerNeoBrainX <NeoBrainX@gmail.com>2012-05-13 17:41:04 +0200
commita5e68ab10e2655853e7063ce3c7ce1aa31df9db8 (patch)
tree73f39299ad5a3e1accc4076bd11228819d3c15f1 /Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
parenta8ad59ee3e4345b9cc2fcf9bfe28e385a7e443c6 (diff)
TextureCacheBase: Support dumping individual mipmaps.
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
index e59fbd496e..0e43eb013d 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
@@ -45,8 +45,16 @@ void TextureCache::TCacheEntry::Bind(unsigned int stage)
D3D::context->PSSetShaderResources(stage, 1, &texture->GetSRV());
}
-bool TextureCache::TCacheEntry::Save(const char filename[])
+bool TextureCache::TCacheEntry::Save(const char filename[], unsigned int level)
{
+ // TODO: Somehow implement this (D3DX11 doesn't support dumping individual LODs)
+ static bool warn_once = true;
+ if (level && warn_once)
+ {
+ WARN_LOG(VIDEO, "Dumping individual LOD not supported by D3D11 backend!");
+ warn_once = false;
+ return false;
+ }
return SUCCEEDED(PD3DX11SaveTextureToFileA(D3D::context, texture->GetTex(), D3DX11_IFF_PNG, filename));
}