From d1f62ca9bfd67a4d80648b8c1a9d56fc50b5a1e5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 16 Apr 2023 14:53:59 +1000 Subject: [PATCH] GS: Remove GSVertexList It doesn't appear to be used anywhere. --- pcsx2/CMakeLists.txt | 1 - pcsx2/GS/Renderers/Common/GSVertexList.cpp | 17 ----- pcsx2/GS/Renderers/Common/GSVertexList.h | 82 ---------------------- pcsx2/pcsx2core.vcxproj | 2 - pcsx2/pcsx2core.vcxproj.filters | 6 -- 5 files changed, 108 deletions(-) delete mode 100644 pcsx2/GS/Renderers/Common/GSVertexList.cpp delete mode 100644 pcsx2/GS/Renderers/Common/GSVertexList.h diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 15d88e7ce0..7d9f68a55a 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -566,7 +566,6 @@ set(pcsx2GSHeaders GS/Renderers/Common/GSRenderer.h GS/Renderers/Common/GSTexture.h GS/Renderers/Common/GSVertex.h - GS/Renderers/Common/GSVertexList.h GS/Renderers/Common/GSVertexTrace.h GS/Renderers/Null/GSRendererNull.h GS/Renderers/HW/GSHwHack.h diff --git a/pcsx2/GS/Renderers/Common/GSVertexList.cpp b/pcsx2/GS/Renderers/Common/GSVertexList.cpp deleted file mode 100644 index 1a400fe4b1..0000000000 --- a/pcsx2/GS/Renderers/Common/GSVertexList.cpp +++ /dev/null @@ -1,17 +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 . - */ - -#include "PrecompiledHeader.h" -#include "GSVertexList.h" diff --git a/pcsx2/GS/Renderers/Common/GSVertexList.h b/pcsx2/GS/Renderers/Common/GSVertexList.h deleted file mode 100644 index 757213319b..0000000000 --- a/pcsx2/GS/Renderers/Common/GSVertexList.h +++ /dev/null @@ -1,82 +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 . - */ - -#pragma once - -template -class GSVertexList -{ - void* m_base; - Vertex* m_v[3]; - int m_count; - -public: - GSVertexList() - : m_count(0) - { - m_base = _aligned_malloc(sizeof(Vertex) * std::size(m_v), 32); - - for (size_t i = 0; i < std::size(m_v); i++) - { - m_v[i] = &((Vertex*)m_base)[i]; - } - } - - virtual ~GSVertexList() - { - _aligned_free(m_base); - } - - void RemoveAll() - { - m_count = 0; - } - - __forceinline Vertex& AddTail() - { - ASSERT(m_count < 3); - - return *m_v[m_count++]; - } - - __forceinline void RemoveAt(int pos, int keep) - { - if (keep == 1) - { - Vertex* tmp = m_v[pos + 0]; - m_v[pos + 0] = m_v[pos + 1]; - m_v[pos + 1] = tmp; - } - else if (keep == 2) - { - Vertex* tmp = m_v[pos + 0]; - m_v[pos + 0] = m_v[pos + 1]; - m_v[pos + 1] = m_v[pos + 2]; - m_v[pos + 2] = tmp; - } - - m_count = pos + keep; - } - - __forceinline void GetAt(int i, Vertex& v) - { - v = *m_v[i]; - } - - int GetCount() - { - return m_count; - } -}; diff --git a/pcsx2/pcsx2core.vcxproj b/pcsx2/pcsx2core.vcxproj index dd3dbe0b59..5bb65a0a06 100644 --- a/pcsx2/pcsx2core.vcxproj +++ b/pcsx2/pcsx2core.vcxproj @@ -311,7 +311,6 @@ - @@ -646,7 +645,6 @@ - diff --git a/pcsx2/pcsx2core.vcxproj.filters b/pcsx2/pcsx2core.vcxproj.filters index 2fc94e4451..8e2b59cae3 100644 --- a/pcsx2/pcsx2core.vcxproj.filters +++ b/pcsx2/pcsx2core.vcxproj.filters @@ -1133,9 +1133,6 @@ System\Ps2\GS\Renderers\Common - - System\Ps2\GS\Renderers\Common - System\Ps2\GS\Renderers\Common @@ -2020,9 +2017,6 @@ System\Ps2\GS\Renderers\Common - - System\Ps2\GS\Renderers\Common - System\Ps2\GS\Renderers\Common