From 9ee6203545a04daa0f49f55aa580883a75aad065 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Mon, 29 Oct 2018 21:38:21 -0500 Subject: [PATCH 1/5] Squash of a few libretro makeile fixes Fix https://github.com/libretro/ppsspp/issues/5#issuecomment-383238875 Add missing file Bump this, in case you are building without .git/ folder Libretro: remove override directive. (#4) --- libretro/Makefile | 4 ++-- libretro/Makefile.common | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libretro/Makefile b/libretro/Makefile index 4fdb2ea929..8970ddc036 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -15,9 +15,9 @@ ifeq (,$(TARGET_ARCH)) endif ifneq (,$(findstring 64,$(TARGET_ARCH))) - override TARGET_ARCH := x86_64 + TARGET_ARCH := x86_64 else ifneq (,$(findstring 86,$(TARGET_ARCH))) - override TARGET_ARCH := x86 + TARGET_ARCH := x86 endif ifeq ($(platform),) diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 3bc9ab9726..f127fab167 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -216,6 +216,7 @@ SOURCES_CXX += \ $(EXTDIR)/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp \ + $(EXTDIR)/glslang/glslang/MachineIndependent/attribute.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/Constant.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/InfoSink.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/Initialize.cpp \ @@ -409,6 +410,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/dataconv.cpp \ $(COREDIR)/HLE/sceSsl.cpp \ $(COREDIR)/HLE/sceUmd.cpp \ $(COREDIR)/HLE/sceUsb.cpp \ + $(COREDIR)/HLE/sceUsbAcc.cpp \ $(COREDIR)/HLE/sceUsbCam.cpp \ $(COREDIR)/HLE/sceUtility.cpp \ $(COREDIR)/HLE/sceVaudio.cpp \ @@ -454,6 +456,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/dataconv.cpp \ $(COREDIR)/MemMap.cpp \ $(COREDIR)/MemMapFunctions.cpp \ $(COREDIR)/PSPLoaders.cpp \ + $(COREDIR)/Replay.cpp \ $(COREDIR)/Reporting.cpp \ $(COREDIR)/SaveState.cpp \ $(COREDIR)/Screenshot.cpp \ @@ -675,7 +678,7 @@ SOURCES_C += \ endif GIT_VERSION_SRC = $(CORE_DIR)/git-version.cpp -GIT_VERSION := $(shell git describe --always || echo v1.4.2-git) +GIT_VERSION := $(shell git describe --always || echo v1.7.0-git) GIT_VERSION_NO_UPDATE = $(findstring 1,$(shell grep -s PPSSPP_GIT_VERSION_NO_UPDATE $(GIT_VERSION_SRC))) ifneq (,$(findstring $(GIT_VERSION),$(shell grep -s char $(GIT_VERSION_SRC)))) GIT_VERSION_NO_UPDATE = 1 From b296bc1802d8ea87684dc4bb5e0596947f34698c Mon Sep 17 00:00:00 2001 From: hunterk Date: Sat, 21 Apr 2018 14:58:10 -0500 Subject: [PATCH 2/5] add texture filtering core option --- libretro/libretro.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index cca5331e86..b9ab47c66a 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -178,6 +178,7 @@ static RetroOption ppsspp_fast_memory("ppsspp_fast_memory", "Fast Memory ( static RetroOption ppsspp_block_transfer_gpu("ppsspp_block_transfer_gpu", "Block Transfer GPU", true); static RetroOption ppsspp_texture_scaling_level("ppsspp_texture_scaling_level", "Texture Scaling Level", { { "1", 1 }, { "2", 2 }, { "3", 3 }, { "4", 4 }, { "5", 5 }, { "0", 0 } }); static RetroOption ppsspp_texture_scaling_type("ppsspp_texture_scaling_type", "Texture Scaling Type", { { "xbrz", TextureScalerCommon::XBRZ }, { "hybrid", TextureScalerCommon::HYBRID }, { "bicubic", TextureScalerCommon::BICUBIC }, { "hybrid_bicubic", TextureScalerCommon::HYBRID_BICUBIC } }); +static RetroOption ppsspp_texture_filtering("ppsspp_texture_filtering", "Texture Filtering", { { "auto", 1 }, { "nearest", 2 }, { "linear", 3 }, { "linear(FMV)", 4 } }); static RetroOption ppsspp_texture_anisotropic_filtering("ppsspp_texture_anisotropic_filtering", "Anisotropic Filtering", { "off", "1x", "2x", "4x", "8x", "16x" }); static RetroOption ppsspp_texture_deposterize("ppsspp_texture_deposterize", "Texture Deposterize", false); static RetroOption ppsspp_gpu_hardware_transform("ppsspp_gpu_hardware_transform", "GPU Hardware T&L", true); @@ -204,6 +205,7 @@ void retro_set_environment(retro_environment_t cb) { vars.push_back(ppsspp_block_transfer_gpu.GetOptions()); vars.push_back(ppsspp_texture_scaling_level.GetOptions()); vars.push_back(ppsspp_texture_scaling_type.GetOptions()); + vars.push_back(ppsspp_texture_filtering.GetOptions()); vars.push_back(ppsspp_texture_anisotropic_filtering.GetOptions()); vars.push_back(ppsspp_texture_deposterize.GetOptions()); vars.push_back(ppsspp_gpu_hardware_transform.GetOptions()); @@ -268,6 +270,7 @@ static void check_variables(CoreParameter &coreParam) { ppsspp_true_color.Update(&g_Config.bTrueColor); ppsspp_auto_frameskip.Update(&g_Config.bAutoFrameSkip); ppsspp_block_transfer_gpu.Update(&g_Config.bBlockTransferGPU); + ppsspp_texture_filtering.Update(&g_Config.iTexFiltering); ppsspp_texture_anisotropic_filtering.Update(&g_Config.iAnisotropyLevel); ppsspp_texture_deposterize.Update(&g_Config.bTexDeposterize); ppsspp_separate_io_thread.Update(&g_Config.bSeparateIOThread); From 157b4aa7bf7af5631b7511b781c89bed617b1991 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Sat, 27 Oct 2018 20:52:54 -0500 Subject: [PATCH 3/5] Add texture replacement option This allows use of texture packs placed in $savedir/PSP/TEXTURES --- libretro/libretro.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index b9ab47c66a..3c656fe55b 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -181,6 +181,7 @@ static RetroOption ppsspp_texture_scaling_type("ppsspp_texture_scaling_type static RetroOption ppsspp_texture_filtering("ppsspp_texture_filtering", "Texture Filtering", { { "auto", 1 }, { "nearest", 2 }, { "linear", 3 }, { "linear(FMV)", 4 } }); static RetroOption ppsspp_texture_anisotropic_filtering("ppsspp_texture_anisotropic_filtering", "Anisotropic Filtering", { "off", "1x", "2x", "4x", "8x", "16x" }); static RetroOption ppsspp_texture_deposterize("ppsspp_texture_deposterize", "Texture Deposterize", false); +static RetroOption ppsspp_texture_replacement("ppsspp_texture_replacement", "Texture Replacement", false); static RetroOption ppsspp_gpu_hardware_transform("ppsspp_gpu_hardware_transform", "GPU Hardware T&L", true); static RetroOption ppsspp_vertex_cache("ppsspp_vertex_cache", "Vertex Cache (Speedhack)", true); static RetroOption ppsspp_separate_io_thread("ppsspp_separate_io_thread", "IO Threading", false); @@ -208,6 +209,7 @@ void retro_set_environment(retro_environment_t cb) { vars.push_back(ppsspp_texture_filtering.GetOptions()); vars.push_back(ppsspp_texture_anisotropic_filtering.GetOptions()); vars.push_back(ppsspp_texture_deposterize.GetOptions()); + vars.push_back(ppsspp_texture_replacement.GetOptions()); vars.push_back(ppsspp_gpu_hardware_transform.GetOptions()); vars.push_back(ppsspp_vertex_cache.GetOptions()); vars.push_back(ppsspp_separate_io_thread.GetOptions()); @@ -273,6 +275,7 @@ static void check_variables(CoreParameter &coreParam) { ppsspp_texture_filtering.Update(&g_Config.iTexFiltering); ppsspp_texture_anisotropic_filtering.Update(&g_Config.iAnisotropyLevel); ppsspp_texture_deposterize.Update(&g_Config.bTexDeposterize); + ppsspp_texture_replacement.Update(&g_Config.bReplaceTextures); ppsspp_separate_io_thread.Update(&g_Config.bSeparateIOThread); ppsspp_unsafe_func_replacements.Update(&g_Config.bFuncReplacements); ppsspp_sound_speedhack.Update(&g_Config.bSoundSpeedHack); From d66f1b03721312ec2f5d2eaaf0b24c5d50be9b54 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Oct 2018 21:54:42 -0500 Subject: [PATCH 4/5] Libretro d3d11 build fix --- libretro/LibretroD3D11Context.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretro/LibretroD3D11Context.cpp b/libretro/LibretroD3D11Context.cpp index 7e6a939d7c..cd46e66858 100644 --- a/libretro/LibretroD3D11Context.cpp +++ b/libretro/LibretroD3D11Context.cpp @@ -1,4 +1,5 @@ +#include "Core/ConfigValues.h" #include "libretro/LibretroD3D11Context.h" #include "thin3d/d3d11_loader.h" #include @@ -17,6 +18,8 @@ bool LibretroD3D11Context::Init() { } void LibretroD3D11Context::CreateDrawContext() { + std::vector adapterNames; + if (!Libretro::environ_cb(RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE, (void **)&d3d11_) || !d3d11_) { ERROR_LOG(G3D, "Failed to get HW rendering interface!\n"); return; @@ -35,7 +38,7 @@ void LibretroD3D11Context::CreateDrawContext() { ID3D11DeviceContext1 *context1 = nullptr; d3d11_->context->QueryInterface(__uuidof(ID3D11DeviceContext1), (void **)&context1); - draw_ = Draw::T3DCreateD3D11Context(d3d11_->device, d3d11_->context, device1, context1, d3d11_->featureLevel, NULL); + draw_ = Draw::T3DCreateD3D11Context(d3d11_->device, d3d11_->context, device1, context1, d3d11_->featureLevel, NULL, adapterNames); } void LibretroD3D11Context::DestroyDrawContext() { From d9198ff039302353a6a56dbec4f34534a191da2c Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Tue, 30 Oct 2018 17:57:54 -0500 Subject: [PATCH 5/5] Fix libretro Windows build 1103acd added a reference to std::vector without adding the include --- Common/OSVersion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/OSVersion.cpp b/Common/OSVersion.cpp index eb65b3fabf..1103fb8ad6 100644 --- a/Common/OSVersion.cpp +++ b/Common/OSVersion.cpp @@ -7,6 +7,7 @@ #endif #include +#include #include "OSVersion.h" #include "Common/CommonWindows.h"