Compare commits

...

5 Commits

Author SHA1 Message Date
lightningterror
17bf27c018 GS/DX12: Copy/bind rt when tex is fb on slot 0. 2025-04-19 17:05:22 +02:00
lightningterror
80ca5ea5fd GS/HW: Rename GSC_Tekken5 to GSC_NamcoGames.
Multiple games use it.
2025-04-19 16:52:26 +02:00
lightningterror
3afa9ca403 VMManager: Add available ram info in log. 2025-04-19 13:41:41 +02:00
lightningterror
842190e15e CDVD: Adjust ram requirements when precaching on linux/Mac. 2025-04-19 13:41:41 +02:00
PCSX2 Bot
717775d9ab [ci skip] Qt: Update Base Translation. 2025-04-19 05:39:57 +02:00
11 changed files with 69 additions and 53 deletions

View File

@@ -1274,7 +1274,7 @@ SCAJ-10015:
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
textureInsideRT: 1 # Fixes post effects.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SCAJ-20001:
name: "Ratchet & Clank"
region: "NTSC-Unk"
@@ -1987,7 +1987,7 @@ SCAJ-20125:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCAJ-20126:
name: "Tekken 5"
region: "NTSC-Unk"
@@ -1998,7 +1998,7 @@ SCAJ-20126:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCAJ-20127:
name: "EyeToy - Play 2 [with Camera]"
region: "NTSC-Unk"
@@ -2248,7 +2248,7 @@ SCAJ-20163:
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
autoFlush: 2 # Fixes post lighting.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SCAJ-20164:
name: "Kingdom Hearts II"
region: "NTSC-Unk"
@@ -2477,7 +2477,7 @@ SCAJ-20199:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCAJ-25002:
name: "Shinobi"
region: "NTSC-Unk"
@@ -4188,7 +4188,7 @@ SCED-53538:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCED-53611:
name: "Official PlayStation 2 Magazine - German Kids Special"
region: "PAL-G"
@@ -5827,7 +5827,7 @@ SCES-53202:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCES-53247:
name: "WRC Rally Evolved"
region: "PAL-M8"
@@ -7285,7 +7285,7 @@ SCKA-20049:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCKA-20050:
name: "Tales of Legendia"
region: "NTSC-K"
@@ -7512,7 +7512,7 @@ SCKA-20081:
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SCKA-20082:
name: "Ace Combat 5 - The Unsung War [PlayStation 2 Big Hit Series]"
region: "NTSC-K"
@@ -54888,7 +54888,7 @@ SLPS-20485:
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
textureInsideRT: 1 # Fixes post effects.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SLPS-20486:
name: "太鼓の達人 ドカッ!と大盛り七代目 [ソフト単体]"
name-sort: "たいこのたつじん どかっ!とおおもりななだいめ [そふとたんたい]"
@@ -54897,7 +54897,7 @@ SLPS-20486:
gsHWFixes:
alignSprite: 1 # Fixes vertical lines.
textureInsideRT: 1 # Fixes post effects.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SLPS-20487:
name: "パチスロキング! 科学忍者隊ガッチャマン"
name-sort: "ぱちすろきんぐ! かがくにんじゃたいがっちゃまん"
@@ -58043,7 +58043,7 @@ SLPS-25510:
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SLPS-25511:
name: "羅刹 -Alternative-"
name-sort: "らせつ -Alternative-"
@@ -58484,7 +58484,7 @@ SLPS-25586:
halfPixelOffset: 4 # Fixes post positioning.
nativeScaling: 1 # Fixes post effects.
autoFlush: 2 # Fixes post lighting.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SLPS-25587:
name: "シュガシュガルーン 恋もおしゃれもピックアップ!"
name-sort: "しゅがしゅがるーん こいもおしゃれもぴっくあっぷ!"
@@ -61222,7 +61222,7 @@ SLPS-73223:
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SLPS-73224:
name: "ゼノサーガ エピソードⅡ [善悪の彼岸] [PlayStation2 the Best] [ディスク1/2]"
name-sort: "ぜのさーが えぴそーど2 ぜんあくのひがん [PlayStation2 the Best] [でぃすく1/2]"
@@ -61522,7 +61522,7 @@ SLPS-73252:
halfPixelOffset: 4 # Fixes post positioning.
nativeScaling: 1 # Fixes post effects.
autoFlush: 2 # Fixes post lighting.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SLPS-73253:
name: "るろうに剣心-明治剣客浪漫譚- 炎上!京都輪廻 [PlayStation2 the Best]"
name-sort: "るろうにけんしん めいじけんかくろまんたん えんじょう きょうとりんね [PlayStation2 the Best]"
@@ -67249,7 +67249,7 @@ SLUS-21059:
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SLUS-21060:
name: "WWE SmackDown! vs. RAW"
region: "NTSC-U"
@@ -67801,7 +67801,7 @@ SLUS-21160:
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
getSkipCount: "GSC_Tekken5"
getSkipCount: "GSC_NamcoGames"
SLUS-21161:
name: "Fight Night Round 2"
region: "NTSC-U"
@@ -69387,7 +69387,7 @@ SLUS-21386:
halfPixelOffset: 4 # Fixes post positioning.
nativeScaling: 1 # Fixes post effects.
autoFlush: 2 # Fixes post lighting.
getSkipCount: "GSC_Tekken5" # Fixes upscaling grid, same engine.
getSkipCount: "GSC_NamcoGames" # Fixes upscaling grid, same engine.
SLUS-21387:
name: "Warship Gunner 2"
region: "NTSC-U"

