Revert r7421 and r7422.

Should fix issue 4413.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7592 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2011-06-11 19:37:21 +00:00
parent e5210de9d5
commit 8244efcc02
42 changed files with 1647 additions and 1420 deletions

View File

@ -19,32 +19,48 @@
#define _PSTEXTUREENCODER_H
#include "TextureEncoder.h"
#include "D3DUtil.h"
struct ID3D11Texture2D;
struct ID3D11RenderTargetView;
struct ID3D11Buffer;
struct ID3D11InputLayout;
struct ID3D11VertexShader;
struct ID3D11PixelShader;
struct ID3D11ClassLinkage;
struct ID3D11ClassInstance;
struct ID3D11BlendState;
struct ID3D11DepthStencilState;
struct ID3D11RasterizerState;
struct ID3D11SamplerState;
namespace DX11
{
class PSTextureEncoder : public TextureEncoder
{
public:
PSTextureEncoder();
~PSTextureEncoder();
public:
PSTextureEncoder();
void Init();
void Shutdown();
size_t Encode(u8* dst, unsigned int dstFormat,
unsigned int srcFormat, const EFBRectangle& srcRect, bool isIntensity,
bool scaleByHalf);
private:
bool m_ready;
SharedPtr<ID3D11Texture2D> m_out;
ID3D11Texture2D* m_out;
ID3D11RenderTargetView* m_outRTV;
SharedPtr<ID3D11Texture2D> m_outStage;
SharedPtr<ID3D11Buffer> m_encodeParams;
SharedPtr<ID3D11Buffer> m_quad;
SharedPtr<ID3D11VertexShader> m_vShader;
SharedPtr<ID3D11InputLayout> m_quadLayout;
SharedPtr<ID3D11BlendState> m_efbEncodeBlendState;
ID3D11Texture2D* m_outStage;
ID3D11Buffer* m_encodeParams;
ID3D11Buffer* m_quad;
ID3D11VertexShader* m_vShader;
ID3D11InputLayout* m_quadLayout;
ID3D11BlendState* m_efbEncodeBlendState;
ID3D11DepthStencilState* m_efbEncodeDepthState;
ID3D11RasterizerState* m_efbEncodeRastState;
ID3D11SamplerState* m_efbSampler;
@ -64,7 +80,7 @@ private:
| (scaleByHalf ? (1<<0) : 0);
}
typedef std::map<ComboKey, SharedPtr<ID3D11PixelShader>> ComboMap;
typedef std::map<ComboKey, ID3D11PixelShader*> ComboMap;
ComboMap m_staticShaders;
@ -75,7 +91,7 @@ private:
bool SetDynamicShader(unsigned int dstFormat, unsigned int srcFormat,
bool isIntensity, bool scaleByHalf);
SharedPtr<ID3D11PixelShader> m_dynamicShader;
ID3D11PixelShader* m_dynamicShader;
ID3D11ClassLinkage* m_classLinkage;
// Interface slots
@ -95,6 +111,7 @@ private:
ID3D11ClassInstance* m_generatorClass[16];
std::vector<ID3D11ClassInstance*> m_linkageArray;
};
}