2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2011 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:29:41 +00:00
|
|
|
// Refer to the license.txt file included.
|
2011-03-14 09:38:29 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2011-03-14 09:38:29 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoCommon/VideoCommon.h"
|
2011-03-14 09:38:29 +00:00
|
|
|
|
2011-06-11 19:37:21 +00:00
|
|
|
struct ID3D11Texture2D;
|
|
|
|
struct ID3D11RenderTargetView;
|
|
|
|
struct ID3D11Buffer;
|
|
|
|
struct ID3D11VertexShader;
|
|
|
|
struct ID3D11PixelShader;
|
|
|
|
struct ID3D11InputLayout;
|
|
|
|
struct ID3D11BlendState;
|
|
|
|
struct ID3D11DepthStencilState;
|
|
|
|
struct ID3D11RasterizerState;
|
|
|
|
struct ID3D11SamplerState;
|
2011-03-14 09:38:29 +00:00
|
|
|
|
|
|
|
namespace DX11
|
|
|
|
{
|
|
|
|
class XFBEncoder
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
XFBEncoder();
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
2011-03-14 09:38:29 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcRect, float gamma);
|
2011-03-14 09:38:29 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
ID3D11Texture2D* m_out;
|
|
|
|
ID3D11RenderTargetView* m_outRTV;
|
|
|
|
ID3D11Texture2D* m_outStage;
|
|
|
|
ID3D11Buffer* m_encodeParams;
|
|
|
|
ID3D11Buffer* m_quad;
|
|
|
|
ID3D11VertexShader* m_vShader;
|
|
|
|
ID3D11InputLayout* m_quadLayout;
|
|
|
|
ID3D11PixelShader* m_pShader;
|
|
|
|
ID3D11BlendState* m_xfbEncodeBlendState;
|
|
|
|
ID3D11DepthStencilState* m_xfbEncodeDepthState;
|
|
|
|
ID3D11RasterizerState* m_xfbEncodeRastState;
|
|
|
|
ID3D11SamplerState* m_efbSampler;
|
2011-03-14 09:38:29 +00:00
|
|
|
};
|
|
|
|
}
|