View File

@@ -50,6 +50,27 @@ u64 GetPhysicalMemory()
return getmem;
}
u64 GetAvailablePhysicalMemory()
{
const mach_port_t host_port = mach_host_self();
vm_size_t page_size;
if (host_page_size(host_port, &page_size) != KERN_SUCCESS)
return 0;
vm_statistics64_data_t vm_stat;
mach_msg_type_number_t host_size = sizeof(vm_statistics64_data_t) / sizeof(integer_t);
if (host_statistics64(host_port, HOST_VM_INFO, reinterpret_cast<host_info64_t>(&vm_stat), &host_size) != KERN_SUCCESS)
return 0;
const u64 free_pages = static_cast<u64>(vm_stat.free_count);
const u64 inactive_pages = static_cast<u64>(vm_stat.inactive_count);
const u64 get_available_mem = (free_pages + inactive_pages) * page_size;
return get_available_mem;
}
static mach_timebase_info_data_t s_timebase_info;
static const u64 tickfreq = []() {
if (mach_timebase_info(&s_timebase_info) != KERN_SUCCESS)

View File

@@ -181,10 +181,7 @@ private:
extern u64 GetTickFrequency();
extern u64 GetCPUTicks();
extern u64 GetPhysicalMemory();
#ifdef _WIN32
// TODO: Someone do linux/mac.
extern u64 GetAvailablePhysicalMemory();
#endif
/// Spin for a short period of time (call while spinning waiting for a lock)
/// Returns the approximate number of ns that passed
extern u32 ShortSpin();

View File

@@ -15,6 +15,7 @@
#include <dbus/dbus.h>
#include <spawn.h>
#include <sys/sysinfo.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -40,6 +41,15 @@ u64 GetPhysicalMemory()
return pages * getpagesize();
}
u64 GetAvailablePhysicalMemory()
{
struct sysinfo info;
if (sysinfo(&info) != 0)
return 0;
return static_cast<u64>(info.freeram) * info.mem_unit;
}
u64 GetTickFrequency()
{
return 1000000000; // unix measures in nanoseconds

View File

@@ -10879,24 +10879,24 @@ Do you want to load this save and continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2687"/>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2688"/>
<source>Stencil buffers and texture barriers are both unavailable, this will break some graphical effects.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5065"/>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5060"/>
<source>Spin GPU During Readbacks is enabled, but calibrated timestamps are unavailable. This might be really slow.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/GS/Renderers/DX11/D3D.cpp" line="391"/>
<location filename="../../pcsx2/GS/Renderers/DX11/D3D.cpp" line="392"/>
<source>Your system has the &quot;OpenCL, OpenGL, and Vulkan Compatibility Pack&quot; installed.
This Vulkan driver crashes PCSX2 on some GPUs.
To use the Vulkan renderer, you should remove this app package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/GS/Renderers/DX11/D3D.cpp" line="410"/>
<location filename="../../pcsx2/GS/Renderers/DX11/D3D.cpp" line="411"/>
<source>The Vulkan renderer was automatically selected, but no compatible devices were found.
You should update all graphics drivers in your system, including any integrated GPUs
to use the Vulkan renderer.</source>
@@ -19266,12 +19266,12 @@ Ejecting {3} and replacing it with {2}.</source>
<context>
<name>SDLInputSource</name>
<message>
<location filename="../../pcsx2/Input/SDLInputSource.cpp" line="701"/>
<location filename="../../pcsx2/Input/SDLInputSource.cpp" line="767"/>
<source>SDL3 Migration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/Input/SDLInputSource.cpp" line="702"/>
<location filename="../../pcsx2/Input/SDLInputSource.cpp" line="768"/>
<source>As part of our upgrade to SDL3, we&apos;ve had to migrate your binds
Your controller did not match the Xbox layout and may need rebinding
Please verify your controller settings and amend if required</source>

View File

@@ -266,12 +266,11 @@ bool ThreadedFileReader::Precache2(ProgressCallback* progress, Error* error)
bool ThreadedFileReader::CheckAvailableMemoryForPrecaching(u64 required_size, Error* error)
{
#ifdef _WIN32
// We want to check available physical memory instead of total.
const u64 memory_available = GetAvailablePhysicalMemory();
// Reserve 2GB of available memory for headroom.
constexpr u64 memory_reserve = 2147483648;
const u64 max_precache_size = std::max(0LL, static_cast<s64>(memory_available - memory_reserve));
const u64 max_precache_size = std::max(s64{0}, static_cast<s64>(memory_available - memory_reserve));
if (required_size > max_precache_size)
{
@@ -280,20 +279,6 @@ bool ThreadedFileReader::CheckAvailableMemoryForPrecaching(u64 required_size, Er
(required_size + memory_reserve) / _1gb);
return false;
}
#else
// Don't allow precaching to use more than 50% of system memory.
// Hopefully nobody's running 2-4GB potatoes anymore....
const u64 memory_size = GetPhysicalMemory();
const u64 max_precache_size = memory_size / 2;
if (required_size > max_precache_size)
{
Error::SetStringFmt(error,
TRANSLATE_FS("CDVD", "Required memory ({}GB) is the above the maximum allowed ({}GB)."),
required_size / _1gb, max_precache_size / _1gb);
return false;
}
#endif
return true;
}

View File

@@ -2631,7 +2631,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
}
GSTexture* rt_copy = nullptr;
if (config.require_one_barrier || (config.tex && config.tex == config.rt)) // Used as "bind rt" flag when texture barrier is unsupported
if (config.require_one_barrier || (config.tex && config.tex == config.rt)) // Used as "bind rt" flag when texture barrier is unsupported.
{
// Bind the RT.This way special effect can use it.
// Do not always bind the rt when it's not needed,

View File

@@ -3900,7 +3900,7 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
}
}
if (config.require_one_barrier)
if (config.require_one_barrier || (config.tex && config.tex == config.rt)) // Used as "bind rt" flag when texture barrier is unsupported.
{
// requires a copy of the RT
draw_rt_clone = static_cast<GSTexture12*>(CreateTexture(rtsize.x, rtsize.y, 1, colclip_rt ? GSTexture::Format::ColorClip : GSTexture::Format::Color, true));
@@ -3913,7 +3913,10 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
draw_rt_clone->SetState(GSTexture::State::Invalidated);
CopyRect(draw_rt, draw_rt_clone, config.drawarea, config.drawarea.left, config.drawarea.top);
PSSetShaderResource(2, draw_rt_clone, true);
if (config.require_one_barrier)
PSSetShaderResource(2, draw_rt_clone, true);
if (config.tex && config.tex == config.rt)
PSSetShaderResource(0, draw_rt_clone, true);
}
}

