Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
Flyinghead 2023-05-13 15:23:42 +02:00
commit ac2637286b
17 changed files with 1955 additions and 80 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
custom: ['https://utip.io/flyinghead', 'https://www.paypal.com/paypalme/FlycastEmu']
custom: ['https://www.paypal.com/paypalme/FlycastEmu']

View File

@ -28,6 +28,11 @@
CORE_ARGS: -DLIBRETRO=ON -G Xcode -DCMAKE_BUILD_TYPE=Release
EXTRA_PATH: Release
.core-defs-ios-arm64:
extends: .core-defs
variables:
CORE_ARGS: -DLIBRETRO=ON -DCMAKE_BUILD_TYPE=Release
.core-defs-android:
extends: .core-defs
script:
@ -62,11 +67,19 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/android-cmake.yml'
# iOS arm64
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-cmake.yml'
################################## CONSOLES ################################
# Nintendo Switch
# - project: 'libretro-infrastructure/ci-templates'
# file: '/libnx-static.yml'
# tvOS arm64
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-cmake.yml'
# Stages for building
stages:
- build-prepare
@ -139,9 +152,20 @@ android-x86:
- .libretro-android-cmake-x86
- .core-defs-android
libretro-build-ios-arm64:
extends:
- .libretro-ios-cmake-arm64
- .core-defs-ios-arm64
################################### CONSOLES #################################
# Nintendo Switch
#libretro-build-libnx-aarch64:
# extends:
# - .libretro-libnx-static-retroarch-master
# - .core-defs
# tvOS arm64
libretro-build-tvos-arm64:
extends:
- .libretro-tvos-cmake-arm64
- .core-defs-ios-arm64

View File

@ -14,6 +14,9 @@ if(APPLE)
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum iOS deployment version")
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
elseif(CMAKE_SYSTEM_NAME STREQUAL tvOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum tvOS deployment version")
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum macOS deployment version")
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
@ -62,7 +65,7 @@ option(ENABLE_GDB_SERVER "Build with GDB debugging support" OFF)
option(ENABLE_DC_PROFILER "Build with support for target machine (SH4) profiler" OFF)
option(ENABLE_FC_PROFILER "Build with support for host app (Flycast) profiler" OFF)
if(IOS)
if(IOS AND NOT LIBRETRO)
set(USE_VULKAN OFF CACHE BOOL "Force vulkan off" FORCE)
endif()
@ -128,11 +131,17 @@ if(NINTENDO_SWITCH)
elseif(LIBRETRO)
add_library(${PROJECT_NAME} SHARED core/emulator.cpp)
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
if(NOT IOS)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/shell/libretro/libretro.osx.def")
else()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "flycast_libretro")
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "flycast_libretro"
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(${PROJECT_NAME} PRIVATE LIBRETRO)
@ -140,6 +149,11 @@ elseif(LIBRETRO)
target_compile_definitions(${PROJECT_NAME} PRIVATE GLES GLES3 HAVE_OPENGLES HAVE_OPENGLES3)
find_library(GLES3_LIBRARIES NAMES GLESv3 GLESv2 NO_CACHE REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ${GLES3_LIBRARIES})
elseif(IOS)
target_compile_definitions(${PROJECT_NAME} PRIVATE GLES GLES3 HAVE_OPENGLES HAVE_OPENGLES3)
find_library(OPENGLES OpenGLES)
find_library(GLKIT GLKit)
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGLES} ${GLKIT})
elseif(USE_GLES2)
target_compile_definitions(${PROJECT_NAME} PRIVATE GLES GLES2 HAVE_OPENGLES HAVE_OPENGLES2)
if(USE_VIDEOCORE)
@ -719,7 +733,7 @@ if(LIBRETRO)
target_sources(${PROJECT_NAME} PRIVATE
core/deps/libretro-common/glsm/glsm.c
core/deps/libretro-common/glsym/rglgen.c)
if(ANDROID OR USE_GLES)
if(ANDROID OR IOS OR USE_GLES)
target_sources(${PROJECT_NAME} PRIVATE core/deps/libretro-common/glsym/glsym_es3.c)
elseif(USE_GLES2)
target_sources(${PROJECT_NAME} PRIVATE core/deps/libretro-common/glsym/glsym_es2.c)

View File

