2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-13 19:50:06 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoBackends/D3D/D3DTexture.h"
|
|
|
|
#include "VideoCommon/TextureCacheBase.h"
|
2010-10-19 22:24:27 +00:00
|
|
|
|
|
|
|
namespace DX11
|
|
|
|
{
|
|
|
|
|
|
|
|
class TextureCache : public ::TextureCache
|
2010-06-13 19:50:06 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-10-19 22:24:27 +00:00
|
|
|
TextureCache();
|
|
|
|
~TextureCache();
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct TCacheEntry : TCacheEntryBase
|
2010-06-13 19:50:06 +00:00
|
|
|
{
|
2011-06-11 19:37:21 +00:00
|
|
|
D3DTexture2D *const texture;
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2010-10-19 22:24:27 +00:00
|
|
|
D3D11_USAGE usage;
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2011-06-11 19:37:21 +00:00
|
|
|
TCacheEntry(D3DTexture2D *_tex) : texture(_tex) {}
|
|
|
|
~TCacheEntry();
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2010-10-19 22:24:27 +00:00
|
|
|
void Load(unsigned int width, unsigned int height,
|
2014-03-11 05:55:00 +00:00
|
|
|
unsigned int expanded_width, unsigned int levels) override;
|
2010-10-19 22:24:27 +00:00
|
|
|
|
2011-02-26 23:41:02 +00:00
|
|
|
void FromRenderTarget(u32 dstAddr, unsigned int dstFormat,
|
2014-03-23 20:44:23 +00:00
|
|
|
PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect,
|
2011-02-26 23:41:02 +00:00
|
|
|
bool isIntensity, bool scaleByHalf, unsigned int cbufid,
|
2014-03-11 05:55:00 +00:00
|
|
|
const float *colmat) override;
|
2010-10-19 22:24:27 +00:00
|
|
|
|
2014-03-11 05:55:00 +00:00
|
|
|
void Bind(unsigned int stage) override;
|
|
|
|
bool Save(const std::string& filename, unsigned int level) override;
|
2010-10-19 22:24:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
TCacheEntryBase* CreateTexture(unsigned int width, unsigned int height,
|
2014-11-05 21:09:39 +00:00
|
|
|
unsigned int tex_levels, PC_TexFormat pcfmt) override;
|
2010-10-19 22:24:27 +00:00
|
|
|
|
2014-03-11 05:55:00 +00:00
|
|
|
TCacheEntryBase* CreateRenderTargetTexture(unsigned int scaled_tex_w, unsigned int scaled_tex_h) override;
|
2011-06-11 19:37:21 +00:00
|
|
|
u64 EncodeToRamFromTexture(u32 address, void* source_texture, u32 SourceW, u32 SourceH, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle& source) {return 0;};
|
2014-11-03 23:53:14 +00:00
|
|
|
|
|
|
|
void CompileShaders() override { }
|
|
|
|
void DeleteShaders() override { }
|
2010-06-13 19:50:06 +00:00
|
|
|
};
|
2010-10-19 22:24:27 +00:00
|
|
|
|
|
|
|
}
|