2010-04-25 00:31:27 +00:00
|
|
|
/*
|
2010-04-24 21:37:39 +00:00
|
|
|
* Copyright (C) 2007-2009 Gabest
|
|
|
|
* http://www.gabest.org
|
|
|
|
*
|
|
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
2010-04-25 00:31:27 +00:00
|
|
|
*
|
2010-04-24 21:37:39 +00:00
|
|
|
* This Program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2010-04-25 00:31:27 +00:00
|
|
|
*
|
2010-04-24 21:37:39 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNU Make; see the file COPYING. If not, write to
|
2012-09-09 18:16:11 +00:00
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
2010-04-24 21:37:39 +00:00
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-01-24 12:19:11 +00:00
|
|
|
#include "Renderers/HW/GSRendererHW.h"
|
2010-04-24 21:37:39 +00:00
|
|
|
#include "GSTextureCache11.h"
|
2019-01-24 12:19:11 +00:00
|
|
|
#include "Renderers/HW/GSVertexHW.h"
|
2010-04-24 21:37:39 +00:00
|
|
|
|
2019-01-24 17:18:22 +00:00
|
|
|
class GSRendererDX11 final : public GSRendererHW
|
2010-04-24 21:37:39 +00:00
|
|
|
{
|
2019-04-22 19:39:05 +00:00
|
|
|
enum ACC_BLEND_D3D11 {
|
|
|
|
ACC_BLEND_NONE_D3D11 = 0,
|
|
|
|
ACC_BLEND_BASIC_D3D11 = 1,
|
|
|
|
ACC_BLEND_MEDIUM_D3D11 = 2,
|
|
|
|
ACC_BLEND_HIGH_D3D11 = 3
|
|
|
|
};
|
|
|
|
|
2019-01-24 17:18:22 +00:00
|
|
|
private:
|
2019-01-24 12:19:11 +00:00
|
|
|
bool UserHacks_AlphaStencil;
|
2019-04-17 20:14:17 +00:00
|
|
|
bool m_bind_rtsample;
|
2019-01-24 12:19:11 +00:00
|
|
|
|
2019-01-24 17:18:22 +00:00
|
|
|
private:
|
|
|
|
inline void ResetStates();
|
|
|
|
inline void SetupIA(const float& sx, const float& sy);
|
|
|
|
inline void EmulateAtst(const int pass, const GSTextureCache::Source* tex);
|
|
|
|
inline void EmulateZbuffer();
|
|
|
|
inline void EmulateTextureShuffleAndFbmask();
|
|
|
|
inline void EmulateChannelShuffle(GSTexture** rt, const GSTextureCache::Source* tex);
|
|
|
|
inline void EmulateTextureSampler(const GSTextureCache::Source* tex);
|
2019-01-24 12:19:11 +00:00
|
|
|
|
2019-01-25 17:06:08 +00:00
|
|
|
GSDevice11::VSSelector m_vs_sel;
|
|
|
|
GSDevice11::GSSelector m_gs_sel;
|
|
|
|
GSDevice11::PSSelector m_ps_sel;
|
2019-01-24 12:19:11 +00:00
|
|
|
|
2019-01-25 17:06:08 +00:00
|
|
|
GSDevice11::PSSamplerSelector m_ps_ssel;
|
|
|
|
GSDevice11::OMBlendSelector m_om_bsel;
|
|
|
|
GSDevice11::OMDepthStencilSelector m_om_dssel;
|
2019-01-24 12:19:11 +00:00
|
|
|
|
2019-01-25 17:06:08 +00:00
|
|
|
GSDevice11::PSConstantBuffer ps_cb;
|
|
|
|
GSDevice11::VSConstantBuffer vs_cb;
|
|
|
|
GSDevice11::GSConstantBuffer gs_cb;
|
2012-01-05 02:40:24 +00:00
|
|
|
|
2010-04-24 21:37:39 +00:00
|
|
|
public:
|
|
|
|
GSRendererDX11();
|
|
|
|
virtual ~GSRendererDX11() {}
|
|
|
|
|
2019-01-24 17:18:22 +00:00
|
|
|
void DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex) final;
|
|
|
|
|
2010-04-24 21:37:39 +00:00
|
|
|
bool CreateDevice(GSDevice* dev);
|
2010-04-25 00:31:27 +00:00
|
|
|
};
|