@ -1767,6 +1767,39 @@ enum retro_mod
* (see enum retro_savestate_context)
*/
#define RETRO_ENVIRONMENT_GET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_SUPPORT (73 | RETRO_ENVIRONMENT_EXPERIMENTAL)
/* struct retro_hw_render_context_negotiation_interface * --
* Before calling SET_HW_RNEDER_CONTEXT_NEGOTIATION_INTERFACE, a core can query
* which version of the interface is supported.
*
* Frontend looks at interface_type and returns the maximum supported
* context negotiation interface version.
* If the interface_type is not supported or recognized by the frontend, a version of 0
* must be returned in interface_version and true is returned by frontend.
*
* If this environment call returns true with interface_version greater than 0,
* a core can always use a negotiation interface version larger than what the frontend returns, but only
* earlier versions of the interface will be used by the frontend.
* A frontend must not reject a negotiation interface version that is larger than
* what the frontend supports. Instead, the frontend will use the older entry points that it recognizes.
* If this is incompatible with a particular core's requirements, it can error out early.
*
* Backwards compatibility note:
* This environment call was introduced after Vulkan v1 context negotiation.
* If this environment call is not supported by frontend - i.e. the environment call returns false -
* only Vulkan v1 context negotiation is supported (if Vulkan HW rendering is supported at all).
* If a core uses Vulkan negotiation interface with version > 1, negotiation may fail unexpectedly.
* All future updates to the context negotiation interface implies that frontend must support
* this environment call to query support.
*/
#define RETRO_ENVIRONMENT_GET_JIT_CAPABLE 74
/* bool * --
* Result is set to true if the frontend has already verified JIT can be
* used, mainly for use iOS/tvOS. On other platforms the result is true.
*/
/* VFS functionality */
/* File paths:

View File

@ -388,9 +388,9 @@ static void loadSpecialSettings()
void dc_reset(bool hard)
{
NetworkHandshake::term();
if (hard)
{
NetworkHandshake::term();
memwatch::unprotect();
memwatch::reset();
}

View File

@ -32,6 +32,7 @@
#ifndef NDEBUG
#include "oslib/oslib.h"
#endif
#include <cassert>
#define MODEM_COUNTRY_RES 0
#define MODEM_COUNTRY_JAP 1
@ -53,6 +54,8 @@ const static u32 MODEM_ID[2] =
static modemreg_t modem_regs;
static u8 dspram[0x1000];
static_assert(sizeof(regs_write_mask) == sizeof(modem_regs));
static_assert(sizeof(por_dspram) == sizeof(dspram));
static int modem_sched;
@ -345,10 +348,7 @@ static void schedule_callback(int ms)
static void NormalDefaultRegs()
{
verify(state == MS_NORMAL);
verify(sizeof(regs_write_mask) == sizeof(modem_regs));
verify(sizeof(por_dspram) == sizeof(dspram));
assert(state == MS_NORMAL);
// Default values for normal state
memset(&modem_regs, 0, sizeof(modem_regs));
memcpy(dspram, por_dspram, sizeof(dspram));
@ -369,16 +369,16 @@ static void NormalDefaultRegs()
}
static void DSPTestEnd()
{
verify(state==MS_END_DSP);
state=MS_NORMAL;
assert(state == MS_END_DSP);
state = MS_NORMAL;
LOG("DSPTestEnd");
NormalDefaultRegs();
}
static void DSPTestStart()
{
verify(state==MS_ST_DSP);
state=MS_END_DSP;
assert(state == MS_ST_DSP);
state = MS_END_DSP;
LOG("DSPTestStart");
modem_regs.reg1e.TDBE = 1;
@ -393,8 +393,8 @@ static void DSPTestStart()
}
static void ControllerTestEnd()
{
verify(state==MS_ST_CONTROLER);
state=MS_ST_DSP;
assert(state == MS_ST_CONTROLER);
state = MS_ST_DSP;
schedule_callback(50);
}
@ -402,13 +402,13 @@ static void ControllerTestEnd()
//End the reset and start internal tests
static void ControllerTestStart()
{
verify(state==MS_RESETING);
assert(state == MS_RESETING);
//Set Self test values :)
state=MS_ST_CONTROLER;
state = MS_ST_CONTROLER;
//k, lets set values
//1E:3 -> set
modem_regs.reg1e.TDBE=1;
modem_regs.reg1e.TDBE = 1;
/*
RAM1 Checksum = 0xEA3C or 0x451
@ -419,13 +419,13 @@ static void ControllerTestStart()
Part Number = 0x3730 or 0x3731
Revision Level = 0x4241
*/
SetReg16(0x1D,0x1C,0xEA3C);
SetReg16(0x1B,0x1A,0x5536);
SetReg16(0x19,0x18,0x5F4C);
SetReg16(0x17,0x16,0x3835);
SetReg16(0x15,0x14,0x801);
SetReg16(0x13,0x12,0x3730);
SetReg16(0x11,0x0,0x4241);
SetReg16(0x1D, 0x1C, 0xEA3C);
SetReg16(0x1B, 0x1A, 0x5536);
SetReg16(0x19, 0x18, 0x5F4C);
SetReg16(0x17, 0x16, 0x3835);
SetReg16(0x15, 0x14, 0x801);
SetReg16(0x13, 0x12, 0x3730);
SetReg16(0x11, 0x0, 0x4241);
ControllerTestEnd();
}
@ -492,9 +492,9 @@ static void ModemNormalWrite(u32 reg, u32 data)
case 0x06:
LOG("PEN = %d", modem_regs.reg06.PEN);
if (modem_regs.reg06.PEN)
die("PEN = 1");
WARN_LOG(MODEM, "Parity not supported");
if (modem_regs.reg06.HDLC)
die("HDLC = 1");
WARN_LOG(MODEM, "HDLC mode not supported");
break;
case 0x08:
@ -572,7 +572,8 @@ static void ModemNormalWrite(u32 reg, u32 data)
break;
case 0x1a:
verify(connect_state != CONNECTED || !modem_regs.reg1a.SCIBE);
if (connect_state == CONNECTED && modem_regs.reg1a.SCIBE)
WARN_LOG(MODEM, "Unexpected state: connected and SCIBE==1");
break;
//Address low

