GSdx-d3d11: Merge GSRendererDX11 and GSRendererDX together.

Update VS and cmake project files to match new changes.
This commit is contained in:
lightningterror 2019-01-24 13:19:11 +01:00
parent b9df1e643b
commit 78f0b65e19
8 changed files with 1069 additions and 1161 deletions

View File

@ -216,7 +216,6 @@ if(Windows)
Renderers/DXCommon/GSDeviceDX.cpp
Window/GSDialog.cpp
Renderers/DX11/GSRendererDX11.cpp
Renderers/DXCommon/GSRendererDX.cpp
Renderers/DX11/GSTexture11.cpp
Renderers/DX11/GSTextureCache11.cpp
Renderers/DX11/GSTextureFX11.cpp
@ -233,7 +232,6 @@ if(Windows)
Renderers/DX11/GSDevice11.h
Renderers/DXCommon/GSDeviceDX.h
Renderers/DX11/GSRendererDX11.h
Renderers/DXCommon/GSRendererDX.h
Renderers/DX11/GSTexture11.h
Renderers/DX11/GSTextureCache11.h
Window/GSWndDX.h

View File

@ -128,7 +128,6 @@
<ClCompile Include="Renderers\SW\GSRasterizer.cpp" />
<ClCompile Include="Renderers\Common\GSRenderer.cpp" />
<ClCompile Include="Renderers\OpenCL\GSRendererCL.cpp" />
<ClCompile Include="Renderers\DXCommon\GSRendererDX.cpp" />
<ClCompile Include="Renderers\DX11\GSRendererDX11.cpp" />
<ClCompile Include="Renderers\HW\GSRendererHW.cpp" />
<ClCompile Include="Renderers\Null\GSRendererNull.cpp" />
@ -212,7 +211,6 @@
<ClInclude Include="Renderers\SW\GSRasterizer.h" />
<ClInclude Include="Renderers\Common\GSRenderer.h" />
<ClInclude Include="Renderers\OpenCL\GSRendererCL.h" />
<ClInclude Include="Renderers\DXCommon\GSRendererDX.h" />
<ClInclude Include="Renderers\DX11\GSRendererDX11.h" />
<ClInclude Include="Renderers\HW\GSRendererHW.h" />
<ClInclude Include="Renderers\Null\GSRendererNull.h" />

View File

@ -96,9 +96,6 @@
<ClCompile Include="Renderers\Common\GSRenderer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Renderers\DXCommon\GSRendererDX.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Renderers\DX11\GSRendererDX11.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -362,9 +359,6 @@
<ClInclude Include="Renderers\Common\GSRenderer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Renderers\DXCommon\GSRendererDX.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Renderers\DX11\GSRendererDX11.h">
<Filter>Header Files</Filter>
</ClInclude>

File diff suppressed because it is too large Load Diff

View File

@ -21,14 +21,36 @@
#pragma once
#include "Renderers/DXCommon/GSRendererDX.h"
#include "Renderers/HW/GSVertexHW.h"
#include "Renderers/HW/GSRendererHW.h"
#include "GSTextureCache11.h"
#include "Renderers/HW/GSVertexHW.h"
class GSRendererDX11 : public GSRendererDX
class GSRendererDX11 : public GSRendererHW
{
bool UserHacks_AlphaHack;
bool UserHacks_AlphaStencil;
protected:
void ResetStates();
void SetupIA(const float& sx, const float& sy);
void EmulateAtst(const int pass, const GSTextureCache::Source* tex);
void EmulateZbuffer();
void EmulateTextureShuffleAndFbmask();
void EmulateChannelShuffle(GSTexture** rt, const GSTextureCache::Source* tex);
void EmulateTextureSampler(const GSTextureCache::Source* tex);
virtual void DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex);
GSDeviceDX::VSSelector m_vs_sel;
GSDeviceDX::GSSelector m_gs_sel;
GSDeviceDX::PSSelector m_ps_sel;
GSDeviceDX::PSSamplerSelector m_ps_ssel;
GSDeviceDX::OMBlendSelector m_om_bsel;
GSDeviceDX::OMDepthStencilSelector m_om_dssel;
GSDeviceDX::PSConstantBuffer ps_cb;
GSDeviceDX::VSConstantBuffer vs_cb;
GSDeviceDX::GSConstantBuffer gs_cb;
public:
GSRendererDX11();

File diff suppressed because it is too large Load Diff

View File

@ -1,62 +0,0 @@
/*
* 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.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
* http://www.gnu.org/copyleft/gpl.html
*
*/
#pragma once
#include "Renderers/HW/GSRendererHW.h"
#include "GSDeviceDX.h"
class GSRendererDX : public GSRendererHW
{
GSVector2 m_pixelcenter;
bool UserHacks_AlphaHack;
bool UserHacks_AlphaStencil;
protected:
void ResetStates();
void EmulateAtst(const int pass, const GSTextureCache::Source* tex);
void EmulateZbuffer();
void EmulateTextureShuffleAndFbmask();
void EmulateChannelShuffle(GSTexture** rt, const GSTextureCache::Source* tex);
void EmulateTextureSampler(const GSTextureCache::Source* tex);
virtual void DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex);
virtual void SetupIA(const float& sx, const float& sy) = 0;
GSDeviceDX* dev;
GSDeviceDX::VSSelector m_vs_sel;
GSDeviceDX::GSSelector m_gs_sel;
GSDeviceDX::PSSelector m_ps_sel;
GSDeviceDX::PSSamplerSelector m_ps_ssel;
GSDeviceDX::OMBlendSelector m_om_bsel;
GSDeviceDX::OMDepthStencilSelector m_om_dssel;
GSDeviceDX::PSConstantBuffer ps_cb;
GSDeviceDX::VSConstantBuffer vs_cb;
GSDeviceDX::GSConstantBuffer gs_cb;
public:
GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter = GSVector2(0));
virtual ~GSRendererDX();
};

View File

@ -1207,7 +1207,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// vs
// FIXME Opengl support half pixel center (as dx10). Code could be easier!!!
// FIXME D3D11 and GL support half pixel center. Code could be easier!!!
float sx = 2.0f * rtscale.x / (rtsize.x << 4);
float sy = 2.0f * rtscale.y / (rtsize.y << 4);
float ox = (float)(int)m_context->XYOFFSET.OFX;
@ -1215,8 +1215,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
float ox2 = -1.0f / rtsize.x;
float oy2 = -1.0f / rtsize.y;
//This hack subtracts around half a pixel from OFX and OFY. (Cannot do this directly,
//because DX10 and DX9 have a different pixel center.)
//This hack subtracts around half a pixel from OFX and OFY.
//
//The resulting shifted output aligns better with common blending / corona / blurring effects,
//but introduces a few bad pixels on the edges.