GS: Remove GSDeviceNull

It hasn't been used in a while, we just use a normal device
and null renderer instead.
This commit is contained in:
Stenzek 2023-03-21 22:46:36 +10:00 committed by refractionpcsx2
parent 280a41806f
commit 3346349bba
8 changed files with 0 additions and 159 deletions

View File

@ -518,9 +518,7 @@ set(pcsx2GSSources
GS/Renderers/Common/GSRenderer.cpp GS/Renderers/Common/GSRenderer.cpp
GS/Renderers/Common/GSTexture.cpp GS/Renderers/Common/GSTexture.cpp
GS/Renderers/Common/GSVertexTrace.cpp GS/Renderers/Common/GSVertexTrace.cpp
GS/Renderers/Null/GSDeviceNull.cpp
GS/Renderers/Null/GSRendererNull.cpp GS/Renderers/Null/GSRendererNull.cpp
GS/Renderers/Null/GSTextureNull.cpp
GS/Renderers/HW/GSHwHack.cpp GS/Renderers/HW/GSHwHack.cpp
GS/Renderers/HW/GSRendererHW.cpp GS/Renderers/HW/GSRendererHW.cpp
GS/Renderers/HW/GSTextureCache.cpp GS/Renderers/HW/GSTextureCache.cpp
@ -572,9 +570,7 @@ set(pcsx2GSHeaders
GS/Renderers/Common/GSVertex.h GS/Renderers/Common/GSVertex.h
GS/Renderers/Common/GSVertexList.h GS/Renderers/Common/GSVertexList.h
GS/Renderers/Common/GSVertexTrace.h GS/Renderers/Common/GSVertexTrace.h
GS/Renderers/Null/GSDeviceNull.h
GS/Renderers/Null/GSRendererNull.h GS/Renderers/Null/GSRendererNull.h
GS/Renderers/Null/GSTextureNull.h
GS/Renderers/HW/GSHwHack.h GS/Renderers/HW/GSHwHack.h
GS/Renderers/HW/GSRendererHW.h GS/Renderers/HW/GSRendererHW.h
GS/Renderers/HW/GSTextureCache.h GS/Renderers/HW/GSTextureCache.h

View File

@ -21,7 +21,6 @@
#include "GSUtil.h" #include "GSUtil.h"
#include "GSExtra.h" #include "GSExtra.h"
#include "Renderers/Null/GSRendererNull.h" #include "Renderers/Null/GSRendererNull.h"
#include "Renderers/Null/GSDeviceNull.h"
#include "Renderers/HW/GSRendererHW.h" #include "Renderers/HW/GSRendererHW.h"
#include "Renderers/HW/GSTextureReplacements.h" #include "Renderers/HW/GSTextureReplacements.h"
#include "GSLzma.h" #include "GSLzma.h"

View File

@ -1,22 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 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 PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "GSDeviceNull.h"
GSTexture* GSDeviceNull::CreateSurface(GSTexture::Type type, int width, int height, int levels, GSTexture::Format format)
{
return new GSTextureNull(type, width, height, levels, format);
}

View File

@ -1,32 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 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 PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "GS/Renderers/Common/GSDevice.h"
#include "GSTextureNull.h"
class GSDeviceNull : public GSDevice
{
private:
GSTexture* CreateSurface(GSTexture::Type type, int width, int height, int levels, GSTexture::Format format);
void DoMerge(GSTexture* sTex[3], GSVector4* sRect, GSTexture* dTex, GSVector4* dRect, const GSRegPMODE& PMODE, const GSRegEXTBUF& EXTBUF, const GSVector4& c, const bool linear) {}
void DoInterlace(GSTexture* sTex, GSTexture* dTex, int shader, bool linear, float yoffset = 0, int bufIdx = 0) {}
u16 ConvertBlendEnum(u16 generic) { return 0xFFFF; }
public:
GSDeviceNull() {}
};

View File

@ -1,42 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 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 PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "GSTextureNull.h"
GSTextureNull::GSTextureNull()
{
memset(&m_desc, 0, sizeof(m_desc));
}
GSTextureNull::GSTextureNull(Type type, int w, int h, int levels, GSTexture::Format format)
{
m_desc.type = type;
m_desc.w = w;
m_desc.h = h;
m_desc.levels = levels;
m_desc.format = format;
}
void GSTextureNull::Swap(GSTexture* tex)
{
GSTexture::Swap(tex);
std::swap(m_desc, static_cast<GSTextureNull*>(tex)->m_desc);
}
void* GSTextureNull::GetNativeHandle() const
{
return nullptr;
}

View File

@ -1,42 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 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 PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "GS/Renderers/Common/GSTexture.h"
class GSTextureNull final : public GSTexture
{
struct
{
Type type;
Format format;
int w, h, levels;
} m_desc;
public:
GSTextureNull();
GSTextureNull(Type type, int w, int h, int levels, Format format);
Type GetType() const { return m_desc.type; }
Format GetFormat() const { return m_desc.format; }
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) override { return true; }
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) override { return false; }
void Unmap() override {}
bool Save(const std::string& fn) override { return false; }
void Swap(GSTexture* tex) override;
void* GetNativeHandle() const override;
};

