diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a7699f8c4..a62d384318 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,11 +164,12 @@ else() set(CoreLinkType STATIC) endif() -include_directories(ext/native) - # Work around for some misfeature of the current glslang build system include_directories(ext/glslang) +# Not sure if this is the best way - what about system glew? +# Anyway, glew will be going away anyway. +include_directories(ext/glew) if(NOT OPENGL_LIBRARIES AND USING_GLES2) set(OPENGL_LIBRARIES GLESv2 EGL) @@ -299,12 +300,7 @@ if(NOT MSVC) if(IOS) elseif(APPLE AND NOT CMAKE_CROSSCOMPILING) - # We want C++11, so target 10.7+ - if(USING_QT_UI) - set(MACOSX_VERSION_MIN "10.8") - else() - set(MACOSX_VERSION_MIN "10.7") - endif() + set(MACOSX_VERSION_MIN "10.8") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN} -stdlib=libc++ -U__STRICT_ANSI__") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") @@ -354,6 +350,14 @@ macro(setup_target_project TargetName ProjectDir) endforeach() endmacro() +add_subdirectory(ext) + +if(WIN32) + include_directories(dx9sdk/Include) + include_directories(dx9sdk/Include/DX11) +endif() + + set(CommonX86 Common/ABI.cpp Common/ABI.h @@ -400,18 +404,19 @@ if(NOT (X86 OR ARM OR MIPS)) source_group(Fake FILES ${CommonFake}) endif() -set(CommonVulkan ${CommonExtra} - Common/Vulkan/VulkanDebug.cpp - Common/Vulkan/VulkanDebug.h - Common/Vulkan/VulkanContext.cpp - Common/Vulkan/VulkanContext.h - Common/Vulkan/VulkanImage.cpp - Common/Vulkan/VulkanImage.h - Common/Vulkan/VulkanLoader.cpp - Common/Vulkan/VulkanLoader.h - Common/Vulkan/VulkanMemory.cpp - Common/Vulkan/VulkanMemory.h -) +if(WIN32) + set(CommonD3D + Common/GPU/D3D9/D3D9ShaderCompiler.cpp + Common/GPU/D3D9/D3D9ShaderCompiler.h + Common/GPU/D3D9/D3D9StateCache.cpp + Common/GPU/D3D9/D3D9StateCache.h + Common/GPU/D3D9/thin3d_d3d9.cpp + Common/GPU/D3D9/D3DCompilerLoader.cpp + Common/GPU/D3D11/thin3d_d3d11.cpp + Common/GPU/D3D11/D3D11Loader.cpp + Common/GPU/D3D11/D3D11Loader.h + ) +endif() add_library(Common STATIC ${CommonX86} @@ -419,7 +424,7 @@ add_library(Common STATIC ${CommonARM64} ${CommonMIPS} ${CommonFake} - ${CommonVulkan} + ${CommonD3D} Common/Serialize/Serializer.cpp Common/Serialize/Serializer.h Common/Serialize/SerializeDeque.h @@ -484,6 +489,41 @@ add_library(Common STATIC Common/File/DirListing.h Common/File/FileDescriptor.cpp Common/File/FileDescriptor.h + Common/GPU/DataFormat.h + Common/GPU/thin3d.cpp + Common/GPU/thin3d.h + Common/GPU/thin3d_create.h + Common/GPU/OpenGL/GLCommon.h + Common/GPU/OpenGL/GLDebugLog.cpp + Common/GPU/OpenGL/GLDebugLog.h + Common/GPU/OpenGL/GLSLProgram.cpp + Common/GPU/OpenGL/GLSLProgram.h + Common/GPU/OpenGL/gl3stub.c + Common/GPU/OpenGL/gl3stub.h + Common/GPU/OpenGL/GLFeatures.cpp + Common/GPU/OpenGL/GLFeatures.h + Common/GPU/OpenGL/thin3d_gl.cpp + Common/GPU/OpenGL/GLRenderManager.cpp + Common/GPU/OpenGL/GLRenderManager.h + Common/GPU/OpenGL/GLQueueRunner.cpp + Common/GPU/OpenGL/GLQueueRunner.h + Common/GPU/OpenGL/DataFormatGL.cpp + Common/GPU/OpenGL/DataFormatGL.h + Common/GPU/Vulkan/VulkanDebug.cpp + Common/GPU/Vulkan/VulkanDebug.h + Common/GPU/Vulkan/VulkanContext.cpp + Common/GPU/Vulkan/VulkanContext.h + Common/GPU/Vulkan/VulkanImage.cpp + Common/GPU/Vulkan/VulkanImage.h + Common/GPU/Vulkan/VulkanLoader.cpp + Common/GPU/Vulkan/VulkanLoader.h + Common/GPU/Vulkan/VulkanMemory.cpp + Common/GPU/Vulkan/VulkanMemory.h + Common/GPU/Vulkan/thin3d_vulkan.cpp + Common/GPU/Vulkan/VulkanRenderManager.cpp + Common/GPU/Vulkan/VulkanRenderManager.h + Common/GPU/Vulkan/VulkanQueueRunner.cpp + Common/GPU/Vulkan/VulkanQueueRunner.h Common/Input/GestureDetector.cpp Common/Input/GestureDetector.h Common/Input/KeyCodes.h @@ -519,6 +559,18 @@ add_library(Common STATIC Common/Net/WebsocketServer.h Common/Profiler/Profiler.cpp Common/Profiler/Profiler.h + Common/Render/TextureAtlas.cpp + Common/Render/TextureAtlas.h + Common/Render/DrawBuffer.cpp + Common/Render/DrawBuffer.h + Common/Render/Text/draw_text.cpp + Common/Render/Text/draw_text.h + Common/Render/Text/draw_text_android.cpp + Common/Render/Text/draw_text_android.h + Common/Render/Text/draw_text_win.cpp + Common/Render/Text/draw_text_win.h + Common/Render/Text/draw_text_uwp.cpp + Common/Render/Text/draw_text_uwp.h Common/System/Display.cpp Common/System/Display.h Common/Thread/Executor.cpp @@ -590,39 +642,21 @@ add_library(Common STATIC Common/TimeUtil.h ) -add_subdirectory(ext) - include_directories(Common) setup_target_project(Common Common) target_link_libraries(Common Ext::Snappy) -if(WIN32) - include_directories(dx9sdk/Include) - include_directories(dx9sdk/Include/DX11) - if(MINGW) - set(CMAKE_RC_COMPILE_OBJECT " -O coff ") - # required when using the dx9sdk include paths - add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h) - else() - target_link_libraries(Common dxguid) - endif() - target_link_libraries(Common winmm d3d9 dsound) -endif() - -if(TARGET SDL2::SDL2) - target_link_libraries(Common SDL2::SDL2) -endif() - if(USING_GLES2 OR (USING_EGL AND NOT USING_FBDEV)) find_package(X11) endif() add_library(gason STATIC - ext/gason/gason.cpp - ext/gason/gason.h + ext/gason/gason.cpp + ext/gason/gason.h ) + if(USE_FFMPEG) if(NOT FFMPEG_DIR) if(NOT USE_SYSTEM_FFMPEG) @@ -927,11 +961,13 @@ elseif(USING_QT_UI) if(USING_GLES2) add_definitions(-DQT_OPENGL_ES -DQT_OPENGL_ES_2) endif() - include_directories(${CMAKE_CURRENT_BINARY_DIR} Qt) + + include_directories(Qt) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(nativeExtraLibs ${nativeExtraLibs} Qt5::OpenGL Qt5::Gui Qt5::Core Qt5::Multimedia) set(TargetBin PPSSPPQt) - # Enable SDL if found + # Enable SDL joystick if SDL is found if(SDL2_FOUND) add_definitions(-DSDL) set(nativeExtra ${nativeExtra} @@ -972,6 +1008,22 @@ elseif(NOT LIBRETRO) message(FATAL_ERROR "Could not find SDL2. Failing.") endif() +if(WIN32) + if(MINGW) + set(CMAKE_RC_COMPILE_OBJECT " -O coff ") + # required when using the dx9sdk include paths + add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h) + else() + target_link_libraries(Common dxguid) + endif() + target_link_libraries(Common winmm d3d9 dsound) +endif() + +if(TARGET SDL2::SDL2) + target_link_libraries(Common SDL2::SDL2) +endif() + + list(APPEND NativeAppSource android/jni/TestRunner.cpp UI/DiscordIntegration.cpp @@ -1019,73 +1071,15 @@ if(ANDROID) endif() endif() -set(THIN3D_PLATFORMS ext/native/thin3d/thin3d_gl.cpp - ext/native/thin3d/GLRenderManager.cpp - ext/native/thin3d/GLRenderManager.h - ext/native/thin3d/GLQueueRunner.cpp - ext/native/thin3d/GLQueueRunner.h - ext/native/thin3d/DataFormatGL.cpp - ext/native/thin3d/DataFormatGL.h -) - -set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} - ext/native/thin3d/thin3d_vulkan.cpp - ext/native/thin3d/VulkanRenderManager.cpp - ext/native/thin3d/VulkanRenderManager.h - ext/native/thin3d/VulkanQueueRunner.cpp - ext/native/thin3d/VulkanQueueRunner.h - ext/native/thin3d/DataFormat.h -) - -if(WIN32) - set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} - ext/native/thin3d/thin3d_d3d9.cpp - ext/native/thin3d/thin3d_d3d11.cpp - ext/native/thin3d/d3d9_d3dcompiler_loader.cpp - ext/native/thin3d/d3dx9_loader.cpp - ext/native/thin3d/d3dx9_loader.h - ext/native/thin3d/d3d11_loader.cpp - ext/native/thin3d/d3d11_loader.h - ) -endif() - add_library(native STATIC ${nativeExtra} - ext/native/gfx/gl_common.h - ext/native/gfx/gl_debug_log.cpp - ext/native/gfx/gl_debug_log.h - ext/native/gfx/texture_atlas.cpp - ext/native/gfx/texture_atlas.h - ext/native/gfx/d3d9_shader.cpp - ext/native/gfx/d3d9_shader.h - ext/native/gfx/d3d9_state.cpp - ext/native/gfx/d3d9_state.h - ext/native/gfx_es2/draw_buffer.cpp - ext/native/gfx_es2/draw_buffer.h - ext/native/gfx_es2/draw_text.cpp - ext/native/gfx_es2/draw_text.h - ext/native/gfx_es2/draw_text_win.cpp - ext/native/gfx_es2/draw_text_win.h - ext/native/gfx_es2/draw_text_qt.cpp - ext/native/gfx_es2/draw_text_qt.h - ext/native/gfx_es2/draw_text_android.cpp - ext/native/gfx_es2/draw_text_android.h - ext/native/gfx_es2/gpu_features.cpp - ext/native/gfx_es2/gpu_features.h - ext/native/gfx_es2/glsl_program.cpp - ext/native/gfx_es2/glsl_program.h - ext/native/gfx_es2/gl3stub.c - ext/native/gfx_es2/gl3stub.h - ext/native/thin3d/thin3d.cpp - ext/native/thin3d/thin3d.h - ext/native/thin3d/thin3d_create.h - ${THIN3D_PLATFORMS} + Common/Render/Text/draw_text_qt.cpp + Common/Render/Text/draw_text_qt.h ext/jpge/jpgd.cpp ext/jpge/jpgd.h ext/jpge/jpge.cpp ext/jpge/jpge.h ) -include_directories(ext/native) if(LINUX AND NOT ANDROID) set(RT_LIB rt) @@ -1108,7 +1102,6 @@ elseif(WIN32) elseif(${CMAKE_SYSTEM_NAME} MATCHES "^(DragonFly|FreeBSD|NetBSD)$") target_link_libraries(native execinfo) endif() -setup_target_project(native native) add_library(kirk STATIC ext/libkirk/AES.c @@ -1814,7 +1807,6 @@ set(CoreExtraLibs ${CoreExtraLibs} armips) # target_link_libraries(native X11-xcb X11) #endif() - set(GlslangLibs glslang OGLCompiler OSDependent SPIRV SPVRemapper spirv-cross-glsl) if(WIN32) diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 385b483e56..7e5dc35f0a 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -136,7 +136,7 @@ _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) Common/DbgNew.h MultiThreadedDebug - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. StreamingSIMDExtensions2 Precise true @@ -148,8 +148,11 @@ Windows true + - Winmm.lib + ws2_32.lib + + @@ -158,7 +161,7 @@ Common/DbgNew.h MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. NotSet Precise false @@ -171,8 +174,11 @@ Windows true + - Winmm.lib + ws2_32.lib + + @@ -181,7 +187,7 @@ Common/DbgNew.h MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. NotSet Precise false @@ -194,8 +200,11 @@ Windows true + - Winmm.lib + ws2_32.lib + + @@ -205,7 +214,7 @@ MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. NotSet Precise false @@ -218,8 +227,11 @@ Windows true + - Winmm.lib + ws2_32.lib + + @@ -234,7 +246,7 @@ false StreamingSIMDExtensions2 Precise - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. Speed true false @@ -247,8 +259,11 @@ true true + - Winmm.lib + ws2_32.lib + + @@ -260,7 +275,7 @@ USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. false NotSet Precise @@ -278,8 +293,11 @@ true true + - Winmm.lib + ws2_32.lib + + @@ -291,7 +309,7 @@ USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. false NotSet Precise @@ -309,8 +327,11 @@ true true + - Winmm.lib + ws2_32.lib + + @@ -322,7 +343,7 @@ USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. + ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;.. false NotSet Precise @@ -340,8 +361,11 @@ true true + - Winmm.lib + ws2_32.lib + + @@ -388,6 +412,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -407,6 +453,13 @@ + + + + + + + @@ -483,11 +536,6 @@ - - - - - @@ -690,6 +738,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -709,6 +780,13 @@ + + + + + + + @@ -774,11 +852,6 @@ - - - - - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 04386e630e..10c28d065c 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -50,25 +50,10 @@ - - Vulkan - - - Vulkan - - - Vulkan - - - Vulkan - - - Vulkan - @@ -300,6 +285,93 @@ UI + + GPU\D3D9 + + + GPU\D3D9 + + + GPU\D3D9 + + + GPU\D3D11 + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU + + + GPU + + + GPU + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + Render + + + Render + + + GPU\OpenGL + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + @@ -337,26 +409,11 @@ GL\GLInterface - - Vulkan - - - Vulkan - - - Vulkan - - - Vulkan - - - Vulkan - Serialize @@ -575,6 +632,96 @@ UI + + GPU\D3D9 + + + GPU\D3D11 + + + GPU\D3D9 + + + GPU\D3D9 + + + GPU\D3D9 + + + GPU\D3D11 + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU\OpenGL + + + GPU + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\OpenGL + + + GPU\OpenGL + + + Render + + + Render + + + GPU\OpenGL + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + GPU\Vulkan + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + @@ -586,9 +733,6 @@ {2c723cf4-75b6-406a-90c0-ebb7a13ba476} - - {c14d66ef-5f7c-4565-975a-72774e7ccfb9} - {7be79ad5-3520-46a1-a370-dce2a943978c} @@ -658,6 +802,27 @@ {6a61d762-e71c-4428-8cef-c7ddda405ba5} + + {3b448d70-d5c6-4732-96f0-29f3e101bfe8} + + + {a1745de8-f61a-4f11-b715-705a8812862e} + + + {8241d0c2-78c8-4fc6-9543-69042ec5eb54} + + + {e9d7bdf2-c412-4030-a423-671066c4ea51} + + + {19ad2070-4f85-48d3-abab-add446ea3a77} + + + {c9aba118-5c31-4607-9a69-18eca9f92b44} + + + {9da96cce-c74a-4669-b755-c95defbe1e93} + diff --git a/Common/Data/Text/WrapText.cpp b/Common/Data/Text/WrapText.cpp index c46688c50e..c88628acf5 100644 --- a/Common/Data/Text/WrapText.cpp +++ b/Common/Data/Text/WrapText.cpp @@ -1,5 +1,5 @@ #include -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/Data/Text/WrapText.h" diff --git a/ext/native/thin3d/d3d11_loader.cpp b/Common/GPU/D3D11/D3D11Loader.cpp similarity index 98% rename from ext/native/thin3d/d3d11_loader.cpp rename to Common/GPU/D3D11/D3D11Loader.cpp index fe0d0a02a9..2d81727ddb 100644 --- a/ext/native/thin3d/d3d11_loader.cpp +++ b/Common/GPU/D3D11/D3D11Loader.cpp @@ -1,4 +1,4 @@ -#include "thin3d/d3d11_loader.h" +#include "Common/GPU/D3D11/D3D11Loader.h" #if PPSSPP_PLATFORM(UWP) #error This file should not be compiled for UWP. diff --git a/ext/native/thin3d/d3d11_loader.h b/Common/GPU/D3D11/D3D11Loader.h similarity index 100% rename from ext/native/thin3d/d3d11_loader.h rename to Common/GPU/D3D11/D3D11Loader.h diff --git a/ext/native/thin3d/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp similarity index 99% rename from ext/native/thin3d/thin3d_d3d11.cpp rename to Common/GPU/D3D11/thin3d_d3d11.cpp index d39813667f..263fa088e8 100644 --- a/ext/native/thin3d/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -1,10 +1,10 @@ #include "ppsspp_config.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #if PPSSPP_PLATFORM(UWP) #define ptr_D3DCompile D3DCompile #else -#include "thin3d/d3d11_loader.h" +#include "Common/GPU/D3D11/D3D11Loader.h" #endif #include "Common/System/Display.h" diff --git a/ext/native/gfx/d3d9_shader.cpp b/Common/GPU/D3D9/D3D9ShaderCompiler.cpp similarity index 71% rename from ext/native/gfx/d3d9_shader.cpp rename to Common/GPU/D3D9/D3D9ShaderCompiler.cpp index bdc0b252e7..b54bb215c1 100644 --- a/ext/native/gfx/d3d9_shader.cpp +++ b/Common/GPU/D3D9/D3D9ShaderCompiler.cpp @@ -1,21 +1,13 @@ #ifdef _WIN32 #include "ppsspp_config.h" -#include "d3d9_shader.h" + +#include "Common/CommonWindows.h" +#include "Common/GPU/D3D9/D3DCompilerLoader.h" +#include "Common/GPU/D3D9/D3D9ShaderCompiler.h" #include "Common/CommonFuncs.h" #include "Common/SysError.h" -#if PPSSPP_API(D3DX9) -#include "thin3d/d3dx9_loader.h" - -// They are the same types, just different names. -#define LPD3D_SHADER_MACRO LPD3DXMACRO -#define LPD3DINCLUDE LPD3DXINCLUDE -#define LPD3DBLOB LPD3DXBUFFER -#elif PPSSPP_API(D3D9_D3DCOMPILER) -#include "thin3d/d3d9_d3dcompiler_loader.h" -#endif - struct ID3DXConstantTable; namespace DX9 { @@ -25,18 +17,6 @@ bool CompilePixelShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DPI LPD3DBLOB pErrorMsg = nullptr; // Compile pixel shader. -#if PPSSPP_API(D3DX9) - HRESULT hr = dyn_D3DXCompileShader(code, - (UINT)strlen(code), - nullptr, - nullptr, - "main", - "ps_2_0", - 0, - &pShaderCode, - &pErrorMsg, - pShaderTable); -#elif PPSSPP_API(D3D9_D3DCOMPILER) HRESULT hr = dyn_D3DCompile(code, (UINT)strlen(code), nullptr, @@ -48,7 +28,6 @@ bool CompilePixelShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DPI 0, &pShaderCode, &pErrorMsg); -#endif if (pErrorMsg) { errorMessage = (CHAR *)pErrorMsg->GetBufferPointer(); @@ -79,18 +58,6 @@ bool CompileVertexShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DV LPD3DBLOB pErrorMsg = nullptr; // Compile pixel shader. -#if PPSSPP_API(D3DX9) - HRESULT hr = dyn_D3DXCompileShader(code, - (UINT)strlen(code), - nullptr, - nullptr, - "main", - "vs_2_0", - 0, - &pShaderCode, - &pErrorMsg, - pShaderTable); -#elif PPSSPP_API(D3D9_D3DCOMPILER) HRESULT hr = dyn_D3DCompile(code, (UINT)strlen(code), nullptr, @@ -102,7 +69,6 @@ bool CompileVertexShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DV 0, &pShaderCode, &pErrorMsg); -#endif if (pErrorMsg) { errorMessage = (CHAR *)pErrorMsg->GetBufferPointer(); diff --git a/ext/native/gfx/d3d9_shader.h b/Common/GPU/D3D9/D3D9ShaderCompiler.h similarity index 95% rename from ext/native/gfx/d3d9_shader.h rename to Common/GPU/D3D9/D3D9ShaderCompiler.h index 289ed24954..6c4aaf75a2 100644 --- a/ext/native/gfx/d3d9_shader.h +++ b/Common/GPU/D3D9/D3D9ShaderCompiler.h @@ -1,6 +1,7 @@ #pragma once #include "Common/CommonWindows.h" + #include #include #include @@ -12,4 +13,4 @@ namespace DX9 { bool CompilePixelShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DPIXELSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage); bool CompileVertexShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage); -} // namespace +} // namespace DX9 diff --git a/ext/native/gfx/d3d9_state.cpp b/Common/GPU/D3D9/D3D9StateCache.cpp similarity index 97% rename from ext/native/gfx/d3d9_state.cpp rename to Common/GPU/D3D9/D3D9StateCache.cpp index 14887f7f17..ed0bbdeff4 100644 --- a/ext/native/gfx/d3d9_state.cpp +++ b/Common/GPU/D3D9/D3D9StateCache.cpp @@ -1,7 +1,6 @@ #ifdef _WIN32 -#include "d3d9_state.h" -#include +#include "Common/GPU/D3D9/D3D9StateCache.h" namespace DX9 { diff --git a/ext/native/gfx/d3d9_state.h b/Common/GPU/D3D9/D3D9StateCache.h similarity index 99% rename from ext/native/gfx/d3d9_state.h rename to Common/GPU/D3D9/D3D9StateCache.h index a156834517..2a7a9cad89 100644 --- a/ext/native/gfx/d3d9_state.h +++ b/Common/GPU/D3D9/D3D9StateCache.h @@ -1,9 +1,8 @@ #pragma once -#include -#include +#include -#include "gfx/d3d9_shader.h" +#include "Common/GPU/D3D9/D3D9ShaderCompiler.h" namespace DX9 { diff --git a/ext/native/thin3d/d3d9_d3dcompiler_loader.cpp b/Common/GPU/D3D9/D3DCompilerLoader.cpp similarity index 77% rename from ext/native/thin3d/d3d9_d3dcompiler_loader.cpp rename to Common/GPU/D3D9/D3DCompilerLoader.cpp index 8cc76529fc..0a231190f9 100644 --- a/ext/native/thin3d/d3d9_d3dcompiler_loader.cpp +++ b/Common/GPU/D3D9/D3DCompilerLoader.cpp @@ -1,24 +1,23 @@ -#include -#include +#include "ppsspp_config.h" + +#include "Common/CommonWindows.h" #include -#include "thin3d/d3d9_d3dcompiler_loader.h" +#include "Common/Log.h" +#include "Common/GPU/D3D9/D3DCompilerLoader.h" static HMODULE g_D3DCompileModule; extern pD3DCompile ptr_D3DCompile; -int d3dcompiler_version = 47; - -#define GB_MAKE_STR(s) # s -#define GB_MAKE_STR2(x) GB_MAKE_STR(x) -#define GB_D3D9_D3DCOMPILER_LOADER_CHECK_ENTRY_NULL_PTR(funcname) assert(false && GB_MAKE_STR2(funcname) ); +static int d3dcompiler_version = 47; bool LoadD3DCompilerDynamic() { g_D3DCompileModule = LoadLibrary(D3DCOMPILER_DLL); #if PPSSPP_ARCH(X86) // Workaround for distributing both 32-bit and 64-bit versions of the DLL. - if (!g_D3DCompileModule) + if (!g_D3DCompileModule) { g_D3DCompileModule = LoadLibrary(L"D3dcompiler_47.x86.dll"); + } #endif if (!g_D3DCompileModule) { g_D3DCompileModule = LoadLibrary(L"D3dcompiler_42.dll"); @@ -50,13 +49,10 @@ bool UnloadD3DCompiler() { return true; } - HRESULT dyn_D3DCompile(LPCSTR pSrcData, UINT SrcDataSize, LPCSTR pFileName, CONST D3D_SHADER_MACRO* pDefines, LPD3DINCLUDE pInclude, LPCSTR pEntrypoint, LPCSTR pTarget, UINT Flags1, UINT Flags2, LPD3DBLOB* ppShader, LPD3DBLOB* ppErrorMsgs) { - if (!g_D3DCompileModule) { - GB_D3D9_D3DCOMPILER_LOADER_CHECK_ENTRY_NULL_PTR(D3DCompile) - } + _assert_(g_D3DCompileModule != nullptr); return ptr_D3DCompile(pSrcData, SrcDataSize, pFileName, pDefines, pInclude, pEntrypoint, pTarget, Flags1, Flags2, ppShader, ppErrorMsgs); } diff --git a/ext/native/thin3d/d3d9_d3dcompiler_loader.h b/Common/GPU/D3D9/D3DCompilerLoader.h similarity index 100% rename from ext/native/thin3d/d3d9_d3dcompiler_loader.h rename to Common/GPU/D3D9/D3DCompilerLoader.h diff --git a/ext/native/thin3d/thin3d_d3d9.cpp b/Common/GPU/D3D9/thin3d_d3d9.cpp similarity index 97% rename from ext/native/thin3d/thin3d_d3d9.cpp rename to Common/GPU/D3D9/thin3d_d3d9.cpp index 464da5c08d..6c7b5c233f 100644 --- a/ext/native/thin3d/thin3d_d3d9.cpp +++ b/Common/GPU/D3D9/thin3d_d3d9.cpp @@ -13,29 +13,16 @@ #undef new #endif -#if PPSSPP_API(D3DX9) -#include -#ifdef USE_CRT_DBG -#define new DBG_NEW -#endif -#include "thin3d/d3dx9_loader.h" - -// They are the same types, just different names. -#define LPD3D_SHADER_MACRO LPD3DXMACRO -#define LPD3DINCLUDE LPD3DXINCLUDE -#define LPD3DBLOB LPD3DXBUFFER -#elif PPSSPP_API(D3D9_D3DCOMPILER) #include -#include "thin3d/d3d9_d3dcompiler_loader.h" -#endif +#include "Common/GPU/D3D9/D3DCompilerLoader.h" #ifndef D3DXERR_INVALIDDATA #define D3DXERR_INVALIDDATA 0x88760b59 #endif #include "Common/Math/lin/matrix4x4.h" -#include "thin3d/thin3d.h" -#include "gfx/d3d9_state.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "Common/Log.h" @@ -1045,11 +1032,7 @@ bool D3D9ShaderModule::Compile(LPDIRECT3DDEVICE9 device, const uint8_t *data, si LPD3DBLOB errorBuffer = nullptr; const char *source = (const char *)data; auto compile = [&](const char *profile) -> HRESULT { -#if PPSSPP_API(D3DX9) - return dyn_D3DXCompileShader(source, (UINT)strlen(source), defines, includes, "main", profile, flags, &codeBuffer, &errorBuffer, nullptr); -#elif PPSSPP_API(D3D9_D3DCOMPILER) return dyn_D3DCompile(source, (UINT)strlen(source), nullptr, defines, includes, "main", profile, 0, 0, &codeBuffer, &errorBuffer); -#endif }; HRESULT hr = compile(stage_ == ShaderStage::FRAGMENT ? "ps_2_0" : "vs_2_0"); if (FAILED(hr) && hr == D3DXERR_INVALIDDATA) { @@ -1269,19 +1252,11 @@ void D3D9Context::HandleEvent(Event ev, int width, int height, void *param1, voi } DrawContext *T3DCreateDX9Context(IDirect3D9 *d3d, IDirect3D9Ex *d3dEx, int adapterId, IDirect3DDevice9 *device, IDirect3DDevice9Ex *deviceEx) { -#if PPSSPP_API(D3DX9) - int d3dx_ver = LoadD3DX9Dynamic(); - if (!d3dx_ver) { - ERROR_LOG(G3D, "Failed to load D3DX9!"); - return NULL; - } -#elif PPSSPP_API(D3D9_D3DCOMPILER) bool result = LoadD3DCompilerDynamic(); if (!result) { ERROR_LOG(G3D, "Failed to load D3DCompiler!"); - return NULL; + return nullptr; } -#endif return new D3D9Context(d3d, d3dEx, adapterId, device, deviceEx); } diff --git a/ext/native/thin3d/DataFormat.h b/Common/GPU/DataFormat.h similarity index 100% rename from ext/native/thin3d/DataFormat.h rename to Common/GPU/DataFormat.h diff --git a/ext/native/thin3d/DataFormatGL.cpp b/Common/GPU/OpenGL/DataFormatGL.cpp similarity index 97% rename from ext/native/thin3d/DataFormatGL.cpp rename to Common/GPU/OpenGL/DataFormatGL.cpp index 5037586691..1b8ba63acc 100644 --- a/ext/native/thin3d/DataFormatGL.cpp +++ b/Common/GPU/OpenGL/DataFormatGL.cpp @@ -1,4 +1,4 @@ -#include "thin3d/DataFormatGL.h" +#include "Common/GPU/OpenGL/DataFormatGL.h" #include "Common/Log.h" namespace Draw { diff --git a/ext/native/thin3d/DataFormatGL.h b/Common/GPU/OpenGL/DataFormatGL.h similarity index 67% rename from ext/native/thin3d/DataFormatGL.h rename to Common/GPU/OpenGL/DataFormatGL.h index 28b48f60ff..63fc0a22ec 100644 --- a/ext/native/thin3d/DataFormatGL.h +++ b/Common/GPU/OpenGL/DataFormatGL.h @@ -1,7 +1,7 @@ #pragma once -#include "gfx/gl_common.h" -#include "thin3d/DataFormat.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/DataFormat.h" namespace Draw { diff --git a/ext/native/gfx/gl_common.h b/Common/GPU/OpenGL/GLCommon.h similarity index 98% rename from ext/native/gfx/gl_common.h rename to Common/GPU/OpenGL/GLCommon.h index 011caa19e7..b9fbb3e413 100644 --- a/ext/native/gfx/gl_common.h +++ b/Common/GPU/OpenGL/GLCommon.h @@ -24,7 +24,7 @@ typedef char GLchar; #ifdef USING_GLES2 // Support OpenGL ES 3.0 // This uses the "DYNAMIC" approach from the gles3jni NDK sample. -#include "../gfx_es2/gl3stub.h" +#include "Common/GPU/OpenGL/gl3stub.h" #endif diff --git a/ext/native/gfx/gl_debug_log.cpp b/Common/GPU/OpenGL/GLDebugLog.cpp similarity index 94% rename from ext/native/gfx/gl_debug_log.cpp rename to Common/GPU/OpenGL/GLDebugLog.cpp index fc66ccf1dd..94b79dabc0 100644 --- a/ext/native/gfx/gl_debug_log.cpp +++ b/Common/GPU/OpenGL/GLDebugLog.cpp @@ -1,7 +1,7 @@ #include -#include "gfx/gl_common.h" -#include "gfx/gl_debug_log.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" #include "Common/Log.h" diff --git a/ext/native/gfx/gl_debug_log.h b/Common/GPU/OpenGL/GLDebugLog.h similarity index 100% rename from ext/native/gfx/gl_debug_log.h rename to Common/GPU/OpenGL/GLDebugLog.h diff --git a/ext/native/gfx_es2/gpu_features.cpp b/Common/GPU/OpenGL/GLFeatures.cpp similarity index 99% rename from ext/native/gfx_es2/gpu_features.cpp rename to Common/GPU/OpenGL/GLFeatures.cpp index f8b29909f3..7048b6198a 100644 --- a/ext/native/gfx_es2/gpu_features.cpp +++ b/Common/GPU/OpenGL/GLFeatures.cpp @@ -6,14 +6,14 @@ #include "Common/StringUtils.h" #if PPSSPP_API(ANY_GL) -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" #if defined(_WIN32) #include "GL/wglew.h" #endif #endif -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Log.h" diff --git a/ext/native/gfx_es2/gpu_features.h b/Common/GPU/OpenGL/GLFeatures.h similarity index 96% rename from ext/native/gfx_es2/gpu_features.h rename to Common/GPU/OpenGL/GLFeatures.h index 6f7dd50f54..0c4a619b45 100644 --- a/ext/native/gfx_es2/gpu_features.h +++ b/Common/GPU/OpenGL/GLFeatures.h @@ -11,9 +11,9 @@ enum { GPU_VENDOR_AMD = 2, GPU_VENDOR_INTEL = 3, GPU_VENDOR_ARM = 4, // Mali - GPU_VENDOR_IMGTEC = 5, - GPU_VENDOR_QUALCOMM = 6, - GPU_VENDOR_BROADCOM = 7, + GPU_VENDOR_IMGTEC = 5, // PowerVR + GPU_VENDOR_QUALCOMM = 6, // Adreno + GPU_VENDOR_BROADCOM = 7, // Raspberry PI etc GPU_VENDOR_VIVANTE = 8, GPU_VENDOR_UNKNOWN = 0, }; diff --git a/ext/native/thin3d/GLQueueRunner.cpp b/Common/GPU/OpenGL/GLQueueRunner.cpp similarity index 99% rename from ext/native/thin3d/GLQueueRunner.cpp rename to Common/GPU/OpenGL/GLQueueRunner.cpp index 6ce2682804..7776d7da4d 100644 --- a/ext/native/thin3d/GLQueueRunner.cpp +++ b/Common/GPU/OpenGL/GLQueueRunner.cpp @@ -1,9 +1,9 @@ #include -#include "gfx/gl_common.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/DataFormatGL.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/OpenGL/DataFormatGL.h" #include "Common/Math/math_util.h" #include "Common/Log.h" diff --git a/ext/native/thin3d/GLQueueRunner.h b/Common/GPU/OpenGL/GLQueueRunner.h similarity index 99% rename from ext/native/thin3d/GLQueueRunner.h rename to Common/GPU/OpenGL/GLQueueRunner.h index 3737d13412..742f885768 100644 --- a/ext/native/thin3d/GLQueueRunner.h +++ b/Common/GPU/OpenGL/GLQueueRunner.h @@ -4,8 +4,8 @@ #include #include -#include "gfx/gl_common.h" -#include "thin3d/DataFormat.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/DataFormat.h" #include "Common/Data/Collections/TinySet.h" struct GLRViewport { diff --git a/ext/native/thin3d/GLRenderManager.cpp b/Common/GPU/OpenGL/GLRenderManager.cpp similarity index 99% rename from ext/native/thin3d/GLRenderManager.cpp rename to Common/GPU/OpenGL/GLRenderManager.cpp index 1aa1d25949..7764adfde8 100644 --- a/ext/native/thin3d/GLRenderManager.cpp +++ b/Common/GPU/OpenGL/GLRenderManager.cpp @@ -1,6 +1,6 @@ #include "GLRenderManager.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d.h" #include "Common/Thread/ThreadUtil.h" #include "Common/Log.h" diff --git a/ext/native/thin3d/GLRenderManager.h b/Common/GPU/OpenGL/GLRenderManager.h similarity index 99% rename from ext/native/thin3d/GLRenderManager.h rename to Common/GPU/OpenGL/GLRenderManager.h index 9fb0bc1847..a2f3a7effe 100644 --- a/ext/native/thin3d/GLRenderManager.h +++ b/Common/GPU/OpenGL/GLRenderManager.h @@ -9,7 +9,7 @@ #include #include -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Log.h" #include "GLQueueRunner.h" diff --git a/ext/native/gfx_es2/glsl_program.cpp b/Common/GPU/OpenGL/GLSLProgram.cpp similarity index 99% rename from ext/native/gfx_es2/glsl_program.cpp rename to Common/GPU/OpenGL/GLSLProgram.cpp index a0bc2a376e..bdc41644a4 100644 --- a/ext/native/gfx_es2/glsl_program.cpp +++ b/Common/GPU/OpenGL/GLSLProgram.cpp @@ -6,7 +6,7 @@ #include "Common/File/VFS/VFS.h" #include "Common/File/FileUtil.h" -#include "glsl_program.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" #include "Common/Log.h" diff --git a/ext/native/gfx_es2/glsl_program.h b/Common/GPU/OpenGL/GLSLProgram.h similarity index 97% rename from ext/native/gfx_es2/glsl_program.h rename to Common/GPU/OpenGL/GLSLProgram.h index e2efd2a3d7..ae6020c43a 100644 --- a/ext/native/gfx_es2/glsl_program.h +++ b/Common/GPU/OpenGL/GLSLProgram.h @@ -7,7 +7,7 @@ #include #include -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" // Represent a compiled and linked vshader/fshader pair. // A just-constructed object is valid but cannot be used as a shader program, meaning that diff --git a/ext/native/gfx_es2/gl3stub.c b/Common/GPU/OpenGL/gl3stub.c similarity index 99% rename from ext/native/gfx_es2/gl3stub.c rename to Common/GPU/OpenGL/gl3stub.c index 265004a9c3..28bbcd774a 100644 --- a/ext/native/gfx_es2/gl3stub.c +++ b/Common/GPU/OpenGL/gl3stub.c @@ -15,7 +15,8 @@ */ #include "ppsspp_config.h" -#include "../gfx/gl_common.h" + +#include "Common/GPU/OpenGL/GLCommon.h" #if defined(USING_GLES2) #if !PPSSPP_PLATFORM(IOS) diff --git a/ext/native/gfx_es2/gl3stub.h b/Common/GPU/OpenGL/gl3stub.h similarity index 100% rename from ext/native/gfx_es2/gl3stub.h rename to Common/GPU/OpenGL/gl3stub.h diff --git a/ext/native/thin3d/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp similarity index 99% rename from ext/native/thin3d/thin3d_gl.cpp rename to Common/GPU/OpenGL/thin3d_gl.cpp index 222b918a16..a58432e14b 100644 --- a/ext/native/thin3d/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -7,13 +7,13 @@ #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Math/math_util.h" #include "Common/Math/lin/matrix4x4.h" -#include "thin3d/thin3d.h" -#include "thin3d/DataFormatGL.h" -#include "gfx/gl_common.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/DataFormatGL.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLFeatures.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" // #define DEBUG_READ_PIXELS 1 diff --git a/Common/Vulkan/VulkanContext.cpp b/Common/GPU/Vulkan/VulkanContext.cpp similarity index 99% rename from Common/Vulkan/VulkanContext.cpp rename to Common/GPU/Vulkan/VulkanContext.cpp index 7e0338936d..ef139e4ca7 100644 --- a/Common/Vulkan/VulkanContext.cpp +++ b/Common/GPU/Vulkan/VulkanContext.cpp @@ -7,8 +7,8 @@ #include "Common/System/Display.h" #include "Common/Log.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" #include "GPU/Common/ShaderCommon.h" #include "Common/StringUtils.h" #include "Core/Config.h" diff --git a/Common/Vulkan/VulkanContext.h b/Common/GPU/Vulkan/VulkanContext.h similarity index 99% rename from Common/Vulkan/VulkanContext.h rename to Common/GPU/Vulkan/VulkanContext.h index fa12d26d79..a14f96bdd7 100644 --- a/Common/Vulkan/VulkanContext.h +++ b/Common/GPU/Vulkan/VulkanContext.h @@ -6,8 +6,8 @@ #include #include "Common/Log.h" -#include "Common/Vulkan/VulkanLoader.h" -#include "Common/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" enum { VULKAN_FLAG_VALIDATE = 1, diff --git a/Common/Vulkan/VulkanDebug.cpp b/Common/GPU/Vulkan/VulkanDebug.cpp similarity index 97% rename from Common/Vulkan/VulkanDebug.cpp rename to Common/GPU/Vulkan/VulkanDebug.cpp index 5567586822..f165d73609 100644 --- a/Common/Vulkan/VulkanDebug.cpp +++ b/Common/GPU/Vulkan/VulkanDebug.cpp @@ -19,8 +19,8 @@ #include #include "Common/Log.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, diff --git a/Common/Vulkan/VulkanDebug.h b/Common/GPU/Vulkan/VulkanDebug.h similarity index 96% rename from Common/Vulkan/VulkanDebug.h rename to Common/GPU/Vulkan/VulkanDebug.h index e622f542c7..9287c1e8c5 100644 --- a/Common/Vulkan/VulkanDebug.h +++ b/Common/GPU/Vulkan/VulkanDebug.h @@ -17,7 +17,7 @@ #pragma once -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" struct VulkanLogOptions { bool breakOnWarning; diff --git a/Common/Vulkan/VulkanImage.cpp b/Common/GPU/Vulkan/VulkanImage.cpp similarity index 99% rename from Common/Vulkan/VulkanImage.cpp rename to Common/GPU/Vulkan/VulkanImage.cpp index 37a7bead4d..5301a47803 100644 --- a/Common/Vulkan/VulkanImage.cpp +++ b/Common/GPU/Vulkan/VulkanImage.cpp @@ -1,5 +1,5 @@ -#include "Common/Vulkan/VulkanImage.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "Common/Log.h" void VulkanTexture::Wipe() { diff --git a/Common/Vulkan/VulkanImage.h b/Common/GPU/Vulkan/VulkanImage.h similarity index 98% rename from Common/Vulkan/VulkanImage.h rename to Common/GPU/Vulkan/VulkanImage.h index e16ceccc8d..0745e0e352 100644 --- a/Common/Vulkan/VulkanImage.h +++ b/Common/GPU/Vulkan/VulkanImage.h @@ -1,6 +1,6 @@ #pragma once -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" class VulkanDeviceAllocator; diff --git a/Common/Vulkan/VulkanLoader.cpp b/Common/GPU/Vulkan/VulkanLoader.cpp similarity index 99% rename from Common/Vulkan/VulkanLoader.cpp rename to Common/GPU/Vulkan/VulkanLoader.cpp index 0a58291277..f319979c8a 100644 --- a/Common/Vulkan/VulkanLoader.cpp +++ b/Common/GPU/Vulkan/VulkanLoader.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include #include #include diff --git a/Common/Vulkan/VulkanLoader.h b/Common/GPU/Vulkan/VulkanLoader.h similarity index 100% rename from Common/Vulkan/VulkanLoader.h rename to Common/GPU/Vulkan/VulkanLoader.h diff --git a/Common/Vulkan/VulkanMemory.cpp b/Common/GPU/Vulkan/VulkanMemory.cpp similarity index 99% rename from Common/Vulkan/VulkanMemory.cpp rename to Common/GPU/Vulkan/VulkanMemory.cpp index 9674fb702a..ce002733b7 100644 --- a/Common/Vulkan/VulkanMemory.cpp +++ b/Common/GPU/Vulkan/VulkanMemory.cpp @@ -22,7 +22,7 @@ #include "Common/Log.h" #include "Common/TimeUtil.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" VulkanPushBuffer::VulkanPushBuffer(VulkanContext *vulkan, size_t size, VkBufferUsageFlags usage, VkMemoryPropertyFlags memoryPropertyMask) : vulkan_(vulkan), memoryPropertyMask_(memoryPropertyMask), size_(size), usage_(usage) { diff --git a/Common/Vulkan/VulkanMemory.h b/Common/GPU/Vulkan/VulkanMemory.h similarity index 99% rename from Common/Vulkan/VulkanMemory.h rename to Common/GPU/Vulkan/VulkanMemory.h index 54b41aed71..fc415681a0 100644 --- a/Common/Vulkan/VulkanMemory.h +++ b/Common/GPU/Vulkan/VulkanMemory.h @@ -4,7 +4,7 @@ #include #include "Common/Log.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" // VulkanMemory // diff --git a/ext/native/thin3d/VulkanQueueRunner.cpp b/Common/GPU/Vulkan/VulkanQueueRunner.cpp similarity index 99% rename from ext/native/thin3d/VulkanQueueRunner.cpp rename to Common/GPU/Vulkan/VulkanQueueRunner.cpp index c563fc9851..ff5fb56d2f 100644 --- a/ext/native/thin3d/VulkanQueueRunner.cpp +++ b/Common/GPU/Vulkan/VulkanQueueRunner.cpp @@ -1,6 +1,6 @@ #include -#include "DataFormat.h" +#include "Common/GPU/DataFormat.h" #include "Common/Log.h" #include "Common/TimeUtil.h" #include "VulkanQueueRunner.h" diff --git a/ext/native/thin3d/VulkanQueueRunner.h b/Common/GPU/Vulkan/VulkanQueueRunner.h similarity index 98% rename from ext/native/thin3d/VulkanQueueRunner.h rename to Common/GPU/Vulkan/VulkanQueueRunner.h index 1bad9619ce..6c8f12cdc3 100644 --- a/ext/native/thin3d/VulkanQueueRunner.h +++ b/Common/GPU/Vulkan/VulkanQueueRunner.h @@ -3,10 +3,10 @@ #include #include "Common/Hashmaps.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "Common/Data/Convert/SmallDataConvert.h" -#include "thin3d/DataFormat.h" #include "Common/Data/Collections/TinySet.h" +#include "Common/GPU/DataFormat.h" class VKRFramebuffer; struct VKRImage; diff --git a/ext/native/thin3d/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp similarity index 99% rename from ext/native/thin3d/VulkanRenderManager.cpp rename to Common/GPU/Vulkan/VulkanRenderManager.cpp index ecd776b2a7..df224391a3 100644 --- a/ext/native/thin3d/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -6,8 +6,8 @@ #include "Common/Log.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanContext.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Thread/ThreadUtil.h" #if 0 // def _DEBUG diff --git a/ext/native/thin3d/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h similarity index 99% rename from ext/native/thin3d/VulkanRenderManager.h rename to Common/GPU/Vulkan/VulkanRenderManager.h index 653fbae850..d1a781c7b3 100644 --- a/ext/native/thin3d/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -11,11 +11,11 @@ #include #include "Common/System/Display.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Math/math_util.h" -#include "thin3d/DataFormat.h" -#include "thin3d/VulkanQueueRunner.h" +#include "Common/GPU/DataFormat.h" +#include "Common/GPU/Vulkan/VulkanQueueRunner.h" // Simple independent framebuffer image. Gets its own allocation, we don't have that many framebuffers so it's fine // to let them have individual non-pooled allocations. Until it's not fine. We'll see. diff --git a/ext/native/thin3d/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp similarity index 99% rename from ext/native/thin3d/thin3d_vulkan.cpp rename to Common/GPU/Vulkan/thin3d_vulkan.cpp index 5d691c64ca..502a5194f5 100644 --- a/ext/native/thin3d/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -23,14 +23,14 @@ #include "Common/System/Display.h" #include "Common/Math/lin/matrix4x4.h" #include "Common/Data/Convert/SmallDataConvert.h" -#include "thin3d/thin3d.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Log.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanImage.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "Core/Config.h" @@ -41,7 +41,7 @@ // // Vertex data lives in a separate namespace (location = 0, 1, etc) -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" namespace Draw { diff --git a/ext/native/thin3d/thin3d.cpp b/Common/GPU/thin3d.cpp similarity index 98% rename from ext/native/thin3d/thin3d.cpp rename to Common/GPU/thin3d.cpp index f15e96fa93..95dce26147 100644 --- a/ext/native/thin3d/thin3d.cpp +++ b/Common/GPU/thin3d.cpp @@ -3,10 +3,9 @@ #include #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Log.h" #include "Common/ColorConv.h" -#include "Core/Reporting.h" namespace Draw { @@ -450,7 +449,7 @@ void ConvertFromRGBA8888(uint8_t *dst, const uint8_t *src, uint32_t dstStride, u case Draw::DataFormat::R8G8B8A8_UNORM: case Draw::DataFormat::UNDEFINED: default: - WARN_LOG_REPORT_ONCE(convFromRGBA, G3D, "Unable to convert from format: %d", (int)format); + WARN_LOG(G3D, "Unable to convert from format: %d", (int)format); break; } } @@ -492,7 +491,7 @@ void ConvertFromBGRA8888(uint8_t *dst, const uint8_t *src, uint32_t dstStride, u dst += dstStride * 3; } } else { - WARN_LOG_REPORT_ONCE(convFromBGRA, G3D, "Unable to convert from format to BGRA: %d", (int)format); + WARN_LOG(G3D, "Unable to convert from format to BGRA: %d", (int)format); } } diff --git a/ext/native/thin3d/thin3d.h b/Common/GPU/thin3d.h similarity index 100% rename from ext/native/thin3d/thin3d.h rename to Common/GPU/thin3d.h diff --git a/ext/native/thin3d/thin3d_create.h b/Common/GPU/thin3d_create.h similarity index 97% rename from ext/native/thin3d/thin3d_create.h rename to Common/GPU/thin3d_create.h index a89c74ab96..a2030792af 100644 --- a/ext/native/thin3d/thin3d_create.h +++ b/Common/GPU/thin3d_create.h @@ -2,7 +2,7 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" // Separated this stuff into its own file so we don't get Windows.h included if all we want is the thin3d declarations. diff --git a/Common/GraphicsContext.h b/Common/GraphicsContext.h index bf4f493871..873722764c 100644 --- a/Common/GraphicsContext.h +++ b/Common/GraphicsContext.h @@ -2,7 +2,7 @@ #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" // Init is done differently on each platform, and done close to the creation, so it's // expected to be implemented by subclasses. diff --git a/Common/Profiler/Profiler.cpp b/Common/Profiler/Profiler.cpp index 923a9aed62..7d3521012e 100644 --- a/Common/Profiler/Profiler.cpp +++ b/Common/Profiler/Profiler.cpp @@ -9,7 +9,7 @@ #include "ppsspp_config.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/TimeUtil.h" #include "Common/Profiler/Profiler.h" diff --git a/ext/native/gfx_es2/draw_buffer.cpp b/Common/Render/DrawBuffer.cpp similarity index 99% rename from ext/native/gfx_es2/draw_buffer.cpp rename to Common/Render/DrawBuffer.cpp index a31f938584..f23c753726 100644 --- a/ext/native/gfx_es2/draw_buffer.cpp +++ b/Common/Render/DrawBuffer.cpp @@ -5,10 +5,9 @@ #include "Common/System/Display.h" #include "Common/Math/math_util.h" -#include "gfx/texture_atlas.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/draw_buffer.h" -#include "gfx_es2/draw_text.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/Render/Text/draw_text.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/Data/Text/WrapText.h" diff --git a/ext/native/gfx_es2/draw_buffer.h b/Common/Render/DrawBuffer.h similarity index 98% rename from ext/native/gfx_es2/draw_buffer.h rename to Common/Render/DrawBuffer.h index bfcd756010..40d482ef83 100644 --- a/ext/native/gfx_es2/draw_buffer.h +++ b/Common/Render/DrawBuffer.h @@ -6,10 +6,10 @@ #include #include "Common/Data/Color/RGBAUtil.h" -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Math/geom2d.h" #include "Common/Math/lin/matrix4x4.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" struct Atlas; diff --git a/ext/native/gfx_es2/draw_text.cpp b/Common/Render/Text/draw_text.cpp similarity index 90% rename from ext/native/gfx_es2/draw_text.cpp rename to Common/Render/Text/draw_text.cpp index b1fae13c8e..e236065483 100644 --- a/ext/native/gfx_es2/draw_text.cpp +++ b/Common/Render/Text/draw_text.cpp @@ -1,13 +1,16 @@ +#include "ppsspp_config.h" + #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" #include "Common/Data/Text/WrapText.h" #include "Common/Data/Encoding/Utf8.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/draw_text_win.h" -#include "gfx_es2/draw_text_uwp.h" -#include "gfx_es2/draw_text_qt.h" -#include "gfx_es2/draw_text_android.h" + +#include "Common/Render/Text/draw_text.h" +#include "Common/Render/Text/draw_text_win.h" +#include "Common/Render/Text/draw_text_uwp.h" +#include "Common/Render/Text/draw_text_qt.h" +#include "Common/Render/Text/draw_text_android.h" TextDrawer::TextDrawer(Draw::DrawContext *draw) : draw_(draw) { // These probably shouldn't be state. diff --git a/ext/native/gfx_es2/draw_text.h b/Common/Render/Text/draw_text.h similarity index 98% rename from ext/native/gfx_es2/draw_text.h rename to Common/Render/Text/draw_text.h index ed582845b9..252029b8a3 100644 --- a/ext/native/gfx_es2/draw_text.h +++ b/Common/Render/Text/draw_text.h @@ -13,8 +13,8 @@ #include #include -#include "gfx_es2/draw_buffer.h" #include "Common/Data/Text/WrapText.h" +#include "Common/Render/DrawBuffer.h" namespace Draw { class DrawContext; diff --git a/ext/native/gfx_es2/draw_text_android.cpp b/Common/Render/Text/draw_text_android.cpp similarity index 98% rename from ext/native/gfx_es2/draw_text_android.cpp rename to Common/Render/Text/draw_text_android.cpp index c19f859cf7..7e6a66d85f 100644 --- a/ext/native/gfx_es2/draw_text_android.cpp +++ b/Common/Render/Text/draw_text_android.cpp @@ -1,16 +1,15 @@ +#include "Common/Log.h" +#include "Common/StringUtils.h" #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" #include "Common/Data/Text/WrapText.h" #include "Common/Data/Encoding/Utf8.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/draw_text_android.h" +#include "Common/Render/Text/draw_text.h" +#include "Common/Render/Text/draw_text_android.h" #include "android/jni/app-android.h" -#include "Common/Log.h" -#include "Common/StringUtils.h" - #if PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__) #include diff --git a/ext/native/gfx_es2/draw_text_android.h b/Common/Render/Text/draw_text_android.h similarity index 97% rename from ext/native/gfx_es2/draw_text_android.h rename to Common/Render/Text/draw_text_android.h index 51e5a3ab82..4b95bdeb75 100644 --- a/ext/native/gfx_es2/draw_text_android.h +++ b/Common/Render/Text/draw_text_android.h @@ -3,7 +3,7 @@ #include "ppsspp_config.h" #include -#include "gfx_es2/draw_text.h" +#include "Common/Render/Text/draw_text.h" #if PPSSPP_PLATFORM(ANDROID) diff --git a/ext/native/gfx_es2/draw_text_qt.cpp b/Common/Render/Text/draw_text_qt.cpp similarity index 97% rename from ext/native/gfx_es2/draw_text_qt.cpp rename to Common/Render/Text/draw_text_qt.cpp index 56b8c6e56c..ce0600cb81 100644 --- a/ext/native/gfx_es2/draw_text_qt.cpp +++ b/Common/Render/Text/draw_text_qt.cpp @@ -1,15 +1,16 @@ #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" #include "Common/Data/Text/WrapText.h" #include "Common/Data/Encoding/Utf8.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/draw_text_qt.h" +#include "Common/Render/Text/draw_text.h" +#include "Common/Render/Text/draw_text_qt.h" #include "Common/Log.h" #if defined(USING_QT_UI) +#include #include #include #include diff --git a/ext/native/gfx_es2/draw_text_qt.h b/Common/Render/Text/draw_text_qt.h similarity index 95% rename from ext/native/gfx_es2/draw_text_qt.h rename to Common/Render/Text/draw_text_qt.h index e8c01cd118..47fb8ab48f 100644 --- a/ext/native/gfx_es2/draw_text_qt.h +++ b/Common/Render/Text/draw_text_qt.h @@ -3,11 +3,11 @@ #include "ppsspp_config.h" #include -#include "gfx_es2/draw_text.h" +#include "Common/Render/Text/draw_text.h" #if defined(USING_QT_UI) -#include +class QFont; class TextDrawerQt : public TextDrawer { public: diff --git a/ext/native/gfx_es2/draw_text_uwp.cpp b/Common/Render/Text/draw_text_uwp.cpp similarity index 99% rename from ext/native/gfx_es2/draw_text_uwp.cpp rename to Common/Render/Text/draw_text_uwp.cpp index 71e88f0fd5..7ec375ae54 100644 --- a/ext/native/gfx_es2/draw_text_uwp.cpp +++ b/Common/Render/Text/draw_text_uwp.cpp @@ -1,10 +1,10 @@ #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" #include "Common/Data/Text/WrapText.h" #include "Common/Data/Encoding/Utf8.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/draw_text_uwp.h" +#include "Common/Render/Text/draw_text.h" +#include "Common/Render/Text/draw_text_uwp.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/ext/native/gfx_es2/draw_text_uwp.h b/Common/Render/Text/draw_text_uwp.h similarity index 97% rename from ext/native/gfx_es2/draw_text_uwp.h rename to Common/Render/Text/draw_text_uwp.h index 59995f491b..816ae7ec06 100644 --- a/ext/native/gfx_es2/draw_text_uwp.h +++ b/Common/Render/Text/draw_text_uwp.h @@ -3,7 +3,7 @@ #include "ppsspp_config.h" #include -#include "gfx_es2/draw_text.h" +#include "Common/Render/Text/draw_text.h" #if PPSSPP_PLATFORM(UWP) diff --git a/ext/native/gfx_es2/draw_text_win.cpp b/Common/Render/Text/draw_text_win.cpp similarity index 99% rename from ext/native/gfx_es2/draw_text_win.cpp rename to Common/Render/Text/draw_text_win.cpp index 1767d71cfa..e7518857ef 100644 --- a/ext/native/gfx_es2/draw_text_win.cpp +++ b/Common/Render/Text/draw_text_win.cpp @@ -1,10 +1,10 @@ #include "Common/System/Display.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" #include "Common/Data/Text/WrapText.h" #include "Common/Data/Encoding/Utf8.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/draw_text_win.h" +#include "Common/Render/Text/draw_text.h" +#include "Common/Render/Text/draw_text_win.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/ext/native/gfx_es2/draw_text_win.h b/Common/Render/Text/draw_text_win.h similarity index 97% rename from ext/native/gfx_es2/draw_text_win.h rename to Common/Render/Text/draw_text_win.h index 41489eefbb..c59fa91db4 100644 --- a/ext/native/gfx_es2/draw_text_win.h +++ b/Common/Render/Text/draw_text_win.h @@ -3,7 +3,7 @@ #include "ppsspp_config.h" #include -#include "gfx_es2/draw_text.h" +#include "Common/Render/Text/draw_text.h" #if defined(_WIN32) && !defined(USING_QT_UI) && !PPSSPP_PLATFORM(UWP) diff --git a/ext/native/gfx/texture_atlas.cpp b/Common/Render/TextureAtlas.cpp similarity index 98% rename from ext/native/gfx/texture_atlas.cpp rename to Common/Render/TextureAtlas.cpp index a38a791fa3..285f766892 100644 --- a/ext/native/gfx/texture_atlas.cpp +++ b/Common/Render/TextureAtlas.cpp @@ -1,7 +1,7 @@ #include #include -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" class ByteReader { public: diff --git a/ext/native/gfx/texture_atlas.h b/Common/Render/TextureAtlas.h similarity index 100% rename from ext/native/gfx/texture_atlas.h rename to Common/Render/TextureAtlas.h diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index d8f45b5737..adfa7d89d0 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -7,8 +7,8 @@ #include "Common/UI/UI.h" #include "Common/UI/View.h" #include "Common/UI/Context.h" -#include "gfx_es2/draw_buffer.h" -#include "gfx_es2/draw_text.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/Render/Text/draw_text.h" #include "Common/Log.h" #include "UI/TextureUtil.h" diff --git a/Common/UI/Context.h b/Common/UI/Context.h index 696e8b6bb8..18f18bd515 100644 --- a/Common/UI/Context.h +++ b/Common/UI/Context.h @@ -6,7 +6,7 @@ #include "Common/Math/geom2d.h" #include "Common/Math/lin/vec3.h" -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" // Everything you need to draw a UI collected into a single unit that can be passed around. // Everything forward declared so this header is safe everywhere. diff --git a/Common/UI/UI.cpp b/Common/UI/UI.cpp index 3148a0de57..8a4ad5deaf 100644 --- a/Common/UI/UI.cpp +++ b/Common/UI/UI.cpp @@ -8,8 +8,8 @@ #include "Common/Data/Color/RGBAUtil.h" #include "Common/UI/UI.h" #include "Common/UI/Context.h" -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" // TODO: UI should probably not own these. DrawBuffer ui_draw2d; diff --git a/Common/UI/UI.h b/Common/UI/UI.h index 3e891a9a28..ccd6b50dbe 100644 --- a/Common/UI/UI.h +++ b/Common/UI/UI.h @@ -26,7 +26,7 @@ #include #include -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Input/InputState.h" class UIContext; diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index 14f793d1e5..8e8d447dc9 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -11,7 +11,7 @@ #include "Common/UI/Screen.h" #include "Common/UI/Root.h" #include "Common/Data/Text/I18n.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index ece140377b..ebd0e993e7 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -3,15 +3,15 @@ #include "Common/Input/InputState.h" #include "Common/Input/KeyCodes.h" -#include "gfx_es2/draw_buffer.h" -#include "gfx/texture_atlas.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/UI/UI.h" #include "Common/UI/View.h" #include "Common/UI/Context.h" #include "Common/UI/Tween.h" #include "Common/UI/Root.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/System/System.h" #include "Common/TimeUtil.h" #include "Common/StringUtils.h" diff --git a/Common/UI/View.h b/Common/UI/View.h index 8c46ff9060..97c5c10513 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -15,7 +15,7 @@ #include #include -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Math/lin/matrix4x4.h" #include "Common/Math/math_util.h" #include "Common/Math/geom2d.h" diff --git a/Common/UI/ViewGroup.cpp b/Common/UI/ViewGroup.cpp index ddd6153548..4c21baeb5e 100644 --- a/Common/UI/ViewGroup.cpp +++ b/Common/UI/ViewGroup.cpp @@ -10,7 +10,7 @@ #include "Common/UI/Root.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Log.h" #include "Common/TimeUtil.h" diff --git a/Core/Config.cpp b/Core/Config.cpp index 7264f38859..0efc72f014 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -24,7 +24,7 @@ #include "ppsspp_config.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Net/HTTPClient.h" #include "Common/Net/URL.h" @@ -40,7 +40,7 @@ #include "Common/System/Display.h" #include "Common/System/System.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/Loaders.h" diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index 2fc9e33ae1..e23beab505 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -138,7 +138,7 @@ Level3 - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;MINIUPNP_STATICLIB;%(PreprocessorDefinitions) StreamingSIMDExtensions2 Precise @@ -161,7 +161,7 @@ Level3 - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;MINIUPNP_STATICLIB;%(PreprocessorDefinitions) NotSet Precise @@ -185,7 +185,7 @@ Level3 - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\aarch64\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\aarch64\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) NotSet Precise @@ -209,7 +209,7 @@ Level3 - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\arm\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\arm\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) NotSet Precise @@ -237,7 +237,7 @@ MaxSpeed true true - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext false StreamingSIMDExtensions2 Precise @@ -268,7 +268,7 @@ MaxSpeed true true - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext NotSet Precise false @@ -299,7 +299,7 @@ MaxSpeed true true - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\aarch64\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\aarch64\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext NotSet Precise false @@ -330,7 +330,7 @@ MaxSpeed true true - ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\arm\include;../common;..;../ext/native;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext + ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\arm\include;../common;..;../ext/glew;../ext/snappy;../ext/libpng17;../ext/zlib;../ext NotSet Precise false @@ -1287,9 +1287,6 @@ {457f45d2-556f-47bc-a31d-aff0d15beaed} - - {C4DF647E-80EA-4111-A0A8-218B1B711E18} - {f761046e-6c38-4428-a5f1-38391a37bb34} @@ -1301,4 +1298,4 @@ - \ No newline at end of file + diff --git a/Core/Dialog/PSPDialog.h b/Core/Dialog/PSPDialog.h index 8d88c5c1a7..abf652f18c 100644 --- a/Core/Dialog/PSPDialog.h +++ b/Core/Dialog/PSPDialog.h @@ -17,7 +17,7 @@ #pragma once -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Common.h" #include "Common/CommonTypes.h" diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 6df19c4cea..1b97a35336 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -26,8 +26,6 @@ #include #endif -#include "gfx_es2/gpu_features.h" - #include "Common/Data/Text/I18n.h" #include "Common/Profiler/Profiler.h" #include "Common/System/System.h" @@ -315,7 +313,8 @@ void __DisplayDoState(PointerWrap &p) { if (s < 2) { // This shouldn't have been savestated anyway, but it was. // It's unlikely to overlap with the first value in gpuStats. - p.ExpectVoid(&gl_extensions.gpuVendor, sizeof(gl_extensions.gpuVendor)); + int gpuVendorTemp = 0; + p.ExpectVoid(&gpuVendorTemp, sizeof(gpuVendorTemp)); } if (s < 6) { GPUStatistics_v0 oldStats; diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index 4f33737351..f103b8bf15 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -17,8 +17,8 @@ #include -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_text.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/Text/draw_text.h" #include "Common/Data/Color/RGBAUtil.h" #include "Common/File/VFS/VFS.h" diff --git a/Core/Util/PPGeDraw.h b/Core/Util/PPGeDraw.h index c9b625f40f..dbff6bb831 100644 --- a/Core/Util/PPGeDraw.h +++ b/Core/Util/PPGeDraw.h @@ -20,7 +20,7 @@ #include #include -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/CommonTypes.h" diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index d435d6ca28..23b662c672 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -17,7 +17,7 @@ #include -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "GPU/Common/ShaderId.h" #include "GPU/Common/ShaderCommon.h" diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 4accc058c5..3df2eaddfd 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -19,9 +19,8 @@ #include #include -#include "ext/native/thin3d/thin3d.h" -#include "gfx_es2/gpu_features.h" - +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Data/Text/I18n.h" #include "Common/ColorConv.h" #include "Common/Common.h" diff --git a/GPU/Common/FramebufferManagerCommon.h b/GPU/Common/FramebufferManagerCommon.h index 1dc6abcde8..44cd2f6b5f 100644 --- a/GPU/Common/FramebufferManagerCommon.h +++ b/GPU/Common/FramebufferManagerCommon.h @@ -27,7 +27,7 @@ #include "GPU/GPU.h" #include "GPU/ge_constants.h" #include "GPU/GPUInterface.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" enum { FB_USAGE_DISPLAYED_FRAMEBUFFER = 1, diff --git a/GPU/Common/PostShader.cpp b/GPU/Common/PostShader.cpp index a1c030dd3a..9971650ba5 100644 --- a/GPU/Common/PostShader.cpp +++ b/GPU/Common/PostShader.cpp @@ -26,7 +26,7 @@ #include "Common/File/FileUtil.h" #include "Common/File/DirListing.h" #include "Common/File/VFS/VFS.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/StringUtils.h" #include "Core/Config.h" diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index 31e36a847c..5d62f1a7fe 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -19,7 +19,7 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/System/Display.h" #include "Common/System/System.h" diff --git a/GPU/Common/ShaderId.cpp b/GPU/Common/ShaderId.cpp index b33738f508..3f5864161a 100644 --- a/GPU/Common/ShaderId.cpp +++ b/GPU/Common/ShaderId.cpp @@ -1,7 +1,7 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/StringUtils.h" #include "Core/Config.h" diff --git a/GPU/Common/ShaderTranslation.cpp b/GPU/Common/ShaderTranslation.cpp index b93df766e5..25edef6297 100644 --- a/GPU/Common/ShaderTranslation.cpp +++ b/GPU/Common/ShaderTranslation.cpp @@ -39,8 +39,8 @@ #include "GPU/Common/ShaderTranslation.h" #include "ext/glslang/SPIRV/GlslangToSpv.h" -#include "thin3d/thin3d.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "ext/SPIRV-Cross/spirv.hpp" #include "ext/SPIRV-Cross/spirv_common.hpp" diff --git a/GPU/Common/ShaderTranslation.h b/GPU/Common/ShaderTranslation.h index 5985623661..9d4e41e3f1 100644 --- a/GPU/Common/ShaderTranslation.h +++ b/GPU/Common/ShaderTranslation.h @@ -19,7 +19,7 @@ #include #include "GPU/Common/ShaderCommon.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" struct TranslatedShaderMetadata { diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index 2f68d891e0..0a369204b9 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -18,7 +18,7 @@ #include #include #include "Common/Math/math_util.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Core/Config.h" #include "GPU/GPUState.h" diff --git a/GPU/D3D11/D3D11Util.cpp b/GPU/D3D11/D3D11Util.cpp index 27fcc093dd..ee6ad435d3 100644 --- a/GPU/D3D11/D3D11Util.cpp +++ b/GPU/D3D11/D3D11Util.cpp @@ -10,7 +10,7 @@ #if PPSSPP_PLATFORM(UWP) #define ptr_D3DCompile D3DCompile #else -#include "thin3d/d3d11_loader.h" +#include "Common/GPU/D3D11/D3D11Loader.h" #endif #include "Common/CommonFuncs.h" diff --git a/GPU/D3D11/DepalettizeShaderD3D11.h b/GPU/D3D11/DepalettizeShaderD3D11.h index df9c4f5133..0941330fa6 100644 --- a/GPU/D3D11/DepalettizeShaderD3D11.h +++ b/GPU/D3D11/DepalettizeShaderD3D11.h @@ -22,7 +22,7 @@ #include "Common/CommonTypes.h" #include "GPU/ge_constants.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "GPU/Common/DepalettizeShaderCommon.h" class DepalShaderD3D11 { diff --git a/GPU/D3D11/FramebufferManagerD3D11.cpp b/GPU/D3D11/FramebufferManagerD3D11.cpp index f4d4854049..792f11f79e 100644 --- a/GPU/D3D11/FramebufferManagerD3D11.cpp +++ b/GPU/D3D11/FramebufferManagerD3D11.cpp @@ -21,7 +21,7 @@ #include "Common/System/Display.h" #include "Common/Math/lin/matrix4x4.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Common.h" #include "Common/ColorConv.h" diff --git a/GPU/D3D11/FramebufferManagerD3D11.h b/GPU/D3D11/FramebufferManagerD3D11.h index e951e277a1..a8a4089198 100644 --- a/GPU/D3D11/FramebufferManagerD3D11.h +++ b/GPU/D3D11/FramebufferManagerD3D11.h @@ -25,7 +25,7 @@ #include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" class TextureCacheD3D11; class DrawEngineD3D11; diff --git a/GPU/D3D11/ShaderManagerD3D11.cpp b/GPU/D3D11/ShaderManagerD3D11.cpp index a6c23e1c9d..4678f4ae65 100644 --- a/GPU/D3D11/ShaderManagerD3D11.cpp +++ b/GPU/D3D11/ShaderManagerD3D11.cpp @@ -25,7 +25,7 @@ #include "Common/Math/lin/matrix4x4.h" #include "Common/Math/math_util.h" #include "Common/Data/Convert/SmallDataConvert.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/Log.h" #include "Common/Common.h" diff --git a/GPU/D3D11/StateMappingD3D11.h b/GPU/D3D11/StateMappingD3D11.h index df6f4a2adf..b6e356d4de 100644 --- a/GPU/D3D11/StateMappingD3D11.h +++ b/GPU/D3D11/StateMappingD3D11.h @@ -3,7 +3,7 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" // TODO: Do this more progressively. No need to compute the entire state if the entire state hasn't changed. diff --git a/GPU/D3D11/StencilBufferD3D11.cpp b/GPU/D3D11/StencilBufferD3D11.cpp index 5c988d7e61..4da469ae61 100644 --- a/GPU/D3D11/StencilBufferD3D11.cpp +++ b/GPU/D3D11/StencilBufferD3D11.cpp @@ -17,7 +17,7 @@ #include -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Log.h" #include "Core/Reporting.h" diff --git a/GPU/Directx9/DepalettizeShaderDX9.cpp b/GPU/Directx9/DepalettizeShaderDX9.cpp index ec91de50ba..bff0c04933 100644 --- a/GPU/Directx9/DepalettizeShaderDX9.cpp +++ b/GPU/Directx9/DepalettizeShaderDX9.cpp @@ -18,14 +18,14 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/D3D9/D3D9ShaderCompiler.h" +#include "Common/GPU/thin3d.h" #include "Common/Log.h" #include "Common/StringUtils.h" #include "Core/Reporting.h" #include "GPU/Directx9/TextureCacheDX9.h" #include "GPU/Directx9/DepalettizeShaderDX9.h" #include "GPU/Common/DepalettizeShaderCommon.h" -#include "gfx/d3d9_shader.h" namespace DX9 { diff --git a/GPU/Directx9/DrawEngineDX9.cpp b/GPU/Directx9/DrawEngineDX9.cpp index a0f4a8c743..c464652318 100644 --- a/GPU/Directx9/DrawEngineDX9.cpp +++ b/GPU/Directx9/DrawEngineDX9.cpp @@ -26,7 +26,7 @@ #include "Core/Config.h" #include "Core/CoreTiming.h" -#include "gfx/d3d9_state.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "GPU/Math3D.h" #include "GPU/GPUState.h" diff --git a/GPU/Directx9/FramebufferManagerDX9.cpp b/GPU/Directx9/FramebufferManagerDX9.cpp index 21cfa45c99..0c9c2d5720 100644 --- a/GPU/Directx9/FramebufferManagerDX9.cpp +++ b/GPU/Directx9/FramebufferManagerDX9.cpp @@ -16,7 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/Math/lin/matrix4x4.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/ColorConv.h" #include "Core/MemMap.h" @@ -28,7 +28,7 @@ #include "GPU/GPUState.h" #include "GPU/Debugger/Stepping.h" -#include "gfx/d3d9_state.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/PresentationCommon.h" #include "GPU/Common/ShaderTranslation.h" @@ -38,7 +38,7 @@ #include "GPU/Directx9/TextureCacheDX9.h" #include "GPU/Directx9/DrawEngineDX9.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index 5db0cbffd8..439b443cd7 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -31,7 +31,7 @@ #include "Core/Reporting.h" #include "Core/System.h" -#include "gfx/d3d9_state.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" diff --git a/GPU/Directx9/ShaderManagerDX9.cpp b/GPU/Directx9/ShaderManagerDX9.cpp index e292f185c4..f7c331907e 100644 --- a/GPU/Directx9/ShaderManagerDX9.cpp +++ b/GPU/Directx9/ShaderManagerDX9.cpp @@ -22,12 +22,12 @@ #include #include -#include "gfx/d3d9_shader.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/lin/matrix4x4.h" #include "Common/Math/math_util.h" #include "Common/Data/Convert/SmallDataConvert.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/D3D9/D3D9ShaderCompiler.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/Common.h" diff --git a/GPU/Directx9/ShaderManagerDX9.h b/GPU/Directx9/ShaderManagerDX9.h index 31458e1fee..a71b95d2e5 100644 --- a/GPU/Directx9/ShaderManagerDX9.h +++ b/GPU/Directx9/ShaderManagerDX9.h @@ -25,7 +25,6 @@ #include "GPU/Directx9/PixelShaderGeneratorDX9.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" -#include "thin3d/d3dx9_loader.h" #include "Common/Math/lin/matrix4x4.h" namespace DX9 { diff --git a/GPU/Directx9/StateMappingDX9.cpp b/GPU/Directx9/StateMappingDX9.cpp index 0efeaf996e..a3ae081396 100644 --- a/GPU/Directx9/StateMappingDX9.cpp +++ b/GPU/Directx9/StateMappingDX9.cpp @@ -16,15 +16,16 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/Profiler/Profiler.h" -#include "GPU/Math3D.h" -#include "GPU/GPUState.h" -#include "GPU/ge_constants.h" +#include "Common/GPU/D3D9/D3D9ShaderCompiler.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" + #include "Core/System.h" #include "Core/Config.h" #include "Core/Reporting.h" -#include "gfx/d3d9_shader.h" -#include "gfx/d3d9_state.h" +#include "GPU/Math3D.h" +#include "GPU/GPUState.h" +#include "GPU/ge_constants.h" #include "GPU/Directx9/GPU_DX9.h" #include "GPU/Directx9/ShaderManagerDX9.h" diff --git a/GPU/Directx9/StencilBufferDX9.cpp b/GPU/Directx9/StencilBufferDX9.cpp index baa173adeb..d938e4339a 100644 --- a/GPU/Directx9/StencilBufferDX9.cpp +++ b/GPU/Directx9/StencilBufferDX9.cpp @@ -17,8 +17,8 @@ #include -#include "gfx/d3d9_state.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" +#include "Common/GPU/thin3d.h" #include "Core/Reporting.h" #include "GPU/Common/StencilCommon.h" #include "GPU/Directx9/FramebufferManagerDX9.h" diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index 06e2a34b5a..c867418a3f 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -27,7 +27,7 @@ #include "GPU/Directx9/FramebufferManagerDX9.h" #include "GPU/Directx9/ShaderManagerDX9.h" #include "GPU/Directx9/DepalettizeShaderDX9.h" -#include "gfx/d3d9_state.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/TextureDecoder.h" #include "Core/Config.h" diff --git a/GPU/GLES/DepalettizeShaderGLES.h b/GPU/GLES/DepalettizeShaderGLES.h index 4368780ebd..fd9c5da7af 100644 --- a/GPU/GLES/DepalettizeShaderGLES.h +++ b/GPU/GLES/DepalettizeShaderGLES.h @@ -18,9 +18,9 @@ #include #include "Common/CommonTypes.h" -#include "gfx/gl_common.h" -#include "thin3d/thin3d.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "GPU/ge_constants.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/DepalettizeShaderCommon.h" diff --git a/GPU/GLES/DepthBufferGLES.cpp b/GPU/GLES/DepthBufferGLES.cpp index 66a83b972f..fa3ca00c5c 100644 --- a/GPU/GLES/DepthBufferGLES.cpp +++ b/GPU/GLES/DepthBufferGLES.cpp @@ -17,7 +17,7 @@ #include -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Core/ConfigValues.h" #include "Core/Reporting.h" #include "GPU/Common/GPUStateUtils.h" diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 759f3541b5..deb288bd85 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -25,7 +25,7 @@ #include "Core/Config.h" #include "Core/CoreTiming.h" -#include "gfx/gl_debug_log.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" #include "Common/Profiler/Profiler.h" #include "GPU/Math3D.h" diff --git a/GPU/GLES/DrawEngineGLES.h b/GPU/GLES/DrawEngineGLES.h index f484034e11..6c96072185 100644 --- a/GPU/GLES/DrawEngineGLES.h +++ b/GPU/GLES/DrawEngineGLES.h @@ -27,8 +27,8 @@ #include "GPU/Common/DrawEngineCommon.h" #include "GPU/Common/GPUStateUtils.h" #include "GPU/GLES/FragmentShaderGeneratorGLES.h" -#include "gfx/gl_common.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" class LinkedShader; class ShaderManagerGLES; diff --git a/GPU/GLES/FragmentShaderGeneratorGLES.cpp b/GPU/GLES/FragmentShaderGeneratorGLES.cpp index 945f3fb17b..82586c3ea6 100644 --- a/GPU/GLES/FragmentShaderGeneratorGLES.cpp +++ b/GPU/GLES/FragmentShaderGeneratorGLES.cpp @@ -20,7 +20,7 @@ #include "Common/Log.h" #include "Common/StringUtils.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Core/Reporting.h" #include "Core/Config.h" #include "GPU/Common/GPUStateUtils.h" diff --git a/GPU/GLES/FragmentTestCacheGLES.cpp b/GPU/GLES/FragmentTestCacheGLES.cpp index a9459cd49a..47a23efc4d 100644 --- a/GPU/GLES/FragmentTestCacheGLES.cpp +++ b/GPU/GLES/FragmentTestCacheGLES.cpp @@ -15,8 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "thin3d/thin3d.h" -#include "gfx/gl_debug_log.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" #include "Core/Config.h" #include "GPU/GLES/FragmentTestCacheGLES.h" #include "GPU/GPUState.h" diff --git a/GPU/GLES/FramebufferManagerGLES.cpp b/GPU/GLES/FramebufferManagerGLES.cpp index ac4faa624a..c551b7756f 100644 --- a/GPU/GLES/FramebufferManagerGLES.cpp +++ b/GPU/GLES/FramebufferManagerGLES.cpp @@ -18,10 +18,10 @@ #include #include "Common/Profiler/Profiler.h" -#include "gfx/gl_common.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/glsl_program.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" +#include "Common/GPU/thin3d.h" #include "Common/ColorConv.h" #include "Core/MemMap.h" #include "Core/Config.h" diff --git a/GPU/GLES/FramebufferManagerGLES.h b/GPU/GLES/FramebufferManagerGLES.h index 9177b62767..51d44af73c 100644 --- a/GPU/GLES/FramebufferManagerGLES.h +++ b/GPU/GLES/FramebufferManagerGLES.h @@ -17,14 +17,14 @@ #pragma once -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" // Keeps track of allocated FBOs. // Also provides facilities for drawing and later converting raw // pixel data. #include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" struct GLSLProgram; class TextureCacheGLES; diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index d61d2adf76..e4e3d4fda4 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -24,14 +24,14 @@ #include #include "Common/Data/Convert/SmallDataConvert.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/math_util.h" #include "Common/Math/lin/matrix4x4.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/thin3d.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/Log.h" #include "Common/File/FileUtil.h" diff --git a/GPU/GLES/ShaderManagerGLES.h b/GPU/GLES/ShaderManagerGLES.h index 0c10d3ad73..a084edff1c 100644 --- a/GPU/GLES/ShaderManagerGLES.h +++ b/GPU/GLES/ShaderManagerGLES.h @@ -20,7 +20,7 @@ #include #include "Common/Hashmaps.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" #include "GPU/GLES/VertexShaderGeneratorGLES.h" diff --git a/GPU/GLES/StateMappingGLES.cpp b/GPU/GLES/StateMappingGLES.cpp index 8856bd517f..46883171c7 100644 --- a/GPU/GLES/StateMappingGLES.cpp +++ b/GPU/GLES/StateMappingGLES.cpp @@ -22,8 +22,8 @@ #include "StateMappingGLES.h" #include "Common/Profiler/Profiler.h" -#include "gfx/gl_debug_log.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "GPU/Math3D.h" #include "GPU/GPUState.h" diff --git a/GPU/GLES/StateMappingGLES.h b/GPU/GLES/StateMappingGLES.h index da4a271551..7fe7f082fa 100644 --- a/GPU/GLES/StateMappingGLES.h +++ b/GPU/GLES/StateMappingGLES.h @@ -17,4 +17,4 @@ #pragma once -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" diff --git a/GPU/GLES/StencilBufferGLES.cpp b/GPU/GLES/StencilBufferGLES.cpp index dce997ae81..1c19fa09e8 100644 --- a/GPU/GLES/StencilBufferGLES.cpp +++ b/GPU/GLES/StencilBufferGLES.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "gfx_es2/glsl_program.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/Reporting.h" diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 62844159a7..822143f3df 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -19,11 +19,10 @@ #include #include "ext/xxhash.h" -#include "gfx/gl_debug_log.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/math_util.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/ColorConv.h" #include "Core/Config.h" diff --git a/GPU/GLES/TextureCacheGLES.h b/GPU/GLES/TextureCacheGLES.h index f148fd3f68..1b3ba422e3 100644 --- a/GPU/GLES/TextureCacheGLES.h +++ b/GPU/GLES/TextureCacheGLES.h @@ -19,9 +19,9 @@ #include -#include "gfx_es2/gpu_features.h" -#include "gfx/gl_common.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "GPU/GPUInterface.h" #include "GPU/GPUState.h" #include "GPU/GLES/TextureScalerGLES.h" diff --git a/GPU/GLES/TextureScalerGLES.cpp b/GPU/GLES/TextureScalerGLES.cpp index d05e12c95b..d268fe92e1 100644 --- a/GPU/GLES/TextureScalerGLES.cpp +++ b/GPU/GLES/TextureScalerGLES.cpp @@ -16,14 +16,14 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" #include "GPU/Common/TextureScalerCommon.h" #include "GPU/GLES/TextureScalerGLES.h" #include "Common/ColorConv.h" #include "Common/Log.h" #include "Common/ThreadPools.h" -#include "thin3d/DataFormat.h" +#include "Common/GPU/DataFormat.h" int TextureScalerGLES::BytesPerPixel(u32 format) { return ((Draw::DataFormat)format == Draw::DataFormat::R8G8B8A8_UNORM) ? 4 : 2; diff --git a/GPU/GLES/VertexShaderGeneratorGLES.cpp b/GPU/GLES/VertexShaderGeneratorGLES.cpp index c3f3a0b716..8f775d2647 100644 --- a/GPU/GLES/VertexShaderGeneratorGLES.cpp +++ b/GPU/GLES/VertexShaderGeneratorGLES.cpp @@ -19,7 +19,7 @@ #include #include -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #if defined(_WIN32) && defined(_DEBUG) #include "Common/CommonWindows.h" diff --git a/GPU/GPU.vcxproj b/GPU/GPU.vcxproj index d77221d6a4..5d3468b07d 100644 --- a/GPU/GPU.vcxproj +++ b/GPU/GPU.vcxproj @@ -164,7 +164,7 @@ Level3 - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) StreamingSIMDExtensions2 Precise @@ -182,7 +182,7 @@ Level3 - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang NotSet Precise false @@ -202,7 +202,7 @@ Level3 - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang NotSet Precise false @@ -221,7 +221,7 @@ Level3 - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang NotSet Precise false @@ -244,7 +244,7 @@ MaxSpeed true true - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang false StreamingSIMDExtensions2 Precise @@ -267,7 +267,7 @@ MaxSpeed true true - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang false NotSet Precise @@ -292,7 +292,7 @@ MaxSpeed true true - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang false NotSet Precise @@ -317,7 +317,7 @@ MaxSpeed true true - ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/native;../ext/glew;../ext/snappy;../ext/glslang + ..\dx9sdk\Include\DX11;../common;..;../ext;../ext/glew;../ext/snappy;../ext/glslang false NotSet Precise diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 6dd2fcd78f..f5c53b7bbb 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -16,7 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/System/Display.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" @@ -33,7 +33,7 @@ #include "Core/Reporting.h" #include "Core/Core.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "GPU/Software/Rasterizer.h" #include "GPU/Software/Sampler.h" diff --git a/GPU/Software/SoftGpu.h b/GPU/Software/SoftGpu.h index fc9bf68b7e..bd8e6a12fe 100644 --- a/GPU/Software/SoftGpu.h +++ b/GPU/Software/SoftGpu.h @@ -19,7 +19,7 @@ #include "GPU/GPUCommon.h" #include "GPU/Common/GPUDebugInterface.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" struct FormatBuffer { FormatBuffer() { data = nullptr; } diff --git a/GPU/Vulkan/DebugVisVulkan.cpp b/GPU/Vulkan/DebugVisVulkan.cpp index 7b55caa41c..78616e86c5 100644 --- a/GPU/Vulkan/DebugVisVulkan.cpp +++ b/GPU/Vulkan/DebugVisVulkan.cpp @@ -15,14 +15,14 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "gfx_es2/draw_buffer.h" -#include "thin3d/thin3d.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/GPU/thin3d.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "DebugVisVulkan.h" -#include "Common/Vulkan/VulkanMemory.h" -#include "Common/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanImage.h" #include "GPU/Vulkan/GPU_Vulkan.h" #include "GPU/Vulkan/VulkanUtil.h" #include "GPU/Vulkan/TextureCacheVulkan.h" diff --git a/GPU/Vulkan/DebugVisVulkan.h b/GPU/Vulkan/DebugVisVulkan.h index e220003a56..b616d856f3 100644 --- a/GPU/Vulkan/DebugVisVulkan.h +++ b/GPU/Vulkan/DebugVisVulkan.h @@ -17,7 +17,7 @@ #pragma once -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" class GPUInterface; class UIContext; diff --git a/GPU/Vulkan/DepalettizeShaderVulkan.cpp b/GPU/Vulkan/DepalettizeShaderVulkan.cpp index 42fe013372..4d11207eb2 100644 --- a/GPU/Vulkan/DepalettizeShaderVulkan.cpp +++ b/GPU/Vulkan/DepalettizeShaderVulkan.cpp @@ -16,15 +16,15 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/ColorConv.h" -#include "Common/Vulkan/VulkanImage.h" -#include "Common/Vulkan/VulkanMemory.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" #include "GPU/Common/DepalettizeShaderCommon.h" #include "GPU/Vulkan/DepalettizeShaderVulkan.h" #include "GPU/Vulkan/VulkanUtil.h" -#include "Common/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanImage.h" static const char depal_vs[] = R"(#version 450 #extension GL_ARB_separate_shader_objects : enable diff --git a/GPU/Vulkan/DepalettizeShaderVulkan.h b/GPU/Vulkan/DepalettizeShaderVulkan.h index 86cd6e615f..e78d817feb 100644 --- a/GPU/Vulkan/DepalettizeShaderVulkan.h +++ b/GPU/Vulkan/DepalettizeShaderVulkan.h @@ -20,8 +20,8 @@ #include #include "Common/CommonTypes.h" -#include "Common/Vulkan/VulkanContext.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/thin3d.h" #include "GPU/Common/DepalettizeShaderCommon.h" class DepalShaderVulkan { diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 2688698efd..04d48db348 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -19,7 +19,7 @@ #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Log.h" #include "Common/MemoryUtil.h" @@ -34,8 +34,8 @@ #include "GPU/GPUState.h" #include "GPU/ge_constants.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "GPU/Common/SplineCommon.h" #include "GPU/Common/TransformCommon.h" diff --git a/GPU/Vulkan/FragmentShaderGeneratorVulkan.cpp b/GPU/Vulkan/FragmentShaderGeneratorVulkan.cpp index 05fdf3a4a9..3d2ad0d1d5 100644 --- a/GPU/Vulkan/FragmentShaderGeneratorVulkan.cpp +++ b/GPU/Vulkan/FragmentShaderGeneratorVulkan.cpp @@ -18,7 +18,7 @@ #include #include -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/GPU/Vulkan/FramebufferManagerVulkan.cpp b/GPU/Vulkan/FramebufferManagerVulkan.cpp index 41e47ae259..399aa3cd87 100644 --- a/GPU/Vulkan/FramebufferManagerVulkan.cpp +++ b/GPU/Vulkan/FramebufferManagerVulkan.cpp @@ -22,12 +22,12 @@ #include "Common/System/Display.h" #include "Common/Math/lin/matrix4x4.h" #include "Common/Data/Convert/SmallDataConvert.h" -#include "ext/native/thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanMemory.h" -#include "Common/Vulkan/VulkanImage.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/ColorConv.h" #include "Core/MemMap.h" #include "Core/Config.h" diff --git a/GPU/Vulkan/FramebufferManagerVulkan.h b/GPU/Vulkan/FramebufferManagerVulkan.h index a09f6ef755..a653aeb15d 100644 --- a/GPU/Vulkan/FramebufferManagerVulkan.h +++ b/GPU/Vulkan/FramebufferManagerVulkan.h @@ -17,7 +17,7 @@ #pragma once -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "GPU/GPUInterface.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/GPUDebugInterface.h" diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index 447f1b184c..197774e8d5 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -43,8 +43,8 @@ #include "GPU/Vulkan/FramebufferManagerVulkan.h" #include "GPU/Vulkan/DrawEngineVulkan.h" #include "GPU/Vulkan/TextureCacheVulkan.h" -#include "thin3d/VulkanRenderManager.h" -#include "thin3d/VulkanQueueRunner.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanQueueRunner.h" #include "Core/MIPS/MIPS.h" #include "Core/HLE/sceKernelThread.h" diff --git a/GPU/Vulkan/PipelineManagerVulkan.cpp b/GPU/Vulkan/PipelineManagerVulkan.cpp index 23d39bb3bf..2aa0546a8e 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.cpp +++ b/GPU/Vulkan/PipelineManagerVulkan.cpp @@ -7,14 +7,14 @@ #include "Common/Log.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "GPU/Vulkan/VulkanUtil.h" #include "GPU/Vulkan/PipelineManagerVulkan.h" #include "GPU/Vulkan/ShaderManagerVulkan.h" #include "GPU/Common/DrawEngineCommon.h" -#include "ext/native/thin3d/thin3d.h" -#include "ext/native/thin3d/VulkanRenderManager.h" -#include "ext/native/thin3d/VulkanQueueRunner.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanQueueRunner.h" PipelineManagerVulkan::PipelineManagerVulkan(VulkanContext *vulkan) : vulkan_(vulkan), pipelines_(256) { // The pipeline cache is created on demand (or explicitly through Load). diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index f8678a4dd8..1dff1d8ce0 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -23,12 +23,12 @@ #include "Common/Math/math_util.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "Common/Log.h" #include "Common/Common.h" #include "Core/Config.h" diff --git a/GPU/Vulkan/ShaderManagerVulkan.h b/GPU/Vulkan/ShaderManagerVulkan.h index 6e6a297ee2..016de933c6 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.h +++ b/GPU/Vulkan/ShaderManagerVulkan.h @@ -21,7 +21,7 @@ #include #include "Common/Hashmaps.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" #include "GPU/Vulkan/VertexShaderGeneratorVulkan.h" diff --git a/GPU/Vulkan/StateMappingVulkan.cpp b/GPU/Vulkan/StateMappingVulkan.cpp index b35c2114ee..1dee71861d 100644 --- a/GPU/Vulkan/StateMappingVulkan.cpp +++ b/GPU/Vulkan/StateMappingVulkan.cpp @@ -17,8 +17,8 @@ #include -#include "Common/Vulkan/VulkanLoader.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "GPU/Math3D.h" diff --git a/GPU/Vulkan/StateMappingVulkan.h b/GPU/Vulkan/StateMappingVulkan.h index 9306f5051d..7719dcf857 100644 --- a/GPU/Vulkan/StateMappingVulkan.h +++ b/GPU/Vulkan/StateMappingVulkan.h @@ -1,6 +1,6 @@ #pragma once -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include diff --git a/GPU/Vulkan/StencilBufferVulkan.cpp b/GPU/Vulkan/StencilBufferVulkan.cpp index 613401545f..faaba54836 100644 --- a/GPU/Vulkan/StencilBufferVulkan.cpp +++ b/GPU/Vulkan/StencilBufferVulkan.cpp @@ -15,8 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "ext/native/thin3d/thin3d.h" -#include "ext/native/thin3d/VulkanRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Log.h" #include "Core/Reporting.h" diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 3e24a899c5..43ff63089b 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -23,8 +23,8 @@ #include "Common/Data/Text/I18n.h" #include "Common/Math/math_util.h" #include "Common/Profiler/Profiler.h" -#include "thin3d/thin3d.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/ColorConv.h" #include "Common/StringUtils.h" @@ -34,9 +34,9 @@ #include "Core/Reporting.h" #include "Core/System.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanImage.h" -#include "Common/Vulkan/VulkanMemory.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanMemory.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" diff --git a/GPU/Vulkan/TextureCacheVulkan.h b/GPU/Vulkan/TextureCacheVulkan.h index d0d9014508..7c6c8f8946 100644 --- a/GPU/Vulkan/TextureCacheVulkan.h +++ b/GPU/Vulkan/TextureCacheVulkan.h @@ -22,7 +22,7 @@ #include "Common/Hashmaps.h" #include "GPU/GPUInterface.h" #include "GPU/GPUState.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "GPU/Vulkan/TextureScalerVulkan.h" #include "GPU/Common/TextureCacheCommon.h" #include "GPU/Vulkan/VulkanUtil.h" diff --git a/GPU/Vulkan/TextureScalerVulkan.cpp b/GPU/Vulkan/TextureScalerVulkan.cpp index 8b903df905..28e6d4bc60 100644 --- a/GPU/Vulkan/TextureScalerVulkan.cpp +++ b/GPU/Vulkan/TextureScalerVulkan.cpp @@ -18,7 +18,7 @@ #include #include "Common/Common.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "Common/ColorConv.h" #include "Common/Log.h" #include "Common/ThreadPools.h" diff --git a/GPU/Vulkan/VertexShaderGeneratorVulkan.cpp b/GPU/Vulkan/VertexShaderGeneratorVulkan.cpp index ca732d23e9..36574f24ae 100644 --- a/GPU/Vulkan/VertexShaderGeneratorVulkan.cpp +++ b/GPU/Vulkan/VertexShaderGeneratorVulkan.cpp @@ -19,14 +19,14 @@ #include #include -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #if defined(_WIN32) && defined(_DEBUG) #include "Common/CommonWindows.h" #endif #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "Core/Config.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" diff --git a/GPU/Vulkan/VulkanUtil.cpp b/GPU/Vulkan/VulkanUtil.cpp index 0e52abc314..bcf6f655f9 100644 --- a/GPU/Vulkan/VulkanUtil.cpp +++ b/GPU/Vulkan/VulkanUtil.cpp @@ -17,7 +17,7 @@ #include "Common/Log.h" #include "Common/StringUtils.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanContext.h" #include "GPU/Vulkan/VulkanUtil.h" Vulkan2D::Vulkan2D(VulkanContext *vulkan) : vulkan_(vulkan) { diff --git a/GPU/Vulkan/VulkanUtil.h b/GPU/Vulkan/VulkanUtil.h index cac2698591..752ea8d754 100644 --- a/GPU/Vulkan/VulkanUtil.h +++ b/GPU/Vulkan/VulkanUtil.h @@ -21,9 +21,9 @@ #include #include "Common/Hashmaps.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanLoader.h" -#include "Common/Vulkan/VulkanImage.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanImage.h" // Vulkan doesn't really have the concept of an FBO that owns the images, // but it does have the concept of a framebuffer as a set of attachments. diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp index 450eefee31..cb2e2ab26a 100644 --- a/Qt/QtMain.cpp +++ b/Qt/QtMain.cpp @@ -33,7 +33,7 @@ #include "Common/System/NativeApp.h" #include "Common/System/System.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Math/math_util.h" #include "QtMain.h" diff --git a/Qt/QtMain.h b/Qt/QtMain.h index 9c7589b6c2..afb97149f4 100644 --- a/Qt/QtMain.h +++ b/Qt/QtMain.h @@ -4,7 +4,7 @@ #include #include #include -#include "gfx_es2/glsl_program.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" #include #ifndef SDL @@ -26,11 +26,11 @@ QTM_USE_NAMESPACE #include "Common/TimeUtil.h" #include "Common/File/VFS/VFS.h" #include "Common/File/VFS/AssetReader.h" -#include "gfx/gl_common.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Input/InputState.h" #include "Common/Input/KeyCodes.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Net/Resolve.h" #include "NKCodeFromQt.h" @@ -39,8 +39,8 @@ QTM_USE_NAMESPACE #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" // Input void SimulateGamepad(); diff --git a/SDL/SDLGLGraphicsContext.cpp b/SDL/SDLGLGraphicsContext.cpp index 168a07afcd..83fd2cd873 100644 --- a/SDL/SDLGLGraphicsContext.cpp +++ b/SDL/SDLGLGraphicsContext.cpp @@ -2,8 +2,8 @@ #include "SDLGLGraphicsContext.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d_create.h" #include "Common/System/NativeApp.h" #include "Common/System/System.h" diff --git a/SDL/SDLGLGraphicsContext.h b/SDL/SDLGLGraphicsContext.h index 88c9d8202d..1910ce8f56 100644 --- a/SDL/SDLGLGraphicsContext.h +++ b/SDL/SDLGLGraphicsContext.h @@ -1,8 +1,8 @@ #include "SDL_syswm.h" #include "SDL.h" -#include "thin3d/GLRenderManager.h" -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLCommon.h" #include "Common/GraphicsContext.h" class SDLGLGraphicsContext : public GraphicsContext { diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 923c569029..cc1dcdce0f 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -28,7 +28,7 @@ SDLJoystick *joystick = NULL; #include "Common/Net/Resolve.h" #include "NKCodeFromSDL.h" #include "Common/Math/math_util.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "SDL_syswm.h" diff --git a/SDL/SDLVulkanGraphicsContext.cpp b/SDL/SDLVulkanGraphicsContext.cpp index 3c07ab942c..d8cf460bfc 100644 --- a/SDL/SDLVulkanGraphicsContext.cpp +++ b/SDL/SDLVulkanGraphicsContext.cpp @@ -3,9 +3,9 @@ #include "Common/System/System.h" #include "Common/System/NativeApp.h" #include "Common/System/Display.h" -#include "thin3d/thin3d.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Data/Text/Parsers.h" #include "Core/System.h" diff --git a/SDL/SDLVulkanGraphicsContext.h b/SDL/SDLVulkanGraphicsContext.h index 02e5f496e4..d654212342 100644 --- a/SDL/SDLVulkanGraphicsContext.h +++ b/SDL/SDLVulkanGraphicsContext.h @@ -2,10 +2,10 @@ #include "SDL_syswm.h" #include "Common/GraphicsContext.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" class VulkanRenderManager; diff --git a/UI/ComboKeyMappingScreen.cpp b/UI/ComboKeyMappingScreen.cpp index f56847bf85..d5742c575a 100644 --- a/UI/ComboKeyMappingScreen.cpp +++ b/UI/ComboKeyMappingScreen.cpp @@ -16,8 +16,8 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/System/Display.h" -#include "gfx_es2/draw_buffer.h" -#include "gfx/texture_atlas.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/Render/TextureAtlas.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 74320bf165..43a406adb4 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -19,7 +19,7 @@ #include #include -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/UI/Root.h" #include "Common/UI/UI.h" #include "Common/UI/Context.h" diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 6e50950000..e133c89bac 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -21,7 +21,7 @@ #include "Common/System/Display.h" #include "Common/System/NativeApp.h" #include "Common/System/System.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Data/Text/I18n.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" @@ -52,12 +52,8 @@ #ifdef _WIN32 #include "Common/CommonWindows.h" // Want to avoid including the full header here as it includes d3dx.h -#if PPSSPP_API(D3DX9) -int GetD3DXVersion(); -#elif PPSSPP_API(D3D9_D3DCOMPILER) int GetD3DCompilerVersion(); #endif -#endif static const char *logLevelList[] = { "Notice", @@ -485,11 +481,7 @@ void SystemInfoScreen::CreateViews() { deviceSpecs->Add(new InfoItem(si->T("Driver Version"), System_GetProperty(SYSPROP_GPUDRIVER_VERSION))); #if !PPSSPP_PLATFORM(UWP) if (GetGPUBackend() == GPUBackend::DIRECT3D9) { -#if PPSSPP_API(D3DX9) - deviceSpecs->Add(new InfoItem(si->T("D3DX Version"), StringFromFormat("%d", GetD3DXVersion()))); -#elif PPSSPP_API(D3D9_D3DCOMPILER) deviceSpecs->Add(new InfoItem(si->T("D3DCompiler Version"), StringFromFormat("%d", GetD3DCompilerVersion()))); -#endif } #endif #endif diff --git a/UI/DisplayLayoutEditor.h b/UI/DisplayLayoutEditor.h index 394762a6a9..6855c127ca 100644 --- a/UI/DisplayLayoutEditor.h +++ b/UI/DisplayLayoutEditor.h @@ -17,8 +17,8 @@ #pragma once -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 0c8ddde7cd..96b224c573 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -20,8 +20,8 @@ #include "Common/System/Display.h" #include "Common/System/System.h" -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 61042fc14b..b3d11af155 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -19,9 +19,9 @@ #include -#include "gfx/texture_atlas.h" -#include "gfx_es2/gpu_features.h" -#include "gfx_es2/draw_text.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/Render/Text/draw_text.h" #include "Common/UI/Root.h" #include "Common/UI/UI.h" diff --git a/UI/GPUDriverTestScreen.h b/UI/GPUDriverTestScreen.h index 64a20d4c74..7f20ecab82 100644 --- a/UI/GPUDriverTestScreen.h +++ b/UI/GPUDriverTestScreen.h @@ -8,7 +8,7 @@ #include "Common/LogManager.h" #include "UI/MiscScreens.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" class GPUDriverTestScreen : public UIDialogScreenWithBackground { public: diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index afcc507e56..c0cf42d56f 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -22,7 +22,7 @@ #include #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Thread/PrioritizedWorkQueue.h" #include "Common/File/VFS/VFS.h" #include "Common/File/FileUtil.h" diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index a4eecc132f..697a2145c9 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -19,7 +19,7 @@ #include "ppsspp_config.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 3a90ec8b6f..1ae64da3ce 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -20,8 +20,8 @@ #include #include "Common/Net/Resolve.h" -#include "gfx_es2/gpu_features.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Root.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index add209e3f2..e84c43f3fe 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -20,7 +20,7 @@ #include "Common/Data/Color/RGBAUtil.h" #include "Common/System/Display.h" #include "Common/System/System.h" -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Math/math_util.h" #include "Common/UI/Context.h" diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index 8b3dd53809..3cacb147c4 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -18,7 +18,7 @@ #pragma once #include "Common/Input/InputState.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index a46a28e153..bf7dd25107 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -22,8 +22,8 @@ #include "Common/System/Display.h" #include "Common/System/System.h" -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Root.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 56007c863b..41c5fd1f46 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -20,7 +20,7 @@ #include #include -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 133ca5a7ab..ef7547d411 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -45,10 +45,10 @@ #include "Common/Net/HTTPClient.h" #include "Common/Net/Resolve.h" -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_text.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/Text/draw_text.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d.h" #include "Common/UI/UI.h" #include "Common/UI/Screen.h" #include "Common/UI/Context.h" diff --git a/UI/OnScreenDisplay.cpp b/UI/OnScreenDisplay.cpp index 17dc3222b4..5b89f78b57 100644 --- a/UI/OnScreenDisplay.cpp +++ b/UI/OnScreenDisplay.cpp @@ -1,8 +1,8 @@ #include "UI/OnScreenDisplay.h" #include "Common/Data/Color/RGBAUtil.h" -#include "gfx/texture_atlas.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/TextureAtlas.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Context.h" diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 92e5f178e4..db826278e3 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -18,12 +18,12 @@ #include #include -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" #include "Common/UI/Context.h" #include "Common/UI/UIScreen.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Data/Text/I18n.h" #include "Common/StringUtils.h" diff --git a/UI/ProfilerDraw.cpp b/UI/ProfilerDraw.cpp index 95792f3800..da5dba4ba7 100644 --- a/UI/ProfilerDraw.cpp +++ b/UI/ProfilerDraw.cpp @@ -18,7 +18,7 @@ #include #include -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "Common/Profiler/Profiler.h" diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index a4663399cb..8dfabde16a 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -26,7 +26,7 @@ #endif // TODO: For text align flags, probably shouldn't be in gfx_es2/... -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Net/HTTPClient.h" #include "Common/Net/Resolve.h" #include "Common/Net/URL.h" diff --git a/UI/ReportScreen.cpp b/UI/ReportScreen.cpp index 9842549f1c..1c31856a26 100644 --- a/UI/ReportScreen.cpp +++ b/UI/ReportScreen.cpp @@ -18,8 +18,8 @@ #include // TODO: For text align flags, probably shouldn't be in gfx_es2/... -#include "gfx_es2/draw_buffer.h" -#include "thin3d/thin3d.h" +#include "Common/Render/DrawBuffer.h" +#include "Common/GPU/thin3d.h" #include "Common/UI/Context.h" #include "UI/PauseScreen.h" #include "UI/ReportScreen.h" diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 41bd742893..2fa6b2d474 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -19,7 +19,7 @@ #include #include "Common/Data/Color/RGBAUtil.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/curves.h" #include "Common/Thread/PrioritizedWorkQueue.h" diff --git a/UI/Store.cpp b/UI/Store.cpp index ceff7c02ec..b893c48b2d 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -20,7 +20,7 @@ #include "Common/UI/Screen.h" #include "Common/UI/Context.h" #include "Common/UI/ViewGroup.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Common.h" #include "Common/Log.h" diff --git a/UI/TextureUtil.cpp b/UI/TextureUtil.cpp index b52ea1bcbb..cdfe9440e2 100644 --- a/UI/TextureUtil.cpp +++ b/UI/TextureUtil.cpp @@ -1,10 +1,10 @@ #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "ext/jpge/jpgd.h" #include "Common/UI/View.h" #include "Common/UI/Context.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Data/Color/RGBAUtil.h" #include "Common/Data/Format/ZIMLoad.h" diff --git a/UI/TextureUtil.h b/UI/TextureUtil.h index 3ed46f71fd..5a4710a65a 100644 --- a/UI/TextureUtil.h +++ b/UI/TextureUtil.h @@ -2,7 +2,7 @@ #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/UI/View.h" enum ImageFileType { diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index c2d5740a21..c180541833 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -19,7 +19,7 @@ #include #include "Common/Data/Color/RGBAUtil.h" -#include "gfx_es2/draw_buffer.h" +#include "Common/Render/DrawBuffer.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/math_util.h" #include "Common/UI/Context.h" diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index d04cf4e95c..dab63b2940 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "TouchControlVisibilityScreen.h" #include "Core/Config.h" diff --git a/UI/TouchControlVisibilityScreen.h b/UI/TouchControlVisibilityScreen.h index 895078626b..04be4a1872 100644 --- a/UI/TouchControlVisibilityScreen.h +++ b/UI/TouchControlVisibilityScreen.h @@ -17,7 +17,7 @@ #pragma once -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "MiscScreens.h" namespace UI { diff --git a/UWP/CommonUWP/CommonUWP.vcxproj b/UWP/CommonUWP/CommonUWP.vcxproj index b7440d5ba5..f1ad520e49 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj +++ b/UWP/CommonUWP/CommonUWP.vcxproj @@ -414,6 +414,10 @@ + + + + @@ -433,6 +437,13 @@ + + + + + + + @@ -525,6 +536,9 @@ + + + @@ -543,6 +557,13 @@ + + + + + + + diff --git a/UWP/CommonUWP/CommonUWP.vcxproj.filters b/UWP/CommonUWP/CommonUWP.vcxproj.filters index 725a3526f1..071580a871 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj.filters +++ b/UWP/CommonUWP/CommonUWP.vcxproj.filters @@ -70,6 +70,21 @@ {8e12d2c0-157a-4625-a970-665e1ec9a425} + + {03e7b6a3-ac95-4145-b045-9c644186a0a9} + + + {4a53cf3f-fb5d-471f-8570-7dcdf479cce6} + + + {84fe421c-de5d-4732-9518-dd5ef6c46a72} + + + {2eb259f7-2735-493a-88be-96eb38f1b34e} + + + {28139b08-f8d5-41a2-a5ee-bf86cf1469c3} + @@ -320,6 +335,36 @@ UI + + GPU + + + GPU\D3D11 + + + Render + + + Render + + + GPU\GL + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + @@ -582,6 +627,39 @@ UI + + GPU + + + GPU + + + GPU + + + Render + + + Render + + + GPU\GL + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + + + Render\Text + diff --git a/UWP/NativeUWP/NativeUWP.vcxproj b/UWP/NativeUWP/NativeUWP.vcxproj deleted file mode 100644 index 3e504d2853..0000000000 --- a/UWP/NativeUWP/NativeUWP.vcxproj +++ /dev/null @@ -1,422 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - UWP Gold - ARM - - - UWP Gold - ARM64 - - - UWP Gold - Win32 - - - UWP Gold - x64 - - - - {935028af-b850-4ad7-a00e-7ba84fb97d05} - StaticLibrary - NativeUWP - en-US - 14.0 - true - Windows Store - 10.0.15063.0 - 10.0 - 10.0.17763.0 - - - - StaticLibrary - true - - - StaticLibrary - true - - - StaticLibrary - true - - - StaticLibrary - true - - - StaticLibrary - false - true - - - StaticLibrary - false - true - - - StaticLibrary - false - false - - - StaticLibrary - false - false - - - StaticLibrary - false - false - - - StaticLibrary - false - false - - - StaticLibrary - false - true - - - StaticLibrary - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - Use - false - true - pch.h - ../..;../../ext;../..;../../ext/native;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NOMINMAX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - Create - Create - Create - Create - Create - Create - - - - - {ddf90203-0aae-4f38-b589-2e9637658ce6} - - - - - - \ No newline at end of file diff --git a/UWP/NativeUWP/NativeUWP.vcxproj.filters b/UWP/NativeUWP/NativeUWP.vcxproj.filters deleted file mode 100644 index 4257fc1baa..0000000000 --- a/UWP/NativeUWP/NativeUWP.vcxproj.filters +++ /dev/null @@ -1,57 +0,0 @@ - - - - - {98343696-3517-451a-9b47-94d462263e3e} - - - {8a254b8c-46f2-4ff1-bc53-deea7e614276} - - - - - - thin3d - - - thin3d - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - - - - - thin3d - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - \ No newline at end of file diff --git a/UWP/NativeUWP/pch.cpp b/UWP/NativeUWP/pch.cpp deleted file mode 100644 index bcb5590be1..0000000000 --- a/UWP/NativeUWP/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/UWP/NativeUWP/pch.h b/UWP/NativeUWP/pch.h deleted file mode 100644 index 529bbb17fe..0000000000 --- a/UWP/NativeUWP/pch.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "targetver.h" - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -#include diff --git a/UWP/NativeUWP/targetver.h b/UWP/NativeUWP/targetver.h deleted file mode 100644 index a66ecb00f1..0000000000 --- a/UWP/NativeUWP/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/UWP/PPSSPP_UWP.sln b/UWP/PPSSPP_UWP.sln index 63a8e5f693..fc6a017b01 100644 --- a/UWP/PPSSPP_UWP.sln +++ b/UWP/PPSSPP_UWP.sln @@ -11,8 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoreUWP", "CoreUWP\CoreUWP. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPU_UWP", "GPU_UWP\GPU_UWP.vcxproj", "{5D271429-C288-4534-98AF-94475D940058}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NativeUWP", "NativeUWP\NativeUWP.vcxproj", "{935028AF-B850-4AD7-A00E-7BA84FB97D05}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UI_UWP", "UI_UWP\UI_UWP.vcxproj", "{5FAC15BD-7397-4512-99D5-66CDC03AF5B7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libkirk_UWP", "libkirk_UWP\libkirk_UWP.vcxproj", "{2F911C05-B341-4291-8BF5-09EDECBDD5F5}" diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp index 30eb175017..4de2859f70 100644 --- a/UWP/PPSSPP_UWPMain.cpp +++ b/UWP/PPSSPP_UWPMain.cpp @@ -6,7 +6,7 @@ #include "Common/File/FileUtil.h" #include "Common/Net/HTTPClient.h" #include "Common/Net/Resolve.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/thin3d_create.h" #include "Common/Common.h" #include "Common/Input/InputState.h" diff --git a/UWP/PPSSPP_UWPMain.h b/UWP/PPSSPP_UWPMain.h index ed720e8a98..3be7b25ce4 100644 --- a/UWP/PPSSPP_UWPMain.h +++ b/UWP/PPSSPP_UWPMain.h @@ -2,7 +2,7 @@ #include -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Input/InputState.h" #include "Common/GraphicsContext.h" diff --git a/UWP/UWP.vcxproj b/UWP/UWP.vcxproj index 67e2def6bd..c3bbfac336 100644 --- a/UWP/UWP.vcxproj +++ b/UWP/UWP.vcxproj @@ -1728,9 +1728,6 @@ {2f911c05-b341-4291-8bf5-09edecbdd5f5} - - {935028af-b850-4ad7-a00e-7ba84fb97d05} - {2b2d16bd-1d37-46af-a3f8-552900951b26} @@ -1758,4 +1755,4 @@ - \ No newline at end of file + diff --git a/Windows/GEDebugger/SimpleGLWindow.cpp b/Windows/GEDebugger/SimpleGLWindow.cpp index 3416bc17df..37e6b7bd28 100644 --- a/Windows/GEDebugger/SimpleGLWindow.cpp +++ b/Windows/GEDebugger/SimpleGLWindow.cpp @@ -17,8 +17,8 @@ #include #include "Common/Math/lin/matrix4x4.h" -#include "gfx_es2/glsl_program.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Common.h" #include "Windows/GEDebugger/SimpleGLWindow.h" diff --git a/Windows/GEDebugger/SimpleGLWindow.h b/Windows/GEDebugger/SimpleGLWindow.h index 8628ab5eef..c6ebb1c104 100644 --- a/Windows/GEDebugger/SimpleGLWindow.h +++ b/Windows/GEDebugger/SimpleGLWindow.h @@ -20,7 +20,7 @@ #include #include "CommonWindows.h" -#include "gfx_es2/glsl_program.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" #include "Common/CommonWindows.h" struct SimpleGLWindow { diff --git a/Windows/GEDebugger/VertexPreview.cpp b/Windows/GEDebugger/VertexPreview.cpp index aefddc7088..cc3589eebc 100644 --- a/Windows/GEDebugger/VertexPreview.cpp +++ b/Windows/GEDebugger/VertexPreview.cpp @@ -16,8 +16,8 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "Common/Math/lin/matrix4x4.h" -#include "gfx_es2/glsl_program.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLSLProgram.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Windows/GEDebugger/GEDebugger.h" #include "Windows/GEDebugger/SimpleGLWindow.h" #include "Core/System.h" diff --git a/Windows/GPU/D3D11Context.cpp b/Windows/GPU/D3D11Context.cpp index 32d158c54e..8f93ebc88d 100644 --- a/Windows/GPU/D3D11Context.cpp +++ b/Windows/GPU/D3D11Context.cpp @@ -15,9 +15,9 @@ #include "Core/System.h" #include "Windows/GPU/D3D11Context.h" #include "Windows/W32Util/Misc.h" -#include "thin3d/thin3d.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/d3d11_loader.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/D3D11/D3D11Loader.h" #ifdef __MINGW32__ #undef __uuidof diff --git a/Windows/GPU/D3D9Context.cpp b/Windows/GPU/D3D9Context.cpp index daeb0fd86b..0ccfa8364c 100644 --- a/Windows/GPU/D3D9Context.cpp +++ b/Windows/GPU/D3D9Context.cpp @@ -3,7 +3,7 @@ #include "Common/CommonWindows.h" #include -#include "gfx/d3d9_state.h" +#include "Common/GPU/D3D9/D3D9StateCache.h" #include "Common/System/Display.h" #include "Common/Data/Encoding/Utf8.h" @@ -17,14 +17,9 @@ #include "Common/OSVersion.h" #include "Windows/GPU/D3D9Context.h" #include "Windows/W32Util/Misc.h" -#include "thin3d/thin3d.h" -#include "thin3d/thin3d_create.h" - -#if PPSSPP_API(D3DX9) -#include "thin3d/d3dx9_loader.h" -#elif PPSSPP_API(D3D9_D3DCOMPILER) -#include "thin3d/d3d9_d3dcompiler_loader.h" -#endif +#include "Common/GPU/thin3d.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/D3D9/D3DCompilerLoader.h" void D3D9Context::SwapBuffers() { if (has9Ex_) { @@ -76,19 +71,11 @@ bool D3D9Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) { return false; } -#if PPSSPP_API(D3DX9) - int d3dx_version = LoadD3DX9Dynamic(); - if (!d3dx_version) { - *error_message = "D3DX DLL not found! Try reinstalling DirectX."; - return false; - } -#elif PPSSPP_API(D3D9_D3DCOMPILER) bool result = LoadD3DCompilerDynamic(); if (!result) { *error_message = "D3DCompiler not found! Try reinstalling DirectX."; return false; } -#endif g_pfnCreate9ex = (DIRECT3DCREATE9EX)GetProcAddress(hD3D9_, "Direct3DCreate9Ex"); has9Ex_ = (g_pfnCreate9ex != NULL) && IsVistaOrHigher(); @@ -231,11 +218,7 @@ void D3D9Context::Shutdown() { device_->EndScene(); device_->Release(); d3d_->Release(); -#if PPSSPP_API(D3DX9) - UnloadD3DXDynamic(); -#elif PPSSPP_API(D3D9_D3DCOMPILER) UnloadD3DCompiler(); -#endif DX9::pD3Ddevice = nullptr; DX9::pD3DdeviceEx = nullptr; device_ = nullptr; diff --git a/Windows/GPU/WindowsGLContext.cpp b/Windows/GPU/WindowsGLContext.cpp index 57b4a51cd7..765321c903 100644 --- a/Windows/GPU/WindowsGLContext.cpp +++ b/Windows/GPU/WindowsGLContext.cpp @@ -17,11 +17,11 @@ #include "Common/Log.h" #include "Common/CommonWindows.h" -#include "gfx/gl_common.h" -#include "gfx/gl_debug_log.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLDebugLog.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "GL/gl.h" #include "GL/wglew.h" #include "Core/Config.h" diff --git a/Windows/GPU/WindowsVulkanContext.cpp b/Windows/GPU/WindowsVulkanContext.cpp index 1c6557b2e3..5618e2f1f5 100644 --- a/Windows/GPU/WindowsVulkanContext.cpp +++ b/Windows/GPU/WindowsVulkanContext.cpp @@ -52,12 +52,12 @@ #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" -#include "Common/Vulkan/VulkanLoader.h" -#include "Common/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanContext.h" -#include "thin3d/thin3d.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/VulkanRenderManager.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Data/Text/Parsers.h" #include "Windows/GPU/WindowsVulkanContext.h" diff --git a/Windows/GPU/WindowsVulkanContext.h b/Windows/GPU/WindowsVulkanContext.h index 46abc4e841..098d737e98 100644 --- a/Windows/GPU/WindowsVulkanContext.h +++ b/Windows/GPU/WindowsVulkanContext.h @@ -19,7 +19,7 @@ #include "Common/GraphicsContext.h" #include "Windows/GPU/WindowsGraphicsContext.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" class VulkanContext; class VulkanRenderManager; diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 56d3fb720b..ee9500291d 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -7,7 +7,7 @@ #include "resource.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Data/Text/I18n.h" #include "Common/Data/Encoding/Utf8.h" @@ -18,7 +18,7 @@ #include "Common/LogManager.h" #include "Common/ConsoleListener.h" #include "Common/OSVersion.h" -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "Common/StringUtils.h" #if PPSSPP_API(ANY_GL) #include "GPU/GLES/TextureScalerGLES.h" diff --git a/Windows/PPSSPP.sln b/Windows/PPSSPP.sln index 942e26be29..ee3d5e3512 100644 --- a/Windows/PPSSPP.sln +++ b/Windows/PPSSPP.sln @@ -8,7 +8,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPWindows", "PPSSPP.vcx {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} {533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36} {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} - {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE} = {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE} {457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED} {3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195} @@ -17,7 +16,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\Common\Common.vcxproj", "{3FCDBAE2-5103-4350-9A8E-848CE9C73195}" ProjectSection(ProjectDependencies) = postProject {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} - {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\ext\zlib\zlib.vcxproj", "{F761046E-6C38-4428-A5F1-38391A37BB34}" @@ -32,17 +30,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "..\Core\Core.vcxpro ProjectSection(ProjectDependencies) = postProject {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} - {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} {457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED} {3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "native", "..\ext\native\native.vcxproj", "{C4DF647E-80EA-4111-A0A8-218B1B711E18}" - ProjectSection(ProjectDependencies) = postProject - {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} - {EDFA2E87-8AC1-4853-95D4-D7594FF81947} = {EDFA2E87-8AC1-4853-95D4-D7594FF81947} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPHeadless", "..\headless\Headless.vcxproj", "{EE9BD869-CAA3-447D-8328-294D90DE2C1F}" ProjectSection(ProjectDependencies) = postProject {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} @@ -61,13 +52,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "..\unittest\Uni {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} {533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36} {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} - {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UI", "..\UI\UI.vcxproj", "{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}" ProjectSection(ProjectDependencies) = postProject {533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36} - {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} {457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED} {3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195} EndProjectSection @@ -178,22 +167,6 @@ Global {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|Win32.Build.0 = Release|Win32 {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|x64.ActiveCfg = Release|x64 {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|x64.Build.0 = Release|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|ARM.ActiveCfg = Debug|ARM - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|ARM.Build.0 = Debug|ARM - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|ARM64.Build.0 = Debug|ARM64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|Win32.Build.0 = Debug|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|x64.ActiveCfg = Debug|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|x64.Build.0 = Debug|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|ARM.ActiveCfg = Release|ARM - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|ARM.Build.0 = Release|ARM - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|ARM64.ActiveCfg = Release|ARM64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|ARM64.Build.0 = Release|ARM64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|Win32.ActiveCfg = Release|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|Win32.Build.0 = Release|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|x64.ActiveCfg = Release|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|x64.Build.0 = Release|x64 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|ARM.ActiveCfg = Debug|ARM {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|ARM.Build.0 = Debug|ARM {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index def7547093..55a21f5a1d 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -237,7 +237,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h;Common/DbgNew.h MultiThreadedDebug StreamingSIMDExtensions2 @@ -275,7 +275,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h;Common/DbgNew.h MultiThreadedDebug false @@ -310,7 +310,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h;Common/DbgNew.h MultiThreadedDebug false @@ -344,7 +344,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h MultiThreadedDebug false @@ -384,7 +384,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h stdafx.h true @@ -433,7 +433,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h true false @@ -475,7 +475,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h true false @@ -515,7 +515,7 @@ Use Level3 ProgramDatabase - ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../ext;../common;..;../ext/glew;../ext/zlib stdafx.h true false @@ -1689,9 +1689,6 @@ {457f45d2-556f-47bc-a31d-aff0d15beaed} - - {C4DF647E-80EA-4111-A0A8-218B1B711E18} - {f761046e-6c38-4428-a5f1-38391a37bb34} diff --git a/Windows/main.cpp b/Windows/main.cpp index 1143938f8c..3abdd7dfb0 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -23,7 +23,7 @@ #include "Common/CommonWindows.h" #include "Common/File/FileUtil.h" #include "Common/OSVersion.h" -#include "Common/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "ppsspp_config.h" #include diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 69bae6d39c..8538ce1f5a 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -102,22 +102,14 @@ ARCH_FILES := \ endif NATIVE_FILES :=\ - $(SRC)/ext/native/gfx_es2/glsl_program.cpp \ - $(SRC)/ext/native/gfx_es2/gpu_features.cpp \ - $(SRC)/ext/native/gfx_es2/gl3stub.c \ - $(SRC)/ext/native/gfx_es2/draw_buffer.cpp.arm \ - $(SRC)/ext/native/gfx_es2/draw_text.cpp.arm \ - $(SRC)/ext/native/gfx_es2/draw_text_android.cpp.arm \ - $(SRC)/ext/native/gfx/gl_debug_log.cpp \ - $(SRC)/ext/native/gfx/texture_atlas.cpp \ - $(SRC)/ext/native/thin3d/thin3d.cpp \ - $(SRC)/ext/native/thin3d/thin3d_gl.cpp \ - $(SRC)/ext/native/thin3d/thin3d_vulkan.cpp \ - $(SRC)/ext/native/thin3d/GLRenderManager.cpp \ - $(SRC)/ext/native/thin3d/GLQueueRunner.cpp \ - $(SRC)/ext/native/thin3d/VulkanRenderManager.cpp \ - $(SRC)/ext/native/thin3d/VulkanQueueRunner.cpp \ - $(SRC)/ext/native/thin3d/DataFormatGL.cpp + $(SRC)/Common/GPU/OpenGL/gl3stub.c \ + $(SRC)/Common/GPU/OpenGL/thin3d_gl.cpp \ + $(SRC)/Common/GPU/OpenGL/GLDebugLog.cpp \ + $(SRC)/Common/GPU/OpenGL/GLSLProgram.cpp \ + $(SRC)/Common/GPU/OpenGL/GLFeatures.cpp \ + $(SRC)/Common/GPU/OpenGL/GLRenderManager.cpp \ + $(SRC)/Common/GPU/OpenGL/GLQueueRunner.cpp \ + $(SRC)/Common/GPU/OpenGL/DataFormatGL.cpp EGL_FILES := \ $(SRC)/Common/GL/GLInterface/EGL.cpp \ @@ -125,11 +117,14 @@ EGL_FILES := \ $(SRC)/Common/GL/GLInterface/GLInterface.cpp VULKAN_FILES := \ - $(SRC)/Common/Vulkan/VulkanLoader.cpp \ - $(SRC)/Common/Vulkan/VulkanContext.cpp \ - $(SRC)/Common/Vulkan/VulkanDebug.cpp \ - $(SRC)/Common/Vulkan/VulkanImage.cpp \ - $(SRC)/Common/Vulkan/VulkanMemory.cpp \ + $(SRC)/Common/GPU/Vulkan/thin3d_vulkan.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanQueueRunner.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanRenderManager.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanLoader.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanContext.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanDebug.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanImage.cpp \ + $(SRC)/Common/GPU/Vulkan/VulkanMemory.cpp \ $(SRC)/GPU/Vulkan/FragmentShaderGeneratorVulkan.cpp \ $(SRC)/GPU/Vulkan/DrawEngineVulkan.cpp \ $(SRC)/GPU/Vulkan/FramebufferManagerVulkan.cpp \ @@ -258,6 +253,11 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Common/File/FileUtil.cpp \ $(SRC)/Common/File/DirListing.cpp \ $(SRC)/Common/File/FileDescriptor.cpp \ + $(SRC)/Common/GPU/thin3d.cpp \ + $(SRC)/Common/Render/DrawBuffer.cpp \ + $(SRC)/Common/Render/TextureAtlas.cpp \ + $(SRC)/Common/Render/Text/draw_text.cpp \ + $(SRC)/Common/Render/Text/draw_text_android.cpp \ $(SRC)/Common/Input/GestureDetector.cpp \ $(SRC)/Common/Input/InputState.cpp \ $(SRC)/Common/Math/fast/fast_math.c \ diff --git a/android/jni/AndroidEGLContext.cpp b/android/jni/AndroidEGLContext.cpp index c29ef49ba4..55d54dff77 100644 --- a/android/jni/AndroidEGLContext.cpp +++ b/android/jni/AndroidEGLContext.cpp @@ -1,5 +1,5 @@ -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d_create.h" #include "Common/Log.h" #include "Common/System/System.h" diff --git a/android/jni/AndroidEGLContext.h b/android/jni/AndroidEGLContext.h index 45b33f8241..49a89739b2 100644 --- a/android/jni/AndroidEGLContext.h +++ b/android/jni/AndroidEGLContext.h @@ -1,6 +1,6 @@ #pragma once -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "AndroidGraphicsContext.h" #include "Common/GL/GLInterfaceBase.h" diff --git a/android/jni/AndroidGraphicsContext.h b/android/jni/AndroidGraphicsContext.h index 096a5653f3..434017e077 100644 --- a/android/jni/AndroidGraphicsContext.h +++ b/android/jni/AndroidGraphicsContext.h @@ -2,8 +2,7 @@ #include -#include "thin3d/thin3d.h" - +#include "Common/GPU/thin3d.h" #include "Common/GraphicsContext.h" enum { diff --git a/android/jni/AndroidJavaGLContext.cpp b/android/jni/AndroidJavaGLContext.cpp index c797bd046d..9fefc59c90 100644 --- a/android/jni/AndroidJavaGLContext.cpp +++ b/android/jni/AndroidJavaGLContext.cpp @@ -1,6 +1,6 @@ #include "AndroidJavaGLContext.h" #include "Common/System/Display.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Log.h" #include "Core/ConfigValues.h" #include "Core/System.h" diff --git a/android/jni/AndroidJavaGLContext.h b/android/jni/AndroidJavaGLContext.h index 9e4b07dd1b..69f8d2bb40 100644 --- a/android/jni/AndroidJavaGLContext.h +++ b/android/jni/AndroidJavaGLContext.h @@ -5,8 +5,8 @@ #include #include "AndroidGraphicsContext.h" -#include "thin3d/GLRenderManager.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" +#include "Common/GPU/thin3d_create.h" // Doesn't do much. Just to fit in. class AndroidJavaEGLGraphicsContext : public AndroidGraphicsContext { diff --git a/android/jni/AndroidVulkanContext.cpp b/android/jni/AndroidVulkanContext.cpp index 8ddff75115..dc68a8d75a 100644 --- a/android/jni/AndroidVulkanContext.cpp +++ b/android/jni/AndroidVulkanContext.cpp @@ -3,11 +3,11 @@ #include "Common/System/NativeApp.h" #include "Common/System/System.h" #include "Common/Log.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanDebug.h" -#include "Common/Vulkan/VulkanLoader.h" -#include "thin3d/VulkanRenderManager.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanRenderManager.h" +#include "Common/GPU/thin3d_create.h" #include "Common/Data/Text/Parsers.h" #include "Core/Config.h" #include "Core/ConfigValues.h" diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 3e6c859210..54687fc1e8 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -51,8 +51,8 @@ struct JNIEnv {}; #include "Common/Net/Resolve.h" #include "android/jni/AndroidAudio.h" -#include "gfx/gl_common.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/System/Display.h" #include "Common/System/NativeApp.h" diff --git a/ext/native/LICENSE.TXT b/ext/native/LICENSE.TXT deleted file mode 100644 index e92ab68fef..0000000000 --- a/ext/native/LICENSE.TXT +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (C) 2012 Henrik Rydgard - -This applies to all the code here not covered under other licenses, see README.md. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ext/native/native.vcxproj b/ext/native/native.vcxproj deleted file mode 100644 index dd6381f71e..0000000000 --- a/ext/native/native.vcxproj +++ /dev/null @@ -1,432 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C4DF647E-80EA-4111-A0A8-218B1B711E18} - Win32Proj - native - 10.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StaticLibrary - true - Unicode - $(DefaultPlatformToolset) - - - StaticLibrary - true - Unicode - $(DefaultPlatformToolset) - - - StaticLibrary - true - Unicode - $(DefaultPlatformToolset) - true - - - StaticLibrary - true - Unicode - $(DefaultPlatformToolset) - true - - - StaticLibrary - false - false - Unicode - $(DefaultPlatformToolset) - - - StaticLibrary - false - Unicode - $(DefaultPlatformToolset) - - - StaticLibrary - false - Unicode - $(DefaultPlatformToolset) - true - - - StaticLibrary - false - Unicode - $(DefaultPlatformToolset) - true - - - - - - - - - $(VC_IncludePath);$(WindowsSDK_IncludePath) - - - $(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - - - - - $(VC_IncludePath);$(WindowsSDK_IncludePath) - - - $(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - - Level3 - _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - true - false - false - MultiThreadedDebug - ../../Common/DbgNew.h - ProgramDatabase - - - Windows - true - - - Ws2_32.lib - - - - - - - Level3 - _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - true - false - false - MultiThreadedDebug - false - ../../Common/DbgNew.h - ProgramDatabase - - - Windows - true - - - Ws2_32.lib - - - - - - - Level3 - _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - true - false - false - MultiThreadedDebug - false - ../../Common/DbgNew.h - ProgramDatabase - - - Windows - true - - - Ws2_32.lib - - - - - - - Level3 - _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - true - false - false - MultiThreadedDebug - false - - - ProgramDatabase - - - Windows - true - - - Ws2_32.lib - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - StreamingSIMDExtensions2 - Precise - true - false - MultiThreaded - ProgramDatabase - false - - - Windows - true - true - true - - - Ws2_32.lib - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - NotSet - Precise - true - false - MultiThreaded - ProgramDatabase - false - true - false - - - Windows - true - true - true - - - Ws2_32.lib - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - Precise - true - false - MultiThreaded - ProgramDatabase - false - true - false - - - Windows - true - true - true - - - Ws2_32.lib - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\ext;..\..;..\..\dx9sdk\Include;..\..\dx9sdk\Include\DX11;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\glew;..\SDL\include;%(AdditionalIncludeDirectories) - NotSet - Precise - true - false - MultiThreaded - ProgramDatabase - false - true - false - - - Windows - true - true - true - - - Ws2_32.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/native/native.vcxproj.filters b/ext/native/native.vcxproj.filters deleted file mode 100644 index 9befbb1243..0000000000 --- a/ext/native/native.vcxproj.filters +++ /dev/null @@ -1,176 +0,0 @@ - - - - - tools - - - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - thin3d - - - thin3d - - - gfx - - - gfx - - - gfx - - - thin3d - - - gfx - - - gfx - - - gfx - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - gfx - - - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - gfx - - - gfx - - - thin3d - - - gfx - - - gfx - - - gfx - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - thin3d - - - gfx - - - - - {9da89505-72a1-40e6-86e5-705372db1608} - - - {4515306f-4664-46bf-a89b-abfec5520a15} - - - {06c6305a-a646-485b-85b9-645a24dd6553} - - - \ No newline at end of file diff --git a/ext/native/thin3d/d3dx9_loader.cpp b/ext/native/thin3d/d3dx9_loader.cpp deleted file mode 100644 index e67f4b6ae8..0000000000 --- a/ext/native/thin3d/d3dx9_loader.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "thin3d/d3dx9_loader.h" - -#include "Common/Log.h" - -// TODO: See if we can use the bundled D3Dcompiler_47.dll to compiler for DX9 as well. - -typedef BOOL(__stdcall *TFunc_D3DXCheckVersion)(UINT D3DSDKVersion, UINT D3DXSDKVersion); -typedef HRESULT(__stdcall *TFunc_D3DXCompileShader)( - LPCSTR pSrcData, - UINT srcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE * ppConstantTable); - -typedef HRESULT(__stdcall *TFunc_D3DXAssembleShader)( - LPCSTR pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER * ppErrorMsgs - ); - -static HMODULE hm_d3dx; -static unsigned int d3dx_version; -static int failedFunctions; - -static TFunc_D3DXCheckVersion m_TFunc_D3DXCheckVersion; -static TFunc_D3DXAssembleShader m_TFunc_D3DXAssembleShader; -static TFunc_D3DXCompileShader m_TFunc_D3DXCompileShader; - -void makeD3DX9dllFilename_by_versionW(std::wstring& strOut, unsigned int versionNumber, bool debugVersion = false) { - wchar_t buf[256]; - wsprintf(buf, L"d3dx9%s_%02i.dll", debugVersion ? L"d" : L"", versionNumber); - strOut = buf; -} - -bool checkDllExistsW(const WCHAR* fname, bool bIncludeExeDir) { - return ::GetFileAttributesW(fname) != DWORD(-1); -} - -bool checkExistsDllW(const WCHAR *sDllFilename) { - std::wstring sfullpath(MAX_PATH, '\0'); - size_t sz = ::GetSystemDirectoryW(&sfullpath[0], (UINT)sfullpath.size()); - if (sz >= sfullpath.size()) { - sfullpath.resize(sz); - sz = ::GetSystemDirectoryW(&sfullpath[0], (UINT)sfullpath.size()); - } - sfullpath.resize(sz); - if (sz == 0) { - throw (std::runtime_error("system error")); - } - - sfullpath += L'\\'; - sfullpath += sDllFilename; - - if (checkDllExistsW(sfullpath.c_str(), true)) { - return true; - } - - return false; -} - -bool getLatestInstalledD3DXVersion(unsigned int* piOutVers, bool debugVersion) { - *piOutVers = 0; - std::wstring fname; - for (unsigned int cvers = 45; cvers > 0; cvers--) { - makeD3DX9dllFilename_by_versionW(fname, cvers, debugVersion); - if (checkExistsDllW(fname.c_str())) { - *piOutVers = cvers; - return true; - } - } - return false; -} - -HMODULE loadDllLastVersion(unsigned int* version, bool debugVersion) { - failedFunctions = 0; - - if (version) - *version = 0; - - if (!getLatestInstalledD3DXVersion(version, debugVersion)) { - return 0; - } - - std::wstring dllfname; - makeD3DX9dllFilename_by_versionW(dllfname, version ? *version : 0, debugVersion); - HMODULE hm = ::LoadLibraryW(dllfname.c_str()); - return hm; -} - -#define GB_MAKE_STR(s) # s -#define GB_MAKE_STR2(x) GB_MAKE_STR(x) - -#define __HANDLE_DLL_ENTRY(funcname) m_TFunc_##funcname = \ - ( TFunc_##funcname ) ::GetProcAddress(hm_d3dx, GB_MAKE_STR(funcname) ); \ - \ - if(!m_TFunc_##funcname) {\ - handleNotFoundAddr( GB_MAKE_STR(funcname) ); \ - } - -void handleNotFoundAddr(const char* sFuncName) { - ERROR_LOG(G3D, "Failed to find D3DX function %s", sFuncName); - failedFunctions++; -} - -int LoadD3DX9Dynamic(bool debugVersion) { - if (hm_d3dx) { - // Already loaded - return d3dx_version; - } - - hm_d3dx = loadDllLastVersion(&d3dx_version, debugVersion); - if (!hm_d3dx) { - ERROR_LOG(G3D, "Failed to find D3DX dll."); - return 0; - } - const int NERROR = -1; - int _begin = 0; - - __HANDLE_DLL_ENTRY(D3DXCheckVersion); - __HANDLE_DLL_ENTRY(D3DXAssembleShader); - __HANDLE_DLL_ENTRY(D3DXCompileShader); - - if (failedFunctions > 0) { - ERROR_LOG(G3D, "Failed to load %i D3DX functions. This will not go well.", failedFunctions); - } - - return failedFunctions > 0 ? 0 : d3dx_version; -} - -int GetD3DXVersion() { - return d3dx_version; -} - -void UnloadD3DXDynamic() { - if (hm_d3dx) { - FreeLibrary(hm_d3dx); - hm_d3dx = NULL; - d3dx_version = 0; - } -} - -// version function - -#define GB_D3D9_D3DXDLL_LOADER_CHECK_ENTRY_NULL_PTR(funcname) assert(false && GB_MAKE_STR2(funcname) ); - - -BOOL dyn_D3DXCheckVersion(UINT D3DSDKVersion, UINT D3DXSDKVersion) { - if (!m_TFunc_D3DXCheckVersion) { - GB_D3D9_D3DXDLL_LOADER_CHECK_ENTRY_NULL_PTR(D3DXCheckVersion) - } - return m_TFunc_D3DXCheckVersion(D3DSDKVersion, D3DXSDKVersion); -} - -HRESULT dyn_D3DXAssembleShader(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER * ppErrorMsgs) -{ - if (!m_TFunc_D3DXAssembleShader) { - GB_D3D9_D3DXDLL_LOADER_CHECK_ENTRY_NULL_PTR(D3DXAssembleShader); - } - return m_TFunc_D3DXAssembleShader(pSrcData, SrcDataLen, pDefines, - pInclude, Flags, ppShader, ppErrorMsgs); -} - -HRESULT dyn_D3DXCompileShader(LPCSTR pSrcData, UINT srcDataLen, CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, - DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE * ppConstantTable) -{ - if (!m_TFunc_D3DXCompileShader) { - GB_D3D9_D3DXDLL_LOADER_CHECK_ENTRY_NULL_PTR(D3DXCompileShader); - } - return m_TFunc_D3DXCompileShader(pSrcData, srcDataLen, pDefines, - pInclude, pFunctionName, pProfile, - Flags, ppShader, ppErrorMsgs, ppConstantTable); -} diff --git a/ext/native/thin3d/d3dx9_loader.h b/ext/native/thin3d/d3dx9_loader.h deleted file mode 100644 index 36dad3f96b..0000000000 --- a/ext/native/thin3d/d3dx9_loader.h +++ /dev/null @@ -1,26 +0,0 @@ -// Cut-down version of https://code.google.com/p/d3dx9-dynamic-load/ -// by ksacvet777, licensed under the MIT - -#pragma once - -#include -#ifdef USE_CRT_DBG -#undef new -#endif -#include -#ifdef USE_CRT_DBG -#define new DBG_NEW -#endif -// Returns the D3DX9 version we got. 0 if none. -int LoadD3DX9Dynamic(bool debugVersion = false); // If debugVersion is set, load d3dx9d.dll -int GetD3DXVersion(); -void UnloadD3DXDynamic(); - -// Call these instead of the real D3DX9 functions. -BOOL dyn_D3DXCheckVersion(UINT D3DSDKVersion, UINT D3DXSDKVersion); -HRESULT dyn_D3DXAssembleShader(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER * ppErrorMsgs); -HRESULT dyn_D3DXCompileShader(LPCSTR pSrcData, UINT srcDataLen, CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, - DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE * ppConstantTable); diff --git a/ext/native/thin3d/vulkan_utils.cpp b/ext/native/thin3d/vulkan_utils.cpp deleted file mode 100644 index 80f7086c7f..0000000000 --- a/ext/native/thin3d/vulkan_utils.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2015- PPSSPP Project. - -// 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, version 2.0 or later versions. - -// 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 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official git repository and contact information can be found at -// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef min -#undef max - -#endif - -#include -#include -#include - -#ifdef USE_CRT_DBG -#undef new -#endif - -#include "ext/glslang/SPIRV/GlslangToSpv.h" -#include "ext/glslang/SPIRV/disassemble.h" - -#ifdef USE_CRT_DBG -#define new DBG_NEW -#endif - -#include "thin3d/vulkan_utils.h" - -void VulkanImage::Create2D(VulkanContext *vulkan, VkFormat format, VkFlags required_props, VkImageTiling tiling, VkImageUsageFlags usage, int width, int height) { - VkDevice device = vulkan->GetDevice(); - width_ = width; - height_ = height; - - VkImageCreateInfo i = {}; - i.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - i.pNext = NULL; - i.imageType = VK_IMAGE_TYPE_2D; - i.format = format; - i.extent = { (uint32_t)width, (uint32_t)height, 1 }; - i.mipLevels = 1; - i.arrayLayers = 1; - i.samples = VK_SAMPLE_COUNT_1_BIT; - i.tiling = tiling; - i.usage = usage; - i.flags = 0; - i.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - i.queueFamilyIndexCount = 0; - i.pQueueFamilyIndices = nullptr; - i.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - - VkMemoryRequirements mem_reqs; - - VkResult err = vkCreateImage(device, &i, nullptr, &image_); - _assert_(!err); - - vkGetImageMemoryRequirements(device, image_, &mem_reqs); - - mem_alloc_.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - mem_alloc_.pNext = NULL; - mem_alloc_.allocationSize = mem_reqs.size; - mem_alloc_.memoryTypeIndex = 0; - - bool res = vulkan->MemoryTypeFromProperties(mem_reqs.memoryTypeBits, required_props, &mem_alloc_.memoryTypeIndex); - _assert_(res); - - err = vkAllocateMemory(device, &mem_alloc_, nullptr, &memory_); - _assert_(!err); - - err = vkBindImageMemory(device, image_, memory_, 0); // at offset 0. - _assert_(!err); -} - -void VulkanImage::SetImageData2D(VkDevice device, const uint8_t *data, int width, int height, int pitch) { - VkImageSubresource subres; - subres.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - subres.mipLevel = 0; - subres.arrayLayer = 0; - - VkSubresourceLayout layout; - void *destData; - vkGetImageSubresourceLayout(device, image_, &subres, &layout); - - VkResult err = vkMapMemory(device, memory_, 0, mem_alloc_.allocationSize, 0, &destData); - _assert_(!err); - - uint8_t *writePtr = (uint8_t *)destData + layout.offset; - int bpp = 4; // TODO - for (int y = 0; y < height; y++) { - memcpy(writePtr + y * layout.rowPitch, data + y * pitch, bpp * width); - } - - vkUnmapMemory(device, memory_); -} - - -void VulkanImage::ChangeLayout(VkCommandBuffer cmd, VkImageAspectFlags aspectMask, VkImageLayout old_image_layout, VkImageLayout new_image_layout) { - VkImageMemoryBarrier image_memory_barrier; - image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - image_memory_barrier.pNext = NULL; - image_memory_barrier.dstAccessMask = 0; - image_memory_barrier.srcAccessMask = 0; - image_memory_barrier.oldLayout = old_image_layout; - image_memory_barrier.newLayout = new_image_layout; - image_memory_barrier.image = image_; - image_memory_barrier.subresourceRange.aspectMask = aspectMask; - image_memory_barrier.subresourceRange.layerCount = 1; - image_memory_barrier.subresourceRange.baseArrayLayer = 0; - image_memory_barrier.subresourceRange.baseMipLevel = 0; - image_memory_barrier.subresourceRange.levelCount = 1; - - if (old_image_layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) { - image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; - } - - if (new_image_layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) { - // Make sure anything that was copying from this image has completed - image_memory_barrier.srcAccessMask = VK_ACCESS_MEMORY_READ_BIT; - } - - if (new_image_layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) { - // Make sure any Copy or CPU writes to image are flushed - image_memory_barrier.dstAccessMask = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT; - } - - VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; - VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; - vkCmdPipelineBarrier(cmd, src_stages, dest_stages, false, 0, nullptr, 0, nullptr, 1, &image_memory_barrier); -} diff --git a/ext/native/tools/atlastool.cpp b/ext/native/tools/atlastool.cpp index 079c994cf3..7403657ece 100644 --- a/ext/native/tools/atlastool.cpp +++ b/ext/native/tools/atlastool.cpp @@ -29,7 +29,7 @@ #include #include -#include "gfx/texture_atlas.h" +#include "Common/Render/TextureAtlas.h" #include "Common/Data/Format/PNGLoad.h" #include "Common/Data/Format/ZIMSave.h" diff --git a/ext/native/tools/atlastool/atlastool.vcxproj b/ext/native/tools/atlastool/atlastool.vcxproj index 805700c863..afd5ad8b43 100644 --- a/ext/native/tools/atlastool/atlastool.vcxproj +++ b/ext/native/tools/atlastool/atlastool.vcxproj @@ -17,9 +17,6 @@ {f761046e-6c38-4428-a5f1-38391a37bb34} - - {c4df647e-80ea-4111-a0a8-218b1b711e18} - @@ -111,4 +108,4 @@ - \ No newline at end of file + diff --git a/ext/native/tools/zimtool/zimtool.vcxproj b/ext/native/tools/zimtool/zimtool.vcxproj index 1eecf94c3f..5c91fc8a23 100644 --- a/ext/native/tools/zimtool/zimtool.vcxproj +++ b/ext/native/tools/zimtool/zimtool.vcxproj @@ -17,9 +17,6 @@ {f761046e-6c38-4428-a5f1-38391a37bb34} - - {c4df647e-80ea-4111-a0a8-218b1b711e18} - @@ -108,4 +105,4 @@ - \ No newline at end of file + diff --git a/headless/Headless.vcxproj b/headless/Headless.vcxproj index 8702c8a511..29d26051d5 100644 --- a/headless/Headless.vcxproj +++ b/headless/Headless.vcxproj @@ -176,7 +176,7 @@ NotUsing Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS - ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew EnableFastChecks StreamingSIMDExtensions2 Precise @@ -209,7 +209,7 @@ NotUsing Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew NotSet Precise false @@ -242,7 +242,7 @@ NotUsing Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew Precise false true @@ -271,7 +271,7 @@ NotUsing Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew Precise false true @@ -303,7 +303,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS - ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/x86/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew false StreamingSIMDExtensions2 Precise @@ -339,7 +339,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/x86_64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew false NotSet Precise @@ -377,7 +377,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/aarch64/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew false Precise Speed @@ -411,7 +411,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew;../ext/native + ../ffmpeg/Windows/arm/include;../dx9sdk/Include/DX11;../Common;..;../Core;../ext/glew false Precise Speed @@ -500,9 +500,6 @@ {457f45d2-556f-47bc-a31d-aff0d15beaed} - - {C4DF647E-80EA-4111-A0A8-218B1B711E18} - {f761046e-6c38-4428-a5f1-38391a37bb34} @@ -516,4 +513,4 @@ - \ No newline at end of file + diff --git a/headless/SDLHeadlessHost.cpp b/headless/SDLHeadlessHost.cpp index 8e5799dd03..b57d02a5cd 100644 --- a/headless/SDLHeadlessHost.cpp +++ b/headless/SDLHeadlessHost.cpp @@ -21,10 +21,10 @@ #include #include "headless/SDLHeadlessHost.h" -#include "gfx/gl_common.h" -#include "gfx_es2/gpu_features.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLFeatures.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/File/VFS/VFS.h" #include "Common/File/VFS/AssetReader.h" diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp index 2f9d06aa1f..af5548bf84 100644 --- a/headless/WindowsHeadlessHost.cpp +++ b/headless/WindowsHeadlessHost.cpp @@ -19,8 +19,8 @@ #include "headless/WindowsHeadlessHost.h" -#include "gfx/gl_common.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLCommon.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/File/VFS/VFS.h" #include "Common/File/VFS/AssetReader.h" diff --git a/ios/PPSSPPUIApplication.mm b/ios/PPSSPPUIApplication.mm index a9075cd6ac..2166da2406 100644 --- a/ios/PPSSPPUIApplication.mm +++ b/ios/PPSSPPUIApplication.mm @@ -21,9 +21,9 @@ #include "Common/Input/InputState.h" #include "Common/Net/Resolve.h" #include "Common/UI/Screen.h" -#include "thin3d/thin3d.h" +#include "Common/GPU/thin3d.h" #include "Common/Input/KeyCodes.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #import "ios/AppDelegate.h" #include "ios/SmartKeyboardMap.hpp" diff --git a/ios/ViewController.mm b/ios/ViewController.mm index 82f4ddf00a..02b18a5ec5 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -14,10 +14,10 @@ #include "Common/Net/Resolve.h" #include "Common/UI/Screen.h" -#include "thin3d/thin3d.h" -#include "thin3d/thin3d_create.h" -#include "thin3d/GLRenderManager.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/thin3d.h" +#include "Common/GPU/thin3d_create.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/System/Display.h" #include "Common/System/System.h" diff --git a/libretro/LibretroD3D11Context.cpp b/libretro/LibretroD3D11Context.cpp index 8fbcd50a76..216876a409 100644 --- a/libretro/LibretroD3D11Context.cpp +++ b/libretro/LibretroD3D11Context.cpp @@ -1,7 +1,8 @@ #include "Common/Log.h" #include "Core/ConfigValues.h" #include "libretro/LibretroD3D11Context.h" -#include "thin3d/d3d11_loader.h" +#include "Common/GPU/D3D11/D3D11Loader.h" + #include #ifdef __MINGW32__ diff --git a/libretro/LibretroGLContext.cpp b/libretro/LibretroGLContext.cpp index c8260650cb..c8f3bcd0a7 100644 --- a/libretro/LibretroGLContext.cpp +++ b/libretro/LibretroGLContext.cpp @@ -3,7 +3,7 @@ #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "libretro/LibretroGLContext.h" diff --git a/libretro/LibretroGLContext.h b/libretro/LibretroGLContext.h index 73c29701b7..5c6ded1d6e 100644 --- a/libretro/LibretroGLContext.h +++ b/libretro/LibretroGLContext.h @@ -1,8 +1,8 @@ #pragma once -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" #include "libretro/LibretroGraphicsContext.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" class LibretroGLContext : public LibretroHWRenderContext { public: diff --git a/libretro/LibretroGLCoreContext.cpp b/libretro/LibretroGLCoreContext.cpp index 14c816f1cf..7b571bdaf0 100644 --- a/libretro/LibretroGLCoreContext.cpp +++ b/libretro/LibretroGLCoreContext.cpp @@ -3,7 +3,7 @@ #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" -#include "gfx_es2/gpu_features.h" +#include "Common/GPU/OpenGL/GLFeatures.h" #include "libretro/LibretroGLCoreContext.h" diff --git a/libretro/LibretroGLCoreContext.h b/libretro/LibretroGLCoreContext.h index 7719a867c2..bb8d5e460f 100644 --- a/libretro/LibretroGLCoreContext.h +++ b/libretro/LibretroGLCoreContext.h @@ -1,8 +1,8 @@ #pragma once -#include "gfx/gl_common.h" +#include "Common/GPU/OpenGL/GLCommon.h" #include "libretro/LibretroGraphicsContext.h" -#include "thin3d/GLRenderManager.h" +#include "Common/GPU/OpenGL/GLRenderManager.h" class LibretroGLCoreContext : public LibretroHWRenderContext { public: diff --git a/libretro/LibretroGraphicsContext.h b/libretro/LibretroGraphicsContext.h index 65b92d2a6a..97890c3013 100644 --- a/libretro/LibretroGraphicsContext.h +++ b/libretro/LibretroGraphicsContext.h @@ -3,7 +3,7 @@ #include "libretro/libretro.h" #include "Common/GraphicsContext.h" -#include "thin3d/thin3d_create.h" +#include "Common/GPU/thin3d_create.h" #include "Core/System.h" #include "GPU/GPUState.h" diff --git a/libretro/LibretroVulkanContext.cpp b/libretro/LibretroVulkanContext.cpp index 0f978e99b3..5d62a54b45 100644 --- a/libretro/LibretroVulkanContext.cpp +++ b/libretro/LibretroVulkanContext.cpp @@ -1,7 +1,7 @@ -#include "Common/Vulkan/VulkanLoader.h" -#include "Common/Vulkan/VulkanContext.h" -#include "Common/Vulkan/VulkanDebug.h" +#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "Common/GPU/Vulkan/VulkanContext.h" +#include "Common/GPU/Vulkan/VulkanDebug.h" #include "Common/Log.h" #include "Core/Config.h" #include "Core/ConfigValues.h" diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 25cb8ae65c..6f8ffebe6c 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -90,9 +90,8 @@ ifeq ($(PLATFORM_EXT), android) $(EXTDIR)/libzip/zip_unchange_data.c SOURCES_C +=\ - $(NATIVEDIR)/gfx_es2/gl3stub.c \ - $(NATIVEDIR)/math/fast/fast_math.c \ - $(NATIVEDIR)/math/fast/fast_matrix.c + $(COMMONDIR)/Math/fast/fast_math.c \ + $(COMMONDIR)/Math/fast/fast_matrix.c endif SOURCES_C += $(LIBRETRODIR)/ext/glew/glew.c @@ -166,6 +165,23 @@ SOURCES_CXX += \ $(COMMONDIR)/File/FileUtil.cpp \ $(COMMONDIR)/File/FileDescriptor.cpp \ $(COMMONDIR)/File/DirListing.cpp \ + $(COMMONDIR)/GPU/thin3d.cpp \ + $(COMMONDIR)/GPU/OpenGL/thin3d_gl.cpp \ + $(COMMONDIR)/GPU/OpenGL/GLDebugLog.cpp \ + $(COMMONDIR)/GPU/OpenGL/GLSLProgram.cpp \ + $(COMMONDIR)/GPU/OpenGL/gl3stub.c \ + $(COMMONDIR)/GPU/OpenGL/GLFeatures.cpp \ + $(COMMONDIR)/GPU/OpenGL/GLRenderManager.cpp \ + $(COMMONDIR)/GPU/OpenGL/GLQueueRunner.cpp \ + $(COMMONDIR)/GPU/OpenGL/DataFormatGL.cpp \ + $(COMMONDIR)/GPU/Vulkan/thin3d_vulkan.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanQueueRunner.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanRenderManager.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanLoader.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanContext.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanDebug.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanImage.cpp \ + $(COMMONDIR)/GPU/Vulkan/VulkanMemory.cpp \ $(COMMONDIR)/Input/GestureDetector.cpp \ $(COMMONDIR)/Input/InputState.cpp \ $(COMMONDIR)/Math/curves.cpp \ @@ -180,6 +196,8 @@ SOURCES_CXX += \ $(COMMONDIR)/Net/Sinks.cpp \ $(COMMONDIR)/Net/URL.cpp \ $(COMMONDIR)/Net/WebsocketServer.cpp \ + $(COMMONDIR)/Render/DrawBuffer.cpp \ + $(COMMONDIR)/Render/TextureAtlas.cpp \ $(COMMONDIR)/Serialize/Serializer.cpp \ $(COMMONDIR)/Thread/Executor.cpp \ $(COMMONDIR)/Thread/ThreadUtil.cpp \ @@ -308,38 +326,28 @@ SOURCES_CXX += \ ifeq ($(PLATFORM_EXT), win32) SOURCES_CXX += $(COMMONDIR)/MemArenaWin32.cpp \ $(EXTDIR)/glslang/glslang/OSDependent/Windows/ossource.cpp \ - $(NATIVEDIR)/gfx_es2/draw_text_win.cpp + $(COMMONDIR)/Render/Text/draw_text_win.cpp else ifeq ($(PLATFORM_EXT), darwin) SOURCES_CXX += $(COMMONDIR)/MemArenaDarwin.cpp \ $(EXTDIR)/glslang/glslang/OSDependent/Unix/ossource.cpp else ifeq ($(PLATFORM_EXT), android) SOURCES_CXX += $(COMMONDIR)/MemArenaAndroid.cpp \ $(EXTDIR)/glslang/glslang/OSDependent/Unix/ossource.cpp \ - $(NATIVEDIR)/gfx_es2/draw_text_android.cpp + $(COMMONDIR)/Render/Text/draw_text_android.cpp else SOURCES_CXX += $(COMMONDIR)/MemArenaPosix.cpp \ $(EXTDIR)/glslang/glslang/OSDependent/Unix/ossource.cpp endif -SOURCES_CXX += $(NATIVEDIR)/gfx/gl_debug_log.cpp \ - $(NATIVEDIR)/gfx/texture_atlas.cpp \ - $(NATIVEDIR)/gfx/d3d9_shader.cpp \ - $(NATIVEDIR)/gfx/d3d9_state.cpp \ - $(NATIVEDIR)/gfx_es2/draw_buffer.cpp \ - $(NATIVEDIR)/gfx_es2/draw_text.cpp \ - $(NATIVEDIR)/gfx_es2/gpu_features.cpp \ - $(NATIVEDIR)/gfx_es2/glsl_program.cpp \ - $(NATIVEDIR)/thin3d/thin3d.cpp \ - $(NATIVEDIR)/thin3d/thin3d_gl.cpp \ - $(NATIVEDIR)/thin3d/GLRenderManager.cpp \ - $(NATIVEDIR)/thin3d/GLQueueRunner.cpp \ - $(NATIVEDIR)/thin3d/DataFormatGL.cpp \ +SOURCES_CXX += \ + $(COMMONDIR)/Render/Text/draw_text.cpp \ $(EXTDIR)/jpge/jpgd.cpp \ $(EXTDIR)/jpge/jpge.cpp \ $(COREDIR)/AVIDump.cpp \ $(COREDIR)/Config.cpp \ $(COREDIR)/TextureReplacer.cpp \ $(COREDIR)/Core.cpp \ + $(COREDIR)/KeyMap.cpp \ $(COREDIR)/WaveFile.cpp \ $(COREDIR)/KeyMap.cpp \ $(COREDIR)/FileLoaders/HTTPFileLoader.cpp \ @@ -630,14 +638,6 @@ SOURCES_C += \ $(EXTDIR)/miniupnp/miniupnpc/upnpreplyparse.c SOURCES_CXX += \ - $(COMMONDIR)/Vulkan/VulkanContext.cpp \ - $(COMMONDIR)/Vulkan/VulkanDebug.cpp \ - $(COMMONDIR)/Vulkan/VulkanImage.cpp \ - $(COMMONDIR)/Vulkan/VulkanLoader.cpp \ - $(COMMONDIR)/Vulkan/VulkanMemory.cpp \ - $(NATIVEDIR)/thin3d/thin3d_vulkan.cpp \ - $(NATIVEDIR)/thin3d/VulkanRenderManager.cpp \ - $(NATIVEDIR)/thin3d/VulkanQueueRunner.cpp \ $(GPUDIR)/Vulkan/DepalettizeShaderVulkan.cpp \ $(GPUDIR)/Vulkan/DrawEngineVulkan.cpp \ $(GPUDIR)/Vulkan/FragmentShaderGeneratorVulkan.cpp \ @@ -690,11 +690,10 @@ SOURCES_CXX += \ $(LIBRETRODIR)/LibretroD3D11Context.cpp SOURCES_CXX += \ - $(NATIVEDIR)/thin3d/thin3d_d3d9.cpp \ - $(NATIVEDIR)/thin3d/thin3d_d3d11.cpp \ - $(NATIVEDIR)/thin3d/d3dx9_loader.cpp \ - $(NATIVEDIR)/thin3d/d3d11_loader.cpp \ - $(NATIVEDIR)/thin3d/d3d9_d3dcompiler_loader.cpp + $(COMMONDIR)/GPU/D3D9/thin3d_d3d9.cpp \ + $(COMMONDIR)/GPU/D3D11/thin3d_d3d11.cpp \ + $(COMMONDIR)/GPU/D3D11/D3D11Loader.cpp \ + $(COMMONDIR)/GPU/D3D9/D3DCompilerLoader.cpp INCFLAGS += -I$(CORE_DIR)/dx9sdk/Include -I$(CORE_DIR)/dx9sdk/Include/DX11 diff --git a/macshaders.sh b/macshaders.sh deleted file mode 100644 index 19e8a352be..0000000000 --- a/macshaders.sh +++ /dev/null @@ -1,11 +0,0 @@ -# AWFUL way to make the shaders macosx compatible! - -cd assets/shaders -for i in *.vs *.fs -do - sed -i '' s/lowp\ //g $i - sed -i '' s/highp\ //g $i - sed -i '' s/mediump\ //g $i - sed -i '' s/#version\ 140//g $i -done -cd ../.. diff --git a/ppsspp_config.h b/ppsspp_config.h index 655e744f14..e429e629cb 100644 --- a/ppsspp_config.h +++ b/ppsspp_config.h @@ -123,10 +123,7 @@ #if PPSSPP_PLATFORM(WINDOWS) #if !PPSSPP_PLATFORM(UWP) #define PPSSPP_API_D3D9 1 - -// Comment this and uncomment PPSSPP_API_D3DX9 if D3DX9 is prefered. -#define PPSSPP_API_D3D9_D3DCOMPILER 1 -// #define PPSSPP_API_D3DX9 1 #endif #define PPSSPP_API_D3D11 1 #endif + diff --git a/unittest/UnitTests.vcxproj b/unittest/UnitTests.vcxproj index 86caf65925..a401a081b7 100644 --- a/unittest/UnitTests.vcxproj +++ b/unittest/UnitTests.vcxproj @@ -169,7 +169,7 @@ Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86/include;../ext;../common;..;../ext/glew;../ext/zlib true false false @@ -191,7 +191,7 @@ Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86_64/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86_64/include;../ext;../common;..;../ext/glew;../ext/zlib true false false @@ -214,7 +214,7 @@ Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/aarch64/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/aarch64/include;../ext;../common;..;../ext/glew;../ext/zlib true false false @@ -237,7 +237,7 @@ Level3 _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/arm/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/arm/include;../ext;../common;..;../ext/glew;../ext/zlib true false false @@ -264,7 +264,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86/include;../ext;../common;..;../ext/glew;../ext/zlib false Size true @@ -291,7 +291,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/x86_64/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/x86_64/include;../ext;../common;..;../ext/glew;../ext/zlib false true false @@ -320,7 +320,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/aarch64/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/aarch64/include;../ext;../common;..;../ext/glew;../ext/zlib false true false @@ -349,7 +349,7 @@ true true USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ffmpeg/Windows/arm/include;../ext;../common;..;../ext/native;../ext/glew;../ext/zlib + ../ffmpeg/Windows/arm/include;../ext;../common;..;../ext/glew;../ext/zlib false true false @@ -414,9 +414,6 @@ {457f45d2-556f-47bc-a31d-aff0d15beaed} - - {c4df647e-80ea-4111-a0a8-218b1b711e18} - {004b8d11-2be3-4bd9-ab40-2be04cf2096f} @@ -429,4 +426,4 @@ - \ No newline at end of file +