View File

@ -411,7 +411,13 @@ retry_ITLB_Match:
if (*tlb_entry_ret == nullptr)
{
verify(mmach == false);
#ifndef FAST_MMU
verify(!mmach);
#else
// the matching may be approximative
if (mmach)
return MmuError::TLB_MISS;
#endif
const TLB_Entry *tlb_entry;
MmuError lookup = mmu_full_lookup(va, &tlb_entry, rv);
if (lookup != MmuError::NONE)

View File

@ -548,6 +548,17 @@ void ngen_CC_Call(shil_opcode* op, void* function)
fd = SRegister(fd.GetCode() + 1);
}
call(function);
for (const CC_PS& ccParam : CC_pars)
{
const shil_param& prm = *ccParam.par;
if (ccParam.type == CPT_ptr && prm.count() == 2 && reg.IsAllocf(prm) && (op->rd._reg == prm._reg || op->rd2._reg == prm._reg))
{
// fsca rd param is a pointer to a 64-bit reg so reload the regs if allocated
const int shRegOffs = (u8*)GetRegPtr(prm._reg) - (u8*)&p_sh4rcb->cntx - sizeof(Sh4cntx);
ass.Vldr(reg.mapFReg(prm, 0), MemOperand(r8, shRegOffs));
ass.Vldr(reg.mapFReg(prm, 1), MemOperand(r8, shRegOffs + 4));
}
}
}
void ngen_CC_Finish(shil_opcode* op)
@ -1366,8 +1377,23 @@ static void ngen_compile_opcode(RuntimeBlockInfo* block, shil_opcode* op, bool o
if (reg.IsAllocf(op->rd))
{
verify(reg.IsAllocf(op->rs1));
ass.Vmov(reg.mapFReg(op->rd, 0), reg.mapFReg(op->rs1, 0));
ass.Vmov(reg.mapFReg(op->rd, 1), reg.mapFReg(op->rs1, 1));
SRegister rd0 = reg.mapFReg(op->rd, 0);
SRegister rs0 = reg.mapFReg(op->rs1, 0);
SRegister rd1 = reg.mapFReg(op->rd, 1);
SRegister rs1 = reg.mapFReg(op->rs1, 1);
if (rd0.Is(rs1))
{
ass.Vmov(s0, rd0);
ass.Vmov(rd0, rs0);
ass.Vmov(rd1, s0);
}
else
{
if (!rd0.Is(rs0))
ass.Vmov(rd0, rs0);
if (!rd1.Is(rs1))
ass.Vmov(rd1, rs1);
}
}
else
{

View File

@ -391,12 +391,21 @@ public:
{
const VRegister& rd0 = regalloc.MapVRegister(op.rd, 0);
const VRegister& rs0 = regalloc.MapVRegister(op.rs1, 0);
if (!rd0.Is(rs0))
Fmov(rd0, rs0);
const VRegister& rd1 = regalloc.MapVRegister(op.rd, 1);
const VRegister& rs1 = regalloc.MapVRegister(op.rs1, 1);
if (!rd1.Is(rs1))
Fmov(rd1, rs1);
if (rd0.Is(rs1))
{
Fmov(w0, rd0);
Fmov(rd0, rs0);
Fmov(rd1, w0);
}
else
{
if (!rd0.Is(rs0))
Fmov(rd0, rs0);
if (!rd1.Is(rs1))
Fmov(rd1, rs1);
}
}
}
break;
@ -1075,6 +1084,16 @@ public:
}
}
GenCallRuntime((void (*)())function);
for (const CC_PS& ccParam : CC_pars)
{
const shil_param& prm = *ccParam.prm;
if (ccParam.type == CPT_ptr && prm.count() == 2 && regalloc.IsAllocf(prm) && (op->rd._reg == prm._reg || op->rd2._reg == prm._reg))
{
// fsca rd param is a pointer to a 64-bit reg so reload the regs if allocated
Ldr(regalloc.MapVRegister(prm, 0), sh4_context_mem_operand(GetRegPtr(prm._reg)));
Ldr(regalloc.MapVRegister(prm, 1), sh4_context_mem_operand(GetRegPtr(prm._reg + 1)));
}
}
}
MemOperand sh4_context_mem_operand(void *p)

