summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TextureCache.h
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2017-11-19 04:58:59 +0100
committerGitHub <noreply@github.com>2017-11-19 04:58:59 +0100
commit609a17a0cd41a12c0fbf9a7c47c8889232594778 (patch)
tree0a5f6f4b0a7d480accc4dfbcc3e9c1c6e3652dc0 /Source/Core/VideoBackends/Software/TextureCache.h
parentd800b0f79868a28356b4e40cb9b2e5af43977042 (diff)
parent1f1574b7ab032afa7b3a600a071699f2cbea124e (diff)
Merge pull request #5498 from iwubcode/hybrid_xfb
Hybrid xfb
Diffstat (limited to 'Source/Core/VideoBackends/Software/TextureCache.h')
-rw-r--r--Source/Core/VideoBackends/Software/TextureCache.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Software/TextureCache.h b/Source/Core/VideoBackends/Software/TextureCache.h
new file mode 100644
index 0000000000..3573d36ebb
--- /dev/null
+++ b/Source/Core/VideoBackends/Software/TextureCache.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include <memory>
+#include "VideoBackends/Software/SWTexture.h"
+#include "VideoBackends/Software/TextureEncoder.h"
+#include "VideoCommon/TextureCacheBase.h"
+
+namespace SW
+{
+class TextureCache : public TextureCacheBase
+{
+public:
+ bool CompileShaders() override { return true; }
+ void DeleteShaders() override {}
+ void ConvertTexture(TCacheEntry* entry, TCacheEntry* unconverted, const void* palette,
+ TLUTFormat format) override
+ {
+ }
+ void CopyEFB(u8* dst, const EFBCopyParams& params, u32 native_width, u32 bytes_per_row,
+ u32 num_blocks_y, u32 memory_stride, const EFBRectangle& src_rect,
+ bool scale_by_half) override
+ {
+ TextureEncoder::Encode(dst, params, native_width, bytes_per_row, num_blocks_y, memory_stride,
+ src_rect, scale_by_half);
+ }
+
+private:
+ std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config) override
+ {
+ return std::make_unique<SWTexture>(config);
+ }
+
+ void CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_copy, const EFBRectangle& src_rect,
+ bool scale_by_half, unsigned int cbuf_id, const float* colmat) override
+ {
+ // TODO: If we ever want to "fake" vram textures, we would need to implement this
+ }
+};
+
+} // namespace SW