View File

@ -285,7 +285,6 @@
<ClCompile Include="GS\GSCrc.cpp" /> <ClCompile Include="GS\GSCrc.cpp" />
<ClCompile Include="GS\Renderers\Common\GSDevice.cpp" /> <ClCompile Include="GS\Renderers\Common\GSDevice.cpp" />
<ClCompile Include="GS\Renderers\DX11\GSDevice11.cpp" /> <ClCompile Include="GS\Renderers\DX11\GSDevice11.cpp" />
<ClCompile Include="GS\Renderers\Null\GSDeviceNull.cpp" />
<ClCompile Include="GS\Renderers\OpenGL\GSDeviceOGL.cpp" /> <ClCompile Include="GS\Renderers\OpenGL\GSDeviceOGL.cpp" />
<ClCompile Include="GS\Renderers\Common\GSDirtyRect.cpp" /> <ClCompile Include="GS\Renderers\Common\GSDirtyRect.cpp" />
<ClCompile Include="GS\GSDrawingContext.cpp" /> <ClCompile Include="GS\GSDrawingContext.cpp" />
@ -318,7 +317,6 @@
<ClCompile Include="GS\Renderers\HW\GSTextureCache.cpp" /> <ClCompile Include="GS\Renderers\HW\GSTextureCache.cpp" />
<ClCompile Include="GS\Renderers\SW\GSTextureCacheSW.cpp" /> <ClCompile Include="GS\Renderers\SW\GSTextureCacheSW.cpp" />
<ClCompile Include="GS\Renderers\DX11\GSTextureFX11.cpp" /> <ClCompile Include="GS\Renderers\DX11\GSTextureFX11.cpp" />
<ClCompile Include="GS\Renderers\Null\GSTextureNull.cpp" />
<ClCompile Include="GS\Renderers\SW\GSTextureSW.cpp" /> <ClCompile Include="GS\Renderers\SW\GSTextureSW.cpp" />
<ClCompile Include="GS\GSUtil.cpp" /> <ClCompile Include="GS\GSUtil.cpp" />
<ClCompile Include="GS\GSVector.cpp" /> <ClCompile Include="GS\GSVector.cpp" />
@ -624,7 +622,6 @@
<ClInclude Include="GS\GSCrc.h" /> <ClInclude Include="GS\GSCrc.h" />
<ClInclude Include="GS\Renderers\Common\GSDevice.h" /> <ClInclude Include="GS\Renderers\Common\GSDevice.h" />
<ClInclude Include="GS\Renderers\DX11\GSDevice11.h" /> <ClInclude Include="GS\Renderers\DX11\GSDevice11.h" />
<ClInclude Include="GS\Renderers\Null\GSDeviceNull.h" />
<ClInclude Include="GS\Renderers\OpenGL\GSDeviceOGL.h" /> <ClInclude Include="GS\Renderers\OpenGL\GSDeviceOGL.h" />
<ClInclude Include="GS\Renderers\Common\GSDirtyRect.h" /> <ClInclude Include="GS\Renderers\Common\GSDirtyRect.h" />
<ClInclude Include="GS\GSDrawingContext.h" /> <ClInclude Include="GS\GSDrawingContext.h" />
@ -656,7 +653,6 @@
<ClInclude Include="GS\Renderers\OpenGL\GSTextureOGL.h" /> <ClInclude Include="GS\Renderers\OpenGL\GSTextureOGL.h" />
<ClInclude Include="GS\Renderers\HW\GSTextureCache.h" /> <ClInclude Include="GS\Renderers\HW\GSTextureCache.h" />
<ClInclude Include="GS\Renderers\SW\GSTextureCacheSW.h" /> <ClInclude Include="GS\Renderers\SW\GSTextureCacheSW.h" />
<ClInclude Include="GS\Renderers\Null\GSTextureNull.h" />
<ClInclude Include="GS\Renderers\SW\GSTextureSW.h" /> <ClInclude Include="GS\Renderers\SW\GSTextureSW.h" />
<ClInclude Include="GS\GSThread.h" /> <ClInclude Include="GS\GSThread.h" />
<ClInclude Include="GS\GSThread_CXX11.h" /> <ClInclude Include="GS\GSThread_CXX11.h" />