View File

@ -219,14 +219,23 @@ public:
mov(rcx, (uintptr_t)op.rd.reg_ptr());
mov(qword[rcx], rax);
#else
Xbyak::Xmm rd = regalloc.MapXRegister(op.rd, 0);
Xbyak::Xmm rs = regalloc.MapXRegister(op.rs1, 0);
if (rd != rs)
movss(rd, rs);
rd = regalloc.MapXRegister(op.rd, 1);
rs = regalloc.MapXRegister(op.rs1, 1);
if (rd != rs)
movss(rd, rs);
Xbyak::Xmm rd0 = regalloc.MapXRegister(op.rd, 0);
Xbyak::Xmm rs0 = regalloc.MapXRegister(op.rs1, 0);
Xbyak::Xmm rd1 = regalloc.MapXRegister(op.rd, 1);
Xbyak::Xmm rs1 = regalloc.MapXRegister(op.rs1, 1);
if (rd0 == rs1)
{
movss(xmm0, rd0);
movss(rd0, rs0);
movss(rd1, xmm0);
}
else
{
if (rd0 != rs0)
movss(rd0, rs0);
if (rd1 != rs1)
movss(rd1, rs1);
}
#endif
}
break;
@ -261,7 +270,10 @@ public:
}
else
#endif
host_reg_to_shil_param(op.rd, rax);
{
mov(rcx, rax);
host_reg_to_shil_param(op.rd, rcx);
}
}
break;
@ -543,7 +555,6 @@ public:
}
break;
// store from EAX
case CPT_u64rvL:
case CPT_u32rv:
@ -587,16 +598,28 @@ public:
//push the ptr itself
case CPT_ptr:
verify(prm.is_reg());
mov(call_regs64[regused++], (size_t)prm.reg_ptr());
break;
default:
// Other cases handled in ngen_CC_param
break;
}
}
GenCall((void (*)())function);
#if ALLOC_F64 == true
for (const CC_PS& ccParam : CC_pars)
{
const shil_param& prm = *ccParam.prm;
if (ccParam.type == CPT_ptr && prm.count() == 2 && regalloc.IsAllocf(prm) && (op.rd._reg == prm._reg || op.rd2._reg == prm._reg)) {
// fsca rd param is a pointer to a 64-bit reg so reload the regs if allocated
mov(rax, (size_t)GetRegPtr(prm._reg));
movss(regalloc.MapXRegister(prm, 0), dword[rax]);
mov(rax, (size_t)GetRegPtr(prm._reg + 1));
movss(regalloc.MapXRegister(prm, 1), dword[rax]);
}
}
#endif
}
void RegPreload(u32 reg, Xbyak::Operand::Code nreg)
@ -923,7 +946,8 @@ private:
die("Invalid immediate size");
break;
}
host_reg_to_shil_param(op.rd, eax);
mov(ecx, eax);
host_reg_to_shil_param(op.rd, ecx);
}
}

