From 766dbc5a9fd9db44f780dffa0a95d23aa276196a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 9 Nov 2020 09:00:06 +0100 Subject: [PATCH] Move ShaderTranslation.cpp/h to Common/GPU. --- CMakeLists.txt | 4 ++-- Common/Common.vcxproj | 2 ++ Common/Common.vcxproj.filters | 8 +++++++- {GPU/Common => Common/GPU}/ShaderTranslation.cpp | 2 +- {GPU/Common => Common/GPU}/ShaderTranslation.h | 0 GPU/Common/PresentationCommon.cpp | 2 +- GPU/D3D11/FramebufferManagerD3D11.cpp | 2 +- GPU/Directx9/FramebufferManagerDX9.cpp | 2 +- GPU/GPU.vcxproj | 2 -- GPU/GPU.vcxproj.filters | 8 +------- GPU/Software/SoftGpu.cpp | 2 +- UWP/CommonUWP/CommonUWP.vcxproj | 2 ++ UWP/CommonUWP/CommonUWP.vcxproj.filters | 6 ++++++ UWP/GPU_UWP/GPU_UWP.vcxproj | 2 -- UWP/GPU_UWP/GPU_UWP.vcxproj.filters | 2 -- android/jni/Android.mk | 2 +- libretro/Makefile.common | 2 +- 17 files changed, 27 insertions(+), 23 deletions(-) rename {GPU/Common => Common/GPU}/ShaderTranslation.cpp (99%) rename {GPU/Common => Common/GPU}/ShaderTranslation.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1497230247..516bc256ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,6 +500,8 @@ add_library(Common STATIC Common/GPU/Shader.h Common/GPU/ShaderWriter.cpp Common/GPU/ShaderWriter.h + Common/GPU/ShaderTranslation.h + Common/GPU/ShaderTranslation.cpp Common/GPU/OpenGL/GLCommon.h Common/GPU/OpenGL/GLDebugLog.cpp Common/GPU/OpenGL/GLDebugLog.h @@ -1362,8 +1364,6 @@ set(GPU_SOURCES GPU/Common/ShaderUniforms.h GPU/Common/ShaderCommon.cpp GPU/Common/ShaderCommon.h - GPU/Common/ShaderTranslation.cpp - GPU/Common/ShaderTranslation.h GPU/Common/SplineCommon.cpp GPU/Common/SplineCommon.h GPU/Common/StencilCommon.cpp diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index fe60080c88..b58a19d289 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -430,6 +430,7 @@ + @@ -753,6 +754,7 @@ + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 4f5d867492..3a7dbc7980 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -384,6 +384,9 @@ Data\Collections + + GPU + @@ -738,6 +741,9 @@ GPU + + GPU + @@ -853,4 +859,4 @@ Math\fast - + \ No newline at end of file diff --git a/GPU/Common/ShaderTranslation.cpp b/Common/GPU/ShaderTranslation.cpp similarity index 99% rename from GPU/Common/ShaderTranslation.cpp rename to Common/GPU/ShaderTranslation.cpp index 4307bfcf93..229f0e29e5 100644 --- a/GPU/Common/ShaderTranslation.cpp +++ b/Common/GPU/ShaderTranslation.cpp @@ -38,7 +38,7 @@ #include "Common/StringUtils.h" #include "Common/GPU/Shader.h" -#include "GPU/Common/ShaderTranslation.h" +#include "Common/GPU/ShaderTranslation.h" #include "ext/glslang/SPIRV/GlslangToSpv.h" #include "Common/GPU/thin3d.h" #include "Common/GPU/OpenGL/GLFeatures.h" diff --git a/GPU/Common/ShaderTranslation.h b/Common/GPU/ShaderTranslation.h similarity index 100% rename from GPU/Common/ShaderTranslation.h rename to Common/GPU/ShaderTranslation.h diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index d60dd3447c..01f698e5b7 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -33,7 +33,7 @@ #include "Core/HLE/sceDisplay.h" #include "GPU/Common/PostShader.h" #include "GPU/Common/PresentationCommon.h" -#include "GPU/Common/ShaderTranslation.h" +#include "Common/GPU/ShaderTranslation.h" struct Vertex { float x, y, z; diff --git a/GPU/D3D11/FramebufferManagerD3D11.cpp b/GPU/D3D11/FramebufferManagerD3D11.cpp index 97e5615551..71234a69c9 100644 --- a/GPU/D3D11/FramebufferManagerD3D11.cpp +++ b/GPU/D3D11/FramebufferManagerD3D11.cpp @@ -36,7 +36,7 @@ #include "GPU/Debugger/Stepping.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/PresentationCommon.h" -#include "GPU/Common/ShaderTranslation.h" +#include "Common/GPU/ShaderTranslation.h" #include "GPU/Common/TextureDecoder.h" #include "GPU/D3D11/FramebufferManagerD3D11.h" #include "GPU/D3D11/ShaderManagerD3D11.h" diff --git a/GPU/Directx9/FramebufferManagerDX9.cpp b/GPU/Directx9/FramebufferManagerDX9.cpp index 24c8799dc5..9d3b631e10 100644 --- a/GPU/Directx9/FramebufferManagerDX9.cpp +++ b/GPU/Directx9/FramebufferManagerDX9.cpp @@ -31,7 +31,7 @@ #include "Common/GPU/D3D9/D3D9StateCache.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/PresentationCommon.h" -#include "GPU/Common/ShaderTranslation.h" +#include "Common/GPU/ShaderTranslation.h" #include "GPU/Common/TextureDecoder.h" #include "GPU/Directx9/FramebufferManagerDX9.h" #include "GPU/Directx9/ShaderManagerDX9.h" diff --git a/GPU/GPU.vcxproj b/GPU/GPU.vcxproj index 4f2550f635..8f9e2404b6 100644 --- a/GPU/GPU.vcxproj +++ b/GPU/GPU.vcxproj @@ -350,7 +350,6 @@ - @@ -488,7 +487,6 @@ - diff --git a/GPU/GPU.vcxproj.filters b/GPU/GPU.vcxproj.filters index 2c800c5e5c..fff4ea4a51 100644 --- a/GPU/GPU.vcxproj.filters +++ b/GPU/GPU.vcxproj.filters @@ -222,9 +222,6 @@ D3D11 - - Common - Software @@ -485,9 +482,6 @@ D3D11 - - Common - Common @@ -546,4 +540,4 @@ Common - + \ No newline at end of file diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 7016f0b001..7f3547c401 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -41,7 +41,7 @@ #include "GPU/Software/TransformUnit.h" #include "GPU/Common/DrawEngineCommon.h" #include "GPU/Common/PresentationCommon.h" -#include "GPU/Common/ShaderTranslation.h" +#include "Common/GPU/ShaderTranslation.h" #include "GPU/Common/SplineCommon.h" #include "GPU/Debugger/Debugger.h" #include "GPU/Debugger/Record.h" diff --git a/UWP/CommonUWP/CommonUWP.vcxproj b/UWP/CommonUWP/CommonUWP.vcxproj index 56f207c60f..bf2b16ea49 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj +++ b/UWP/CommonUWP/CommonUWP.vcxproj @@ -420,6 +420,7 @@ + @@ -539,6 +540,7 @@ + diff --git a/UWP/CommonUWP/CommonUWP.vcxproj.filters b/UWP/CommonUWP/CommonUWP.vcxproj.filters index 8c7551735d..c0fb4df3ec 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj.filters +++ b/UWP/CommonUWP/CommonUWP.vcxproj.filters @@ -369,6 +369,9 @@ GPU + + GPU + @@ -674,6 +677,9 @@ GPU + + GPU + diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj b/UWP/GPU_UWP/GPU_UWP.vcxproj index fcf535af3d..e241137cf6 100644 --- a/UWP/GPU_UWP/GPU_UWP.vcxproj +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj @@ -391,7 +391,6 @@ - @@ -449,7 +448,6 @@ - diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj.filters b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters index 58617e8b91..0c5f3538bb 100644 --- a/UWP/GPU_UWP/GPU_UWP.vcxproj.filters +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters @@ -11,7 +11,6 @@ - @@ -70,7 +69,6 @@ - diff --git a/android/jni/Android.mk b/android/jni/Android.mk index f0dde080ea..a6cdedb5bd 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -254,6 +254,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Common/GPU/thin3d.cpp \ $(SRC)/Common/GPU/Shader.cpp \ $(SRC)/Common/GPU/ShaderWriter.cpp \ + $(SRC)/Common/GPU/ShaderTranslation.cpp \ $(SRC)/Common/Render/DrawBuffer.cpp \ $(SRC)/Common/Render/TextureAtlas.cpp \ $(SRC)/Common/Render/Text/draw_text.cpp \ @@ -321,7 +322,6 @@ EXEC_AND_LIB_FILES := \ $(SRC)/GPU/Common/TextureCacheCommon.cpp.arm \ $(SRC)/GPU/Common/TextureScalerCommon.cpp.arm \ $(SRC)/GPU/Common/ShaderCommon.cpp \ - $(SRC)/GPU/Common/ShaderTranslation.cpp \ $(SRC)/GPU/Common/StencilCommon.cpp \ $(SRC)/GPU/Common/SplineCommon.cpp.arm \ $(SRC)/GPU/Common/DrawEngineCommon.cpp.arm \ diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 72c79b7129..2fb57db46e 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -168,6 +168,7 @@ SOURCES_CXX += \ $(COMMONDIR)/GPU/thin3d.cpp \ $(COMMONDIR)/GPU/Shader.cpp \ $(COMMONDIR)/GPU/ShaderWriter.cpp \ + $(COMMONDIR)/GPU/ShaderTranslation.cpp \ $(COMMONDIR)/GPU/OpenGL/thin3d_gl.cpp \ $(COMMONDIR)/GPU/OpenGL/GLDebugLog.cpp \ $(COMMONDIR)/GPU/OpenGL/GLSLProgram.cpp \ @@ -238,7 +239,6 @@ SOURCES_CXX += \ $(GPUCOMMONDIR)/ShaderId.cpp \ $(GPUCOMMONDIR)/ShaderCommon.cpp \ $(GPUCOMMONDIR)/ShaderUniforms.cpp \ - $(GPUCOMMONDIR)/ShaderTranslation.cpp \ $(GPUCOMMONDIR)/GPUDebugInterface.cpp \ $(GPUCOMMONDIR)/DepalettizeShaderCommon.cpp \ $(GPUCOMMONDIR)/TransformCommon.cpp \