View File

@ -1100,15 +1100,9 @@
<ClCompile Include="GS\Renderers\SW\GSRasterizer.cpp"> <ClCompile Include="GS\Renderers\SW\GSRasterizer.cpp">
<Filter>System\Ps2\GS\Renderers\Software</Filter> <Filter>System\Ps2\GS\Renderers\Software</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="GS\Renderers\Null\GSDeviceNull.cpp">
<Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClCompile>
<ClCompile Include="GS\Renderers\Null\GSRendererNull.cpp"> <ClCompile Include="GS\Renderers\Null\GSRendererNull.cpp">
<Filter>System\Ps2\GS\Renderers\Null</Filter> <Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="GS\Renderers\Null\GSTextureNull.cpp">
<Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClCompile>
<ClCompile Include="GS\Renderers\HW\GSRendererHW.cpp"> <ClCompile Include="GS\Renderers\HW\GSRendererHW.cpp">
<Filter>System\Ps2\GS\Renderers\Hardware</Filter> <Filter>System\Ps2\GS\Renderers\Hardware</Filter>
</ClCompile> </ClCompile>
@ -2026,15 +2020,9 @@
<ClInclude Include="GS\Renderers\SW\GSRasterizer.h"> <ClInclude Include="GS\Renderers\SW\GSRasterizer.h">
<Filter>System\Ps2\GS\Renderers\Software</Filter> <Filter>System\Ps2\GS\Renderers\Software</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="GS\Renderers\Null\GSDeviceNull.h">
<Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClInclude>
<ClInclude Include="GS\Renderers\Null\GSRendererNull.h"> <ClInclude Include="GS\Renderers\Null\GSRendererNull.h">
<Filter>System\Ps2\GS\Renderers\Null</Filter> <Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="GS\Renderers\Null\GSTextureNull.h">
<Filter>System\Ps2\GS\Renderers\Null</Filter>
</ClInclude>
<ClInclude Include="GS\Renderers\HW\GSRendererHW.h"> <ClInclude Include="GS\Renderers\HW\GSRendererHW.h">
<Filter>System\Ps2\GS\Renderers\Hardware</Filter> <Filter>System\Ps2\GS\Renderers\Hardware</Filter>
</ClInclude> </ClInclude>