View File

@@ -178,7 +178,7 @@ bool GSHwHack::GSC_DTGames(GSRendererHW& r, int& skip)
return true;
}
bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
bool GSHwHack::GSC_NamcoGames(GSRendererHW& r, int& skip)
{
if (skip == 0)
{
@@ -195,7 +195,7 @@ bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
if (!rt)
return false;
GL_INS("GSC_Tekken5(): HLE channel shuffle");
GL_INS("GSC_NamcoGames(): HLE channel shuffle");
// have to set up the palette ourselves too, since GSC executes before it does
r.m_mem.m_clut.Read32(RTEX0, r.m_draw_env->TEXA);
@@ -1502,14 +1502,12 @@ const GSHwHack::Entry<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_function
CRC_F(GSC_Battlefield2),
// Channel Effect
CRC_F(GSC_NamcoGames),
CRC_F(GSC_SteambotChronicles),
// Depth Issue
CRC_F(GSC_BurnoutGames),
// Half Screen bottom issue
CRC_F(GSC_Tekken5),
// Upscaling hacks
CRC_F(GSC_UltramanFightingEvolution),
};

View File

@@ -11,7 +11,7 @@ public:
static bool GSC_GuitarHero(GSRendererHW& r, int& skip);
static bool GSC_SFEX3(GSRendererHW& r, int& skip);
static bool GSC_DTGames(GSRendererHW& r, int& skip);
static bool GSC_Tekken5(GSRendererHW& r, int& skip);
static bool GSC_NamcoGames(GSRendererHW& r, int& skip);
static bool GSC_BurnoutGames(GSRendererHW& r, int& skip);
static bool GSC_BlackAndBurnoutSky(GSRendererHW& r, int& skip);
static bool GSC_MidnightClub3(GSRendererHW& r, int& skip);

View File

@@ -2504,8 +2504,10 @@ void VMManager::LogCPUCapabilities()
Console.WriteLnFmt(
" Operating System = {}\n"
" Physical RAM = {} MB",
" Available RAM = {} MB\n"
" Physical RAM = {} MB\n",
GetOSVersionString(),
GetAvailablePhysicalMemory() / _1mb,
GetPhysicalMemory() / _1mb);
Console.WriteLnFmt(" Processor = {}", cpuinfo_get_package(0)->name);