D3D: Use two slices for most of our textures.

This commit is contained in:
Jules Blok
2014-11-02 14:51:12 +01:00
parent 5aa1d4733d
commit 9a312e2b83
5 changed files with 21 additions and 14 deletions

View File

@ -45,7 +45,7 @@ namespace DX11 {
struct XFBSource : public XFBSourceBase
{
XFBSource(D3DTexture2D *_tex) : tex(_tex) {}
XFBSource(D3DTexture2D *_tex, int slices) : tex(_tex), m_slices(slices) {}
~XFBSource() { tex->Release(); }
void Draw(const MathUtil::Rectangle<int> &sourcerc,
@ -54,6 +54,7 @@ struct XFBSource : public XFBSourceBase
void CopyEFB(float Gamma) override;
D3DTexture2D* const tex;
const int m_slices;
};
class FramebufferManager : public FramebufferManagerBase
@ -80,6 +81,8 @@ public:
m_efb.color_tex = swaptex;
}
static int GetEFBSlices() { return m_efb.slices; }
private:
XFBSourceBase* CreateXFBSource(unsigned int target_width, unsigned int target_height) override;
void GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc) override;
@ -99,6 +102,8 @@ private:
D3DTexture2D* resolved_color_tex;
D3DTexture2D* resolved_depth_tex;
int slices;
} m_efb;
};