View File

@ -310,16 +310,14 @@ struct DX11OITRenderer : public DX11Renderer
else
zfunc = gp->isp.DepthMode;
bool zwriteEnable = false;
if (pass == DX11OITShaders::Depth || pass == DX11OITShaders::Color)
{
// Z Write Disable seems to be ignored for punch-through.
// Fixes Worms World Party, Bust-a-Move 4 and Re-Volt
if (Type == ListType_Punch_Through)
zwriteEnable = true;
else
zwriteEnable = !gp->isp.ZWriteDis;
}
bool zwriteEnable;
// Z Write Disable seems to be ignored for punch-through.
// Fixes Worms World Party, Bust-a-Move 4 and Re-Volt
if (Type == ListType_Punch_Through)
zwriteEnable = true;
else
zwriteEnable = !gp->isp.ZWriteDis;
bool needStencil = config::ModifierVolumes && pass == DX11OITShaders::Depth && Type != ListType_Translucent;
const u32 stencil = (gp->pcw.Shadow != 0) ? 0x80 : 0;
deviceContext->OMSetDepthStencilState(depthStencilStates.getState(true, zwriteEnable, zfunc, needStencil), stencil);
@ -533,8 +531,8 @@ struct DX11OITRenderer : public DX11Renderer
// PASS 1: Geometry pass to update depth and stencil
//
// unbind depth/stencil
ID3D11ShaderResourceView *p = nullptr;
deviceContext->PSSetShaderResources(4, 1, &p);
ID3D11ShaderResourceView * const nullView = nullptr;
deviceContext->PSSetShaderResources(4, 1, &nullView);
// disable color writes
deviceContext->OMSetBlendState(blendStates.getState(false, 0, 0, true), nullptr, 0xffffffff);
deviceContext->OMSetRenderTargetsAndUnorderedAccessViews(1, &opaqueRenderTarget.get(), depthStencilView2, 0, D3D11_KEEP_UNORDERED_ACCESS_VIEWS, nullptr, nullptr);
@ -557,22 +555,22 @@ struct DX11OITRenderer : public DX11Renderer
//
if (current_pass.autosort)
{
deviceContext->PSSetShaderResources(4, 1, &nullView);
deviceContext->OMSetRenderTargetsAndUnorderedAccessViews(1, &opaqueRenderTarget.get(), depthTexView, 0, D3D11_KEEP_UNORDERED_ACCESS_VIEWS, nullptr, nullptr);
deviceContext->PSSetShaderResources(4, 1, &depthView.get());
// disable color writes
deviceContext->OMSetBlendState(blendStates.getState(false, 0, 0, true), nullptr, 0xffffffff);
drawList<ListType_Translucent, true, DX11OITShaders::OIT>(pvrrc.global_param_tr, previous_pass.tr_count, tr_count);
// unbind depth tex
deviceContext->PSSetShaderResources(4, 1, &nullView);
if (render_pass < render_pass_count - 1)
{
//
// PASS 3b: Geometry pass with TR to update the depth for the next TA render pass
//
ID3D11ShaderResourceView *p = nullptr;
deviceContext->PSSetShaderResources(4, 1, &p);
deviceContext->OMSetRenderTargetsAndUnorderedAccessViews(1, &opaqueRenderTarget.get(), depthTexView, 0, D3D11_KEEP_UNORDERED_ACCESS_VIEWS, nullptr, nullptr);
deviceContext->OMSetRenderTargetsAndUnorderedAccessViews(1, &opaqueRenderTarget.get(), depthStencilView2, 0, D3D11_KEEP_UNORDERED_ACCESS_VIEWS, nullptr, nullptr);
drawList<ListType_Translucent, true, DX11OITShaders::Depth>(pvrrc.global_param_tr, previous_pass.tr_count, tr_count);
}
ID3D11ShaderResourceView *p = nullptr;
deviceContext->PSSetShaderResources(4, 1, &p);
if (!theDX11Context.isIntel())
{
// Intel Iris Plus 640 just crashes
@ -584,8 +582,7 @@ struct DX11OITRenderer : public DX11Renderer
}
else
{
ID3D11ShaderResourceView *p = nullptr;
deviceContext->PSSetShaderResources(4, 1, &p);
deviceContext->PSSetShaderResources(4, 1, &nullView);
drawList<ListType_Translucent, false, DX11OITShaders::Color>(pvrrc.global_param_tr, previous_pass.tr_count, tr_count);
}
if (render_pass < render_pass_count - 1)
@ -608,7 +605,7 @@ struct DX11OITRenderer : public DX11Renderer
std::swap(opaqueTex, multipassTex);
std::swap(opaqueRenderTarget, multipassRenderTarget);
std::swap(opaqueTextureView, multipassTextureView);
deviceContext->PSSetShaderResources(0, 1, &p);
deviceContext->PSSetShaderResources(0, 1, &nullView);
deviceContext->IASetInputLayout(mainInputLayout);
// Clear the stencil from this pass
@ -626,7 +623,10 @@ struct DX11OITRenderer : public DX11Renderer
bool Render() override
{
resize(pvrrc.framebufferWidth, pvrrc.framebufferHeight);
bool is_rtt = pvrrc.isRTT;
if (!is_rtt)
resize(pvrrc.framebufferWidth, pvrrc.framebufferHeight);
if (pixelBufferSize != config::PixelBufferSize)
{
buffers.init(device, deviceContext);
@ -640,8 +640,6 @@ struct DX11OITRenderer : public DX11Renderer
deviceContext->OMSetRenderTargets(1, &fbRenderTarget.get(), nullptr);
configVertexShader();
bool is_rtt = pvrrc.isRTT;
deviceContext->IASetInputLayout(mainInputLayout);
n2Helper.resetCache();

View File

@ -1983,7 +1983,7 @@ static void gui_display_settings()
ImGui::SameLine();
ShowHelpMarker("Internal render resolution. Higher is better, but more demanding on the GPU. Values higher than your display resolution (but no more than double your display resolution) can be used for supersampling, which provides high-quality antialiasing without reducing sharpness.");
OptionSlider("Horizontal Stretching", config::ScreenStretching, 100, 150,
OptionSlider("Horizontal Stretching", config::ScreenStretching, 100, 250,
"Stretch the screen horizontally");
OptionArrowButtons("Frame Skipping", config::SkipFrame, 0, 6,
"Number of frames to skip between two actually rendered frames");

View File

@ -63,7 +63,9 @@ public:
if (allocInfo.pMappedData != nullptr)
return allocInfo.pMappedData;
void *p;
vmaMapMemory(allocator, allocation, &p);
VkResult res = vmaMapMemory(allocator, allocation, &p);
if (res != VK_SUCCESS)
vk::throwResultException((vk::Result)res, "vmaMapMemory failed");
VkMemoryPropertyFlags flags;
vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &flags);
if ((flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) && (flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0)

View File

@ -18,6 +18,10 @@
*/
#pragma once
#if defined(LIBRETRO) && (defined(HAVE_OPENGL) || defined(HAVE_OPENGLES))
#if defined(TARGET_IPHONE) //apple-specific ogles3 headers
#include <OpenGLES/ES3/gl.h>
#include <OpenGLES/ES3/glext.h>
#endif
#include "gl_context.h"
#include <libretro.h>
#include <glsm/glsm.h>

View File

@ -1797,6 +1797,16 @@ static bool set_dx11_hw_render()
// Loading/unloading games
bool retro_load_game(const struct retro_game_info *game)
{
#if defined(IOS)
bool can_jit;
if (environ_cb(RETRO_ENVIRONMENT_GET_JIT_CAPABLE, &can_jit) && !can_jit) {
// jit is required both for performance and for audio. trying to run
// without the jit will cause a crash.
gui_display_notification("Cannot run without JIT", 5000);
return false;
}
#endif
NOTICE_LOG(BOOT, "retro_load_game: %s", game->path);
extract_basename(g_base_name, game->path, sizeof(g_base_name));

View File

@ -0,0 +1,27 @@
#LIBRARY "libretro"
#EXPORTS
_retro_set_environment
_retro_set_video_refresh
_retro_set_audio_sample
_retro_set_audio_sample_batch
_retro_set_input_poll
_retro_set_input_state
_retro_init
_retro_deinit
_retro_api_version
_retro_get_system_info
_retro_get_system_av_info
_retro_set_controller_port_device
_retro_reset
_retro_run
_retro_serialize_size
_retro_serialize
_retro_unserialize
_retro_cheat_reset
_retro_cheat_set
_retro_load_game
_retro_load_game_special
_retro_unload_game
_retro_get_region
_retro_get_memory_data
_retro_get_memory_size

File diff suppressed because it is too large Load Diff