Compare commits

...

2892 Commits

Author SHA1 Message Date
refractionpcsx2
5e858fa1bc GS/HW: Take render target end block for channel shuffles if bigger 2024-06-06 22:59:12 +01:00
refractionpcsx2
f771b0f29c CI: Tempfix windows clang builds 2024-06-06 21:31:13 +01:00
refractionpcsx2
3c15f6e42f GameDB: Add Texture inside RT to Mobile Suit Gundam - One Year War 2024-06-04 22:07:06 +01:00
refractionpcsx2
0522da2299 GS: Don't be inclusive of textures edges in all cases 2024-06-04 22:07:06 +01:00
TheLastRar
877c3ee90d input-rec: Use toNativeSeparators() when opening recording 2024-06-04 11:19:41 +10:00
PCSX2 Bot
9e1acc5744 PAD: Update to latest controller database. 2024-06-03 20:03:55 +02:00
Blackbird88
bc9edb5387 GameDB: Tokyo Xtreme Racer Drift/Kaido Racer - Upscaling fixes 2024-06-02 19:50:42 +01:00
TellowKrinkle
8625e30dc6 GS:MTL: Add Intel HD 4000 to the list of GPUs to use PixelFormatView on
No clue why, but apparently this helps them a lot, at least on OCLP Big Sur
2024-06-01 19:08:45 -05:00
JordanTheToaster
af8fdae75e GameDB: Various bodges 2024-06-01 20:04:11 +01:00
refractionpcsx2
7de06e340b GS/HW: Improve some tex in rt handling 2024-06-01 20:03:50 +01:00
refractionpcsx2
4c8e42d801 GS/HW: Improve handling of channel shuffles on new targets 2024-06-01 02:32:02 +01:00
refractionpcsx2
834f12dd55 GS/HW: Update the target width to match source in channel shuffle
Also kill an annoying assert
2024-06-01 02:32:02 +01:00
refractionpcsx2
6d67156707 GS/HW: Favour newer draw on source overlap + improve target overwrite 2024-06-01 02:32:02 +01:00
refractionpcsx2
4faa5f2095 GS/HW: Compensate for edges in complex clamps to reduce upscale garbage 2024-06-01 02:31:20 +01:00
Connor McLaughlin
69c2c53ca7 CI/AppImage: QtNetwork is no longer needed 2024-05-31 13:39:51 +10:00
Stenzek
d48f527d6d Common: Tidy up signal handlers
Move MacOS into its own file.
Fix assertion failure crash dumping.
2024-05-31 13:39:36 +10:00
TheLastRar
f2e4a5e780 GS: Remove MSVC macro hack 2024-05-30 19:01:23 +01:00
PCSX2 Bot
c44659d3ab Qt: Update Base Translation 2024-05-30 11:28:02 +01:00
TheLastRar
ee9866b568 DEV9: Prefer C++ string comparison in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
f58ee161c7 DEV9: Use const in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
0856f3b223 DEV9: Shuffle code in Linux GetAdapter
Giving same flow as Windows code
2024-05-30 11:25:02 +01:00
TheLastRar
3acf898680 DEV9: Use helper method to get the sockaddr address family
This attempts to avoid undefined behaviour with our current assumptions about the socket api
2024-05-30 11:25:02 +01:00
TheLastRar
38f02de318 DEV9: Eliminate c-style casts in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
a6ddbdb879 DEV9: Use correct buffer type in Win32 GetAdapter
Returned data is not sequenced IP_ADAPTER_ADDRESSES entries
We will use implicit object creation avoid UB
2024-05-30 11:25:02 +01:00
TheLastRar
3aff833b5c DEV9: Unify GetAdapter code 2024-05-30 11:25:02 +01:00
TheLastRar
344cf6fffb DEV9: Add general notes regarding sockaddr casting 2024-05-30 11:25:02 +01:00
refractionpcsx2
8f1b804f98 GS/CRC: Improve Street Fighter 3 EX CRC to remove shimmer
(and some potential input lag)
2024-05-30 11:20:38 +01:00
JordanTheToaster
226cf2d21d 3rdparty: Update to VK memory allocator 3.1 2024-05-30 20:19:29 +10:00
Stenzek
ecbe239c0b Common: Use Mach VM routines for memory mapping
MacOS does not support an equivalent of MAP_FIXED_NOREPLACE via mmap(),
which means that our usage for allocating PCSX2's memory map is not
thread-safe.
2024-05-30 13:39:07 +10:00
Stenzek
18665b81c4 3rdparty/vixl: Import @ 8eca2b7 2024-05-30 13:38:51 +10:00
TellowKrinkle
525a7c48e9 GS:MTL: Fix inverted UseMipmapFiltering check 2024-05-29 19:13:47 -05:00
TellowKrinkle
521038984a CMake:macOS: Sign with --deep
Fixes complaints about MoltenVK not getting signed
2024-05-29 19:28:34 +10:00
Stenzek
94bd7c96b9 GS/HW: Use valid rect over size in CopyRGBFromDepthToColor()
Avoids a copy.
2024-05-28 12:44:27 +10:00
Stenzek
e863da9490 GS/HW: Fix unscaled rect in CopyRGBFromDepthToColor()
Fixes fade transitions when upscaling in GT3.
2024-05-28 12:44:27 +10:00
Stenzek
c94282ce5f GS/Vulkan: Purge threaded presentation 2024-05-27 21:10:59 +10:00
Stenzek
d94f1dd9a3 GS: Add option to disable mailbox presentation
For those who like terrible frame pacing.
2024-05-27 21:10:59 +10:00
Stenzek
5dc1167fa8 GS/DX11: Don't spin on CPU when GPU results aren't available
Backport of 547587af11
2024-05-27 21:10:59 +10:00
Stenzek
9187e7eb34 InputManager: Fix exit menu button forwarding to game
Backport of a7f2ad37de
2024-05-27 00:18:53 +10:00
refractionpcsx2
2d127039e1 UI: Fix dithering description + make it so 4 lines of description fits 2024-05-25 15:16:42 +01:00
Stenzek
3928014e5c GS/Vulkan: Work around validation layer semaphore error 2024-05-25 14:06:50 +10:00
Stenzek
c7a21a60cf GS: Improve vsync mode selection
All games use mailbox/triple buffering. Except when you enable sync to
host refresh, in which case FIFO/double buffering is used.

This means vsync enabled will ever tear, but at the same time, never
drop to 30fps on a missed frame due to frame rate differences.

To have the "best of both worlds", you should enable vsync and sync to
host refresh. Previously, this resulted in additional input lag, since
the host vsync would drive the EE frame timing. Now, this behaviour is
disabled by default, unless you enable "Use Host VSync Timing".
2024-05-25 14:06:50 +10:00
Stenzek
82fbf34f5b ImGuiOverlays: Display vsync queue size in OSD 2024-05-25 14:06:50 +10:00
refractionpcsx2
256babd337 GS/HW: Allow forcing Dither to 32bit for 16bit draws 2024-05-25 02:13:33 +01:00
Stenzek
99e38bc458 GS/Vulkan: Prefer mailbox presentation for vsync-on 2024-05-23 11:34:49 +10:00
Stenzek
68bbc2cc92 GS/Vulkan: Log any image acquire error 2024-05-23 11:34:49 +10:00
TheLastRar
63a5a15c37 Common: Provide a MAP_FIXED_NOREPLACE define for FreeBSD 2024-05-23 11:34:06 +10:00
TheLastRar
19d5d5c485 AutoUpdater: Correct type on stub processUpdate() 2024-05-23 11:34:06 +10:00
lightningterror
4fe5064b8c GS/HW: Cleanup RendererHW.
Null pointer dereferences, constants, redefinitions.
2024-05-23 02:21:41 +02:00
refractionpcsx2
0ea98d6edb GS/HW: Restrict CPU Sprite abort to non-opaque draws 2024-05-22 14:22:29 +01:00
Connor McLaughlin
92b707db99 Common: Missed MAP_FIXED -> MAP_FIXED_NOREPLACE 2024-05-22 00:05:24 +10:00
Connor McLaughlin
d765f2e15c Common: Fix Mac build 2024-05-21 23:14:47 +10:00
refractionpcsx2
b512162956 GS/HW: Ignore alpha on double half clear if not used 2024-05-21 15:07:51 +02:00
Stenzek
e24d97bbe4 Common: Don't use MAP_FIXED on Linux
MAP_FIXED will clobber any existing memory mapping, and is not safe
to use in a multi-threaded environment. Whether we like it or not,
we are a multi-threaded environment, because Qt initializes before
we get to main(), so it's already too late to safely use MAP_FIXED
by the time we get there.

Use MAP_FIXED_NOREPLACE instead. This is how MAP_FIXED should have
behaved from the beginning.

Obviously this means you'll need Linux 4.17+ and a semi-recent libc
to use PCSX2 now. But if you're running a 6 year old unsupported
kernel, you have bigger problems.

Fixes "random" startup crashes.
2024-05-21 22:44:00 +10:00
refractionpcsx2
fb4aaf5236 GS: Increase sensitivity of texflush but avoid some situations 2024-05-21 14:33:42 +02:00
Mrlinkwii
8d0af30e0e Docs : update configuration guide 2024-05-21 11:45:26 +02:00
lightningterror
06efa93070 Config: Change hw mipmap from enum to bool. 2024-05-21 10:45:02 +02:00
lightningterror
8d3617bb71 VMManager: Remove osd message for hw mipmap. 2024-05-21 10:45:02 +02:00
lightningterror
ef2549edb1 Overlays: Update hw mipmap code. 2024-05-21 10:45:02 +02:00
lightningterror
c5511d0afa Misc: Update hw mipmap code hotkey. 2024-05-21 10:45:02 +02:00
lightningterror
68eed55490 FullscreenUI: Change hw mipmap to a toggle button. 2024-05-21 10:45:02 +02:00
lightningterror
2d79b89acc Qt: Change hw mipmap to a toggle button. 2024-05-21 10:45:02 +02:00
lightningterror
9242da96f2 GameDB: Update db accordingly.
Credits to TheTechnician27 and Jordan.
2024-05-21 10:45:02 +02:00
lightningterror
932474a7d6 GameDB: Adjust mipmap and trilinear behavior. 2024-05-21 10:45:02 +02:00
lightningterror
115d83a02e GS/HW: Enable Full mipmap with ps2 trilinear always y default.
Change mipmap config to bool.
2024-05-21 10:45:02 +02:00
Stenzek
2e882dfabc CI/Flatpak: libaio is no longer needed 2024-05-21 18:34:01 +10:00
Stenzek
ff7995f0d6 Deps: Bump to shaderc 2024.1
And use dynamic loading.
2024-05-21 18:34:01 +10:00
Stenzek
f11ef37745 Deps: Switch to sourceforge mirror for FreeType
The savannah.gnu.org link redirects to non-existant domains, at least in
Australia.
2024-05-21 18:34:01 +10:00
Stenzek
9044f54353 Deps: Apply qtbase commit 7b01862 2024-05-21 18:34:01 +10:00
Stenzek
475bd6ee7d Deps: Bump Qt to 6.7.1 2024-05-21 18:34:01 +10:00
Ziemas
086bbf95dc Misc: Fix building with gcc14 (#11278) 2024-05-21 12:25:11 +10:00
PCSX2 Bot
4536daa5f8 PAD: Update to latest controller database. 2024-05-20 20:22:06 +02:00
refractionpcsx2
570039f49a GS/HW: Adjust conditions for CPU sprite renderer 2024-05-19 14:15:28 +01:00
refractionpcsx2
c6b55e5aa3 GS/HW: Improve texture shuffle double direction with future draw 2024-05-19 14:13:15 +01:00
Connor McLaughlin
7683674585 Qt: Fix default tab of Graphics Settings 2024-05-19 22:25:55 +10:00
Stenzek
81f1102809 Qt: Update base translation 2024-05-19 16:07:15 +10:00
Stenzek
ebb315ab6f Qt: update_base_translation.sh should be executable 2024-05-19 16:06:48 +10:00
KamFretoZ
f0b8895350 FSUI: Gate HW Download mode behind per-game settings
Just like how it was on Qt.
2024-05-19 14:45:20 +10:00
KamFretoZ
4134e7a7e0 Qt: Tidy up texture replacement settings 2024-05-19 14:45:20 +10:00
GovanifY
39a493f7d3 GameDB: fix tearing like issues on KH2 when upscaled 2024-05-19 05:38:59 +01:00
Connor McLaughlin
70b709a675 CI/Flatpak: Temporarily disable repo/appstream validation
pcsx2.net (cloudflare?) appears to be blocking the GitHub runner. Until this is resolved, disable runner-side validation.
2024-05-19 13:27:10 +10:00
Stenzek
31e935d831 GzippedFileReader: Don't clamp chunkID on read 2024-05-18 02:45:26 +10:00
Stenzek
34ae500614 CsoFileReader: Fix devbuild assertion 2024-05-18 02:45:26 +10:00
Stenzek
2cead675bb Revert "CI/AppImage: Don't bundle libssl/libcrypto"
This reverts commit 21c46b778e.
2024-05-18 02:45:26 +10:00
Stenzek
a6f7159537 CDVD: Simplify ISO opening 2024-05-17 11:58:01 +10:00
Stenzek
d099f7afd6 CDVD: Purge AsyncFileReader interface
Everything goes through ThreadedFileReader now.
2024-05-17 11:58:01 +10:00
Stenzek
7587bb8a07 CDVD: Use ThreadedFileReader for gzip ISOs 2024-05-17 11:58:01 +10:00
Stenzek
29e9125b15 CDVD: Use ThreadedFileReader for uncompressed ISOs 2024-05-17 11:58:01 +10:00
Stenzek
f0ae33d61e CDVD: Use ThreadedFileReader for block dumps 2024-05-17 11:58:01 +10:00
Stenzek
89c4e2c1a4 CDVD: Fix error propagation from ThreadedFileReader 2024-05-17 11:58:01 +10:00
Stenzek
431b8b0df6 CDVD: Purge MultpartFileReader
Nobody should be using this.
2024-05-17 11:58:01 +10:00
Stenzek
e8e84d160b Qt: Update base translation 2024-05-17 11:57:38 +10:00
Stenzek
3fd1eabdb8 Qt: Rename Load Profile to Apply Profile
And make it copy hotkeys.
2024-05-17 11:57:38 +10:00
Stenzek
21c46b778e CI/AppImage: Don't bundle libssl/libcrypto 2024-05-17 11:57:38 +10:00
Stenzek
55ee8242cc VMManager: Rewrite input profile hotkey priority logic 2024-05-17 11:57:38 +10:00
Stenzek
967a41c035 USB-Eyetoy: Fix unused comprLen warning
But this also has a behavioural change.
2024-05-17 11:57:38 +10:00
Stenzek
75894501ee FullscreenUI: Warning fix 2024-05-17 11:57:38 +10:00
Stenzek
39b29b3542 AudioStream: Vectorize volume application 2024-05-17 11:57:38 +10:00
Stenzek
25bc75a468 InputManager: Add push to toggle for macros
Backport of f0a4ceb909
2024-05-17 11:57:38 +10:00
Stenzek
12a0644315 Misc: Pass most string_views by value instead of reference 2024-05-17 11:57:38 +10:00
Stenzek
9fac941570 GS: Make VSync a boolean toggle
i.e. ditch the old adaptive mode, and always use adaptive if available.
2024-05-17 11:57:38 +10:00
Stenzek
81203d9a15 Config: Remove redundant GS setting macros
Not needed without WX.
2024-05-17 11:57:38 +10:00
Stenzek
5d50cd562f MTGS: Eliminate redundant SynchronousMTGS checks in Release build 2024-05-17 11:57:38 +10:00
Stenzek
49a17b3a2e Error: Strip trailing whitespace from Windows errors
Backport of c85e743573
2024-05-17 11:57:38 +10:00
Stenzek
cfecbf53aa Host: Add plural translation support
Backport of f3aec0c965
2024-05-17 11:57:38 +10:00
Stenzek
3a0b26225d SettingsInterface: Fix TinyString helper
Backport of d9003b10c3
2024-05-17 11:57:38 +10:00
Stenzek
0628e8cc87 GS/Vulkan: Simplify loader using DynamicLibrary
Backport of 8e3284d8c6
2024-05-17 11:57:38 +10:00
Stenzek
6545c62d26 3rdparty/cubeb: Only include connected devices when enumerating wasapi
Otherwise you just get a ton of unusable outputs.
2024-05-17 11:57:38 +10:00
Stenzek
c573c00eb0 3rdparty/cubeb: Sync to 19fcbef
Backport of 872cee908c

And apply PR #740 (Re-enable and polish IAudioClient3 to achieve lower
latencies).

`*latency_frames = min_period;` in wasapi_get_min_latency was changed to
`*latency_frames = hns_to_frames(params.rate, min_period_rt);`, as
otherwise it reports in mixer frames, not stream frames.
2024-05-17 11:57:38 +10:00
Stenzek
f084e76f36 Qt: Add option to pause when controller is disconnected 2024-05-17 11:57:38 +10:00
Stenzek
b9d7b63b32 FullscreenUI: Use native file selector on Flatpak 2024-05-17 11:57:38 +10:00
Stenzek
4d67f71217 FullscreenUI: Add horizontal padding to menu windows
Backport of 37a76a020a
2024-05-17 11:57:38 +10:00
Stenzek
4b1a4fdbb9 FullscreenUI: Fix minimal output latency toggle 2024-05-17 11:57:38 +10:00
Stenzek
a0bc8e0ff8 FullscreenUI: Fix gaps between some UI elements
Backport of 4d8ed49b24
69e0c1681c
2024-05-17 11:57:38 +10:00
Stenzek
7166c04ff2 R3000: Serialize IOP->EE ticks carry
[SAVEVERSION+]
2024-05-16 20:08:38 +10:00
Jaime J. Denizard
1483e4f88e Qt: Rename "Enable" to "Apply" for WS/NI patches (#11236) 2024-05-16 13:04:17 +10:00
refractionpcsx2
454d4c9fa0 IOP: Adjust cycle counts slightly more accurately in some situations 2024-05-15 20:14:08 +01:00
refractionpcsx2
8887930fd5 GS/SW: Don't use fast reciprocal stq calculation, it's too inaccurate 2024-05-15 18:13:46 +01:00
refractionpcsx2
c8047c1a61 Audio: Clamp final output to avoid cracking at high volumes 2024-05-15 11:15:00 +01:00
refractionpcsx2
566ea8ea9b Core: Refactor a lot of timer work and fix a couple of bugs
EE/IOP Timers: improve clock sync, disable v/h sync when SINT enabled.

Some changes based on tests from PS2

[SAVEVERSION+]
2024-05-15 10:54:26 +01:00
Connor McLaughlin
67f1d6e24b FullscreenUI: Fix deadlock/abort in Graphics Settings
Regression from b9f4a01138.

Closes #11249.
2024-05-15 01:33:28 +10:00
KamFretoZ
e520dc2605 Qt/SaveState: Simplify warning message. 2024-05-14 16:09:21 +10:00
KamFretoZ
b9f4a01138 FSUI: Automatically hide advanced graphics settings
depending on global advanced settings visibility
2024-05-14 16:08:15 +10:00
PCSX2 Bot
aeff832ffc PAD: Update to latest controller database. 2024-05-14 00:17:21 +02:00
JordanTheToaster
3cb12cce84 Qt: Fix copy paste fail 2024-05-13 22:37:51 +01:00
JordanTheToaster
fc2a750f85 3rdparty: Update LZMA/7zipSDK to 23.01 2024-05-13 14:17:33 +01:00
Biendeo
e3ccb500d8 USB: Add d-pad controls to RBDrumKitDevice 2024-05-12 14:49:08 +10:00
Stenzek
0aea297b73 GS/DX12: Fix incorrect resource state of ImGui font 2024-05-12 14:48:51 +10:00
Stenzek
20dbcfd2eb GS/HW: Avoid barriers on second alpha pass when only writing to Z
Completely redundant. We also don't need to use the drawlist.
2024-05-12 11:55:37 +10:00
Stenzek
ba7096c9fa GS/Vulkan: Always issue first barrier on RDNA3
It turns out *not* doing this causes GPU resets on RDNA3, specifically
Windows drivers. Despite the layout changing enforcing the execution
dependency between previous draws and the first input attachment read,
it still wants the region/fragment-local barrier...
2024-05-12 11:55:37 +10:00
Connor McLaughlin
4cc4a6561c GS: Fix use-after-free on lost device 2024-05-12 11:54:48 +10:00
Connor McLaughlin
95843dc84a GS/HW: Fix invalid self copy from move in DX renderers 2024-05-12 11:54:48 +10:00
Connor McLaughlin
fdb751ed1a GS/HW: Fix possible texture leak on skipped draw 2024-05-12 11:54:48 +10:00
Connor McLaughlin
612c24e0c0 GS/HW: Fix incorrect StretchRect() in double buffer copy 2024-05-11 20:26:18 +10:00
lightningterror
da9e3fdc32 GS/HW: Rename alpha_one to alpha_eq_one pxAssert.
It slipped.
2024-05-10 22:17:30 +02:00
lightningterror
58defda298 GS/HW: Better name get alpha values for blend. 2024-05-10 21:23:28 +02:00
lightningterror
8b9b7f7baf GS/HW: Optimize sw/hdr colclip on some blend formulas.
Alpha is either As or Af.
`Cd*Alpha, Cd*(1 - Alpha).`
When Alpha <= 128 we can let hw blend do it's thing as it won't be able to wrap.
2024-05-10 21:23:28 +02:00
lightningterror
8ad08706aa Achievements: Fix function parameter should be passed by const reference warnings.
Codacy.
2024-05-10 20:00:43 +02:00
lightningterror
4035f1c554 Gif: Fix the scope of the variable can be reduced warnings.
Codacy.
2024-05-10 20:00:43 +02:00
lightningterror
f0c331e32b IopBios: Fix function parameter should be passed by const reference warnings.
Codacy.
2024-05-10 20:00:43 +02:00
lightningterror
43fb79d669 R5900: Fix the scope of the variable can be reduced warnings.
Codacy.
2024-05-10 20:00:43 +02:00
lightningterror
a4cc42c6ad Mdec: Cleanup file.
Constants, initializations.
2024-05-10 20:00:43 +02:00
lightningterror
2e89f6ad4d Mdec: Clang format. 2024-05-10 20:00:43 +02:00
Benjamin Moir
9b03b236fe VMManager: Clear protected pages before changing extra memory mode 2024-05-10 22:33:01 +10:00
refractionpcsx2
052951fbb0 EE: Correct update of EE cycles on low cycle counts when overclocking 2024-05-10 01:39:00 +01:00
TheLastRar
e53abb1989 DEV9: Add DHCP logger
Enabled by setting `EthLogDHCP = true` in PCSX2.ini
2024-05-09 15:48:35 +10:00
TheLastRar
dc20521b01 DEV9: Fix incorrect cmake entry 2024-05-09 15:48:35 +10:00
Benjamin Moir
4081d07dd8 CDVD: Improve handling of host: paths in cdvdLoadElf 2024-05-09 15:48:03 +10:00
TheLastRar
85888a9a81 DEV9: Better error handling on UDP_FixedPort creation 2024-05-09 15:47:27 +10:00
TheLastRar
d7101c3be5 DEV9: Slightly simplify UDP socket closing 2024-05-09 15:47:27 +10:00
TheLastRar
b3bb40980e DEV9: Improve support for sending multicast packets 2024-05-09 15:47:27 +10:00
TheLastRar
cf3ad3f855 DEV9: Adjust comments in UDP_Session 2024-05-09 15:47:27 +10:00
TheLastRar
c6e7e15599 DEV9: Correct capitalisation on UDP log messages 2024-05-09 15:47:27 +10:00
TheLastRar
a0f6036337 DEV9: Eliminate some c-style casts in UDP_Session 2024-05-09 15:47:27 +10:00
Benjamin Moir
2fc4d02dd6 SaveState: Reset VM when save state fails to load 2024-05-09 13:45:06 +10:00
Benjamin Moir
c6cd6b5eb3 Misc: Remove unused ps macros from Memory.h
The psHu64, psHu128 and psSu64 macros are also unused, but are kept for completeness.
2024-05-09 13:45:06 +10:00
Benjamin Moir
5f7e97c27c [SAVEVERSION+] EE: Expose advanced option for extra memory 2024-05-09 13:45:06 +10:00
TheLastRar
49d5e69e70 gitignore: Add deps-build path 2024-05-09 13:44:19 +10:00
Stenzek
7bc5427908 Qt: Fix remove game directory button being enabled w/o selection 2024-05-07 12:41:03 +10:00
Stenzek
1881139b0a Error: Fix negative formatting of HRESULT 2024-05-07 12:41:03 +10:00
Stenzek
339dc2313b CrashHandler: Use SetUnhandledExceptionFilter() and terminate on crash
Fixes zombie processes sticking around.
2024-05-07 12:41:03 +10:00
Stenzek
9752a037be HostSys: Simplify page fault handler installation
And include whether it was a write or a read access.
2024-05-07 12:41:03 +10:00
Stenzek
d8cd336674 CI/Flatpak: Update to SDL2 2.30.3 2024-05-07 12:41:03 +10:00
PCSX2 Bot
7264e397e2 PAD: Update to latest controller database. 2024-05-06 18:17:50 +02:00
JordanTheToaster
3114332c89 Qt: Add label next to audio buffer size 2024-05-06 23:34:34 +10:00
TheLastRar
f67611cbe6 DEV9: Inherit from QStyledItemDelegate for address fields in hosts table 2024-05-06 12:26:14 +10:00
xujibbs
11264e6c08 Mark %d ms for translation 2024-05-06 12:25:46 +10:00
KamFretoZ
89749f2206 Qt: Fix incorrectly labeled Reset Volume button 2024-05-06 12:25:19 +10:00
JordanTheToaster
6630783686 3rdparty: Update simpleini to v4.22 2024-05-05 12:14:16 +10:00
Stenzek
90338ed065 HeapArray: Add missing field swap 2024-05-05 12:13:20 +10:00
Stenzek
89f4ac9b9a Config: Remove unused FrameLimitEnable field 2024-05-05 12:13:20 +10:00
Stenzek
2ab6a3b873 Qt: Clean and remove empty game settings 2024-05-05 12:13:20 +10:00
Stenzek
12af031193 Qt: Fix volume reset button in game properties 2024-05-05 12:13:20 +10:00
JordanTheToaster
ddd2018e81 Deps: Update to SDL 2.30.3 2024-05-04 19:02:32 +10:00
Stenzek
8d9c89a871 GS/SW: Remove redundant code generator classes
Makes space for ARM64.
2024-05-04 19:02:12 +10:00
TellowKrinkle
e48c68d80f CI:mac: Disable libpng framework build
PCSX2 and Qt were disagreeing on which libpng to pick (framework or dylib), and wasting space putting both in the app
2024-05-04 14:34:12 +10:00
TellowKrinkle
0ccf8a7775 CI:mac: Use -dead_strip in dependency builds 2024-05-04 14:34:12 +10:00
TellowKrinkle
63e6248fd3 CI:mac: Build x86_64 only MoltenVK
Save some CI time
2024-05-04 14:34:12 +10:00
PCSX2 Bot
8d678c6c6f Qt: Update Base Translation 2024-05-04 14:13:58 +10:00
Stenzek
0f5e7355ff SPU2: Use AudioStream for output 2024-05-04 14:12:20 +10:00
Stenzek
ca091eeea9 Host: Add AudioStream 2024-05-04 14:12:20 +10:00
Stenzek
ca8a837614 3rdparty: Add FreeSurround 2024-05-04 14:12:20 +10:00
Stenzek
dceac5372a Qt: Handle sliders in per-game settings 2024-05-04 14:12:20 +10:00
Stenzek
7fae0f499f SettingsWrapper: Add SmallString overloads 2024-05-04 14:12:20 +10:00
Stenzek
964dcfcb0a Console: Add log macros 2024-05-04 14:12:20 +10:00
TheLastRar
8bfcbdebf3 DEV9: Defer deletion of socket sessions 2024-05-04 14:00:59 +10:00
JordanTheToaster
ce734f8a0d Qt: Add Classic Windows as theme option
But it'll bug out when switching between windows11/windowsvista.

Restart to fix.
2024-05-04 13:59:18 +10:00
Stenzek
b67b555617 GS/HW: Fix blend_mix regression 2024-05-04 13:10:11 +10:00
Mrlinkwii
29b886eafb GameDB: patches for NHL 2K9 and Major League Baseball 2K9 2024-05-03 22:09:57 +01:00
Ziemas
fd81349dab SPU: Only fire IRQ for Reverb reads when FxEnable 2024-05-03 21:35:51 +01:00
Connor McLaughlin
09ea13df55 CI/Linux: Remove invalid download links 2024-05-04 02:58:38 +10:00
JordanTheToaster
ff3fc9b362 GameDB: CMR 2005 Timer fix 2024-05-03 17:51:05 +01:00
refractionpcsx2
3b63445f07 Timers: Fix up some timer behaviour 2024-05-02 09:07:09 +01:00
TellowKrinkle
999f0cc84f CMake: Unbreak finding base translations 2024-05-02 17:48:46 +10:00
JordanTheToaster
04957b6bda GameDB: Code Lyoko QFI fixes 2024-05-01 20:28:54 +01:00
lightningterror
df6a33ef7c GS/HW: Implement dithering on blend second pass on some formulas.
Alpha = As or Af
Cs + Cd*Alpha, Cs - Cd*Alpha.
2024-05-01 14:23:25 +02:00
lightningterror
8f57d8afe0 GS/HW: Make sure when a draw is rta scaled for blend second pass. 2024-05-01 14:23:25 +02:00
lightningterror
4c24d96966 GS/HW: Ger rid of clr_blend1_2 condition.
Prefer sw blend instead when Alpha > 1 on Cd*(Alpha + 1) contitions when there's no overlap
on basic blend.
2024-05-01 14:23:25 +02:00
JordanTheToaster
8a7d5bc417 GameDB: Add missing GT fixes 2024-05-01 13:29:50 +02:00
refractionpcsx2
e46d435d28 EE/JIT: Increase size of jump for FPU MUL 2024-04-30 09:56:15 +01:00
TellowKrinkle
c03cffb5c2 CMake: Don't assume all qt utils are in the same place
moc often installs to libexec, while lconvert and macdeployqt go to bin
2024-04-30 16:51:42 +10:00
Stenzek
40c7982dcf GS: Predivide ST by Q on large equal-Q triangles
In addition to sprites.

Fixes intro screen of IndyCar Series, which uses rotated sprites (tris).
Fixes some onscreen sprites in SpongeBob SquarePants - Revenge of the Flying Dutchman.
Fixes menu background in Cold Winter.
Fixes health bars in Biker Mice From Mars.
2024-04-30 16:43:23 +10:00
Stenzek
fd0c82c04a GS: Use insertps/blendps instead of shuffles
Faster by one cycle on any CPU we care about these days.
2024-04-30 16:43:23 +10:00
Abel Briggs
8e5b84b097 DEV9: Fix MacOS crash upon receiving an ICMP reply
Apple (old BSD)'s raw IP sockets implementation converts the
`ip_len` field to host byte order, but also subtracts the
IP header length as well.

This caused us to effectively subtract the header length twice
and allocate the return ping in `ICMP_Session::Recv()
with a negative size, crashing PCSX2.
2024-04-30 16:42:58 +10:00
JordanTheToaster
e862e68192 GameDB: God of War 2 mipmapping fixes 2024-04-29 19:58:57 +02:00
JordanTheToaster
46f6e691e0 GameDB: Crash Nitro Kart fixes 2024-04-29 17:28:02 +01:00
refractionpcsx2
5f7c2b7cd8 EE/IOP Timers: Rewrote most of the gate handling to be better.
[SAVEVERSION+]
2024-04-29 17:25:51 +01:00
refractionpcsx2
4363255234 EE/Timer: Don't reset count on setting gate 2024-04-29 17:25:51 +01:00
PCSX2 Bot
d1e9a5265d PAD: Update to latest controller database. 2024-04-29 18:10:17 +02:00
JordanTheToaster
a485398029 GameDB: Various fixes 2024-04-28 18:31:42 +01:00
TheLastRar
33556c70f2 DEV9: Add const to variables in TCP session 2024-04-28 17:43:57 +02:00
TheLastRar
ba16a90290 DEV9: Fix incorrect error check on TCP send 2024-04-28 17:43:57 +02:00
TheLastRar
894f2f145c DEV9: Format comments in TCP session 2024-04-28 17:43:57 +02:00
TheLastRar
56b06a0495 DEV9: Correct capitalisation on log messages
Also reword a few messages
2024-04-28 17:43:57 +02:00
TheLastRar
fe4693f158 DEV9: Use reinterpret_cast for sockaddr
This is UB, but is required by the api
2024-04-28 17:43:57 +02:00
TheLastRar
f5de7da42f DEV9: Eliminate some c-style casts in TCP_Session 2024-04-28 17:43:57 +02:00
Stenzek
107a3fda44 GS/HW: Rename RTCorrect/Decorrect to ScaleAlpha 2024-04-28 17:40:20 +02:00
Stenzek
e734eb415c GS/HW: Allow transition to RTA on full cover draw 2024-04-28 17:40:20 +02:00
Stenzek
aa48256010 GS/HW: Round alpha values for indexed sample of RTA 2024-04-28 17:40:20 +02:00
Stenzek
77a03498c1 GS: Round coordinates in PrimitiveCoversWithoutGaps() 2024-04-28 17:40:20 +02:00
refractionpcsx2
1cf8c7c375 GS/HW: Remove shuffle misdetection hack 2024-04-28 16:39:37 +01:00
refractionpcsx2
f5276f13ae GS/HW: Detect shuffles using quads 2024-04-28 16:39:13 +01:00
Francisco Javier Trujillo Mata
d63966b071 DEV9: Improve logic for getting MacAddress (#10937)
* Change error to normal message

* DEV9: Improve logic for getting MacAddress
2024-04-28 21:08:31 +10:00
JordanTheToaster
b01871aea8 GameDB: Jak 1 and CMR 2005 fixes 2024-04-27 15:49:34 +01:00
Connor McLaughlin
f5c3cd0f87 GS/HW: Ensure valid alpha doesn't get cleared on 24-bit targets 2024-04-27 20:23:17 +10:00
Stenzek
85a33971e7 Misc: Add gstreamer fallback to aplay 2024-04-26 20:30:16 +10:00
Stenzek
4e79e85f3f GH: Clarify lack of support for third-party Linux builds 2024-04-26 20:07:12 +10:00
refractionpcsx2
a0e323dae5 GS: Improve Autoflush detection with channel masks 2024-04-26 10:17:52 +01:00
refractionpcsx2
25737a1a46 GS: Improve STQ loggin in draw dumps 2024-04-26 10:17:52 +01:00
refractionpcsx2
6816f640e2 GS/HW: Improve depth deswizzle 2024-04-26 10:17:52 +01:00
Stenzek
c831f5759f CI: Simplify Linux build 2024-04-26 13:09:30 +10:00
Stenzek
9f1483f01b GS/HW: Check for format combinations that make sense for CSBW
True Crime: New York City strikes again...
2024-04-25 11:58:37 +10:00
Stenzek
ece89051bd GS/HW: Stretch double buffered targets when scale changes
Otherwise the coordinates are out of range => GPU crash.
2024-04-25 11:58:37 +10:00
Stenzek
e768f1c93b MSBuild: Use AVX/AVX2 for 3rdparty as well 2024-04-25 11:55:41 +10:00
Stenzek
56cd7f2259 INISettingsInterface: Fix file descriptor leak on Linux 2024-04-25 11:55:19 +10:00
RedDevilus
a14d699f28 Docs: Initial overhaul for stable 2024 (GameIndex)
Adds some new values and more contextual extra info. Needed for having up-to date information. Still need to update other docs like FAQ, Readme and Debugger but that's future work.

Fixed some typos along the way.
2024-04-24 22:18:40 +01:00
Benjamin Moir
d48c3cfce5 HeapArray: Avoid writing out of bounds in internal_resize 2024-04-24 21:44:48 +01:00
JordanTheToaster
550da21015 GameDB: LOTR Twin Towers fixes 2024-04-24 21:30:01 +01:00
PCSX2 Bot
98eda97bd2 Qt: Update Base Translation 2024-04-24 10:09:30 +02:00
lightningterror
a2439d120e GS/HW: Optimize medium blend on dx.
Try to prefer blend second pass for Ad cases on medium blend, higher levels will still prefer sw blend.
2024-04-24 10:07:19 +02:00
refractionpcsx2
0ca816d030 CDVD/BIOS: On creating NVM, force setup on next full boot 2024-04-23 15:03:14 +01:00
refractionpcsx2
b44d479921 BIOS/HLE: Improve handling of OSD params when fast booting 2024-04-23 15:03:14 +01:00
forrvalhalla
0acc91403d GameDB: Various fixes 2024-04-23 15:02:17 +01:00
forrvalhalla
d6a29d483c GameDB: Various Fixes 2024-04-23 15:02:17 +01:00
refractionpcsx2
6d25c6b1ef GS/HW: Allow preload if FBW = 0 on small draw 2024-04-23 15:00:46 +01:00
Silent
c5604472f6 Qt: Fix rare crash during update download 2024-04-23 19:50:46 +10:00
TheLastRar
59d7a36068 DEV9: Also defer loading until ethernet is enabled 2024-04-23 13:19:59 +10:00
TheLastRar
500b31eab0 DEV9: Lazy load adapter list in settings UI 2024-04-23 13:19:59 +10:00
TheLastRar
cd907584ee DEV9: Use a signal blocker instead of disconnecting signal 2024-04-23 13:19:59 +10:00
TheLastRar
5af5fe8387 DEV9: Properly disable/enable the DHCP label 2024-04-23 13:19:08 +10:00
TheLastRar
346823f7c2 DEV9: Fixup Settings Layout 2024-04-23 13:19:08 +10:00
TheLastRar
fc712a0724 DEV9: Properly disable/enable the LBA48 checkbox 2024-04-23 13:19:08 +10:00
Silent
e97fc40dec GSLzma: Fix a file handle leak in GSDumpLzma 2024-04-23 13:06:23 +10:00
KamFretoZ
e99fc5c3a8 FullscreenUI: Add Save State Backup toggle to BPM 2024-04-23 13:04:58 +10:00
KamFretoZ
a00056599c Updater: Clarify updater error message to point to official site 2024-04-23 13:04:58 +10:00
KamFretoZ
ccd6f91c66 FullscreenUI: Clean up speed limiter toggle leftover 2024-04-23 13:04:58 +10:00
Stenzek
3d11057177 GS/HW: Clear dirty list on target clear 2024-04-23 11:57:17 +10:00
Stenzek
fe0e71f586 GS/Vulkan: Drop feedback loop extension
Apparently this causes GPU crashes on RDNA3, and didn't provide any
tangible benefit for NVIDIA.

I'll replace this at some point with dynamic rendering local reads,
either before or after the GPUDevice transition.
2024-04-23 11:57:05 +10:00
lightningterror
d824ae6e0c GS/HW: Extend blend second pass to more blend formulas.
`Cs + Cd*Ad, Cs - Cd*Ad, Cd*(1 - Ad), Cs*(1 + Ad), Cs*(1 - Ad).`
2024-04-23 02:00:02 +02:00
lightningterror
4e06d51a00 GS/HW: Cleanup date and rt alpha min max function.
Always make sure rt is checked for date, no need for individual checks.
Code cleanup.

Some other cleanups.
2024-04-23 01:54:13 +02:00
Stenzek
5a91ecd16a GS: Fix crash and file leak during dump 2024-04-22 23:31:10 +10:00
lightningterror
7dd7345e08 GS/HW: Minor shader optimization.
Use saturate instead of min max, saturate is faster than min max.
2024-04-21 15:10:53 +02:00
JordanTheToaster
7e1900a8a1 VMManager: Add warning for texture dumping
Adds a warning for texture dumping to disk being enabled.
2024-04-21 04:21:49 +01:00
JordanTheToaster
cbecda8850 RedumpDatabase: Update hash database 2024-04-21 04:21:49 +01:00
JordanTheToaster
b9cc65704e GSHwHack: Purge The Getaway CRC
No longer needed as the fog wall does not appear on basic blending.
2024-04-21 03:57:33 +01:00
JordanTheToaster
49c6f5e866 GameDB: Various fixes 2024-04-21 03:57:33 +01:00
TheLastRar
bdd0f7e2f4 DEV9: Correct type used to store GetDelta result
Also relocate call
2024-04-21 12:47:45 +10:00
TheLastRar
1e094096c2 DEV9: Improve validation of received sequence numbers 2024-04-21 12:47:45 +10:00
Connor McLaughlin
6d8a906605 CI/Flatpak: Bump to KDE 6.7 container 2024-04-20 19:10:41 +10:00
Ty Lamontagne
f75a0df449 Debugger: Disable the debugger toolbar ctx menu
The context menu by default has a checkbox to hide the toolbar. The
issue is, once the toolbar is hidden you can no longer un-hide it.
2024-04-20 11:56:51 +10:00
refractionpcsx2
f16ce3bdbe GS/HW: Re-sort the pre-source shuffle check. 2024-04-20 02:46:25 +01:00
refractionpcsx2
a38dd74d0e GS/HW: Improve depth updating on source target match 2024-04-20 02:46:25 +01:00
refractionpcsx2
2a2dad9280 GS/HW: Fix some small errors updating depth in RT targets 2024-04-20 02:46:25 +01:00
TellowKrinkle
0b5a3fa6af GS:Capture: ffmpeg 7 support 2024-04-19 17:54:10 +10:00
TellowKrinkle
3fea71731f CI:mac: Add option to not build ffmpeg to dependency build script 2024-04-19 17:54:10 +10:00
Stenzek
c0b36a482a Achievements: Fix fullscreen window height 2024-04-19 14:58:38 +10:00
Stenzek
a9311142dc Achievements: Fix HC mode activating on reset of non-cheevo game 2024-04-19 14:58:38 +10:00
Stenzek
3c901543bd ImGuiOverlays: Fix possible crash in save state selector 2024-04-18 00:15:19 +10:00
Stenzek
410e950da6 FullscreenUI: Get rid of extra scrollbar in save state selector 2024-04-18 00:15:19 +10:00
TheLastRar
815e5d952d DEV9: Adjustments to HDD logs 2024-04-17 13:36:19 +10:00
KamFretoZ
8723513528 BPM: Small icon tweaks 2024-04-17 13:35:08 +10:00
KamFretoZ
6eab82ecc0 BPM: Make open in file browser exit fullscreen when clicked 2024-04-17 13:35:08 +10:00
KamFretoZ
f09e99fb05 Qt: Add Grey Matter theme 2024-04-17 13:35:08 +10:00
Stenzek
ed8e1aa6db GS/HW: Cross-reference RT alpha with CLUT for P8H 2024-04-17 13:24:02 +10:00
Stenzek
8e8581cb15 GS: Fix error and OOB access in GSGetRGBA8AlphaMinMax() 2024-04-17 13:24:02 +10:00
lightningterror
b5472c1b51 Config/FullscreenUI: Properly disable GPU Palette Conversion. 2024-04-16 18:52:25 +02:00
Benjamin Moir
14b2335c54 VMManager: Log entry point in hexadecimal 2024-04-17 02:45:54 +10:00
lightningterror
b94a232b31 GS/HW: Ensure tex shuffles, masking are render target draws.
Fixes Castlevania Curse of Darkness crashing.
2024-04-16 15:33:54 +02:00
refractionpcsx2
79a882d18b GS/HW: Try to keep old targets around without overlap or dirty areas 2024-04-15 19:05:51 +01:00
PCSX2 Bot
d98b7d9505 PAD: Update to latest controller database. 2024-04-15 18:31:58 +02:00
Stenzek
5351a6a64a FullscreenUI: Fix images in DX11/GL 2024-04-15 22:10:56 +10:00
Stenzek
850845ea44 Qt: Shrink settings window by ~30 pixels 2024-04-15 22:02:21 +10:00
Stenzek
55907bf310 GS/HW: Fix RTACorrect/Decorrect debug log 2024-04-14 22:29:53 +10:00
Stenzek
83bf215ead GS/HW: Allow creation of known targets via move with offset
Fixes upscaling with subtitles in Devil May Cry.
2024-04-14 22:29:53 +10:00
Stenzek
070068366f GS/Vulkan: Add env var for non-semantic debug info 2024-04-13 13:55:04 +10:00
PCSX2 Bot
ee07b71a62 Qt: Update Base Translation 2024-04-13 13:23:36 +10:00
Stenzek
5219f52130 ImGuiFullscreen: Use popup background for all popups
Backport of 44a4f2703a
and 57f6bda59b
2024-04-13 13:21:17 +10:00
Stenzek
2157a7ed0b FullscreenUI: Redo landing page and add help bar
Backport of bf4e8feb25
2024-04-13 13:21:17 +10:00
Stenzek
888f3d8499 ImGuiManager: Fix double press to activate menu items 2024-04-13 13:21:17 +10:00
Stenzek
e027874468 ImGuiManager: Increase key repeat delay 2024-04-13 13:21:17 +10:00
Stenzek
a1ec590bf8 FullscreenUI: Avoid per-frame memory allocations with SmallString
Backport of de1a1af908
2024-04-13 13:21:17 +10:00
Stenzek
35525d5304 SettingsInterface: Add SmallString overloads
Backport of 631fca3042
2024-04-13 13:21:17 +10:00
Stenzek
9fdd609add 3rdparty/imgui: Use face up for menu 2024-04-13 13:21:17 +10:00
Stenzek
9fa409a1a9 SmallString: Add missing methods
Backport of
79c226efff
2cd747983a
6b7cf6a432
f75a5605eb
2024-04-13 13:21:17 +10:00
Stenzek
ece20b1307 Image: Don't pass FILE across CRT boundary
Fixes crash using libpng/libjpeg in Debug builds.
2024-04-13 12:35:22 +10:00
Stenzek
ff0b748d58 Qt: Change stateChanged() to checkStateChanged()
Introduced in Qt 6.7.
2024-04-13 12:35:22 +10:00
Stenzek
c746a3c4e6 Qt: Fix 6.7.0 deprecation warnings 2024-04-13 12:35:22 +10:00
Stenzek
b1aa82db18 CI/Flatpak: Bump to KDE 6.7 SDK 2024-04-13 12:35:22 +10:00
Stenzek
f6e08f3cc2 CI/Flatpak: Swap to CMake for building SDL2
Consistency.
2024-04-13 12:35:22 +10:00
Stenzek
fbfdf1200d GS/Vulkan: Gate non semantic debug info behind extension 2024-04-13 12:35:22 +10:00
Stenzek
1cd4ba2698 CI: Add non semantic debug option to shaderc 2024-04-13 12:35:22 +10:00
Stenzek
17e0d9fcbe GS/Vulkan: Fix depth not clearing with first colclip draw 2024-04-13 12:33:58 +10:00
KamFretoZ
91b0b16b35 BPM: Light Mode color scheme update 2024-04-10 21:18:05 +10:00
KamFretoZ
b86c72732f BPM: Fixes swapped arrow key glyphs 2024-04-09 15:54:58 +01:00
Silent
91f16ae45a Debugger/CPUWidget: Make "Go to in Memory View" open the Memory View 2024-04-08 19:54:46 +01:00
Silent
272c0369f1 Debugger: Untangle the breakpoints data flow to resolve races
Tightens the data flow between the CPU and UI threads
to resolve multiple race conditions, such as:
1. Unbinding a debug interface update CB while it's in use,
    causing a possible use-after-free.
2. Binding breakpoints via the disassembly widget that would read
    a stale local variable, and bind the breakpoint to a bogus address

+ probably more subtle races that are now resolved
2024-04-08 19:54:46 +01:00
Ty Lamontagne
c0a6e21599 DebugTools: Properly Mark Addresses < 0xBFC00000 as Invalid
Fixes asserts and possible crashes in release when these addresses are accessed in the debugger.
2024-04-08 19:54:46 +01:00
Silent
6d478021f9 Debugger: Prompt for HC restart on Boot and Debug 2024-04-08 19:54:46 +01:00
Silent
5e1009b4fb Debugger: Unbind the BP UpdateHandler on destructing DebuggerWindow
Prevents an use-after-free on the DebuggerWindow object
2024-04-08 19:54:46 +01:00
PCSX2 Bot
c3c602b5a4 Qt: Update Base Translation 2024-04-08 18:20:02 +02:00
RedDevilus
18e484f766 GameDB:Bigger blob of various fixes
Harry Potter half-blood prince
Soukou kihei votoms
Harry potter Prisoner of azkaban
Titeuf
Rygar
Ruff Trigger
2024-04-08 18:19:44 +02:00
TellowKrinkle
82bd9bbd6c Core: Work around GCC bug 2024-04-08 18:16:25 +02:00
TellowKrinkle
5271e83824 Common: Don't forceinline vararg functions
No compiler actually inlines them, and GCC issues an error saying that it can't force inline vararg functions
2024-04-08 18:16:25 +02:00
TheLastRar
52ddb0efd9 DEV9: Increase allowed number of to be ACKed tcp packets 2024-04-08 18:12:15 +02:00
TheLastRar
7903c7c17e DEV9: Improve tracking of acknowledged data 2024-04-08 18:12:15 +02:00
TheLastRar
8a14552e56 DEV9: Move and fix GetDelta Function 2024-04-08 18:12:15 +02:00
TheLastRar
569b93da51 DEV9: Correct Console Logs 2024-04-08 18:12:15 +02:00
TheLastRar
889af7cf17 DEV9: Increase number of tracked sent SEQ number 2024-04-08 18:12:15 +02:00
PCSX2 Bot
d685a7f2fe PAD: Update to latest controller database. 2024-04-08 18:07:43 +02:00
lightningterror
9849992cfd GS/HW: Cleanup EmulateBlending a bit more. 2024-04-08 17:53:12 +02:00
refractionpcsx2
30f4e77b31 GS/HW: Rearrange color on shuffle if SW Blend or TFX 2024-04-08 12:09:30 +01:00
lightningterror
b1f4f67130 GS/HW: Add support for blend second pass.
Allows us to blend Cd with full alpha range of 0-2 bypassing hw blend limitations.
Not all Cd cases are covered, but it's a good start.

Also allows us to do Ad cases where we can double the blend to get the
proper blend result since Ad range is 0-1 instead of 0-2.
2024-04-07 20:04:50 +02:00
KamFretoZ
dcdb39026c Qt: Use window modality for message boxes
Backport from DuckStation:
86927ea3eb
2024-04-06 22:36:38 +10:00
KamFretoZ
14a1d7a608 Qt: Fix native message boxes on MacOS
Backported from DuckStation:
f0f1473b6e
2024-04-06 22:36:38 +10:00
KamFretoZ
eafdd8bc76 Qt: Translatification 2024-04-06 22:36:38 +10:00
Stenzek
72e8ba2203 Qt: Change 'N/A' to 'No Image' in status bar 2024-04-06 22:21:53 +10:00
Stenzek
fdb29a3a09 Docs: Add shaderc to third-party licenses 2024-04-06 22:21:53 +10:00
Stenzek
c8698dac79 3rdparty/imgui: Update to v1.90.4 2024-04-06 22:21:53 +10:00
Stenzek
25726d2aef 3rdparty: Remove glslang 2024-04-06 21:16:52 +10:00
Stenzek
ec3f1b2aa4 GS/Vulkan: Swap out glslang for shaderc 2024-04-06 21:16:52 +10:00
Stenzek
291ce2cbb0 CI: Build shaderc as part of deps 2024-04-06 21:16:52 +10:00
Connor McLaughlin
49c199e7e8 GSRunner: Fix build on Windows 2024-04-06 17:43:13 +10:00
Stenzek
e6ff49eb60 GS/OpenGL: Use EGL 1.5 platform interface 2024-04-06 14:37:55 +10:00
Stenzek
8890e5948b Common: Sync DynamicLibrary with DuckStation 2024-04-06 14:37:55 +10:00
Stenzek
651e9a7f9c Docs: Update third-party notices
- Remove jpgd.
- Add FreeType, HarfBuzz, libjpeg.
2024-04-06 13:17:22 +10:00
Stenzek
caf0ade6f3 3rdparty: Remove jpgd 2024-04-06 13:17:22 +10:00
Stenzek
431b2c5b83 USB: Swap jpge for libjpeg 2024-04-06 13:17:22 +10:00
Stenzek
ebf0cf91b6 GS: Support saving WebP screenshots 2024-04-06 13:17:22 +10:00
Stenzek
590b81a782 Image: Use libjpeg and support WebP saving
Backport from:

f3c0c14b2a
c854b8f85e
2024-04-06 13:17:22 +10:00
Stenzek
6808db1cde 3rdparty: Remove unused in-tree libs 2024-04-06 13:17:22 +10:00
Stenzek
dfa5fccec9 Build: Unify shared libraries across platforms
Use DLLs/shared libraries for:
 - libjpeg
 - libpng
 - libwebp
 - lz4
 - SDL
 - zlib
 - zstd
2024-04-06 13:17:22 +10:00
Stenzek
d5290e93a8 Qt: Fix crash on shutdown settings save 2024-04-05 21:12:59 +10:00
Connor McLaughlin
056a8d0274 Updater: Fix incorrect CoInitializeEx() call 2024-04-05 20:52:04 +10:00
JordanTheToaster
da7284f185 GH: Bug report clarification 2024-04-04 21:11:21 +01:00
JordanTheToaster
434001d4a3 GameDB: Various fixes 2024-04-04 21:11:21 +01:00
Stenzek
14ad8014e2 CMake: Skip deploying dxcompiler on Windows
We don't need it (yet).
2024-04-04 23:10:15 +10:00
Stenzek
dd82ee532c Updater: Use IFileOperation for cleanup 2024-04-04 23:10:15 +10:00
Stenzek
29a961a407 Qt: Fix a couple more missing native separator calls 2024-04-04 17:35:14 +10:00
Stenzek
7066369887 Qt: Fix BIOS list 2024-04-04 17:35:14 +10:00
Stenzek
efa8f058d4 Deps: Update to Qt 6.7.0 and SDL 2.30.2 2024-04-04 11:49:22 +10:00
Stenzek
f8b18d406f Qt: Ensure settings are writable before running setup wizard 2024-04-04 11:40:10 +10:00
Stenzek
332be6c771 SettingsInterface: Add Error to Save() 2024-04-04 11:40:10 +10:00
Stenzek
81502e6c7d FileSystem: Add Error to CreateDirectory()/RenamePath() 2024-04-04 11:40:10 +10:00
Stenzek
b06da6607b Error: Add prefix methods 2024-04-04 11:40:10 +10:00
Stenzek
f3d6249cc1 FileSystem: Handle paths longer than MAX_PATH on Windows 2024-04-04 11:39:40 +10:00
refractionpcsx2
c16ac2034c GS/HW: Fix operator precedence warning 2024-04-03 21:40:34 +01:00
refractionpcsx2
c5dfc5d5da GS/TC: Read indexed texture from GS memory if complete dirty overlap 2024-04-03 21:40:34 +01:00
Stenzek
2693bbff95 GS/HW: Prioritize loading required replacement textures over precache 2024-04-03 19:29:21 +10:00
refractionpcsx2
8e008288b6 GS/HW: Further fix up RTA handling 2024-04-02 21:48:32 +01:00
refractionpcsx2
effdfd5a22 GS/HW: Fix up some RTA behaviour and reduce copies 2024-04-02 21:48:32 +01:00
refractionpcsx2
8a73f98b1f GS/TC: When preloading new targets, include the preloaded size as valid 2024-04-02 21:48:32 +01:00
refractionpcsx2
553ad0a372 GS/HW: Stop 24bit targets from RT Alpha correcting 2024-04-02 21:48:32 +01:00
JordanTheToaster
088ba4e2ea GameDB: Various fixes 2024-04-01 18:37:54 +01:00
PCSX2 Bot
1cd69977e4 PAD: Update to latest controller database. 2024-04-01 18:22:47 +02:00
Stenzek
69349e9d38 GS/HW: Fix loading replacement textures 2024-04-01 18:22:37 +02:00
JordanTheToaster
aeb3cb0945 GameDB: Various fixes 2024-04-01 13:40:04 +01:00
refractionpcsx2
c729a6f91c GS: Move PrimitiveWithoutGaps function to GSState 2024-04-01 13:35:44 +01:00
refractionpcsx2
f3a75f55e7 GS: Improve optimizing scissoring texture when REPEAT sampling 2024-04-01 13:35:44 +01:00
Mrlinkwii
8dce187746 Docs: Remove XZ Utils from thirdpartynotices (#11016) 2024-04-01 22:26:29 +10:00
Stenzek
fce8317da7 GS/HW: Compute source alpha min/max based on texture instead of CLUT
Stops alpha from unused CLUT colours from leaking into the alpha range,
saves a good number of draw calls on many games, and some RTA
conversions.
2024-04-01 21:51:03 +10:00
Stenzek
64a471b5a2 GS/TextureCache: Remove redundant parameter to RTA{De,C}orrect 2024-04-01 21:51:03 +10:00
Stenzek
c9fdd0197f GS/TextureCache: Fix incorrect alpha min/max read on block offsets 2024-04-01 21:51:03 +10:00
Stenzek
c650b4b00f Qt: Fix vanishing status bar renderer info 2024-04-01 13:03:59 +10:00
Stenzek
64b6dec56f Qt: Fix crash on shutdown with BP mode open 2024-04-01 13:03:49 +10:00
refractionpcsx2
4d531384e9 GS/HW: Avoid deleting depth targets on shuffles 2024-03-31 19:15:40 +01:00
Stenzek
085699f9de GS/Vulkan: Fix incorrect clear colour for fast colclip 2024-03-31 19:02:23 +10:00
refractionpcsx2
9de38e50e2 GS/HW: Improve handing of some texture shuffles
More prominent when using an API without barriers (like Direct3D)
2024-03-30 11:43:20 +00:00
refractionpcsx2
545fbdeed1 GS/HW: Round source lookup rect to block boundary and improve overlap check.
- also clean up formatting in GSTextureCache.cpp
2024-03-30 11:43:20 +00:00
Stenzek
a959d33f85 GS/DX12: Fix FXAA compilation 2024-03-30 21:37:29 +10:00
Stenzek
00b2ad49d5 CI: Remove xz/liblzma from build scripts 2024-03-30 21:37:29 +10:00
Stenzek
872f5c677d 3rdparty: Remove xz
Had a backdoor. Best to not trust it.
2024-03-30 21:37:29 +10:00
Stenzek
ad81318854 GS: Replace xz/liblzma with 7zip LZMA SDK 2024-03-30 21:37:29 +10:00
Stenzek
907ae642d0 Common: Update FixedArray.h from DuckStation 2024-03-30 21:37:29 +10:00
Stenzek
299fd3d5ad GS/DX11: Re-enable FL10 support with a warning 2024-03-30 11:33:57 +10:00
Stenzek
4dca6c3bb2 GS/DX: Fix ALT+ENTER causing mode switch 2024-03-29 23:05:07 +10:00
Stenzek
615e30fa52 GS/OGL: Fix recursive macro compile error
On some Intel drivers.
2024-03-29 23:04:43 +10:00
Stenzek
8679755d18 GSDevice: Improve IsEffective() test
Ensure blending is disabled when colormask is zero.

Intel's (older) DX11 drivers apparently crash the GPU when SRC1_COLOR is
used in blend, when the shader doesn't output it, even though it's not
being written.

It was also missing entirely for OpenGL.
2024-03-29 23:04:43 +10:00
Stenzek
11ee0a8613 GS: Remove reduced-depth-range hack 2024-03-29 20:44:02 +10:00
Stenzek
7ddf6386f1 GS: Remove DSB feature
No longer needed, since it's mandatory.
2024-03-29 20:44:02 +10:00
Mrlinkwii
253e02b4c1 Config: Allow the use of portable.txt (#10984) 2024-03-29 13:12:00 +10:00
JordanTheToaster
b2b7fa36bb Qt: Remove Speed Limiter setting
Causes confusion when users untick it and wonder why games won't react to F4 or tab.
2024-03-28 14:04:26 +00:00
JordanTheToaster
cf1f2d6919 GameDB: Various fixes 2024-03-28 14:04:26 +00:00
AKuHAK
9c320a90db CDVD: fix sceCdReadConsoleID on bios v1.70 and up 2024-03-28 13:42:08 +00:00
Stenzek
5be4326626 GS: Purge GSinit() and GSshutdown() 2024-03-28 17:25:59 +10:00
KamFretoZ
0384d9c29f OSD: Minor adjustment to basic blending notification 2024-03-28 08:02:44 +01:00
lightningterror
aa82789132 GS/Metal: Fix Wunused-const-variable warning. 2024-03-28 05:48:42 +01:00
Stenzek
2eab0f9757 GS: Improve state load determinism
CLUT wasn't force reloaded, so if the game didn't write to TEX0 before
its first draw after loading a state, you got either the CLUT before the
state was loaded, or random/uninitialized garbage.

Do the same for reset as well, except zero it out in that case.
2024-03-28 12:56:51 +10:00
Stenzek
a317e9c038 GS/HW: Improve accuracy of RGB_ONLY AFAIL
Instead of breaking the draw into two passes, which breaks when
fragments overlap each other and blending is enabled, use blending to
leave the value of Ad intact when a pixel fails the alpha test.

In the case of DATE being enabled, prefer PrimID over stencil, as since
we are changing Ad on a per-fragment basis, with some fragments not
being modified, stencil DATE will become desynchronized with the value
of Ad.
2024-03-28 11:46:20 +10:00
Stenzek
b644f85f51 GSDevice: Add separate RGB/A blend factors 2024-03-28 11:46:20 +10:00
Stenzek
ee3b6e59eb GS: Use SRC1_COLOR instead of SRC1_ALPHA for DSB
Frees up the alpha channel of the second source for use with single pass
afail.
2024-03-28 11:46:20 +10:00
Stenzek
0917d49a01 GS: Remove separate alpha pass fallback
This is just wrong when overlap and depth writes are involved.
2024-03-28 11:46:20 +10:00
lightningterror
0d61f154d7 GS/HW: Cleanup blend function, update blend levels.
Cleanup and optimize blend levels for all renderers:
For Gl/Vk
High blend: Prefer sw blend when RTA > 128, otherwise try to use RTA correction.

For DX:
Medium blend: Prefer sw blend on Ad cases where prims don't overlap, alpha masked case or rta correction isn't possible.
High: Prefer sw blend on Cd*(Alpha + 1) cases where prims don't overlap.
Full: Prefer sw blend on cases where Alpha > 128 when prims don't overlap.

Add some optimizations for Ad cases to not do any blending depending on Alpha value.
2024-03-26 12:55:16 +01:00
refractionpcsx2
d6e3eccf45 GS/HW: Detect shuffles reshaping the target 2024-03-26 07:46:02 +00:00
TellowKrinkle
e9ac262cd3 GS:MTL: RTA correction shader is used to scale textures
Can't use a DirectReadTextureIn, which reads from the pixel with the same location
2024-03-26 07:38:16 +00:00
TellowKrinkle
68a71d2e12 GS:MTL: Formatting 2024-03-26 07:38:16 +00:00
TellowKrinkle
478033037f GS: Treat rta as a bit flag 2024-03-26 07:38:16 +00:00
refractionpcsx2
059ec49389 GS/HW: RTA improvements and enhancements 2024-03-25 17:58:12 +00:00
dependabot[bot]
d0f070bf97 ci: Bump the ci-deps group with 5 updates (#10944)
Bumps the ci-deps group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `5` | `6` |
| [actions/cache](https://github.com/actions/cache) | `3` | `4` |
| [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) | `6.1` | `6.2` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `1` | `2` |
| [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) | `1` | `2` |


Updates `peter-evans/create-pull-request` from 5 to 6
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

Updates `actions/cache` from 3 to 4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

Updates `mathieudutour/github-tag-action` from 6.1 to 6.2
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases)
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2)

Updates `softprops/action-gh-release` from 1 to 2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

Updates `microsoft/setup-msbuild` from 1 to 2
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1...v2)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-deps
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-deps
- dependency-name: mathieudutour/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci-deps
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-deps
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-24 12:45:58 -04:00
refractionpcsx2
452f9e4b50 GS/HW: Check both edges of current triangle for quads 2024-03-24 12:20:33 +00:00
refractionpcsx2
2a6d71cd5a GS/HW: Compare dirty rects by valid bounds 2024-03-24 11:55:26 +00:00
refractionpcsx2
4ba43b8496 GS/HW: Improve channel + texture shuffle detection and processing 2024-03-24 11:38:33 +00:00
Connor McLaughlin
9e42bf7385 CI: Set build-log-url for Flathub upload 2024-03-23 14:24:53 +10:00
lightningterror
4ace75151f USB: Cleanup usb qemu.
Make it suck less.
2024-03-23 14:21:18 +10:00
Stenzek
f416fd7a9e UnitTests: Only build SSE4 on Apple Silicon host 2024-03-23 12:14:56 +10:00
Stenzek
e20984a5f7 CI: Swap to MacOS 14 runner 2024-03-23 12:14:56 +10:00
Stenzek
18e3a9987e deps: Build MoltenVK on MacOS 2024-03-23 12:14:56 +10:00
Stenzek
fb1a5eab7e Qt: Don't invoke quit() from closeEvent() 2024-03-23 12:14:19 +10:00
Stenzek
8ae01f642f Qt: Enable unifiedTitleAndToolBarOnMac for main window 2024-03-23 12:14:19 +10:00
refractionpcsx2
20fa3b6af9 GS/HW: Make sure RTA doesn't correct when it can't 2024-03-22 18:03:23 +00:00
TellowKrinkle
a462c914fc CI:mac: Update to Xcode 15.2 2024-03-23 00:01:43 +10:00
TellowKrinkle
60cb78577f CI:mac: Set CMAKE_INSTALL_NAME_DIR
CMake defaults to using rpath-based installs, but doesn't set rpath to include the deps dir when building, breaking Qt builds when they try to invoke rcc (which links against zstd) from the build dir
2024-03-23 00:01:43 +10:00
TellowKrinkle
e8ad355a90 CI:mac: Use shared cmake config variable 2024-03-23 00:01:43 +10:00
TellowKrinkle
0a161f9591 CI: Support relative dirs in install scripts 2024-03-23 00:01:43 +10:00
Stenzek
234acf5ca2 Qt: Fix main window stuck open after update 2024-03-22 22:58:29 +10:00
KamFretoZ
7689729d9b README: Update docs link 2024-03-22 08:11:57 +00:00
refractionpcsx2
6177825939 GameDB: Fix SSX On Tour NTSC-US patch 2024-03-22 08:10:06 +00:00
KamFretoZ
a74a236654 Qt: Update docs link on setup wizard
Since the links for the docs has been changed, update the link on the setup wizard.
2024-03-22 12:37:13 +10:00
lightningterror
93a1ae9f2f GameDB: Add some gshw fixes.
Add full mipmap with ps2 trilinear to Global Storm:
Fixes ground textures.

Add missing autoflush fixes to other regions of Terminator 3 The Redemption:
Fixes environment lights visible through player model.
2024-03-22 03:29:41 +01:00
JordanTheToaster
3f4d9fd23c Qt: Fix closing log window via taskbar 2024-03-21 13:07:48 +10:00
refractionpcsx2
23d98e9352 GS/HW: Optimize RTA correction to reduce copies 2024-03-20 23:51:17 +00:00
lightningterror
8f381a4e16 GS/HW: Improve how we handle texture shuffles with barriers.
If barriers are already present and it's a texture shuffle then prefer full sw blend, it will be more accurate with no cost.

One barrier is enough for texture shuffles, no need to do full, which means less texture barriers and draw calls.
2024-03-19 15:38:20 +01:00
PCSX2 Bot
7e43448110 PAD: Update to latest controller database. 2024-03-18 17:33:05 +01:00
JordanTheToaster
3ca9680c88 UI: Rename screenshot size options 2024-03-18 14:43:24 +01:00
JordanTheToaster
6f1048d6fd GameDB: Various fixes 2024-03-18 14:43:24 +01:00
nishi
6d92cee5bb GameDB: NTSC-J Fixes. (#10928)
Typo/mistake corrections and improvements to sorting.
2024-03-18 14:19:24 +01:00
Pierre GRASSER
d1bff18e0c UI: Add the "points" unit in some RA-related strings (#10917) 2024-03-17 22:29:09 +00:00
refractionpcsx2
4d2b2e5803 GS/HW: Decorrect targets for readbacks. 2024-03-17 17:24:39 +01:00
refractionpcsx2
bfef8397d6 GS/HW: Allow source is rt to use corrected alpha in most cases. 2024-03-17 17:24:39 +01:00
lightningterror
886a368297 GS/HW: Clean up Correct/Decorrect calls and functions.
No need to check m_rt_alpha_scale and m_type == RenderTarget when we already check them in the Correct/Decorrect functions.
2024-03-17 17:24:39 +01:00
lightningterror
73d617fb72 GS/HW: RTA Decorrect on Target Update. 2024-03-17 17:24:39 +01:00
lightningterror
3a2888a5d5 GS/HW: Adjust RTA shader precision. 2024-03-17 17:24:39 +01:00
lightningterror
97237c963f GS/HW: Check if channel shuffling actually needs decorrecting.
Saves copies.
2024-03-17 17:24:39 +01:00
lightningterror
f2b3db9cbc GS/HW: Improve how we handle decorrection on texture shuffles.
Avoid copies if we can.
2024-03-17 17:24:39 +01:00
refractionpcsx2
7a547e64c4 GS/HW: RTA checks for moves and DST matches and ICO CRC. 2024-03-17 17:24:39 +01:00
lightningterror
6a5ac4fe54 GS/HW: Avoid corrections on new targets. 2024-03-17 17:24:39 +01:00
lightningterror
500e86c43c GS/HW: Update TargetClear to work with RTA Correction. 2024-03-17 17:24:39 +01:00
lightningterror
0900c2fd8b GS/HW: RTA Correction, implement on DATE.
Less copies, and makes it work with DATE.
2024-03-17 17:24:39 +01:00
lightningterror
58628b8dd3 GS/HW: Make sure we don't multiply Cs if Ad is corrected.
Another potential to avoid copies.
2024-03-17 17:24:39 +01:00
lightningterror
71376ff4e6 GS/HW: Decorrect Ad on sw blend in tfx shader.
Otherwise if we do decorrection in covert shader we add more copies.

Also make sure to decorrect for fbmask, tex is fb.
2024-03-17 17:24:39 +01:00
lightningterror
fff4aea076 GS/HW: Avoid (Ad + 1) cases on RTA correction.
HW blend will be wrong here so no need to do copies.
2024-03-17 17:24:39 +01:00
lightningterror
6c9f132093 GS/HW: Add support for Ad (RTA) correction.
The idea is to adjust the alpha destination for more
accurate hw blending which will work on all renderers.

Old behavior has Ad in range within 0-1 whereas for blending 0-2 is needed.

copy rt -> adjust the alpha -> copy back the adjusted alpha-> restore old alpha after blending is done
2024-03-17 17:24:39 +01:00
refractionpcsx2
3b7ad788bf GS/HW: Improve shuffle width/height detection 2024-03-16 11:19:26 +00:00
lightningterror
867afd7da0 Qt: Disable Texture barriers option on Metal.
Not implemented.
2024-03-15 18:02:54 +01:00
lightningterror
c4bfdc4506 GS/Metal: Fix some Wformat warnings. 2024-03-14 18:18:57 +01:00
lightningterror
a7c5eebf99 GS/HW: Adjust blend mix for impossible blend.
Since we can't do Cd*(Alpha + 1) - Cs*Alpha in hw blend what we can do is adjust the Cs value that will be subtracted,
this way we can get a better result in hw blend. Result is still wrong but less wrong than before.
2024-03-14 16:16:11 +01:00
Dan McCarthy
a2a6a98635 Debugger: Fixes crash selecting a filter search with new search button
Fixes crash issues when trying to use a search comparison that requires prior results with the New Search button instead of Filter Search.
2024-03-14 01:42:11 +01:00
Dan McCarthy
d309e24e60 Debugger: Reduces RAM useage for searches (Act 1)
Reduces memory useage during memory searching process.
- Minimizes passing by copy, uses references to avoid causing copies
- Deletes FutureWatcher ptr when no longer needed to avoid leaking memory (thanks Fobes)
- Updates the search results vector in-place so that no extra copies are needed.
- Makes use of std::move to transfer resources instead of keeping two copies.
- No longer keeps a copy of prior search results in addition to the active search, the stored results are transferred to the search worker and then transferred back.

More improvements to be made, but making a first that should make a
decent impact.

Also: Updates storage of prior results a s a vector now.
Prior since the results were stored in a hashmap, the .keys() function needed to be used to index at an arbitrary point when loading results into the UI.

This caused a big spike in memory usage when the results count is particularly large.
Using a vector optimizes this as we don't need to add any memory when indexing in this way.

Also unlike before when we used vector, we're also removing elements in place when doing filter searches so we don't need two vectors.
2024-03-14 01:42:11 +01:00
KamFretoZ
7abbdf89af OSD: Add Memcard Icon in more places 2024-03-13 11:57:36 +00:00
KamFretoZ
4720f69b76 BPM: Implement "Open in File Browser" Function 2024-03-13 11:57:36 +00:00
Stenzek
515cbc7b29 Path: Add CreateFileURL() 2024-03-13 20:13:35 +10:00
lightningterror
b4992856f7 GS/HW: Instead of adjusting blend min/max, adjust GetAlphaMinMax.
Might help in blending cases.
2024-03-12 11:25:29 +00:00
lightningterror
74df63ff94 GS/HW: Remove blend_ad_improved case.
Didn't work properly and will be useless when RTA correction pr is merged.
2024-03-12 11:25:29 +00:00
lightningterror
52ac8f0d7b GS/HW: Calculate blend/rt alpha min/max based on alpha test. 2024-03-12 11:25:29 +00:00
lightningterror
760ea91cc1 GS/HW: Adjust blend_alpha_min/max based on DATE. 2024-03-12 11:25:29 +00:00
refractionpcsx2
2324922111 GS/HW: Don't allow conversion to indexed is read is outside the target 2024-03-12 09:12:56 +00:00
PCSX2 Bot
1cfc2780d0 PAD: Update to latest controller database. 2024-03-11 17:04:34 +01:00
lightningterror
c0e47767b7 GS/HW: Adjust dither on Blend Mix when Cs-Cd * Af blend. 2024-03-10 23:41:18 +00:00
refractionpcsx2
65649b3cbb GS/HW: Adjust dither on Blend Mix when Cs-Cd * As blend. 2024-03-10 23:41:18 +00:00
Stenzek
d28ba0e53c GS/HW: Don't include TBW in hash cache key
Since we're hashing at the block level, a different TBW that causes a
different-looking texture should cause different blocks to get hashed,
and thus, a different hash.
2024-03-10 23:22:34 +10:00
Stenzek
4fef86a635 GS/HW: Reduce duplicates in hash cache
- Don't include TCC in the hashed TEX0 bits.
 - Hash the region size, not rectangle.

Significantly reduces hash cache size in Ace Combat 5, over the course
of 30 frames from 1,000+ textures down to 400.

NOTE: This will change texture replacement hashes. Any "old" region
textures will transparently be converted to the new internal name format
upon loading.
2024-03-10 18:26:14 +10:00
Stenzek
b16bb14c58 GS/Vulkan: Work around NVIDIA attachment clear bug 2024-03-10 13:16:18 +10:00
Stenzek
36278b6aae GS/HW: Handle redundant FRAME+Z buffer clears 2024-03-10 13:16:03 +10:00
Stenzek
88165ab072 CI: Update to SDL2 2.30.1 and Qt 6.6.2 2024-03-09 14:04:14 +10:00
Stenzek
5337e46f43 Qt: Fix log window disabling itself on close 2024-03-08 23:43:13 +10:00
Stenzek
7ed6801101 VulkanDevice: Add additional semaphore on swap chain
We don't actually need +1 semaphores, or, more than one really.
But, the validation layer gets cranky if we don't fence wait before the next image acquire.
So, add an additional semaphore to ensure that we're never acquiring before fence waiting.
2024-03-08 23:42:58 +10:00
dreamsyntax
162354decf Qt: Toggle for DualSense Player LED 2024-03-07 12:37:00 +10:00
Ty Lamontagne
483c7f41de vmmanager:revert gpu logging 2024-03-07 02:34:53 +00:00
Ty Lamontagne
46e039dab2 VMManager: Log power profile and GPUs on startup 2024-03-07 01:21:28 +00:00
refractionpcsx2
4d23410b99 GS/HW: Pre check DATE requirement before updating rt alphas 2024-03-07 01:20:25 +00:00
JordanTheToaster
88192adfd0 GameDB: God of War 2 Fixes 2024-03-05 12:21:14 +00:00
KamFretoZ
e3c745cf9b OSD: Fix Recording Icon 2024-03-05 12:19:51 +00:00
Pierre GRASSER
e5de4c8f10 UI: Fix broken setup guide links 2024-03-05 00:51:03 +00:00
PCSX2 Bot
511cb0c322 PAD: Update to latest controller database. 2024-03-04 17:07:55 +01:00
PCSX2 Bot
688306dd9c Qt: Update Base Translation 2024-03-03 00:10:02 +00:00
refractionpcsx2
d39e655fa2 GS/HW: Require alpha for 8H, 4HH, 4HL on source lookup 2024-03-02 21:18:33 +00:00
refractionpcsx2
812a3c1123 GS/HW: Improvements to rt alpha accuracy 2024-03-02 15:28:55 +00:00
KamFretoZ
244a8775dd Qt: Fix InterfaceSettingsWidget layout 2024-03-02 15:08:11 +00:00
KamFretoZ
5e28c2608a FSUI: Icon treatments
OSD: Add Icon for USB Devices
2024-03-02 15:08:11 +00:00
Dan McCarthy
bd032bbcb8 Debugger: Memory search expansions + results count
Adds memory search comparisons for Increased, Increased By, Decreased, Decreased By, Changed, Not Changed, Changed By.
For arrays, adds not equals, changed, not changed for filter searches.
Now only shows the comparison types that are currently valid for the given search type and if there's prior search results.

Also refactors to allow holding the prior set of search results rather than just the addresses, needed for these search comparisons to work.

Also adds a ui label to show that the debugger is searching after clicking the search button which then gets replaced with the results count when the search completes.
2024-03-02 14:49:15 +00:00
Stenzek
875fdc40a5 GS/Vulkan: Don't ever fully clear stencil on DATE draws
We manually clear the drawn region when it's needed, in all other cases
it's pre-filled with the setup.

Therefore, the two load actions should be preserve and don't care.
2024-03-02 12:42:42 +10:00
Stenzek
0ae3cbf4d6 GS/Vulkan: Use attachment clear for ONE stencil
66% faster in Persona 3 in DATE-heavy scenes.
2024-03-02 12:42:42 +10:00
JordanTheToaster
b9a7143dee GameDB: Arc the Lad TOTS Fixes 2024-03-01 18:57:29 +00:00
Stenzek
ef9cbf6be8 3rdparty/rcheevos: Bump to 3d01191 and move in-tree
- aes and 3DS functions in hash.c removed, due to potential legal issues.
 - .github/test/validator directories removed, as they are unnecessary.
2024-02-29 15:46:05 +10:00
Dan McCarthy
a903387182 Debugger: Add automatic refresh on 1 second interval
The debugger now refreshes/updates it's widgets once a second so that the user does not need to interact with the debugger to know when data/state changes.
2024-02-28 17:07:56 +00:00
Ty Lamontagne
4919f9b18c DebugTools: Add noreturn heuristic 2024-02-28 16:48:54 +00:00
JordanTheToaster
b07b56fce6 GameDB: FIFA Street 2 Fixes 2024-02-28 14:53:41 +00:00
JordanTheToaster
3a8845dc6f GameDB: FIFA 14 Fixes 2024-02-28 02:06:04 +00:00
refractionpcsx2
de64f784e8 GS/HW: Calculate alpha on updated areas on RT invalidation 2024-02-27 18:19:32 +00:00
PCSX2 Bot
f2a614913d PAD: Update to latest controller database. 2024-02-26 18:43:23 +01:00
JordanTheToaster
6b54094e26 GameDB: Various fixes 2024-02-25 14:56:11 +00:00
Stenzek
4442ff7221 CI/Flatpak: Fix dubious ownership error 2024-02-24 14:54:24 +10:00
Bart Piotrowski
19c3dd8419 ci: Switch Flatpak build to flathub-infra/flatpak-github-actions (#10838)
* ci: Switch Flatpak build to flathub-infra/flatpak-github-actions

Flathub team has recently forked flatpak-github-actions and merged
various PRs submitted to the original repo. However, it's not versioned
(yet?), so pin the latest commit instead.

Additionally, enable validation of the build using flatpak-builder-lint,
and run all steps in the container with the runtime and required tooling
baked in.

* Update mirror-screenshots-url

* Shush git complaining about "dubious" ownership

* Update date format to iso8601

* Fix flatpak-builder-lint invocations
2024-02-24 14:19:35 +10:00
JordanTheToaster
9c9d2b7c9c 3rdparty: Update xbyak to 7.05.1 2024-02-23 22:04:46 +00:00
Dan McCarthy
f00f0cc846 Debugger: Fixes crash on debugger open when cpu not alive
The debugger was crashing on open if no game was running due to failing to read from the CPU while the cpu was not alive.

The opcode was read before checking if it should be shown, so I have moved it to only read if the showOpcode boolean is true, and set it to not show opcodes of the cpu is not alive.
2024-02-23 11:36:41 +00:00
Ty Lamontagne
78b6323272 DisassemblyWidget: Allow showing opcodes & some key bind modification 2024-02-23 01:28:44 +00:00
refractionpcsx2
a272d99335 GS/HW: Preload whole target on match 2024-02-21 20:37:34 +00:00
Dan McCarthy
ce5e66a2d5 Debugger: Migrates Memory Search tab to it's own widget
Moves the Memory Search fucntionality to it's own widget so as to not pollute the CpuWidget with search related functionality, especially as it is intended to grow in scope. CpuWidget is fairly general and as such everything tends to get tossed together which makes it harder to navigate/understand/maintain.
2024-02-21 00:25:40 +00:00
Matías Israelson
1f584736f1 Core: Correctly identify TOOL and Namco 246/256 bios (#10836) 2024-02-21 00:16:07 +00:00
JordanTheToaster
645dc3fa9d GameDB: Jak TLF Fixes 2024-02-20 14:02:18 +00:00
Sestain
96a72286b7 GameDB: Add PCRTCOverscan to Crash Twinsanity (PAL) 2024-02-20 14:01:21 +00:00
Stenzek
d3c97bedb9 ImGuiManager: Defer scale updates
Fixes OSD spinbox closing on click, and popups closing on window resize.
2024-02-20 15:52:44 +09:00
Stenzek
e6303cef9e 3rdparty/libchdr: Rebase to upstream 2a1119c
Backport of 0e6a9f637b
2024-02-20 15:52:23 +09:00
PCSX2 Bot
5b5e11828f PAD: Update to latest controller database. 2024-02-19 17:07:05 +01:00
DigitalMajestic
84972d2548 UI: Update SW Renderer Threads Tooltip 2024-02-18 19:46:35 +00:00
TellowKrinkle
76be30f5c8 GitHub: Update macOS versions on issue templates 2024-02-17 16:21:07 -06:00
Connor McLaughlin
689a512f5d GS/Vulkan: Use fbfetch flag for subpass dependency
llvmpipe apparently supports raster order attachment access now, and if you force-disable fbfetch, it wasn't creating the render passes with the self-dependency declared.
2024-02-17 15:16:05 +00:00
JordanTheToaster
f81d555f7e GSBlock: Add Zen 4 to comment 2024-02-17 15:15:51 +00:00
JordanTheToaster
83376d3f3b Misc: Rename Disable Depth Emulation
Renames Disable Depth Emulation to Disable Depth Conversion as it is both more correct to what it does and less likely for a user to think it is free performance.
2024-02-17 15:15:51 +00:00
JordanTheToaster
ea00a89cff Interpreter: Comment cleanup 2024-02-17 15:15:51 +00:00
JordanTheToaster
418a97a02a R5900: Comment cleanup 2024-02-17 15:15:51 +00:00
JordanTheToaster
d2830b77ec GameDB: Various fixes 2024-02-17 15:15:51 +00:00
PCSX2 Bot
dcb60c785f PAD: Update to latest controller database. 2024-02-17 09:16:15 +01:00
refractionpcsx2
987dd805c2 UI: Remove option to disable per-game settings 2024-02-17 02:41:20 +00:00
refractionpcsx2
45421a9f96 GS: Fix crop scaling for software and bilinear (sharp) 2024-02-15 13:42:02 +00:00
refractionpcsx2
71c8ad605f RAchievements: Fix off by one error in scratchpad reads 2024-02-14 15:47:24 +00:00
nishi
e1fc414691 GameDB: NTSC-J Overhaul 2024-02-13 03:53:31 -06:00
KamFretoZ
dc68da4236 OSD: Add icon for Slow-Mo 2024-02-12 15:13:21 +00:00
RedPanda4552
8dc16827ea Memcard: Fix incorrect order of directory/filename path components for _pcsx2_meta_directory files 2024-02-12 14:51:01 +01:00
Mrlinkwii
6e7c6c205c Memory cards: Update error message
Co-Authored-By: Christian Kenny <16314399+MrCK1@users.noreply.github.com>
2024-02-10 20:42:52 +00:00
PCSX2 Bot
734cfb8966 Qt: Update Base Translation 2024-02-10 00:04:34 +00:00
refractionpcsx2
43c85f22c3 GameDB: Add Autoflush to X2: Wolverine 2024-02-09 13:44:06 +00:00
refractionpcsx2
85e899b92c GS/HW: Only allow tex is fb on alpha if draw is recursive 2024-02-09 13:44:06 +00:00
KamFretoZ
941a8832bf Qt: Revert to old icon 2024-02-06 22:14:35 +00:00
KamFretoZ
8ae111add3 Qt: Translation Fixes 2024-02-06 22:14:35 +00:00
TheTechnician27
88672dc38f Debugger: Create check for successful QString conversion in MemoryViewerWidget.cpp 2024-02-06 22:02:01 +00:00
KamFretoZ
dccba86dde Qt: Default to No for exit Memcard abort msgbox 2024-02-06 21:49:58 +00:00
JordanTheToaster
a7bced02da FS: Fix cover text truncation 2024-02-06 02:01:53 -06:00
PCSX2 Bot
a654e2ac43 PAD: Update to latest controller database. 2024-02-06 01:05:30 +01:00
Stenzek
56b54e0e17 GS: Move input recording shutdown to VMManager 2024-02-05 13:20:57 +10:00
Stenzek
8ffd920700 deps: Fix prefix for libbacktrace on Linux 2024-02-05 13:19:27 +10:00
Stenzek
b6f67a7a6e Qt: Increase controller settings window height
Stop it chopping off text when you switch to profile view.
2024-02-05 13:19:27 +10:00
Stenzek
9308410e12 SDLInputSource: Expose IOKit/MFI toggles
Backport of 73bb2e77af
2024-02-05 13:19:27 +10:00
Stenzek
65882ae14d deps: Bump to SDL2 2.30.0 2024-02-05 13:19:27 +10:00
Buzzardsoul
0f533ec16c GameDB: Add patch for Samurai Warriors 2 - Xtreme legends 2024-02-04 21:54:24 +00:00
JordanTheToaster
0c708e8c1e GameDB: Various fixes 2024-02-04 18:37:38 +00:00
Stenzek
2693544faa GS/Vulkan: Fix incorrect memory order arg 2024-02-05 02:34:21 +10:00
refractionpcsx2
2e95e59f40 DEV9: Fix HDD Response when no HDD is connected 2024-02-03 12:29:50 +00:00
JordanTheToaster
72bc826907 GameDB: Various fixes 2024-02-03 00:15:25 +00:00
RedDevilus
21440c31f4 Qt: Add mention zso formatted roms
This was an oversight for the Wizard Setup where it didn't list with the supported formats and the GameList when you don't have any games added. It already works when you click open file among supported formats.
2024-02-02 09:36:45 +00:00
PCSX2 Bot
3e225d78fa Qt: Update Base Translation 2024-02-01 22:57:27 +00:00
Tyler Wilding
5464463ab0 translations: Syncing Crowdin translations (#10759)
* New translations pcsx2-qt_en.ts (Romanian)
[ci skip]

* New translations pcsx2-qt_en.ts (French)
[ci skip]

* New translations pcsx2-qt_en.ts (Spanish)
[ci skip]

* New translations pcsx2-qt_en.ts (Afrikaans)
[ci skip]

* New translations pcsx2-qt_en.ts (Arabic)
[ci skip]

* New translations pcsx2-qt_en.ts (Catalan)
[ci skip]

* New translations pcsx2-qt_en.ts (Czech)
[ci skip]

* New translations pcsx2-qt_en.ts (Danish)
[ci skip]

* New translations pcsx2-qt_en.ts (German)
[ci skip]

* New translations pcsx2-qt_en.ts (Greek)
[ci skip]

* New translations pcsx2-qt_en.ts (Finnish)
[ci skip]

* New translations pcsx2-qt_en.ts (Hebrew)
[ci skip]

* New translations pcsx2-qt_en.ts (Hungarian)
[ci skip]

* New translations pcsx2-qt_en.ts (Italian)
[ci skip]

* New translations pcsx2-qt_en.ts (Japanese)
[ci skip]

* New translations pcsx2-qt_en.ts (Korean)
[ci skip]

* New translations pcsx2-qt_en.ts (Lithuanian)
[ci skip]

* New translations pcsx2-qt_en.ts (Dutch)
[ci skip]

* New translations pcsx2-qt_en.ts (Norwegian)
[ci skip]

* New translations pcsx2-qt_en.ts (Polish)
[ci skip]

* New translations pcsx2-qt_en.ts (Portuguese)
[ci skip]

* New translations pcsx2-qt_en.ts (Russian)
[ci skip]

* New translations pcsx2-qt_en.ts (Serbian (Cyrillic))
[ci skip]

* New translations pcsx2-qt_en.ts (Swedish)
[ci skip]

* New translations pcsx2-qt_en.ts (Turkish)
[ci skip]

* New translations pcsx2-qt_en.ts (Ukrainian)
[ci skip]

* New translations pcsx2-qt_en.ts (Chinese Simplified)
[ci skip]

* New translations pcsx2-qt_en.ts (Chinese Traditional)
[ci skip]

* New translations pcsx2-qt_en.ts (Vietnamese)
[ci skip]

* New translations pcsx2-qt_en.ts (Portuguese, Brazilian)
[ci skip]

* New translations pcsx2-qt_en.ts (Indonesian)
[ci skip]

* New translations pcsx2-qt_en.ts (Persian)
[ci skip]

* New translations pcsx2-qt_en.ts (Croatian)
[ci skip]

* New translations pcsx2-qt_en.ts (Latvian)
[ci skip]

* New translations pcsx2-qt_en.ts (Hindi)
[ci skip]

* New translations pcsx2-qt_en.ts (Spanish, Latin America)
[ci skip]
2024-02-01 16:43:56 +00:00
refractionpcsx2
9c9bae7443 GS/HW: Clear draw list when replacing with single sprite 2024-02-01 00:13:39 +00:00
refractionpcsx2
9d69a0ad54 GameDB: Add MipMap to Arc the Lad games for Depth of Field 2024-02-01 00:13:39 +00:00
refractionpcsx2
4b88256df2 GS/HW: Allow palette lookups from depth and deswizzle manual deswizzles 2024-02-01 00:13:39 +00:00
Dan McCarthy
bc7b0e53f0 Debugger: Adds editing register values via double click
Double clicking a register segment will open the segment edit dialogue that normally has to be accessed by the right click menu.
2024-01-31 14:46:28 +00:00
KamFretoZ
3695862368 Qt/BPM: Minor icon tweaks 2024-01-31 14:45:03 +00:00
KamFretoZ
18ae23b99d InputRec: Stop input recording on VM shutdown 2024-01-31 14:45:03 +00:00
Stenzek
bb60058fa0 Achievements: Handle fake memory map 2024-01-30 15:26:40 +00:00
Stenzek
1ad25605d1 GS: Check for D3D Mapping Layers and disable Vulkan if present 2024-01-30 15:26:21 +00:00
Stenzek
9809265be4 GS/Vulkan: Fix potential race between submit and main thread
Backport of bcf7f55b93
2024-01-29 12:40:06 +10:00
Stenzek
63872e6b28 GS/Capture: Stop capture on VM shutdown 2024-01-28 21:23:05 +10:00
Stenzek
fb3a9eae9b ImGuiOverlays: Use white font for recording time 2024-01-28 21:23:05 +10:00
Stenzek
f53c3050df GS/Capture: Show video timestamp instead of wall time 2024-01-28 21:23:05 +10:00
PCSX2 Bot
67bd0dfcdb Qt: Update Base Translation 2024-01-28 21:12:06 +10:00
Stenzek
12196359f7 Qt: Deprecate per-game WS/NI toggles in favor of Patches 2024-01-28 21:09:53 +10:00
Stenzek
609165e412 USB: Fix buffer copies in EyeToy 2024-01-28 17:04:24 +10:00
lightningterror
41f14a8cf8 GameDB: Add mipmap full with ps2 trilinear to SWAT Global Strike Team.
Improves building textures to match sw renderer.
2024-01-28 02:36:46 +01:00
lightningterror
a8bdd3fbfc GameDB: Add gshwfixes to Band Hero.
Fixes character shadow misalignment.
Fixes icons.
2024-01-28 00:27:25 +01:00
refractionpcsx2
993ec82a9e GSDumpReplayer: Fix UI not responded to messages when replaying dumps 2024-01-27 16:38:54 +00:00
Stenzek
c5a2844367 USB: Fix possible buffer overflow in webcam 2024-01-27 21:26:04 +10:00
Stenzek
e5bb405b47 USB: Don't reset configuration when saving state 2024-01-27 21:26:04 +10:00
Stenzek
8c9a65d094 USB: Audio devices don't need port numbers 2024-01-27 21:26:04 +10:00
Stenzek
047b8593ac USB: Fix incorrect config keys for usb-headset 2024-01-27 21:26:04 +10:00
Stenzek
4fc4eb8a66 USB: Rewrite RingBuffer class
It was overflowing and corrupting the heap...
2024-01-27 21:26:04 +10:00
PCSX2 Bot
1f95a86f0a Qt: Update Base Translation 2024-01-27 13:32:21 +10:00
lightningterror
2b90451c4a Qt: Fix more compiler warnings.
-Wsign-compare, -Wunused-variable.
2024-01-27 13:30:45 +10:00
Stenzek
77a6525556 Counters: Move input poll to after throttle 2024-01-27 13:29:55 +10:00
refractionpcsx2
5eacab387d GameDB: Add Merge Targets to Shadow Hearts 2024-01-26 12:17:52 +00:00
refractionpcsx2
ddaf57d5b0 GS/HW: Kill old source using target if rect is outside target surface 2024-01-26 12:17:52 +00:00
Stenzek
1144c46109 ImGuiOverlays: Fix OSD margin 2024-01-26 19:47:50 +10:00
Stenzek
850b839fc3 Qt: Make "Ignore Inversion" a global mapping setting
Instead of being specific to DInput.
2024-01-26 18:14:08 +10:00
PCSX2 Bot
22037e75ba Qt: Update Base Translation 2024-01-26 13:04:42 +10:00
TheLastRar
303ab163ab DEV9: Remove some casts in ATA Info 2024-01-26 13:03:06 +10:00
TheLastRar
2833537167 DEV9: Various ATA fixes 2024-01-26 13:03:06 +10:00
TheLastRar
1aa7b591b6 DEV9: LBA48 Support 2024-01-26 13:02:53 +10:00
KamFretoZ
2f0463d936 Qt: Icon Refresh 2024-01-26 13:02:36 +10:00
TellowKrinkle
82a1ec0c3a Qt: Fix use of tr outside of Qt class 2024-01-26 12:48:37 +10:00
TellowKrinkle
d65133451d Common: Add helper for creating an NSString from a string_view 2024-01-26 12:48:37 +10:00
TellowKrinkle
36e81949e0 Qt: Use proper Show in Finder on macOS 2024-01-26 12:48:37 +10:00
TellowKrinkle
6b62945632 CMake: Set qm files as non-source data in Xcode
Prevents their contents from coming up in searches
2024-01-26 12:48:37 +10:00
Stenzek
fa2f578900 GS/HW: Handle more double-half clear edge cases
Spiderman: Web of Shadows clears its depth buffer with 32-bit FRAME
and 24-bit Z. So the upper 8 bits of half the depth buffer are not
cleared, yay. We can't turn this into a 32-bit clear, because then
it'll zero out those bits, which other games need (e.g. Jak 2). We
can't do a 24-bit clear, because something might rely on half those
bits actually getting zeroed. So, instead, we toss the depth buffer,
and let the mem clear path write out FRAME and Z separately, with
their associated masks. Limit it to black to avoid false positives.

Also fixes FBW getting blown out to 20 for a horizontal double-half
clear in Wakeboarding Unleashed.
2024-01-26 12:08:29 +10:00
JordanTheToaster
e1c9987059 GameDB: Hot Shots Golf Fore Fixes 2024-01-26 01:51:00 +00:00
GovanifY
325e219bb1 PINE: fix save state regression introduced during the switch to Qt
Ensure thread safety when loading/saving state
2024-01-25 20:05:44 +10:00
Dan McCarthy
be208df11b Debugger: Allow copying address of memory search results
Adds the ability to copy the address directly of a memory search result through the right click context menu.
2024-01-25 16:55:43 +10:00
KamFretoZ
49df804d1b FSUI: Add Recording Indicator and Time 2024-01-25 00:05:34 +10:00
JordanTheToaster
122fde79bd GameDB: Thrillville fixes 2024-01-24 20:07:12 +10:00
Pierre GRASSER
2099e68c41 GUI: Memory Card "slot" instead of "port"
"Slot" is the official term, we should use it instead of "port".
2024-01-24 20:06:54 +10:00
Dan McCarthy
52ccc609cd Debugger: Adds loading breakpoints/saved addresses from settings
Adds `/inis/debuggersettings/` settings folder to contain settings specifically for the debugger. Adds functionality to manually save (to settings) Breakpoints/Saved addresses and automatically load them upon launching the debugger.
2024-01-24 20:06:20 +10:00
Stenzek
b402f6a404 Qt: Fix unclickable links in Setup Wizard 2024-01-24 17:49:18 +10:00
KamFretoZ
3576a1824d Qt: Remove the duplicate memcard button 2024-01-24 13:47:20 +10:00
Stenzek
c3afaae169 Qt: Remove NTFS compression checkbox on Linux/Mac 2024-01-24 13:46:47 +10:00
Stenzek
c5a9ce6b56 MemoryCardFile: Log size/formatted state on load 2024-01-24 13:46:47 +10:00
Stenzek
4f0d944bb9 MemoryCardFile: Don't compress file on opening 2024-01-24 13:46:47 +10:00
Stenzek
5684bcb6f4 Qt: Explicitly set memcard compression regardless of choice
Fixes compressed cards being created when the directory has the
compressed flag set (probably from wx..).
2024-01-24 13:46:47 +10:00
JordanTheToaster
5087fcea88 GameDB: Various fixes 2024-01-23 18:52:09 +00:00
refractionpcsx2
28f984e87f GS/HW: Don't preload target from other targets after hw clear 2024-01-22 20:38:49 +00:00
PCSX2 Bot
e0233daeb0 PAD: Update to latest controller database. 2024-01-22 19:30:53 +01:00
refractionpcsx2
49922ebe32 GS/HW: Fix up Tekken 5 CRC hack to not remove post + break other scenes 2024-01-21 14:56:54 +00:00
Mrlinkwii
8fe0c3441c config: remove unused variables 2024-01-21 21:39:07 +10:00
PCSX2 Bot
ba55caa404 Qt: Update Base Translation 2024-01-21 19:28:44 +10:00
Stenzek
e50e651078 Qt: Warning fix 2024-01-21 19:04:16 +10:00
Stenzek
39b4fd47c7 GS/HW: Fix incorrect page mask in ClearGSLocalMemory() 2024-01-21 19:04:16 +10:00
Stenzek
56b83e5cfa GS/HW: Fix double-half clears misfiring on CT32+Z24 when clearing depth 2024-01-21 19:04:16 +10:00
Stenzek
ed57355948 GS/HW: Prevent creating texture with invalid mipmap levels
Fixes crash during loading in Jak with Metal renderer, and UB with
Vulkan.
2024-01-21 19:04:16 +10:00
Stenzek
b4b2f3a0b6 GS/Metal: Don't discard alpha on RGB depth copy 2024-01-21 19:03:16 +10:00
TheTechnician27
1946882952 GameDB: A few trilinear+mipmap games 2024-01-21 09:00:09 +00:00
refractionpcsx2
dbe4930c17 GS: Correct flush reasons 2024-01-20 18:41:06 +00:00
Stenzek
3b25fa3065 GS/HW: Better avoid target uploads on HW clear 2024-01-21 00:49:35 +10:00
Ziemas
01849565aa SPU: VolumeSlide: disregard phase when exp + decr 2024-01-21 00:05:50 +10:00
Stenzek
e3ca5833d0 GS/HW: Fix false positive on shared bits with double-half clears 2024-01-20 23:03:01 +10:00
Stenzek
dfac1f034b Qt: Make Shift+Wheel scroll settings info panel 2024-01-20 22:58:22 +10:00
Stenzek
a8d07df81d GunCon2: Fix cursor assertions in devbuilds 2024-01-20 22:58:22 +10:00
refractionpcsx2
609cb44b01 GS/HW: Optimize out some situations of texture loading 2024-01-20 06:05:49 +01:00
JordanTheToaster
feb4d605d0 GameDB: Various fixes 2: Electric Boogaloo
Revert VP2 changes as they cause issues and fix a shadow issue in Star Wars Force Unleashed.
2024-01-19 11:38:54 +00:00
JordanTheToaster
276d887917 GameDB: Various fixes 2024-01-19 08:27:43 +00:00
PCSX2 Bot
61aef9c96f Qt: Update Base Translation 2024-01-18 16:56:06 +01:00
lightningterror
b4005682f2 GS/HW: Fix compiler warnings. 2024-01-18 16:41:05 +01:00
Pierre GRASSER
7d98461fc6 Qt: Remove non-printable character from some strings
This non-printable character (U+FE0F, VARIATION SELECTOR 16) has been added for seemingly no reason to multiple strings and have polluted Translation Memory on Crowdin for some languages (👀).
Let's get rid of it.
2024-01-18 15:02:20 +00:00
Stenzek
862d03b78e FullscreenUI: Link create memory card to Qt dialog 2024-01-18 21:48:22 +10:00
Stenzek
0ecf46240f Qt: Fix OSD/Big Picture display for missing languages 2024-01-18 21:10:52 +10:00
Tyler Wilding
a2755e212b translations: Syncing Crowdin translations (#10638)
* New translations pcsx2-qt_en.ts (Romanian)
[ci skip]

* New translations pcsx2-qt_en.ts (French)
[ci skip]

* New translations pcsx2-qt_en.ts (Spanish)
[ci skip]

* New translations pcsx2-qt_en.ts (Afrikaans)
[ci skip]

* New translations pcsx2-qt_en.ts (Arabic)
[ci skip]

* New translations pcsx2-qt_en.ts (Catalan)
[ci skip]

* New translations pcsx2-qt_en.ts (Czech)
[ci skip]

* New translations pcsx2-qt_en.ts (Danish)
[ci skip]

* New translations pcsx2-qt_en.ts (German)
[ci skip]

* New translations pcsx2-qt_en.ts (Greek)
[ci skip]

* New translations pcsx2-qt_en.ts (Finnish)
[ci skip]

* New translations pcsx2-qt_en.ts (Hebrew)
[ci skip]

* New translations pcsx2-qt_en.ts (Hungarian)
[ci skip]

* New translations pcsx2-qt_en.ts (Italian)
[ci skip]

* New translations pcsx2-qt_en.ts (Japanese)
[ci skip]

* New translations pcsx2-qt_en.ts (Korean)
[ci skip]

* New translations pcsx2-qt_en.ts (Lithuanian)
[ci skip]

* New translations pcsx2-qt_en.ts (Dutch)
[ci skip]

* New translations pcsx2-qt_en.ts (Norwegian)
[ci skip]

* New translations pcsx2-qt_en.ts (Polish)
[ci skip]

* New translations pcsx2-qt_en.ts (Portuguese)
[ci skip]

* New translations pcsx2-qt_en.ts (Russian)
[ci skip]

* New translations pcsx2-qt_en.ts (Serbian (Cyrillic))
[ci skip]

* New translations pcsx2-qt_en.ts (Swedish)
[ci skip]

* New translations pcsx2-qt_en.ts (Turkish)
[ci skip]

* New translations pcsx2-qt_en.ts (Ukrainian)
[ci skip]

* New translations pcsx2-qt_en.ts (Chinese Simplified)
[ci skip]

* New translations pcsx2-qt_en.ts (Chinese Traditional)
[ci skip]

* New translations pcsx2-qt_en.ts (Vietnamese)
[ci skip]

* New translations pcsx2-qt_en.ts (Portuguese, Brazilian)
[ci skip]

* New translations pcsx2-qt_en.ts (Indonesian)
[ci skip]

* New translations pcsx2-qt_en.ts (Persian)
[ci skip]

* New translations pcsx2-qt_en.ts (Croatian)
[ci skip]

* New translations pcsx2-qt_en.ts (Latvian)
[ci skip]

* New translations pcsx2-qt_en.ts (Hindi)
[ci skip]

* New translations pcsx2-qt_en.ts (Spanish, Latin America)
[ci skip]
2024-01-18 20:21:15 +10:00
forrvalhalla
2ec5559dd6 GameDB: Add HPO Native to SLAI 2024-01-18 09:28:34 +00:00
RedDevilus
6f904759ee GameDB: Gun Align to Native + typo fix
Looks better with the bloom and character shadows
2024-01-18 09:27:14 +00:00
RedPanda4552
507fafd601 Pad: Force multitapped slots to Not Connected if their multitap is missing 2024-01-18 14:05:21 +10:00
refractionpcsx2
9c463f1338 GS/HW: Add DS and Alpha Test checks 2024-01-18 13:33:34 +10:00
Stenzek
8818cd0285 GS/HW: Further improve no_rt heuristics
Reduces copies by almost 500 in Crash and Burn, few hundred drawcall
reductions in other games.
2024-01-18 13:33:34 +10:00
Stenzek
23b72d08d2 ImGuiOverlays: Fix analog input display 2024-01-17 19:02:33 +10:00
Stenzek
227049b6f2 FileSystem: Handle infinite symlink loops in FindFiles() 2024-01-17 13:57:19 +10:00
Stenzek
97abd3e1f9 ImGuiOverlays: Display inputs as integer, ignoring deadzone 2024-01-17 13:56:54 +10:00
Stenzek
6f34b7ba99 Pad: Add GetEffectiveInput()
Returns the value, incorporating any deadzone.
2024-01-17 13:56:54 +10:00
Alessa Baker
c0d86c3852 Adding Jetbrains Rider to Gitignore. 2024-01-17 12:24:15 +10:00
Stenzek
bf743ff467 gitignore: Add portable.ini/fix font paths 2024-01-16 22:13:56 +10:00
Connor McLaughlin
306f994464 CI/Linux: Use wildcard for AppImage libc downgrade 2024-01-16 21:43:25 +10:00
TheLastRar
f56676942b DEV9: Remove SDMA code 2024-01-16 10:45:14 +00:00
TheLastRar
bfd0a05289 DEV9: Fix ATA MDMA 2024-01-16 10:45:14 +00:00
JordanTheToaster
3999c08f00 GameDB: Various fixes 2024-01-16 10:43:38 +00:00
TheTechnician27
febb8ec1a6 GameDB: Fix water in Just Cause (#10645) 2024-01-16 10:29:31 +00:00
RedPanda4552
cdd38ef7aa Game List: Ignore exclusion paths if they are empty string
Works around a bug of unknown origin which causes empty string to be added to the exclusions list, clearing the games list completely.
2024-01-16 18:38:18 +10:00
Stenzek
54c620a5df CI: Default to non-portable builds 2024-01-16 13:13:02 +10:00
Martino Fontana
089b7fa73e Build: Remove unused option DISABLE_BUILD_DATE 2024-01-16 13:12:20 +10:00
PCSX2 Bot
d9d0e84ca1 PAD: Update to latest controller database. 2024-01-15 17:17:01 +01:00
refractionpcsx2
badede2e2d GS/HW: ignore lower 3 bits of 16bit color for AEM check 2024-01-15 14:45:00 +00:00
Stenzek
e2ae28741d Qt: Look for a file named DefaultUpdaterChannel.h
Make manual releases create this file, and make it contain

  #define DEFAULT_UPDATER_CHANNEL "stable"

So that the release defaults to the stable update channel.
2024-01-15 15:35:21 +10:00
Stenzek
ff34150b15 Build: Simplify Git version extraction
Get rid of SysForwardDefs.h
Use last known git tag to determine version info, if it is not a tagged commit.
2024-01-15 15:35:21 +10:00
Tyler Wilding
4a93ceac58 Update Crowdin configuration file 2024-01-14 14:18:03 -05:00
JordanTheToaster
5a724bf49e GameDB: Flower sun and rain fixes 2024-01-14 17:40:58 +00:00
Connor McLaughlin
c23bcf6322 Qt: Remove debug popup after update cleanup 2024-01-14 18:36:01 +10:00
PCSX2 Bot
c863149ad9 Qt: Update Base Translation 2024-01-14 18:07:44 +10:00
Connor McLaughlin
5fb6e22bed Qt: Invoke Updater as Administrator for Program Files installs 2024-01-14 18:03:10 +10:00
refractionpcsx2
d634088282 GS/HW: Don't mark 24bit alpha as valid on upgrade 2024-01-14 06:56:57 +00:00
Stenzek
c99a935831 CDVD: Fix block dump path generation 2024-01-14 15:23:25 +10:00
Stenzek
165da677ed Qt: Use native path separators for block dump 2024-01-14 15:23:25 +10:00
Stenzek
0bbde2ca52 IPU: Fix regression from #10617 2024-01-14 15:22:43 +10:00
Stenzek
3d13c5d13c CI: Allow user to override deps build path 2024-01-14 14:05:16 +10:00
Stenzek
9d978c67ec GS/DX11: Remove unused field 2024-01-14 12:51:51 +10:00
Stenzek
8766e1fa57 GS: Fix enum type return warnings 2024-01-14 12:51:51 +10:00
Stenzek
c0e4883987 GS: Make GSVertex POD
Same code is generated with optimization (256-bit store in AVX2).
2024-01-14 12:51:51 +10:00
Stenzek
57f2cd5f9e GS: Make GSDrawingContext and GSDrawingEnvironment POD 2024-01-14 12:51:51 +10:00
Stenzek
50d8d06a94 GS: Make vector types POD
Generates the same code in Release, but slightly difference code in Debug.
In Debug, with the default copy assignment operator, it turns into two
8-byte moves. With the overloaded operator, it turns into a function call
with a vector move.
2024-01-14 12:51:51 +10:00
Stenzek
2e07328878 GS: Skip vertex append for GS_INVALID PRIM 2024-01-14 12:51:51 +10:00
Stenzek
ad8294e521 GS: Remove unused vertex types 2024-01-14 12:51:51 +10:00
Stenzek
14426a7b45 GSCapture: Fix invalid substring comparison 2024-01-14 12:51:51 +10:00
Stenzek
6697e76be1 x86/iR5900: Fix signed/unsigned comparison in timeout loop 2024-01-14 12:51:51 +10:00
Stenzek
73cd876f6d SPU2: Make StereoOut16/32 POD 2024-01-14 12:51:51 +10:00
Stenzek
e626754000 IPU: Remove last parameter from IDCT_Add
It was always being used uninitialized.
2024-01-14 12:51:51 +10:00
Stenzek
1fedd31229 HW: Make various DMAC/IPU/VIF register types POD 2024-01-14 12:51:51 +10:00
Stenzek
bfe1746ddb Cache: Make CacheTag/CacheData POD 2024-01-14 12:51:51 +10:00
PCSX2 Bot
4800c32db4 Qt: Update Base Translation 2024-01-13 12:27:29 +10:00
KamFretoZ
140fc28b3e FSUI: Allow toggling fullscreen when VM is paused 2024-01-13 12:27:05 +10:00
Stenzek
f9833bb8af Qt: Tidy up Tools menu
Make System Console and Verbose contingent on Advanced Settings being enabled.
Make Debug Console contingent on actually running under a debugger.
2024-01-13 12:26:34 +10:00
TheTechnician27
4b6ddaf09e Update VMManager.cpp to not count paused time toward time played
Hopefully resolves #10497. Between each update to played time, we calculate the sum of the deltas between VM resume and pause in order to subtract that off from the total session (paused and unpaused) session time.

Thus, if someone pauses the emulator, that time spent paused will no longer be reflected in the GameList.
2024-01-12 22:52:34 +10:00
Stenzek
d427db4a15 GS/HW: Fix drawing with mismatched target sizes 2024-01-12 19:40:30 +10:00
Stenzek
deb39cc20f CMake: Set LINUX in current and parent scope 2024-01-12 19:21:31 +10:00
Stenzek
3a4c25e916 VMManager: Force TimeStretch in Achievements HC Mode 2024-01-12 19:20:38 +10:00
Dan McCarthy
f416eb3d4f Translation\UI: Updates Bitrate "Kbps" to "kpbs"
Co-Authored-By: KamFretoZ <14798312+kamfretoz@users.noreply.github.com>
2024-01-12 15:59:15 +10:00
Dan McCarthy
87cbb1f90c Settings: Adds description to 'All CRCs' on hover for cheat/patch settings
Add an on hover description to explain the purpose of the 'All CRCs' button in the Cheat and Patch Settings window.
2024-01-12 15:59:15 +10:00
Stenzek
68f43121fb MTGS: Explicitly set FP control register on startup
Linux appears? to inherit the value of MXCSR from the creating thread,
and that breaks parts of the software renderer.
2024-01-12 15:23:31 +10:00
Stenzek
51ceab1f3c PINE: Convert from class to namespace
Fewer global objects, indirect includes via headers.
2024-01-12 12:57:28 +10:00
Stenzek
2257992a3f PINE: Tidy up and fix shutdown hang on Linux 2024-01-12 12:57:28 +10:00
TellowKrinkle
40ead584d7 GS:MTL: Properly handle hdr rendering to cleared textures 2024-01-12 12:51:50 +10:00
PCSX2 Bot
6f2be7bd17 Qt: Update Base Translation 2024-01-12 12:51:24 +10:00
KamFretoZ
af9ca4cf7d 3rdparty: Add source for modified PromptFont that we use for OSD 2024-01-12 12:44:43 +10:00
Stenzek
ea98203ac5 Qt: Add log window 2024-01-12 12:40:46 +10:00
Stenzek
e908bbfae6 Qt: Add accessors for UI thread view of current game 2024-01-12 12:40:46 +10:00
Stenzek
fa00069068 Console: Remove WX rubbish and replace 2024-01-12 12:40:46 +10:00
refractionpcsx2
efae58de52 GS/HW: Don't bother trying to draw empty draws 2024-01-11 14:43:04 +00:00
refractionpcsx2
39c7f703cb GameDB: Remove GS fixes from Ty The Tasmanian Tiger 2024-01-11 13:52:53 +00:00
refractionpcsx2
96220e509c GSDumpRunner: Fix dump runner 2024-01-11 13:52:53 +00:00
refractionpcsx2
4de495ad59 GS/HW: Upgrade target to C32 if alpha requested on src is rt 2024-01-11 13:52:53 +00:00
refractionpcsx2
56a950a074 GS/HW: Update cached source alpha if linked to target 2024-01-11 12:46:23 +00:00
forrvalhalla
2b47254bdd GameDB: Set HPO Native to Fast and Furious (#10595) 2024-01-11 08:20:56 +00:00
Tyler Wilding
da28e2cc37 CI: fix flatpak cron and add a way to manually kick off a release (#10567)
* CI: fix mistake stopping flatpak cron from running

* CI: add a way to manually kick off releases with a custom tag

* cmake: handle edge-case where a commit can have multiple tags

* CI: set release channel appropriately when it's a stable release
2024-01-10 19:04:42 -05:00
refractionpcsx2
3d64f4a548 GameDB: Merge sprite to remove blur on Sakura Taisen - Atsuki Chishioni 2024-01-10 15:50:33 +00:00
refractionpcsx2
abf03b0c79 GS/HW: Detected striped moves in HW 2024-01-10 15:50:33 +00:00
refractionpcsx2
8381742422 GS: Flush draw when address matches FRAME/Z 2024-01-10 15:43:06 +00:00
Stenzek
724bb09aec GS/HW: Don't rely on old targets for double-half clear 2024-01-10 19:36:49 +10:00
Stenzek
ad5de248b4 Qt: Fix incorrect renderer shown in status bar 2024-01-10 19:35:26 +10:00
AKuHAK
1a1fdf6a5a DEV9: various fixes for ATA Identify
improved 48-bit addressing
UDMA mode now set correctly
MDMA0 mode now set correctly
fixed user addressable sectors limit
2024-01-09 21:39:27 +00:00
Stenzek
c469b17350 GS/HW: Fix incorrect resizing of Ico move target 2024-01-09 19:50:51 +00:00
refractionpcsx2
01842a3c6b GS/HW: Allow blending on normal shuffles 2024-01-09 13:17:52 +00:00
Berylskid
4cd385dbff GameDB: Fix broken shadows in Armored Core Last Raven 2024-01-09 11:56:31 +00:00
GovanifY
72787d103f PINE: fix regressions introduced in #10448 2024-01-08 22:01:24 +00:00
PCSX2 Bot
59072272a9 PAD: Update to latest controller database. 2024-01-08 17:06:21 +01:00
Stenzek
ef76666e5a Misc: Warning fixes 2024-01-08 23:33:43 +10:00
Stenzek
0a0994b19c Qt: Fix docs file not getting included on Linux/Mac 2024-01-08 23:33:43 +10:00
psykose
ab68c570a9 Debugger: initialise SavedAddress.address with 0 instead of NULL 2024-01-08 20:44:26 +10:00
JordanTheToaster
dcdf3b39a3 GameDB: Various fixes 2024-01-08 10:38:53 +00:00
Stenzek
476cb2db34 Qt: Add third-party license statements 2024-01-07 22:20:43 +10:00
Stenzek
34a7e00413 GameDB: Use chop rounding for division in GT4 NTSC-J 2024-01-07 21:42:18 +10:00
Stenzek
413ba09ee0 Config: Replace FpuNegDivHack with eeDivRoundMode 2024-01-07 21:42:18 +10:00
KamFretoZ
33eefefffb Qt: Update Base Translation 2024-01-07 10:44:12 +00:00
KamFretoZ
b3c822e31b Qt: Minor Translation Fixes 2024-01-07 10:44:12 +00:00
Connor McLaughlin
14a458a275 Qt: Fix HTTP download error format string 2024-01-07 20:14:01 +10:00
JordanTheToaster
6c49f9cf52 GameDB: DMC 1 Fixes 2024-01-07 18:40:47 +10:00
Stenzek
803ea4dda5 Qt: Update base translation 2024-01-07 18:35:50 +10:00
Stenzek
c9b23e6e4e Qt: Fix opening game properties causing patch reload 2024-01-07 18:35:50 +10:00
Stenzek
509c9318af Qt: Fix missing font message not being translatable 2024-01-07 18:35:50 +10:00
Stenzek
46e1e3d904 Qt: Add runtime downloading of CJK OSD fonts 2024-01-07 17:23:57 +10:00
Stenzek
7a045d837b Qt: Add runtime resource downloading 2024-01-07 17:23:57 +10:00
Stenzek
574ea820f7 Config: Add UserResources to EmuFolders
Allowing some resources, such as fonts/sounds to be overridden by the
user.
2024-01-07 17:23:57 +10:00
Stenzek
7061d48dde SDLInputSource: Replace hint strings with macros 2024-01-07 16:19:29 +10:00
Stenzek
53633b7279 Qt: Fix columns in cheat tree list not auto-sizing 2024-01-07 16:03:37 +10:00
Stenzek
05bb126af9 Patch: Fix ungrouped patches from >1 file not merging 2024-01-07 16:03:37 +10:00
Stenzek
436fba77ac SDLInputSource: Log axes/buttons when controller is opened 2024-01-07 14:07:53 +10:00
Ty Lamontagne
91c0e64159 Misc: Enable some disabled warnings
smite you windows for keeping long 32 bits
2024-01-07 13:19:14 +10:00
dependabot[bot]
7207681485 CI: migrate to upload-artifact@v4, download-artifact@v4 and labeler@v5 (#10431)
* Bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* github: group github actions updates going forward

* ci: update to labeler@v5

* ci: properly differentiate between windows build artifacts on PRs

* ci: workaround flatpak-builder temporarily as well as test fix

* ci: simplify things, just explicitly specify the artifact names in the workflows

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-01-06 15:44:44 -05:00
KamFretoZ
eef53f1b54 Qt: Minor Translation Fixes 2024-01-06 16:03:19 +00:00
KamFretoZ
150d8d3214 Qt: Add Popn icon to Input OSD 2024-01-06 16:03:19 +00:00
JordanTheToaster
a14376abb6 GameDB: Various fixes 2024-01-06 15:58:00 +00:00
KamFretoZ
dfb45a8ebc GameDB: Fixes for Bully 2024-01-06 15:56:51 +00:00
Dan McCarthy
00137c3031 Misc: Uses Qt::UserRole for hardcoded literals & const changes
Adds const to variables that could use them but currently don't and replaces 256 literal uses with Qt::UserRole to be clear what it is for and how this number is used as currently it's a bit confusing.
2024-01-06 13:17:39 +10:00
Dan McCarthy
b9c7dacbd1 Debugger: Double clicking Memory Search result switches to memory view tab
Previously when double clicking a memory search result it would go to the address but not switch to the memory view tab if the user wasn't already on it.
Now it ensures the user moves to the memory view widget, as this is almost always going to be the user's intention.
2024-01-06 13:17:39 +10:00
Dan McCarthy
3a03b579d2 Debugger: Add Saved Addresses tab widget for bookmarking mem addresses
Adds a tab widget to the debugger that allows saving/bookmarking memory addresses and giving them labels/descriptions for convenience. Includes the ability to jump back to memory addresses from the Saved Addresses tab, and adding Saved Addresses from memory search search results context menu and the memory view context menu.

Also supports importing and exporting the saved addresses as CSV format.
2024-01-06 13:17:39 +10:00
lightningterror
e2bbe5cd8b SIO: Fix Wunused-variable compiler warnings. 2024-01-05 14:30:40 +01:00
PCSX2 Bot
c7347a3a16 Qt: Update Base Translation 2024-01-05 14:30:18 +01:00
Stenzek
8749b3c782 Patch: Fix last duplicate patch group not being ignored 2024-01-05 22:32:11 +10:00
RedPanda4552
10389dc3f1 Pad: Add Pop'n Music controller type 2024-01-05 16:44:36 +10:00
Stenzek
5e191a6cd8 GameDB: Add fullblend/autoflush/tex-in-RT for Catwoman 2024-01-05 13:55:18 +10:00
Stenzek
a247625095 GS/HW: Handle offset RTs when offset texture is detected
Catwoman draws to the target at 2E60 via 2D00, one page back
horizontally, and one vertically.

The Destroy All Humans fix also works here, but it only applied to the
texture, not the RT. So do a very conservative form of RT-in-RT to
handle Catwoman.

Unfortunately nothing else benefits from it.
2024-01-05 13:55:18 +10:00
refractionpcsx2
0fb234f3e4 Linux: Stop OpenGL overriding Vulkan if both VK and OpenGL are enabled 2024-01-05 00:03:09 +00:00
Dan McCarthy
e3e35d3bc6 Misc: Add patches folder to gitignore
Adds Patches folder to git ignore so that changing branches/stashing/unstashing does not impact patches files in repository folder.
This matches how the cheats folder is handled.
2024-01-04 23:29:19 +00:00
Dan McCarthy
6b12ca5b39 CheatsSettings/PatchSettings: Add toggle for showing All CRCs
This used to be off by default, but was changed to show found patches/cheats for all CRCs for a game serial. However, this also clutters and shows cheats for CRCs that may not be applicable without a way to hide them.

This puts this setting behind a toggle to choose if this should be enabled/disabled so the user has choice. Still defaults to enabled to keep current behavior.
2024-01-04 23:29:19 +00:00
PCSX2 Bot
44e2837efb Qt: Update Base Translation 2024-01-04 23:50:13 +01:00
Ty Lamontagne
27dcd1bba2 Core: Remove unused variable
Caused from my previous commit. oops
2024-01-04 21:31:47 +00:00
Ty Lamontagne
ebf8cba6a4 Core: Remove syscon log and merge with EE logs 2024-01-04 21:10:37 +00:00
Christian Kenny
e06cf23a03 Readme: Update and Remove Redundant Info
This PR updates the readme to be more concise. Much of the old information has been moved over to the new documentation site and no longer needs to be duplicated.
2024-01-04 20:31:09 +00:00
Dan McCarthy
dd55887f4b Debugger: Add support for Not Equals Array filter searches
Adds the ability to do Not Equals filter searches for arrays and strings. Refactors array search function for easily adding new search types.

Adds error message that informs the user that Not Equals can not be used for initial searches and can only be used for filter searches.
2024-01-04 20:24:38 +00:00
Dan McCarthy
39b7b29af8 Debugger: Combine Start & End addresses to 1 line & add comparison label
- Combines the start and end address inputs for memory search into a single line to not take up unnecessary space and allow room for other UI elements.

- Adds 'Comparison' label to memory search UI to describe the comparison input dropdown.
2024-01-04 20:24:38 +00:00
Dan McCarthy
6f0aef3344 Settings: Clearing settings disables Cheats/Patches
The 'Clear Settings' button will now disable all cheats and patches from the configuration. This will allow quickly resetting to having no game altering pnach patches/cheats.
2024-01-04 20:23:18 +00:00
Mrlinkwii
85c3a413fa GameDB: remove Knights Of The Temple 2 CRC 2024-01-04 20:19:52 +00:00
Mrlinkwii
b6c365b89d HW/CRC: remove Knights Of The Temple 2 CRC hacks 2024-01-04 20:19:52 +00:00
Stenzek
9eedf3901a GS: Fix autoflush init after renderer switch 2024-01-04 15:27:59 +10:00
Mrlinkwii
2a6ecaeb09 GameDB: fixes for Mary-Kate & Ashley - Sweet Sixteen - Licensed to Drive 2024-01-02 22:03:10 +00:00
JordanTheToaster
027db2480a GameDB: Rock Band Track Pack Volume 2 Fixes
Fixes for complete lack of visuals in menus and game.
2024-01-02 10:02:25 +00:00
KamFretoZ
f4cabca62d Qt: More Translation Fixes 2024-01-02 07:48:23 +00:00
ElTioRata
0b3edc5fd4 GameDB: 007 - Agent Under Fire
Recommends 'Full' blending setting to fix lighting issues
2024-01-02 07:40:39 +00:00
PCSX2 Bot
b05152da0f PAD: Update to latest controller database. 2024-01-01 17:22:34 +01:00
Ty Lamontagne
2e0988ff03 IOP HLE: Fix broken dopen implementation 2024-01-01 04:07:21 +10:00
Silent
ec12d9b657 PCAP: Fix a regression from #10448 2023-12-31 12:19:50 +00:00
Stenzek
f388de26ab GS: Refactor renderer switching
- Fix automatic renderer causing delay when changing settings.
 - Make the Debug -> Switch Renderer menu actually save.
2023-12-31 19:17:43 +10:00
Stenzek
68df8bf8ea GS/DX11: Ignore two irrelevant warnings 2023-12-31 16:19:03 +10:00
Stenzek
4a960bba5e GS/DX11: Fix crash with debug device 2023-12-31 16:19:03 +10:00
Stenzek
3a72b3fe3f GS/HW: Fix crash with custom textures 2023-12-31 16:19:03 +10:00
Stenzek
47f372f215 Achievements: Wrap long achievement descriptions 2023-12-31 13:40:32 +10:00
Stenzek
7dc93bee7e ImGuiFullscreen: Add LayoutUnscale() 2023-12-31 13:40:32 +10:00
Stenzek
69ff64149a Achievements: Display missable/progression/win icons 2023-12-31 13:40:32 +10:00
Stenzek
4795f0a7dd 3rdparty/rcheevos: Bump to 3cadf84 2023-12-31 13:40:32 +10:00
Stenzek
e9411a3db5 Resources: Add achievement icons to PromptFont
By @kamfretoz.
2023-12-31 13:40:32 +10:00
Stenzek
6a064a4fa5 GS/HW: Add descriptive labels to RTs/textures 2023-12-31 13:09:54 +10:00
Stenzek
f036cdaaad GS: Move texture object labels to base class 2023-12-31 13:09:54 +10:00
Stenzek
46a68e2118 GS: Purge GSTextureSW
Everything uses hardware device textures now.
2023-12-31 13:09:54 +10:00
Stenzek
d020ea8f63 GS/SW: Remove use of GSTextureSW for dumping 2023-12-31 13:09:54 +10:00
Stenzek
a4b40ab9e1 GS: Purge GSTexture::Swap()
Was only used for texture replacements, and that can just be a pointer
swap instead.
2023-12-31 13:09:54 +10:00
Stenzek
7c62b86ed9 CMake: Move unsupported compiler warning to end 2023-12-31 13:08:03 +10:00
Stenzek
96fb49e35c 3rdparty/libzip: Hardcode most checks
We are only targetting a limited number of platforms.

Significantly speeds up generation time with Xcode.
2023-12-31 13:08:03 +10:00
User
8e5fc236ca CMake: Fix building x86 on Apple Silicon 2023-12-31 13:08:03 +10:00
Stenzek
0784b5930b CMake: Use shared libwebp, liblz4, and libzstd on Linux/Mac 2023-12-31 13:08:03 +10:00
Stenzek
6de792c465 CI: Add xz/zstd/lz4/webp to Mac dependencies
Also fix building on Apple Silicon, and allow the destination path to be
specified, instead of being hardcoded to $HOME/deps.
2023-12-31 13:08:03 +10:00
Silent
e9a2c89930 GamePatchSettingsWidget: Enable word wrap for long patch names/descriptions 2023-12-31 13:05:02 +10:00
PCSX2 Bot
9d9f3acbe6 Qt: Update Base Translation 2023-12-31 13:03:27 +10:00
Stenzek
b67126e917 GS/HW: Use DECAL/TCC for GT4 render fix
That way the channel gets actually written to alpha.
2023-12-31 12:06:08 +10:00
Stenzek
bcbf390334 GS/HW: Don't discard alpha in C32 targets being used as C24 2023-12-31 12:06:08 +10:00
KamFretoZ
714e355c87 Qt/Translations: Hopefully filled the remainder of still missing description 2023-12-30 22:55:49 +10:00
KamFretoZ
f258ea2906 Tools: Fix glyph range generator script 2023-12-30 22:55:49 +10:00
KamFretoZ
9445018586 Qt: Use more fitting icon for the cover download FSUI 2023-12-30 22:55:49 +10:00
TellowKrinkle
97310b8912 GS:MTL: Give labels to textures 2023-12-30 19:11:30 +10:00
JordanTheToaster
47073040d4 GameDB: Various fixes 2023-12-30 05:50:58 +00:00
Stenzek
a93663af0b VMManager: Fix disc change path message 2023-12-30 15:24:28 +10:00
Dan McCarthy
ecd3b87cc0 Debugger: Fix Importing Breakpoints CSV functionality (#10486)
* Debugger: Fix Importing Breakpoints CSV functionality

This resolves a few issues with the Breakpoint CSV importing functionality.
Makes the following changes/fixes:
-  Assembly instructions with commas caused part of the instruction text to be considered the start of a new column (comma is the CSV delimiter), resulting in "too many columns errors" and failing to import. Now puts values in quotes and detects the true start and end of the values, so that no extra columns are created.
- The import function was using the incorrect columns to load since the Enabled column was moved to be the first one but the import function had not been updated. Fixed this by using the column enum values instead of hardcoded numbers, so if ordering in the model changes it will still import fine.
- Updates the beginRemoveRows function to not remove an extra row. With this function you would want a "count" of 0 to remove 1, so "row, row" deletes one, "row, row+1" deletes 2. Updates it to subtract one so that the range is not including one more than it is intended to.
-

* Misc: Cleanup regex string & add explicit imports

Uses raw string literal to make the regular expression easier to read since regex is ugly enough as it is, we really don't need escaping characters in a string on top.

Also explicitly includes used Qt classes.
2023-12-30 14:01:30 +10:00
PCSX2 Bot
5c34f208bd Qt: Update Base Translation 2023-12-30 14:00:42 +10:00
Stenzek
47f8d8c71c GS: Use templates for shift immediates
Also removes the __m128 overloads - it's too easy to mistake for a
variable shift (which doesn't exist in SSE4), instead it takes the shift
amount from the lowest 32-bits.
2023-12-30 14:00:03 +10:00
Stenzek
b2a0dba3bb GS/SW: Replace non-constant shift immediate 2023-12-30 14:00:03 +10:00
Stenzek
fc1304dff5 GS/SW: Work around not being able to use non-constant offsetof 2023-12-30 14:00:03 +10:00
Stenzek
0e15de7103 CMake: Tidy up platform/architecture detection 2023-12-30 14:00:03 +10:00
psykose
182375314e DEV9: fix some missing includes and nonportable u_long type use 2023-12-30 13:05:39 +10:00
星云nebulas
69ac4ddedc GameDB: Add some NTSC-C game's official Simplified Chinese names 2023-12-30 00:03:19 +00:00
JordanTheToaster
68b31347f4 GameDB: Ace Combat fixes
Hopefully this will be the last time I have to do this but knowing my luck.
2023-12-29 17:04:39 +00:00
refractionpcsx2
6be2d1cbc0 GS/HW: Fix some target resize/clear handling 2023-12-29 05:33:19 +00:00
refractionpcsx2
5fac15c449 GS/HW: Include expansion of new targets in preload
Also potentially avoids a copy
2023-12-29 05:33:09 +00:00
refractionpcsx2
ecb86b01c8 GS/TC: Fix invalidation when start page is negative 2023-12-29 05:33:09 +00:00
refractionpcsx2
1744a6ffeb GS/TC: Fix invalidation bug when translating P8->C32 2023-12-29 05:33:09 +00:00
refractionpcsx2
fb393c22b6 GS/HW: Improve target lookup handling + fix alpha requirements 2023-12-29 05:33:09 +00:00
Stenzek
fe2ed74020 GS: Use DX11/GL for Auto when no compatible Vulkan devices exist 2023-12-29 15:29:54 +10:00
Stenzek
5f51050b2f GS/Vulkan: Ignore GPUs that don't meet the required extensions 2023-12-29 15:29:54 +10:00
refractionpcsx2
913253d861 GS/TC: Remove old targets when changing width and outside a page 2023-12-28 14:57:22 +00:00
AKuHAK
8172b2e5ed DEV9: Add support for external HDD ID.
This commit introduces the capability to read the content of a *.hddid file located in the same directory as the HDD image (same name, different extension). The retrieved content is then used to fill the SCE_IDENTIFY_DRIVE response.
2023-12-28 22:19:19 +10:00
AKuHAK
0a7fc06510 R5900: fix ParseArgumentString for strings with spaces in the beginning 2023-12-28 22:18:20 +10:00
AKuHAK
a81b20d9d5 QT: Add ability to pass launch arguments with CLI option -gameargs 2023-12-28 22:18:20 +10:00
Stenzek
90a09eb520 GameDB: Remove mention of full clamp for GT4 2023-12-28 22:15:29 +10:00
Stenzek
4ffbe0bbf9 x86/FPU: Always preserve sign in neg.s 2023-12-28 22:15:29 +10:00
Stenzek
8f991c311f GameList: Sanitize all cover paths 2023-12-28 18:35:28 +10:00
Stenzek
367f839934 Qt: Fix game properties dialog not activating 2023-12-28 18:35:11 +10:00
PCSX2 Bot
6c15359137 Qt: Update Base Translation 2023-12-28 14:02:38 +10:00
Stenzek
fa05d656ad VMManager: Simplify CPU heuristics for MTVU default 2023-12-28 14:02:14 +10:00
KamFretoZ
76e32f55de Qt: Hide advanced graphics settings by default.
To show it, enable "Show Advanced Settings" option first.
2023-12-28 13:34:06 +10:00
KamFretoZ
30ca79a23a Qt/Translation: Make the input setting value for Analog Sensitivity Consistent with Description 2023-12-28 13:34:06 +10:00
KamFretoZ
0ce6961972 gitignore: Don't include KDevelop 4 workspace configs 2023-12-28 13:34:06 +10:00
KamFretoZ
b0ae2caef8 Qt/Translation: Attempt to fill in missing descriptions in settings 2023-12-28 13:34:06 +10:00
JordanTheToaster
3eb4a64517 GameDB: Various fixes
Fixes for HC size in Ace Combat and FMVs now working fine without SoftwareFMV in COD 2
2023-12-28 01:23:23 +00:00
PCSX2 Bot
61a80b59d1 Qt: Update Base Translation 2023-12-27 23:28:50 +01:00
refractionpcsx2
71eaef35e3 GSDumpRunner: Fix dump runner not starting 2023-12-27 19:10:47 +00:00
Connor McLaughlin
b7ae453d84 Common: Fix duplicate fastjmp on Windows/CMake 2023-12-27 16:03:49 +10:00
Stenzek
33958fed96 Qt: Fix AutoUpdaterDialog building 2023-12-27 14:34:48 +10:00
Stenzek
59d29b3648 Common: Rename General to HostSys
Actually fits what it's doing.
2023-12-27 13:55:35 +10:00
Stenzek
911d7f6533 Common: Move janky macros to Config.h 2023-12-27 13:55:35 +10:00
Stenzek
9d49015c0c Common: Purge pxEnum macros 2023-12-27 13:55:35 +10:00
Stenzek
d585712b40 GIF: Comment out packet register assertion
Triggers on "normal" register writes.
2023-12-27 13:55:35 +10:00
Stenzek
fb15893521 VMManager: Remove and merge System.cpp 2023-12-27 13:55:35 +10:00
Stenzek
308f8c5112 x86emitter: Abstract MXCSR into a general FPControlRegister type 2023-12-27 13:55:35 +10:00
Stenzek
86edc0dbe2 x86emitter: Make SSE_MXCSR not dependent on emitter 2023-12-27 13:55:35 +10:00
Stenzek
f461bc9176 x86emitter: Purge x86caps
We can use cpuinfo for querying AVX/AVX2.
2023-12-27 13:55:35 +10:00
Stenzek
b121e5af25 x86emitter: Purge MXCSR mask
We require SSE4, no need to mask away things that are unsupported by
SSE1.
2023-12-27 13:55:35 +10:00
Riley011
d292835941 GameDB: Add a couple more dothack title adjustments 2023-12-26 14:58:02 +00:00
Stenzek
88aee00a02 GS/Vulkan: Disable threaded presentation when spin is enabled 2023-12-26 14:14:15 +10:00
Jakey
2fa806bbee GameDB: Recommended blending for Silent Hill: Origins.
Recommend full blending to fix grey text.
2023-12-26 03:54:09 +00:00
refractionpcsx2
ae3faa1540 GS/HW: Only copy valid channels for copied channels in hw move 2023-12-26 03:51:33 +00:00
Riley
e1e9c428f1 GameDB: Fix dothack titles (#10477) 2023-12-26 01:52:37 +00:00
PCSX2 Bot
443ca9da56 Qt: Update Base Translation 2023-12-25 19:50:45 +01:00
JordanTheToaster
ef05da1860 GameDB: Various fixes
Gamer
2023-12-25 12:54:06 +00:00
refractionpcsx2
e5a87c7463 GS/HW: further Z copy improvements and reverse shuffle coords 2023-12-25 11:49:40 +00:00
refractionpcsx2
da2f419b86 GS/HW: Fix some behaviour when target is copied from Z 2023-12-25 11:49:40 +00:00
refractionpcsx2
4586a12859 GS/HW: Correct some channel shuffle behaviour for alpha shuffles 2023-12-25 11:49:40 +00:00
Stenzek
9c416bdbc1 Qt: Patch macdeployqt to always deploy Qt SVG imageformat plugin
This seems silly, but since we don't have a direct reference to
QtSvg, it doesn't deployed directly from the main binary
(only indirectly from iconengines), and the libqsvg.dylib imageformat
plugin does not get deployed.

Patch macdeploy to remove the Svg check, ensuring the dylib is always
deployed.

Fixes controller images not being displayed in Mac builds.
2023-12-25 18:05:41 +10:00
Stenzek
f43255a1fb MSBuild: Don't supply PrecompiledHeader.h to moc
Redundant, since it's force included anyway.
2023-12-25 12:39:08 +10:00
Stenzek
59949c50d3 CMake: Don't compile PrecompiledHeader.cpp 2023-12-25 12:39:08 +10:00
Stenzek
4608579c31 GIF: Get rid of assertion with side effects 2023-12-24 23:12:12 +10:00
Stenzek
8b7c69c4b0 GS/HW: Further improve GT4 render fix
Fixes transitions in Prologue version, and the coloured strip when
starting normal races.
2023-12-24 22:01:32 +10:00
Stenzek
0d519a5f28 x86/FPU: Use SSE4 pminsd+pminud for sign clamping 2023-12-24 22:01:23 +10:00
Stenzek
47ae3ff8d3 SDLInputSource: Optionally load game_controller_db.txt from data dir 2023-12-24 15:52:56 +10:00
refractionpcsx2
97b7d7c7b9 GameDB: Add merge targets for Wave Rally 2023-12-24 04:19:39 +00:00
refractionpcsx2
c552d717ff GS/HW: Only update dirty if intersects + fix tex is rt regions 2023-12-24 04:19:39 +00:00
Stenzek
3230287a5f UnitTests: Hopefully fix random failures based on load address 2023-12-24 14:03:14 +10:00
Stenzek
0bc9c7ffa1 Common: Replace x86_intrin.h with generic Intrin.h
For later Apple Silicon support.
2023-12-24 14:03:14 +10:00
Stenzek
d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek
3f62e7d36f Qt: Force include PrecompiledHeader.h for MSBuild 2023-12-24 14:03:14 +10:00
Stenzek
47a65ce01e Misc: Slim down PCH 2023-12-24 14:03:14 +10:00
Stenzek
cd6590e15c Misc: Fix clang warnings 2023-12-24 14:03:14 +10:00
Stenzek
87d392adb5 Common: Don't include x86_intrin.h globally 2023-12-24 14:03:14 +10:00
Stenzek
1dac754ca3 Misc: Purge OFFSETOF 2023-12-24 14:03:14 +10:00
Stenzek
b844bb1268 Misc: Simplify platform/compiler macros 2023-12-24 14:03:14 +10:00
Stenzek
dc859ca0a6 Misc: Simplify assertion macros 2023-12-24 14:03:14 +10:00
Stenzek
20e75b4057 GS: Replace ASSERT() with pxAssert() 2023-12-24 14:03:14 +10:00
Stenzek
a69977c62b Misc: Always use C++20 constinit 2023-12-24 14:03:14 +10:00
Stenzek
3b0513a57c Misc: Purge _M_AMD64 define 2023-12-24 14:03:14 +10:00
Stenzek
a5c2ea679d TextureDecompress: Remove non-SSE code paths 2023-12-24 14:03:14 +10:00
Stenzek
0dd5e7c081 GS: Move privileged register dump to GSRenderer.cpp 2023-12-24 14:03:14 +10:00
Stenzek
31e9206fc0 Common: Purge unused macros 2023-12-24 14:03:14 +10:00
Stenzek
4bf7d2b2fe Common: Remove macro checks for unsupported platforms 2023-12-24 14:03:14 +10:00
Stenzek
c8b051628f Misc: Replace likely/unlikely with C++20 equivalents 2023-12-24 14:03:14 +10:00
Stenzek
76f36b780c StringUtil: Replace StartsWith/EndsWith with C++20 equivalents 2023-12-24 14:03:14 +10:00
Stenzek
d73d698fd5 FileSystem: Purge GetDisplayNameFromPath()
Redundant function.
2023-12-24 14:03:14 +10:00
Stenzek
9967d5ca9e CDVD: Simplify compressed ISO detection 2023-12-24 14:03:14 +10:00
refractionpcsx2
fdc0370cdf Perfmon: Fix statistics for GS dump runner to ignore idle frames 2023-12-23 19:17:01 +00:00
refractionpcsx2
a51a46f61a GS/HW: Fix texture shuffles with reversed co-ords 2023-12-23 19:17:01 +00:00
refractionpcsx2
3edd508fc8 PerfMon: Fix statistics for games with idle frames 2023-12-23 19:17:01 +00:00
refractionpcsx2
18fea6440e DumpRunner: Fix script handling of paths containing square brackets 2023-12-23 18:40:38 +00:00
refractionpcsx2
3a242b513c GS/PCRTC/HW: Correct height of framebuffer reads 2023-12-23 18:40:38 +00:00
Dan McCarthy
ade6a6c3ab Debugger: Add memory search types: GreaterThan(OrEqual), LesserThan(OrEqual), and Not Equal (#10441)
* Make memory search search type handling more clear with enum

Adds an enum class to represent the Search type used in a memory search. Prior, this was just handled with an integer to represent each type, but it was very unclear what corresponded to which type at first glance.

Made this easier to follow by using an enum to represent the type.

* Debugger : Add support for greater than/less than/not equal search types

Adds support for basic greater than/greater than or equal/less than/less than or equal/not equal search types for the debugger's Memory Scan.

This adds a new input to allow selecting the search comparison type, which defaults to Equals, and allows switching to the above mentioned comparisons.
It's set up to allow for adding more easily. Restructures some of the functions to make having multiple comparisons quite manageable.
Adds an enum for search comparison types for easy logic handling.

* Debugger: Update Array/String search type error to mention not handling Not Equals

Currently array/string searches don't support Not Equals searches, so this needs to be removed.

* Debugger: Code cleanup + feedback changes

Sets up if expressions to use constexpr for compile time evaluation and makes the is greater/less than logic simpler to read for int. Also removes an unneeded QPushButton cast and simply compares the pointers directly.
2023-12-23 19:02:48 +10:00
JordanTheToaster
9740ebe2a4 GameDB: Various fixes 2023-12-23 17:55:16 +10:00
Silent
0a2e137613 DiscordRPC: Show session time in Discord Rich Presence 2023-12-23 17:54:58 +10:00
refractionpcsx2
56056c4846 GS/HW: Fix source partial preload alpha tracking behaviour 2023-12-23 03:29:06 +00:00
Stenzek
b32d96636d GS/HW: Always mark fetched/created depth targets as used
Same as colour targets. Fixes half screen after cutscenes in Merceneries
- Playground of Destruction.
2023-12-23 13:01:27 +10:00
Stenzek
9a4094e997 GS/Vulkan: Fix incorrect layout in depth feedback loops
Was setting the incorrect texture slot as dirty.
2023-12-23 13:01:27 +10:00
refractionpcsx2
6a0bbea9c5 GS/HW: Fix 16bit depth conversion in shuffles + fix NFSU CRC 2023-12-22 19:33:41 +00:00
PCSX2 Bot
fea213ee2c Qt: Update Base Translation 2023-12-21 13:40:51 +10:00
AKuHAK
669cadf1ee DEV9: fix incorrect max hdd size
PS2 support 28-bit addressing not the the 24-bit addressing. 24-bit addressing is limited by 8Gb storage, while 28-bit is limited by 128Gb
2023-12-20 22:22:55 +00:00
RedPanda4552
c3bafa2a40 Memcard: Fix terminator not properly flagging ejections 2023-12-20 09:58:35 +00:00
refractionpcsx2
2611a93af2 MCD: Correctly wait 60 frames for eject timeout 2023-12-19 19:02:11 +00:00
KamFretoZ
651e7e5963 OSD/FSUI: Adjust PromptFont for more readability 2023-12-19 15:38:48 +00:00
refractionpcsx2
7bf18a4464 DEV9: Implement a slightly less hacky (incomplete) DVE reg set 2023-12-19 15:14:35 +00:00
Stenzek
14fd42ad91 Core/Memory: Properly reset memory on reset
[SAVEVERSION+]
2023-12-19 15:14:35 +00:00
refractionpcsx2
33a61558e1 Core: Improve determinism on reset + default fast boot interlaced 2023-12-19 15:14:35 +00:00
RedPanda4552
05ed785af1 Memcard: Remove option to disable auto eject 2023-12-18 21:06:58 +00:00
PCSX2 Bot
158193a6c4 PAD: Update to latest controller database. 2023-12-18 19:23:29 +01:00
Stenzek
2671da5c2f GS/HW: Don't crash on texture allocation failure 2023-12-18 18:19:13 +10:00
Stenzek
a99a819e75 Qt: Fix game properties dialogs keeping app open 2023-12-18 14:12:57 +10:00
KamFretoZ
94664c24d8 GameDB: Fixes for Boku no Natsuyasumi 2 2023-12-17 16:41:55 +00:00
JordanTheToaster
466e96e79a GameDB: Sims 2 Castaway fixes
Fixes dastardly lines appearing on the ground at certain viewing angles.
2023-12-17 16:41:40 +00:00
Stenzek
fd2cd0b904 ImGui: Fix save state selector crash in DX11 2023-12-17 22:06:55 +10:00
Stenzek
4afe14dff7 Qt: Fix settings window focusing 2023-12-17 19:59:05 +10:00
Stenzek
9436a823ba Qt: Fix incorrect translation context preventing settings switch 2023-12-17 19:59:05 +10:00
Stenzek
1346c98a58 GS: Autodetect Vulkan for Intel Xe GPUs 2023-12-17 19:35:18 +10:00
lightningterror
93992ee1c1 ImGui: Fix Wsign-compare compiler warning. 2023-12-16 14:35:36 +01:00
lightningterror
e29bc933fe FullscreenUI: Fix Wunused-function compiler warning. 2023-12-16 14:35:36 +01:00
lightningterror
6df5cd8222 GS: Fix compiler warnings.
GSDeviceVK:
Fixes Wlogical-op-parentheses warning.

GSTextureCAche:
Fixes Wunused-lambda-capture warning.

GSRendererHW:
Fixes Wlogical-op-parentheses warning.
2023-12-16 14:35:36 +01:00
Stenzek
2dfc75c341 GS/DX12: Fix a warning during PrimID DATE pipeline creation 2023-12-16 21:04:52 +10:00
refractionpcsx2
e75a1edea8 GameDB: Add VU1 clamping to Dino Stalker/Gun Survivor 3 2023-12-16 03:02:03 +00:00
PCSX2 Bot
8c94efd61a Qt: Update Base Translation 2023-12-16 01:33:46 +01:00
Ty Lamontagne
20c3178dfe Debugger: Don't modify disassembly focus on CPU state change 2023-12-15 20:35:06 +00:00
refractionpcsx2
a7271697a2 CDVD: Adjust abort behaviour on action. 2023-12-15 16:12:26 +00:00
Stenzek
c2bd21922f GS: Fix more lambda capture warnings 2023-12-15 15:42:08 +00:00
lightningterror
96831b0970 GS/D3D: Fix X3206 CAS shader warning.
Warning X3206: implicit truncation of vector type warning fix.
2023-12-15 15:40:31 +01:00
refractionpcsx2
0fd5db9f78 GS: Add local references to Move lambda function 2023-12-15 12:57:14 +00:00
refractionpcsx2
918328e5b0 GS/TC: Copy only up to old RT size on preload overlap 2023-12-15 12:57:14 +00:00
lightningterror
6bb6322bde GameDB: Remove Merge sprite from God Hand.
It breaks the lighting in the game making it dark, changing the Shadeboost is not a good solution and just masks the issue.
2023-12-15 11:59:42 +01:00
JoseAaronLopezGarcia
00e255ee3c CDVD: Add ZSO support (#10396)
* add zso support

* format and fixed typo

* fix typo in extension (duplicated .cso)

* format

* proper casting

* use regular casting; added lz4 to gitmodules

* use C++ style casting

* fix casts

* add lz4 submodule

* added windows build configuration

* add lz4 to cmake

* undo

* undo

* add lz4 to SearchForStuff

* undo

* add own lz4 source code

* cleanup

* fix

* add nwe sources to windows build

* cleanup

* don't use precompile headers on lz4

* stupid compiler

* add const. better logging.

* cast to std::string

* 3rdparty: Add lz4

* use 3rdparty lz4

* cleanup references to lz4.cpp

* format code

* add missing header

* use fmt::format

* don't call inflateReset on ZSO

* use LZ4_decompress_safe

* fix syntax

* fix call to LZ4_decompress_safe

* use LZ4_decompress_safe_partial to ignore padded data

* cleanup

* refactor

---------

Co-authored-by: Stenzek <stenzek@gmail.com>
2023-12-15 13:05:04 +10:00
Stenzek
c662dd8b04 ImGuiFullscreen: Add hover animation 2023-12-15 13:04:03 +10:00
Stenzek
a85a246ab8 ImGui: Add save state selector UI 2023-12-15 13:04:03 +10:00
Mrlinkwii
9132a7c8d4 GameDB: Add monster hunter memcard filters 2023-12-14 23:40:45 +00:00
Connor McLaughlin
44367f24f9 Pad: Fix incorrect RDown icon for DualShock2 2023-12-14 17:54:28 +10:00
Mrlinkwii
5d6a9a68fe GameDB: memcardFilters for Ratchet&Clank series 2023-12-13 19:51:01 +00:00
JordanTheToaster
476d15f0fc GameDB: Various fixes
You like HPO?
2023-12-13 16:53:01 +10:00
Stenzek
cce7f465f2 CI/AppImage: Bump libc6 downgrade version 2023-12-13 14:51:06 +10:00
ElTioRata
0e289d2d3b GameDB: Darkwatch Upscaling Fix
Sets HPO to Special setting to fix bloom misalignment seen on blood vision
2023-12-13 14:50:39 +10:00
ElTioRata
efc9321cec GameDB: RPM Tuning bloom alignment fix
Enables Full Round Sprite + Wild Arms Hack + Autoflush
2023-12-12 21:42:55 +00:00
PCSX2 Bot
4154784f09 Qt: Update Base Translation 2023-12-12 12:55:30 +10:00
RedPanda4552
feb9d7b2a9 Memcard/Qt/Big Picture: Make shutdowns, resets, disc swaps, and savestates aware of memcard busy status 2023-12-12 12:47:39 +10:00
RedPanda4552
da22df5f5d Memcard: Move auto eject countdown out of CDVD up into counters vsync loop 2023-12-12 12:47:39 +10:00
Stenzek
78f751959d GS/HW: Don't try to double-buffer preload depth targets
Spec violations if we do.
2023-12-12 12:46:39 +10:00
Stenzek
b0c3a1e23f GS/HW: Handle GT4 alpha channel shuffle 2023-12-12 12:46:39 +10:00
Mrlinkwii
cb703a6ce5 GameDB : Upscaling fixes for X-Men 2 - Wolverine's Revenge 2023-12-11 20:22:28 +00:00
PCSX2 Bot
c1b26b87a8 PAD: Update to latest controller database. 2023-12-11 17:34:11 +01:00
PCSX2 Bot
15f752f002 Qt: Update Base Translation 2023-12-11 11:27:11 +01:00
Stenzek
af1a4ab07a FullscreenUI: Use PromptFont for keyboard/controller icons 2023-12-11 16:55:29 +10:00
KamFretoZ
5413765a23 GameDB: Update GameDB Schema for the new HPO Native Option 2023-12-11 16:55:17 +10:00
KamFretoZ
da63afa758 GameDB: Fixes for WALL-E 2023-12-11 16:55:17 +10:00
JordanTheToaster
1d86d674e5 GameDB: FFX International fixes
Fixes for character flickering caused by the EE clamp mode being set to full.
2023-12-11 15:01:34 +10:00
lightningterror
5718c3d14d Input-rec: Set git tagged emu version instead of static version.
The static version was set as 1.7.0, not knowing which nightly version the recordings were made on.
2023-12-11 15:01:13 +10:00
IlDucci
2bfefaf296 UI: Minor additions for translations and English text changes
- Adding translation support for all the substrings related to the single/multiframe GS Dump message.
- Correcting the None option in the Deinterlacing settings according to what was talked about in Crowdin, unified that string with the Big Picture mode.
- Minor English text fixes reported in Crowdin.

Second attempt at doing this PR after the former, https://github.com/PCSX2/pcsx2/pull/10253 , was mangled by bad squashing and rebasing.
2023-12-11 15:00:56 +10:00
Stenzek
2c00ccca83 Qt: Resolve any symbolic links in AppRoot/DataRoot
Should fix incorrect relative path generation when PCSX2's data
directory is a within a symbolic link.
2023-12-11 14:55:36 +10:00
Stenzek
ade2cc8182 Path: Add RealPath() 2023-12-11 14:55:36 +10:00
lightningterror
f546ea1f8a iR5900: Correct some log links. 2023-12-10 16:34:40 +01:00
lightningterror
ff499d42a0 GS/HW: Fix Wunused-variable warning. 2023-12-10 16:34:40 +01:00
lightningterror
10e5af2ddf GS/D3D12: Fix variable is reassigned a value before the old one has been used warning.
Codacy.
2023-12-10 16:34:40 +01:00
lightningterror
724f92562c GSDumpRunner: Fix trailing whitespace warning.
Codacy.
2023-12-10 16:34:40 +01:00
lightningterror
2b68c5e383 GS: Fix format string arguments warning.
%i in format string (no. 1) requires 'int' but the argument type is Unknown.

Codacy.
2023-12-10 16:34:40 +01:00
lightningterror
47545e511d DEV9: Fix Function parameter should be passed by const reference warnings
Codacy.
2023-12-10 16:34:40 +01:00
Stenzek
b7aea5b726 SmallString: Add missing copy construct/assign operators 2023-12-11 01:28:34 +10:00
Stenzek
5338a4f17c GS/HW: Add 'Align To Native' HPO mode 2023-12-10 15:32:01 +10:00
Stenzek
e2dcabcbea Qt: Prompt user to enable HC mode on achievement login 2023-12-10 13:09:21 +10:00
Stenzek
971929777d Achievements: Handle dynamically-sized leaderboard trackers 2023-12-10 13:09:21 +10:00
Dan McCarthy
0f4a95e31b Qt: (Debugger) Add ability to remove result from Memory Search results
Adds the ability to remove individual search results from the Memory Search results list. Right clicking a result will give the "Remove Result" option in the context menu.
2023-12-09 15:29:35 +00:00
Dan McCarthy
b453787670 Qt: Adds right click Go To Disassembly menu option to Memory Search
Allows user to right click a memory search result in order to go to that memory address location in the disassembly view. This saves several step and makes it easier to do.

Also adds precedent for the memory search result context menu which will be used in future features.
2023-12-08 22:21:29 +10:00
JordanTheToaster
c555dbc3e8 3rdparty: Update VK memory allocator
Updates VK memory allocator to latest master commit.
2023-12-08 22:20:33 +10:00
JordanTheToaster
1561e07ddf 3rdparty: Update D3D12 memory allocator
Updates D3D12 memory allocator to latest master commit.
2023-12-08 22:20:15 +10:00
JordanTheToaster
ec9bc59962 GameDB: PJ King Kong fixes
Fixes for the hash cache being silly and spiking to stupid levels killing performance.
2023-12-08 20:20:35 +10:00
JordanTheToaster
7fd82fffab 3rdparty: Update Vulkan Headers to v1.3.272
Updates Vulkan Headers to v1.3.272.
2023-12-06 20:16:59 +10:00
RedPanda4552
0652b218db Big Picture: Enforce immediate save for macro button selection and frequency
Fixes settings not saving until emulator exit
2023-12-06 14:25:55 +10:00
RedPanda4552
59217b9af3 Big Picture: Fix macro pressure/deadzone not having independent labels
Fixes mangled pop-up, allows both to be set correctly/independently
2023-12-06 14:25:55 +10:00
RedPanda4552
46c9bcbc4f Big Picture: Don't use macro frequency display label as config key
Fixes Big Picture unable to set macro frequency
2023-12-06 14:25:55 +10:00
JordanTheToaster
f6154032c7 3rdparty: Use upstream XZ submodule
For some reason we used a branch XZ from around 6 years ago? Honestly not sure why.
2023-12-04 22:16:11 +00:00
JordanTheToaster
6c2d2e8455 GameDB: FIFA World Cup 2006 Fixes
Fixes broken player textures.
2023-12-04 16:55:27 +00:00
JordanTheToaster
4d61f26dfa ci: Revert to labeler version 4.3.0
Seems to cause the labeler to explode.
2023-12-04 16:55:27 +00:00
RedPanda4552
86c42a00a3 Pad: Add controller ejection 2023-12-04 16:28:38 +10:00
RedPanda4552
2443e06745 [SAVEVERSION+] Multitap: Make multitaps manage their own states 2023-12-04 16:28:38 +10:00
RedPanda4552
eb1d93d4e5 Pad/Multitap: Improve PS2-side ejection detection 2023-12-04 16:28:38 +10:00
Dan McCarthy
f0bf525cf4 Qt: Addresses typo in duplicate Patch console log warning
Fixed unintentionally non-sensical wording in log warning to inform the user that a patch was skipped over since a patch with the same name had already been loaded.
2023-12-04 16:23:40 +10:00
Dan McCarthy
45758add5d Use consistent snake_case naming & don't pass string_view by ref
Addresses feedback to use consistent naming conventions as most variables are using snake_case. Also no longer passes string_view by reference as per feedback.
2023-12-04 16:23:40 +10:00
Dan McCarthy
57465b2892 Qt: Clarifies wording of Patch log for disabling duplicate patch
Adds a better worded log statement for informing the user that a patch with a duplicate name was found and not loaded to avoid conflict.

The common expected reason this can happen is a bundled patch having the same name as a /patches/ pnach patch having the same name. By default it will prioritize the folder patch over the bundled patch.

Makes it more clear/less confusing in phrasing.
2023-12-04 16:23:40 +10:00
Dan McCarthy
8a95eecf60 Qt: Use const patch lists for ContainsPatchName 2023-12-04 16:23:40 +10:00
Dan McCarthy
766b0ba9c8 Qt: Update to use string_view references & const
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
2023-12-04 16:23:40 +10:00
Dan McCarthy
a6796fe80a Qt: Improves wording of patch skipping log 2023-12-04 16:23:40 +10:00
Dan McCarthy
5e450388f9 Qt: Fix final return condition for PatchStringHasUnlabelledPatch 2023-12-04 16:23:40 +10:00
Dan McCarthy
cc62825081 Qt: Fix console warning about hiding bundled patches
Fixes syntax error with console write format to display warning when bundled patches are hidden due to unlabeled patches being loaded.
2023-12-04 16:23:40 +10:00
Dan McCarthy
7b5d640f35 Qt: Add warning that unlabeled patches cause bundled patches to hide
Bundled patches don't display when unlabeled patches are loaded (since we can't guarantee they don't collide). This warns the user that bundled patches are hidden when unlabeled patches are loaded. (The warning hides when no unlabeled patches are loaded)
2023-12-04 16:23:40 +10:00
Dan McCarthy
96a9e8a090 Qt: Display patch folder patches & .zip patches if no name collision
Currently if one has patches from the patch folder, no bundled patches from the .zip file will be displayed.

This changes it so that we can display both the folder patches AND the .zip bundled patches as long as their names don't collide. If there's a collision, the folder patch will override the bundled patch.

Also, if an unlabeled patch is loaded from the folder then all bundled patches will be hidden (like they did prior) since we can't guarantee there's no collision.
2023-12-04 16:23:40 +10:00
Stenzek
d572765f09 Qt: Allow language change without shutting down VM 2023-12-04 14:21:33 +10:00
Mrlinkwii
ce539f30a5 Qt: Fix links in first page of Setup Wizard
Co-Authored-By: Connor McLaughlin <11288319+stenzek@users.noreply.github.com>
2023-12-04 14:20:41 +10:00
PCSX2 Bot
103cf9c3bf Qt: Update Base Translation 2023-12-03 14:40:39 +01:00
Silent
e9fca78c13 FullscreenUI: Fixup mistakes missed in #10330 2023-12-02 15:39:36 +00:00
refractionpcsx2
19431ef675 GS: Fix bug in STQ rounding 2023-12-02 15:39:21 +00:00
refractionpcsx2
8d6c5ea406 GS/HW: Combine strips from same pixels, slight different sub pixel 2023-12-02 15:39:21 +00:00
Stenzek
0dfc35ee5f deps: Bump to Qt 6.6.1 and SDL2 2.28.5 2023-12-02 16:51:46 +10:00
JordanTheToaster
b8a1d07cdc GameDB: Misc fixes
Fixes for right edge artifacts in Katamari Damacy.
2023-12-01 15:19:24 +00:00
JordanTheToaster
574f95a35b 3rdparty: Update fmt to v10.1.1
Updates fmt to v10.1.1.
2023-12-01 20:59:18 +10:00
JordanTheToaster
cefcd843fc Misc: Fix fmt errors 2023-12-01 20:59:18 +10:00
Silent
279c84f8e1 Achievements: Fix the percentage counter when only unofficial achievements exist
Now correctly shows "This game has no achievements" and no percentage bar,
as per the RetroAchievements integration guide.
2023-12-01 20:35:45 +10:00
Mrlinkwii
b69cfad8ef QT: add the ability to load .backup save states in UI 2023-12-01 20:35:22 +10:00
Stenzek
0bdc4394aa 3rdparty/rcheevos: Bump to 8afec6c 2023-12-01 20:35:08 +10:00
Stenzek
9e720d1e2b Achievements: Fix multiple leaderboard trackers 2023-12-01 20:35:08 +10:00
Silent
9a932e7dd5 FullscreenUI: Properly account for multiline Rich Presence in Title Info 2023-11-30 22:44:52 +00:00
Radiata
62c0148472 GameDB: Radiata Stories
Fixes random incorrect model position.
2023-11-30 13:40:36 +00:00
Stenzek
97cedb311a CDVD: Get rid of negative data offsets
It doesn't make sense. Code was written in 2009 with no explaination.
2023-11-30 18:51:08 +10:00
Stenzek
776cdd60fa GzippedFileReader: Prevent out-of-bounds reads 2023-11-30 18:51:08 +10:00
lightningterror
234b3df332 GameDB: Various gshw fixes.
Add full mipmap plus ps2 trilinear to Snoopy vs. The Red Baron.
Improves ground textures to match sw renderer.

Add full recommended blending level to Blokus Club with Bumpy Trot.
Fixes water reflections.

Add full mipmap plus ps2 trilinear and medium recommended blending level to Gallop Racer 2003: A New Breed.
Blending improves lighting, maximum blending is needed for full accuracy.
Mipmap + trilinear, improves ground textures to match sw renderer.

Add full mipmap plus ps2 trilinear
2023-11-28 19:08:12 +01:00
PCSX2 Bot
fa0744fb8e Qt: Update Base Translation 2023-11-28 11:31:02 +01:00
PCSX2 Bot
376216a2c0 PAD: Update to latest controller database. 2023-11-28 11:30:42 +01:00
Stenzek
88989bfbfd Hotkeys: Throttle pause requests 2023-11-27 12:24:51 +10:00
Stenzek
acb45459f5 Achievements: Use big picture to confirm HC mode disable 2023-11-27 12:24:51 +10:00
JordanTheToaster
8a93c5696f Console: Update CPU detection
Cuts out unnecessary info and uses CPUInfo to print processor name core count and thread count.
2023-11-27 12:24:28 +10:00
JordanTheToaster
33a6948e68 GameDB: Ace Combat 4 fixes
Fixes large HC size causing high GS%.
2023-11-26 22:44:56 +01:00
lightningterror
cdd5bd538a GameDB: Update Ar tonelico upscaling fixes.
Round sprite from half to Full.
Fixes textboxes and character portraits.
2023-11-26 22:44:32 +01:00
JordanTheToaster
15082d7777 GameDB: NBA Live 05 and 09 fixes
Fixes for sprite rendering and crowd rendering.
2023-11-25 16:23:01 +00:00
JordanTheToaster
5d2177d929 GameDB: Purge HPO Normal from NFS U2
Purges HPO Normal from Underground 2 as it causes screen shake even with the software FMV workaround in place.
2023-11-25 16:23:01 +00:00
refractionpcsx2
31642ceca9 GS/HW: Partial revert earlier FMV fix 2023-11-25 12:48:08 +00:00
refractionpcsx2
e84335742d GS/HW : Mirror half pixel offset when using FMV Blit override 2023-11-25 12:48:08 +00:00
refractionpcsx2
6d31ef8849 GameDB: Add Autoflush and HPO Normal to Manhunt 2023-11-25 12:47:54 +00:00
refractionpcsx2
2fd24277c1 GS: Pre-round/truncate STQ values based on hardware tests 2023-11-25 12:47:54 +00:00
lightningterror
a60c30155e GS: Cleanup GSClut.
Constants, switch cases.
2023-11-25 13:11:05 +01:00
Stenzek
041d26670f 3rdparty/cubeb: Minimize and update to 54217bc 2023-11-25 13:07:50 +10:00
JordanTheToaster
0891a27f75 3rdparty: Update CPUInfo to latest
Updates CPUInfo to the latest version.
2023-11-25 13:05:54 +10:00
refractionpcsx2
d25246a212 GS/HW: Allow more draws to remain if recent draws done near vsync 2023-11-24 23:45:57 +00:00
refractionpcsx2
7853843b0b GameDB: Fix FMVs on Rule of Rose + PAL Region 2023-11-24 20:53:34 +00:00
refractionpcsx2
7cc6af8f85 GS/HW: Restrict making new targets if no uploads 2023-11-24 10:34:51 +00:00
refractionpcsx2
7fcc47dd86 GS/HW: In double half clears, take larger bitdepth 2023-11-24 10:34:51 +00:00
JordanTheToaster
bca4f15f9d 3rdparty: Update xbyak to 6.73
Updates xbyak from 6.00 to 6.73.
2023-11-24 09:43:35 +00:00
Connor McLaughlin
b644957cee Achievements: Avoid string copy on server call 2023-11-24 16:27:22 +10:00
Mrlinkwii
2806b3a3c3 GameDB : update Driving Emotion fixes 2023-11-23 19:22:57 +00:00
PCSX2 Bot
b166615067 Qt: Update Base Translation 2023-11-22 15:28:23 +01:00
Dan McCarthy
ae2860d03d Debugger: Allow copying function names
Add the ability to copy a function name when you right click the first instruction of a function (the line where the function name displays).

Instructions inside the function that are not the first instruction will not show the copy option, partly because it's less clear what will be copied but also to not needlessly overpopulate the context menu.
2023-11-21 20:54:27 +00:00
Tyler Wilding
21b3464212 translations: Syncing Crowdin translations (#10301) 2023-11-21 18:13:47 +00:00
TellowKrinkle
5c1f280988 Mac: Add microphone permissions string
Allows us to ask permission to use the microphone
2023-11-21 20:45:55 +10:00
Stenzek
7ec57692b1 Qt: Remove QtNetwork dependency 2023-11-21 20:40:13 +10:00
Stenzek
d096fed8db Qt: Use HTTPDownloader instead of QtNetwork for updates 2023-11-21 20:40:13 +10:00
Stenzek
15091cea54 Qt: Fix progress dialog cancelling 2023-11-21 20:40:13 +10:00
Stenzek
7715d122c7 HTTPDownloader: Add support for progress updates/cancelling 2023-11-21 20:40:13 +10:00
Stenzek
f18964ad44 Qt: Use main window geometry for temporary window
When displaying the confirm popup when fullscreen.
2023-11-21 15:37:10 +10:00
Stenzek
b79edf1cb5 MemoryCardFolder: Remove unused constant 2023-11-21 13:35:46 +10:00
Stenzek
67c5509524 Qt: Fix confirm dialog parenting to wrong window 2023-11-21 13:35:46 +10:00
Stenzek
0770249da1 Qt: Make ALT+F4 while fullscreen exit PCSX2 2023-11-21 13:35:46 +10:00
dreamsyntax
0ebc1ce7b2 Readme: Clarify latest build/contribution info; Adjust Technical Notes header type for consistency 2023-11-20 15:37:19 +00:00
Dan McCarthy
90e9b60287 Debugger: Implement subsequent/next scan for Mem Search (#10260)
Co-authored-by: Ty <AmFobes@gmail.com>
2023-11-19 14:41:27 +00:00
Ty Lamontagne
9a6e5458c9 Debugger: Clear breakpoint skips when resetting 2023-11-19 14:27:30 +00:00
cyanea-bt
3333553b24 MemoryCardFolder: Fix incorrect save timestamps (#10287)
* MemoryCardFolder: Fix incorrect save timestamps

* MemoryCardFolder: move timegm macro to source file

* MemoryCardFolder: remove timegm macro
2023-11-19 13:30:10 +10:00
JordanTheToaster
1565c59714 GameDB: Sega Ages 2500 Fixes
Fixes for excessive texture uploads and massive hash cache sizes.
2023-11-18 14:10:53 +00:00
Goatman13
92a1eda82a R3000: Fix COP0 Status value on reset
Previously used value was wrong. BEV bit wasn't correct one, and CU0 and TS bits are not enabled by default.
2023-11-17 11:20:48 +00:00
Dan McCarthy
84e24a0142 Fix Failing to reload cheats on button press
The Cheats Settings menu was failing to reload cheats when pressing the button. This meant if you enabled a cheat, made changes, and clicked reload, there would be no updates in behavior.

This was due to the reload button getting wired to the function that refreshes the list of cheats, rather than the function that refreshes the list AND reloads the actual enabled cheats.

This now calls the right function and when reloading, any changes thart were saved to the cheat will now be present.
2023-11-17 13:33:20 +10:00
PCSX2 Bot
d235c2d899 Qt: Update Base Translation 2023-11-17 01:53:17 +01:00
refractionpcsx2
a26d7f615b CDVD: Tidy up some bits, abort read head on Abort/Break 2023-11-16 12:34:38 +00:00
refractionpcsx2
3411729ca5 CDVD: Don't include read times during seeks 2023-11-16 12:34:38 +00:00
refractionpcsx2
62c35753aa GS/TC: Readd horizontal offset if not processed during invalidation 2023-11-16 12:11:35 +00:00
lightningterror
6967e66f74 GameDB: Add Auto flush to MGS2 Substance.
Fixes depth of field blur.
2023-11-15 13:22:55 +00:00
JordanTheToaster
9d96e23cb3 GameDB: Ace combat fixes
Fixes for terrain rendering in Ace Combat 4 and Zero.
2023-11-15 13:22:29 +00:00
Mrlinkwii
91fa8426f1 GameDB: fixes for XS Junior League Soccer & Guitar Hero - Van Halen 2023-11-14 15:13:08 +00:00
Daniel Gerendasy
4af89576aa IOP HLE: Rename update host root functions 2023-11-14 18:38:19 +10:00
Daniel Gerendasy
b5f8ef0106 Added support for HostFs when booting an iso 2023-11-14 18:38:19 +10:00
Connor McLaughlin
3ca7d2d626 CI/Flatpak: Disable build/repo linting
We're currently failing validation with a `finish-args-unnecessary-xdg-config-access` error.

This is **not** caused by anything we're doing, it's an issue with the upstream Qt SDK: 3bac997f76/org.kde.Sdk.json.in (L84)

So, for now, just disable it. I don't have time at the moment to chase bugs upstream, if it's still broken next week, I'll do so then.
2023-11-14 13:09:48 +10:00
PCSX2 Bot
d37cd2e26d PAD: Update to latest controller database. 2023-11-13 17:10:52 +01:00
JordanTheToaster
46527cab53 GameDB: PJ King Kong fixes
Games still busted but it at least matches software in hardware now.
2023-11-10 20:38:21 +00:00
Connor McLaughlin
09d15c4bce GS/HW: Fix incorrect alpha valid check in LookupTarget()
Regression from #10254.
2023-11-10 17:27:56 +10:00
seta-san
68f7df6a52 GameDB: Fix some Japanese Games (#10247) 2023-11-09 23:29:12 -06:00
Stenzek
4714a2fccb Achievements: Identify using running ELF instead of disc ELF 2023-11-09 17:55:22 +00:00
Stenzek
72145f4914 Common: Remove ThreadPool class
No longer needed.
2023-11-09 17:55:22 +00:00
Stenzek
7247a1e5a4 HTTPDownloaderCurl: Switch to multi/async API 2023-11-09 17:55:22 +00:00
Stenzek
343315c587 Achievements: Use a 60 second timeout for server calls 2023-11-09 17:55:22 +00:00
Stenzek
c557ea1b6f HTTPDownloader: Drop Common namespace
Annoying to type...
2023-11-09 17:55:22 +00:00
Stenzek
e9a4d9702c Achievements: Use retryable client error status code 2023-11-09 17:55:22 +00:00
Stenzek
5e48e0d8c0 3rdparty/rcheevos: Update to 8a717b1 2023-11-09 17:55:22 +00:00
refractionpcsx2
fa5aedc906 GS/HW: Don't convert old depth if being overwritten 2023-11-09 17:52:18 +00:00
refractionpcsx2
a3eb1655c6 COP0: Correctly update performance counter cycles 2023-11-09 14:20:51 +00:00
refractionpcsx2
8e9fd91cee Counters: Pass correct start cycle 2023-11-08 17:19:55 +00:00
lightningterror
e3d4b0e56a SPU2: Fix Wsign-compare warnings. 2023-11-08 15:43:52 +01:00
lightningterror
8d7227b1f9 Interpreter: Fix Wsign-compare warning. 2023-11-08 15:43:52 +01:00
lightningterror
d07b190322 IOP: Fix Wunused-variable warnings. 2023-11-08 15:43:52 +01:00
noproblemx2
e2d8b9d06b Templates: Update piracy note (#10251) 2023-11-08 14:32:07 +00:00
TellowKrinkle
fecee19e1a Qt: Check both English and non-English name for cover paths 2023-11-06 22:51:36 -06:00
PCSX2 Bot
f04efead96 Qt: Update Base Translation 2023-11-06 23:19:07 +01:00
JordanTheToaster
b13ecb7cfd GameDB: Various fixes
Fixes for FFX and player uniforms in Fifa 2005.
2023-11-06 18:50:42 +00:00
refractionpcsx2
0fc9fa541f IPU: Pause IPU_TO on tag edge. Stop repeat Interrupts 2023-11-06 14:21:39 +00:00
refractionpcsx2
b824c2d31a Counters: Improve counter updates and fix a couple of errors 2023-11-06 14:20:49 +00:00
refractionpcsx2
65d4baa944 EE/Int: Improve FPU emulation 2023-11-06 14:20:22 +00:00
Stenzek
cd5a916f99 GS: Fix reload texture replacements hotkey
Also skips tossing targets, they can get kept around for less jank.
2023-11-05 13:40:45 +10:00
Stenzek
66b779a77d Qt: Fix Big Picture UI locking up after game list switch 2023-11-05 13:40:45 +10:00
Stenzek
c62bd4ce97 Qt: Fix prefer-English-title when changing languages 2023-11-05 13:40:45 +10:00
Ty Lamontagne
2f95dc20c6 IOP HLE: Generate module list on release builds 2023-11-04 17:31:38 +00:00
KamFretoZ
a284d49692 GameDB: Fixes for Kamen Rider Kabuto 2023-11-04 13:38:27 +00:00
lightningterror
68c73c5be1 GS/VK: Make sure feedback loop is enabled for SW_AD_TO_HW blend. (#10225)
Fixes Colin McRae Rally 2005 on Vulkan.
Possible others as well on basic blend with barriers or Medium blend with barriers disabled.

Bump shader cache version.
2023-11-04 11:00:43 +01:00
TellowKrinkle
4fcbee9594 Updater:Mac: Show tar stderr if it fails 2023-11-04 02:24:51 -05:00
refractionpcsx2
e9afe396b0 COP2/Int: Flush VU0 before running COP2 2023-11-03 21:28:39 +00:00
refractionpcsx2
927d8ce237 EE Int: Implement a variation of the wait loop hack 2023-11-03 21:28:39 +00:00
refractionpcsx2
461f3bd89f EE Int: Add EE overclocking to interpreter 2023-11-03 21:28:39 +00:00
refractionpcsx2
ed1791ab02 Int/VU0: Improve VU0 sync, mainly for interpreter.
Also correctly doubles the opcode time when double issue is disabled (interpreter).
2023-11-03 21:28:39 +00:00
refractionpcsx2
8b9af2c21b VU: Avoid overclocking when VUSync fix is enabled 2023-11-03 21:28:39 +00:00
refractionpcsx2
50872438e9 VU: scale VU0 cycle rate with EE
Also fix cycle underflow issue
2023-11-03 21:28:39 +00:00
PCSX2 Bot
9b9e70e7e8 Qt: Update Base Translation 2023-11-03 14:56:51 +01:00
JordanTheToaster
f832a07755 GameDB: SOCOM Fixes
Fixes for every other SOCOM game I missed that needs InstantDMA to fix texture corruption.
2023-11-02 09:13:12 +00:00
kamfretoz
c3a632e612 Qt: Show currently active savestate slot on status bar 2023-11-01 13:17:47 +00:00
JordanTheToaster
bad7a94b6d GameDB: Various fixes
Fixes for floating eye balls being kinda creepy and a really bad game having really bad interlacing issues.
2023-11-01 11:01:42 +00:00
JordanTheToaster
7e9fbabd83 GameDB: Scarface TWIY Fixes
Fixes for chromatic fringing on edges.
2023-10-31 22:40:20 +00:00
JordanTheToaster
f5750628bf GameDB: SOCOM II Fixes
Fixes for texture corruption.
2023-10-31 19:32:07 +00:00
Ty Lamontagne
692ca763a1 Debugger: Use the proper data role for sorting threads 2023-10-31 15:42:56 +00:00
Ty Lamontagne
9eb1731516 Debugger: Flip the Enabled breakpoint column 2023-10-31 15:42:56 +00:00
Ty Lamontagne
93776707a9 Debugger: Stub the current opcode if no function is selected 2023-10-31 15:42:56 +00:00
Ty Lamontagne
ebe6d3cbee Debugger: Prevent crashing opportunities when there is an empty function list 2023-10-31 15:42:56 +00:00
Ty Lamontagne
46a0c2d5b6 Debugger: IOP Function Tree
Co-authored-by: Ziemas <ziemas@ziemas.se>
2023-10-31 15:42:56 +00:00
Ty Lamontagne
85539c7bb9 DebugTools: Simplify the symbol map 2023-10-31 15:42:56 +00:00
dependabot[bot]
78bc0a52ea Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 21:28:31 +00:00
Mrlinkwii
13784d3576 GameDB: add EE clamping to FF X-2 2023-10-30 15:16:21 +00:00
Mrlinkwii
d0371b0ff7 GameDB: add EE clamping to FFX 2023-10-30 15:16:21 +00:00
PCSX2 Bot
ae490125e9 Qt: Update Base Translation 2023-10-30 12:10:42 +00:00
refractionpcsx2
bb9e1c5dbc GS: Properly check load condition when reloading CLUT 2023-10-30 12:10:15 +00:00
JordanTheToaster
f350f9905a GameDB: Various fixes
Fixes for various games interlacing by using software FMV switch.
2023-10-30 10:15:53 +00:00
Mrlinkwii
040cf41468 GameDB: Revert Valkyrie Profile 2 PAL patch (#10205)
This reverts commit e016e3280d.
2023-10-30 09:14:08 +00:00
refractionpcsx2
e016e3280d GameDB: Patch to fix Valkyrie Profile 2 PAL FMV timing 2023-10-29 22:20:37 +00:00
refractionpcsx2
3850227605 PCRTC/Counters: Fix H-Blanks per frame 2023-10-29 22:20:24 +00:00
refractionpcsx2
06e80f0c31 GS: Disable interlace skipping on FMVs on SW FMV switch 2023-10-29 22:19:32 +00:00
Stenzek
bb7e08cdce CI/AppImage: Add I_WANT_A_BROKEN_WAYLAND_UI environment variable 2023-10-29 22:48:37 +10:00
lightningterror
3b3fb28412 GS/HW: Fix Tex in RT Merge Targets crashing.
Check if src->m_from_target is actually null so it doesn't cause any access violations when reading.

Fixes Dirge of Cerberus crashing with Merge Targets enabled.
2023-10-29 01:32:25 +02:00
lightningterror
ba27d3ff79 GameDB: Add speedhack and hwfixes to McDonald's Original Happy Disc.
PaRappa the Rapper 2:
Instant Vu 0, MTVU0, fixes noodles.

Pipo Saru 2001:
Recommended blend level high, fixes metal surfaces not being rendered correctly.
Full mipmap, plus trilinear ps2, fixes ground textures to match sw renderer.
2023-10-29 01:31:50 +02:00
PCSX2 Bot
6ac8ac6ae6 Qt: Update Base Translation 2023-10-28 15:18:28 +02:00
Stenzek
802081c3f8 CI/Flatpak: Validate build before pushing 2023-10-28 21:28:36 +10:00
Stenzek
2a2cd0dbca CI/Flatpak: Use socket=x11 instead of fallback 2023-10-28 21:28:36 +10:00
Stenzek
75a824e164 CI/AppImage: Work around GH runner issue 8659 2023-10-28 21:16:48 +10:00
refractionpcsx2
27d71f530a GS/HW: Disable texture when not required 2023-10-27 18:24:27 +01:00
lightningterror
b53ffb65af GS/HW: Minor optimization on color dest blend.
Add early return, no need to run the rest of the code.
2023-10-27 00:31:50 +02:00
Ty Lamontagne
e9ead0d33d Debugger: Disable instruction simplification 2023-10-26 19:26:43 +01:00
Ty Lamontagne
be405eb705 Debugger: Visually show what CPU triggered a breakpoint 2023-10-26 19:26:43 +01:00
Ty Lamontagne
95d1dcc521 Debugger: Fallback to unmangled symbol when it cannot be demangled 2023-10-26 19:26:43 +01:00
Ty Lamontagne
96895a80c1 Debugger: Try to rationally size bp,tl and sf columns 2023-10-26 19:26:43 +01:00
Ty Lamontagne
132726bc45 Debugger: Provide visual feedback of a breakpoints enable setting 2023-10-26 19:26:43 +01:00
Ty Lamontagne
593f977621 Debugger: Add spacebar as a breakpoint toggle hotkey 2023-10-26 19:26:43 +01:00
Ty Lamontagne
582c23bae8 Debugger: Humanise CSV exporting
An oversight of the old system was that all integers were converted to hexadecimal
2023-10-26 19:26:43 +01:00
Ziemas
e1bfd95f63 MipsStackWalk: Detect leaf functions. 2023-10-26 19:25:13 +01:00
Ziemas
715bc94bd9 MipsStackWalk: Fix IOP stack walking 2023-10-26 19:25:13 +01:00
Ziemas
e19c9a967d MipsStackWalk: clang-format 2023-10-26 19:25:13 +01:00
Ziemas
83c18d0cb6 DebugInterface: Fix r3000 isValidAddress 2023-10-26 19:25:13 +01:00
JordanTheToaster
bfd1a4c341 GameDB: MGS 3 Fixes
Fixes for skin colour and banding by recommending high blending.
2023-10-25 17:48:09 +01:00
Stenzek
3878e94253 Qt: Fix QFileDialog usage in NewInputRecordingDlg 2023-10-25 23:43:35 +10:00
Silent
af07ee9abb Achievements: Don't prompt for system reset if enabling Hardcore Mode on a game without achievements/leaderboards
Also improves behaviour parity between Qt and Fullscreen UI,
since the latter used to prompt for system reset even if the game had
no RetroAchievements entry.
2023-10-25 19:01:47 +10:00
Silent
22590754fd Achievements: Disable Hardcore Mode if the game has a RetroAchievements entry, but no achievements or leaderboards 2023-10-25 19:01:47 +10:00
Stenzek
7205f10ec2 CI/Flatpak: Drop host:ro filesystem permission
We don't need it. Adding directories through portals in Qt works fine.
2023-10-25 17:53:17 +10:00
Stenzek
f7750f04a6 CI/Flatpak: Disable Wayland support 2023-10-25 17:53:17 +10:00
Stenzek
d58d84dbcf CI/Flatpak: Bump to KDE 6.6 runtime 2023-10-25 17:53:17 +10:00
Stenzek
f025261ddf CI/AppImage: Bump to Clang/LLVM 17 2023-10-25 17:53:17 +10:00
Stenzek
dcf57093f8 CI/AppImage: Disable Wayland support 2023-10-25 17:53:17 +10:00
Connor McLaughlin
3c8591d371 CI/AppImage: Increase timeout to 90 minutes 2023-10-25 16:36:08 +10:00
Stenzek
d27ad8e23a CI/AppImage: Enable DBus for dependencies 2023-10-25 13:38:15 +10:00
PCSX2 Bot
3ecfb5b073 PAD: Update to latest controller database. 2023-10-23 18:03:03 +02:00
Mrlinkwii
e9777cf325 GameDB: fixes for "NFL Quarterback Club 2002 2023-10-23 11:42:34 +01:00
Mrlinkwii
7aa46e7eeb GameDB: fixes for Football Manager series 2023-10-23 11:42:34 +01:00
Silent
775f1a042d DInputSource: Limit the amount of reported buttons and POV hats to what the data format supports
Fixes a crash when the device reports more buttons than what
DIJOYSTATE2 can handle.
2023-10-23 18:46:33 +10:00
dependabot[bot]
82f09bdb81 Bump flatpak/flatpak-github-actions from 6.2 to 6.3
Bumps [flatpak/flatpak-github-actions](https://github.com/flatpak/flatpak-github-actions) from 6.2 to 6.3.
- [Release notes](https://github.com/flatpak/flatpak-github-actions/releases)
- [Commits](https://github.com/flatpak/flatpak-github-actions/compare/v6.2...v6.3)

---
updated-dependencies:
- dependency-name: flatpak/flatpak-github-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 18:45:25 +10:00
refractionpcsx2
489fdc5566 GS/TC: Invalidate alpha on overlapping targets with no alpha 2023-10-21 23:52:07 +01:00
refractionpcsx2
3e4be2c800 GS/TC: Check transfer list is empty before accessing on source lookup 2023-10-21 20:33:56 +01:00
Connor McLaughlin
f61bb99d3a DInputSource: Ignore devices with no buttons 2023-10-22 02:02:57 +10:00
Lucy Phipps
0a8f71e76e USB: Fix inverted mouse wheel (#10158)
fixes usb mouse wheel inputs for e.g. Half-Life
2023-10-22 02:02:27 +10:00
lightningterror
833cb48050 GS/HW: Enable PABE only when Alpha min is lower than 128.
When alpha min is higher or equal to 128 we will always blend so no need to enable the pabe flag, enable only when alpha min is lower than 128.
2023-10-21 10:03:44 +02:00
Ziemas
09574b3937 SPU2: Temporary CDDA fix 2023-10-20 16:46:12 +01:00
Ziemas
e2d4e384e3 SPU2: Minor cleanup
Remove useless RegWrite_Reverb

Update some comments and remove some useless ones.
2023-10-20 16:46:12 +01:00
Ziemas
6bff6016ff SPU2: Rearrange interpolation table
Being able to contiguously access the terms we need might come in handy
for SIMD fun later.
2023-10-20 16:46:12 +01:00
Mrlinkwii
09cb84f617 GameDB: Adjust fixes for PaRappa the Rapper 2 2023-10-20 10:47:01 +01:00
Ziemas
d920fe6c5e SPU2: Pass reverb input by value 2023-10-20 00:34:39 +01:00
Ziemas
676402854b SPU2: Put clamp_mix in header for more inlining 2023-10-20 00:34:39 +01:00
Ziemas
5eacc7c327 SPU2: Multi-isa resampling functions 2023-10-20 00:34:39 +01:00
Ziemas
f29346f0b7 SPU2: Optimize reverb resampling [SAVEVERSION+] 2023-10-20 00:34:39 +01:00
Ziemas
facada5d04 SPU2: Simplify reverb resampling 2023-10-20 00:34:39 +01:00
lightningterror
d945477369 GS: Fix Wunused-variable warning. 2023-10-19 21:09:33 +02:00
lightningterror
f96e7a9156 GS/HW: Rename dfmt to dst_fmt.
It was confusing whenever the d meant depth or destination, this should make the code easier to read.
2023-10-19 19:25:13 +02:00
lightningterror
fc22268fc2 GS: Bump shader cache version. 2023-10-19 19:25:13 +02:00
Mrlinkwii
7dbb9931ec GameDB: Fixes for FIFA Total Football 2 2023-10-19 16:50:08 +01:00
PCSX2 Bot
b14145f3dc Qt: Update Base Translation 2023-10-18 21:31:24 +02:00
lightningterror
5a414d5711 GS/HW: Use enum for format checks.
Easier to read code.
2023-10-18 21:30:17 +02:00
Ziemas
7cc6f635fc SPU2: Clamp before Applying master volume
ApplyVolume needs both its arguments to be within 16bit range.

[SAVEVERSION+]
2023-10-18 14:53:31 +01:00
Ziemas
a90695ef1f SPU2: Make mixer gates s32 for safety
Don't wanna accidentally truncate
2023-10-18 14:53:31 +01:00
lightningterror
0e99c9b9a4 Readme: Update macos requirements. 2023-10-18 14:00:48 +02:00
kamfretoz
93becd5629 Qt: Small icon changes to profile buttons 2023-10-17 23:57:02 +01:00
kamfretoz
b13b398204 Qt: Revamped controller preview icon 2023-10-17 23:57:02 +01:00
refractionpcsx2
f531c0a405 GS: Fix some flush check behaviour, small optimisation 2023-10-17 23:50:00 +01:00
Stenzek
3e8e1ed596 GS/HW: Don't align dirty rectangles to block sizes when updating
Don't align the area we write to the target to the block size. If the format matches, the writes don't need
to be block aligned. We still read the whole thing in, because that's the granularity that ReadTexture
operates at, but discard those pixels when updating the framebuffer. Onimusha 2 does this dance where it
uploads the left 4 pixels to the middle of the image, then moves it to the left, and because we process
the move in hardware, local memory never gets updated, and thus is stale.
2023-10-18 01:08:34 +10:00
Mrlinkwii
b90c2ec385 GameDB: Fixes for Maxxed Out Racing Nitro and Chou Saisoku! Zokusha King B.U. 2023-10-17 15:04:23 +01:00
Stenzek
9ad85288a9 Qt: Fix re-showing Controller Settings 2023-10-17 15:56:35 +10:00
PCSX2 Bot
54858dffdb Qt: Update Base Translation 2023-10-17 13:12:02 +10:00
kamfretoz
86597ab2da Qt/Updater: Move download size indicator to better placement 2023-10-17 13:10:34 +10:00
JordanTheToaster
92e246a574 GameDB: Formula One 2003 Fixes
Fixes for bad polys.
2023-10-16 20:33:54 +01:00
PCSX2 Bot
2a596bc2cc PAD: Update to latest controller database. 2023-10-16 18:15:11 +02:00
TellowKrinkle
b28c11cb54 VMManager: Support picking between en and non-en title 2023-10-15 23:13:04 -05:00
TellowKrinkle
4ed9ade4fc GameDB: Normalize JP Final Fantasy names 2023-10-15 23:13:04 -05:00
TellowKrinkle
2d474b3d3a GameDB: Use sort names for titles beginning with "The" 2023-10-15 16:23:40 +01:00
Ziemas
ee4d0bf4b5 SPU: Lower final output volume 2023-10-15 16:23:00 +01:00
Ziemas
f8e8bd03cd SPU2: Implement inverse phase slide mode 2023-10-15 16:23:00 +01:00
Ziemas
509613d2e5 SPU2: Delete stupid comment
What "volume pump" is this even reffering to?
2023-10-15 16:23:00 +01:00
Ziemas
cf3395b9ce SPU2: Cleanup unused destructor 2023-10-15 16:23:00 +01:00
Ziemas
16a11b75a8 SPU2: Get rid of 32bit volumes [SAVEVERSION+] 2023-10-15 16:23:00 +01:00
Ziemas
07d4a65a45 SPU2: Rewrite volume slides [SAVEVERSION+] 2023-10-15 16:23:00 +01:00
Ziemas
7bf8f6115f SPU2: Rewrite ADSR [SAVEVERSION+] 2023-10-15 16:23:00 +01:00
lightningterror
43e700036d GameDB: Adjust hwfixes for Tom & Jerry's War of the Wiskers.
Change mipmap basic to full with trilinear and add it to a missing region.
2023-10-15 16:05:18 +02:00
Berylskid
ad1f5fc18d GameDB: Various fixes
- Fixed Japanese names of Armored Core games
- Replaced all "Playstation2 the Best" with "PS2 the Best"
2023-10-15 03:28:58 -05:00
TellowKrinkle
51f9ab8498 Qt: Fix typo 2023-10-15 01:11:35 -05:00
TellowKrinkle
592e356932 Qt: Move game list display settings below scanning settings 2023-10-15 01:11:35 -05:00
TellowKrinkle
e6f1f6eeb1 Qt: Put game scanning config in groupbox 2023-10-15 01:11:35 -05:00
TellowKrinkle
86782e7f3e Qt: Show EN and Sorting titles in game summary 2023-10-15 01:11:35 -05:00
TellowKrinkle
4136545b6b Qt: Add option to prefer English titles in Game List 2023-10-15 01:11:35 -05:00
TellowKrinkle
c9099f3a2f GHActions: Improve failure message for prettier lint failures 2023-10-15 01:11:35 -05:00
TellowKrinkle
a28328dd96 GHActions: Add yamllint pass to gamedb lint
ajv errors are completely useless
2023-10-15 01:11:35 -05:00
TellowKrinkle
485f8a6d3a Qt: Use locale-sensitive compare for game list sort 2023-10-15 01:11:35 -05:00
TellowKrinkle
3c05d000f5 FSUI: Use English titles
ImGui can't render characters from languages that aren't the currently selected language, which non-English titles requires
2023-10-15 01:11:35 -05:00
TellowKrinkle
4850615327 GameDB:JP: Use parenthesized readings for sort names 2023-10-15 01:11:35 -05:00
TellowKrinkle
5702b525d1 GameDB:JP: Normalize edition formatting 2023-10-15 01:11:35 -05:00
TellowKrinkle
b2e57e1bde GameDB:JP: Move collection names to the end
So they don't affect sorting
2023-10-15 01:11:35 -05:00
TellowKrinkle
c987c62819 GameDB:JP: Add disk numbers 2023-10-15 01:11:35 -05:00
TellowKrinkle
4aa8c756c2 GameDB: Add Japanese names 2023-10-15 01:11:35 -05:00
TellowKrinkle
37aa481dd0 GameDB: Add name-sort and name-en fields 2023-10-15 01:11:35 -05:00
Stenzek
0b5c070ad1 GS/HW: Restore off-by-one clamp when upscaling
Xenosaga and VP2 break otherwise.

Xenosaga draws a line around the RT, which is offset by 1 row/column,
which the off-by-one clamp was previously masking.

VP2 is just a can of worms I don't have the energy to deal with at the
moment.
2023-10-15 15:43:05 +10:00
Ziemas
7b1412004f GameDB: Ayakashi-bito needs software clut 2023-10-15 05:19:16 +01:00
JordanTheToaster
3270a38d69 GameDB: Force minimum blend for Gun
Forces high blending for Gun as it's required for the game to render correctly anyway.
2023-10-15 01:17:36 +01:00
Mrlinkwii
1bc77620d9 CI: remove libjpeg from mac build script 2023-10-14 21:48:41 +10:00
Stenzek
2ef5490297 Qt: Change settings windows from QDialog to QWidget 2023-10-14 21:00:33 +10:00
Stenzek
19b3bd151e Qt: Enable RTTI in Debug builds for MSVC
Qt 6.6 chokes otherwise.
2023-10-14 21:00:33 +10:00
Stenzek
d8774d2f5a IopMem: Fix incorrect memory pointer
Was pointing into rec space instead of the data space.
2023-10-14 17:01:33 +10:00
Stenzek
e5cb313d92 deps: Update to Qt 6.6.0 and SDL2 2.28.4
Also bumps the minimum macOS version to 11.0.

Minimum for building is 6.5.3, because there's no 6.6 flatpak runtime yet.
2023-10-14 12:26:44 +10:00
JordanTheToaster
ac0138a7e1 GameDB: Taito memory fixes
Fixes for vertical and horizontal lines in game.
2023-10-14 02:42:10 +01:00
Ty Lamontagne
6e5fbe8991 Debugger: Fix an issue where the debugger is always on top of the main window
Add an optional "always on top" toolbar button as well
2023-10-13 13:53:12 +01:00
JordanTheToaster
56ec842c00 GameDB: Black Hawk Down fixes
Fixes for misaligned bloom and likely depth issues.
2023-10-12 14:03:44 +01:00
PCSX2 Bot
c3420a0a6e Qt: Update Base Translation 2023-10-12 13:07:35 +10:00
Ty Lamontagne
8d13877002 Debugger: Demangle symbols in the disassembly view as well 2023-10-12 12:46:12 +10:00
Ty Lamontagne
065f7d6cc7 Debugger: Don't elide func names as much when func start is selected 2023-10-12 12:46:12 +10:00
Ty Lamontagne
03a7c745c9 Debugger: Implement function/instruction nop restore 2023-10-12 12:46:12 +10:00
Ty Lamontagne
4269f16bcd Debugger: Implement stubbing (noping) functions 2023-10-12 12:46:12 +10:00
Ty Lamontagne
55c9cb45ac Debugger: Fix the popup position of context menus for lists
Use viewport(), otherwise it does not account for the table view header for some reason.
2023-10-12 12:46:12 +10:00
Ty Lamontagne
4f825641ce Debugger: Copy as CSV. Breakpoint import from CSV 2023-10-12 12:46:12 +10:00
Ty Lamontagne
ade2b4baea Debugger Thread List: Sorting 2023-10-12 12:46:12 +10:00
Ty Lamontagne
1e1091b365 Updater: Fetch best asset size for download size notification 2023-10-12 12:45:48 +10:00
RedPanda4552
93e1a7047c DInput: Add option to ignore inversion flag 2023-10-12 12:45:05 +10:00
Stenzek
99554f5622 GS/HW: Allow bilinear from colour backed Z formats
Fixes the haze effect in GTA: San Andreas from being extra blurry.
Improves shadows in Everybody's Golf and Tennis.
2023-10-12 11:56:57 +10:00
Stenzek
b09240702e GS/HW: Fix off-by-one in region clamp
Fixes text in ZIPANG, decals in Enthusia Professional Racing, edge of
screen in Dynasty Warriors, and others.
2023-10-12 11:56:57 +10:00
Stenzek
fbf7f91e4f GameDB: Add Tex in RT to Tokimeki Memorial 3 2023-10-12 11:56:57 +10:00
Stenzek
9a0d655788 GS/HW: Toss targets when BW changes instead of incorrectly converting
But be careful with it, we don't want to falsely do this for shuffles.
2023-10-12 11:56:57 +10:00
refractionpcsx2
aa77d156a9 CDVD: Fix seek times, improve read flow 2023-10-11 16:06:56 +01:00
lightningterror
493e95d9d6 CDVD: Fix Wunused-variable warnings. 2023-10-11 19:49:05 +10:00
Stenzek
4aaf6ba69e Common: Fix unused function warning 2023-10-11 19:15:58 +10:00
refractionpcsx2
88f8ef0244 Build: Fix up various warnings, increase variable readability 2023-10-10 20:39:54 +01:00
Stenzek
312a583092 CMake: Remove -segprot flag on MacOS
We no longer need to change page protection.
2023-10-10 18:01:30 +10:00
Stenzek
c8e0390aaf MSBuild: Fix libpng warning 2023-10-10 18:01:30 +10:00
Stenzek
8e2af39c06 x86/R5900: EE rec doesn't need a stack frame 2023-10-10 18:01:30 +10:00
Stenzek
606cbb3883 System: Simplify memory allocation 2023-10-10 18:01:30 +10:00
Stenzek
377746f155 x86: Move dispatchers to recompiler code space 2023-10-10 18:01:30 +10:00
refractionpcsx2
5f11ba0445 CDVD: Better simulate RPM changes going in to CLV
- Fix bugs with rotational latency
[SAVEVERSION+]
2023-10-10 08:17:19 +01:00
JordanTheToaster
be7d4c3c93 GameDB: Misc fixes
Re adds partial texture preloading to Battlefield Modern Combat 2 as it still seems to make the hash cache explode CPU Sprite to Dark Cloud 2 to fix lines in geometry and disabling MVU Flag Hack for tales of rebirth to fix graphical corruption
2023-10-09 13:21:28 +01:00
tokuna2020
ec53e8949a GameDB: Update memcard filters and names (#10076) 2023-10-07 12:05:54 +01:00
tokuna2020
f04cc7aa08 GameDB: Update memcard filters on some Japanese games (#10077) 2023-10-07 12:05:09 +01:00
Ty Lamontagne
b994d0ad70 Debugger: Run the tables keybind handler before the widgets
This fixes the issue of 'G' executing the go-to box instead of putting it into the text view
2023-10-07 14:12:18 +10:00
kamfretoz
68b2fee9be Qt: Update base translation 2023-10-07 14:11:30 +10:00
kamfretoz
82b9c9781c Qt: Small tweaks to Cobalt Sky theme 2023-10-07 14:11:30 +10:00
kamfretoz
6d15eac2c6 Qt/WinUpdater: Remove "Update Complete" dialog 2023-10-07 14:11:30 +10:00
kamfretoz
faa740a8dd Qt/Updater: Add download size estimation to the Updater
Co-Authored-By: Mrlinkwii <Mrlinkwii@users.noreply.github.com>
2023-10-07 14:11:30 +10:00
JordanTheToaster
872faf2abe GameDB: MVP NCAA Baseball fixes
Fixes for broken rendering on replay window and likely other things.
2023-10-05 00:49:23 +01:00
PCSX2 Bot
bc85d6518b Qt: Update Base Translation 2023-10-04 07:02:32 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou
15e7a94640 Readme: Fix Codacy Badge link 2023-10-03 22:13:01 +01:00
PCSX2 Bot
810295aafa PAD: Update to latest controller database. 2023-10-03 19:35:37 +02:00
PCSX2 Bot
ffd45d58fe Qt: Update Base Translation 2023-10-03 14:45:31 +10:00
Ty Lamontagne
852923ea34 UI: Rename the "Open in Explorer" button to "Open BIOS Folder" 2023-10-03 14:45:06 +10:00
JordanTheToaster
979b34d717 GameDB: Battlefield 2 Modern Combat Fixes
Forces full blending to fix rendering of the ground and also removes unnecessary fixes that do not fix what they state.
2023-10-02 17:58:26 +01:00
Stenzek
34f92fe4e5 Qt: Add webp to cover file filter 2023-10-02 19:52:29 +10:00
Stenzek
10b217e0c2 Image: Support loading webp files 2023-10-02 19:52:29 +10:00
Stenzek
2b0593e5ff 3rdparty: Add libwebp @ v1.3.2 2023-10-02 19:52:29 +10:00
IlDucci
2b329e6899 Replacing Unicode arrows in the Input Viewer with text. 2023-10-02 19:27:55 +10:00
IlDucci
5b0bf40508 UI: Making some strings translatable
Solving the easy cases where strings can be made translatable. See https://github.com/PCSX2/pcsx2/issues/9062 for more information.
2023-10-02 19:27:55 +10:00
Stenzek
210a936483 3rdparty: Remove qt directory
Windows Qt lives in /deps now.
2023-10-02 18:57:39 +10:00
Stenzek
813e2d5b2c GS/SW: Replace sprintf() with snprintf() 2023-10-02 17:37:38 +10:00
Stenzek
a18c940503 IopBios: Mute deprecated warnings
This would be annoying/slow to rewrite.
2023-10-02 17:37:38 +10:00
Stenzek
329d8acca7 GS/Capture: Mute deprecrated warnings
At least while we're targeting multiple FFMpeg versions.
2023-10-02 17:37:38 +10:00
Stenzek
bf2cdc3c9b DebugTools: Replace sprintf() with snprintf() 2023-10-02 17:37:38 +10:00
Stenzek
61ce0d1117 DEV9: Replace sprintf()/strcat() with snprintf() 2023-10-02 17:37:38 +10:00
Stenzek
e8201b115f 3rdparty/SimpleINI: Replace sprintf() with snprintf() 2023-10-02 17:37:38 +10:00
Stenzek
5690742937 3rdparty: Remove libjpeg
Doesn't appear to be used anywhere.
2023-10-02 17:17:50 +10:00
Stenzek
9f29f41288 3rdparty/zstd: Bump to v1.5.5 2023-10-02 17:17:50 +10:00
Stenzek
828c0bcb99 3rdparty/zlib: Update to 1.3 2023-10-02 17:17:50 +10:00
Stenzek
fe0d31ae94 3rdparty/libpng: Update to 1.6.40 2023-10-02 17:17:50 +10:00
Stenzek
175d10c5d1 Qt: Update base translation 2023-10-02 15:28:24 +10:00
Stenzek
02b5349db2 Qt: Fix update_en_translation.bat script 2023-10-02 15:28:24 +10:00
Stenzek
a64d69560c Misc: Warnings cleanup 2023-10-02 15:28:24 +10:00
Stenzek
e18205e6c7 Qt: Allow SettingInfo format to be translated 2023-10-02 15:28:24 +10:00
Stenzek
0f542809a4 FullscreenUI: Use Qt Cover Downloader
The ImGui-based one was pretty janky, didn't support pasting, etc.
2023-10-02 15:28:24 +10:00
refractionpcsx2
d171fb1570 GS/HW: Remove CRC hack for Sakura Taisen 2023-10-02 00:23:57 +01:00
refractionpcsx2
b913523066 GS/HW: Update dirty depth in matching format 2023-10-01 22:37:26 +01:00
refractionpcsx2
16588ab0bf GS: Bump shader cache version 2023-10-01 21:08:39 +01:00
refractionpcsx2
5dc27ed275 GS/HW: Convert depth16->rgba16 shader to integer 2023-10-01 21:08:39 +01:00
kamfretoz
63826f5567 GameDB: Xenosaga Eps III Fixes 2023-10-01 20:26:33 +01:00
Pierre GRASSER
0d3d115d67 Qt: Make "100%" string available for translation 2023-10-02 04:13:17 +10:00
Stenzek
a9959bcd62 CDVD: Report open errors to host 2023-10-01 17:46:26 +10:00
Stenzek
93a4e67813 Host: Remove resource read wrappers
No more wx, no need to abstract this.
2023-10-01 17:45:54 +10:00
RedPanda4552
0e79db6cf7 More detailed log for pads 2023-10-01 17:45:36 +10:00
PCSX2 Bot
7b1f6d7ce3 Qt: Update Base Translation 2023-09-29 20:54:02 +10:00
Víctor "IlDucci
8c452288f4 UI: Changes for translators (#10038)
* UI: Changes for translators

- Added numbers to all strings with more than one {} so translators who might not know that they can move those variables can, in fact, move them around the string.
 - Tagged a number of untranslatable strings in Big Picture. Keep in mind that these are the strings that actually exist within the FullscreenUI.cpp file, as there's a number of those strings that do not seem to be taken from there (I do not know from where, though, so I'm leaving those out of scope). The FSUI_XSTR names have been added by guesswork, so more expert eyes are required.
- Ran the generate_fullscreen_ui_translations script, which removes that "Quick Save Slot" string that was inherited from DuckStation for Android.
- The "Trigger" text needs to be flagged as translatable, but I can't do that right now. That needs someone who knows better.

* Adding corrections by Stenzek.
2023-09-29 20:22:04 +10:00
lightningterror
bf5137ed6b GS/HW: Fix Wunused-variable warning. 2023-09-28 22:43:11 +02:00
lightningterror
c8e4f9160c DEV9: Fix Wunused-variable warning. 2023-09-28 22:43:11 +02:00
Stenzek
fae4f7c8b4 ChdFileReader: Rewrite CHD opening
Almost copied verbatim from DuckStation.

 - Doesn't have race conditions between checking header and opening the
   file for reading.
 - Handles both MD5/SHA1 hashes.
 - Caches CHD headers when searching for parents.
 - Doesn't break with unicode filenames on Windows.
2023-09-27 18:11:46 +10:00
Stenzek
2148d3d3ab 3rdparty: Move libchdr in-tree
Based on 54bfb87 with modifications from DuckStation.
2023-09-27 18:11:46 +10:00
kamfretoz
8ccd442647 Qt: Update Base Translation 2023-09-26 22:44:33 +10:00
kamfretoz
d44a7fc23a Qt: Fix untranslated string on cover downloader 2023-09-26 22:44:33 +10:00
refractionpcsx2
5c63d75c86 GS/HW: Require 24/16bit RGB color if using AEM 2023-09-26 01:14:54 +01:00
refractionpcsx2
fef282fcd5 GS: Clean up CLUT dirty handling 2023-09-25 20:11:51 +01:00
refractionpcsx2
ec9e5402c0 GS: Reduce unnecessary flushes 2023-09-25 20:11:51 +01:00
PCSX2 Bot
a45378cadf PAD: Update to latest controller database. 2023-09-25 18:03:10 +02:00
refractionpcsx2
a5127c7c07 Build: Fix GS Dump Runner building 2023-09-24 22:06:58 +01:00
Ziemas
0197aeeb4b SPU: Fix DC filter types and clamping
Fix wrong type being used for dc filter state.

The filter seems to introduce some small amount of gain, so we need to
clamp it.
2023-09-24 20:25:16 +01:00
Víctor "IlDucci
8b84b0403b Minow tweaks on Big Picture
Removing two strings that were remnants of DuckStation for Android.
2023-09-24 23:54:01 +10:00
PCSX2 Bot
6a671a5cd1 Qt: Update Base Translation 2023-09-24 22:47:30 +10:00
Valtekken
1be4eee674 UI: Different choice of words in achievement popup 2023-09-24 22:46:02 +10:00
Stenzek
1eed8a2a86 Achievements: Fix UI crash with DX11 2023-09-24 22:03:57 +10:00
Víctor "IlDucci
e782ddc143 [UI] Add achievement-related translatable strings
Adding more translatable strings.
2023-09-24 22:03:34 +10:00
Ziemas
d91e3f568b SPU: DC filter output
Some games leave paused voices hanging with volume turned on which
results in dc offset. Filter it out.
2023-09-24 11:56:30 +01:00
TheLastRar
98eb006cdd DEV9: Do not save hdd size 2023-09-24 11:53:02 +01:00
TheLastRar
60154b7c26 DEV9: Better handling of invalid LBA values 2023-09-24 11:53:02 +01:00
refractionpcsx2
dab9e7aaa2 GS/HW: Resize rect from half point in Double Half Clear 2023-09-24 11:52:46 +01:00
kamfretoz
0f8dceed89 Qt: Removes stray strings from translations
Qt: Update base translation
2023-09-24 19:28:01 +10:00
Stenzek
affa091ccb GS/Vulkan: Make line rasterization optional on MacOS
MoltenVK does not support VK_EXT_line_rasterization. We want it for other platforms,
but on Mac, the implicit line rasterization apparently matches Bresenham anyway.
2023-09-24 14:29:47 +10:00
Stenzek
8a022f877e Qt: Update base translation 2023-09-24 14:26:06 +10:00
Stenzek
579a542815 Qt: String unification with Big Picture UI 2023-09-24 14:26:06 +10:00
PCSX2 Bot
080d021fb3 Qt: Update Base Translation 2023-09-24 11:27:00 +10:00
Stenzek
10ec91065e Achievements: Switch to rc_client 2023-09-24 11:22:22 +10:00
Stenzek
25a3ea98bc Timer: Add ResetIfNPassed() 2023-09-24 11:22:22 +10:00
Stenzek
5555e334af FileSystem: Fix DeleteDirectory() on Unix 2023-09-24 11:22:22 +10:00
Stenzek
3c41c286c7 StringUtil: Add Ellipsise 2023-09-24 11:22:22 +10:00
Stenzek
bf9fbc46fd SmallString: Fix new buffer size not getting set 2023-09-24 11:22:22 +10:00
Stenzek
824ef9a9d3 SmallString: Add end_ptr() 2023-09-24 11:22:22 +10:00
Stenzek
8a84d4812f LRUCache: Use heterogeneous container 2023-09-24 11:22:22 +10:00
Stenzek
ffe456ea7c 3rdparty/rcheevos: Bump to 43f8c2a 2023-09-24 11:22:22 +10:00
Stenzek
a997845604 GS/HW: Resize target in Ico move fix 2023-09-23 23:22:09 +01:00
Mrlinkwii
f887eae0f7 GameDB: fixes for Minna no Tennis 2023-09-23 23:21:27 +01:00
Stenzek
508c209270 Qt: Get rid of nextStatePaused 2023-09-24 02:20:37 +10:00
Stenzek
4027304ece Qt: Replace debugger menu bar with toolbar
That way it's not missing on MacOS.
2023-09-24 02:20:37 +10:00
KamFretoZ
0ac59b4152 Qt: Add step into/out/over icons 2023-09-24 02:20:37 +10:00
Stenzek
2272134442 Qt: Fix debugger font on MacOS
And only set it on the tabs, not the whole window.
2023-09-24 02:20:37 +10:00
refractionpcsx2
1c828bd680 GS/HW: Assume not a DHC if clut overlap on depth clear 2023-09-23 15:05:58 +01:00
refractionpcsx2
499867255b GS: Don't flush on CLUT reload unless invalidated or using texture 2023-09-23 15:05:58 +01:00
refractionpcsx2
dc142a5531 GS/HW: Redo some double half clear checks 2023-09-23 15:05:58 +01:00
AKuHAK
2115e92520 DEV9: implemented ATA SCE IDENTIFY DRIVE.
Documented other ATA SCE commands.
2023-09-22 15:43:51 +01:00
Alexis Lefebvre
c3d31f11e4 FAQ: update links to BIOS dumper 2023-09-22 15:41:43 +01:00
Mrlinkwii
bf4d908eab GameDB: remove State of Emergency 2 fixes 2023-09-22 12:13:34 +01:00
Ziemas
2a3ba03226 [SAVEVERSION+] SPU: Revork reverb buffer logic 2023-09-21 02:08:00 +01:00
RedDevilus
5c6f72ac57 GameDB: Add missing fixes and unknowns for EU 2023-09-21 02:01:28 +01:00
forrvalhalla
bfcf2d98b5 GameDB: Name changes to Petit Copter series (#9999) 2023-09-20 21:31:48 +01:00
refractionpcsx2
0b01e7edea GS/HW: Don't require alpha when requesting 24bit 2023-09-20 09:28:48 +01:00
lightningterror
84a4d114c4 Build: Remove GSTextureFX11.cpp from project. 2023-09-19 11:19:38 +02:00
lightningterror
44b47f4d88 GS/D3D11: Merge GSTextureFX11 in to GSDevice11.
Makes more sense to move them in to Device11.
2023-09-19 11:19:38 +02:00
Mrlinkwii
1175a22d53 Translations: Add Croatian to the UI menu 2023-09-18 22:49:07 +01:00
PCSX2 Bot
5aa8761c7e PAD: Update to latest controller database. 2023-09-18 21:39:15 +02:00
refractionpcsx2
1668ec2fc6 GS/HW: Improve half right detection on shuffles 2023-09-18 17:42:51 +01:00
refractionpcsx2
eaf3b7943c GS/HW: Properly scale RT in Sonic Unleashed CRC 2023-09-18 16:07:49 +01:00
refractionpcsx2
1551b413fb GS/HW: Detect split shuffle if first draw overdraws 2023-09-18 08:47:48 +01:00
refractionpcsx2
05a1b0203b GS/HW: Tex in RT fixes handling shuffles 2023-09-18 08:47:48 +01:00
PCSX2 Bot
c83667e432 Qt: Update Base Translation 2023-09-18 10:20:35 +10:00
refractionpcsx2
9203ae20cd GIF: Don't check current path for FINISH 2023-09-17 23:23:04 +01:00
refractionpcsx2
43f658a82b GS/HW: Fix crash when looping memory during clear 2023-09-17 18:48:53 +01:00
refractionpcsx2
3dcc6dc299 GS/HW: Improve clear detection with multiple Tris 2023-09-17 18:48:53 +01:00
Mrlinkwii
fe79c0d294 Translations: Add Lithuanian & hindi to the UI menu 2023-09-17 18:48:36 +01:00
refractionpcsx2
1f0a91c313 VIF: Fix VU Sync option infinite loop 2023-09-17 14:52:47 +01:00
refractionpcsx2
ae5cd7b3c3 IPU: Adjust DMA timings, improve internal calling
[SAVEVERSION+]
2023-09-17 14:52:47 +01:00
refractionpcsx2
2947e11b9b GIF: Correctly delay FINISH interrupts/flags
[SAVEVERSION+]
2023-09-17 14:52:47 +01:00
refractionpcsx2
85670dd4a1 VIF: Correct DMA stall for VIF1 MFIFO 2023-09-17 14:52:47 +01:00
lightningterror
5d88c1a19e GS/HW: Adjust scissor for BeginHLEHardwareDraw. 2023-09-17 15:02:11 +02:00
refractionpcsx2
3004007f96 UI: Update glyphs and fa glyph range script 2023-09-17 11:04:24 +01:00
Stenzek
58244d5a3d FullscreenUI: Typo fix 2023-09-17 19:40:27 +10:00
Stenzek
ac97e0c6e9 ImGuiManager: Fix icon OSD messages 2023-09-17 19:40:27 +10:00
lightningterror
d9bdb0d7e1 GS: Remove fm_mask parameter from TryAlphaTest.
Not used, we get the value locally instead.
2023-09-17 11:11:40 +02:00
Tyler Wilding
83da1773b5 translations: Syncing Crowdin translations (#9975) 2023-09-17 08:24:21 +01:00
PCSX2 Bot
44e4e0a2b3 Qt: Update Base Translation 2023-09-17 17:01:28 +10:00
Stenzek
9dad1d79d7 CMake: Generate/copy qtbase translations on Linux/Mac 2023-09-17 16:57:58 +10:00
Stenzek
3a3a9af284 MSBuild: Generate qtbase translations like CMake 2023-09-17 16:57:58 +10:00
Stenzek
c2a7fbaadc Qt: Fix loading of base translations for two-code locale 2023-09-17 16:57:58 +10:00
Stenzek
b2789bea6b FullscreenUI: Localize a bunch of missing strings 2023-09-17 16:57:58 +10:00
Stenzek
807e8642fa ImGuiManager: Easing for OSD messages 2023-09-17 16:57:58 +10:00
Stenzek
c9008bf78b Error: Fix errno resolution on Win32 2023-09-17 16:57:58 +10:00
lightningterror
a641d2a2de iR5900: Cleanup code.
Variable scopes, constants, casts initializations.
2023-09-16 18:46:45 +02:00
lightningterror
6186f39068 Elfheader: Fix the scope of the variable can be reduced warning.
Codacy.
2023-09-16 18:46:45 +02:00
lightningterror
6bd1209146 Input: Fix opposite inner 'if' condition leads to a dead code block warning.
Codacy.
2023-09-16 18:46:45 +02:00
lightningterror
2a9c379a1c GS: Fix Using memset() on struct which contains a floating point number warning.
Codacy.
2023-09-16 18:46:45 +02:00
Mrlinkwii
1b983111f6 Translations : some typo fixes 2023-09-16 17:35:53 +01:00
Stenzek
cf5dd8b822 CMake: Drop Discord Presence option
Also no reason to disable this, and an untested configuration.
2023-09-16 19:32:13 +10:00
Stenzek
069d2b275a MSBuild: Remove unused define 2023-09-16 19:32:13 +10:00
Stenzek
368e35abb6 CMake: Purge no-achievements option
Keeps breaking because we never test it, and there's no reason to
disable achievements anyway.
2023-09-16 19:32:13 +10:00
Stenzek
81a51d750c GS: Remove _d undef
WX nonsense I guess?
2023-09-16 19:32:13 +10:00
Stenzek
d93b137b85 GS: Remove unnecessary #pragma pack in GSVector
This was leaking into included headers.
2023-09-16 19:32:13 +10:00
Stenzek
d15f2a0cbe CMake: Purge USE_LEGACY_USER_DIRECTORY
Had plenty of time to move over.
2023-09-16 19:32:13 +10:00
Stenzek
bd54729257 CMake: Simplify X11 dependencies 2023-09-16 19:32:13 +10:00
Stenzek
6123ef12bd GS: Fix alignment crash with constant buffers 2023-09-16 19:32:13 +10:00
lightningterror
14cf008a19 GameDB: Various gs hw fixes.
Kazoku Keikaku - Kokoro no Kizuna:
Replace gpuTargetCLUT with cpuCLUTRender, fixes black letters.

Ricky Ponting International Cricket 2007:
Change mipamp basic to mipmap full with ps2 trilinear.
Add cpuSpriteRenderBW 4, fixes garbage menus.
Add the hw fixes to all serials.
Add recommended blend level to full, to fix dark stage.

Cat in the Hat, The:
Add full mipmap with ps2 trilinear, improves textures to match sw renderer.
2023-09-16 10:22:21 +02:00
refractionpcsx2
da8db72328 GS/HW: Don't allow PCRTC frames pull RGB from depth 2023-09-15 22:26:03 +01:00
PCSX2 Bot
30e3a3a958 Qt: Update Base Translation 2023-09-15 09:44:15 +02:00
Stenzek
b384a2fff6 Qt: Fix returning from fullscreen on MacOS 2023-09-15 09:51:02 +10:00
Ty Lamontagne
8dd866a35e iR5900 Recompiler: Emulate exception handler cycles on syscall skip 2023-09-14 18:51:47 +01:00
Ty Lamontagne
b36e2eb5f4 iR5900 Recompiler: Skip exception handling for (i)FlushCache 2023-09-14 18:51:47 +01:00
Mrlinkwii
9c4fdc18b8 GameDB: various fixes 2023-09-13 21:00:46 +01:00
refractionpcsx2
357a90db71 GS/PCRTC: Avoid trying to lookup bad framebuffers 2023-09-13 15:03:58 +01:00
Hallkezz
8c65d4e131 GameDB: Add recommended blending level for Twisted Metal: Head On (#9952)
* GameDB: Add VU Clamping to Twisted Metal - Head-On

* Update GameIndex.yaml

* GameDB: Add minimum blending level for Twisted Metal: Head On

* Change BlendingLevel minimum to recommended
2023-09-13 22:30:10 +10:00
refractionpcsx2
07971d25a6 VU/Int: Fix for completing XGKick 2023-09-12 14:07:36 +01:00
refractionpcsx2
ce538a804d GS/HW: Restore scissor after draw 2023-09-12 14:07:36 +01:00
Mrlinkwii
d480f19b24 GameDB: Add upscaling fixes for Club Football 2005 series (#9949) 2023-09-11 20:41:42 +01:00
Mrlinkwii
5deb1d35e3 Misc: update CONTRIBUTING.md 2023-09-11 19:30:40 +01:00
PCSX2 Bot
140514b408 PAD: Update to latest controller database. 2023-09-11 18:06:38 +02:00
PCSX2 Bot
34d40364a3 Qt: Update Base Translation 2023-09-11 14:01:13 +02:00
dependabot[bot]
a4d7f5e7d1 Bump flatpak/flatpak-github-actions from 6.1 to 6.2
Bumps [flatpak/flatpak-github-actions](https://github.com/flatpak/flatpak-github-actions) from 6.1 to 6.2.
- [Release notes](https://github.com/flatpak/flatpak-github-actions/releases)
- [Commits](https://github.com/flatpak/flatpak-github-actions/compare/v6.1...v6.2)

---
updated-dependencies:
- dependency-name: flatpak/flatpak-github-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 14:00:44 +02:00
dependabot[bot]
b3aa3d3b83 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 14:00:09 +02:00
Stenzek
3f9e4731b8 Qt: Pause VM for disc change popup 2023-09-10 11:19:53 +10:00
Stenzek
3e79a86008 Qt: Update icons on dark/light mode switch 2023-09-10 11:19:53 +10:00
Stenzek
126c6e1b6c Qt: Improve file drop handling
Allow switching ELF.

Closes #7681.
2023-09-10 11:19:53 +10:00
Stenzek
90c6e4cd1b Qt: Rename (Default) to (Borderless Fullscreen) for per-game config 2023-09-10 11:19:53 +10:00
Stenzek
e1616af98c Qt: Set memcard name scrollbars to always-off
And mirror the text in the tooltip.

Closes #9139.
2023-09-10 11:19:53 +10:00
Stenzek
388e488bc1 Qt: Add Edit Cheats/Patches to Tools menu
Closes #4634.
2023-09-10 11:19:53 +10:00
Stenzek
b601c49f6c Qt: Cancel existing BIOS search on refresh
Stops lockups if you set a large directory.
2023-09-10 11:19:53 +10:00
Stenzek
d9587e20c0 Qt: Defer folder update until editing complete
Closes #7215.
2023-09-10 11:19:53 +10:00
Stenzek
f5684c43dd Qt: Fix mouse mapping setting not applying to input profiles
Closes #9914.
2023-09-10 11:19:53 +10:00
Stenzek
d25700e241 Qt: Fix cover spacing not updating on resize
Closes #9869.
2023-09-10 11:19:53 +10:00
Stenzek
9dde599e00 Qt: Fix grid scale resetting on theme change
Closes #8044.
2023-09-10 11:19:53 +10:00
Stenzek
96f0d65f7d Qt: Disallow copying cover when source == destination
Closes #6159.
2023-09-10 11:19:53 +10:00
Stenzek
abe64ae8fb VMManager: Rewrite frame limiting
No more messing with counter state on setting changes.

Closes #9929.
2023-09-10 11:18:20 +10:00
GiladNir
5df6fc4c1b GameDB: Upscaling fixes for King's Field IV 2023-09-10 02:02:26 +01:00
Hallkezz
a4a6929ca4 GameDB: Add VU Clamping to Twisted Metal - Head-On (#9936) 2023-09-09 18:09:35 +01:00
Stenzek
cc221f590c Counters: Don't skip vblanks on video mode change 2023-09-09 21:07:32 +10:00
forrvalhalla
ec1b782f2c GameDB: Various Fixes
GameDB: Various Fixes

GameDB: Various Fixes

GameDB: Various Fixes
2023-09-09 11:03:07 +01:00
Mrlinkwii
48549ff790 Misc : Fixed undefined behaviour warning
Co-Authored-By: Ty <29295048+F0bes@users.noreply.github.com>
2023-09-09 09:15:54 +01:00
refractionpcsx2
5633053655 GS/HW: Check for half point on double half clear, improve width check 2023-09-09 09:15:33 +01:00
JordanTheToaster
92acbd006b GameDB: DT games various fixes
Fixes for slow performance and shadows being less broken now.
2023-09-09 08:48:52 +01:00
refractionpcsx2
8552a89838 GS/TC: Ignore horizontal offset in invalidation start position 2023-09-08 00:57:04 +01:00
RedDevilus
ce90d81a2f GameDB: Battlefront + Lara Croft Legend + CT Fire
Adds mipmapping full and trilinear for better ground texture for battlefront, also missing a '-' with new entry with missing fixes and region

Lara Croft Tomb Raider Legend, gets higher minimum blending as it looks better and is less than 500 readbacks so should be fine, also had missing gamefixes for entries.

Counter Terrorist Special Forces - Fire for Effect needs vu1clamping (extra can be with sign) fixes https://github.com/PCSX2/pcsx2/issues/9885
2023-09-07 08:17:55 +01:00
Stenzek
f250b006b1 CI: Disable MFI joystick for SDL on MacOS 2023-09-07 14:09:25 +10:00
Stenzek
f46c3b36cc SDLInputSource: Deduplicate controllers based on instance ID 2023-09-07 14:09:25 +10:00
PCSX2 Bot
217999912a Qt: Update Base Translation 2023-09-06 20:50:40 +10:00
Stenzek
82e6192c05 GS/Vulkan: Clear primid texture binding before prepass
Prevents incorrect-state descriptor.
2023-09-05 20:03:01 +10:00
Stenzek
03abfa9c59 Qt: Add option to exit Big Picture UI 2023-09-05 12:32:37 +10:00
Stenzek
97155c50c4 Qt: Stop fullscreen UI on window close 2023-09-05 12:32:37 +10:00
Stenzek
7b45e9296a Qt: Add copy global settings/clear per-game settings 2023-09-05 12:32:37 +10:00
Stenzek
c16836e7c0 Misc: Drop stat compatibility calls 2023-09-05 12:32:23 +10:00
PCSX2 Bot
1f88072eae PAD: Update to latest controller database. 2023-09-04 18:04:03 +02:00
Mrlinkwii
858ea9c3de GameDB : replace skipmpeg with eeCycleRate for David Beckham Soccer 2023-09-04 15:28:31 +01:00
refractionpcsx2
1248858303 GS/TC: Update source age on HW move 2023-09-03 17:15:52 +01:00
refractionpcsx2
a472a95945 GameDB: Replace EE timing with cycle rate on Robin Hood 2 - The Siege 2023-09-03 15:51:49 +01:00
PCSX2 Bot
c8af57c65d Qt: Update Base Translation 2023-09-03 12:47:30 +10:00
Stenzek
d00eb38bbc FullscreenUI: Make localizable 2023-09-03 12:42:30 +10:00
Stenzek
f8e1b9b11b Common: Add SmallString class 2023-09-03 12:42:30 +10:00
ehw
bbb807d860 GameDB: Set cpuCLUTRender to 2 for Sega Ages 2500 Vol.31 - Dennou Senki Virtual On (SLPM-62767)
Fixes black and white colors in hardware renderers.

Fix the large amount of differences between the .yaml commit hopefully

Revert to the original GameIndex.yaml from the main branch

Adding the modified GameIndex.yaml with the game fix

Revert "Adding the modified GameIndex.yaml with the game fix"

This reverts commit afcf226932b1e27aa3db710f0cbd2e9deb9113f7.

Revert "Revert to the original GameIndex.yaml from the main branch"

This reverts commit 141cbad15d9de1a8d5fa36bc98f43bdc895afa42.

Revert "Fix the large amount of differences between the .yaml commit hopefully"

This reverts commit e03b2ffa537864f67ddf367105477f5a8cf5990c.

Revert "GameDB: Set cpuCLUTRender to 2 for Sega Ages 2500 Vol.31 - Dennou Senki Virtual On (SLPM-62767)"

This reverts commit 76d3c9d33542b3c303191b247a432a8b823535be.

Set cpuCLUTRender to 2 for SLPM-62767
2023-09-02 09:55:56 +01:00
Mrlinkwii
355c68f687 Build: remove references to Vista and Windows 7 & Windows 8/8.1 2023-09-02 11:39:36 +10:00
refractionpcsx2
b74ae9fabf Build: patch in Qt monitor fix from post 6.5.2 2023-09-01 17:09:21 +01:00
refractionpcsx2
17d2fb1858 GameDB: Remove Tex in RT for Dragon Quest VIII 2023-08-31 13:09:26 +01:00
refractionpcsx2
222fad315d GS/HW: Allow reverse primitive gap checking 2023-08-31 13:09:26 +01:00
refractionpcsx2
124ba2a124 GS/TC: Avoid no size targets being made 2023-08-31 11:55:20 +01:00
refractionpcsx2
9b8dc448f6 GS/TC: Only look up alternate depth sources if inside the target 2023-08-31 08:45:23 +01:00
refractionpcsx2
0a44a81d18 GS/HW: Round up when checking odd width double half clears 2023-08-31 08:44:45 +01:00
refractionpcsx2
c4ec841c0f IPU: Move decode delay to after the decode 2023-08-31 08:44:30 +01:00
refractionpcsx2
6fe5d9a9e9 GameDB: Add missing BlueTongue GSC entries 2023-08-30 14:40:47 +01:00
refractionpcsx2
18c74a245d GS/HW: Fix up bluetongue GSC fix for NTSC FMVs 2023-08-30 14:40:47 +01:00
refractionpcsx2
2fb311e090 GameDB: Add VU0 clamping Extra + Sign to Sky Odyssey 2023-08-30 10:11:17 +01:00
refractionpcsx2
d6822b85b3 GS/HW: Kill old opposite type targets on clears 2023-08-29 09:56:38 +01:00
PCSX2 Bot
d08461bd4c Qt: Update Base Translation 2023-08-28 16:16:25 +02:00
refractionpcsx2
f4d63877e4 GS/HW: Fix up and restore some old valid channel behaviour 2023-08-28 12:07:19 +01:00
refractionpcsx2
43335cd729 GS/HW: Always calculate valid area + end block on new targets 2023-08-27 23:19:54 +01:00
Stenzek
0678bb03d7 GS/Vulkan: Prevent transition back to Undefined layout 2023-08-27 20:41:02 +10:00
Stenzek
b15102d45a FullscreenUI: Make back button go back to pause menu 2023-08-27 20:35:57 +10:00
Stenzek
fb26842046 GS/HW: Fix depth getting discarded with DATE on 2023-08-27 20:35:39 +10:00
Connor McLaughlin
e703baf295 GSCapture: Fix incorrect format string for FFmpeg version 2023-08-27 20:34:36 +10:00
Stenzek
94670baa64 Qt: Fix global volume slider overriding per-game 2023-08-27 15:33:04 +10:00
Stenzek
62c67435e6 Hotkeys: Add "Toggle On-Screen Display" 2023-08-27 13:00:33 +10:00
Stenzek
1e492721ba Pad: Don't serialize buttons or config
[SAVEVERSION+] hopefully the last time.
2023-08-27 12:59:29 +10:00
refractionpcsx2
2fe635a958 GS/HW: Don't rely on transfer rect size if target width changes 2023-08-26 22:33:29 +01:00
refractionpcsx2
c1bdbffc87 GameDB: Remove Tex in RT for Final Fantasy X 2023-08-26 22:33:16 +01:00
refractionpcsx2
a654f5bf13 GS/HW: Remove Final Fantasy X CRC hack 2023-08-26 22:33:16 +01:00
Stenzek
7a8d99304a StateWrapper: Use is_standard_layout+is_trivial instead of is_pod
is_pod is deprecated in C++20.
2023-08-27 01:08:56 +10:00
Stenzek
7e0ce1fa48 Pad: Don't save button/analog state
[SAVEVERSION+] unfortunately, because I haven't moved everything over to
StateWrapper yet.
2023-08-27 01:08:56 +10:00
kamfretoz
b84d3a5612 Qt: Rename Keyboardmania to KeyboardMania 2023-08-26 22:54:34 +10:00
kamfretoz
81b110feb6 Qt: Rename BeatMania Da Da Da!! Keyboard to Konami Keyboard 2023-08-26 22:54:34 +10:00
kamfretoz
4556f7b8a4 Qt: Add variety of icons to USB + general refinements 2023-08-26 22:54:34 +10:00
Stenzek
a9b6f8976e Build: Clean up optional components 2023-08-26 17:23:14 +10:00
Stenzek
dfa6165662 CI/MacOS: No longer need to build SoundTouch 2023-08-26 17:23:14 +10:00
Stenzek
ee3ee63ff5 3rdparty: Remove SDL2 submodule
Unnecessary since we always dynamic link it now.
2023-08-26 17:23:14 +10:00
Stenzek
3567d8913f CMake: Use dynamic SDL2 on all platforms 2023-08-26 17:23:14 +10:00
Stenzek
8276054671 CI: Build Windows dependencies as part of workflow 2023-08-26 17:23:14 +10:00
Stenzek
220117f07c MSBuild: Put all objects/libs together in build directory 2023-08-26 17:23:14 +10:00
Stenzek
728ca8aa9d GS: Fix depth texture dumping for HW 2023-08-26 16:18:07 +10:00
Stenzek
e3a1125e84 Build: Silence warnings in third-party projects 2023-08-26 15:02:17 +10:00
Stenzek
02b64f4027 3rdparty/SoundTouch: Warning fixes 2023-08-26 15:02:17 +10:00
Stenzek
2ae44ca493 Misc: Fix various warnings 2023-08-26 15:02:17 +10:00
Stenzek
afdd63521f Build: Fix ZIP_STATIC macro redefinition 2023-08-26 15:02:17 +10:00
TellowKrinkle
bced0b91a0 GS: Fix sub-page addressing of Z formats
They aren't just an offset of the base value like the color formats, but instead an xor of the associated color format
2023-08-26 03:00:21 +01:00
TellowKrinkle
2a6f2939be GS: Remove GSOffset::PAPtrHelper
Not compatible with the real GS's Z addressing, RIP
2023-08-26 03:00:21 +01:00
refractionpcsx2
13880354cf GS/TC: Don't expand block offsets to page size when small 2023-08-26 03:00:05 +01:00
refractionpcsx2
5df0c95e51 GS/HW: Don't use TEXA on 16/24 bit when TCC is set to Vertex alpha 2023-08-26 02:54:23 +01:00
refractionpcsx2
447054a14f GameDB: Add Hitman Blood Money HW fix to the US versions 2023-08-25 14:31:13 +01:00
refractionpcsx2
5f348a8ea3 GS/HW: Warning fixes 2023-08-24 15:41:58 +01:00
Stenzek
1d69411eba GS/HW: Separate mem clears in to colour and depth 2023-08-24 15:41:58 +01:00
lightningterror
fb24a8fdb1 Config: Remove Target Partial Invalidation. 2023-08-24 15:41:58 +01:00
lightningterror
827fb7fa82 GameDB: Remove Target Partial Invalidation from the db code. 2023-08-24 15:41:58 +01:00
lightningterror
c6365bebac ImGui: Remove Target Partial Invalidation. 2023-08-24 15:41:58 +01:00
lightningterror
c7b94d0a42 Qt: Remove Target Partial Invalidation hwfix from the gui. 2023-08-24 15:41:58 +01:00
lightningterror
86f82951d5 GameDB: Remove partialTargetInvalidation hwfix from games. 2023-08-24 15:41:58 +01:00
refractionpcsx2
72b865b50e GS/TC: Improve use of alpha validity and clearing bad targets 2023-08-24 15:41:58 +01:00
refractionpcsx2
b2f7e4b16b GS: Don't invalidate CLUT on GS Read/Download 2023-08-24 15:41:58 +01:00
refractionpcsx2
2f01299472 GS/HW: Kill old dirty targets when source not using them 2023-08-24 15:41:58 +01:00
refractionpcsx2
5cc851e175 GS/TC: On LocalMemInvalidate, check for RT's if Z mismatches 2023-08-24 15:41:58 +01:00
refractionpcsx2
66986e66e3 GS/HW: Add GSC for Hitman - Blood Money to avoid failed shuffle/move. 2023-08-24 15:41:58 +01:00
refractionpcsx2
9292bbcd1b GS/HW: Rewrite invalidation and fix up surrounding behaviour. 2023-08-24 15:41:58 +01:00
refractionpcsx2
dfba3c51fb GameDB: Add EE timing fix to Gunfighter II 2023-08-24 15:08:32 +01:00
Stenzek
da7e501e3a Tests: Force 1MB stack size for MSVC
For some reason, the stack refuses to grow with the latest MSVC updates,
at least within our unit tests that bump the stack considerably within
a lambda function.

Just force the commit size to 1MB for now.
2023-08-24 14:43:00 +01:00
Stenzek
42ae23f279 3rdparty: Fix Debug CMake build on Windows 2023-08-24 14:43:00 +01:00
Stenzek
c43775f7b2 3rdparty: Un-submodule libzip 2023-08-24 14:43:00 +01:00
Stenzek
86ee1270e2 3rdparty/cpuinfo: Fix build with clang-cl 2023-08-24 14:43:00 +01:00
Berylskid
b8cfd83d33 GameDB: Remove EE Round Mode from Armored Core 3 2023-08-23 15:04:31 +01:00
PCSX2 Bot
bfd56bf904 Qt: Update Base Translation 2023-08-23 00:24:48 +02:00
refractionpcsx2
df2311cdaf GS/HW: Fix CRC hack for Growlanser V not checking for null 2023-08-22 23:23:20 +01:00
Goatman13
d609c2b0ff GameDB: Change VU1 clamping mode for Naruto 2 2023-08-22 21:47:03 +01:00
Ty Lamontagne
70e1d2bf3d Debugger: Implement "Copy Address" context menu in memory view 2023-08-22 21:23:16 +02:00
Ty Lamontagne
1697c2160c Debugger: Properly initialize primitive class members 2023-08-22 21:23:16 +02:00
Buzzardsoul
c28301bb7e GameDB: Add missing patch for Myst III 2023-08-22 21:22:17 +02:00
PCSX2 Bot
b5eadb158c PAD: Update to latest controller database. 2023-08-22 21:19:02 +02:00
RedPanda4552
e94912cdb9 Pad: Only consider LSB for small motor vibration 2023-08-20 06:30:53 +01:00
lightningterror
dfb967834f GS/HW: Cleanup draw when pixels fail on alpha test/date.
Also make CleanupDraw use it's own function.
2023-08-19 19:36:07 +02:00
Stenzek
98f7c29683 GS/Vulkan: Avoid incorrect-layout RT descriptor 2023-08-19 16:16:05 +01:00
RedDevilus
0998c5539a GameDB: SoulCalibur III
Normal (Vertex) causes align sprite artifacting, also Special aggressive reduces blurriness even more.
2023-08-19 16:15:43 +01:00
lightningterror
1a79e23b12 GS/HW: Further adjust how we handle RT alpha in blending.
Check whenever RT alpha min is equal or higher than RT alpha max / 2.
This will allow us to use the min value as a more accurate option than
the actual value since it will be less accurate.
2023-08-18 21:44:11 +02:00
refractionpcsx2
d49323c7c4 GS/HW: Skip DATE/draw if not required 2023-08-18 11:34:54 +01:00
refractionpcsx2
98eb3cb7f0 GameDB: Add COP2 patch for Initial D - Special Stage (SLPM-65268) 2023-08-17 12:44:10 +01:00
RedDevilus
c75ae73814 GameDB: Naruto Ultimate Ninja 5 + same for 4th
Games have the same issues and fixes, also normal vertex introduces some texture gaps whilst full roundsprite looks to be better, also add Vu0clampmode for some of the bad dialog backgrounds.

See also: https://github.com/PCSX2/pcsx2/pull/9803
2023-08-17 02:11:03 +01:00
PCSX2 Bot
07519b7c28 Qt: Update Base Translation 2023-08-17 01:48:56 +01:00
ElTioRata
4c62c82dab GameDB: Hardware Fixes for Burnout 2 (#9770) 2023-08-17 01:46:58 +01:00
refractionpcsx2
92a9554240 GameDB: Add VU0 clamping to Naruto Ultimate Ninja 5 (Accel 2) 2023-08-16 17:01:02 +01:00
refractionpcsx2
324a700fb7 GS/TC: Don't allow tex is rt for PSMT8 on 16bit targets 2023-08-16 09:48:23 +01:00
refractionpcsx2
a6b934758b GS/HW: Only preserve valid channels on target overlap 2023-08-16 01:13:01 +01:00
Stenzek
cd5ec59f6a GS/DX11: Commit clear before clearing stencil
Stops the discard happening later, and blowing away the cleared value.
2023-08-15 13:08:51 +10:00
RedPanda4552
80fe813116 [SAVEVERSION+] Remove old trigger deadzone references, replace with button deadzone
Was removed from UI but not the backend
2023-08-14 20:06:47 +10:00
Stenzek
1262afef63 GS/DX12: Use WinPixEventRuntime for debug messages 2023-08-14 20:06:16 +10:00
Stenzek
987489b34a 3rdparty: Add WinPixEventRuntime 2023-08-14 20:06:16 +10:00
TellowKrinkle
9310861cc2 GS:MTL: Properly set stencil reference on draw encoders 2023-08-14 20:06:04 +10:00
kamfretoz
53f0db99ca GameDB: Various Fixes 2023-08-14 09:09:43 +01:00
Christian Kenny
2eb125f6e2 gitignore: Don't include TXT files generated by crash dumps 2023-08-12 23:02:33 +01:00
Mrlinkwii
f805d9432e UI: remove mention of Half Screen Fix 2023-08-12 23:02:14 +01:00
refractionpcsx2
054cb9e9fa GS/HW: Correctly remove offset when detecting shuffle coords 2023-08-12 19:39:25 +01:00
refractionpcsx2
1f77e7d90a GS/CRC: Fix the sizing on Sonic Unleashed copy CRC 2023-08-12 19:34:06 +01:00
lightningterror
7ed33832b8 GS/HW: Isolate early returns for blending.
Optimization.
2023-08-12 18:14:37 +02:00
lightningterror
d19e9cc662 GS: Bump shader cache version. 2023-08-12 18:14:37 +02:00
lightningterror
846c9cec6a GS/HW: Adjust how we handle RT alpha in blending.
When both rt min and max are equal then we know what Ad value is,
if so use Af bit instead and set AFIX value from rt alpha value that we know.

On OpenGL when BLEND C == 1 but reading the rt is disabled, set the value to 0 instead
of reading an undefined value.
2023-08-12 18:14:37 +02:00
Sanjay Govind
460e4b8bb3 USB-Turntable: Default multiplier to 1 2023-08-12 14:07:37 +01:00
Stenzek
2e6bd23f22 Qt: Fix arrow key handling on macOS 2023-08-12 16:17:47 +10:00
refractionpcsx2
7763948fe4 GS/HW: Restrict double buffer detection to widths greater than 256 2023-08-12 01:54:31 +01:00
refractionpcsx2
2a0f001902 GIF: Adjust run length of split in intermittent packets 2023-08-12 00:28:28 +01:00
refractionpcsx2
14df69e180 GS/HW: Fix crash where it could process a texture with no RT 2023-08-12 00:28:28 +01:00
refractionpcsx2
28b6389b36 GS/HW: Stop errantly halfing normal height 2023-08-12 00:28:28 +01:00
lightningterror
905c0b8c7a GS: Fix warnings.
GSRendererHW:
Fix Wtautological-constant-out-of-range-compare.

GSSstate:
Fix Wunused-variable.
Fix Wsign-compare.
2023-08-11 21:46:29 +02:00
lightningterror
b674cc95ac Qt: Fix Wreorder-ctor warning. 2023-08-11 21:46:29 +02:00
Mrlinkwii
bccb2509b5 GameDB: Fixes for Ghost Recon - Advanced Warfighter & Battlefield 2 2023-08-11 18:16:33 +02:00
refractionpcsx2
cd980c6604 GS/TC: Fix crash in debug message (only affects debug device) 2023-08-11 16:08:38 +01:00
lightningterror
ddff4ec083 GameDB: Add full mipmap plus triliear ps2 to The Godfather.
Improves building textures to match sw renderer.
2023-08-11 17:05:21 +02:00
kamfretoz
5bf97be8ef Qt: Even further icon refinement 2023-08-11 15:24:04 +01:00
lightningterror
7fadb6ed05 GS/HW: Cleanup texture shuffle shaders. 2023-08-11 15:23:50 +01:00
lightningterror
89688d67dd GS: Bump shader cache version. 2023-08-11 15:23:50 +01:00
refractionpcsx2
279007544a GS/HW: Allow double clear when src is lowest bitsize denominator 2023-08-11 14:28:34 +01:00
lightningterror
1c0f0e1423 GS: Bump shader cache version. 2023-08-11 13:14:19 +01:00
lightningterror
1ab909addc Config/gamedb: Remove screen fix from config entirely.
No longer needed.
2023-08-11 13:14:19 +01:00
lightningterror
99dfd15469 ImGui: Remove Half Screen Fix from the ui.
No longer needed.
2023-08-11 13:14:19 +01:00
lightningterror
be18ecf74e Qt: Remove Half Screen Fix from the ui.
No longer needed.
2023-08-11 13:14:19 +01:00
lightningterror
713bd132dc GS/D3D: Add initial support for complex shuffles. 2023-08-11 13:14:19 +01:00
refractionpcsx2
20f03e237e GameDB: Add Autoflush to Minority Report 2023-08-11 13:14:19 +01:00
refractionpcsx2
7d3c3911ea GS/HW: Update BigMuthaTruckers hack to a GSC 2023-08-11 13:14:19 +01:00
refractionpcsx2
ccfee2be83 GameDB: Add Tex in RT to Godfather + remove skipdraw 2023-08-11 13:14:19 +01:00
refractionpcsx2
1193b0b990 GS/TC: Delete old targets which aren't preserved and don't match size 2023-08-11 13:14:19 +01:00
refractionpcsx2
5a3ba4e563 GS/HW: Add support for complex offset shuffles 2023-08-11 13:14:19 +01:00
refractionpcsx2
e9c342ef74 GS/Autoflush: Account for CLAMP & better handle different formats 2023-08-11 12:35:42 +01:00
refractionpcsx2
8927ffa035 GS: Fix autoflush behaviour when using Z + C formats together 2023-08-11 12:35:42 +01:00
Ty Lamontagne
fdb0312326 Dis5900: Mask and extend the pmfhl & pmthl LUT
Fixes an OOB access when disassembling an invalid opcode (71756972h)
2023-08-11 00:09:25 +01:00
refractionpcsx2
2f21caa41c GameDB: Add Instant DMA to Jak X Combat Racing 2023-08-10 10:40:43 +01:00
Stenzek
51a35d40e5 3rdparty: Bump rcheevos to 3af1e2fc5188d6e932ee379942f4049ea877e648 2023-08-10 01:27:20 +01:00
Stenzek
6ec524adec USB/GunCon2: Fix cursor not starting in center 2023-08-10 01:27:10 +01:00
Stenzek
7d4a7ec8c7 ImGuiManager: Fix window width/height not being initialized 2023-08-10 01:27:10 +01:00
Silent
0256c4521d GameList: Support adding custom title and region to files 2023-08-10 01:26:06 +01:00
Silent
be3ed181c1 SettingsInterface: Fix constness of a few methods 2023-08-10 01:26:06 +01:00
PCSX2 Bot
38cf7884fe Qt: Update Base Translation 2023-08-09 21:37:15 +10:00
JordanTheToaster
25d426e8b2 GameDB: Various fixes
Fixes for missing recommended blending on MGS 2 Sub and post processing positioning on Project Snowblind.
2023-08-09 21:35:34 +10:00
TellowKrinkle
edff9ae684 GS:MTL: Include full error messages in aborts 2023-08-09 21:34:38 +10:00
TellowKrinkle
a622e3bda6 Mac: Mark crash info as used so it doesn't get DCE'd 2023-08-09 21:34:38 +10:00
Mrlinkwii
4d54e28e63 GameDB: remove all god hand getSkipCount 2023-08-09 21:34:07 +10:00
Mrlinkwii
c89d023f91 CRC/HW: remove god hand GSC 2023-08-09 21:34:07 +10:00
Stenzek
c7cfea1daa GS/Vulkan: Make VK_EXT_provoking_vertex optional again
RenderDoc doesn't support it.
2023-08-09 21:33:45 +10:00
Stenzek
beb07365a0 Build: Disable Vulkan on macOS builds
MoltenVK does not support the extensions we now require.
2023-08-09 19:34:23 +10:00
Stenzek
0787c65e51 GS/Vulkan: Mandate well-supported extensions
- VK_EXT_provoking_vertex and provokingVertexLast
 - VK_EXT_line_rasterization and bresenhamLines
 - VK_KHR_shader_draw_parameters

Lack of these would cause rendering issues anyway.
2023-08-09 19:34:23 +10:00
Stenzek
d48dea7273 GS/Vulkan: Don't track vertex buffer state
It never changes.
2023-08-09 19:34:23 +10:00
Stenzek
2432cc6ed2 GS/Vulkan: clang-format 2023-08-09 19:34:23 +10:00
Stenzek
cf523d4215 GS/Vulkan: Use push descriptors instead of per-frame allocations 2023-08-09 19:34:23 +10:00
lightningterror
906d87c4b8 GS/HW: Fix nfs undercover crashing on dev/debug builds.
We were reading the wrong value.
2023-08-09 10:23:47 +02:00
Connor McLaughlin
9c4a92c015 GS/Metal: Fix crash when Z write is on second pass 2023-08-08 18:27:54 -05:00
lightningterror
0c056ba691 USB: Fix function parameter should be passed by const reference warnings.
Codacy.
2023-08-08 21:27:36 +02:00
lightningterror
424158b28d DEV9: Fix function parameter should be passed by const reference warnings.
Codacy.
2023-08-08 21:27:36 +02:00
JordanTheToaster
57f118a5b5 GameDB: Various fixes
Fixes line across the screen and offset blur in Samurai Westerner and corrects region of Chinese entry's to properly use the flag included in the icons folder.
2023-08-08 08:58:55 +01:00
refractionpcsx2
65e75f3da2 GS/TC: Ignore linear part of rect when translating 2023-08-08 08:57:09 +01:00
refractionpcsx2
41174cde45 GS: Elide flushes on GS transfer if not required 2023-08-08 08:57:09 +01:00
refractionpcsx2
cb7d01fb36 GameDB: Improve Myst 3 patch 2023-08-08 08:56:52 +01:00
refractionpcsx2
3e78f8e87d IPU: Improve DMA/IPU call locations to reduce looping 2023-08-08 08:56:52 +01:00
BacklogOdyssey
f2c032ba07 RetroAchievements/Qt: Add configurable achievement notification duration 2023-08-08 13:17:28 +10:00
refractionpcsx2
2ef1589e76 GameDB: Remove NFS HP2 GS fix which did nothing. 2023-08-07 23:03:11 +01:00
refractionpcsx2
5c394557e3 GS/HW: Handle split shuffles with a width of 1 2023-08-07 23:03:11 +01:00
PCSX2 Bot
5c4a5b0a61 PAD: Update to latest controller database. 2023-08-07 17:10:55 +01:00
Silent
be22b7349d GameList: Add an option to exclude entire directories 2023-08-07 16:50:15 +01:00
refractionpcsx2
023e4774a1 UI: Only allow relative memcard files in memcard interface 2023-08-07 16:49:45 +01:00
Stenzek
56b706f25e Achievements: Tag a few missing strings for translation 2023-08-07 16:49:34 +01:00
Stenzek
9d07ee43eb VMManager: Fix achievements HC mode not applying on reset 2023-08-07 16:49:34 +01:00
Connor McLaughlin
147a6c81a1 GS/Metal: Don't end up with two encoders on readback 2023-08-06 16:38:59 -05:00
RedPanda4552
5972f4947d InputManager: Fix incorrect compare for multitap enabled 2023-08-06 00:45:58 +01:00
refractionpcsx2
9c99a624d7 GS/HW: Optimise usage of 24bit alphas 2023-08-05 22:01:59 +01:00
refractionpcsx2
d812d83dda GS/HW: Limit alpha range on 16bit targets 2023-08-05 22:01:59 +01:00
refractionpcsx2
f81c5c2455 GS/HW: Guess alpha values when using 16bit RT as TEX = RT 2023-08-05 22:01:59 +01:00
refractionpcsx2
dc8c5e6209 GS/HW: Use texture alpha for 16bit textures in CalcAlphaMinMax 2023-08-05 22:01:59 +01:00
Stenzek
14833582b2 GS/HW: Re-optimize alpha test after updating direct alpha range 2023-08-05 22:01:59 +01:00
Mrlinkwii
cca813fd1d GameDB: fixes for Panzer Elite Action & Totally Spies 2023-08-04 16:30:19 +01:00
lightningterror
d4102e75c5 Readme: Update requirements.
Minimum: Lower STR requirements to 1500 from 1800.
Recommended: Lower STR requirements to 2000 from 2500.
Add Heavy category with STR requirements 2600.
2023-08-04 16:32:16 +02:00
Tyler Wilding
76a04efc5c ci: properly fetch release info to make announcement 2023-08-03 21:41:46 +01:00
JordanTheToaster
a34e139843 GameDB: Remove CCLUT from Raw Danger
Doesn't appear to do anything currently and causes the game to do almost 100 readbacks totally killing performance in hardware mode.
2023-08-03 11:59:09 +01:00
Tyler Wilding
a1727a2ac7 ci: announce release after it's published
It's no longer working because workflows will not implicitly trigger from another workflow when initiated by the default token.

You must explicitly call them via a `workflow_dispatch` or use a distinct PAT.

The announce workflow isn't really used anywhere else so simplifying and consolidating the steps feels appropriate.
2023-08-03 01:51:58 +01:00
Stenzek
7ac224adf3 MemoryCardFolder: Initialize hostFilePath 2023-08-02 16:06:37 +01:00
RedDevilus
d5e3d02a98 GameDB: Missing Korean entries + maintenance
Based on:
https://github.com/PCSX2/pcsx2/pull/9671#issuecomment-1657337888

I do see a lot of the missing entries actually come from the PCSX2 wiki, and the csv was mostly duplicates but I checked and cleaned it up while looking at other things to potentially fix.

GGeneration is faulty naming though, G Genereration needs a space.

There are also 2 reasons why we don't fully follow redump:
For starters Windows uses specific characters in their code and following that would make it impossible to make covers for them and some other things
The other thing is when The blablabla  turns into blablabla, The for filtering purposes.

In future we should probably have a display language for specific languages, ex. Korean entries show Japanese, English or others
2023-08-02 16:02:53 +01:00
Connor McLaughlin
68ad3e8db4 FileSystem: Partial revert of c82f800
Mixing stdio and raw FD access is a bad thing, filelength() isn't going to return correct results when extending a file has been buffered.
2023-08-02 18:45:52 +10:00
Stenzek
31029b2fe4 InputManager: Don't connect bindings for disabled multitap ports 2023-08-02 12:44:31 +10:00
Stenzek
8b0c101768 Pad: Move multitap into its own config section
And more config cleanups.
2023-08-02 12:44:31 +10:00
JordanTheToaster
50b66f526b GameDB: Various fixes
Fixes menu corruption and likely other issues the game may have had similar to all future entry's.
2023-08-02 01:07:45 +01:00
RedDevilus
f3fcf010fb GameDB: Remove accidental addition Growlanser 5+6
Texture Inside RT was fixed in https://github.com/PCSX2/pcsx2/pull/9187
2023-08-01 17:31:47 +01:00
PCSX2 Bot
4da53bd00d Qt: Update Base Translation 2023-08-01 17:18:23 +01:00
Mrlinkwii
c6cef45f0e Inputmanager: fix possible build issue 2023-08-01 17:07:51 +01:00
Mrlinkwii
e36cd7fe5c Build: remove -32 notation from core filenames 2023-08-01 16:09:09 +01:00
Stenzek
0c24f2db7b GS/HW: Don't discard target when SCANMSK is set 2023-08-01 13:31:42 +10:00
Stenzek
8866faa8d5 GS: Remove GSCrc
Finally!
2023-08-01 12:42:06 +10:00
Stenzek
b2dc31ba80 GS/HW: Move Tekken 5 CRC hack to the GSC 2023-08-01 12:42:06 +10:00
pgert
061ea30199 GameDB: entry correction 2023-07-31 22:36:56 +01:00
refractionpcsx2
0e9e94d090 UI: Delete rogue quote breaking HTML in Memcard Convert dialog 2023-07-31 16:36:14 +01:00
Stenzek
3321cb37ef GS/HW: Don't invalidate alpha on display target lookup 2023-07-31 21:08:33 +10:00
JordanTheToaster
d60a818791 GameDB: Go Go Golf Fixes
Fixes for the pretty awful brightness on pretty PS1 looking textures.
2023-07-31 10:59:54 +01:00
PCSX2 Bot
3937a52b4f Qt: Update Base Translation 2023-07-31 19:28:43 +10:00
Stenzek
2c3902b1a1 GS/HW: Fix bilinear-over-self targets getting discarded 2023-07-31 19:24:08 +10:00
RedPanda4552
f43b5ee76f Pad: Respect non-standard vibration mappings and pure digital button query 2023-07-30 23:48:12 +01:00
refractionpcsx2
bab16a5251 UI: Update glyphs for asian languages. 2023-07-30 19:20:29 +01:00
Mrlinkwii
08c734d7fd GameDB: various fixes 2023-07-30 14:23:45 +01:00
Connor McLaughlin
36126a3ad9 GS: Drop alignment from ClearValue 2023-07-30 21:44:44 +10:00
kamfretoz
ce505d33bd Qt: Make incompatible savestate message translateable 2023-07-30 20:28:50 +10:00
Stenzek
de0d859502 Qt: Fix changing cover file formats 2023-07-30 19:25:51 +10:00
Stenzek
ce96d4bcc5 SaveState: Store the current PCSX2 version in the save state 2023-07-30 18:13:25 +10:00
Chromaryu
fb242274d5 GameDB: Fix PoPoLoCrois Naming 2023-07-30 16:18:55 +10:00
Stenzek
938bc7cdd7 GS/HW: Allow fast clears even when expanding
Doesn't make sense not to.
2023-07-30 16:18:04 +10:00
Stenzek
36865f2930 GS/HW: Skip target conversion when alpha doesn't exist 2023-07-30 16:18:04 +10:00
refractionpcsx2
12e79cccf6 GS/HW: Improve detection of reverse texture shuffles 2023-07-30 07:04:39 +01:00
PCSX2 Bot
6180f12ba3 Qt: Update Base Translation 2023-07-30 12:26:53 +10:00
refractionpcsx2
c00b6c6237 GameDB: Sort and append missing entried from Redump 2023-07-30 02:37:18 +01:00
RedPanda4552
dbdc74fdef Memcard: Remove erroneous auto eject decrement 2023-07-29 19:11:33 +01:00
pgert
5bb0a07164 GameDB: correct an entry 2023-07-29 18:32:26 +01:00
Stenzek
543f09999f GS/HW: Fix target memory usage underflowing 2023-07-30 01:03:46 +10:00
Connor McLaughlin
812f32efdd README: Update DirectX Requirements 2023-07-29 22:32:20 +10:00
Stenzek
784264eba4 GS: Drop alpha gather from FXAA
It's not used by any backends.
2023-07-29 22:28:49 +10:00
Stenzek
ff9ca059c7 GS/DX11: Require feature level 11.0
Feature level 11.0 GPUs were first released in 2009, almost 14 years ago
now. Older GPUs have not had drivers released in a long time, and are
known to be buggy.

None of us have hardware this old, so it's impossible for us to support
it.
2023-07-29 22:28:49 +10:00
Silent
d4b0c39485 Achievements: Fix Leaderboard submission UI when multiple leaderboards update at once 2023-07-29 22:23:11 +10:00
Ty Lamontagne
87c42aeaf4 Debugger: Fix mismatch sign compare & bitwise on different enum warnings 2023-07-28 22:00:08 +01:00
Ty Lamontagne
5ba6e57c71 CDVD: Fix unused qualifier warning 2023-07-28 22:00:08 +01:00
Ty Lamontagne
6d2ba5c2d0 Common | TextureDecompress: Fix unused variable warning 2023-07-28 22:00:08 +01:00
Ty Lamontagne
0d42b81285 Debugger: Fix 'run-to-cursor' context action 2023-07-28 22:00:08 +01:00
Stenzek
9ce2ae613b GS/HW: Update vertex trace in ReplaceVerticesWithSprite() 2023-07-29 02:56:59 +10:00
PCSX2 Bot
13c9e0e666 Qt: Update Base Translation 2023-07-28 16:32:23 +01:00
Stenzek
784118e9c1 GS/HW: Don't drop fractional colour before modulating
Fixes banding in Xenosaga, Tales of the Abyss, Beyond Good and Evil.
2023-07-28 16:31:35 +01:00
Mrlinkwii
df32a32d99 GameDB: add missing serials 2023-07-28 16:29:25 +01:00
JordanTheToaster
655241aed3 Translations: Add Latvija to the menu
Adds missing Latvija option to the menu of selectable languages.
2023-07-28 16:28:29 +01:00
refractionpcsx2
60a2b246e2 GS: Correct alpha test for RGB Only and non-32bit colours 2023-07-28 15:57:28 +01:00
Tyler Wilding
ebd60d93f3 translations: Syncing Crowdin translations (#9655) 2023-07-28 14:50:23 +01:00
Connor McLaughlin
cc4ba935b5 CI/Linux: Fetch tags for Flatpak scheduled builds
Regression from #9224.
2023-07-28 21:48:35 +10:00
RedPanda4552
824147fd7d [SAVEVERSION+] Fix vibration motors backwards and too low power delivery to small motor
Also fix inconsequential but (technically) incorrect return values for vibration mapping command
2023-07-28 11:27:51 +01:00
refractionpcsx2
c3446a16cc GS: Kill SMT Nocturne CRC hack 2023-07-28 01:48:45 +01:00
Stenzek
82135d1892 GS/OGL: Fix depth state in MultiStretchRects 2023-07-28 01:48:27 +01:00
refractionpcsx2
1cff63bc01 UI: Add some missing string translations 2023-07-27 20:25:17 +01:00
refractionpcsx2
e488e74313 UI: Fix minor typo 2023-07-27 20:25:17 +01:00
refractionpcsx2
1a17c9da86 GameDB: Add Preload Frame to remaining versions of Keroro Gunsou 2023-07-27 20:25:17 +01:00
refractionpcsx2
20e1f773fc GS/HW: Mark alpha invalid on framebuffer resize. 2023-07-27 20:25:17 +01:00
refractionpcsx2
56d80ff293 GS/HW: Update Blue Tongue CRC and remove frame width hacks 2023-07-27 20:25:17 +01:00
refractionpcsx2
80e176136a GS/HW: Adjust Burnout bloom CRC to work better with upscaling 2023-07-27 20:23:21 +01:00
RedPanda4552
0ae66d3e24 Pad: Set data low when no pad present
Fixes uLaunchELF spinning waiting for second pad to come online.
2023-07-27 20:19:45 +01:00
RedDevilus
802ab8238e GameDB: Beeg fixing about everything
Sims M6 to M8 (more languages)
Tarzan (Slight Blurring)
Winnie Poo (Misaligned sprites and models)
Blood Will Tell: More vibrant text with medium blending
Recommended blending for SSX series

etc Because I keep forgetting to PR this otherwise
2023-07-27 17:09:31 +01:00
refractionpcsx2
ec9c07a646 GS/HW: Tweak Burnout bloom CRC coords 2023-07-27 14:50:29 +01:00
refractionpcsx2
b75ad663f2 USB/UI: Fix small typo 2023-07-27 13:08:08 +01:00
Stenzek
e4a017fc00 Qt: Add callback for forcing achievements re-login 2023-07-27 20:40:58 +10:00
Silent
5b486ca6b8 Achievements: Log-in explicitly on startup to refresh the token 2023-07-27 20:40:58 +10:00
PCSX2 Bot
1c39ed6130 Qt: Update Base Translation 2023-07-27 12:50:26 +10:00
lightningterror
a47563b12f GSRunner: Fixes runner compile.
Pad include from previous refactor.
2023-07-26 21:56:56 +02:00
refractionpcsx2
84491ff655 GS/HW: Modify Burnout IO CRC hack to not affect online mode screen 2023-07-26 20:23:37 +01:00
refractionpcsx2
e5991a4379 GameDB: Add Partial Target Invalidation to Racing Simulation 3 2023-07-26 16:07:57 +01:00
JordanTheToaster
0b3d4615b8 ImGuiOverlays: Fix missing space
Text gets bunched up otherwise with no space.
2023-07-26 14:38:18 +01:00
JordanTheToaster
a8f6336b47 GameDB: Various fixes
Fixes for flickering lights in Area 51 and missing fixes for Burnout Revenge and Dominator.
2023-07-26 14:38:18 +01:00
RedPanda4552
0b33df3341 Pad: Change button query response depending on current mode
Fixes CoD 3 not understanding which buttons the controller has available
2023-07-26 21:23:21 +10:00
kamfretoz
744cc4b705 Qt: Add an instruction to the autoupdater pop up. 2023-07-26 15:03:11 +10:00
kamfretoz
9d3cd5784f Qt: Further icon refinement and additions 2023-07-26 13:28:23 +10:00
Stenzek
06ea58198a GameDB: Use nearest dirty upload for Burnout 3 and Onimusha 3
Burnout 3: Fixes sun banding in some stages.
Onimusha 3: Fixes vertical line down screen.
2023-07-26 13:21:35 +10:00
Stenzek
3692d7d090 GS/HW: Extend bilinear dirty upscale fix to force nearest 2023-07-26 13:21:35 +10:00
Stenzek
460a2dbbd3 Qt: Add custom binding widget for GunCon2 2023-07-26 13:20:44 +10:00
Stenzek
228f4f1010 USB-GunCon2: Support binding to controller 2023-07-26 13:20:44 +10:00
Stenzek
2703b91e41 USB: Add ConfigKeyExists() 2023-07-26 13:20:44 +10:00
Stenzek
24171787f8 ImGuiManager: Add software cursor support
Can be used to render a crosshair for GunCon.
2023-07-26 13:20:44 +10:00
PCSX2 Bot
49d3338d4a Qt: Update Base Translation 2023-07-26 13:19:37 +10:00
Stenzek
a9d693e1c3 GS/HW: Improve readback-avoiding CLUT heuristics
Use target overlap instead of exact match.
2023-07-26 13:18:04 +10:00
Stenzek
4ef69248d0 GSRunner: Add readbacks to stats 2023-07-26 13:18:04 +10:00
Stenzek
247b3ed740 GS/HW: HLE the Burnout games bloom effect 2023-07-26 13:18:04 +10:00
Stenzek
1edca6235c Sio: Migrate to StateWrapper
Also fixes the crash due to serializing pointers.

[SAVEVERSION+] and actually bump the save version.
2023-07-26 01:22:11 +01:00
Connor McLaughlin
ab5c03b1d9 Pad: Fixes and cleanup (#9623)
* Pad: Get rid of redundant object lookup

* Pad: Serialize 'stage' state

[SAVEVERSION+]

* Pad: Reduce Freeze duplication and add markers

Catch any possible unhandled device type change.

[SAVEVERSION+]

* Pad: Localize controller type names

* Pad: Handle mismatch between state and current config

* Misc: Drop .at() from vector/array access

We don't use exceptions.

* Pad: Remove redundant GetUnifiedSlot()

Sio has routines for converting these.

* Sio2: Remove redundant optional in Pad()

* Pad: Constify and finalize controller classes

* Pad: Move PadManager to Pad namespace

No point having a class when there's only a single instance.

* Pad: Move PadConfig to Pad namespace

* Pad: Move PadMacros to Pad namespace

* Pad: Re-localize controller bindings/settings

* Pad: Make controller info local

Don't want to create duplicates.

* Pad: Use span for ControllerInfo settings/bindings

* Pad: Fix auto-toggled macro buttons

* Pad: Fix pressure for macros

* Pad: Merge PadConfig/PadManager/PadMacros

Faster compile time.

* Pad: Fix incorrect condition in Sio0::SetTxData()

* Pad: Add deadzone for macro triggers
2023-07-26 01:10:02 +10:00
TheLastRar
d4cb35469d DEV9: Perform a null check on ifa_addr when searching adapters 2023-07-25 13:23:01 +01:00
Stenzek
fd1b1d0c24 GS/HW: Improve Basic blending
- Don't assume no overlap = free. Reduces a number of barriers.
 - Prefer SW blend for Ad blends, except when it's constant. It's
   impossible to emulate accurately in HW, because 128 is 1, not 255.
 - Prefer SW blend for AFIX > 128 on no-overlap sprites.
2023-07-25 13:04:45 +10:00
Stenzek
bf96ceeacc GS/HW: Assume primitive does not overlap if it is a single quad
Enables one-barrier software blending for fullscreen quads.
We can also use tex-is-fb safely in these scenarios too.

Fixes Persona 4 menu background, Hard Hitter Tennis shadows at
Basic blending.
2023-07-25 13:04:45 +10:00
RedPanda4552
2c08b385e5 Pad: Revert back to old Constant 1 behavior
Fixes pad detection in NBA 2K7, possibly others.
2023-07-25 00:27:53 +01:00
JordanTheToaster
051d13ec7a GameDB: Various fixes
Adds missing fixes and game entry's for guitar hero and re fixes LOTR Third Age.
2023-07-24 23:18:30 +01:00
refractionpcsx2
a2a9643123 GameDB: Move Haunting Ground over to HPO Special + Round Sprite Half 2023-07-24 21:44:24 +01:00
refractionpcsx2
1286bfe75b UI/UX: Added popup when updating if savestate version changes 2023-07-24 19:42:36 +01:00
RedPanda4552
1f74f82796 [SAVEVERSION+] Reimplement PAD system
Force pushed because git hates me

[SAVEVERSION+] Bump savestate version

CI: Update locations of pad/memcard sources

Discard leftover old PAD code

Fix additional merge oddities

Add translations for OSD messages

Copyright headers

Version bump

Fix a whole boatload of concurrency problems from file moves and other miscellaneous update problems

Partial redo of PS1 pad support

Fix incorrect mode due to analog behavior at startup

Mostly reimplement SIO0 memory card logic

Still needs pocketstation

Use new runtime wrapped translate function

Dead code

Fix multiple port/slot/presence issues for PS1

Save State version bump

Clean up some duplicate/unused headers

More header consistency

Remove old stray files

Fix incorrect return

Fix uninitialized array

Add missing overrides

Switch to init/close model used by other subsystems

Remove old input recording references

Rename SIO globals

Rename SIO2 FIFO globals

Remove commented SIO0 code for illegal write

Add guitar icon
2023-07-24 16:41:17 +01:00
Stenzek
876b576679 CI: Pin flat-manager-client version 2023-07-24 21:26:41 +10:00
Stenzek
c927e4785b GS/HW: Get rid of 2 frame forced preload 2023-07-24 18:31:07 +10:00
refractionpcsx2
97672828e8 GameDB: Add patch for Shadow Hearts NTSC-U bad clip arrangement 2023-07-24 09:01:44 +01:00
refractionpcsx2
b96978494b GS/HW: Fix Double Half Clear bug + better detect double buffer changes 2023-07-23 19:40:14 +01:00
Stenzek
2f105cbe15 VMManager: Display title as serial or ELF 2023-07-23 19:09:41 +01:00
Stenzek
2539a07b7d Qt: Add dump verification to game properties 2023-07-23 19:09:31 +01:00
Stenzek
73f903f402 GameDatabase: Add hash database parse/lookup 2023-07-23 19:09:31 +01:00
Stenzek
94c48a4c2d CDVD: Add IsoHasher 2023-07-23 19:09:31 +01:00
Stenzek
eb8d938c94 Resources: Add redump database 2023-07-23 19:09:31 +01:00
CRASHARKI
92b8316182 GameDB: Add nativePaletteDraw and halfPixelOffset to Crash Tag Team Racing 2023-07-23 19:09:15 +01:00
Stenzek
610cb2626b GS/HW: Use GetUnwrappedEndBlockAddress() where appropriate 2023-07-23 19:09:01 +01:00
Stenzek
2033f813da GS/HW: Fix incorrect usage of bit_ceil() 2023-07-23 19:09:01 +01:00
pgert
a6fbd0fe69 GameDB: correct an entry 2023-07-23 19:00:55 +01:00
Stenzek
abadb7f80f GSRunner: Fix Unicode command line on Win32 2023-07-24 00:55:54 +10:00
JordanTheToaster
1c6be3f400 GameDB: Various fixes
Fixes for Link being a doughnut and missing a line and for crusty field textures in all NCAA Football games TW PGA golf games and Madden games.
2023-07-23 13:28:40 +01:00
CRASHARKI
52111be20a GameDB: Change halfPixelOffset to Spyro: A Hero's Tail 2023-07-23 13:27:51 +01:00
Stenzek
eae29bb1f2 Common: Make __pagesize unsigned 2023-07-23 21:52:36 +10:00
Stenzek
9191e8ce91 Misc: Use std::bit_ceil()/std::has_single_bit() 2023-07-23 21:52:36 +10:00
Stenzek
2b4c7d12b6 Common: Merge MathUtils.h into BitUtils.h 2023-07-23 21:52:36 +10:00
Stenzek
7dd1f7321a Misc: Replace _BitScanForward() with std::countr_zero() 2023-07-23 21:52:36 +10:00
Stenzek
088630a999 Misc: Replace bit_cast wrapper with std::bit_cast 2023-07-23 21:52:36 +10:00
Stenzek
d2a5cdcca7 Misc: Remove string map lookup wrappers
No longer needed.
2023-07-23 21:52:36 +10:00
Stenzek
4b50d016b5 CI: Add qtimageformats for Linux/Mac 2023-07-23 17:34:50 +10:00
PCSX2 Bot
7a073e0e8d Qt: Update Base Translation 2023-07-23 13:41:25 +10:00
Stenzek
b56958abe4 USB-Turntable: Implement Freeze() 2023-07-23 13:41:00 +10:00
CRASHARKI
57d042ca4a GameDB: Add Blending Accuracy to Spyro: Enter the Dragonfly
Added Blending Accuracy 3 to fix Gems not shining properly.

Revert "GameDB: Add Blending Accuracy to Spyro: Enter the Dragonfly"

This reverts commit d2b8017e59cfbb99beee8cb7f912b327c5ffaf9e.

GameDB: Add Blending Accuracy to Spyro: Enter the Dragonfly
2023-07-23 00:34:28 +01:00
Riley
3895f3c826 CDVD: Fix DevCon typo for cdvdUncheckedLoadDiscElf 2023-07-23 00:04:54 +01:00
Mrlinkwii
75aed7c44f GameDB: Adding Cop 2 patches for French & German versions of Kessen II
Co-Authored-By: prafullpcsx2 <12788199+prafullpcsx2@users.noreply.github.com>
2023-07-22 16:46:34 +01:00
Stenzek
041c0ce86c CI/Linux: Include AppStream XML in AppImage 2023-07-22 18:47:47 +10:00
Stenzek
90aabdf499 CI/Linux: Fix AppImage getting symbols stripped 2023-07-22 18:47:47 +10:00
Stenzek
40f7ec3ca1 GS/HW: Fix alpha min/max crashing on BC1 textures 2023-07-22 17:15:27 +10:00
TellowKrinkle
1e32fcaebe GS:Capture: Prefer h264 as the default codec
FFmpeg's default is mpeg4 for a number of containers if it was compiled without x264
2023-07-22 00:40:24 -05:00
TellowKrinkle
9f23755a62 GS:Capture: Support user pixel format overrides 2023-07-22 00:40:24 -05:00
TellowKrinkle
dad03478fd GS:Capture: Fix s16 audio output 2023-07-22 00:40:24 -05:00
TellowKrinkle
484b75f755 GHActions:MacOS: Bundle a minimal ffmpeg 2023-07-22 00:40:24 -05:00
TellowKrinkle
7138faa5cd CMake: Support linked ffmpeg on macOS 2023-07-22 00:40:24 -05:00
TellowKrinkle
fef1706fc8 GS: Add mov capture option 2023-07-22 00:40:24 -05:00
Stenzek
1929b20a6c GSRunner: Add modal comparison
Click on a dump to open.
Left/right arrow keys switch between dumps.
Space bar toggles between before/after.
Escape closes.
2023-07-22 05:15:21 +01:00
Stenzek
3991ff5d3a GSRunner: Fix incorrect total/average counters 2023-07-22 05:15:21 +01:00
PCSX2 Bot
e4b1c89719 Qt: Update Base Translation 2023-07-22 12:12:28 +10:00
Stenzek
3d51eec89c VMManager: Notify MTGS in UpdateDiscDetails() 2023-07-21 18:05:14 +01:00
lightningterror
f9016f3ea7 vcxproj: Add missing shader filters.
All renderers: present and imgui.
Vulkan: shadeboost.
2023-07-21 10:24:15 +02:00
lightningterror
3dce969a5e GS-shaders: Add missing copyright headers. 2023-07-21 10:24:15 +02:00
PCSX2 Bot
542d257b8f Qt: Update Base Translation 2023-07-21 12:58:34 +10:00
Stenzek
2eb7c47572 Qt: Fix game properties for unscanned files 2023-07-21 12:57:25 +10:00
Stenzek
32621a9369 3rdparty: Update wil
Gets rid of a -Wdeprecated-volatile error.
2023-07-20 21:23:31 +10:00
Stenzek
7676a74f73 HeterogeneousContainers: Drop pre-C++20 path 2023-07-20 21:23:31 +10:00
Stenzek
1fae35231b 3rdparty: Remove GSL 2023-07-20 21:23:31 +10:00
Stenzek
cd4daa115f Misc: Swap from gsl::span to std::span 2023-07-20 21:23:31 +10:00
Stenzek
ad0190d6ed Build: Require C++20 2023-07-20 21:23:31 +10:00
Stenzek
296dcccd81 Misc: Fix a bunch of issues preventing C++20 compilation 2023-07-20 21:23:31 +10:00
TellowKrinkle
7ba7e04a13 Qt: Stop open/save dialogs from spamming users with permission requests 2023-07-20 19:58:45 +10:00
Stenzek
3109c5ef67 GS/HW: Replace Ico CRC hack with move handler 2023-07-20 19:56:20 +10:00
Stenzek
d5776e8946 GSRunner: Dump/compare stats 2023-07-20 19:24:36 +10:00
Tyler Wilding
c59ea602c5 crowdin: update PR title 2023-07-20 18:47:33 +10:00
JordanTheToaster
16bebbea50 GameDB: Various fixes
Many fixes.
2023-07-20 18:44:45 +10:00
Stenzek
0e21b6da3d GS/HW: Add PSM logging to ClearGSLocalMemory() 2023-07-20 18:42:51 +10:00
Stenzek
b3403c40e1 GS/HW: Stop Vulkan validation layer complaining on download 2023-07-20 18:42:51 +10:00
Stenzek
863e8bb290 GS/Vulkan: Fix crash when startup fails 2023-07-20 18:42:51 +10:00
Stenzek
1a16a527b3 GS: Hardware reset on load state
Stops unnecessary readbacks.
2023-07-20 18:42:51 +10:00
Stenzek
c72329d990 GameDB: Recommend High blending for Eragon 2023-07-20 18:40:16 +10:00
Stenzek
dffeb2b5dd GS/HW: Support alpha in RT concurrently with Z
Also further improve double half clear detection, and handling of
horizontal page clears.

Fixes lens flare and DoF in True Crime: NYC.
Fixes reflections in Eragon.
Fixes floor in Area 51.
Fixes flickering in Transformers.
Fixes text in Katamari Damashii.
2023-07-20 18:40:16 +10:00
charlesthobe
fef06a1544 Flatpak: Add project links to the flathub store page 2023-07-20 18:34:47 +10:00
Tyler Wilding
7d9ad6daab ci: only fetch tags for releases 2023-07-20 08:38:05 +01:00
Tyler Wilding
822b166753 ci: one workflow to fix caching issue and simplify releases 2023-07-20 08:38:05 +01:00
PCSX2 Bot
8fad768d39 Qt: Update Base Translation 2023-07-20 12:27:09 +10:00
TellowKrinkle
d46b8390f1 Qt:Mac: Add Qt mac application menu strings
The official Qt translations don't match the rest of macOS for some reason
2023-07-19 13:46:40 +10:00
TellowKrinkle
4262715590 Qt:Mac: Add CJK font paths 2023-07-19 13:46:40 +10:00
TellowKrinkle
9818446c7d Qt: Default to system language 2023-07-19 13:46:40 +10:00
TellowKrinkle
22682e4150 Qt:Mac: Add CFBundleLocalizations tag 2023-07-19 13:46:40 +10:00
TellowKrinkle
1d63779b7d Qt:Mac: Enable translations 2023-07-19 13:46:40 +10:00
Silent
c82f800794 FileSystem: Use _filelengthi64 to get the file size on Windows 2023-07-19 13:45:46 +10:00
lightningterror
d96dea49bf R3000A: Fix Wsign-compare warning. 2023-07-19 03:03:44 +02:00
lightningterror
c574c3e08c GS-vk: Fix Wunused-variable warning. 2023-07-19 03:03:44 +02:00
lightningterror
e7e6f765b5 GS-hw: Fix Wreorder-ctor warnings. 2023-07-19 03:03:44 +02:00
Silent
240586875c FileSystem: Make FILE* unique pointers use a functor deleter 2023-07-18 17:24:34 +01:00
PCSX2 Bot
d6c5903569 PAD: Update to latest controller database. 2023-07-17 23:13:37 +02:00
JordanTheToaster
55da5cc397 GameDB: Lego Drome Racers blackscreen fix
Fixes lego drome racers having a black screen in hardware mode.
2023-07-17 19:56:32 +01:00
Connor McLaughlin
943359e328 CI: Fix incorrect commit message in base translation update 2023-07-17 23:31:02 +10:00
PCSX2 Bot
92c54cc1f8 PAD: Update Base Translation 2023-07-17 23:28:02 +10:00
Stenzek
6ec0b44487 CI: Add daily base translation update 2023-07-17 23:24:37 +10:00
charlesthobe
85d2ca626f Common: Linux: fix potentially unsafe screensaver inhibitor 2023-07-17 20:11:32 +10:00
solid1353
68865a2bca Debugger/MemorySearch: search for byte array instead of converting byte array to string 2023-07-17 19:29:39 +10:00
solid1353
8362e6f435 Debugger Memory Search: add Array of byte type 2023-07-17 19:29:39 +10:00
JordanTheToaster
3804a58729 GameDB: Naruto Ultimate Ninja Fixes
Fixes for spikey SPS on characters with VU1 clamp extra plus sign.
2023-07-17 19:19:37 +10:00
TellowKrinkle
fbb67a6ee9 Qt:Translation: Remove mnemonics from toolbar strings
They're not useful, and may make translators think they need to add extra characters in parentheses for the mnemonics to be placed on
2023-07-17 19:17:53 +10:00
TellowKrinkle
19d8b59ca7 FSUI: Switch Secondary Light/Dark colors with Strong/Weak
Strong has higher than contrast against the background than the base color (lighter on dark theme, darker on light theme), weak is the opposite.
Previously the light color increased contrast in dark themes, but descreased contrast in light themes, which meant it wasn't suitable for the same things in the respective themes
2023-07-16 22:59:16 -05:00
TellowKrinkle
7ca726492f FSUI: Remove PushSecondaryColor
It's not being used, and this way I can rename some colors to better describe our usage of them
2023-07-16 22:59:16 -05:00
TellowKrinkle
96a43ca254 GS:MTL: Don't dispatch 0-element imgui draws
Metal validation doesn't like them
2023-07-16 22:59:16 -05:00
TellowKrinkle
bf34eb32ed FSUI: Fix background colors in light mode 2023-07-16 22:59:16 -05:00
TellowKrinkle
433612cde0 Qt:Mac: Make sure settings windows are raised when requested 2023-07-16 22:12:13 -05:00
lightningterror
807db91140 GS: Bump shader cache version. 2023-07-16 12:45:42 +02:00
lightningterror
7791809224 GS-metal: Fix initialization shader warnings. 2023-07-16 12:45:42 +02:00
lightningterror
9b3d31cd47 GS-vk: Fix initialization shader warnings. 2023-07-16 12:45:42 +02:00
lightningterror
65a3a97ab2 GS-d3d: Fix initialization shader warnings. 2023-07-16 12:45:42 +02:00
lightningterror
e3593574b0 GS-ogl: Fix initialization shader warnings. 2023-07-16 12:45:42 +02:00
refractionpcsx2
f81d391546 GS/HW: Use draw for valid height, preload cached size 2023-07-15 23:09:35 +01:00
JordanTheToaster
bd3b00793a GameDB: Various fixes
Fixes for missing sun in Ford Racing 2 and vertical lines in Digi World Collaboration SP.
2023-07-15 21:26:12 +01:00
kamfretoz
757a72fb57 Qt: More icon treatments 2023-07-15 20:46:19 +10:00
kamfretoz
fbbec480af Qt: Add a reminder to New Input Profile dialog 2023-07-15 20:46:19 +10:00
Stenzek
ba3b43c66c Qt: Show cheats/patches for all CRCs in game properties
Not just the primary/disc ELF.

Also get rid of duplicates from the list.
2023-07-15 12:08:53 +10:00
refractionpcsx2
e040b83b2c GS: Fix debug builds 2023-07-15 00:48:33 +01:00
refractionpcsx2
76f4a5b2fe UI: Add controller binding tooltips for additional controls 2023-07-14 13:48:24 +01:00
TellowKrinkle
4f4b9956b3 GS: Reduce cutoff for primid destination alpha 2023-07-14 13:44:08 +02:00
TellowKrinkle
ba37a0f3a9 GS:MTL: Allow disabling fbfetch
For testing and stuff
2023-07-14 13:44:08 +02:00
Ali
d4acb95d7c Flatpak: Add the talk-name flag for org.freedesktop.Screensaver
This brings the functionality in line with the old Flatpak release. This allows PCSX2 to inhibit the screensaver or screen blanking without needing to touch the mouse/keyboard while the VM is running.
2023-07-14 14:53:05 +10:00
Stenzek
2887baefb8 GS/DX12: Combine GSDevice12 and D3D12Context 2023-07-14 12:21:51 +10:00
Stenzek
9678bf1e2f GS/Vulkan: Combine GSDeviceVK and VKContext
Less indirection.
2023-07-14 12:21:51 +10:00
Stenzek
e2fc68ff2d GS/Vulkan: Use VK_EXT_attachment_feedback_loop_layout when supported 2023-07-13 22:35:34 +10:00
refractionpcsx2
4a7b641bc3 GameDB: Add HPO Special for LEGO Batman 2023-07-12 10:28:28 +01:00
refractionpcsx2
719b83bf42 GS: Only clamp tex coords to bounds in hardware. 2023-07-12 10:18:16 +01:00
Goatman13
f201a2e5dd GameDB: Fix patch for Michigan: Report from Hell 2023-07-11 20:09:29 +01:00
refractionpcsx2
fd6f47f5ca GS/HW: Tempfix alignment problem with texture replacements 2023-07-11 16:07:45 +01:00
Stenzek
8524fbbaf9 GS/HW: Decompress replacement textures to get alpha min/max 2023-07-11 13:30:47 +01:00
Stenzek
a371c5b7d0 GS/HW: Calculate alpha values for sources 2023-07-11 02:01:57 +01:00
refractionpcsx2
ef7ce4dfc8 GS/HW: Don't use DATE_one when alpha 128 (1.0) is masked 2023-07-11 02:01:57 +01:00
refractionpcsx2
189f6fa2a3 GS/HW: Calculate target alpha min/max 2023-07-11 02:01:57 +01:00
refractionpcsx2
472f4922bd GS/HW: Improve double half clear for strange strip drawing 2023-07-11 02:01:35 +01:00
Sestain
8ba2f342df OSD: Input recording overlap fixed (#9211) 2023-07-11 02:01:17 +01:00
JordanTheToaster
5d6b9d25bd Readme: Update OS requirements
Updates OS requirements to be in line with what we currently support and or the latest Windows in support at the time.
2023-07-10 18:19:02 +01:00
JordanTheToaster
1231499aaa GameDB: Various fixes
A lot of missing demo serials and some name fixes that bugged me.
2023-07-10 18:19:02 +01:00
Stenzek
9c4788432d GS/HW: Avoid tex-is-fb when incompatible clamp is used 2023-07-10 22:19:47 +10:00
lightningterror
4ded2caa0b GS-ogl: Comment out intel vendor set. (#9203)
Fixes Wunused-but-set-variable warning.
2023-07-10 07:30:15 +02:00
Stenzek
494afb9d43 Linux/CI: Switch to Ubuntu 22.04 and linuxdeploy 2023-07-10 14:16:41 +10:00
refractionpcsx2
c994e4828d Build: Restore old filenames temporarily 2023-07-09 23:18:43 +01:00
refractionpcsx2
e50f12a925 Updater: Make it not care about the Qt extension 2023-07-09 23:18:43 +01:00
refractionpcsx2
df75d70df4 VIF: Add missing internal DMA stall flag 2023-07-09 22:03:23 +01:00
Stenzek
c5aa04d4eb CI: Remove redundant GUI variables
And adjust release filenames.
2023-07-09 21:14:23 +01:00
Blackbird88
81ae1ce362 GameDB: NFS UG1 Blending 2023-07-09 17:10:24 +01:00
JordanTheToaster
e1921e660d GameDB: Various fixes
Fixes for Fifa Street 2 corrupted graphics and Onimusha Warlords.
2023-07-09 16:04:30 +01:00
KrossX
32aa24f6fd GS: Add fancy downsampling shaders. 2023-07-09 14:04:06 +01:00
refractionpcsx2
7fbc63b8e8 EE/IOP Sync: Optimize EE/IOP sync for more intelligent syncing 2023-07-09 13:53:00 +01:00
refractionpcsx2
443adcdd5b EE/IOP Sync: Calculate IOP interrupt delta after running IOP 2023-07-09 13:53:00 +01:00
refractionpcsx2
05b064d513 IOP/Counters: Fix off by 1 error 2023-07-09 13:53:00 +01:00
refractionpcsx2
b327033333 Counters: Process overflow before Target in case of Target = 0 2023-07-09 13:53:00 +01:00
refractionpcsx2
36c9b68b6c EE/Counters: Update HBlank before recalculating Next Event 2023-07-09 13:53:00 +01:00
refractionpcsx2
7d8d16091e EE/DMA: Try to avoid very small DMA loops 2023-07-09 13:53:00 +01:00
refractionpcsx2
c1c6bde429 Counters: Only schedule an EE interruption if they interrupt 2023-07-09 13:53:00 +01:00
Stenzek
8f0901e7a5 VMManager: Flag BIOS missing error for translation 2023-07-09 21:52:02 +10:00
Stenzek
6edba3820b GameList: Don't repeatedly scan invalid files every startup 2023-07-09 21:52:02 +10:00
Stenzek
db1e1bcc1f CDVD: Rewrite ISO parser 2023-07-09 21:52:02 +10:00
Stenzek
51aeaeb508 CDVD: Ignore version information when loading ELF 2023-07-09 21:52:02 +10:00
Stenzek
dcd0a1f002 GS/HW: Add render fix for complex moves
And use it to fix Growlanser.
2023-07-09 17:42:21 +10:00
Stenzek
819b61937f GS: Slim down GSState.h includes 2023-07-09 15:34:59 +10:00
Stenzek
9da7628083 GS: Move PCRTC function definitions to GSState.cpp 2023-07-09 15:34:59 +10:00
Ziemas
c5f47a8db3 mipsanalyst: sign extend 32 bit regs 2023-07-08 18:51:36 +01:00
Stenzek
c2786b91ce GS/OGL: Fix sampling from cleared targets
And merge GLLoader into GSDeviceOGL while we're at it.
2023-07-09 00:46:52 +10:00
Stenzek
4290c16997 GS/DX11: Fix sampling from cleared targets 2023-07-09 00:46:52 +10:00
Stenzek
475e90b654 GS/HW: Don't invalidate buffers on partial clear 2023-07-09 00:45:16 +10:00
Stenzek
ebb291e06d GS/DX12: Fix targets getting stuck undirtied 2023-07-08 14:33:21 +10:00
Stenzek
a2c9069dda GameDB: Add eeCycleRate option
For those pesky games with cache/DMA issues only!
2023-07-08 14:28:30 +10:00
Stenzek
48cfe9ca73 Config: Make SpeedHack a scoped enum
And get rid of the redundant "SpeedHack" suffix on all values.
2023-07-08 14:28:30 +10:00
Stenzek
b53e9856b8 USB/usb-mic: Fix buffer handling
- RingBuffer would store a size of zero if you wrote the entire
   the entire buffer in one call.

 - ResetBuffers() should be called before starting the stream,
   otherwise you risk a race where the callback happens before
   the buffer is allocated.

 - Fix incorrect latency being passed into Cubeb.
2023-07-08 14:27:51 +10:00
Stenzek
20420da326 Input/SDL: Don't pass stdio handle to SDL
Apparently on cmake, SDL isn't compiled with stdio support...
2023-07-08 14:21:02 +10:00
bitiutsm
9162f176a2 GameDB: Fix names 2023-07-07 20:32:36 +01:00
JordanTheToaster
3c140c2ef4 GameDB: NFS U2 Name fix
Quick fix for an incorrect name for NFS U2
2023-07-07 14:10:17 +01:00
JordanTheToaster
511d37e7c3 GameDB: X Squad Fixes
Fixes for crusty textures by using Full mipmapping and trilinear filtering.
2023-07-07 12:55:50 +01:00
Stenzek
10a5ea2a29 3rdparty/SDL2: Bump to v2.28.1 2023-07-07 21:06:53 +10:00
Stenzek
c049f6814b Input/SDL: Load controller DB after init
Tries to lock a non-existant mutex on Windows otherwise.
2023-07-07 21:06:53 +10:00
Sanjay Govind
0716abdbf8 USB: Fix DJ Hero Turntable Labels 2023-07-07 17:25:46 +10:00
Stenzek
989f2bbbb0 GameDB: Enable preload frame for Rocky Legends 2023-07-07 12:35:19 +10:00
Stenzek
45c564749c GS/HW: Improve striped double clear detection
Co-authored-by: refractionpcsx2 <refraction@gmail.com>
2023-07-07 12:35:19 +10:00
Stenzek
a62737b244 GS/HW: Be more strict with double half clear detection
And less strict with letting depth mem clears go through.
2023-07-07 12:35:19 +10:00
Stenzek
1fa3111e67 Qt: Sync video capture state 2023-07-07 12:34:58 +10:00
Stenzek
0e78f3f3bc GS: Improve capture robustness
Automatically restart capture on renderer or hardware reset.
2023-07-07 12:34:58 +10:00
Berylskid
6bf07086a0 GameDB: Various fixes for Armored Core games 2023-07-07 01:41:18 +01:00
JordanTheToaster
b3f8f4e8ec GameDB: Some fixes
Fixes for Redump lying to me and for a black screen in Giant Robot The Animation.
2023-07-07 00:58:16 +01:00
lightningterror
65ee7e82aa gitignore: Remove no longer used files.
wx era.
2023-07-06 13:16:49 +02:00
lightningterror
c78f3b4e24 Savestate: Fix Wsign-compare warning. 2023-07-06 12:58:48 +02:00
lightningterror
51aa7c8ecf GS-hw: Fix warnings.
Wunused-variable,
Wunused-lambda-capture.
2023-07-06 12:58:48 +02:00
Stenzek
64ab92ced6 Qt: Update base translation 2023-07-06 12:30:35 +10:00
Stenzek
8f9f351940 Qt: Don't allow creation of memory cards with invalid names 2023-07-06 12:30:35 +10:00
Stenzek
a9a1af7307 FileSystem: Add IsValidFileName()
And associated tests.
2023-07-06 12:30:35 +10:00
Stenzek
5057dfedba Qt: Rename CreateMemoryCardDialog to MemoryCardCreateDialog
Consistency.
2023-07-06 12:30:35 +10:00
Stenzek
ecabadbf95 CMake: Use FindWayland from ECM
Fixes previously-broken FindWayland.cmake which had local modifications
that prevented PCSX2 from being compiled on OpenSUSE.
2023-07-06 12:30:05 +10:00
Stenzek
97630039d8 CMake: Bump minimum version to 3.16
Required for ECM FindWayland.
2023-07-06 12:30:05 +10:00
forrvalhalla
e7f1178469 GameDB: Various fixes
GameDB: Various fixes
2023-07-06 00:42:08 +01:00
Stenzek
87245ef978 GameDB: Add auto flush for Okage 2023-07-05 12:19:58 +10:00
Stenzek
455aa28724 GS/HW: Use minimum UV as a channel shuffle heuristic
Used by Ape Escape 2, Everybody's Tennis/Golf, Okage, and Valkyrie
Profile 2.
2023-07-05 12:19:58 +10:00
JordanTheToaster
92f70228c9 GameDB: Various fixes 2023-07-04 11:56:04 +01:00
Stenzek
5fa862b346 GS: Fix uninitialized data in deinterlacing 2023-07-04 19:45:48 +10:00
Stenzek
d5c6c318ba GS: Move VSync flush to caller 2023-07-04 19:45:33 +10:00
refractionpcsx2
02133a0290 GS/HW: Missed a Div 0 in previous push. 2023-07-04 10:32:38 +01:00
refractionpcsx2
92b6c1c08d GS/HW: avoid divide by zero's in draw rect calculations 2023-07-04 10:26:38 +01:00
Stenzek
08649b7aa8 GS/Vulkan: Work around NVIDIA driver clear issue
NVIDIA drivers appear to return random garbage when sampling the
RT via a feedback loop, if the load op for the render pass is CLEAR.
Using vkCmdClearAttachments() doesn't work, so we have to clear the
image instead.

I'm not sure if this is a spec violation, or what we're doing just
happens to be undefined. Given attachment clear doesn't work, I'm
inclined to go with the former.
2023-07-04 18:53:11 +10:00
Stenzek
9e19ef0d03 GS/DX12: Fix initial state of expand index buffer 2023-07-04 18:53:11 +10:00
Stenzek
33af3392aa GS: Move clear functions to base GSDevice class 2023-07-04 18:53:11 +10:00
Stenzek
e5a5cf0ef0 GS/Vulkan: Fix merging non-black cleared target 2023-07-04 18:53:11 +10:00
Stenzek
c1ca3888ec GS/HW: Handle more edge cases in double-half clears
Fixes Siren, God of War 2.
2023-07-04 17:33:17 +10:00
Stenzek
1b76bf59a1 GS/HW: Improve accuracy of PrimitiveCoversWithoutGaps() 2023-07-04 17:33:17 +10:00
Stenzek
699c6bf13d GS/HW: Detect one-page-offset RT+Z clear
Gran Turismo 4 Online uses it.
2023-07-03 00:52:33 +01:00
RedDevilus
d9dbf2c5e9 Qt: Add Polish flag
Polish were neglected, that ends now. Flag will be used when it sees a Polish entry in the gamelist.

Fixes https://github.com/PCSX2/pcsx2/issues/9137

Bumps the gamelist cache version from 32 to 33
Adds to enumeration
And make it visible in both gamelist and per-game summary view

Update GameList.cpp
2023-07-02 21:14:40 +01:00
RedDevilus
c22f794a20 Qt: Fix wrongly labeled strings Translations
Bahasa Indonesia and Norsk were wrongly labeled, also marked English as the Default language.
2023-07-02 21:15:59 +10:00
Stenzek
972135e184 GS/Vulkan: Use attachment clear for clears when inside render pass 2023-07-02 13:00:16 +10:00
Stenzek
96fad124ac GS/HW: Improve detection of clears
- Detect "normal" target clears and HLE accordingly
 - Rewrite double-half clears to mask Z or FRAME, reducing false target creation.
 - Handle split single-page-wide clears, and attempt to get a real FBW.
 - Propogate clear values between targets, instead of blitting.
2023-07-02 13:00:16 +10:00
Stenzek
ce7c466041 GS/HW: Fix mem clear when width != fbw 2023-07-02 13:00:16 +10:00
Berylskid
db0c7ca907 GameDB: Various fixes for Armored Core games
- Remove unnecessary CPU Sprite Render Size
- Add HPO Normal for fixing blur
2023-07-01 20:57:33 +01:00
Mrlinkwii
9f62ecdb33 GameDB: add more missing demos 2023-07-01 20:56:18 +01:00
Sanjay Govind
f91f257a7d USB: Add DJ hero turntable emulation 2023-07-01 20:42:48 +10:00
Bartłomiej Piotrowski
28a197b8cd flatpak: Fix the location of mirrored screenshots 2023-07-01 19:55:00 +10:00
Stenzek
9d2d8c0713 CI/Linux: Hopefully fix Flathub release versioning 2023-07-01 14:17:29 +10:00
Stenzek
b431f1dc0d Qt: Update base translation 2023-07-01 14:17:29 +10:00
Stenzek
67eb2975f6 Qt: Make achievements login dialog resizeable 2023-07-01 14:17:29 +10:00
Stenzek
4192de7dac USB: Fix some default strings not being translatable 2023-07-01 14:17:29 +10:00
Stenzek
82cecc89e2 Qt: Fix dropdowns in DEV9 not translating 2023-07-01 14:17:29 +10:00
Stenzek
113e264617 Qt: Fix theme names not being translatable 2023-07-01 14:17:29 +10:00
Stenzek
a705a69022 Qt: Make memory card convert dialog translatable 2023-07-01 14:17:29 +10:00
Stenzek
d757360f4e Qt: Remove some unused Form strings 2023-07-01 14:17:29 +10:00
Stenzek
cc978daeef Qt: Disambiguate toolbar and menu bar items 2023-07-01 14:17:29 +10:00
lightningterror
d38ad1df94 GS-hw: Change some blend operations in hw blend table.
Change the operations for Cs in table to CONST_ZERO as we want it to be 0.
2023-06-30 20:10:12 +02:00
refractionpcsx2
1fd7bcf9a9 GS: Update draw number on combined EE transfers 2023-06-30 16:31:12 +01:00
refractionpcsx2
06abb70624 GS/HW: Don't use unsigned values when calculating rect 2023-06-30 16:31:12 +01:00
Stenzek
78e20868df GS/OpenGL: Fix potentially-incorrect line width 2023-06-30 23:06:51 +10:00
Stenzek
e52766d047 Misc: Fix a few warnings 2023-06-30 21:37:44 +10:00
Stenzek
224460e62d CMake: Remove no-builtin-*cmp, fpmath=sse
The former was for a gcc bug which was long fixed (and we don't use gcc).
The latter is irrelevant with 64-bit builds.
2023-06-30 21:37:44 +10:00
Stenzek
3c408de5c9 Build: Disable exceptions in the compiler 2023-06-30 21:37:44 +10:00
Stenzek
ea803ff2d4 Build: Always use bundled soundtouch
Because we're disabling exceptions in it.

Might gain a bit of speed by -Ofast as well.
2023-06-30 21:37:44 +10:00
Stenzek
14a0786982 3rdparty/soundtouch: Add missing overrides 2023-06-30 21:37:44 +10:00
Stenzek
1dbccb5e3d 3rdparty: Remove exception usage 2023-06-30 21:37:44 +10:00
Stenzek
adca796d94 Common: Remove SafeArray
And replace with std::vector.
2023-06-30 21:37:44 +10:00
Stenzek
732aa96656 Common: Remove AlignedBuffer
And replace its one use site (texture dumping).
2023-06-30 21:37:44 +10:00
Stenzek
6beaec8ba1 Common: Remove Exceptions
The satisfaction is immeasurable.
2023-06-30 21:37:44 +10:00
Stenzek
2ae78f6e2f Misc: Clean up the last places exceptions were used 2023-06-30 21:37:44 +10:00
Stenzek
a889acb332 GS: Remove exceptions 2023-06-30 21:37:44 +10:00
Stenzek
81236209db SaveState: Remove exceptions 2023-06-30 21:37:44 +10:00
Stenzek
52266d7ac0 CDVD: Remove exceptions (completely this time)
The actual reads are still missing error checking...
2023-06-30 21:37:44 +10:00
Stenzek
ab4592b8e9 Common: Add Error class 2023-06-30 21:37:44 +10:00
Connor McLaughlin
7cda571d72 CI/Linux: Enable daily Flathub builds 2023-06-30 20:00:32 +10:00
Stenzek
d0ce4c52b0 GS/Vulkan: Set line width unconditionally on line draw 2023-06-30 14:16:35 +10:00
Stenzek
64ed6f5572 VMManager: Fix cheats warning showing with per-game HC mode 2023-06-29 20:30:10 +01:00
Stenzek
987bebffc7 GS/Vulkan: Make line width dynamic 2023-06-29 20:29:59 +01:00
Stenzek
e9c3807509 CI/Linux: Publish Flathub builds daily [disabled for now] 2023-06-30 02:41:29 +10:00
Stenzek
db642b05c0 CI/Linux: Add manifest to AppStream XML 2023-06-30 02:41:29 +10:00
Stenzek
7da904aa00 CI/Linux: Use add-extensions for ffmpeg in Flatpak 2023-06-30 02:41:29 +10:00
lightningterror
8c09daa22d Revert "Sio: Fix Wunused-variable warning."
This reverts commit 9254403a51.
Apparently there were new changes that made use of the variable.
2023-06-28 23:11:39 +02:00
lightningterror
7ebc04bc34 Interpreter: Cleanup constants, casts, formatting. 2023-06-28 22:59:58 +02:00
lightningterror
9254403a51 Sio: Fix Wunused-variable warning. 2023-06-28 22:59:58 +02:00
Connor McLaughlin
b4250965e6 ElfObject: Fix inverted condition 2023-06-29 00:32:06 +10:00
Stenzek
3fbe704e21 Sio: Replace reinsert spam with a single message 2023-06-28 22:44:54 +10:00
Stenzek
4bfbc355a2 R5900: Fully get rid of exceptions 2023-06-28 22:44:54 +10:00
Stenzek
4d22102fd1 Interpreter: Use local variables for action PCs 2023-06-28 22:44:54 +10:00
Mrlinkwii
129efbda40 GameDB: general clean up 2023-06-28 13:37:54 +01:00
Stenzek
828fb8972c GS/HW: Use range erase instead of vector swap for draw transfers 2023-06-28 20:59:18 +10:00
Stenzek
29b97209fe GS/HW: Split LookupTarget() and CreateTarget() 2023-06-28 20:59:18 +10:00
Berylskid
9c71bec4a0 UI: Remove outdated info from descritption 2023-06-28 15:56:51 +10:00
TellowKrinkle
1bc24c8d7c GHActions:MacOS: Update to macOS 13
Newer clang fixes fun compiler bugs
2023-06-27 20:22:11 -05:00
kamfretoz
76ae5f3b12 Qt: Adjust hyperlink color for Cobalt and Pizza theme 2023-06-27 21:13:12 +01:00
kamfretoz
7a6c0c6b4b Qt: Update main PCSX2 icon 2023-06-27 21:13:12 +01:00
Stenzek
db42792abf GS/HW: When page aligned, dirty page rects instead of SO
Fixes broken scrolling effects in Onimusha 3.
2023-06-27 17:50:04 +10:00
Stenzek
131f16b731 Qt: Update base translation sources 2023-06-27 09:21:23 +02:00
Stenzek
16e47f1d6b Qt: Move audio backend names to core and allow translation 2023-06-27 09:21:23 +02:00
PCSX2 Bot
79e1fd1ea4 PAD: Update to latest controller database. 2023-06-26 23:06:35 +01:00
Mrlinkwii
0c3cc59228 GameDB: fixes for WRC4 demos & update patches 2023-06-26 23:02:11 +01:00
Mrlinkwii
15db9e1778 GameDB: add missing demos 2023-06-26 20:13:02 +01:00
Stenzek
19cf29e5cf CI/Linux: Push to Flathub beta 2023-06-27 01:50:15 +10:00
refractionpcsx2
d51d51b3cc Memcard: Stop Folder memcards double reindexing 2023-06-26 14:45:50 +01:00
refractionpcsx2
c40e132284 SIO/MCD: hugely improved memcard swapping + reinsertion 2023-06-26 14:45:50 +01:00
Connor McLaughlin
f8f54bd892 Qt: Adjust cache folder help text 2023-06-26 20:40:18 +10:00
Stenzek
5302cdcf2b Qt: Remove renderer title from top group box
Save a little vertical space.
2023-06-26 17:52:39 +10:00
Stenzek
8fe9282bd9 Qt: De-duplicate AppIcon 2023-06-26 17:52:39 +10:00
refractionpcsx2
07ed213b1f GameDB: Add blending for Clannad and Clover Heart's VNs 2023-06-25 17:08:22 +01:00
JordanTheToaster
8a1b8d2091 GameDB: Add missing WRC 3 serial
God help me.
2023-06-25 15:30:36 +01:00
IlDucci
034ef5692c Qt: Updating language names
Correcting or expanding language names for both variants of Spanish and Portuguese.
2023-06-25 21:14:46 +10:00
Stenzek
b9b9405c35 Qt: Hook up current translations 2023-06-25 16:45:37 +10:00
JordanTheToaster
ca8d4f9ff0 GameDB: Add missing WRC II Fixes
Adds missing demos and fixes to fix SPS on demos.
2023-06-25 04:09:43 +01:00
Stenzek
0dc39a66d7 GS: Use ResetGS() for CSR resets 2023-06-25 12:54:14 +10:00
Stenzek
55e73bb4b9 MTGS: Convert to namespace 2023-06-25 12:54:14 +10:00
refractionpcsx2
6f9164b986 IPU: Slow down BDEC and IDEC so they don't outstrip DMA data writes 2023-06-25 01:05:42 +01:00
TellowKrinkle
8d27c32418 Updater:Mac: Delay launch of new application until the old one exits
Prevents duplicate dock icons
2023-06-24 22:28:56 +01:00
refractionpcsx2
a17a7ad1ec UI: Expand Achievement login box height slightly 2023-06-24 20:06:53 +01:00
refractionpcsx2
585868f930 GS/Cleanup: Remove some remaining eewrite references 2023-06-24 18:29:28 +01:00
refractionpcsx2
795d0a6682 GS: Double buffer the EE transfer queue 2023-06-24 18:29:28 +01:00
refractionpcsx2
3c0b7f7724 IPU: Redo FIFO transfers, plus small IPU_TO DMA tweak 2023-06-24 18:11:46 +01:00
Stenzek
ff23f87010 FullscreenUI: Add patches/cheats to game settings 2023-06-25 01:52:56 +10:00
Stenzek
989fca99c6 FullscreenUI: Add Disable VS expand option 2023-06-25 01:52:56 +10:00
KamFretoZ
b44e10df3c Qt: Removes hyperlink color override from Rcheevos 2023-06-24 22:10:33 +10:00
Stenzek
c9e9f92c93 Qt: Add Setup Wizard 2023-06-24 15:18:24 +10:00
refractionpcsx2
bb1a366989 GS/HW: Update drawn area and full valid bits on hardware move 2023-06-24 04:50:21 +01:00
refractionpcsx2
1458511756 Config: Don't apply upscaling fixes from GameDB in native
Also removed some stuff we no longer need
2023-06-24 04:49:44 +01:00
JordanTheToaster
3ebfc81727 GameDB: Spartan Total Warrior Fixes
Fixes for missing post processing.
2023-06-24 01:48:20 +01:00
refractionpcsx2
8d0d59175d DEV9: Fix typo preventing linux debug builds 2023-06-24 01:42:02 +01:00
Tyler Wilding
a46b3f2ed9 New Crowdin updates (#9030) 2023-06-23 15:08:16 -04:00
TheLastRar
cb224789e2 DEV9: Deduplicate sparse file assert code 2023-06-23 20:05:50 +01:00
Stenzek
cd4d829f9f CI/Linux: Use clang 16 for AppImage 2023-06-24 02:10:35 +10:00
refractionpcsx2
faa25f2a96 GameDB: Add minimum blending level for Snow (SLPS 25342 & 25332) 2023-06-23 14:46:35 +01:00
refractionpcsx2
36e8f49b63 GameDB: Add Partial Target Invalidation to Princess Maker 2 2023-06-23 13:42:04 +01:00
refractionpcsx2
e2a4657777 GS/HW: Improve full dirty rect clears. Remember new EE draws.
Rocky Legends transfers the new frame sometimes just before vsync, and it was getting lost.
2023-06-23 13:42:04 +01:00
refractionpcsx2
261b3f7e5c GS/HW: Remove eewrite from invalidatevideomem, allow age on frame 2023-06-23 13:42:04 +01:00
Stenzek
d6ba2aa76a CI: Prevent double builds on pushes to pcsx2 repo 2023-06-23 13:20:18 +01:00
refractionpcsx2
fb135a87ab GameDB: Fix CLUT colors for Kazuku Keikaku (SLPM-65889) 2023-06-23 13:17:14 +01:00
Stenzek
286fabaddc MemoryCardFolder: Fix saved message displaying junk 2023-06-23 11:50:39 +01:00
Stenzek
a79ad44370 Qt: Fix crash when right clicking volume slider 2023-06-23 11:42:23 +01:00
Stenzek
2046a9b414 GS: Use 32-bit vertex positions for culling
More accurate, stops it passing through vertices which are off-screen
and coordinates overflowed.

Differences versus current have been manually verified to be correct.
2023-06-23 19:54:46 +10:00
lightningterror
c77d8b3709 DEV9: Cleanup ATA. 2023-06-23 00:52:15 +02:00
lightningterror
7b428bb6b0 DEV9: Cleanup dev9 base tree. 2023-06-23 00:52:15 +02:00
Tyler Wilding
6986030cd9 ci: don't build the localization branch on push (#9031) 2023-06-22 17:33:10 -04:00
refractionpcsx2
cc9b9a1935 UI: Fix some typo's and casing in UI 2023-06-22 18:42:03 +01:00
JordanTheToaster
2b7eeba55c GameDB: Matrix Path Of Neo Fixes
Fixes broken post processing by using autoflush.
2023-06-22 10:13:50 +01:00
Stenzek
c87dd99824 GS/HW: Remove targets which lie completely within the invalidate range
Fixes part of Burnout 3's car reflections.
2023-06-22 19:12:22 +10:00
Stenzek
fbd837eadb GS/HW: Improve draw rect accuracy 2023-06-22 19:12:22 +10:00
Stenzek
7c9c8e197c Common: Replace MemsetFast routines with C memset
And associated cleanup.

On most compilers these days, it'll either inline the memset with vector
fills or rep stosq, or outline with a call to memset.

I trust the compiler is probably going to make a better decision here,
than manual SSE intrinsics.

Ends up a couple of percent faster in FMV decoding.
2023-06-22 19:11:57 +10:00
Stenzek
0366929231 Flatpak: Add screenshots 2023-06-22 18:32:51 +10:00
KamFretoZ
10d5261153 Updater: Clarify the error message when the program being runs directly 2023-06-21 17:32:24 +01:00
refractionpcsx2
3278856764 GS/HW: Adjust BurnoutGames CRC to allow preloading of undercarriage 2023-06-21 15:11:09 +01:00
refractionpcsx2
ff5a9e0ea1 GS/HW: Add target check safety to FFX and Sonic Unleashed CRC hacks 2023-06-21 15:11:09 +01:00
lightningterror
59b0c09443 GS-hw: Fix Wunused-variable warning. 2023-06-21 00:19:26 +02:00
lightningterror
ae772e6a74 Elfheader: Fix Wsign-compare warnings. 2023-06-21 00:19:26 +02:00
RedPanda4552
0a58783a86 Translations: Fix missing context marker on Manual Hardware Fixes string
Fixes CTD when OSD messages print
2023-06-20 21:19:07 +01:00
refractionpcsx2
6f6de13fd4 GameDB: Add VU Clamping to Motorstorm 2023-06-20 20:30:23 +01:00
refractionpcsx2
89dcb78efa GS/CRC: Fix Ar Tonelico 2 CRC hack to check DS exists 2023-06-20 20:14:13 +01:00
Stenzek
703c02c32c Qt: Update base (en) translation 2023-06-20 22:46:00 +10:00
Stenzek
adcfca4db3 Qt: Localization support 2023-06-20 22:46:00 +10:00
Stenzek
c359223fd4 ImGuiManager: Localization support 2023-06-20 22:46:00 +10:00
Stenzek
c4c7d26bb3 Host: Remove now-unused Add[Keyed]FormattedOSDMessage 2023-06-20 22:46:00 +10:00
Stenzek
c06bc16b22 Misc: Mark core strings for translation 2023-06-20 22:46:00 +10:00
Stenzek
f7bc05c735 Host: Add message translation functions 2023-06-20 22:46:00 +10:00
Stenzek
ff02d41992 USB: Make GetDeviceTypes() return C strings 2023-06-20 22:46:00 +10:00
Stenzek
ec180e2771 Hotkeys: Fix adjust target speed 2023-06-20 20:36:47 +10:00
Stenzek
dffa9e0b8c VMManager: Fix WS patch not applying auto aspect ratio 2023-06-20 20:36:47 +10:00
Stenzek
497e06bcd9 VMManager: Close memcards on boot failure
And get rid of some double shutdowns.
2023-06-20 20:36:47 +10:00
Stenzek
4c67c165fa GS/HW: Preload uploads even when CPU CLUT is on 2023-06-20 12:52:06 +10:00
Stenzek
2c175c0c7e GS/Skip draw when ZTE=1 and ZTST is NEVER 2023-06-20 12:52:06 +10:00
Stenzek
6babbc1ff9 GS/HW: Cache PrimitiveCoversWithoutGaps() value 2023-06-20 12:52:06 +10:00
Stenzek
8af9aace3c GS/Vulkan: Fix incorrect push/pop with cleared colclip target 2023-06-20 12:52:06 +10:00
Stenzek
601b75b611 GS/HW: Fix some incorrect clear behavior 2023-06-20 12:52:06 +10:00
Stenzek
350037fc75 GS: Store clear colour as RGBA32
And defer clears until draw time for DX11 and OpenGL.
2023-06-20 12:52:06 +10:00
Stenzek
f6bcfc3abd GS: Make ClearDepth() take a value 2023-06-20 12:52:06 +10:00
Stenzek
a480c972f7 GS/HW: Add ReplaceVerticesWithSprite() helper 2023-06-20 12:52:06 +10:00
Stenzek
581ded2c93 GS/HW: Fix mem clear for Z formats 2023-06-20 12:52:06 +10:00
Stenzek
06176e291a GS/Vulkan: Prevent upload heap being used w/ debug and non Re-BAR GPUs 2023-06-20 12:52:06 +10:00
Stenzek
14ee1b40d0 MTGS: Sync privileged registers before loading state
Fixes display registers not being present for the first frame when
loading GS dumps.
2023-06-20 12:52:06 +10:00
refractionpcsx2
9acb98a2c8 Host/Mcd: Fix boot order so memcard type is set before loading memcards 2023-06-19 22:21:16 +01:00
PCSX2 Bot
daf50df337 PAD: Update to latest controller database. 2023-06-19 18:23:42 +02:00
Stenzek
c4d136383c Qt: Fix size of input profile dropdown 2023-06-19 23:16:37 +10:00
Stenzek
5b5016bfd4 USB: Copy configuration when creating input profile
Also reset configuration when requested.
2023-06-19 23:16:37 +10:00
Stenzek
02352ab231 VMManager: Only reload core settings on ELF load
Game/HW fixes are really the only thing which is going to change, so we
can save ourselves some time by only applying those.
2023-06-19 23:16:37 +10:00
Stenzek
a4909d3575 Qt: Fix crash booting with mouse mapping 2023-06-19 23:16:37 +10:00
Stenzek
fbb50e2895 VMManager: Fix fast forward boot with GS dumps 2023-06-19 23:16:37 +10:00
Stenzek
0e4bf501f1 VMManager: Fix title updates when switching GS dumps 2023-06-19 23:16:37 +10:00
Stenzek
89b97456b7 VMManager: Fix dump playback adding to play time 2023-06-19 23:16:37 +10:00
Stenzek
fc4112c459 GS/HW: Implement FBW-based moves
Used by Metal Gear Solid 2, and Zone of the Enders 2.
2023-06-19 13:42:02 +10:00
Stenzek
b6923f49b1 GS/HW: Add render fix for MGS3 DoF effect 2023-06-17 20:26:19 +01:00
KamFretoZ
b476ed9186 Qt: Icon Refine 2023-06-17 18:36:37 +01:00
Stenzek
b6ba3f9059 VMManager: Fix game fixes not getting applied to BIOS 2023-06-17 18:23:01 +01:00
refractionpcsx2
4d921cc9f9 GS: Fix up overscan offsets. Stop using 3:2 for overscan. 2023-06-17 15:42:06 +01:00
JordanTheToaster
e5ac7d66ba GameDB: Various fixes 2023-06-17 15:24:11 +02:00
JordanTheToaster
d8173873c1 Qt: Fix Fast Forward Boot description box
Copy pasta fail lets go gamers.
2023-06-17 15:24:11 +02:00
Stenzek
36c27188a4 VMManager: Refactor and improve boot process
[SAVEVERSION+] VM struct changes.

 - Serial/title is now linked to disc, instead of running ELF.
 - Save states can be created during BIOS boot.
 - Patches now apply based on the executing CRC, and only after the
   entry point starts executing (fixes multi-game discs).
 - Add "Fast Forward Boot" option.
 - Split achievements download and activation, downloads occur on
   initialization, but are not activated until after the ELF loads.
 - Prevent HostFS access while in PS1 mode.
 - Remove multiple sources of truth for ELF/CRC/etc.
 - Move ELF state from global scope to VMManager.
 - Prevent game fixes and hw fixes being active while booting game.
 - Simplify game update.
 - Flush recompilers after ELF loads. No point keeping boot code around
   which gets overwritten.
2023-06-17 17:38:43 +10:00
RedPanda4552
0cf4cb6e4f GameDB: Xenosaga Ep 1 - Attempt to use quality level 100 as a base
Patch still decrements until satisfactory level
2023-06-17 01:24:41 +01:00
Stenzek
29420c25e4 3rdparty: Update ffmpeg headers to 6.0 2023-06-16 22:36:57 +10:00
Stenzek
161cead2e4 CI: Install ffmpeg packages on AppImage builder 2023-06-16 22:36:57 +10:00
Stenzek
03242a2953 Common: Move MemcpyFast routines to General.h
And add a trivially-copyable check, so nobody accidentially uses them
with non-POD types.
2023-06-16 18:26:28 +10:00
Stenzek
9613b43d50 Common: Purge SingleCoreAffinity
No longer used, never worked on Linux.
2023-06-16 18:26:28 +10:00
Stenzek
8a8e6c5d20 Common: Purge CPU frequency measurement
It's not accurate, and we can query the registry for the TSC frequency
for thread timers.

Also replaces InitCPUTicks() with a global constructor.
2023-06-16 18:26:28 +10:00
Stenzek
5d64a2b889 GS/SW: Replace __rdtsc() with GetCPUTicks() 2023-06-16 18:26:28 +10:00
Stenzek
85b41e23f0 GS/HW: Make Haunting Ground render fix invalidate depth as well
Fixes depth leaking into the image.
2023-06-15 23:06:33 +10:00
Stenzek
9d1c60239e Qt: Fix icon in memory card create dialog 2023-06-15 22:43:34 +10:00
Stenzek
de433cb896 GS/Capture: Support hardware video encoding 2023-06-15 20:51:31 +10:00
KamFretoZ
683c8d0cc3 Qt: Icon Revamps 2023-06-15 20:51:15 +10:00
Stenzek
bca20c9e27 Common: Call dwmapi directly 2023-06-15 20:46:56 +10:00
Stenzek
1de3e0986e Build: Remove unused pthreads.props 2023-06-15 20:46:56 +10:00
Abel Briggs
8b2fa73b45 Debugger/MemoryView: Support pasting hex/text from clipboard 2023-06-15 00:08:15 +10:00
Stenzek
1b953c1dc7 CI/Linux: Add Flatpak build files 2023-06-14 22:56:37 +10:00
Stenzek
c33960b411 CI/Linux: Allow path to clang and build deps to be set at build time 2023-06-14 22:56:37 +10:00
Stenzek
8d5728097b CMake: Add USE_LINKED_FFMPEG option 2023-06-14 22:56:37 +10:00
refractionpcsx2
9706045656 GS: Fix reg used to get frame mask on autoflush 2023-06-13 14:10:01 +01:00
refractionpcsx2
3a953eb5df GS: Flush when FRAME or Z matches write location 2023-06-13 14:10:01 +01:00
refractionpcsx2
35971b29bc GS: Skip autoflush optimisation when pending texflush 2023-06-13 14:09:38 +01:00
maxdunbar
76cbc64f99 Docs: update build guide URLs (#8972) 2023-06-13 05:10:06 +01:00
PCSX2 Bot
8f8c85273c PAD: Update to latest controller database. 2023-06-12 18:46:05 +02:00
pgert
25b953b7ec GameDB: minor correction (#8954) 2023-06-12 13:07:31 +01:00
Stenzek
c40f205bd3 GS/Capture: Fix audio encoding without format conversion 2023-06-12 20:44:10 +10:00
Mrlinkwii
be1b698af1 GameDB: correct Frogger Rescue serial 2023-06-11 12:47:04 +01:00
Sestain
c9ec71eeba GameDB: Added fixes for Crash Bandicoot 5 2023-06-11 12:43:57 +01:00
Stenzek
4df27e6efb GS/Vulkan: Add missing chain to exclusive fullscreen control 2023-06-11 13:02:36 +10:00
Stenzek
02f3279dec GS/HW: Get rid of padding in present UBO
It was adding additional padding, which blew the block size out.
2023-06-11 13:02:36 +10:00
refractionpcsx2
21900555dc DEV9: swap unlocks to avoid potential deadlock 2023-06-10 15:23:08 +01:00
Silent
5a4e21287a Achievements: Retain Hardcore Mode state after toggling Test Mode/Rich Presence 2023-06-10 15:17:46 +01:00
Silent
3e8e5216eb Patch: Always enumerate patches/cheats for UI 2023-06-10 15:17:46 +01:00
refractionpcsx2
c679de8e39 USB: Properly initialise effect unions (C rules gotcha) 2023-06-10 13:10:58 +01:00
refractionpcsx2
a979d2283f USB: Increase length of FFB events 2023-06-10 13:10:58 +01:00
refractionpcsx2
3254714b70 USB: Improve FFB for steering wheels 2023-06-10 13:10:58 +01:00
Stenzek
65374f50cf VMManager: Fix patches OSD not getting shown in some cases 2023-06-10 12:35:08 +10:00
Mrlinkwii
1a62cd064c GameDB: add missing entry for Nuga-Cel 2023-06-09 17:45:25 +01:00
Stenzek
40bd19ccbb VMManager: Move unknown serial print to UpdateRunningGame() 2023-06-09 00:59:16 +10:00
Stenzek
642adffeb8 Revert "Patches: Don't reload GameDB when crc is 0."
This reverts commit 5b942f0508.

This was causing patches to not get removed when resetting.
2023-06-09 00:59:16 +10:00
lightningterror
5b942f0508 Patches: Don't reload GameDB when crc is 0.
Bios uses crc 0, spams useless log that bios serial is not in the gamedb.
2023-06-08 00:57:31 +01:00
Ty Lamontagne
b4b5b58e35 IsoFS: Create 'hard-links' for non-conforming version suffixes 2023-06-07 20:41:12 +01:00
DarkC
bf4672fb2b Qt: Add missing bigpicture parameter to help text 2023-06-07 20:38:18 +01:00
lightningterror
d6e2dcd25b Qt: Fix Wunused-variable warning. 2023-06-06 12:46:46 +02:00
lightningterror
3b7d22153f SPR: Cleanup constants. 2023-06-06 12:46:46 +02:00
lightningterror
490a8d35cb GIF: Cleanup Gif.
Constants, initializations, declarations, unused code.
2023-06-06 12:46:46 +02:00
TellowKrinkle
260846e9e9 CMake: Don't use system rapidyaml in default builds 2023-06-06 11:29:40 +01:00
Stenzek
d1ed5aadc2 VMManager: Fix patches when booting with a state 2023-06-06 11:25:46 +01:00
JordanTheToaster
1067ed309a GameDB: Various fixes
Fixes for missing lighting in No One Lives Forever and somehow fixes Spongebob Revenge of The Flying Dutchman not starting a new game in the PAL version.
2023-06-05 16:34:11 +01:00
refractionpcsx2
1ef9bc464d GS-HW: Only preload targets when data is needed 2023-06-05 11:26:33 +01:00
Stenzek
ba3a7fc11a GS/HW: Rename IsBlendedOrOpaque() to IsDiscardingDstColor()
And remove the dst color output case, this is clearly wrong when we're
using this to try to identify clears.
2023-06-05 11:26:33 +01:00
Stenzek
c44b4c3d35 GS/HW: Black blending should preserve RGB, not A 2023-06-05 11:26:33 +01:00
Stenzek
c79c79fe0e GS/HW: Fix PrimitiveCoversWithoutGaps returning true with gaps
Previously it only checked that all sprites matched in size, not that
there wasn't actually any gaps between them.
2023-06-05 11:26:33 +01:00
Stenzek
a7c70a3916 GS/Vulkan: Colclip drawback shouldn't use DONT_CARE load op 2023-06-05 11:26:33 +01:00
TellowKrinkle
325a8cba58 GS:MTL: Fix ICE on macOS 10.15
Apparently the Catalina Intel UHD 630 backend compiler ICE's on use of the bool3 constructor over a float3...
(Weirdly this happens on the Metal22 metallib compiled for 10.15 but not on the one compiled for 10.13... we do still want PrimID support if possible so I'd rather not remove it if I don't have to)
2023-06-05 11:26:23 +01:00
refractionpcsx2
35387eeabb GIF: Fix some incorrect unknown register warnings 2023-06-04 18:20:02 +01:00
Stenzek
9d3de8631c Patch: Add "bytes" type
Allows patching an arbitrary range of bytes.
2023-06-03 23:09:52 +01:00
Stenzek
940e211bb6 Patch: Improve logging 2023-06-03 23:09:52 +01:00
Mrlinkwii
5eb425bc4c GameDB: Fix up some names 2023-06-02 17:57:01 +01:00
refractionpcsx2
bd6b529157 Patches: Allow duplicate lines with complex types 2023-06-01 16:08:22 +01:00
Stenzek
0d59e0a2e9 GS/Vulkan: Remove render area heuristics
And just set the render area to the full target every time.

Except colclip draws.
2023-06-01 15:56:25 +01:00
JordanTheToaster
1826d122f5 GameDB: Various fixes
Fixes for FMVs blowing up the HC in Ace Combat games and FMVs being broken in Jonnys Mad Trixx.
2023-06-01 12:06:16 +01:00
Stenzek
ed6dd6f6cd CI: Update build to use patches.zip instead of cheats 2023-05-31 16:38:14 +01:00
Stenzek
81da9fb5a4 Patch: Add new toggleable cheat and patch interface 2023-05-31 16:38:14 +01:00
Mrlinkwii
ec35330593 GameDB: Fixes for Onimusha Warlords 2023-05-30 23:52:59 +01:00
Stenzek
f741953ee4 Qt: Add memory cards to per-game settings 2023-05-30 18:21:00 +01:00
lightningterror
c0343897cd GameDB: Add full mipmap with ps2 trilinear to ESPN NFL 2K5.
Improves textures to match sw renderer.
2023-05-30 16:16:34 +02:00
refractionpcsx2
d880f8cde5 GS-TC: Fix bugs with target resize and borders in texture min max 2023-05-30 13:32:30 +02:00
TheLastRar
1175bd822c Github: Update issue template
Corrects spelling of appropriate
Adds text area for logs/dumps for the application template
Clarifies that dumps should be in a zip file
2023-05-28 19:29:14 +01:00
Stenzek
63a141abe6 GS/HW: Don't preload large framebuffer alpha textures 2023-05-28 17:31:04 +01:00
Stenzek
abce57ce9c GS: Enable API debug logging in Devel builds 2023-05-28 14:55:53 +01:00
JordanTheToaster
c471f7cf6c GameDB: Urban Chaos Light alignment fix
Fixes light alignment at native resolution to match software.
2023-05-28 01:33:05 +01:00
TellowKrinkle
656c2775ac CMake: Add vtune support on Windows 2023-05-27 17:54:53 +02:00
TellowKrinkle
a2c6e050d7 VMManager: MacOS CPU count detection 2023-05-27 04:57:50 +01:00
Mrlinkwii
f3adb05b1c GameDB: add various entries 2023-05-26 19:43:34 +01:00
Stenzek
bfc3d2e1d4 Patch: Rename le{short,word,double} to be{short,word,double}
MIPS is little endian, not big endian. Having little endian commands
suggests to the reader that the "normal" format is big endian, which is
obviously incorrect.
2023-05-25 16:47:36 +01:00
Stenzek
680affd1fe Common: Add ByteSwap.h
Provides a C++23-like std::byteswap implementation.
2023-05-25 16:47:36 +01:00
TellowKrinkle
ab1d2009a0 Core: Use 2MB stacks for µVU 2023-05-25 16:16:14 +01:00
lightningterror
8196f46721 GS-Metal: Fix Wunused-variable warnings. 2023-05-25 13:24:40 +02:00
Stenzek
44460365c0 GS/HW: Vectorize mem clears 2023-05-25 09:49:31 +01:00
Stenzek
38d9aa5e73 GS/HW: Detect row/page-based split clears
And turn them into a single mem clear.
2023-05-25 09:49:31 +01:00
descawed
830db2b326 GameDB: Fix missing textures in Galerians: Ash 2023-05-25 09:48:58 +01:00
refractionpcsx2
51165f6061 Patches: Fix parsing of double words. Expand error log. 2023-05-24 19:49:32 +01:00
Mrlinkwii
2a9d38048e github: update issue templates 2023-05-24 17:44:47 +01:00
Stenzek
bba65b8a82 Patch: Discard patches with non-hex addresses/values 2023-05-24 12:24:47 +01:00
Stenzek
884086ba76 StringUtil: Fix incorrect value of endptr
And add associated unit tests.
2023-05-24 12:24:47 +01:00
Ty Lamontagne
1fa6614cd5 Achievements: Implement the ELF suffix hack from CDVD when hashing 2023-05-23 09:56:08 +01:00
Mrlinkwii
57581724cd GameDB: add missing entries 2023-05-23 10:17:02 +02:00
lightningterror
0ae6f7efc5 GameDB: Add full mipmap with ps2 trilinear to 2002 FIFA World Cup.
Improves ground textures to match sw renderer.
2023-05-22 15:27:07 +02:00
Abel Briggs
d0346436fb LogSink: Log BIOS print syscall messages if EE console is enabled 2023-05-22 08:37:50 +01:00
JordanTheToaster
1b28980454 GameDB: HP COS Fixes
Fixes for Full mipmapping causing texture problems with Harrys and lighting being wonky at lower than full blending.
2023-05-21 15:48:25 +01:00
Stenzek
90a6088d61 GSRunner: Fix log file writing
Wasn't getting flushed/closed on shutdown.
2023-05-21 08:52:45 +01:00
TellowKrinkle
338a2beaf0 GS:MTL: Remove pre-10.14 fallback
We no longer support pre-10.14
2023-05-20 10:59:23 +02:00
TellowKrinkle
ff9a910c1a GS:MTL: Use GSTexture base class's clear tracking 2023-05-20 10:59:23 +02:00
TellowKrinkle
d88921bb58 GS: Remove ClearStencil from GSDevice
It's never used generically, and GSTexture's shared clear tracking doesn't support it
If anyone ever actually needs this, they should update GSTexture to make it properly tracked into a render pass load action
2023-05-20 10:59:23 +02:00
TellowKrinkle
c1f3f0a247 GS: Fix index expand buffer size
Expansion multiplies indices by 4 for vertices, so the maximum is 65535 / 4 = 16383
2023-05-20 10:59:23 +02:00
TellowKrinkle
df847835ad GS:MTL: Implement DrawMultiStretchRects 2023-05-20 10:59:23 +02:00
TellowKrinkle
8aad1c78af GS:MTL: Remove hdr copy pipeline
No longer needed
2023-05-20 10:59:23 +02:00
TellowKrinkle
7c97cf4799 GS:MTL: Implement InvalidateRenderTarget 2023-05-20 10:59:23 +02:00
TellowKrinkle
fd11523cf4 GS:MTL: Implement ClearSamplerCache 2023-05-20 10:59:23 +02:00
TellowKrinkle
a293a9bd4b GS:GL: Fix GLContextAGL compile 2023-05-20 10:59:23 +02:00
refractionpcsx2
8de0eb3c06 GameDB: Readd software FMV fix for Onimusha Warlords (PAL) 2023-05-19 06:40:06 +01:00
refractionpcsx2
8bff172f0b GS: Extract end block address in to helper function 2023-05-19 06:40:06 +01:00
refractionpcsx2
7f26595804 GS-HW: Avoid clears with new targets 2023-05-19 06:40:06 +01:00
lightningterror
68ec70f24f GameDB: Add full mipmap with ps2 trilinear to Super Monkey Ball Adventure.
Improves textures to match sw renderer.
2023-05-18 21:41:59 +02:00
lightningterror
836591a44f GameDB: Correct a couple of regions for games.
From PAL-E to PAL-A.
From NTSC-J to NTSC-K.
2023-05-18 21:41:59 +02:00
refractionpcsx2
dd4ded3d4b GameDB: Add missing COP2 patches for Call of Duty Finest Hour 2023-05-16 23:16:13 +01:00
Mrlinkwii
995e294856 GameDB : fixes for Bonus Demo 6 2023-05-16 19:55:03 +01:00
Stenzek
c4e623eec2 VMManager: Don't rescan symbols when swapping discs
The ELF isn't changing.
2023-05-16 12:58:19 +01:00
Stenzek
61253d8201 VMManager: Reload settings after shutting down
Prevents any whacky settings from the previous game hanging around until
the next one boots.
2023-05-16 12:58:19 +01:00
Stenzek
0f05967190 CommonHost: Purge and move functions to appropriate locations 2023-05-16 12:58:19 +01:00
Stenzek
ad0e469f87 Misc: Clang warning fixes 2023-05-16 12:58:19 +01:00
Stenzek
512d24cea6 Misc: More build system cleanups
Set UTF-8 source file format globally.
Set permissive/compliance mode globally.
Get rid of include of base 3rdparty directory, be explicit.
Get rid of duplicated properties.
Get rid of leftover plugin property files.
2023-05-16 12:58:19 +01:00
Stenzek
0850a3fab7 Misc: Support building without -fno-operator-names
Better to have standard compliance, and MSVC in conformance mode needs
it.
2023-05-16 12:58:19 +01:00
lightningterror
16db92526c GameDB: Add full mipmap with ps2 trilinear to Rally Shox.
Also add missing db entries.

Improves textures to match sw renderer.
2023-05-16 12:30:52 +02:00
lightningterror
30ad66e8f1 VMManager: Don't lookup the bios as a game.
Fixes the gamedb log falsely pasting that a bios
is not in the db.
2023-05-16 11:26:11 +02:00
refractionpcsx2
77f600a16c GameDB: Added round sprite fixes for Street Fighter Alpha/Zero 2023-05-16 01:20:45 +01:00
refractionpcsx2
d96bf7f951 GameDB: Add upscaling fixes for Vampire Darkstalkers Collection 2023-05-16 01:20:45 +01:00
refractionpcsx2
15948c2781 GS-HW: Allow recursive HW move with temp copy 2023-05-16 01:20:45 +01:00
refractionpcsx2
b0c744bd29 GS-HW: Invalidate local mem for whole texture on local->local copy 2023-05-16 01:20:45 +01:00
Stenzek
5eacfe1afb x86/microVU: Reference StateEnd instead of inlining state 2023-05-16 01:20:22 +01:00
refractionpcsx2
2f985b479e GS-TC: Delete fully dirtied old targets 2023-05-16 01:19:58 +01:00
PCSX2 Bot
e61d8f2f8f PAD: Update to latest controller database. 2023-05-15 19:22:33 +02:00
refractionpcsx2
f4e338f9fb Build: Fix GS Runner compilation.
Stuff got moved, GS Runner wasn't told :)
2023-05-14 02:45:30 +01:00
Mrlinkwii
9509745be9 GameDB : add missing Gran Turismo fixes 2023-05-13 22:50:29 +01:00
JordanTheToaster
91b47134ad GameDB: Various fixes
Various fixes for Ace Combat 4 5 and Zero to fix broken upscaling on airburst and possibly other effects.
2023-05-13 16:43:16 +01:00
Stenzek
6426f4432e SPU2: Get rid of dynamic allocations 2023-05-13 16:39:40 +01:00
Stenzek
191ea50663 GS/HW: Fix GT4 render hack 2023-05-13 16:38:53 +01:00
Stenzek
7f5c0fca8f MSBuild: Fix lib/pdb output directory 2023-05-13 16:29:06 +01:00
refractionpcsx2
5f8798cf94 VMManager: Split reload game swap, avoid reloading patches 2023-05-13 16:27:53 +01:00
refractionpcsx2
3aac709682 CDVD: Reload game data when swapping discs to reflect new name. 2023-05-13 16:27:53 +01:00
isJuhn
e3962aa794 PINE: Update to the age of Qt 2023-05-13 16:17:30 +01:00
Stenzek
1964bbc03a MSBuild: Rename pcsx2core to pcsx2
No need to differentiate it, since wx is gone.
2023-05-13 07:12:12 +01:00
Stenzek
80675399aa Misc: Various cleanup
Move files from Frontend directory to pcsx2 and/or subdirectories.
Get rid of double GS init.
Combine HostSettings and Host.
Combine Frontend/Achievements.h and Achievements.h.
2023-05-13 07:12:12 +01:00
refractionpcsx2
6fb4c724bd VS: Reorganise some file filters 2023-05-13 06:24:15 +01:00
refractionpcsx2
b34606c9ce UI: Add ability to list .mdf files 2023-05-13 05:04:34 +01:00
refractionpcsx2
4e97381709 GS-HW: Fix bug in Prim cover with no gaps + allow horizontal strips 2023-05-13 05:04:16 +01:00
refractionpcsx2
d4db49f969 GS-PCRTC: Fix up Anti-Blur with negative framebuffer offsets 2023-05-13 04:34:26 +01:00
refractionpcsx2
4b54870da1 GameDB: Add MAD deinterlace and Round sprite to NASCAR Thunder games 2023-05-13 04:34:26 +01:00
refractionpcsx2
0ae91cbf64 GS-HW: Fix annoying NASCAR offsets in PCRTC 2023-05-13 04:34:26 +01:00
Mrlinkwii
041abd8abc GameDB: fix up Midnight Club memcard filters 2023-05-13 01:08:05 +01:00
Stenzek
43be6883df GS/HW: Remove targets when invalidate area covers valid area 2023-05-12 16:24:03 +01:00
lightningterror
ad4e95cb78 SPU2: Cleanup spu2.
Constants, initializations, casts, switch cases not handling default case, unused functions.
2023-05-12 15:55:29 +02:00
Stenzek
38480d3aed GS/HW: Fix crash in PossibleCLUTDraw() 2023-05-12 14:19:58 +01:00
Stenzek
3436bb3792 GS/HW: Include FBMSK in target lookups for debug traces 2023-05-12 14:19:58 +01:00
Stenzek
5bab8af38f GS/HW: Rename and improve dirty alpha to valid alpha 2023-05-12 14:19:58 +01:00
Stenzek
61f344dd66 GS/HW: Handle texture shuffles using region repeat
Ace Combat 04 reads RG, writes to RGBA by setting a MINU of 1015.
2023-05-12 14:19:58 +01:00
Stenzek
1811955fce GameDB: Add SW FMV render to Poinie's Poin
Game does 640x1232 draws to clear out most (but not all) of GS memory,
then 224 high draws to 1216 high targets, presumably moving GS memory
around.

Enabling SW FMV render isn't needed for the FMV, it's just a convenient
way to remove these targets from the TC, as the clearing/copying mess
happens before the FMVs play.
2023-05-12 12:37:00 +01:00
lightningterror
449da42108 USB: Fix struct member not used warnings.
Codacy.
2023-05-11 19:57:34 +02:00
Stenzek
9493d3e9c9 USB/GunCon2: Adjust calibration timer
Credit to @pcnimdock for debugging.
2023-05-11 16:24:27 +01:00
Stenzek
e5c1052062 GS: Add option to disable vertex shader expand
And automatically disable it on Fermi (buggy driver).
2023-05-11 16:18:01 +01:00
Stenzek
7edc4e2cb3 GS: Remove CRC hack levels
Replace it with a boolean "Disable Render Fixes" option.
2023-05-11 16:16:15 +01:00
Stenzek
7ca28fc796 GS/HW: Remove aggressive CRC hacks
GSC_AceCombat4 - couldn't get this to trigger.
GSC_FFXGames - dunno what this did, but FFX has been fine for some time.
GSC_Okami - breaks a bunch of the game's effects, downsample is intentional.
GSC_RedDeadRevolver - working as intended, patch on forums.
GSC_ShinOnimusha - breaks effects, only saves 5-10% GPU at 8x.
GSC_XenosagaE3 - breaks cutscenes, minimal perf difference.
2023-05-11 16:16:15 +01:00
refractionpcsx2
72f9bf83fd SIF: Correct junk data behaviour. Fixes True Crime Streets of LA 2023-05-11 16:03:13 +01:00
forrvalhalla
2695ddc9fc GameDB: Various fixes 2023-05-11 09:23:54 +01:00
JordanTheToaster
fbcc8671ac GameDB: Various fixes
Fixes for broken refraction effect in Crash WOC and broken FMVs in Army Men 2.
2023-05-10 13:27:29 +01:00
Stenzek
7e76230cf8 GameDB: Enable TexInRT for Project Snowblind
Seems it does the same target offset thing:

```
TC: Target 0x3600 detected in front of TBP 0x3560 with 64,32 offset (5 pages)
```
2023-05-10 13:26:19 +01:00
Stenzek
ba27221bf2 GameDB: Enable TexInRT for Enthusia - Professional Racing
Fixes reflections (C32 target with offset C24 texture).
2023-05-10 13:26:19 +01:00
Stenzek
6cf1501050 GameDB: Change Destroy All Humans to base tex-in-rt
Since it handles offset targets now, there's no need to use the merge
path, and the former is cheaper (no copy).

However, I'm keeping it around for Guitar Hero III (eventually I'll get
back to that..)
2023-05-10 13:26:19 +01:00
Stenzek
a30ca0ce2a GS/HW: Remove Tomb Raider CRC hacks
It works correctly with tex-in-rt now.
2023-05-10 13:26:19 +01:00
Stenzek
5e3e988846 GS/HW: Allow finding targets offset behind FBP for tex-in-rt 2023-05-10 13:26:19 +01:00
Stenzek
bb42353c81 GS/HW: Make regions signed, and use compatible bits for tex-in-rt 2023-05-10 13:26:19 +01:00
Stenzek
61740fc9ed GS/HW: Break channel shuffle on CBP change
Needed for Tomb Raider: Underworld
2023-05-10 13:26:19 +01:00
Stenzek
ea30c90a6c GS/HW: Use source resolution rather than CRTC for channel shuffle 2023-05-10 13:26:19 +01:00
Stenzek
3968a82775 GS/HW: Turn GT4 CRC hack into a GSC instead
Keep the hacks with the rest of the hacks.
2023-05-10 13:26:19 +01:00
Goatman13
6e40081dd9 GameDB: Remove DOA2 iop patches.
Fixed in https://github.com/PCSX2/pcsx2/pull/3778
2023-05-09 18:41:40 +01:00
Stenzek
2b8b43c94c GS/Vulkan: Simplify and refactor swap chains 2023-05-09 13:44:56 +01:00
Stenzek
3f0ecc2284 GS/Vulkan: Submit cmdbuffer each frame even when surfaceless
Stops out-of-descriptor scenarios which are not realistic in the GS
runner.
2023-05-08 20:48:14 +01:00
Stenzek
828e86bdf4 GS: Skip draws when scissor is invalid
i.e. the bottom-right is greater than the top-left.

tombraidertitle.gs.xz hits this.
2023-05-08 20:48:14 +01:00
Stenzek
159d0c060f GS/Vulkan: Clear out previous texture binding when it's RT/DS 2023-05-08 20:48:14 +01:00
Stenzek
4a29fdb3f2 GS/Vulkan: Ensure restarted render passes don't clear
We don't want to wipe out what's done, and we don't know the clear
values anyway.
2023-05-08 20:48:14 +01:00
Stenzek
29da1bb9ef GS: Make context scissor.in an integer vector
Doesn't make sense for it to be floats, and saves a bunch of
conversions.
2023-05-08 20:48:14 +01:00
Stenzek
47636bb30f Config: Fix incorrect key for DisableShaderCache 2023-05-08 20:48:14 +01:00
Stenzek
5fe64396b4 GS/Vulkan: Fix incorrect layout during copy to self
Of course this happened in Dark Cloud 2.
2023-05-08 20:48:14 +01:00
Stenzek
75b782f261 GS/Vulkan: Enable geometryShader for Primitive ID
Apparently it is needed..
2023-05-08 20:48:14 +01:00
Stenzek
4a5cf0efb9 GS: Combine texture classes and add custom layout for Vulkan 2023-05-08 20:48:14 +01:00
PCSX2 Bot
cfdae77331 PAD: Update to latest controller database. 2023-05-08 18:51:41 +02:00
lightningterror
ec0aaff8ac GS: Replace EmuConfig.GS with GSConfig.
EmuConfig isn't safe to run on the gs thread.
2023-05-08 12:47:56 +02:00
refractionpcsx2
f651d8e26a GameDB: Add text fix for State of Emergency 2 2023-05-06 17:43:05 +01:00
Stenzek
0526769808 GS/Vulkan: Remove more unused code 2023-05-06 07:18:55 +01:00
Connor McLaughlin
1866745936 GS/DX12: Fix building in debug 2023-05-06 04:02:29 +01:00
Stenzek
920c5ab266 Qt: Expose disable shader cache option 2023-05-06 03:40:00 +01:00
Stenzek
c57d8980a1 GS: Move Vulkan helpers from common to GS 2023-05-06 03:40:00 +01:00
Stenzek
0ed418834a GS: Move OpenGL helpers from common to GS 2023-05-06 03:40:00 +01:00
Stenzek
083969a3d2 GS: Move DirectX helpers from common to GS 2023-05-06 03:40:00 +01:00
Ty Lamontagne
6740fff179 Profiling: Fix missing cast breaking VTune builds on Linux
Also remove now-pointless SW-JIT VTune code.
2023-05-06 03:15:46 +01:00
JordanTheToaster
25e24d1d09 GameDB: More Juiced 1 FIxes
Fixes for broken headlights and enforcing high blending for more accuracy.
2023-05-06 00:52:47 +01:00
refractionpcsx2
76cc9c8b21 GS: Only update dirty on local invalidate if bp matches 2023-05-05 14:58:41 +01:00
Regan Green
7dcf6b70d9 GameDB: Apply THUG2 GS HW fixes to THAW 2023-05-05 13:00:44 +01:00
Regan Green
f26b26b73e GameDB: Tony Hawk's post-processing fixes 2023-05-05 13:00:44 +01:00
JordanTheToaster
055beaa27a GameDB: Juiced 1 FIxes
Fixes for broken window and shadow rendering headlight brightness and overbightness in hardware mode.
2023-05-05 10:21:25 +01:00
lightningterror
a4623c3c63 Qt: Sort checkbox upscale and renderer hw hacks in alphabetical order. 2023-05-05 00:31:01 +02:00
Zwip-Zwap Zapony
4e3a94809d GameDB: Secret Agent Clank compat and bloom fix 2023-05-04 22:37:58 +01:00
JordanTheToaster
5ff64899e6 GameDB: True Crime LA Fixes
Fixes for the sun going through buildings.
2023-05-04 18:00:51 +01:00
lightningterror
971f172c91 GS: Cleanup GSRenderer.
Constants, casting.
2023-05-04 16:37:39 +02:00
CharlesThobe
4671167a2c VIF: Fix assertion error not returning int value 2023-05-04 14:39:14 +01:00
CharlesThobe
7aff4ee4cb Misc: Minor cleanup 2023-05-04 14:39:14 +01:00
JordanTheToaster
30f7685435 GameDB: Various fixes
Fixes for Underground 1 PAL and Transformers.
2023-05-04 12:53:26 +01:00
refractionpcsx2
341f377e6d VIF: Improve IR setup for skipped unpack inputs/writes 2023-05-04 01:37:54 +01:00
refractionpcsx2
fe4788ae3f GS:MTL: Extend render pass restart avoidance code to depth-only passes
Previously only worked when the depth texture was removed, but not when the color texture was removed
2023-05-04 00:10:14 +01:00
Connor McLaughlin
e133e89b6b Qt: Fix crash in graphics settings on Linux 2023-05-03 16:39:48 +01:00
refractionpcsx2
bf6a0a035a VIF-JIT: Ignore completely write protected vectors 2023-05-02 23:19:02 +01:00
refractionpcsx2
790447ecc9 VIF-JIT: Use non-reserved XMM for zero register 2023-05-02 21:27:53 +01:00
Stenzek
47506d1433 GS/HW: Don't memclear with vertical gaps in the sprites
Xenosaga 3's FMVs clear out a top/bottom letterbox.
2023-05-02 21:12:18 +01:00
Stenzek
933e6aa62e GS/HW: Fix target region textures not getting invalidated
Xenosaga 3 has tex-in-RT, offsetting a source from a larger target, but
the invalidation kills the target but not the source otherwise.

Also fixes m_from_target_TEX0 being tested when it might not be valid.
2023-05-02 21:12:18 +01:00
Stenzek
6736ef1d44 GS/Vulkan: Add exclusive fullscreen control option 2023-05-02 19:55:43 +01:00
refractionpcsx2
3e631e047f GS-HW: Avoid clear misdetection with DATE enabled 2023-05-02 19:55:32 +01:00
refractionpcsx2
dd2d4edffc VIF-JIT: Get rid of mem read for mask 2023-05-02 18:20:55 +01:00
refractionpcsx2
fd2960c9cb VIF-JIT: Skip src reads on fill writes using regs
Clean up some of the code
2023-05-02 18:20:55 +01:00
refractionpcsx2
c2907ea58f VIF-JIT: Clean up pointless code, optimise protected vector copies 2023-05-02 18:20:55 +01:00
PCSX2 Bot
41f62cf53d PAD: Update to latest controller database. 2023-05-02 11:49:57 +02:00
Ty Lamontagne
e462f1ff9c iR3000: Fix memchecks that only log 2023-05-01 07:02:21 +01:00
Ty Lamontagne
5b0b6191d8 iR5900: Fix memchecks that only log 2023-05-01 07:02:21 +01:00
Ty Lamontagne
ab9a1e4307 R5900 interpreter: Fix breakpoint exits
Exit exceptions were not being caught, causing a crash.
2023-05-01 07:02:21 +01:00
Ty Lamontagne
029c11c8d2 Debugger: Fix an oversight on how breakpoints are managed 2023-05-01 07:02:21 +01:00
TellowKrinkle
e221d31b45 GS:OGL:Shaders: Formatting 2023-04-30 23:48:49 +02:00
lightningterror
dfbdaa651c vcxproj.filters: Remove common_header.glsl mention.
No longer exists.
2023-04-30 23:48:49 +02:00
CharlesThobe
9de152b8ee Linux: implement DBus screensaver inhibitor 2023-04-30 19:18:53 +01:00
Mrlinkwii
360f9afb70 GameDB: Fixes for Shin Sangoku Musou Series Collection Joukan 2023-04-30 16:41:40 +01:00
Connor McLaughlin
1b81825218 x86/microVU: Fix typo in VI CRC
Doesn't actually affect anything, only for debugging.
2023-04-30 06:12:01 +01:00
Stenzek
b3e6e28827 x86/iR5900: Fast forward timeout loops 2023-04-30 04:52:50 +01:00
Stenzek
eaceb27879 x86/microVU: Remove redundant cmp in mVUtestCycles 2023-04-29 18:24:49 +01:00
Stenzek
cd9b6c7ac3 x86/microVU: Pack VF cycles into bitfields
The VF cycle count doesn't go above 4, across 32 registers that saves 64
bytes.

Also gets rid of blockhasmbit, since save states are getting invalidated
anyway, it was never used.

[SAVEVERSION+] VU struct changes.
2023-04-29 18:24:49 +01:00
TellowKrinkle
d3e527f2a4 GS:MTL: Always end all encoders on FlushEncoders
Previously, texture upload encoders weren't submitted if no rendering had been done, which would result in an assertion failure if the device was destroyed in that state, as the encoders would be released without calling `endEncoding` on them.
2023-04-29 17:37:24 +01:00
TellowKrinkle
b47fdcdfab GS: Fix crash when looking up color textures with depth lookups 2023-04-29 17:02:16 +01:00
Stenzek
2550ad7fd1 GS/HW: Detect clears spanning multiple sprites
Fixes GT4 rendering to >1000x1000 targets.
2023-04-29 17:01:15 +01:00
Stenzek
1717f584a0 GS/HW: Add flush reason to draw tracing 2023-04-29 17:01:15 +01:00
Stenzek
0822d3e3e5 GS/HW: Cache possible mem clear value 2023-04-29 17:01:15 +01:00
Stenzek
ec41af760a GS/Vulkan: Make primid not require barycentric extension 2023-04-29 16:23:09 +01:00
Stenzek
a5ed24ca88 Perf: Support instruction-level profiling with jitdump on Linux 2023-04-29 16:22:37 +01:00
Stenzek
b3697579c0 GS/Vulkan: Simplify GPU selection
Hopefully stops a crash on broken drivers.
2023-04-29 16:20:01 +01:00
JordanTheToaster
388da2058b GameDB: FFXII texture fixes
Fixes for broken textures on player model.
2023-04-29 08:01:59 +01:00
Stenzek
aa9a0dca4b GS/HW: Fix HW move debug message 2023-04-28 13:34:45 +02:00
Stenzek
2a892da0da GS/HW: Improve split shuffle detection
Fixes transition effects in DBZ BT3 PAL.
2023-04-28 13:34:45 +02:00
Stenzek
9237bf9429 GS/HW: Relax PSM match requirement for move targets
Fixes broken car preview in Tokyo Xtreme Racer Zero.
2023-04-28 13:34:45 +02:00
Stenzek
10533dce02 GS/HW: Swap xyxy() for upld()
In theory more efficient.
2023-04-28 13:34:45 +02:00
Stenzek
b5ebc19eff GS/HW: Don't mess with ZMSK for no_ds
Fixes broken depth in Superman Returns.
2023-04-28 13:34:45 +02:00
Stenzek
6535e7e43a GS: Add natvis for vector types 2023-04-28 10:22:45 +01:00
Ty Lamontagne
5f9473ef02 ci: Update labeler debugger directories 2023-04-28 06:15:27 +01:00
Stenzek
fbb1c7cb8e GS/OGL: Don't reuse targets when they're the texture
I don't trust drivers to insert a barrier here. At least one of them
gets it wrong.

Also moves the masking of depth/colour to the common renderer for
consistency.
2023-04-27 23:22:09 +01:00
lightningterror
2d97d85ca5 GS-hw: Use correct format specifier for blend log, use constants for mergesprite log. 2023-04-27 21:20:31 +02:00
Stenzek
ecd7d0fc35 GS/HW: Fix pipeline/shader duplication 2023-04-27 12:01:34 +01:00
Stenzek
0c389789f3 GS: Fix hang when switching renderer while fullscreen 2023-04-27 09:17:27 +01:00
Stenzek
d8239664a8 GS/Vulkan: Re-enable async presentation 2023-04-27 09:17:16 +01:00
rayanHappy
c06d4f477a Misc: remove unneeded file and clean up a 32bit check 2023-04-27 09:09:04 +01:00
refractionpcsx2
cdd88a6e5c GS-HW: Fix std::sort comparator for purging hash cache 2023-04-27 09:07:21 +01:00
refractionpcsx2
5a73fa2d23 GS-TC: Update dirty read overlap on local mem invalidate 2023-04-27 09:07:05 +01:00
Stenzek
0367851b8e GS: Make TEXFLUSH a flag instead 2023-04-26 16:00:59 +01:00
Stenzek
33b2f6331c GS/HW: Allow auto flush to be applied only to sprites 2023-04-26 16:00:59 +01:00
Stenzek
befbf57191 GS: Refactor exclusive fullscreen yet again
Also acquire render window as late as possible.
Limits the duration that the main window isn't displaying anything.
2023-04-26 16:00:39 +01:00
JordanTheToaster
20d040d5d1 GameDB: Disney Golf Fixes
Fixes for grass rendering to match software with mipmapping and trilinear filtering.
2023-04-26 02:07:15 +01:00
TellowKrinkle
06fdc75945 CMake: Properly fail on windeployqt failure 2023-04-26 02:06:58 +01:00
refractionpcsx2
ded971a3ec Build: Fix Qtdir for windows build workdflows 2023-04-25 22:57:05 +01:00
Stenzek
abc0f99ddd Qt: Move themes to its own file
It's getting a bit out of hand.
2023-04-25 21:53:30 +01:00
Stenzek
b3a88d6ea7 Qt: Migrate to 6.5.0 on Windows 2023-04-25 21:53:30 +01:00
refractionpcsx2
76014b7cb9 GS-TC: Use the expected rect to expand the target when Tex is RT. 2023-04-25 20:53:31 +01:00
Stenzek
0ab6eb6587 GS: Rework texture pooling behavior
- Split into texture/target pools.
 - Keep textures around when they're used recently regardless of size
   (saves work in the backend/driver).
 - Don't boot textures out of the pool when it's an idle frame.
2023-04-25 20:53:21 +01:00
Stenzek
a4e99366fb GS/HW: Put a cap on the hash cache count
As well as VRAM usage. Stops Corvette allocating 16,000+ textures.

Also reduce max age for hash cache sources, since they get kept around
in the latter for another 30 frames.
2023-04-25 20:53:21 +01:00
Stenzek
a32ab4cc97 GS: Refactor ResizeTexture() to ResizeRenderTarget() 2023-04-25 20:53:21 +01:00
JordanTheToaster
e7f3c42f9d GameDB: Various FIFA 2001-2004 fixes
Fixes for broken player textures and some missing fixes.
2023-04-25 20:53:05 +01:00
Ty Lamontagne
d76a0d7416 Debugger: Implement BC0XY branches & their condition evaluation 2023-04-25 17:28:31 +01:00
Stuart Kenny
79f4af8ab5 Qt: Delete SDLRawInput on non win32 builds 2023-04-25 15:05:30 +01:00
Stuart Kenny
a5f83329cb FullscreenUI: Only show SDL Raw on win32 builds. 2023-04-25 15:05:30 +01:00
rayanHappy
267479f31d Misc: Cmake and GCC compiler flags cleanups 2023-04-25 15:04:39 +01:00
rayanHappy
164462e510 Misc: Remove ICC compiler support 2023-04-25 15:04:39 +01:00
TellowKrinkle
6331df306f qt:resources: Use black and white icon for forum menu entry 2023-04-25 15:04:26 +01:00
TellowKrinkle
027ceebcbd qt:resources: Use black and white icons for discord menu icon 2023-04-25 15:04:26 +01:00
TellowKrinkle
edb2c0080c qt:resources: Use separate black/white github icon 2023-04-25 15:04:26 +01:00
TellowKrinkle
caafc87b29 qt:resources: Sort qrc filenames
Many filesystems (e.g. btrfs, apfs) return results in some internal non-alphabetical ordering, which isn't great for minimizing changes to files
2023-04-25 15:04:26 +01:00
TellowKrinkle
5d37cac4a0 qt:resources: Skip dotfiles when generating qrc 2023-04-25 15:04:26 +01:00
Stenzek
8f68e096d4 GS/HW: Avoid render pass restarts to turn off RT
Significantly reduces render passes in Sly 2.
2023-04-24 22:17:25 +01:00
Stenzek
430cad48e3 GS/Metal: Get rid of redundant pointer 2023-04-24 22:17:04 +01:00
Stenzek
757a9532e6 GS: Add Render Pass stats 2023-04-24 22:17:04 +01:00
KamFretoZ
f26f8cafa9 Qt: Even more fixes to the Cobalt Theme 2023-04-24 19:24:19 +02:00
KamFretoZ
128a79e355 Qt: Help menu icon fix for macOS user 2023-04-24 19:24:19 +02:00
PCSX2 Bot
cc2d99db3a PAD: Update to latest controller database. 2023-04-24 19:21:18 +02:00
KamFretoZ
30a31d931a Qt: Add extra icons to the help menu 2023-04-23 03:56:36 +01:00
KamFretoZ
1c30d449bf Tools: Fix filename lookup error on the python glyph updater script 2023-04-23 03:56:36 +01:00
refractionpcsx2
dc4ce58248 VU-JIT: Avoid writeReg stealing loadReg GPR 2023-04-23 03:54:53 +01:00
Mrlinkwii
dc93e861c7 GameDB: various fixes 2023-04-22 23:58:58 +01:00
refractionpcsx2
960daf27e2 GameDB: Add FullVU0SyncHack to the linter 2023-04-22 23:38:05 +01:00
Goatman13
844f21344d GameDB: Add patch for Michigan: Report from Hell 2023-04-22 16:55:27 +01:00
refractionpcsx2
535ad110e3 VU-JIT: Backup non cached VI before writing to it when load != write 2023-04-22 15:15:25 +01:00
JordanTheToaster
0e0d7a5441 GameDB: Various fixes
Fixes for vertical lines in Ring of Red and invisible text in Dynasty Warriors 2.
2023-04-22 03:03:27 +01:00
SeruranBlue
ed63221c7e GameDB: Fixes for Air Ranger: Rescue Helicopter (#8711) 2023-04-22 03:02:46 +01:00
seta-san
f9c2d7767d CDVD: Fix Error Message in InputIsoFile.cpp 2023-04-21 10:53:48 +01:00
Berylskid
cb91478590 UI: Correct Recommended Value for Show Indicators 2023-04-20 10:18:25 +01:00
Mrlinkwii
5dec7fe27d GameDB : fixes for Hanjuku Hero 4 2023-04-19 23:30:31 +01:00
Berylskid
575d487c65 GameDB: Fix Armored Core water and game names (#8702) 2023-04-19 19:14:37 +01:00
Stenzek
2b9289f402 GS/HW: Fix missing init of non-CLUT replacement textures 2023-04-19 13:38:20 +01:00
Mrlinkwii
9273683d3c GameDB: fixes for Dark cloud 2023-04-17 21:06:48 +01:00
PCSX2 Bot
88f8465e7e PAD: Update to latest controller database. 2023-04-17 20:02:50 +02:00
refractionpcsx2
f26031cada Vif: Fix up Instant DMA behaviour 2023-04-16 21:15:26 +01:00
JordanTheToaster
3352d71515 GameDB: Various fixes
Fixes for a potential slowdown in Super Robot Taisen and replace disabling Instant VU with InstantDMA in MGS 3 Subsistence.
2023-04-16 21:10:31 +02:00
Connor McLaughlin
999f9532ee GS: Warning fix 2023-04-16 06:43:22 +01:00
Stenzek
d1f62ca9bf GS: Remove GSVertexList
It doesn't appear to be used anywhere.
2023-04-16 06:35:05 +01:00
Stenzek
ef9f0cf635 GS: Replace magic alignment number with constant
And ensure it gets used in None preloading.
2023-04-16 06:35:05 +01:00
Stenzek
d745564451 GS/HW: Adjust Black/Burnout sky CRC hack
Apparently some stages use a sky height of 128 instead of 256?
2023-04-15 22:01:38 +01:00
Stenzek
d37ac992fc GS/HW: Use bitfield extract for VS expand (GL/VK) 2023-04-15 20:10:25 +01:00
Stenzek
e7fc3de90c GS/HW: Ensure region texture mipmaps don't go out of bounds 2023-04-15 20:10:15 +01:00
Stenzek
bde81380c3 GS/SW: Stop C rasterizer crashing with AA1 2023-04-15 20:10:03 +01:00
Stenzek
839b482cb5 GS: Use 16-bit indices instead of 32-bit
Save some bandwidth.
2023-04-15 20:10:03 +01:00
Stenzek
72f70d4789 GS/Vulkan: Clear textures/RTs at end of frame
Prevents us from updating potentially changed-state descriptors.
2023-04-15 20:09:48 +01:00
Stenzek
d646bbf5c1 GS/Vulkan: Prioritize VK_EXT_rasterization_order_attachment_access
.. over the ARM version. But continue to support both.
2023-04-15 20:09:48 +01:00
Stenzek
e68aaf6540 GS/Vulkan: Saturate ImGui scissor to zero 2023-04-15 20:09:48 +01:00
Stenzek
20ab5ed0fa GS/Vulkan: Don't assume opaque composite alpha is supported 2023-04-15 20:09:48 +01:00
Stenzek
8590e390a2 GS/Vulkan: Don't enable geometryShader 2023-04-15 20:09:48 +01:00
Stenzek
ab1d558420 GS/Vulkan: Make provoking vertex consistent across pipelines 2023-04-15 20:09:48 +01:00
Stenzek
53c9021455 GS/HW: Don't attempt to colour copy into depth target 2023-04-15 20:09:26 +01:00
Stenzek
8bd00e2433 GS: Remove unused scissor variables 2023-04-15 18:01:52 +01:00
Stenzek
c045feae50 GS/HW: Skip draws on reset until scissor is set 2023-04-15 18:01:52 +01:00
Stenzek
7531080e51 GS/HW: Only force shader sampling for non-32bit targets
Not sources.
2023-04-15 17:37:34 +01:00
TellowKrinkle
bf57ab3e39 GS:OGL: Support vs expand on older GL with SSBO extension 2023-04-15 04:29:10 +01:00
JordanTheToaster
dfcb96a4b6 GameDB: Various fixes
Fixes for bloom alignment in Dogz and Catz and broken sun in Ace Combat 4.
2023-04-14 23:01:26 +01:00
refractionpcsx2
5c4fad6725 GameDB: Remove no longer needed Spyro patches 2023-04-14 18:17:44 +01:00
refractionpcsx2
988b1ad03b SPU2: Don't make end IRQ positions inclusive 2023-04-14 18:17:44 +01:00
refractionpcsx2
79705a2514 SPU2: Increase maximum ADSR rate from 0x3FFF to 0x4000 2023-04-14 18:17:44 +01:00
JordanTheToaster
0919b15183 GameDB: Various fixes
Fixes for Dogz and Catz vertical lines and black squares and a workaround for FMVs causing screen shaking in NFS U2.
2023-04-14 13:13:35 +01:00
kenshen112
8162c87884 GameIndex: Added Boss Hang Fix to more regions.
Added Kirie hang fix to Fatal Frame Korea and Asia.
2023-04-14 09:23:35 +01:00
Stuart Kenny
09394ee4b7 Qt: Hide SDL Raw option on non win32 builds 2023-04-13 12:14:15 +01:00
Stenzek
7f7dd60587 GS/HW: VS expand instead of GS for DX/GL/Vulkan 2023-04-13 11:12:11 +01:00
Stenzek
6877abb2ec GS/HW: Remove FFXII CRC hack
No longer needed, and it causes issues with splitting point draws.
2023-04-13 11:12:11 +01:00
Stenzek
ce5dd88790 GS/OGL: Fix GL error on shutdown 2023-04-13 11:12:11 +01:00
Stenzek
5bc9d625e7 GL/StreamBuffer: Align CPU side fallback buffers 2023-04-13 11:12:11 +01:00
Connor McLaughlin
1d7a69ad40 AppImage: Include libxcb-cursor 2023-04-13 10:51:09 +01:00
JordanTheToaster
f7d87076a3 Qt: Adjust MTVU core count text
The wording here was causing confusion and unneeded arguments over what it actually means.
2023-04-13 09:39:02 +01:00
JordanTheToaster
9d20b4d6a6 GameDB: Soulcalibur 2&3 blending recommendations
Fixes menu transparency when using high blending.
2023-04-13 09:39:02 +01:00
TellowKrinkle
128cf9b57d 3rdparty:macOS: Update to Qt 6.4.3
Gives us 5 more months to decide whether we want to use 6.2 LTS or drop macOS 10.14 and macOS 10.15 support
2023-04-13 08:27:49 +01:00
TellowKrinkle
e5b7adb228 3rdparty:linux: Update to Qt 6.5.0 2023-04-13 08:27:49 +01:00
TellowKrinkle
bd5ae66fbe 3rdparty: Update SDL to 2.26.5 2023-04-13 08:27:49 +01:00
Romain Tisserand
a3af4155f8 3rdparty: Bump libchdr to support raw DVD ISO as CHD 2023-04-12 09:37:46 +01:00
refractionpcsx2
1ec83dc790 SPU2: Fix savestate loading setting incorrect variable 2023-04-11 18:45:27 +01:00
Stenzek
f26cc38b80 SPU2: Store DMA pointers as offsets in save state
[SAVEVERSION+] Sadly need to bump save state, don't want to have a mess
of different version handling here.
2023-04-11 15:30:54 +01:00
lightningterror
d9f537e9dc GS-hw: Fix Wsign-compare warning. 2023-04-11 01:06:15 +02:00
PCSX2 Bot
94c75df0d0 PAD: Update to latest controller database. 2023-04-10 20:35:28 +02:00
Stenzek
423a8884e8 GS/Vulkan: Don't try to render out of bounds in Interlace() 2023-04-10 16:51:01 +01:00
Stenzek
1f26502c64 GS/HW: Always convert float depth to integer on readback
Even if it's been reinterpreted as a colour format.
2023-04-10 16:51:01 +01:00
dependabot[bot]
f61f7bb711 Bump peter-evans/create-pull-request from 4 to 5
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 16:13:04 +02:00
KamFretoZ
971acd3fdb Qt: Fills in the settings help description fields 2023-04-09 19:13:09 +01:00
JordanTheToaster
bba070bdbf GameDB: PAL ZoE 2 Text fix
Fixes cut off text in PAL versions of Zone of the Enders 2
2023-04-09 19:12:56 +01:00
Connor McLaughlin
6c4152a7e0 GS/HW: Update 32-bit flag for depth buffers too
Jackie Chan Adventures re-uses a previous C32 target pointer as a Z16S
depth buffer, but it does clear it inbetween. So we need to remove the
32-bit flag on the clear.
2023-04-09 17:56:49 +01:00
Stenzek
f569ad0970 GS/HW: Allow translating targets for depth sources
Fixes broken half screen in Miami Vice and 10 Pin - Champions Alley.
2023-04-09 17:56:49 +01:00
Stenzek
f16a291412 GS/HW: Adjust TextureMinMax end coordinate when point sampling 2023-04-09 17:56:49 +01:00
refractionpcsx2
e0cfa2dff3 EE/COP2: Increase likely clear sync 2023-04-09 17:23:09 +01:00
Stenzek
bf9d087e74 GS/HW: Adjust Burnout CRC to fully skip broken post effect 2023-04-09 16:28:57 +01:00
JordanTheToaster
b245dd55d6 Github: Change emu bug report template
Missed when changing the other template.
2023-04-09 16:26:23 +01:00
JordanTheToaster
1e3f429169 GameDB: Various fixes
Alieviates high VU % usage in Pilot Down Behind Enemy Lines and sets max blending level to minimum for other Monster Hunter games to fix heavy GPU usage for no reason.
2023-04-09 16:26:23 +01:00
refractionpcsx2
8d429c7e5a GameDB: Update the VU clamp mode on Ultimate Spider-Man 2023-04-09 16:24:46 +01:00
Stenzek
b9be3ad3b8 GS/HW: Tiny optimization in source lookup
Don't want to do divides per-target.
2023-04-09 06:01:54 +01:00
refractionpcsx2
3099090e6a GameDB: Add InstantDMA to Jak 3 for holes in face geometry 2023-04-09 05:56:58 +01:00
refractionpcsx2
5e27c65615 EE/COP2: Check for likely zero clears in COP2 synced ops 2023-04-09 05:55:15 +01:00
refractionpcsx2
8b32382e1b GameDB: Add Autoflush and HPO Special to Ultimate Spider-Man 2023-04-09 03:31:41 +01:00
arcum42
60047e8029 common: Remove some unneeded includes. 2023-04-08 20:26:39 +01:00
arcum42
e37fff1213 common: Remove SafeList and SafeAllignedArray as unused. 2023-04-08 20:26:39 +01:00
JordanTheToaster
64a6d8027b GS: Reset performance counters on renderer switch
Resets performance counters on renderer switch.
2023-04-08 13:37:21 +01:00
Stenzek
cd4434135e GSRunner: Don't skip dumps with dots in their filename 2023-04-08 13:36:45 +01:00
Stenzek
747e11d7dd GS/HW: Allow region targets for half-right fix 2023-04-08 12:44:33 +01:00
Stenzek
3cae728aba Qt: Recreate new window immediately when switching APIs 2023-04-08 12:42:34 +02:00
Stenzek
7f24a5cf82 GS: Fix crash when resizing window 2023-04-08 04:05:45 +01:00
refractionpcsx2
1b8f5f232a GS-HW: Fix bug with looping invalidation 2023-04-08 00:08:08 +01:00
refractionpcsx2
77d37de18c GameDB: Add mipmapping to Hasbro Family Game Night 2023-04-07 20:34:03 +01:00
Mrlinkwii
5ea3fb8e1e Github: Update issue template 2023-04-07 19:52:50 +01:00
refractionpcsx2
d683aa43d8 GS: Clean up Host->Local code 2023-04-07 17:18:33 +01:00
refractionpcsx2
d4c3501bb8 GS: Retool downloads to buffer full read 2023-04-07 17:18:33 +01:00
Stenzek
f2229a0007 GS/OGL: Don't leak shader objects when compiling 2023-04-07 17:18:21 +01:00
Stenzek
2a06bb6e2c GS/OGL: Use VS/GS selectors from base class 2023-04-07 17:18:21 +01:00
lightningterror
a06f890ab9 GS: Fix Wunused-variable warning. 2023-04-07 01:26:00 +02:00
refractionpcsx2
bbe22f95d1 GS: Avoid modifying single QW downloads as they go to a register
Also avoid downloading more than requested
2023-04-06 23:26:59 +01:00
Stenzek
631f75a79c GS/HW: Don't break out of target search loop on dirty target 2023-04-06 14:28:19 +01:00
Stenzek
c121aae8f1 GS: Add VS natvis files for FastList and TC Targets 2023-04-06 14:27:36 +01:00
refractionpcsx2
fed7629632 GS: Fix typo in ResizeTexture which was causing a crash 2023-04-06 14:27:08 +01:00
Stenzek
0825ca736f GS/HW: Add other StretchRect() calls to texture copies counter
Better reflects GPU work.
2023-04-06 14:20:20 +01:00
Stenzek
660974c9d1 GS/HW: Update target in new format when reinterpreting
Fixes block scrambling in Budokai 3 during screen transitions.
2023-04-06 14:20:20 +01:00
Stenzek
4404b06d2a Qt: Fix lockup when cancelling shutdown and fullscreen 2023-04-06 08:48:07 +01:00
Stenzek
daef69099b Qt: Fix improper shutdown with CTRL+C 2023-04-06 08:48:07 +01:00
Stenzek
6362994fd8 GS: Default to Vulkan for suitable GPUs on Linux 2023-04-06 08:48:07 +01:00
Stenzek
398cf43782 GS: Combine HostDisplay with GSDevice
GS/DX11: Don't throw bad_alloc on surface creation fail

GS: Link device and host display construction/destruction

FullscreenUI: Replace HostDisplayTexture with GSTexture

GS: Purge HostDisplayTexture

GS: Move everything in HostDisplay to GSDevice

GS: Move ImGui rendering to GSDevice

GS: Get rid of reset/store API state
2023-04-06 08:48:07 +01:00
refractionpcsx2
77f8a0f5f6 Counters: Retool UpdateVSyncRate 2023-04-06 08:47:35 +01:00
lightningterror
d7e54ccbed CDVD: Fix struct member variables not used.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror
53a8855696 INISettingsInterface: Fix scope of variable warning.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror
bd16ed1340 iR5900: Fix scope of variable warning.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror
dd365fe334 GS-hw/tc: Fix Wsign-compare warnings. 2023-04-05 20:15:18 +02:00
refractionpcsx2
2a6ba739bc GS-HW: Fix stretch rects errantly discarding data 2023-04-05 16:29:36 +01:00
refractionpcsx2
a863466f70 GS-HW: Better handle double half clears + masked channels + invalidate
Also add Auto Flush to Power Drome US, apparently it wasn't there.
2023-04-05 16:29:36 +01:00
refractionpcsx2
32f07f4aae GS-HW: Read back TC on GS CSR Reset 2023-04-05 16:29:36 +01:00
refractionpcsx2
3ed0e010be GS-TC: Improve handing of wrapping targets in tex in rt 2023-04-05 16:29:36 +01:00
GiladNir
fb3c0c8138 GameDB: Added fixes for Fatal Frame and Siren 2023-04-05 15:10:48 +01:00
Stenzek
58ded2e0d0 GS/HW: Fix incorrect hashing of non-palette textures 2023-04-05 15:01:42 +01:00
Stenzek
369b9a4808 Misc: Fix up a few recent clang warnings 2023-04-05 12:43:45 +01:00
Stenzek
0bd57986a9 GS/HW: Don't try to use forced trilinear on shuffles 2023-04-05 12:43:45 +01:00
refractionpcsx2
559b88438b GS: Fix some Scanmask situations in PCRTC 2023-04-04 17:33:32 +01:00
refractionpcsx2
5d140f7db3 GS: Fix missing PSM references. 2023-04-04 17:32:59 +01:00
Stenzek
7b512ce296 GS/HW: Fix Final Fantasy XII CRC hack 2023-04-04 17:27:57 +01:00
refractionpcsx2
ada291c0f6 GS: Remove redundant PSM enum naming 2023-04-04 13:56:44 +01:00
refractionpcsx2
857cb36707 GS-HW: Add CRC hack for NFS Undercover to handle weird shuffle 2023-04-04 13:56:44 +01:00
refractionpcsx2
4a702e0585 EE: Clear reset required status on JIT overflow reset 2023-04-04 11:16:31 +01:00
refractionpcsx2
eac420f205 GameDB: Replace Tex in RT with Partial Target Invalidation, Dark Cloud 2 2023-04-03 21:54:31 +01:00
TellowKrinkle
23d4fa9d9e GS:MTL: Process uv in place
The separate uv_out made it easy to make mistakes, especially when copying code from other renderers
2023-04-03 20:21:15 +01:00
From: TellowKrinkle
f6523f34d8 GS:MTL: Implement region rect 2023-04-03 20:21:15 +01:00
TellowKrinkle
82971d3ef7 GS:MTL: Test and sample depth should be supported
Untested, but we restart the render pass if it's detected, which should be accurate, even if it's not the most efficient.
2023-04-03 20:21:15 +01:00
PCSX2 Bot
8d9a5111a1 PAD: Update to latest controller database. 2023-04-03 18:10:16 +02:00
Stenzek
e8dac0051c GS: Move expanded dither storage to software renderer
Hardware doesn't use it.
2023-04-03 14:19:46 +01:00
Stenzek
72802aa125 GS/HW: Move channel shuffle test to top of Draw() 2023-04-03 14:19:46 +01:00
Stenzek
f77a5c23fc GS/HW: Get rid of GSFrameInfo 2023-04-03 14:19:46 +01:00
Stenzek
cf772fcdd6 GS: Reuse backup environment instead of copying 2023-04-03 14:19:46 +01:00
Stenzek
4313c64d9d GS: Remove unused offsets (tex/fzb) 2023-04-03 14:19:46 +01:00
refractionpcsx2
38bf916231 GS: Update fixes for Sacred Blaze 2023-04-02 19:44:11 +01:00
refractionpcsx2
cf59c0b854 GS/Counters: Catch SMODE changes and update VSync rate 2023-04-02 16:19:11 +01:00
refractionpcsx2
10e192deed GS/Counters: Use progressive check, not GSSetCRT for interlace mode 2023-04-02 16:19:11 +01:00
refractionpcsx2
b3fb6e7822 GS: Don't reset CRT mode on reset 2023-04-02 13:11:27 +02:00
Stenzek
3f640ed7eb GS/HW: Fix blue screen in GT4 transitions 2023-04-02 13:10:08 +02:00
Stenzek
cc814585ee GS/OGL: Fix incorrect binding in multi stretch rect 2023-04-02 04:29:56 +01:00
refractionpcsx2
b0d26c8242 EE: Correct FPU_MUL_HACK result value 2023-04-02 04:09:47 +01:00
Stuart Kenny
4133be28c6 USB: Remove force feedback logspam 2023-04-02 01:56:00 +01:00
JordanTheToaster
6e81879436 GameDB: Various fixes
Fixes for Driv3r and VP2.
2023-04-01 23:45:10 +01:00
refractionpcsx2
5ea670ece4 GS-HW: Handle triangle memory clears 2023-04-01 16:47:29 +01:00
Stenzek
e8e9702d7e GS/HW: Swap Crash WoC CRC hack for native palette draws 2023-04-01 15:45:14 +01:00
Stenzek
4cbdbaabdb GS/HW: Add NativePaletteDraw upscaling fix 2023-04-01 15:45:14 +01:00
Stenzek
f332d4f880 GS/HW: Set no_ds if Z tests are disabled and masked 2023-04-01 15:45:14 +01:00
Stenzek
5ce418cdaf GS/HW: Set m_channel_shuffle if late tests succeed 2023-04-01 15:45:14 +01:00
Stenzek
81ab2b9cd1 GS/HW: Minor texture cache cleanups 2023-04-01 15:45:14 +01:00
Stenzek
c441d76b7b GS/HW: Fix some asserts tripping in debug builds 2023-04-01 15:45:14 +01:00
Stenzek
fcbc027abc GS: Unify D3D device creation paths
Also makes Vulkan the device for Intel Arc GPUs.
2023-04-01 14:15:18 +01:00
Stenzek
8989b69ce8 GS: Fix crash on shutdown when using software renderer 2023-04-01 14:14:19 +01:00
Stenzek
e9a624ab54 Qt: Fix main window closing on fullscreen shutdown 2023-04-01 14:14:00 +01:00
Stuart Kenny
8a9df89bf6 SDLInputSource: SDL raw input as config option. 2023-04-01 02:32:01 +01:00
JordanTheToaster
e95d75e01f GameDB: Fix missing Tekken 5 demo
Fixes for missing Tekken 5 demo that caused camera issues.
2023-04-01 01:44:17 +01:00
Mrlinkwii
bbe58b07a8 GameDB: fixes for Super Trucks Racing 2023-03-31 21:29:46 +01:00
tangomike99
7886c9ea27 GameDB: Fix fog line in Over the Hedge 2023-03-31 21:29:34 +01:00
tangomike99
1c072f38bb GameDB: Fix blurriness in Sitting Ducks 2023-03-31 21:29:34 +01:00
KamFretoZ
6c2bbdef1f Qt: Theme Polishes for Pizza and Cobalt 2023-03-31 20:16:33 +01:00
Stenzek
a5ebb388a0 CMake: Enable RAIntegration on Windows builds 2023-03-31 15:46:33 +01:00
Buzzardsoul
9c91c700ac GameDB: Add roundsprite 2 to Samurai Warriors 2 2023-03-31 11:59:44 +01:00
Stenzek
28b111b669 x86/iFPU: Inline FPU_MUL_HACK to dynarec
Fixes Tales of Destiny crashing on clang builds (clang was using r8,
which was allocated by a caller, msvc was not).
2023-03-31 11:39:46 +01:00
Stenzek
1be6e1f374 Misc: Fix a bunch of warnings 2023-03-31 11:39:46 +01:00
Stenzek
fff8592b4e GS/HW: Fix GT4/T5 CRC hacks in DirectX renderers 2023-03-31 11:24:31 +01:00
lightningterror
4af3856d15 GS: Bump shader cache version. 2023-03-31 10:18:27 +01:00
lightningterror
8a06fb1840 GS: Fix fxaa bad shader on opengl. 2023-03-31 10:18:27 +01:00
Stuart Kenny
e2e2ab62f4 MSBuild: Enable DirectX in cmake SDL build 2023-03-31 10:12:14 +01:00
Ty Lamontagne
e7e3f30fce 3rdparty: Update SDL2 2023-03-31 02:06:32 +01:00
Stenzek
affc45e752 GSDumpReplayer: Fix crash when downloading Z24 targets
e.g. Lego Racers 2
2023-03-30 21:55:50 +01:00
Stenzek
d70334ee57 GS/HW: Slight shader simplification
- Don't declare texture if it's not read from. Stops Vulkan validation
   layers whinging.

 - Get rid of OpenGL common_header.glsl, and use name linking instead of
   leftovers from separate shader objects.
2023-03-30 21:55:50 +01:00
Stenzek
1c600c7068 GS/HW: Remove m_used from SourceMap
Not used anymore, since we don't age the TC when there's no draws.
2023-03-30 21:55:50 +01:00
Stenzek
7a93f1fc23 GS/HW: Remove KOF2002/SVCChaos CRC hacks
10 Pin - Champions Alley needs texture-inside-RT in LookupDepthSource(),
but otherwise nothing else appears to break if we fall back to normal
lookup for Z sources.

Relaxes the page alignment requirement for split texture shuffle
detection, Psi-Ops does an A->A copy with coordinates offset by +8.
2023-03-30 21:55:50 +01:00
Stenzek
9c2f7aeb6a GS/HW: Get rid of reset-32bits-fmt flag hack
Doesn't appear to be needed anymore.
2023-03-30 21:55:50 +01:00
Stenzek
8af2d17d1f GS/HW: Cache target widths as well as heights
Avoids redundant resizes.

Also align widths to page sizes, like heights.
2023-03-30 21:55:50 +01:00
Stenzek
65d78eff57 GS/HW: Sample depth buffer instead copying when safe
OpenGL and Vulkan only.
2023-03-30 21:55:50 +01:00
Stenzek
8be9e2dc71 GameDB: Remove preload/CPU FB for Crash WoC
Fog effect works correctly now (at least at 1x).
2023-03-30 21:55:50 +01:00
Stenzek
faecc6913b GS/HW: Texture cache improvements
GS/HW: Only use temporary source for recursive draw

.. and don't insert it into the page map.

GS/HW: Lookup page list for depth sources

GS/HW: Avoid target copies by using shader sampling

GS/HW: Make texture cache a global pointer

GS/HW: Remove GetID() from GSTexture

It only made sense for OpenGL, was always zero in Vulkan.

GS/HW: Rewrite texture sampling hazard detection

Also avoid redundant channel shuffle setup.

GS/HW: Turn Haunting Ground CRC into an OI fix
2023-03-30 21:55:50 +01:00
Stenzek
ed90c8868f GS/HW: Don't leave ZBUF_TEX0 partially uninitialized 2023-03-30 21:55:50 +01:00
Stenzek
71edce43ca GS/HW: Fix incorrect condition for continuing channel shuffle 2023-03-30 21:55:50 +01:00
Stenzek
4e9ef34f58 GS/HW: Fix incorrect end block computation in Overlaps() 2023-03-30 21:55:50 +01:00
Stenzek
de55596926 GS/Vulkan: Include source code in shader debug info 2023-03-30 21:55:50 +01:00
JordanTheToaster
316bc422bc GameDB: Various fixes
Fixes lack of sun intensity in WRC texture distortion in Ultimate Spiderman and missing serials and fixes for those serials for Sakura Taisen.
2023-03-30 20:40:03 +01:00
Stenzek
c73ae3dfb3 x86/iR5900: Get rid of eeRecIsReset
It was preventing the rec being reset inbetween launching different games.
2023-03-30 19:45:11 +01:00
Stenzek
27b45276ae SPU2: Remove GetLongName() from SndOutModule
Unused since WX.
2023-03-30 16:55:17 +01:00
JordanTheToaster
b00852fada GameDB: More WWE text fixes
Adds the text fix to WWE 2007 to 2010
2023-03-30 11:03:29 +01:00
refractionpcsx2
663f61f4e1 GS-TC: only escape Local Mem Invalidate early on exact BP match 2023-03-30 11:03:10 +01:00
refractionpcsx2
110bc64ee4 GS-TC: Fix up page translation logic, clean up variables 2023-03-30 11:03:10 +01:00
refractionpcsx2
3764e773b3 GS-HW: Check what channel is being read during a possible split shuffle 2023-03-30 11:03:01 +01:00
icup321
682f0c7984 GameDB: Add Mipmap/Trilinear to SpongeBob Movie & Incredibles
Update settings for The Incredibles + ROTU and The SpongeBob Movie Game
2023-03-30 09:46:43 +01:00
JordanTheToaster
93014bfede CI: Switch Windows Qt builds to Clang
Switches the Qt builds over to using Clang by default which should be a bit faster overall.
2023-03-30 09:27:10 +01:00
JordanTheToaster
4dd946bc8a CI: Remove separate Windows builds
Removes the AVX2 and SSE4 builds in favour of the unified Qt build.
2023-03-29 20:00:51 -05:00
JordanTheToaster
2222007516 GameDB: WWE 2011 Text fixes
Fixes for the broken text in WWE 2011.
2023-03-29 17:28:55 +01:00
refractionpcsx2
b09e3b0613 GS: Split ModXY in to its own function 2023-03-29 17:08:41 +01:00
refractionpcsx2
3a193956ff GS: Provide HPO Normal offsets when there is no RT. 2023-03-29 17:08:41 +01:00
Mrlinkwii
786eedf2f2 GameDB: fixes for various games 2023-03-29 15:18:16 +01:00
Stuart Kenny
f217519e97 GameDB: Fix WRC 4 car discolouration 2023-03-29 11:50:13 +01:00
Buzzardsoul
4caaa70726 GameDB: Add Mipmap and Trilinear to The Incredibles 2023-03-28 21:54:57 +01:00
JordanTheToaster
02a27a6974 GameDB: Rogue Galaxy character fix
Fixes broken characters in Rogue Galaxy.
2023-03-28 19:52:17 +02:00
Stenzek
6d7eceb4f1 GS/HW: Remove JakGames/JakX CRC hack 2023-03-28 11:21:47 +01:00
Stenzek
f52e72b026 GS/HW: Swap OI_JakGames CRC hack for CPU sprite render 2023-03-28 11:21:47 +01:00
Stenzek
ebeb646e4d GS/HW: Relax CPU sprite render requirements further via levels 2023-03-28 11:21:47 +01:00
refractionpcsx2
70c1620a87 GameDB: Add Partial Target Invalidation for Fatal Frame III
aka Project Zero 3
2023-03-28 11:09:44 +01:00
refractionpcsx2
d45964d0c7 GS-HW: improve dirty handling with expanded tex is rt's 2023-03-28 11:09:44 +01:00
refractionpcsx2
e67aa73e75 GS-HW: Round up rect for hardware draws 2023-03-28 11:09:44 +01:00
refractionpcsx2
cb2fe3792a GS-HW: Resize RT used as larger source 2023-03-28 11:09:44 +01:00
Stenzek
2b94cfe782 GS/HW: Allow strip channel shuffles to be detected
Fixes fog wall in WRC 4.
2023-03-27 18:29:01 +02:00
PCSX2 Bot
a1c99f3e7a PAD: Update to latest controller database. 2023-03-27 18:28:13 +02:00
Stenzek
57fa3ac653 ChdFileReader: Prefer using TOC for file size over header
The header is incorrect, and pads each track to 4 frames.
2023-03-27 10:21:10 +01:00
refractionpcsx2
01b6e1b88d CDVD: Add missing TOC information 2023-03-27 10:21:10 +01:00
refractionpcsx2
294aca82c4 GS-TC: Give option to match target on exact memory addresses
Chances of it being the wrong thing but having the same start/end address is pretty slim. Hopefully
2023-03-26 22:28:23 +01:00
refractionpcsx2
d080e7e7bd VTLB: Show rough EE PC when a TLB miss happens 2023-03-26 22:14:28 +01:00
refractionpcsx2
66a13d4c3a GS-TC: Only stop checking for RT's if whole read is inside that RT. 2023-03-26 15:28:14 +01:00
JordanTheToaster
87c76ad010 GameDB: Various fixes
Helps alleviate some issues in Shrek 2 and removes round sprite and merge sprite from Driv3r as they cause issues
2023-03-25 06:16:25 +00:00
Dreadmoth
822d292e2f GameDB: Ratchet & Clank 1&2
Fixes broken pause menu.
2023-03-25 06:06:24 +00:00
KamFretoZ
42155dd11b Qt: Add a New Light Theme and Cobalt Theme Fix (#8471) 2023-03-24 12:03:05 +00:00
Stenzek
9b1a2d9eaf GS/DX11: Fix incorrect UBO for P8 conversion 2023-03-24 11:43:51 +00:00
TellowKrinkle
8d0307cedd UI: Fix build with achievements disabled 2023-03-23 23:48:40 -05:00
refractionpcsx2
72b38ce712 CDVD: Don't auto mount disc again if game ejects it. 2023-03-23 20:40:45 +00:00
refractionpcsx2
caf8eedd76 CDVD: Correct SCMD error states and init SCMD result 2023-03-23 20:40:45 +00:00
refractionpcsx2
181b05daf0 CDVD: Don't let it try to close the tray if it isn't open 2023-03-23 20:40:45 +00:00
refractionpcsx2
92b21ac9c2 CDVD: Correct status sequence during disc swap. 2023-03-23 20:40:45 +00:00
Berylskid
ad12a3f735 UI: Correct Recommended Values for a few items (#8465) 2023-03-22 13:25:31 +00:00
Stenzek
badca7c20b GS/HW: Fix texture replacement precaching option 2023-03-22 10:03:31 +00:00
Stenzek
7cdcfd4b1a Qt: Remove backup AppImage on next launch 2023-03-21 13:48:50 +00:00
Stenzek
b02af117f8 CMake: Swap -g for -g1 in Linux Release builds
-g tends to blow the AppImage sizes up a bit too much...
2023-03-21 13:48:16 +00:00
Stenzek
87d269512e GS/HW: Compiler warning fixes 2023-03-21 13:15:31 +00:00
Stenzek
3346349bba GS: Remove GSDeviceNull
It hasn't been used in a while, we just use a normal device
and null renderer instead.
2023-03-21 13:15:31 +00:00
Mrlinkwii
280a41806f GameDB: fixes for Metal Gear Solid 3 Snake Eater 2023-03-20 21:27:03 +00:00
Ikko Eltociear Ashimine
134937082d Counters: fix typo
recieve -> receive
2023-03-20 15:46:56 +00:00
Stenzek
1499994143 CI: Update Linux to Qt 6.4.3 and SDL2 2.26.4 2023-03-20 15:46:32 +00:00
Stenzek
5805142fd7 CrashHandler: Print backtrace on Linux 2023-03-20 15:46:32 +00:00
Stenzek
5fc855e519 CMake: Add libbacktrace module 2023-03-20 15:46:32 +00:00
Stenzek
8c8bf22892 CI: Build libbacktrace in Linux deps 2023-03-20 15:46:32 +00:00
Stenzek
ec927e5dd9 CMake: Force debug symbols in Linux Release builds 2023-03-20 15:46:32 +00:00
refractionpcsx2
3a042d8c14 GS: Compensate for misaligned 24bit partial local->host transfers 2023-03-20 14:35:31 +00:00
JordanTheToaster
fc88d1de85 GameDB: From Soft game fixes
Adds partial target invalidation to every From Soft game because they used way too much glue.
2023-03-20 11:19:49 +00:00
JordanTheToaster
6cf48e9e2b GameDB: Various fixes
Fixes R&C 3 broken pause menu and broken textures in AC Last Raven.
2023-03-20 10:05:00 +00:00
refractionpcsx2
db22377a0d GS: Remove ExpandTarget on EE Write 2023-03-19 23:32:17 +00:00
Silent
443cc08229 VMManager: Fix "X widescreen patches loaded" text when loading from files 2023-03-19 23:31:52 +00:00
Stenzek
6ad222117d GS: Reduce MAD buffering draw size
It's silly to draw to the whole double-sized render target, but discard
half the pixels.

Also centralizes the constant setup, get rid of the duplication.
2023-03-19 23:31:37 +00:00
Stenzek
b26acad721 GS: Sample LOD 0 explicitly in interlace shaders
Can't use normal sampling because the derivates are undefined in
non-uniform control flow (in MAD).
2023-03-19 23:31:37 +00:00
refractionpcsx2
76e8bfe42f GS-TC: Make sure drawn/target coords match for adjusting drawn rect 2023-03-19 15:18:54 +00:00
refractionpcsx2
1f6704dbda GS-TC: mask target rect with drawn area before download. 2023-03-19 15:18:54 +00:00
Toastarrr
33ea4e6225 Debugger: fix memory search crash 2023-03-19 13:44:11 +00:00
Toastarrr
d9cecbde7d Debugger: use unsigned long long for memory search 2023-03-19 13:44:11 +00:00
JordanTheToaster
84fab9ccd3 ImGuiOverlays: Fix incorrect fix naming
Fixes incorrect target partial invalidation overlay name and makes autoflush more distinct from anisotropic filtering.
2023-03-19 13:18:37 +00:00
JordanTheToaster
137dfc20fa GameDB: Various fixes
Fixes for Smash Cars This is Football 2002 and Champions Return to Arms.
2023-03-19 13:18:37 +00:00
TellowKrinkle
f39e856fee iR5900: Don't limit block sizes to 16 bits 2023-03-19 11:40:51 +00:00
Connor McLaughlin
e91aabc843 Qt: Fix graphics settings opening to other pages
Regression from 2b49614df9
2023-03-19 11:15:53 +00:00
Mrlinkwii
f85a99b6f0 GameDB: fixes for True Crime - Streets of L.A. 2023-03-19 00:15:29 +00:00
TellowKrinkle
a59f95317a Core: Use auto for ryml noderefs
The return type switched between 0.4 and 0.5, so this will be compatible with both
2023-03-18 17:28:30 -05:00
Mrlinkwii
6923000b52 GameDB: remove SoftwareRendererFMVHack from Siren 2 2023-03-18 22:26:41 +00:00
Víctor "IlDucci
83471bdacd Qt:i18n: Adding I18N comments for translators, minor typo fixes (#8048) 2023-03-18 16:14:55 -05:00
refractionpcsx2
18045c195a GameDB: Readd Tex in RT for Xenosaga Ep.III 2023-03-18 17:07:29 +00:00
refractionpcsx2
b1edadfe3a GameDB: Add partial target invalidation to Ratchet Gladiator/Deadlocked 2023-03-18 17:07:29 +00:00
refractionpcsx2
ed5984aa3a GS-TC: Update draw rect on draw + invalidate bad match old targets 2023-03-18 17:07:29 +00:00
refractionpcsx2
bfca8b8461 GS-HW: Update dirty PCRTC framebuffer on output 2023-03-18 17:07:29 +00:00
refractionpcsx2
63cb0f3577 GameDB: Add partial target invalidation to ZoE 2nd Runner + MGS2 2023-03-18 17:07:29 +00:00
refractionpcsx2
2b49614df9 GS-HW: Don't bilinear dirty rects by default, added as upscale hack. 2023-03-18 17:07:29 +00:00
refractionpcsx2
fa439a465d GS-TC: Fix dirty rect sizes and merging. 2023-03-18 17:07:29 +00:00
refractionpcsx2
11a74c2c05 GS: Fix up some dirty behaviour, allow dirtying by page 2023-03-18 17:07:29 +00:00
refractionpcsx2
a693efad1e GameDB: Correct Dog's Life fixes 2023-03-18 17:07:29 +00:00
refractionpcsx2
75357a2f0a GS-TC: Remove uses of Surface Offsets where possible. 2023-03-18 17:07:29 +00:00
refractionpcsx2
a70f5ebc08 GS-TC: Rewrite rect translation 2023-03-18 17:07:29 +00:00
refractionpcsx2
b161df69e1 GS-TC: Fix up expand targets when mixing 24 and 32bit. 2023-03-18 17:07:29 +00:00
refractionpcsx2
85a0e75e28 GameDB: Add needed updates for Siren 2 and Legion 2023-03-18 17:07:29 +00:00
refractionpcsx2
56022a9af3 GS-TC: Remove uses of Surface Offsets where possible. 2023-03-18 17:07:29 +00:00
refractionpcsx2
5cbcf706e9 GS-HW: use page aligned rects for inexact matches when possible 2023-03-18 17:07:29 +00:00
refractionpcsx2
500b449422 GS-HW: Correct region size when source is in render target 2023-03-18 15:36:18 +00:00
Mrlinkwii
8b78388834 GameDB: various fixes 2023-03-18 13:49:37 +00:00
Mrlinkwii
b44d40d919 GameDB: remove not needed game fix for Yakuza 2023-03-18 13:49:17 +00:00
Mrlinkwii
f8310e0a35 GS/CRC : purge Yakuza CRC hack 2023-03-18 13:49:17 +00:00
refractionpcsx2
59dc0e2cbf GS-SW: Fix rects for sw dumps 2023-03-18 12:49:15 +00:00
refractionpcsx2
6a4a7b1a3b HW-CRC: Draw glass smash on CPU in Burnout 3 2023-03-18 12:49:15 +00:00
lightningterror
d62a7999fb GS-hw: Clean up Wunused-variable warnings. 2023-03-17 20:20:10 +01:00
TellowKrinkle
0ba1a42867 CI:macOS: Use xz for distribution
macOS 10.14 fixed a bug where Archive Utility couldn't decompress .tar.xz and is now our minimum version
2023-03-17 03:18:02 +01:00
JordanTheToaster
68ef49aef5 GameDB: SMT DS Fixes
Fixes broken effects when using lower than high blending.
2023-03-17 00:55:51 +00:00
Buzzardsoul
d0a65153df GameDB: Add Mipmap and Trilinear to Spyro: Enter the Dragonfly 2023-03-17 00:55:36 +00:00
refractionpcsx2
ac113b48e7 COP2: Mask R register on CFC2 reads 2023-03-17 00:43:23 +00:00
Mrlinkwii
6e14680ac7 GameDB: add fixes for Lupin III - Columbus no Isan wa Akenisomaru and fix game names 2023-03-16 13:23:09 +00:00
Mrlinkwii
ba03a533d8 GameDB: fixes for Biker Mice from Mars 2023-03-15 23:21:34 +00:00
JordanTheToaster
9abbecb286 GameDB: Various fixes
Fixes for incorrect region codes and adding merge sprite to Zone of Enders 2 to fix beeg bloom.
2023-03-15 20:39:44 +00:00
refractionpcsx2
9a20ea5c21 GS: Detect double width texture shuffles 2023-03-14 18:13:07 +00:00
refractionpcsx2
8ac4b125d2 UI: Fix masking of Target Partial Invalidation with Tex in RT 2023-03-14 15:04:10 +00:00
refractionpcsx2
f9b682ad10 GS: Fix integer scaling when using Bilinear (Sharp) 2023-03-14 14:51:00 +00:00
TellowKrinkle
58959b6114 CMake: Output test logs on failure 2023-03-13 20:45:12 +00:00
TellowKrinkle
b90405a7d2 GHActions:Windows: Add CMake clang-cl build 2023-03-13 20:45:12 +00:00
TellowKrinkle
e0a1613ad9 CMake: Allow overriding the exe name 2023-03-13 20:45:12 +00:00
TellowKrinkle
11930ed7a2 CMake: Clang-cl support 2023-03-13 20:45:12 +00:00
JordanTheToaster
f3ff1cec54 Documentation: Remove unused files
Removes old or unused files from the docs folder.
2023-03-13 20:29:27 +00:00
Stenzek
435e73d838 GS/HW: Texture cache improvements
Change texture scale from vector to scalar

 - Independent X and Y scaling is long gone.
 - Also separate size and scale in TC lookup

Move clear value for texture to base class

Align heights to page size

 - Since FRAME and Z are in page units, we can't have two targets
 - overlapping within the same page.
 - Stops some small resizes too.
 - Test cases: Genji and Spider-Man 2 shadows.

Don't modify target TEX0 on shuffle/clear

Move upscale multiplier to uniform

Make P8 conversion page-aware

Fix incorrect depth preload shader

Improve HLE of texture shuffles

When a texture shuffle is split into two half-screen draws, we skip the
first, and draw the whole thing in the second, taking care of when both
the texture and framebuffer are offset.
2023-03-13 20:29:05 +00:00
Stenzek
2fdea258fa GS/HW: Fix incorrect depth preload shader 2023-03-13 20:29:05 +00:00
Stenzek
b453a6a46d GS/Vulkan: Actually disable shader cache when requested 2023-03-13 20:29:05 +00:00
Stenzek
5b88e637d8 GS/Vulkan: Fix clear order in Merge/Interlace
Fixes blank frame when changing resolutions.
2023-03-13 20:29:05 +00:00
Stenzek
ac02bcbe33 GSRunner: Default to window but surfaceless when scripted 2023-03-13 20:29:05 +00:00
Stenzek
9efdeae3ac GSRunner: Reduce log spam 2023-03-13 20:29:05 +00:00
Stenzek
54e59e2f7b GSRunner: Support upscale parameter 2023-03-13 20:29:05 +00:00
PCSX2 Bot
2c4e02ff34 PAD: Update to latest controller database. 2023-03-13 17:56:18 +01:00
Berylskid
2a306cbd91 GS-OGL: Remove available_vram (#8389) 2023-03-13 09:07:34 +00:00
Víctor "IlDucci
b244136179 GUI/Qt: Minor text corrections, nitpicks (#8213)
- Adding the actual corrections from #8048 that were not added by #8119.
 - Fixing typos and missing ending periods.
 - Unifying the writing of certain terms:
   - Memory Card uppercased following Sony's writing (taken from PS2 manual).
   - gamefixes/game fixes -> game fixes
   - fast forward/fastforward/fast-forward -> fast-forward (taken from Oxford)
   - slowmotion/slow motion/slow-motion -> slow-motion (following the same convention as before, as I could not find this in Oxford's)
   - framebuffer/frame buffer -> framebuffer
   - Xbox name properly uppercased (for Controller settings)
 - Correcting RA's Rich Presence to separate it from Discord's Rich Presence (after discussions in the Translations channel).
 - Unification of option names in the option area and the hint area.
 - Adding a fix for the (currently broken) Stretch Height/Vertical Stretch tooltip.
2023-03-12 19:34:20 -05:00
Stenzek
b897f367ce FullscreenUI: Mirror Qt graphics settings changes 2023-03-12 16:21:36 +00:00
refractionpcsx2
6c46418f68 CI: Remove WrapGS from GameDB Schema 2023-03-12 15:11:29 +00:00
refractionpcsx2
f0d5d21e64 GS-Config: Remove remnants of the WrapMem setting. 2023-03-12 15:11:29 +00:00
Stenzek
93490876c9 Qt: Fix crash when changing renderer 2023-03-12 15:11:16 +00:00
Stenzek
74763d2156 Qt: Hide manual hardware fixes from global settings 2023-03-12 14:27:20 +00:00
Stenzek
b849d9862d Qt: Move CRC Fix Level to HW Fixes 2023-03-12 14:27:20 +00:00
Stenzek
cd575e0ed8 Qt: Move GPU Palette Conversion to HW Fixes 2023-03-12 14:27:20 +00:00
Stenzek
b5fbd88c34 GS/HW: Move old-target invalidation to after draw
Fixes crash in Radiata Stories.
2023-03-12 14:25:45 +00:00
refractionpcsx2
6003673165 GS-HW: Correct page aligned end blocks 2023-03-12 12:52:53 +00:00
refractionpcsx2
4555667554 GS: Rename bad_shader files to pcsx2_bad_shader for linux clarity 2023-03-12 00:07:52 +00:00
TellowKrinkle
c0db6d49f4 GS:MTL: Fix wrong function constant type 2023-03-11 23:34:56 +00:00
Buzzardsoul
6630066f0b GameDB: Add missing Tony Hawk's Underground 2 fixes. 2023-03-11 21:43:54 +00:00
Buzzardsoul
20e6a55dd1 GameDB: Add blending level 3 to Tony Hawk's Underground 2 2023-03-11 21:22:35 +00:00
Mrlinkwii
d3f82c800f GameDB: add fixes to Crouching Tiger, Hidden Dragon 2023-03-11 21:06:08 +00:00
JordanTheToaster
e0e525d9ae ImGuiOverlays: Add missing fix to status bar
Adds Estimate Texture Region and GPU CLUT to the status bar as well as amends the names of CPU CLUT and GPU CLUT.
2023-03-11 20:41:19 +00:00
Buzzardsoul
12f4d6f872 GameDB: Add Mipmap and Trilinear to Tony Hawk's Underground 2 (#8372) 2023-03-11 20:40:39 +00:00
lightningterror
0668e9bad9 GS: Bump shader cache version. 2023-03-11 20:44:11 +01:00
lightningterror
06aed8491c GS-hw: Separate the Alpha masked Ad case from blend hw bit.
Allows for cleaner code.
2023-03-11 20:44:11 +01:00
lightningterror
df2d11e70d GS-hw: Blend table formatting. 2023-03-11 20:44:11 +01:00
lightningterror
2dde8a5e90 GS-hw: No need to set both BLEND_NO_REC and BLEND_A_MAX in table.
Setting only BLEND_NO_REC is enough as blending is free.
2023-03-11 20:44:11 +01:00
lightningterror
674b13fb3f GS-hw: Cleanup BLEND_C_CLR blend flags.
Rename BLEND_C_CLR to BLEND_HW_CLR.
Merge CLR2_AF and CLR2_AS to CLR2, don't need to be separate as we rely on PS_BLEND_C in shader.
2023-03-11 20:44:11 +01:00
lightningterror
ab17c3693f Gs-hw: Clean up blend flags.
Re arrange them from hw to sw.
2023-03-11 20:44:11 +01:00
lightningterror
a6c372de46 GS-hw: Rename clr_hw to blend_hw PSSampler bit. 2023-03-11 20:44:11 +01:00
lightningterror
62497b9300 GS-hw: Rename PS_CLR_HW to PS_BLEND_HW shader macro. 2023-03-11 20:44:11 +01:00
Yiays
1461a3f8d7 Readme: Update cpubenchmark links (#8331) 2023-03-11 16:40:37 +00:00
JordanTheToaster
686b31765d GameDB: Various fixes
Adds estimate texture region to Combat Elite WWII Paratroopers and round sprite half to Champions Return To Arms to fix lines in HUD and menus.
2023-03-11 16:34:06 +00:00
lightningterror
05e4e98e64 GS: Bump shader cache version. 2023-03-09 21:08:52 +01:00
lightningterror
e95b60d527 GS-hw: Cleanup hw blend clr cases.
Cleanup redundant Blend C sets, they are already set properly beforehand.
Cleanup multiple barrier sets for Ad cases, set one at the end instead.
Cleanup conditions, reduce and cleanup the code.
2023-03-09 21:08:52 +01:00
lightningterror
59aba9f757 GS-hw: Support Ad masked alpha on blend mix 1 and 2 clr cases. 2023-03-09 21:08:52 +01:00
Buzzardsoul
248e94dc4c GameDB: Add autoflush to Dirge of Cerberus: Final Fantasy VII (#8351) 2023-03-09 16:09:53 +00:00
kamfretoz
a7d574cff0 Qt: Fix description for Trigger & Button Deadzone 2023-03-09 16:04:35 +00:00
Stenzek
ad05193916 GameDatabase: Fix recommended blending message
It was reading from the GS thread copy instead of the CPU thread config.
2023-03-09 12:44:21 +01:00
Stenzek
b24b353b2d Qt: Change Profile label to Editing Profile
Hopefully less confusing this way.
2023-03-09 08:40:35 +01:00
Stenzek
18e4a04dba PAD: Add pressure option to macros 2023-03-09 08:40:35 +01:00
Stenzek
30989761e2 Qt: Fix sensitivity/deadzone showing for shift-click macro trigger 2023-03-09 08:40:35 +01:00
Stenzek
b219ee9049 GS/Metal: Align texture upload pitch to 32 bytes 2023-03-09 08:40:09 +01:00
TellowKrinkle
98c611e404 GS:MTL: Don't start render passes with no targets 2023-03-09 08:37:57 +01:00
TellowKrinkle
7a4ef32210 Qt: Restore main menu settings button
Required for expected behavior on macOS
2023-03-09 08:36:48 +01:00
lightningterror
c3359cea1f Qt: Disable framebuffer fetch option on d3d. 2023-03-08 20:23:01 +01:00
JordanTheToaster
f73a2d571f GameDB: Add missing Ponkotsu Roman Fixes
Adds missing JP fixes for Ponkotsu Roman Daikatsugeki Bumpy Trot.
2023-03-07 18:59:59 +00:00
JordanTheToaster
6dfb02c826 GSDumpReplayer: Fix widescreen patch crashing
Fixes a regression which caused PCSX2 to crash if you loaded a dump with widescreen patches enabled.
2023-03-07 14:19:55 +01:00
lightningterror
6c093fc81e GS: Bump shader cache version. 2023-03-06 23:36:54 +01:00
lightningterror
911d35e800 GS-hw: Fix invert rounding for accumulation blend on gl.
Also make the checks consistent for all renderers.
2023-03-06 23:36:54 +01:00
lightningterror
084fdc0a65 GS: Bump shader cache version. 2023-03-06 19:49:27 +01:00
lightningterror
1382fe9c6c GS-metal: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror
b33242830e GS-vk: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror
8c0ee33c4c GS-ogl: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror
e8cf4822b1 GS-d3d: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
PCSX2 Bot
3462f02ce2 PAD: Update to latest controller database. 2023-03-06 17:07:54 +01:00
Stenzek
1a67b2146a GS/HW: Fix incorrect condition in DX11/OGL 2023-03-06 09:11:51 +00:00
Stenzek
eb0d18f484 GSDumpReplayer: Fix resetting
And get rid of memory reset, it's never used.
2023-03-06 09:11:08 +00:00
Stenzek
c783fc0f59 GSDumpReplayer: Update serial on dump load
Fixes title and HW fixes not applying when dragging a new GS dump onto a
running PCSX2.
2023-03-05 15:41:42 +00:00
refractionpcsx2
31d02c1278 GS-TC: Allow TBW expansion 2023-03-05 11:17:33 +00:00
JordanTheToaster
85f96bb248 GameDB: Various recommendations and fixes
Adds a variety of fixes and recommendation's for users to ignore.
2023-03-05 10:06:51 +00:00
Stenzek
229cf908b7 GS/HW: Use multi stretch for preloading 2023-03-05 10:03:15 +00:00
Stenzek
89b18275c0 GS/DX11: Get rid of runtime blend state creation 2023-03-05 10:03:15 +00:00
Stenzek
b8a86baec7 GS/HW: Implement multi stretch for DX11/DX12/OpenGL 2023-03-05 10:03:15 +00:00
Stenzek
8505e9203a Qt: Support changing running GS dump by drag/dropping 2023-03-03 16:43:16 +00:00
Stenzek
5d95a503bf Qt: Fix crash when spamming shutdown button 2023-03-03 16:43:16 +00:00
Stenzek
36c7f96a1e GS/HW: Get rid of GetOutputSize()
And use PCRTCDisplays instead.
2023-03-03 16:42:54 +00:00
Mrlinkwii
b40b606608 GameDB: update Oneechanbara2Special 2023-03-03 16:42:24 +00:00
Mrlinkwii
03764a624f GS/CRC: purge Oneechanbara2Special CRC 2023-03-03 16:42:24 +00:00
RedDevilus
962cfa9441 GameDB: Steambot Chronicles + typo fix
- Steambot Chronicles has quite an extensive hack for a game doing weird stuff with their Z-buffer, it does mess with the sea being green which is incorrect but the game also looks off for rest of the cutscene.

- misalgined typo to misaligned
2023-03-03 16:42:09 +00:00
lightningterror
b2f30ab080 GS: Bump shader cache version. 2023-03-03 16:35:10 +01:00
lightningterror
24c42ae2d9 GS-hw: Replace alpha factor/alpha source1 with source 1 color.
Output 1 will be used since we want to modify each color channel based on overflow value.
2023-03-03 16:35:10 +01:00
lightningterror
af9353298c GS-metal: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror
a3ecf0b0bd GS-vk: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror
58cb6ab728 GS-ogl: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror
f478b3959c GS-d3d: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
Stenzek
35ce680859 GameDB: Add PCRTCOffsets to Xiaolin Showdown
Stops screen shaking.
2023-03-03 15:33:47 +00:00
Stenzek
7df189ced4 GameDB: Add PCRTC and blending HW fixes 2023-03-03 15:33:47 +00:00
Stenzek
c35092504c GS/HW: Avoid copying an empty rectangle
Fixes a possible validation error in Ultraman Fighting Evolution -
Rebirth.
2023-03-03 14:59:07 +00:00
Stenzek
0bff6f7ad9 GS/HW: Require FBW=1 for Jak OI fix
The legit palette draws all seem to use FBW 1.

There's a couple of draws which use the alpha channel of the FB which
are currently falsely triggering.
2023-03-03 14:04:43 +00:00
JordanTheToaster
805f985144 GameDB: Gun fixes
Fixes for rainbowing at the edges of the screen missing bloom intensity and alignment and reflections on water and ground textures.
2023-03-02 21:16:57 +00:00
Stenzek
12e578b93c GS/Vulkan: Don't skip barrier with colclip+readwrite date
Value written from HDR setup must be visible for any DATE reads. Fixes
flickering in DBZ BT2.
2023-03-02 17:01:50 +00:00
JordanTheToaster
1312952305 GameDB: Various fixes
Adds Tex In RT 2 to Armoured Core 2 to fix texture corruption in future and adds merge sprite to Destroy All Humans 1&2 to further fix misaligned bloom.
2023-03-02 15:50:02 +00:00
Stenzek
6118b94f9e GS/Vulkan: Fix a bunch of validation warnings
None of these were errors, but it's still good to have clean output.
2023-03-02 15:49:13 +00:00
Stenzek
520320535e Qt: Clear all keyboard bind states when focus is lost 2023-03-02 15:49:04 +00:00
Mrlinkwii
262b5f1dc0 GameDB: add fixes to Knight Rider - The Game 2023-03-02 11:07:28 +00:00
Mrlinkwii
ac36162ddc GameDB: upscaling fixes for Springdale 2023-03-02 09:50:38 +00:00
Stenzek
9b813f4ae3 Qt: Fix skipdraw not being hidden globally again
And slience a warning in TC.
2023-03-02 09:34:41 +00:00
JordanTheToaster
35d05b8653 GameDB: DAH 1&2 Fixes
Fixes for misaligned bloom and sun occlusion and intensity in Destroy All Humans 1 and 2.
2023-03-02 09:18:18 +00:00
Mrlinkwii
e4d6b87e5d GameDB: add textureInsideRT to NBA '07 featuring The Life Vol.2 2023-03-02 01:34:39 +00:00
Stenzek
64b38e5a4a GS/HW: Add "Merge Targets" texture-in-RT mode
Can take several targets from the cache, and create a combined/merged
source from them.

Fixes shadow maps in Destroy All Humans.
2023-03-01 21:13:37 +00:00
Stenzek
75957c84e3 GS: Add "multi stretch rect" drawing to device 2023-03-01 21:13:37 +00:00
Silent
c33fb2adbd Qt: Add a context menu to the toolbar's Settings button when the game is running
A new small context menu that allows to select between global settings
and game settings.
2023-03-01 20:38:42 +00:00
Silent
97d3baba35 Qt: Move "Game Properties" from View to Settings 2023-03-01 20:38:42 +00:00
Stenzek
e91f9925f8 Qt: Display a slightly more helpful error on display create failure 2023-03-01 20:37:18 +00:00
Stenzek
b484f7aef0 Context/Vulkan: Handle VK_INCOMPLETE return from vkEnumeratePhysicalDevices() 2023-03-01 20:37:18 +00:00
Stenzek
9a3904103a GS/HW: Fix off by one in estimate texture region
And enable it for Justice League.
2023-03-01 20:36:36 +00:00
refractionpcsx2
2a2d39b392 GS-TC: On invalidate of the alpha of 32bit, drop back to 24bit 2023-03-01 20:35:38 +00:00
Stenzek
3005ba629f GS/Vulkan: Fix RT being left bound as texture 2023-03-01 21:02:57 +01:00
Mrlinkwii
795741a341 GameDB: various fixes 2023-02-28 21:39:50 +00:00
JordanTheToaster
da98465d4b GameDB: Remove unneeded Midnight Club 3 fixes
Removes the texture preloading restriction as the game no longer violently blows up during gameplay with the hash cache enabled.
2023-02-28 20:52:03 +00:00
Stenzek
d28e46796f GameDB: Enable estimate texture region on Snowblind games 2023-02-28 17:39:15 +00:00
Stenzek
43c6e321f5 GS/HW: Add a new option to attempt to reduce large texture sizes
For Snowblind games which use 1024x1024 textures and UVs.
2023-02-28 17:39:15 +00:00
Stenzek
4595c2feec GS/HW: Allow moves to create larger targets, align to 64 width 2023-02-28 17:39:15 +00:00
Stenzek
8b4402c517 Qt: Skipdraw shouldn't be visible in global settings 2023-02-28 11:49:26 +00:00
Stenzek
e08ae7e8fa GS/HW: Handle end-of-memory wrapping for surface Overlaps() 2023-02-28 09:12:14 +00:00
Stenzek
753efd8c4a GS/HW: Track target sources in all pages
... instead of just the first page it falls within.
2023-02-28 09:12:14 +00:00
forrvalhalla
cb786f0320 GameDB: Various Armored Core Improvements 2023-02-28 08:51:39 +00:00
PCSX2 Bot
6ff64cc984 PAD: Update to latest controller database. 2023-02-27 18:29:35 +01:00
Mrlinkwii
475b816280 Gamedb: remove HPO normal from Dragon Ball Z Budokai - Tenkaichi 2 2023-02-27 13:51:37 +01:00
Stenzek
229005942f GS/DX12: Add missing clip_control support flag
Fixes depth inaccuracy in WWE SmackDown! Here Comes the Pain.
2023-02-27 13:19:51 +01:00
Stenzek
4af25d20fe GS: Fix output equal check in Merge() 2023-02-27 10:21:39 +00:00
Stenzek
6bf5b9a8e3 GS/HW: Fix incorrect size of region mipmap levels 2023-02-27 07:55:58 +00:00
Stenzek
be769c28fa Qt: Cancel game list refresh before GetSaveStateFileName()
Fixes lockup/crash when starting a file early.
2023-02-26 22:27:49 +00:00
JordanTheToaster
3128c48d5b GameDB: Dance Summit 2001 Fixes
Adds paltex to Dance Summit 2001 to massive increase FPS and reduce hash cache usage dramatically.
2023-02-26 22:27:39 +00:00
RedDevilus
5c7161fd2f GameDB: NASCAR '06 Total Team Control
Forces Adaptive TFF to stop bouncing/shaking vertical screen
2023-02-26 15:38:48 +00:00
Stenzek
e85790b84b GS/HW: Don't try to draw with invalid TEX0 configuration
Fixes the texture cache falling apart in 007: Everything or Nothing.
2023-02-26 15:37:58 +00:00
Stenzek
980e2f67fd Qt: Don't display updater if running a game or fullscreen 2023-02-26 15:33:02 +00:00
TellowKrinkle
7781907f0e GS: Blend truncation and dither goes the other way when subtracting
Truncation happens after subtraction, so it's the equivalent of rounding the value to subtract *up* instead of down
2023-02-26 07:22:32 +01:00
TellowKrinkle
1d145dd48a GS:MTL: Clip control is supported
(Well technically, it's not but the default value is the one we want)
2023-02-26 07:22:32 +01:00
TellowKrinkle
1a1eb30e60 GS:MTL: Properly initialize has variable 2023-02-26 07:22:32 +01:00
TellowKrinkle
a7e2b98dc7 Vulkan: Format tfx.glsl 2023-02-26 07:22:32 +01:00
Stenzek
2bf74622a5 GS/DX12: Fix potential crash in PrimID DATE setup 2023-02-26 03:49:40 +00:00
refractionpcsx2
6bcaef9325 GS-HW: Allow swapping of start/end block on overlap check within page 2023-02-26 01:29:49 +00:00
refractionpcsx2
0b3aac3d91 GS-HW: Add channel masks to dirty rects, allows partial updates 2023-02-26 01:29:49 +00:00
refractionpcsx2
9a53f0f853 GS-HW: Improve Local->Host and preload accuracy. 2023-02-26 01:29:49 +00:00
refractionpcsx2
a97df14064 GS-HW: Set scale on temporary depth stencil 2023-02-26 01:29:34 +00:00
RedDevilus
9a0cd1157f GameDB: Timesplitters Series + minor maintenance
- Timesplitters 2 (normal vertex screwing up bottom)
- Timesplitters Future Perfect (remove depth lines)
- Dragon Ball Z - Infinite World (dash
2023-02-26 01:13:24 +00:00
Mrlinkwii
16c41255d0 Gamedb: remove disable partial invalidation from fatal frame 2023-02-26 00:24:24 +00:00
Stenzek
c2d1e5bd18 GameDB: Switch CPU CLUT for GPU CLUT in The Godfather
It can do 10+ readbacks in one frame, which is way too much.
2023-02-25 12:31:28 +00:00
Stenzek
3c85ba3eb8 GS/HW: Use 1023 for skip-target-creation threshold
Fixes target blowout in The Godfather (it does a 1023x1023 draw on
boot).
2023-02-25 12:31:28 +00:00
JordanTheToaster
f3b67b158c GameDB: Gorwlanser 5&6 and Poinies Poin Fixes
Adds Texture in RT to Growlanser 5 and 6 to fix a layering issue and to Poinies Poin to fix text corruption after an FMV.
2023-02-25 12:28:05 +00:00
kamfretoz
8dac10ae36 Qt: Add a new theme, Cobalt Sky. 2023-02-25 11:00:56 +00:00
JordanTheToaster
6b81050283 GameDB: 007 EON Fixes
Adds mipmapping full and trilinear PS2 to 007 Everything Or Nothing to fix up texture detail and removes mipmapping from Fifa games to prevent players from going bald or having rainbow vomit shirts.
2023-02-25 10:55:53 +00:00
Stenzek
b4beacfc43 GS/OGL: Avoid framebuffer swaps when depth is being alternated 2023-02-25 08:18:34 +00:00
Stenzek
1b607a8c4d GameDB: Add partial target invalidation to affected games 2023-02-25 08:18:34 +00:00
Stenzek
4583c64ff7 GS/HW: Add partial target invalidation option
Eventually hopefully we can make this the default, but it breaks too
much at the moment.

Fixes missing/corrupted textures in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek
a06a07d961 GS/HW: Allow sw prim render when texture rect is dirty
Gets rid of an unnecessary readback in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek
520a369872 GS/HW: Prevent out of bounds copy in OI_BlitFMV() 2023-02-25 08:18:34 +00:00
Stenzek
1eaec773e2 GS/HW: Don't allocate Z buffer if tests always pass
.. and Z is masked.

Stops some offscreen targets from expanding in size.

Partial fix for regressions in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek
3433a42e42 GS/DX12: Fix incorrect pipeline RT format 2023-02-25 03:04:50 +00:00
lightningterror
e01eac615d GS-tc: Fix Wreorder-ctor warning. 2023-02-24 11:29:53 +01:00
lightningterror
8116646dee GS: Bump shader cache version. 2023-02-24 02:06:00 +01:00
lightningterror
7f7950cd6b GS-d3d: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror
2eb11ded52 GS-metal: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror
bd64ad510b GS-vk: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror
4e9b7e61a7 GS-ogl: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror
37b19495a8 GS-hw: Use rgb color for second output instead of alpha.
We want different alpha value for each channel.
2023-02-24 02:06:00 +01:00
refractionpcsx2
c12b412e87 GS-HW: Remove debug message, partial Clang format GSRendererHW.cpp 2023-02-23 23:21:53 +00:00
refractionpcsx2
17f137f8be GS-HW: Slightly better check for target expanding 2023-02-23 20:13:01 +00:00
JordanTheToaster
fcc627c65c GameDB: Various fixes
Fixes for missing bloom intensity in Ferrari Challenge mipmapping in Dark Cloud and adjusts HPO on The Dog Island and adding missing Scandinavia entrys.
2023-02-23 19:37:29 +00:00
refractionpcsx2
5bb3d8e60d GS-HW: Improve GS read target detection, avoid reading dirty targets. 2023-02-23 18:27:01 +00:00
refractionpcsx2
264086e0aa GS-HW: Improve clear detection and avoid making bad render targets 2023-02-23 18:27:01 +00:00
refractionpcsx2
6013d7172a GS-HW: Drop to CPU CLUT w/e invalidate only if dirty covers whole tex 2023-02-23 18:27:01 +00:00
refractionpcsx2
a7714b2725 MCD: Stop Memcard Folders spamming the console/OSD when saving a game 2023-02-23 18:02:07 +00:00
Stenzek
f9dcac8cd0 GS/HW: Make readback-on-close a HW fix
Unfortunately it's too risky to enable by default all the time. So,
we'll make it a hw fix, and hopefully one day can make it default on.

Also makes save states readback the TC as well.
2023-02-23 17:25:03 +00:00
Stenzek
2487322e47 GS/HW: Track which bits are actually written to targets
Fixes Burnout 3 sky getting corrupted when flushing.
2023-02-23 17:25:03 +00:00
Stenzek
c7e9c9542e GS/HW: Don't try to dirty targets which don't overlap
The current invalidation code sucks, but at least this stops things
which are blatently wrong from happening.
2023-02-23 10:12:05 +00:00
Stenzek
c1bc1af302 GS/HW: Don't mess with the buffer width of the target on invalidate 2023-02-23 10:12:05 +00:00
Stenzek
739f9ec758 GS/HW: Set valid rect on targets created by Move 2023-02-23 10:12:05 +00:00
refractionpcsx2
f70a140f42 GS-HW: Fix Download readbacks and limit FB resizing 2023-02-22 11:50:11 +00:00
refractionpcsx2
a716e69dc0 GameDB: Remove no longer needed SW FMV switch fixes 2023-02-21 16:15:29 +00:00
refractionpcsx2
0c6e1a4d56 GS-HW: Invalidate overlapped target when expanding. 2023-02-21 16:15:29 +00:00
Stenzek
faf36ecba6 GS/D3D: Default to D3D11 for Intel 2023-02-21 15:49:59 +00:00
Stenzek
49f2900e1f GS/D3D: Combine driver version lookup for D3D11+D3D12 2023-02-21 15:49:59 +00:00
AKuHAK
8bd522d283 BiosTools: Implement SysGetBiosDiscID function, for Bios Serial used EXTINFO build unique timestamp 2023-02-21 15:24:36 +00:00
AKuHAK
e9034a1ba1 Biostools: remove unused external variable BiosZone 2023-02-21 15:24:36 +00:00
Stenzek
03feacd69a GS/HW: Use FB size instead of output size for target lookup
Fixes render target height doubling unnecessarily in Ridge Racer V.
2023-02-21 15:22:09 +00:00
Stenzek
0c9f44d8a4 GS/HW: Don't allow region textures to make sources larger
Currently not handled. Fixes Ridge Racer V intro again.
2023-02-21 15:22:09 +00:00
RedDevilus
39fb64cdcd GameDB: Dark Cloud 2 + Dark Chronicle
I had a dark joke on the fix, but let's not jester about it. The clown now has more colors than just 1.
2023-02-21 14:10:14 +00:00
JordanTheToaster
d531a7f1af GameDB: Remove CPU CLUT from Transformers The Game
Something changed and now this just causes rainbow vomit in game and in menus instead of fixing the issue it was originally put in for.
2023-02-21 09:36:49 +00:00
PCSX2 Bot
bb7ff414ae PAD: Update to latest controller database. 2023-02-21 02:14:48 +01:00
JordanTheToaster
215f112521 GameDB: Port patch to PAL Transformers ROTF
Ports a patch over to the PAL version to fix the pause menu hud and other parts.
2023-02-19 15:50:05 +00:00
Florin9doi
644766d965 USB: Fix Sega Seamic buttons 2023-02-19 13:15:53 +01:00
JordanTheToaster
1e1a555d3b GameDB: Various fixes
Fixes for Transformers Revenge of the Fallen misaligned bloom and soft shadows and Legend of Kay broken shadow rectangles and misaligned bloom.
2023-02-19 03:53:20 +00:00
refractionpcsx2
c64ae2684d GS-PCRTC: Handle extended height when there's a negative offset 2023-02-19 00:57:52 +00:00
refractionpcsx2
50ed04436d GS-HW: Preserve width of frame textures 2023-02-19 00:57:38 +00:00
Stenzek
2fb9beca52 GS/HW: Use block instead of page pointer for height lookup
Some callers were using blocks, others were using pages before.

Enables target expansion in Stuntman, which slightly improves rendering
without CPU sprite. The full "fix" needs page handling in P8 conversion.
2023-02-19 00:57:24 +00:00
refractionpcsx2
cd4c1e920e GS: Flush targets back to GS memory when swapping renderers 2023-02-19 00:57:01 +00:00
refractionpcsx2
e846ac367a GS-HW: Fix downloads in offset BP and different widths 2023-02-19 00:03:49 +00:00
Mrlinkwii
ef31c733ee Gamedb: update Armored Core - Nexus 2023-02-18 15:53:30 +00:00
Stenzek
724aa657f3 Qt: Fix window geometry not saving on exit 2023-02-18 14:50:09 +00:00
kenshen112
0284c35f4c GameDB: Add Fatal Frame 1 / Project Zero final boss game bug fix patch 2023-02-18 05:04:20 +00:00
TheTechnician27
6ce33de287 UI: Update and Add mouseover dialog (#8119) 2023-02-18 01:58:32 +00:00
refractionpcsx2
6ccfa011d4 Pad/Counters: Rearrange Pad/Core updates on VSync
Apparently this gets around some weird input lag issue.
2023-02-18 01:13:39 +00:00
refractionpcsx2
c9078af45e GS: Bump shader cache version 2023-02-17 19:40:16 +00:00
refractionpcsx2
6745428d0c GS-SW: Fix SW texture dumping 2023-02-17 19:06:35 +00:00
refractionpcsx2
925e874ada GS-HW: Fix real 16bit value shuffles 2023-02-17 19:06:35 +00:00
lightningterror
03f0f2f803 GameDB: Add missing db entry for Silent Scope 3.
Korean version.
2023-02-17 16:35:46 +01:00
lightningterror
857360d6b2 GameDB: Add full mipmap with ps2 trilinear to Matrix, The - Path of Neo.
Improves ground textures to match sw renderer.
2023-02-17 16:35:46 +01:00
Stenzek
2dd76c3f12 GS/HW: Force region match on fixed TEX0
Fixes lightmapping in Spinter Cell - Double Agent.
2023-02-17 13:20:04 +00:00
Stenzek
666de3a874 GS/HW: Allow hardware sampling when clamp_max is larger
Fixes some mipmapping issues in GT4.
2023-02-17 13:20:04 +00:00
Stenzek
e0e9b64db6 GS/HW: Fix region textures being used when redundant 2023-02-17 13:20:04 +00:00
JordanTheToaster
2f521348c6 GameDB: Add VU Sync hack to Salt Lake 2002
Fixes the awful flickering and missing textures that happens all over the game.
2023-02-17 13:12:33 +00:00
Stenzek
8ac2949a1f GS/HW: Fix incorrect bitfield width in height cache
This lead to duplication and possibly larger-than-intended heights.
2023-02-16 16:44:40 +00:00
Stenzek
d0d5d991ce GS/HW: Fix repeat sampler being used for region clamp/repeat
The coordinates are clamped in the shader, but normalized UV of 1 and
bilinear may repeat.
2023-02-16 16:44:40 +00:00
Mrlinkwii
1fc2d7de3c GameDB : remove skipdraw from Need for Speed - Undercover 2023-02-16 15:00:27 +00:00
refractionpcsx2
2598e8d9b9 GS-PCRTC: Fix Anti-blur in screen offset.
No this doesn't mean it won't look blurry, that's a downside of screen offsets in some games, but it might look *less* blurry.
2023-02-16 14:47:09 +00:00
refractionpcsx2
01f65e98e6 GS-PCRTC: Fix up some PCRTC anti-blur behaviour + code cleanup 2023-02-16 14:47:09 +00:00
Ganael Laplanche
c5330cf166 Common: FreeBSD fixes. (#8163)
* Fix SIGSEGV handler on FreeBSD

* Fix config dir location on FreeBSD
2023-02-16 09:30:18 +01:00
JordanTheToaster
b78796d0c1 GameDB: Add HPO Special to Arthur and the minimoys
Fixes misaligned bloom that looks gross.
2023-02-16 00:32:17 +00:00
RedDevilus
da1e9db2c0 GameDB: Ruff Trigger
Rename Europe serial and fix offset and blooming.
2023-02-15 19:18:11 +00:00
RedDevilus
6beb6aa05b GameDB: Bakugan Battle Brawlers
Se Deinterlace to Adaptive TFF. I thought this was fixed but needs to be checked later.
2023-02-15 19:15:49 +00:00
Mrlinkwii
6ea7777a3a GS-HW: remove Fighting Beauty Wulong & Spartan Total Warrior CRC (#8158) 2023-02-15 14:56:53 +00:00
Stenzek
f97191e241 GS/HW: Split up consecutive channel shuffles 2023-02-15 11:04:05 +00:00
Stenzek
51420dade4 VMManager: Clear host root on booting ISO 2023-02-15 10:04:39 +00:00
Tokman5
cc55c01197 GameDB: Add EETimingHack to Crazy Taxi 2023-02-15 10:04:04 +00:00
JordanTheToaster
86ce464ee3 GameDB: Fix V-Rally 3 graphical corruption
Fixes random graphical corruption that can happen by adding EE Timing hack.
2023-02-15 00:04:44 +00:00
refractionpcsx2
0fa52a75ad GS-HW: Optimise readback performance for some cases 2023-02-14 22:27:35 +00:00
Mrlinkwii
c91e7dc3b0 GameDB: remove not needed hw fixes for Metal Slug 6 2023-02-14 22:27:17 +00:00
Mrlinkwii
88034b176c GS-HW:purge MetalSlug6 CRC 2023-02-14 22:27:17 +00:00
JordanTheToaster
efeaff488c GameDB: Add HPO Special to 007 EON
Lines bad must fix lines.
2023-02-14 17:49:53 +00:00
Berylskid
5df30f5bdd OSD: Change the lower limit of OSD Scale from 100 to 50 (#8135) 2023-02-14 14:03:24 +00:00
C.W. Betts
cf179c42b8 cmake: Quiet macOS building warning, we can build on macOS just fine. (#8136) 2023-02-14 11:32:39 +01:00
Berylskid
a615f8bf17 Qt: Change "Save State On Shutdown" to Unchecked (#8147) 2023-02-14 10:30:34 +00:00
refractionpcsx2
b38964e814 GS: Partial revert of #8101 pending investigation.
Sometimes great ideas don't always go smoothly to plan, this is one of those, but it will be back when we work out what's up with Soul Calibur 2 and DBZ BT3 :)
2023-02-14 10:23:09 +00:00
JordanTheToaster
013c9eec58 GameDB: Various fixes
Some fixes I missed in the last PR because I am a doughnut and can't remember what I needed to do.
2023-02-14 00:20:52 +00:00
refractionpcsx2
ddbd6eddf7 GameDB: Add Autoflush for Astro Boy and CPU Sprite for Alias 2023-02-14 00:18:08 +00:00
refractionpcsx2
982fd42683 GS: Preload whenever it matches an upload. GUI option forces preloads. 2023-02-14 00:18:08 +00:00
RedDevilus
90e28e7957 GameDB: Fix Japanese KH2 - Final Mix
Change Normal Vertex halfpixel with roundsprite
2023-02-13 23:59:41 +00:00
JordanTheToaster
f4201f3947 GameDB: Remove fix from Soulcalibur 3
No longer needed as the hash cache no longer does an explosion.
2023-02-13 23:27:27 +00:00
PCSX2 Bot
7844b40243 PAD: Update to latest controller database. 2023-02-13 17:37:59 +01:00
JordanTheToaster
d0839a3d55 GameDB: Fixes for graphics in Mana Khemia 2
Fixes missing graphical effects in battles by disabling mvu speedhack.
2023-02-13 16:07:31 +00:00
JordanTheToaster
876fd9ba9e GameDB: Vexx underwater rendering fixes
Adds Tex in RT to fix underwater rendering being totally broken.
2023-02-13 09:37:31 +00:00
lightningterror
e12717c108 CDVD: Fix FreeBSD compile. 2023-02-13 03:02:59 +01:00
refractionpcsx2
af0b17bb7a Counters: Present at VSync End 2023-02-12 21:13:42 +00:00
Stenzek
6f595b7d87 GS/HW: Allow previous frame in depth source lookup
Fixes pulling random junk from local memory in Black after adjusting
vsync timing.
2023-02-12 21:13:42 +00:00
JordanTheToaster
59cbdc79f5 GameDB: Fixes for V-Rally 3 and Berserk
Fixes sun occlusion in V-Rally 3 and fixes missing subtitles in FMVs in Berserk.
2023-02-12 19:28:13 +00:00
refractionpcsx2
50ff3649b1 GS: Fix divide by zero error 2023-02-12 19:14:54 +00:00
refractionpcsx2
9ca9db8770 GS: Fix undefined behaviour bug in PCRTC 2023-02-12 15:03:24 +00:00
Stenzek
fa70f0e764 GS/HW: Don't age texture cache on idle frames 2023-02-12 08:34:39 +00:00
Stenzek
3eb629f133 InputManager: Restore passing wheel events to ImGui 2023-02-12 07:25:56 +00:00
Stenzek
c9aba6bbe1 GS/TextureCache: Allow tex-in-rt for 16/24/32-bit targets
Fixes swirl battle transition in Valkyrie Profile 2.
Fixes top-left screen rendering in Lego Racers 2.
2023-02-12 07:07:52 +00:00
Stenzek
0a26adae76 GS/TextureCache: Dirty with target PSM/TBW, not the EE write 2023-02-12 07:07:52 +00:00
Stenzek
f0798f6510 GS/HW: Combine dirty rectangles for target updates
Fewer texture uploads makes Intel GPUs happy.
2023-02-12 07:07:52 +00:00
refractionpcsx2
245b03e208 GS: Limit the height of framebuffer reads 2023-02-12 07:07:26 +00:00
refractionpcsx2
4e31e5fdc2 GS: Use linear interpolation for Screen Offsets 2023-02-12 04:34:07 +00:00
Stenzek
750a74206c InputManager: Warning fix/default interia value 2023-02-12 04:32:47 +00:00
Stenzek
7e64dc2576 GS/HW: Don't defer TC reset until next vsync 2023-02-12 04:32:47 +00:00
Stenzek
8a08e2fd97 GS: Make sure everything in GSState is initialized 2023-02-12 04:32:47 +00:00
Stenzek
d0a933cda8 GS/TextureCache: Clear surface offset cache on reset
Also get rid of RemovePartial(), it's never called.
2023-02-12 04:32:47 +00:00
lightningterror
d00845f56b GameDB: Add missing Need for Speed - Carbon entry. 2023-02-12 00:46:01 +00:00
lightningterror
3350e5ebb1 GameDB: Replace DMABusyHack with InstantDMAHack for MGS2 Sons of Liberty.
DMA timing problem.
Fixes broken half-bottom artifacts.
2023-02-12 00:46:01 +00:00
SideProjectsLab
aeb4445cad Qt/Input: Improved how mouse movements are mapped to analog (#7910) 2023-02-11 23:58:58 +00:00
refractionpcsx2
73abae8cb9 GameDB: Remove forced deinterlacing modes which are no longer required 2023-02-11 20:08:36 +00:00
refractionpcsx2
7ecc7b76ba GS-PCRTC: Improve automatic de-interlacing to avoid it more often. 2023-02-11 20:08:36 +00:00
refractionpcsx2
71d0bbbc25 GS: Rework of PCRTC code. 2023-02-11 20:08:36 +00:00
JordanTheToaster
26e691ba93 GameDB: Update HPO on Spider Man 2
Changes HPO to HPO Special to fix rainbow garbage on the top and left side of the screen when moving.
2023-02-11 17:43:05 +00:00
Stenzek
c7352d9e10 GS: Attempt to recreate device if GPU crashes 2023-02-11 15:33:55 +00:00
Stenzek
7b8f9a54ec GS/HW: Purge FFX-2 depth clear CRC hack 2023-02-11 15:26:04 +00:00
JordanTheToaster
28980af858 GameDB: Port COP2 patch for Disneys Cars
Ports patch to fix broken collisions to PAL Disney's Cars
2023-02-11 15:24:23 +00:00
Stenzek
80dce398e0 GS/HW: Carefully allow move to create new targets
Xenosaga I does a move from BP 1C00 to E00, then from E00 to 2A00 a few
frames later for its cutscene transitions. 2A00 then gets used as a
texture and blended on top of the later frames. Because there's no
target at 2A00, the move falls back to the CPU, and E00 contains junk
which gets moved and eventually preloaded instead.

Gradius V uses moves for a screen move/wobble-like effect, by moving
chunks of the framebuffer out, then using those as a texture. It's not
broken at the moment, but it does readback (slow), and break upscaling.
2023-02-11 07:16:19 +00:00
TheTechnician27
06db8eec48 Context.cpp: fix minor typo 2023-02-11 06:46:44 +00:00
Stenzek
9c720efe46 GS/OGL: Fix possible crash downloading odd texture sizes 2023-02-11 06:43:20 +00:00
refractionpcsx2
cbf91a8d19 GS-HW: Tighten CLUT detection slightly. 2023-02-11 02:07:01 +00:00
TheTechnician27
f99414708d Readme: Two minor changes to the README (#8105) 2023-02-11 00:00:25 +00:00
refractionpcsx2
9549a6b16a GS: Fix TME processing when Alpha->IsBlack & !TEX0->TCC 2023-02-10 23:48:43 +00:00
lightningterror
3206094545 GameDB: Add full mipmap and trilinear ps2 to Hard Hitter games.
Improves ground texture rendering.
2023-02-10 22:24:33 +01:00
Stenzek
5cfae80701 GL/OpenGL: Add a hidden [EmuCore/GS] DisableGLDownloadPBO option
.. to disable the use of PBOs when reading back.
2023-02-10 14:38:21 +00:00
JordanTheToaster
b4d140c6bb GameDB: Fixes for 187 Ride or Die
Add autoflush to soften bloom and HPO Special Texture to fix misaligned bloom.
2023-02-10 14:15:51 +00:00
Stenzek
c65eb3c3ee GS/HW: Fix crash with AVX2 due to unaligned pitch 2023-02-10 14:15:33 +00:00
Mrlinkwii
eec0984dbe Gamedb: remove skipdraw from Need for Speed - Undercover 2023-02-10 14:47:52 +01:00
2430 changed files with 1173644 additions and 322566 deletions

View File

@@ -10,9 +10,9 @@ As a first step, please review these links as they'll help you understand how th
## Just Starting Out
* If you're unfamilar with git, check out this [brief introduction to Git](https://github.com/PCSX2/pcsx2/wiki/Git-survival-guide)
* [How to build PCSX2 for Windows](https://github.com/PCSX2/pcsx2/wiki/Setting-up-the-PCSX2-repository-on-Windows-\(WIP---maybe-more-useful-as-a-manpage-instead%3F\))
* [How to build PCSX2 for Linux](https://github.com/PCSX2/pcsx2/wiki/Installing-on-Linux)
* If you're unfamilar with git, check out this [brief introduction to Git](https://github.com/PCSX2/pcsx2/wiki/07-Git-survival-guide)
* [How to build PCSX2 for Windows](https://github.com/PCSX2/pcsx2/wiki/12-Building-on-Windows)
* [How to build PCSX2 for Linux](https://github.com/PCSX2/pcsx2/wiki/10-Building-on-Linux)
## Issue Reporting
@@ -44,13 +44,11 @@ The following is a list of *general* style recommendations that will make review
## General Documentation And Coding Strategies
* [Commenting Etiquette](https://github.com/PCSX2/pcsx2/wiki/Commenting-Etiquette)
* [Commenting Etiquette](https://github.com/PCSX2/pcsx2/wiki/06-Commenting-Etiquette)
* [Coding style](https://github.com/PCSX2/pcsx2/wiki/Code-Formatting-Guidelines)
* [More comprehensive style-guide (Currently in Draft)](https://github.com/tadanokojin/pcsx2/blob/coding-guide/pcsx2/Docs/Coding_Guidelines.md)
## Tasks
* [Todo List](https://github.com/PCSX2/pcsx2/wiki/Contributing-\(TODO-List\))
* [Issues](https://github.com/PCSX2/pcsx2/issues)
* [A collection of ideas to improve GS OGL](https://github.com/PCSX2/pcsx2/wiki/Todo-List)

View File

@@ -12,19 +12,27 @@ body:
## Important: Read First
Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only
If you need help configuring the emulator please make a request on our forums or contact us on discord
If you need help configuring the emulator please make a request on our forums or contact us on discord.
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php)
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php).
Please make an effort to make sure your issue isn't already reported
Please make an effort to make sure your issue isn't already reported.
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
### Please Avoid Issues Pertaining to the Following:
- We are **not** accepting bug reports for **PSX mode** at this time
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use a [proper PSX emulator](https://emulation.gametechwiki.com/index.php/PlayStation_emulators)
- We do **not** accept issues relating to **upscaling** at this time
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling
- Please try your game at native resolution before creating an issue
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues
- We are **not** accepting bug reports for **PSX mode** at this time.
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
- We do **not** accept issues relating to **upscaling** at this time.
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling.
- Please try your game at native resolution before creating an issue.
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
- We do **not** accept issues pertaining to Linux builds other than the official AppImage and Flatpak.
- Please contact your packager for support. We have no control over other builds, nor can we investigate any issues, and historically they have been known to be broken.
- This includes pre-configured "distributions" such as EmuDeck, the "AUR", etc.
- type: textarea
id: desc
attributes:
@@ -62,11 +70,10 @@ body:
- Windows 11
- Windows 10 (64bit)
- Linux (64bit) - Specify distro below
- macOS 14 (Sonoma)
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input
@@ -76,3 +83,12 @@ body:
placeholder: "Example: Arch"
validations:
required: false
- type: textarea
id: logsDumps
attributes:
label: "Logs & Dumps"
description: |
Please feel free to attach any logs here.
If PCSX2 crashed, please post crash logs and the .dmp file (in a zip file) if appropriate.
validations:
required: false

View File

@@ -12,19 +12,27 @@ body:
## Important: Read First
Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only
If you need help configuring the emulator please make a request on our forums or contact us on discord
If you need help configuring the emulator please make a request on our forums or contact us on discord.
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php)
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php).
Please make an effort to make sure your issue isn't already reported
Please make an effort to make sure your issue isn't already reported.
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
### Please Avoid Issues Pertaining to the Following:
- We are **not** accepting bug reports for **PSX mode** at this time
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use a [proper PSX emulator](https://emulation.gametechwiki.com/index.php/PlayStation_emulators)
- We do **not** accept issues relating to **upscaling** at this time
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling
- Please try your game at native resolution before creating an issue
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues
- We are **not** accepting bug reports for **PSX mode** at this time.
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
- We do **not** accept issues relating to **upscaling** at this time.
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling.
- Please try your game at native resolution before creating an issue.
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
- We do **not** accept issues pertaining to Linux builds other than the official AppImage and Flatpak.
- Please contact your packager for support. We have no control over other builds, nor can we investigate any issues, and historically they have been known to be broken.
- This includes pre-configured "distributions" such as EmuDeck, the "AUR", etc.
- type: textarea
id: desc
attributes:
@@ -52,13 +60,13 @@ body:
## System Info
Please make sure your system meets our requirements for OS version, CPU and GPU
- [System Requirements](https://github.com/PCSX2/pcsx2#system-requirements)
- [System Requirements](https://github.com/PCSX2/pcsx2#system-requirements).
Performance issues as a result of not meeting our hardware requirements are not valid
Performance issues as a result of not meeting our hardware requirements are not valid.
Please read our known issues pages for AMD and Intel drivers.
- [Intel Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-Intel-GPUs-All-you-need-to-know)
- [AMD Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-AMD-GPUs---All-you-need-to-know)
- [Intel Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-Intel-GPUs-All-you-need-to-know).
- [AMD Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-AMD-GPUs---All-you-need-to-know).
We are **not** accepting issues related to the **libretro** core. The libretro core is being maintained separately at this time
- type: input
@@ -77,11 +85,10 @@ body:
- Windows 11
- Windows 10 (64bit)
- Linux (64bit) - Specify distro below
- macOS 14 (Sonoma)
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input
@@ -117,11 +124,11 @@ body:
attributes:
label: Emulation Settings
description: |
Any non-default core settings. If you don't want to list them out, please provide screenshots of your configuration window
Any non-default core settings. If you don't want to list them out, please provide screenshots of your configuration window.
Please note that the safe preset works for most games. MTVU can have some compatibility issues so please disable it before making a report
Please note that defaults tend to work best.
If you need to modify the settings manually because a game requires you to do so to work, please state that explicitly
If you need to modify the settings manually to fix an issue , please state that explicitly.
validations:
required: false
- type: textarea
@@ -136,8 +143,8 @@ body:
attributes:
label: "Logs & Dumps"
description: |
Please feel free to attach any logs, block dumps, GSdump, etc here
Please feel free to attach any logs, block dumps, GSdump, etc here.
If PCSX2 crashed, please post crash logs and the .dmp file (in a zip file) if appropriate.
If your problem is graphical in nature it is highly recommended that you provide a GSdump. [GSdump Guide](https://forums.pcsx2.net/Thread-How-to-create-a-proper-GS-dump)
validations:
required: false

View File

@@ -6,6 +6,15 @@ labels: ["Enhancement / Feature Request"]
# assignees:
# - octocat
body:
- type: markdown
attributes:
value: |
## Important: Read First
Please make an effort to make sure your issue isn't already reported.
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
- type: textarea
id: desc
attributes:

View File

@@ -6,3 +6,7 @@ updates:
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
groups:
ci-deps:
patterns:
- "*"

234
.github/labeler.yml vendored
View File

@@ -2,127 +2,187 @@
# General Labels
'Build | Project System':
- '.github/*'
- '.github/**/*'
- '*.sln'
- '**/*.sln'
- '*.vcxproj*'
- '**/*.vcxproj*'
- 'cmake/*'
- 'cmake/**/*'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- 'build.sh'
- changed-files:
- any-glob-to-any-file:
- '.github/*'
- '.github/**/*'
- '*.sln'
- '**/*.sln'
- '*.vcxproj*'
- '**/*.vcxproj*'
- 'cmake/*'
- 'cmake/**/*'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- 'build.sh'
'Dependencies':
- '3rdparty/*'
- '3rdparty/**/*'
- '**/3rdpartyDeps.props'
- '.gitmodules'
- changed-files:
- any-glob-to-any-file:
- '3rdparty/*'
- '3rdparty/**/*'
- '**/3rdpartyDeps.props'
- '.gitmodules'
'Documentation':
- '*.md'
- '**/*.md'
- '*.pdf'
- '**/*.pdf'
- changed-files:
- any-glob-to-any-file:
- '*.md'
- '**/*.md'
- '*.pdf'
- '**/*.pdf'
'GUI/Qt':
- 'pcsx2-qt/*'
- 'pcsx2-qt/**/*'
- '3rdparty/Qt/*'
- '3rdparty/Qt/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2-qt/*'
- 'pcsx2-qt/**/*'
- '3rdparty/Qt/*'
- '3rdparty/Qt/**/*'
'GameDB':
- '**/GameIndex.*'
- changed-files:
- any-glob-to-any-file:
- '**/GameIndex.*'
'Installer | Package':
- 'build.sh'
- changed-files:
- any-glob-to-any-file:
- 'build.sh'
'Translations':
- 'pcsx2-qt/Translations/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2-qt/Translations/*'
# Tools / Features
'Debugger':
- 'pcsx2/DebugTools/*'
- 'pcsx2/DebugTools/**/*'
- 'pcsx2/gui/Debugger/*'
- 'pcsx2/gui/Debugger/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/DebugTools/*'
- 'pcsx2/DebugTools/**/*'
- 'pcsx2-qt/Debugger/*'
- 'pcsx2-qt/Debugger/**/*'
'IPC':
- 'pcsx2/IPC*'
- 'pcsx2/**/IPC*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/IPC*'
- 'pcsx2/**/IPC*'
'TAS Functionality':
- 'pcsx2/Recording/*'
- 'pcsx2/Recording/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Recording/*'
- 'pcsx2/Recording/**/*'
'RetroAchievements':
- 'pcsx2/Frontend/Achievements.*'
- 'pcsx2/Achievements.*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Frontend/Achievements.*'
- 'pcsx2/Achievements.*'
# Emulation Components
'Counters':
- 'pcsx2/Counters.*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Counters.*'
'Vector Units':
- 'pcsx2/VU*'
- 'pcsx2/**/VU*'
- 'pcsx2/*VU*'
- 'pcsx2/**/*VU*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/VU*'
- 'pcsx2/**/VU*'
- 'pcsx2/*VU*'
- 'pcsx2/**/*VU*'
'VIF':
- 'pcsx2/Vif*'
- 'pcsx2/**/Vif*'
- 'pcsx2/VIF*'
- 'pcsx2/**/VIF*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Vif*'
- 'pcsx2/**/Vif*'
- 'pcsx2/VIF*'
- 'pcsx2/**/VIF*'
# GS Related Labels
'GS':
- 'pcsx2/GS/*'
- 'pcsx2/GS/**/*'
- 'bin/resources/shaders/*'
- 'bin/resources/shaders/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/*'
- 'pcsx2/GS/**/*'
- 'bin/resources/shaders/*'
- 'bin/resources/shaders/**/*'
'GS: Direct3D 11':
- 'pcsx2/GS/Renderers/DX11/*'
- 'pcsx2/GS/Renderers/DX11/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/DX11/*'
- 'pcsx2/GS/Renderers/DX11/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Direct3D 12':
- 'pcsx2/GS/Renderers/DX12/*'
- 'pcsx2/GS/Renderers/DX12/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/DX12/*'
- 'pcsx2/GS/Renderers/DX12/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Hardware':
- 'pcsx2/GS/Renderers/HW/*'
- 'pcsx2/GS/Renderers/HW/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/HW/*'
- 'pcsx2/GS/Renderers/HW/**/*'
'GS: OpenGL':
- 'pcsx2/GS/Renderers/OpenGL/*'
- 'pcsx2/GS/Renderers/OpenGL/**/*'
- 'bin/resources/shaders/opengl/*'
- 'bin/resources/shaders/opengl/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/OpenGL/*'
- 'pcsx2/GS/Renderers/OpenGL/**/*'
- 'bin/resources/shaders/opengl/*'
- 'bin/resources/shaders/opengl/**/*'
'GS: Vulkan':
- 'pcsx2/GS/Renderers/Vulkan/*'
- 'pcsx2/GS/Renderers/Vulkan/**/*'
- 'bin/resources/shaders/vulkan/*'
- 'bin/resources/shaders/vulkan/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/Vulkan/*'
- 'pcsx2/GS/Renderers/Vulkan/**/*'
- 'bin/resources/shaders/vulkan/*'
- 'bin/resources/shaders/vulkan/**/*'
'GS: Metal':
- 'pcsx2/GS/Renderers/Metal/*'
- 'pcsx2/GS/Renderers/Metal/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/Metal/*'
- 'pcsx2/GS/Renderers/Metal/**/*'
'GS: Texture Cache':
- 'pcsx2/GS/Renderers/*TextureCache*.*'
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/*TextureCache*.*'
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
'GS: Software':
- 'pcsx2/GS/Renderers/SW/*'
- 'pcsx2/GS/Renderers/SW/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/SW/*'
- 'pcsx2/GS/Renderers/SW/**/*'
# Other Core Components
'CDVD':
- 'pcsx2/CDVD/*'
- 'pcsx2/CDVD/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/CDVD/*'
- 'pcsx2/CDVD/**/*'
'DEV9':
- 'pcsx2/DEV9/*'
- 'pcsx2/DEV9/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/DEV9/*'
- 'pcsx2/DEV9/**/*'
'IPU':
- 'pcsx2/IPU/*'
- 'pcsx2/IPU/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/IPU/*'
- 'pcsx2/IPU/**/*'
'Memory Card':
- 'pcsx2/gui/MemoryCard*'
- 'pcsx2/gui/**/MemoryCard*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SIO/Memcard/*'
- 'pcsx2/SIO/Memcard/**/*'
'PAD':
- 'pcsx2/PAD/*'
- 'pcsx2/PAD/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SIO/Pad/*'
- 'pcsx2/SIO/Pad/**/*'
'SPU2':
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'
'USB':
- 'pcsx2/USB/*'
- 'pcsx2/USB/**/*'
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/USB/*'
- 'pcsx2/USB/**/*'

View File

@@ -0,0 +1,43 @@
name: 📦 Publish Flathub Release
on:
schedule:
- cron: "0 0 * * *" # Every day at 12am UTC.
workflow_dispatch: # As well as manually.
jobs:
check:
if: github.repository == 'PCSX2/pcsx2'
name: "Check if release is needed"
runs-on: ubuntu-latest
outputs:
PCSX2_RELEASE: ${{ steps.getinfo.outputs.PCSX2_RELEASE }}
FLATHUB_RELEASE: ${{ steps.getinfo.outputs.FLATHUB_RELEASE }}
steps:
- name: Get latest tag and Flathub release
id: getinfo
env:
GH_TOKEN: ${{ github.token }}
run: |
PCSX2_RELEASE=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' /repos/PCSX2/pcsx2/releases | jq -r '.[0].tag_name')
FLATHUB_RELEASE=$(curl -L -s https://flathub.org/api/v2/appstream/net.pcsx2.PCSX2 | jq -r '.releases | max_by(.version) | .version')
echo "Latest PCSX2 release is: '${PCSX2_RELEASE}'"
echo "Latest Flathub release is: '${FLATHUB_RELEASE}'"
echo "PCSX2_RELEASE=${PCSX2_RELEASE}" >> "$GITHUB_OUTPUT"
echo "FLATHUB_RELEASE=${FLATHUB_RELEASE}" >> "$GITHUB_OUTPUT"
build:
needs: check
if: needs.check.outputs.FLATHUB_RELEASE < needs.check.outputs.PCSX2_RELEASE
name: "Build and publish Flatpak"
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Qt"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
publish: true
branch: stable
fetchTags: true
secrets: inherit

View File

@@ -0,0 +1,28 @@
name: 🌎 Update Base Translation
on:
schedule:
- cron: "0 0 * * *" # Every day at 12am UTC.
workflow_dispatch: # As well as manually.
jobs:
update:
if: github.repository == 'PCSX2/pcsx2'
name: "Update Base Translation"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Update Base Translation
run: ./.github/workflows/scripts/common/update_base_translation.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "Qt: Update Base Translation"
commit-message: "Qt: Update Base Translation"
committer: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
author: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
body: "Daily update of base translation sources."
branch: update-base-translation
delete-branch: true

View File

@@ -9,7 +9,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Latest DB and Prepare DB File
run: |
@@ -19,7 +19,7 @@ jobs:
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
title: "PAD: Update to latest controller database"
commit-message: "PAD: Update to latest controller database."

View File

@@ -2,8 +2,8 @@ name: 📝 Validate GameDB
on:
push:
branches:
- master
branches-ignore:
- "l10n_master"
paths:
- '**/GameIndex.yaml'
pull_request:
@@ -18,14 +18,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Packages
run: |
npm install -g ajv-cli prettier
sudo apt-get -y install yamllint
- name: Validate YAML
run: |
yamllint -sd "{extends: relaxed, rules: {line-length: disable}}" ./bin/resources/GameIndex.yaml
- name: Validate Contents
run: |
npm install -g ajv-cli
ajv validate -s ./pcsx2/Docs/gamedb-schema.json --spec=draft2020 -d ./bin/resources/GameIndex.yaml
- name: Check Formatting
run: |
npm install -g prettier
prettier --check ./bin/resources/GameIndex.yaml
if ! prettier --check bin/resources/GameIndex.yaml; then
prettier --write bin/resources/GameIndex.yaml
echo "Prettier failed, diff:"
git diff bin/resources/GameIndex.yaml
exit 1
fi

View File

@@ -0,0 +1,157 @@
name: Flatpak Build Steps
on:
workflow_call:
inputs:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
default: ubuntu-22.04
platform:
required: false
type: string
default: x64
compiler:
required: true
type: string
cmakeflags:
required: true
type: string
branch:
required: false
type: string
default: "stable"
publish:
required: false
type: boolean
default: false
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.7
options: --privileged
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
# Work around container ownership issue
- name: Set Safe Directory
shell: bash
run: git config --global --add safe.directory "*"
# Hackity hack. When running the workflow on a schedule, we don't have the tag,
# it doesn't fetch tags, therefore we don't get a version. So grab them manually.
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
- name: Download patches
run: |
cd bin/resources
wget "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate AppStream XML
run: |
./.github/workflows/scripts/linux/generate-metainfo.sh .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
cat .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
# flatpak-builder-lint appstream .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
- name: Validate manifest
run: |
flatpak-builder-lint manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
- name: Build Flatpak
uses: flathub-infra/flatpak-github-actions/flatpak-builder@23796715b3dfa4c86ddf50cf29c3cc8b3c82dca8
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
upload-artifact: false
manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
arch: x86_64
build-bundle: true
verbose: true
mirror-screenshots-url: https://dl.flathub.org/media
branch: ${{ inputs.branch }}
cache: true
restore-cache: true
cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json') }}
#- name: Validate build
# run: |
# flatpak-builder-lint repo repo
- name: Push to Flathub beta
if: inputs.publish == true && inputs.branch == 'beta'
uses: flathub-infra/flatpak-github-actions/flat-manager@23796715b3dfa4c86ddf50cf29c3cc8b3c82dca8
with:
flat-manager-url: https://hub.flathub.org/
repository: beta
token: ${{ secrets.FLATHUB_BETA_TOKEN }}
build-log-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Push to Flathub stable
if: inputs.publish == true && inputs.branch == 'stable'
uses: flathub-infra/flatpak-github-actions/flat-manager@23796715b3dfa4c86ddf50cf29c3cc8b3c82dca8
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
token: ${{ secrets.FLATHUB_TOKEN }}
build-log-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# NOTE - this is done after on purpose so the flatpak file is wherever it needs to be for the previous pushes
- name: Prepare artifacts folder
# NOTE - 'flatpak-builder' dumps the artifact out into the current directory
run: |
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "./${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak" "$GITHUB_WORKSPACE"/ci-artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -2,8 +2,8 @@ name: 🐧 Linux Builds
on:
push:
branches:
- '*'
branches-ignore:
- "l10n_master"
pull_request:
branches:
- master
@@ -11,10 +11,23 @@ on:
jobs:
build_linux_qt:
name: "AppImage"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
jobName: "AppImage Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage-sse4"
compiler: clang
cmakeflags: ""
buildAppImage: true
secrets: inherit
build_linux_flatpak:
name: "Flatpak"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Flatpak Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak-sse4"
compiler: clang
cmakeflags: ""
publish: false
secrets: inherit

View File

@@ -6,10 +6,13 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
default: ubuntu-20.04
default: ubuntu-22.04
platform:
required: false
type: string
@@ -28,17 +31,25 @@ on:
required: false
type: string
default: ""
cheats_url:
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
timeout-minutes: 90
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
@@ -47,18 +58,36 @@ jobs:
CCACHE_MAXSIZE: 100M
steps:
# Work around https://github.com/actions/runner-images/issues/8659
- name: Remove GCC 13 from runner image
shell: bash
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades 'libc6=2.35-0ubuntu*' 'libc6-dev=2.35-0ubuntu*' libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
GUI_FRAMEWORK: QT
ARCH: ${{ inputs.platform }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -71,42 +100,69 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache
- name: Install Packages
env:
COMPILER: ${{ inputs.compiler }}
run: .github/workflows/scripts/linux/install-packages-qt.sh
run: |
tools/retry.sh wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo tools/retry.sh apt-add-repository -n 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo tools/retry.sh apt-get update
sudo tools/retry.sh apt-get -y install \
build-essential ccache clang-17 cmake curl extra-cmake-modules git libasound2-dev libaio-dev libavcodec-dev libavformat-dev libavutil-dev \
libcurl4-openssl-dev libdbus-1-dev libdecor-0-dev libegl-dev libevdev-dev libfontconfig-dev libfreetype-dev libfuse2 libgtk-3-dev libgudev-1.0-dev \
libharfbuzz-dev libinput-dev libopengl-dev libpcap-dev libpipewire-0.3-dev libpulse-dev libssl-dev libswresample-dev libswscale-dev libudev-dev \
libwayland-dev libx11-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-icccm4-dev \
libxcb-image0-dev libxcb-keysyms1-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev \
libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev libxcb-xinput-dev libxcb-xkb-dev libxext-dev libxkbcommon-x11-dev libxrandr-dev \
lld-17 llvm-17 ninja-build patchelf pkg-config zlib1g-dev
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .github/workflows/scripts/linux/build-dependencies-qt.sh
run: .github/workflows/scripts/linux/build-dependencies-qt.sh "$HOME/deps"
- name: Download cheats
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate CMake
env:
COMPILER: ${{ inputs.compiler }}
ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
run: .github/workflows/scripts/linux/generate-cmake-qt.sh
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_C_COMPILER=clang-17 \
-DCMAKE_CXX_COMPILER=clang++-17 \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_SETCAP=OFF \
-DDISABLE_ADVANCE_SIMD=TRUE \
$ADDITIONAL_CMAKE_ARGS
- name: Build PCSX2
working-directory: build
run: ../.github/workflows/scripts/linux/compile.sh
run: |
# Prepare the Cache
ccache -p
ccache -z
# Build
ninja
# Save the Cache
ccache -s
- name: Run Tests
working-directory: ./build
@@ -117,13 +173,13 @@ jobs:
env:
NAME: ${{ steps.artifact-metadata.outputs.artifact-name }}
run: |
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
- name: Upload artifact
if: inputs.buildAppImage == true
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -6,21 +6,25 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
default: macos-11.0
platform:
required: false
type: string
default: x64
gui:
required: true
type: string
cheats_url:
default: macos-14
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_macos:
@@ -38,17 +42,30 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Use Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: macos
GUI_FRAMEWORK: ${{ inputs.gui }}
ARCH: ${{ inputs.platform }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -57,35 +74,30 @@ jobs:
- name: Install Packages
env:
PLATFORM: ${{ inputs.platform }}
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ANALYTICS: 1
run: |
brew unlink libjpeg || true # Conflicts with our self-built dependencies
brew unlink libpng || true
# Unlike other packages, brew's MoltenVK build uses MoltenVK's minimum macOS version of 10.13 so we can use it
if ! brew install molten-vk ccache; then
if ! brew install ccache nasm; then
brew update
brew install molten-vk ccache
brew install ccache nasm
fi
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
GUI: ${{ inputs.gui }}
run: .github/workflows/scripts/macos/build-dependencies.sh
run: |
.github/workflows/scripts/macos/build-dependencies.sh "$HOME/deps"
- name: Download cheats
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp
@@ -93,21 +105,20 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: Cache ccache cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache
key: ${{ inputs.os }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ccache
- name: Generate CMake Files
run: |
cmake -DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_OPENGL=OFF \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DDISABLE_ADVANCE_SIMD=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DUSE_SYSTEM_LIBS=OFF \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_LINKED_FFMPEG=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
@@ -130,13 +141,11 @@ jobs:
done
- name: Run Tests
if: inputs.gui == 'Qt'
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
- name: Prepare Build Artifacts
run: |
cp /usr/local/lib/libMoltenVK.dylib build/pcsx2*/PCSX2.app/Contents/Frameworks/
TAG="$(git tag --points-at HEAD)"
if [ -z "$TAG" ]; then
APPNAME="${{ steps.artifact-metadata.outputs.artifact-name }}"
@@ -144,12 +153,12 @@ jobs:
APPNAME="PCSX2-$TAG"
fi
mv build/pcsx2*/PCSX2.app "$APPNAME.app"
tar cvzf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" "$APPNAME.app"
tar --options xz:compression-level=9 -cvJf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" "$APPNAME.app"
mkdir ci-artifacts
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" ci-artifacts/macOS-${{ inputs.gui }}.tar.gz
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS.tar.xz
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: "*.tar.gz"
path: "*.tar.xz"

View File

@@ -2,8 +2,8 @@ name: 🍎 MacOS Builds
on:
push:
branches:
- '*'
branches-ignore:
- "l10n_master"
pull_request:
branches:
- master
@@ -11,8 +11,9 @@ on:
jobs:
build_macos_qt:
name: "Defaults"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/macos_build.yml
with:
jobName: "Qt"
gui: "Qt"
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
secrets: inherit

View File

@@ -1,24 +0,0 @@
name: 📢 Announce Release
on:
release:
types: [published]
jobs:
announce:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Announce Release
env:
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
run: |
cd ./.github/workflows/scripts/releases/announce-release
npm ci
node index.js

220
.github/workflows/release_cut_new.yml vendored Normal file
View File

@@ -0,0 +1,220 @@
# Whenever a commit is pushed to master (ideally via a pull-request!)
# this action will create the next release, which means:
# 1. tag master with the proper version
# 2. create a new draft release (pre-released if a nightly build)
# 3. add release notes
name: 🏭 Create Release
on:
push:
branches:
- master
workflow_dispatch:
inputs:
is_prelease:
description: 'Should be a pre-release?'
required: true
default: 'true'
type: choice
options:
- 'true'
- 'false'
tag_value:
description: 'Create a new release from latest master with the given tag, if this is left blank it will bump the patch version. You dont need to include the "v" prefix'
required: false
permissions:
contents: write
jobs:
cut-release:
if: github.repository == 'PCSX2/pcsx2'
name: "Create Tag and Release"
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ github.token }}
tag_prefix: v
default_bump: patch
# if set, it will overwrite the bump settings
custom_tag: ${{ github.event.inputs.tag_value == '' && null || github.event.inputs.tag_value }}
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
# with PRs -- not commits (determine how much we care).
# - name: Create Draft Release
# run: |
# echo "Creating release with tag - ${{ steps.tag_version.outputs.new_tag }}"
# gh release create ${{ steps.tag_version.outputs.new_tag }} --draft --generate-notes -title ${{ steps.tag_version.outputs.new_tag }}
- name: Generate Release Notes
env:
OWNER: PCSX2
REPO: pcsx2
GITHUB_TOKEN: ${{ github.token }}
COMMIT_SHA: ${{ github.SHA }}
run: |
cd ./.github/workflows/scripts/releases/generate-release-notes
npm ci
node index.js
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
- name: Create a GitHub Release (Manual)
uses: softprops/action-gh-release@v2
if: steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch'
with:
body_path: ./release-notes.md
draft: true
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prelease == 'true' }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub Release (Push)
uses: softprops/action-gh-release@v2
if: steps.tag_version.outputs.new_tag && github.event_name != 'workflow_dispatch'
with:
body_path: ./release-notes.md
draft: true
prerelease: true
tag_name: ${{ steps.tag_version.outputs.new_tag }}
# Build Everything
# Linux
build_linux_qt:
if: github.repository == 'PCSX2/pcsx2'
needs:
- cut-release
name: "Linux"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "AppImage Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage"
compiler: clang
cmakeflags: ""
buildAppImage: true
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
build_linux_flatpak:
if: github.repository == 'PCSX2/pcsx2'
needs:
- cut-release
name: "Linux"
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Flatpak Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
branch: "stable"
publish: false
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
# Windows
build_windows_qt:
if: github.repository == 'PCSX2/pcsx2'
needs:
- cut-release
name: "Windows"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "Windows Build"
artifactPrefixName: "PCSX2-windows-Qt-x64"
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
# MacOS
build_macos_qt:
if: github.repository == 'PCSX2/pcsx2'
needs:
- cut-release
name: "MacOS"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
# Upload the Artifacts
upload_artifacts:
if: github.repository == 'PCSX2/pcsx2'
needs:
- cut-release
- build_linux_flatpak
- build_linux_qt
- build_windows_qt
- build_macos_qt
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v4
name: Download all Artifacts
with:
path: ./ci-artifacts/
- name: Display structure of downloaded files
run: ls ./ci-artifacts/
# Prepare artifacts, they are all zips from github!
- name: Prepare Artifacts
working-directory: ./ci-artifacts/
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
- name: Name and Upload the Release Assets
env:
GITHUB_TOKEN: ${{ github.token }}
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
run: |
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
echo "TAG_VAL=${TAG_VAL}"
gh release list --repo PCSX2/pcsx2
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
TAG_VAL=${TAG_VAL} python ./.github/workflows/scripts/releases/rename-release-assets.py
ls ${{ github.WORKSPACE }}/ci-artifacts/out
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
- name: Publish Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
echo "TAG_VAL=${TAG_VAL}"
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Announce Release
env:
OWNER: PCSX2
REPO: pcsx2
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
GITHUB_TOKEN: ${{ github.token }}
run: |
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
cd ./.github/workflows/scripts/releases/announce-release
npm ci
TAG_VAL=${TAG_VAL} node index.js

View File

@@ -1,71 +0,0 @@
# Whenever a commit is pushed to master (ideally via a pull-request!)
# this action will create the next release, which means:
# 1. tag master with the proper version
# 2. create a new draft release (pre-released if a nightly build)
# 3. add release notes
name: 🏭 Create Release
on:
push:
branches:
- master
# TODO - future work
# workflow_dispatch:
# inputs:
# isStable:
# description: 'Should it be a stable release?'
# required: true
# default: 'false'
# versionTag:
# description: 'The version to tag with'
# required: true
jobs:
cut-release:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
name: "Create Tag and Release"
steps:
- uses: actions/checkout@v3
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
# Workflows cannot trigger other workflows implicitly
# - https://github.community/t/github-actions-workflow-not-triggering-with-tag-push/17053/7
github_token: ${{ secrets.BOT_PAT }}
tag_prefix: v
default_bump: patch
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
# with PRs -- not commits (determine how much we care).
# - name: Create Draft Release
# env:
# GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
# run: |
# echo "Creating release with tag - ${{ steps.tag_version.outputs.new_tag }}"
# gh release create ${{ steps.tag_version.outputs.new_tag }} --draft --generate-notes -title ${{ steps.tag_version.outputs.new_tag }}
- name: Generate Release Notes
env:
OWNER: PCSX2
REPO: pcsx2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.SHA }}
run: |
cd ./.github/workflows/scripts/releases/generate-release-notes
npm ci
node index.js
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
- name: Create a GitHub Release
uses: softprops/action-gh-release@v1
if: steps.tag_version.outputs.new_tag
with:
body_path: ./release-notes.md
draft: true
prerelease: true
tag_name: ${{ steps.tag_version.outputs.new_tag }}

View File

@@ -1,115 +0,0 @@
name: 🏭 Release Pipeline
on:
push:
tags:
- v*
jobs:
# Build Everything
# Linux
build_linux_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
compiler: clang
cmakeflags: ""
buildAppImage: true
secrets: inherit
# Windows
build_windows_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: CMake
buildSystem: cmake
secrets: inherit
build_qt_sse4:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release
simd: "SSE4"
secrets: inherit
build_qt_avx2:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release AVX2
secrets: inherit
# MacOS
build_macos_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "MacOS"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "Qt"
gui: "Qt"
secrets: inherit
# Upload the Artifacts
upload_artifacts:
if: github.repository == 'PCSX2/pcsx2'
needs:
- build_linux_qt
- build_windows_qt
- build_qt_sse4
- build_qt_avx2
- build_macos_qt
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v3
name: Download all Artifacts
with:
path: ./ci-artifacts/
- name: Display structure of downloaded files
run: ls ./ci-artifacts/
# Prepare artifacts, they are all zips from github!
- name: Prepare Artifacts
working-directory: ./ci-artifacts/
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
# Artifact Naming:
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
- name: Name and Upload the Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.REF }}
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
run: |
gh release list --repo PCSX2/pcsx2
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
python ./.github/workflows/scripts/releases/rename-release-assets.py
ls ${{ github.WORKSPACE }}/ci-artifacts/out
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
- name: Publish Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
run: |
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2

View File

@@ -1,39 +1,26 @@
#!/bin/bash
# Artifact Naming Scheme:
# PCSX2-<OS>-<GUI>-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# PCSX2-<OS>-Qt-[BUILD_SYSTEM]-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# -- limited to 200 chars
# Outputs:
# - artifact-name
# Example - PCSX2-linux-Qt-x64-flatpak-sse4-sha[e880a2749]
# Inputs as env-vars
# OS
# BUILD_SYSTEM
# GUI_FRAMEWORK
# ARCH
# SIMD
# PREFIX
# EVENT_NAME
# PR_TITLE
# PR_NUM
# PR_SHA
NAME=""
if [ "${OS}" == "macos" ]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
else
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
if [[ -z "${PREFIX}" ]]; then
echo "PREFIX is not set, can't name artifact without it!"
exit 1
fi
# Add cmake if used to differentate it from msbuild builds
# Else the two artifacts will have the same name and the files will be merged
if [[ ! -z "${BUILD_SYSTEM}" ]]; then
if [ "${BUILD_SYSTEM}" == "cmake" ]; then
NAME="${NAME}-${BUILD_SYSTEM}"
fi
fi
NAME="${PREFIX}"
# Add PR / Commit Metadata
if [ "$EVENT_NAME" == "pull_request" ]; then

View File

@@ -0,0 +1,577 @@
diff --git a/CHANGES b/CHANGES
index 5d3dd16..587b612 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,7 @@ v2024.1
- Update dependencies
- Propagate test/install options to Glslang
-v2024.0
+v2024.0 2024-03-09
- Update dependencies
- Utilities:
- Use Python3 explicitly in utility scripts
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffcb54b..7c1a6d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,6 +117,9 @@ if(MSVC)
endif()
endif(MSVC)
+if(NOT WIN32)
+ add_definitions("-fvisibility=hidden")
+endif()
# Configure subdirectories.
# We depend on these for later projects, so they should come first.
@@ -124,7 +127,6 @@ add_subdirectory(third_party)
add_subdirectory(libshaderc_util)
add_subdirectory(libshaderc)
-add_subdirectory(glslc)
if(${SHADERC_ENABLE_EXAMPLES})
add_subdirectory(examples)
endif()
@@ -158,5 +160,3 @@ function(define_pkg_config_file NAME LIBS)
endfunction()
define_pkg_config_file(shaderc -lshaderc_shared)
-define_pkg_config_file(shaderc_static "-lshaderc ${EXTRA_STATIC_PKGCONFIG_LIBS} -lshaderc_util")
-define_pkg_config_file(shaderc_combined -lshaderc_combined)
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
index df9a88d..b15e5d7 100644
--- a/libshaderc/CMakeLists.txt
+++ b/libshaderc/CMakeLists.txt
@@ -24,13 +24,6 @@ set(SHADERC_SOURCES
src/shaderc_private.h
)
-add_library(shaderc STATIC ${SHADERC_SOURCES})
-shaderc_default_compile_options(shaderc)
-target_include_directories(shaderc
- PUBLIC include
- PRIVATE ${glslang_SOURCE_DIR}
- ${SPIRV-Headers_SOURCE_DIR}/include)
-
add_library(shaderc_shared SHARED ${SHADERC_SOURCES})
shaderc_default_compile_options(shaderc_shared)
target_include_directories(shaderc_shared
@@ -54,7 +47,7 @@ if(SHADERC_ENABLE_INSTALL)
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/shaderc)
- install(TARGETS shaderc shaderc_shared
+ install(TARGETS shaderc_shared
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -69,20 +62,8 @@ set(SHADERC_LIBS
SPIRV-Tools
)
-target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS})
target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS})
-shaderc_add_tests(
- TEST_PREFIX shaderc
- LINK_LIBS shaderc
- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR}
- ${spirv-tools_SOURCE_DIR}/include
- ${SPIRV-Headers_SOURCE_DIR}/include
- TEST_NAMES
- shaderc
- shaderc_cpp
- shaderc_private)
-
shaderc_add_tests(
TEST_PREFIX shaderc_shared
LINK_LIBS shaderc_shared SPIRV-Tools
@@ -94,22 +75,6 @@ shaderc_add_tests(
shaderc_cpp
shaderc_private)
-shaderc_combine_static_lib(shaderc_combined shaderc)
-
-if(SHADERC_ENABLE_INSTALL)
- install(TARGETS shaderc_combined DESTINATION ${CMAKE_INSTALL_LIBDIR})
-endif(SHADERC_ENABLE_INSTALL)
-
-shaderc_add_tests(
- TEST_PREFIX shaderc_combined
- LINK_LIBS shaderc_combined ${CMAKE_THREAD_LIBS_INIT}
- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR}
- ${spirv-tools_SOURCE_DIR}/include
- ${SPIRV-Headers_SOURCE_DIR}/include
- TEST_NAMES
- shaderc
- shaderc_cpp)
-
if(${SHADERC_ENABLE_TESTS})
add_executable(shaderc_c_smoke_test ./src/shaderc_c_smoke_test.c)
shaderc_default_c_compile_options(shaderc_c_smoke_test)
diff --git a/libshaderc/include/shaderc/shaderc.h b/libshaderc/include/shaderc/shaderc.h
index 3a3e97d..65d5b77 100644
--- a/libshaderc/include/shaderc/shaderc.h
+++ b/libshaderc/include/shaderc/shaderc.h
@@ -317,7 +317,7 @@ SHADERC_EXPORT void shaderc_compile_options_set_source_language(
// Sets the compiler mode to generate debug information in the output.
SHADERC_EXPORT void shaderc_compile_options_set_generate_debug_info(
- shaderc_compile_options_t options);
+ shaderc_compile_options_t options, bool enabled, bool enable_non_semantic);
// Sets the compiler optimization level to the given level. Only the last one
// takes effect if multiple calls of this function exist.
@@ -506,6 +506,10 @@ SHADERC_EXPORT void shaderc_compile_options_set_invert_y(
SHADERC_EXPORT void shaderc_compile_options_set_nan_clamp(
shaderc_compile_options_t options, bool enable);
+// Returns a string representation of the specified compilation status.
+SHADERC_EXPORT const char* shaderc_compilation_status_to_string(
+ shaderc_compilation_status status);
+
// An opaque handle to the results of a call to any shaderc_compile_into_*()
// function.
typedef struct shaderc_compilation_result* shaderc_compilation_result_t;
@@ -529,28 +533,31 @@ typedef struct shaderc_compilation_result* shaderc_compilation_result_t;
// present. May be safely called from multiple threads without explicit
// synchronization. If there was failure in allocating the compiler object,
// null will be returned.
-SHADERC_EXPORT shaderc_compilation_result_t shaderc_compile_into_spv(
+SHADERC_EXPORT shaderc_compilation_status shaderc_compile_into_spv(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options);
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result);
// Like shaderc_compile_into_spv, but the result contains SPIR-V assembly text
// instead of a SPIR-V binary module. The SPIR-V assembly syntax is as defined
// by the SPIRV-Tools open source project.
-SHADERC_EXPORT shaderc_compilation_result_t shaderc_compile_into_spv_assembly(
+SHADERC_EXPORT shaderc_compilation_status shaderc_compile_into_spv_assembly(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options);
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result);
// Like shaderc_compile_into_spv, but the result contains preprocessed source
// code instead of a SPIR-V binary module
-SHADERC_EXPORT shaderc_compilation_result_t shaderc_compile_into_preprocessed_text(
+SHADERC_EXPORT shaderc_compilation_status shaderc_compile_into_preprocessed_text(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options);
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result);
// Takes an assembly string of the format defined in the SPIRV-Tools project
// (https://github.com/KhronosGroup/SPIRV-Tools/blob/master/syntax.md),
@@ -561,10 +568,11 @@ SHADERC_EXPORT shaderc_compilation_result_t shaderc_compile_into_preprocessed_te
// May be safely called from multiple threads without explicit synchronization.
// If there was failure in allocating the compiler object, null will be
// returned.
-SHADERC_EXPORT shaderc_compilation_result_t shaderc_assemble_into_spv(
+SHADERC_EXPORT shaderc_compilation_status shaderc_assemble_into_spv(
const shaderc_compiler_t compiler, const char* source_assembly,
size_t source_assembly_size,
- const shaderc_compile_options_t additional_options);
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result);
// The following functions, operating on shaderc_compilation_result_t objects,
// offer only the basic thread-safety guarantee.
diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp
index 3817af8..5592b49 100644
--- a/libshaderc/include/shaderc/shaderc.hpp
+++ b/libshaderc/include/shaderc/shaderc.hpp
@@ -168,8 +168,9 @@ class CompileOptions {
}
// Sets the compiler mode to generate debug information in the output.
- void SetGenerateDebugInfo() {
- shaderc_compile_options_set_generate_debug_info(options_);
+ void SetGenerateDebugInfo(bool enabled, bool non_semantic_debug_info) {
+ shaderc_compile_options_set_generate_debug_info(options_, enabled,
+ non_sematic_debug_info);
}
// Sets the compiler optimization level to the given level. Only the last one
@@ -425,9 +426,10 @@ class Compiler {
const char* input_file_name,
const char* entry_point_name,
const CompileOptions& options) const {
- shaderc_compilation_result_t compilation_result = shaderc_compile_into_spv(
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_compile_into_spv(
compiler_, source_text, source_text_size, shader_kind, input_file_name,
- entry_point_name, options.options_);
+ entry_point_name, options.options_, &compilation_result);
return SpvCompilationResult(compilation_result);
}
@@ -451,9 +453,10 @@ class Compiler {
size_t source_text_size,
shaderc_shader_kind shader_kind,
const char* input_file_name) const {
- shaderc_compilation_result_t compilation_result =
- shaderc_compile_into_spv(compiler_, source_text, source_text_size,
- shader_kind, input_file_name, "main", nullptr);
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_compile_into_spv(compiler_, source_text, source_text_size,
+ shader_kind, input_file_name, "main", nullptr,
+ &compilation_result);
return SpvCompilationResult(compilation_result);
}
@@ -504,8 +507,11 @@ class Compiler {
SpvCompilationResult AssembleToSpv(const char* source_assembly,
size_t source_assembly_size,
const CompileOptions& options) const {
- return SpvCompilationResult(shaderc_assemble_into_spv(
- compiler_, source_assembly, source_assembly_size, options.options_));
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_assemble_into_spv(
+ compiler_, source_assembly, source_assembly_size, options.options_,
+ &compilation_result);
+ return SpvCompilationResult(compilation_result);
}
// Assembles the given SPIR-V assembly and returns a SPIR-V binary module
@@ -513,8 +519,11 @@ class Compiler {
// Like the first AssembleToSpv method but uses the default compiler options.
SpvCompilationResult AssembleToSpv(const char* source_assembly,
size_t source_assembly_size) const {
- return SpvCompilationResult(shaderc_assemble_into_spv(
- compiler_, source_assembly, source_assembly_size, nullptr));
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_assemble_into_spv(
+ compiler_, source_assembly, source_assembly_size, nullptr,
+ &compilation_result);
+ return SpvCompilationResult(compilation_result);
}
// Assembles the given SPIR-V assembly and returns a SPIR-V binary module
@@ -523,9 +532,11 @@ class Compiler {
// std::string.
SpvCompilationResult AssembleToSpv(const std::string& source_assembly,
const CompileOptions& options) const {
- return SpvCompilationResult(
- shaderc_assemble_into_spv(compiler_, source_assembly.data(),
- source_assembly.size(), options.options_));
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_assemble_into_spv(
+ compiler_, source_assembly.data(), source_assembly.size(),
+ options.options_, &compilation_result);
+ return SpvCompilationResult(compilation_result);
}
// Assembles the given SPIR-V assembly and returns a SPIR-V binary module
@@ -533,8 +544,10 @@ class Compiler {
// Like the first AssembleToSpv method but the source is provided as a
// std::string and also uses default compiler options.
SpvCompilationResult AssembleToSpv(const std::string& source_assembly) const {
- return SpvCompilationResult(shaderc_assemble_into_spv(
- compiler_, source_assembly.data(), source_assembly.size(), nullptr));
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_assemble_into_spv(compiler_, source_assembly.data(),
+ source_assembly.size(), nullptr, &compilation_result);
+ return SpvCompilationResult(compilation_result);
}
// Compiles the given source GLSL and returns the SPIR-V assembly text
@@ -544,10 +557,11 @@ class Compiler {
const char* source_text, size_t source_text_size,
shaderc_shader_kind shader_kind, const char* input_file_name,
const char* entry_point_name, const CompileOptions& options) const {
- shaderc_compilation_result_t compilation_result =
- shaderc_compile_into_spv_assembly(
- compiler_, source_text, source_text_size, shader_kind,
- input_file_name, entry_point_name, options.options_);
+ shaderc_compilation_result_t compilation_result = nullptr;
+ shaderc_compile_into_spv_assembly(
+ compiler_, source_text, source_text_size, shader_kind,
+ input_file_name, entry_point_name, options.options_,
+ &compilation_result);
return AssemblyCompilationResult(compilation_result);
}
@@ -592,10 +606,10 @@ class Compiler {
const char* source_text, size_t source_text_size,
shaderc_shader_kind shader_kind, const char* input_file_name,
const CompileOptions& options) const {
- shaderc_compilation_result_t compilation_result =
- shaderc_compile_into_preprocessed_text(
+ shaderc_compilation_result_t compilation_result;
+ shaderc_compile_into_preprocessed_text(
compiler_, source_text, source_text_size, shader_kind,
- input_file_name, "main", options.options_);
+ input_file_name, "main", options.options_, &compilation_result);
return PreprocessedSourceCompilationResult(compilation_result);
}
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
index 63f1bbc..c1a9b12 100644
--- a/libshaderc/src/shaderc.cc
+++ b/libshaderc/src/shaderc.cc
@@ -418,8 +418,12 @@ void shaderc_compile_options_set_source_language(
}
void shaderc_compile_options_set_generate_debug_info(
- shaderc_compile_options_t options) {
- options->compiler.SetGenerateDebugInfo();
+ shaderc_compile_options_t options, bool enabled, bool enable_non_semantic) {
+ if (enabled) {
+ options->compiler.SetGenerateDebugInfo();
+ if (enable_non_semantic)
+ options->compiler.SetEmitNonSemanticDebugInfo();
+ }
}
void shaderc_compile_options_set_optimization_level(
@@ -591,8 +595,31 @@ void shaderc_compiler_release(shaderc_compiler_t compiler) {
delete compiler;
}
+const char* shaderc_compilation_status_to_string(shaderc_compilation_status status)
+{
+ static constexpr const std::pair<shaderc_compilation_status, const char*> status_names[] = {
+ {shaderc_compilation_status_success, "shaderc_compilation_status_success"},
+ {shaderc_compilation_status_invalid_stage, "shaderc_compilation_status_invalid_stage"},
+ {shaderc_compilation_status_compilation_error, "shaderc_compilation_status_compilation_error"},
+ {shaderc_compilation_status_internal_error, "shaderc_compilation_status_internal_error"},
+ {shaderc_compilation_status_null_result_object, "shaderc_compilation_status_null_result_object"},
+ {shaderc_compilation_status_invalid_assembly, "shaderc_compilation_status_invalid_assembly"},
+ {shaderc_compilation_status_validation_error, "shaderc_compilation_status_validation_error"},
+ {shaderc_compilation_status_transformation_error, "shaderc_compilation_status_transformation_error"},
+ {shaderc_compilation_status_configuration_error, "shaderc_compilation_status_configuration_error"},
+ };
+
+ for (const auto& it : status_names)
+ {
+ if (status == it.first)
+ return it.second;
+ }
+
+ return "shaderc_compilation_status_unknown";
+}
+
namespace {
-shaderc_compilation_result_t CompileToSpecifiedOutputType(
+shaderc_compilation_result_vector* CompileToSpecifiedOutputType(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
@@ -669,48 +696,59 @@ shaderc_compilation_result_t CompileToSpecifiedOutputType(
}
} // anonymous namespace
-shaderc_compilation_result_t shaderc_compile_into_spv(
+shaderc_compilation_status shaderc_compile_into_spv(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options) {
- return CompileToSpecifiedOutputType(
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result) {
+ shaderc_compilation_result_vector* resultv = CompileToSpecifiedOutputType(
compiler, source_text, source_text_size, shader_kind, input_file_name,
entry_point_name, additional_options,
shaderc_util::Compiler::OutputType::SpirvBinary);
+ *result = resultv;
+ return resultv ? resultv->compilation_status : shaderc_compilation_status_internal_error;
}
-shaderc_compilation_result_t shaderc_compile_into_spv_assembly(
+shaderc_compilation_status shaderc_compile_into_spv_assembly(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options) {
- return CompileToSpecifiedOutputType(
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result) {
+ shaderc_compilation_result_vector* resultv = CompileToSpecifiedOutputType(
compiler, source_text, source_text_size, shader_kind, input_file_name,
entry_point_name, additional_options,
shaderc_util::Compiler::OutputType::SpirvAssemblyText);
+ *result = resultv;
+ return resultv ? resultv->compilation_status : shaderc_compilation_status_internal_error;
}
-shaderc_compilation_result_t shaderc_compile_into_preprocessed_text(
+shaderc_compilation_status shaderc_compile_into_preprocessed_text(
const shaderc_compiler_t compiler, const char* source_text,
size_t source_text_size, shaderc_shader_kind shader_kind,
const char* input_file_name, const char* entry_point_name,
- const shaderc_compile_options_t additional_options) {
- return CompileToSpecifiedOutputType(
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result) {
+ shaderc_compilation_result_vector* resultv = CompileToSpecifiedOutputType(
compiler, source_text, source_text_size, shader_kind, input_file_name,
entry_point_name, additional_options,
shaderc_util::Compiler::OutputType::PreprocessedText);
+ *result = resultv;
+ return resultv ? resultv->compilation_status : shaderc_compilation_status_internal_error;
}
-shaderc_compilation_result_t shaderc_assemble_into_spv(
+shaderc_compilation_status shaderc_assemble_into_spv(
const shaderc_compiler_t compiler, const char* source_assembly,
size_t source_assembly_size,
- const shaderc_compile_options_t additional_options) {
- auto* result = new (std::nothrow) shaderc_compilation_result_spv_binary;
- if (!result) return nullptr;
- result->compilation_status = shaderc_compilation_status_invalid_assembly;
- if (!compiler->initializer) return result;
- if (source_assembly == nullptr) return result;
+ const shaderc_compile_options_t additional_options,
+ shaderc_compilation_result_t* result) {
+ auto* bresult = new (std::nothrow) shaderc_compilation_result_spv_binary;
+ if (!bresult) return shaderc_compilation_status_internal_error;
+ bresult->compilation_status = shaderc_compilation_status_invalid_assembly;
+ *result = bresult;
+ if (!compiler->initializer) return bresult->compilation_status;
+ if (source_assembly == nullptr) return bresult->compilation_status;
TRY_IF_EXCEPTIONS_ENABLED {
spv_binary assembling_output_data = nullptr;
@@ -724,22 +762,22 @@ shaderc_compilation_result_t shaderc_assemble_into_spv(
GetCompilerTargetEnvVersion(target_env_version),
{source_assembly, source_assembly + source_assembly_size},
&assembling_output_data, &errors);
- result->num_errors = !assembling_succeeded;
+ bresult->num_errors = !assembling_succeeded;
if (assembling_succeeded) {
- result->SetOutputData(assembling_output_data);
- result->output_data_size =
+ bresult->SetOutputData(assembling_output_data);
+ bresult->output_data_size =
assembling_output_data->wordCount * sizeof(uint32_t);
- result->compilation_status = shaderc_compilation_status_success;
+ bresult->compilation_status = shaderc_compilation_status_success;
} else {
- result->messages = std::move(errors);
- result->compilation_status = shaderc_compilation_status_invalid_assembly;
+ bresult->messages = std::move(errors);
+ bresult->compilation_status = shaderc_compilation_status_invalid_assembly;
}
}
CATCH_IF_EXCEPTIONS_ENABLED(...) {
- result->compilation_status = shaderc_compilation_status_internal_error;
+ bresult->compilation_status = shaderc_compilation_status_internal_error;
}
- return result;
+ return bresult->compilation_status;
}
size_t shaderc_result_get_length(const shaderc_compilation_result_t result) {
diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h
index d9d02b9..b076ec8 100644
--- a/libshaderc_util/include/libshaderc_util/compiler.h
+++ b/libshaderc_util/include/libshaderc_util/compiler.h
@@ -195,6 +195,7 @@ class Compiler {
warnings_as_errors_(false),
suppress_warnings_(false),
generate_debug_info_(false),
+ emit_non_semantic_debug_info_(false),
enabled_opt_passes_(),
target_env_(TargetEnv::Vulkan),
target_env_version_(TargetEnvVersion::Default),
@@ -220,6 +221,10 @@ class Compiler {
// such as identifier names and line numbers.
void SetGenerateDebugInfo();
+ // Requests that the compiler emit non-semantic debug information.
+ // Requires VK_KHR_shader_non_semantic_info.
+ void SetEmitNonSemanticDebugInfo();
+
// Sets the optimization level to the given level. Only the last one takes
// effect if multiple calls of this method exist.
void SetOptimizationLevel(OptimizationLevel level);
@@ -486,6 +491,10 @@ class Compiler {
// output.
bool generate_debug_info_;
+ // When true and generate_debug_info_ is also set, generate non-semantic debug
+ // information.
+ bool emit_non_semantic_debug_info_;
+
// Optimization passes to be applied.
std::vector<PassId> enabled_opt_passes_;
diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
index e5f5d10..1f9e6a5 100644
--- a/libshaderc_util/src/compiler.cc
+++ b/libshaderc_util/src/compiler.cc
@@ -341,6 +341,11 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile(
options.generateDebugInfo = generate_debug_info_;
options.disableOptimizer = true;
options.optimizeSize = false;
+ options.emitNonSemanticShaderDebugInfo =
+ generate_debug_info_ && emit_non_semantic_debug_info_;
+ options.emitNonSemanticShaderDebugSource =
+ generate_debug_info_ && emit_non_semantic_debug_info_;
+
// Note the call to GlslangToSpv also populates compilation_output_data.
glslang::GlslangToSpv(*program.getIntermediate(used_shader_stage), spirv,
&options);
@@ -438,6 +443,10 @@ void Compiler::SetGenerateDebugInfo() {
}
}
+void Compiler::SetEmitNonSemanticDebugInfo() {
+ emit_non_semantic_debug_info_ = true;
+}
+
void Compiler::SetOptimizationLevel(Compiler::OptimizationLevel level) {
// Clear previous settings first.
enabled_opt_passes_.clear();
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index d44f62a..83966b6 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -20,9 +20,9 @@ set(SHADERC_TINT_DIR "${SHADERC_THIRD_PARTY_ROOT_DIR}/tint" CACHE STRING
set(SHADERC_ABSL_DIR "${SHADERC_THIRD_PARTY_ROOT_DIR}/abseil_cpp" CACHE STRING
"Location of re2 source")
-set( SKIP_GLSLANG_INSTALL ${SHADERC_SKIP_INSTALL} )
-set( SKIP_SPIRV_TOOLS_INSTALL ${SHADERC_SKIP_INSTALL} )
-set( SKIP_GOOGLETEST_INSTALL ${SHADERC_SKIP_INSTALL} )
+set( SKIP_GLSLANG_INSTALL ON )
+set( SKIP_SPIRV_TOOLS_INSTALL ON )
+set( SKIP_GOOGLETEST_INSTALL ON )
# Configure third party projects.
if(${SHADERC_ENABLE_TESTS})
@@ -64,7 +64,10 @@ if (NOT TARGET SPIRV-Tools)
add_subdirectory(${SHADERC_RE2_DIR} re2)
add_subdirectory(${SHADERC_EFFCEE_DIR} effcee)
endif()
- add_subdirectory(${SHADERC_SPIRV_TOOLS_DIR} spirv-tools)
+ set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "Skip building SPIRV-Tools executables")
+ set(SPIRV_TOOLS_BUILD_STATIC OFF CACHE BOOL "Skip building two SPIRV-Tools libs")
+ set(SPIRV_TOOLS_LIBRARY_TYPE STATIC CACHE STRING "Build static SPIRV-Tools libs")
+ add_subdirectory(${SHADERC_SPIRV_TOOLS_DIR} spirv-tools EXCLUDE_FROM_ALL)
if (NOT "${SPIRV_SKIP_TESTS}")
if (MSVC)
if (${MSVC_VERSION} LESS 1920)
@@ -87,8 +90,8 @@ if (NOT TARGET glslang)
# Glslang tests are off by default. Turn them on if testing Shaderc.
set(GLSLANG_TESTS ON)
endif()
- set(GLSLANG_ENABLE_INSTALL $<NOT:${SKIP_GLSLANG_INSTALL}>)
- add_subdirectory(${SHADERC_GLSLANG_DIR} glslang)
+ set(GLSLANG_ENABLE_INSTALL OFF)
+ add_subdirectory(${SHADERC_GLSLANG_DIR} glslang EXCLUDE_FROM_ALL)
endif()
if (NOT TARGET glslang)
message(FATAL_ERROR "glslang was not found - required for compilation")

View File

@@ -0,0 +1,11 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
set -e
# While we use custom Qt builds for our releases, the Qt6 package will be good enough
# for just updating translations. Saves building it for this action alone.
"$SCRIPTDIR/../../../../tools/retry.sh" sudo apt-get -y install qt6-l10n-tools
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_base_translation.sh"

View File

@@ -1,4 +0,0 @@
#!/bin/sh
APPDIR=$(dirname "$0")
exec "$APPDIR/usr/bin/pcsx2-qt" "$@"

View File

@@ -26,7 +26,6 @@
# For more information, please refer to <http://unlicense.org/>
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
if [ "$#" -ne 4 ]; then
echo "Syntax: $0 <path to pcsx2 directory> <path to build directory> <deps prefix> <output name>"
@@ -40,251 +39,150 @@ NAME=$4
BINARY=pcsx2-qt
APPDIRNAME=PCSX2.AppDir
STRIP=llvm-strip-12
STRIP=strip
declare -a SYSLIBS=(
"libaio.so.1"
"libz.so.1"
"libuuid.so.1"
"libapparmor.so.1"
"libblkid.so.1"
"libbsd.so.0"
"libdbus-1.so.3"
"libgcrypt.so.20"
"liblzma.so.5"
"libmount.so.1"
"libnsl.so.1"
"libpcre.so.3"
"libselinux.so.1"
"libsystemd.so.0"
"libudev.so.1"
"libwrap.so.0"
"libharfbuzz.so.0"
"libFLAC.so.8"
"libSoundTouch.so.1"
"libXau.so.6"
"libXcomposite.so.1"
"libXcursor.so.1"
"libXdamage.so.1"
"libXdmcp.so.6"
"libXext.so.6"
"libXfixes.so.3"
"libXi.so.6"
"libXinerama.so.1"
"libXrandr.so.2"
"libXrender.so.1"
"libXxf86vm.so.1"
"libasyncns.so.0"
"libcrypto.so.1.1"
"libjpeg.so.8"
"liblz4.so.1"
"libogg.so.0"
"libpcap.so.0.8"
"libpng16.so.16"
"libpulse.so.0"
"libsamplerate.so.0"
"libsndfile.so.1"
"libvorbis.so.0"
"libvorbisenc.so.2"
"libxcb.so.1"
"libxcb-render.so.0"
"libxcb-shm.so.0"
"libxkbcommon.so.0"
"libxkbcommon-x11.so.0"
"pulseaudio/libpulsecommon-13.99.so"
"libasound.so.2"
"libfreetype.so.6"
"libpcre2-16.so.0"
"libexpat.so.1"
"libffi.so.7"
"libgraphite2.so.3"
"libresolv.so.2"
"libgpg-error.so.0"
"libpcre2-16.so.0"
"libpng16.so.16"
"libxcb-icccm.so.4"
"libxcb-image.so.0"
"libxcb-keysyms.so.1"
"libxcb-randr.so.0"
"libxcb-render.so.0"
"libxcb-render-util.so.0"
"libxcb-shape.so.0"
"libxcb-sync.so.1"
"libxcb-util.so.1"
"libxcb-xfixes.so.0"
"libxcb-xkb.so.1"
"libevdev.so.2"
"libgudev-1.0.so.0"
"libinput.so.10"
"libjpeg.so.8"
"libmtdev.so.1"
"libpng16.so.16"
"libudev.so.1"
"libuuid.so.1"
"libcurl.so.4"
"libnghttp2.so.14"
"libidn2.so.0"
"librtmp.so.1"
"libssh.so.4"
"libpsl.so.5"
"libssl.so.1.1"
"libnettle.so.7"
"libgnutls.so.30"
"libgssapi_krb5.so.2"
"libldap_r-2.4.so.2"
"liblber-2.4.so.2"
"libbrotlidec.so.1"
"libunistring.so.2"
"libhogweed.so.5"
"libgmp.so.10"
"libp11-kit.so.0"
"libtasn1.so.6"
"libkrb5.so.3"
"libk5crypto.so.3"
"libcom_err.so.2"
"libkrb5support.so.0"
"libsasl2.so.2"
"libgssapi.so.3"
"libbrotlicommon.so.1"
"libkeyutils.so.1"
"libheimntlm.so.0"
"libkrb5.so.26"
"libasn1.so.8"
"libhcrypto.so.4"
"libroken.so.18"
"libwind.so.0"
"libheimbase.so.1"
"libhx509.so.5"
"libsqlite3.so.0"
"libcrypt.so.1"
declare -a MANUAL_LIBS=(
"libshaderc_shared.so.1"
)
declare -a DEPLIBS=(
"libSDL2-2.0.so.0"
)
declare -a QTLIBS=(
"libQt6Core.so.6"
"libQt6Gui.so.6"
"libQt6Network.so.6"
"libQt6OpenGL.so.6"
"libQt6Svg.so.6"
"libQt6WaylandClient.so.6"
"libQt6WaylandCompositor.so.6"
declare -a MANUAL_QT_LIBS=(
"libQt6WaylandEglClientHwIntegration.so.6"
"libQt6WaylandEglCompositorHwIntegration.so.6"
"libQt6Widgets.so.6"
"libQt6XcbQpa.so.6"
)
declare -a QTPLUGINS=(
"plugins/iconengines"
"plugins/imageformats"
"plugins/platforms"
#"plugins/platformthemes" # Enable this if we want to ship GTK+ themes at any point.
"plugins/tls"
"plugins/wayland-decoration-client"
"plugins/wayland-graphics-integration-client"
"plugins/wayland-graphics-integration-server"
"plugins/wayland-shell-integration"
"plugins/xcbglintegrations"
declare -a MANUAL_QT_PLUGINS=(
"wayland-decoration-client"
"wayland-graphics-integration-client"
"wayland-shell-integration"
)
set -e
if [ ! -f appimagetool-x86_64.AppImage ]; then
retry_command wget -O appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
LINUXDEPLOY=./linuxdeploy-x86_64.AppImage
LINUXDEPLOY_PLUGIN_QT=./linuxdeploy-plugin-qt-x86_64.AppImage
APPIMAGETOOL=./appimagetool-x86_64.AppImage
PATCHELF=patchelf
if [ ! -f "$LINUXDEPLOY" ]; then
"$PCSX2DIR/tools/retry.sh" wget -O "$LINUXDEPLOY" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x "$LINUXDEPLOY"
fi
if [ ! -f "$LINUXDEPLOY_PLUGIN_QT" ]; then
"$PCSX2DIR/tools/retry.sh" wget -O "$LINUXDEPLOY_PLUGIN_QT" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x "$LINUXDEPLOY_PLUGIN_QT"
fi
if [ ! -f "$APPIMAGETOOL" ]; then
"$PCSX2DIR/tools/retry.sh" wget -O "$APPIMAGETOOL" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x "$APPIMAGETOOL"
fi
OUTDIR=$(realpath "./$APPDIRNAME")
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
rm -fr "$OUTDIR"
mkdir "$OUTDIR"
mkdir "$OUTDIR/usr"
echo "Copying binary and resources..."
cp -a "$BUILDDIR/bin" "$OUTDIR/usr"
# Patch RPATH so the binary goes hunting for shared libraries in the AppDir instead of system.
echo "Patching RPATH in ${BINARY}..."
patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/$BINARY"
# Currently we leave the main binary unstripped, uncomment if this is not desired.
#$STRIP "$OUTDIR/usr/bin/$BINARY"
# Libraries we pull in from the system.
echo "Copying system libraries..."
mkdir -p "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
for lib in "${SYSLIBS[@]}"; do
blib=$(basename "$lib")
if [ -f "/lib/x86_64-linux-gnu/$lib" ]; then
cp "/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" ]; then
cp "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/lib/$lib" ]; then
cp "$CHROOT/lib/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/usr/lib/$lib" ]; then
cp "$CHROOT/usr/lib/$lib" "$OUTDIR/usr/lib/$blib"
else
echo "*** Failed to find '$blib'"
echo "Locating extra libraries..."
EXTRA_LIBS_ARGS=""
for lib in "${MANUAL_LIBS[@]}"; do
srcpath=$(find "$DEPSDIR" -name "$lib")
if [ ! -f "$srcpath" ]; then
echo "Missinge extra library $lib. Exiting."
exit 1
fi
$STRIP "$OUTDIR/usr/lib/$blib"
done
echo "Found $lib at $srcpath."
# Dependencies we built, at this point it's just SDL.
echo "Copying dependency libraries..."
for lib in "${DEPLIBS[@]}"; do
blib=$(basename "$lib")
if [ -f "$DEPSDIR/lib/$lib" ]; then
cp "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib/$blib"
if [ "$EXTRA_LIBS_ARGS" == "" ]; then
EXTRA_LIBS_ARGS="--library=$srcpath"
else
echo "*** Failed to find '$blib'"
exit 1
fi
$STRIP "$OUTDIR/usr/lib/$blib"
done
echo "Copying Qt libraries..."
for lib in "${QTLIBS[@]}"; do
cp -aL "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib"
$STRIP "$OUTDIR/usr/lib/$lib"
done
echo "Copying Qt plugins..."
mkdir -p "$OUTDIR/usr/lib/plugins"
for plugin in "${QTPLUGINS[@]}"; do
mkdir -p "$OUTDIR/usr/lib/$plugin"
cp -aL "$DEPSDIR/$plugin"/*.so "$OUTDIR/usr/lib/$plugin/"
done
for so in $(find "$OUTDIR/usr/lib/plugins" -iname '*.so'); do
# This is ../../ because it's usually plugins/group/name.so
echo "Patching RPATH in ${so}..."
patchelf --set-rpath '$ORIGIN/../..' "$so"
$STRIP "$so"
done
for so in $(find "$OUTDIR/usr/lib" -maxdepth 1); do
if [ -f "$so" ]; then
echo "Patching RPATH in ${so}"
patchelf --set-rpath '$ORIGIN' "$so"
EXTRA_LIBS_ARGS="$EXTRA_LIBS_ARGS,$srcpath"
fi
done
echo "Creating qt.conf..."
cat > "$OUTDIR/usr/bin/qt.conf" << EOF
[Paths]
Plugins = ../lib/plugins
EOF
# Why the nastyness? linuxdeploy strips our main binary, and there's no option to turn it off.
# It also doesn't strip the Qt libs. We can't strip them after running linuxdeploy, because
# patchelf corrupts the libraries (but they still work), but patchelf+strip makes them crash
# on load. So, make a backup copy, strip the original (since that's where linuxdeploy finds
# the libs to copy), then swap them back after we're done.
# Isn't Linux packaging amazing?
echo "Copy desktop/icon..."
cp "$PCSX2DIR/pcsx2/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$SCRIPTDIR/pcsx2-qt.desktop" "$OUTDIR/PCSX2.desktop"
cp "$SCRIPTDIR/AppRun-qt" "$OUTDIR/AppRun"
rm -fr "$DEPSDIR.bak"
cp -a "$DEPSDIR" "$DEPSDIR.bak"
IFS="
"
for i in $(find "$DEPSDIR" -iname '*.so'); do
echo "Stripping deps library ${i}"
strip "$i"
done
echo "Copying desktop file..."
cp "$PCSX2DIR/.github/workflows/scripts/linux/pcsx2-qt.desktop" "net.pcsx2.PCSX2.desktop"
cp "$PCSX2DIR/bin/resources/icons/AppIconLarge.png" "PCSX2.png"
echo "Running linuxdeploy to create AppDir..."
EXTRA_QT_PLUGINS="core;gui;svg;waylandclient;widgets;xcbqpa" \
EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
DEPLOY_PLATFORM_THEMES="1" \
QMAKE="$DEPSDIR/bin/qmake" \
NO_STRIP="1" \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" $EXTRA_LIBS_ARGS \
--desktop-file="net.pcsx2.PCSX2.desktop" --icon-file="PCSX2.png"
echo "Copying resources into AppDir..."
cp -a "$BUILDDIR/bin/resources" "$OUTDIR/usr/bin"
# LinuxDeploy's Qt plugin doesn't include Wayland support. So manually copy in the additional Wayland libraries.
echo "Copying Qt Wayland libraries..."
for lib in "${MANUAL_QT_LIBS[@]}"; do
srcpath="$DEPSDIR/lib/$lib"
dstpath="$OUTDIR/usr/lib/$lib"
echo " $srcpath -> $dstpath"
cp "$srcpath" "$dstpath"
$PATCHELF --set-rpath '$ORIGIN' "$dstpath"
done
# .. and plugins.
echo "Copying Qt Wayland plugins..."
for GROUP in "${MANUAL_QT_PLUGINS[@]}"; do
srcpath="$DEPSDIR/plugins/$GROUP"
dstpath="$OUTDIR/usr/plugins/$GROUP"
echo " $srcpath -> $dstpath"
mkdir -p "$dstpath"
for srcsopath in $(find "$DEPSDIR/plugins/$GROUP" -iname '*.so'); do
# This is ../../ because it's usually plugins/group/name.so
soname=$(basename "$srcsopath")
dstsopath="$dstpath/$soname"
echo " $srcsopath -> $dstsopath"
cp "$srcsopath" "$dstsopath"
$PATCHELF --set-rpath '$ORIGIN/../../lib:$ORIGIN' "$dstsopath"
done
done
# Restore unstripped deps (for cache).
rm -fr "$DEPSDIR"
mv "$DEPSDIR.bak" "$DEPSDIR"
# Fix up translations.
rm -fr "$OUTDIR/usr/bin/translations" "$OUTDIR/usr/translations"
cp -a "$BUILDDIR/bin/translations" "$OUTDIR/usr/bin"
# Generate AppStream meta-info.
echo "Generating AppStream metainfo..."
mkdir -p "$OUTDIR/usr/share/metainfo"
"$SCRIPTDIR/generate-metainfo.sh" "$OUTDIR/usr/share/metainfo/net.pcsx2.PCSX2.appdata.xml"
# Copy in AppRun hooks.
# Unfortunately linuxdeploy is a bit lame and doesn't let us provide our own AppRun hooks, instead
# they have to come from plugins.. and screw writing one of those just to disable Wayland.
echo "Copying AppRun hooks..."
mkdir -p "$OUTDIR/apprun-hooks"
for hookpath in "$SCRIPTDIR/apprun-hooks"/*; do
hookname=$(basename "$hookpath")
cp -v "$hookpath" "$OUTDIR/apprun-hooks/$hookname"
sed -i -e 's/exec /source "$this_dir"\/apprun-hooks\/"'"$hookname"'"\nexec /' "$OUTDIR/AppRun"
done
echo "Generating AppImage..."
rm -f "$NAME.AppImage"
$APPIMAGETOOL -v "$OUTDIR" "$NAME.AppImage"
echo "Generate AppImage"
./appimagetool-x86_64.AppImage -v "$OUTDIR" "$NAME.AppImage"

View File

@@ -0,0 +1,9 @@
if [[ -z "$I_WANT_A_BROKEN_WAYLAND_UI" ]]; then
echo "Forcing X11 instead of Wayland, due to various protocol limitations"
echo "and Qt issues. If you want to use Wayland, launch PCSX2 with"
echo "I_WANT_A_BROKEN_WAYLAND_UI=YES set."
export QT_QPA_PLATFORM=xcb
else
echo "Wayland is not being disabled. Do not complain when things break."
fi

View File

@@ -2,39 +2,141 @@
set -e
INSTALLDIR="$HOME/deps"
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
QT=6.3.1
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBJPEG=9f
LIBPNG=1.6.43
LIBWEBP=1.3.2
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
SDL=SDL2-2.30.3
QT=6.7.1
ZSTD=1.5.5
SHADERC=2024.1
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
6f14fea2d172a5b4170be3efcb0e58535f6605b61bcd823f6d5c9d165bb8c0f0 qtwayland-everywhere-src-$QT.tar.xz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec $SDL.tar.gz
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
b7338da1bdccb4d861e714efffaa83f174dfe37e194916bfd7ec82279a6ace19 qtbase-everywhere-src-$QT.tar.xz
a733b98f771064d000476b8861f822143982749448ba8abf9f1813edb8dfe79f qtimageformats-everywhere-src-$QT.tar.xz
3ed5b80f7228c41dd463b7a57284ed273d224d1c323c0dd78c5209635807cbce qtsvg-everywhere-src-$QT.tar.xz
0953cddf6248f3959279a10904892e8a98eb3e463d729a174b6fc47febd99824 qttools-everywhere-src-$QT.tar.xz
03d71565872b0e0e7303349071df031ab0f922f6dbdd3a5ec1ade9e188e4fbf4 qttranslations-everywhere-src-$QT.tar.xz
7ef176a8e701c90edd8e591dad36f83c30d623ef94439ff62cafcffd46a83d20 qtwayland-everywhere-src-$QT.tar.xz
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
EOF
curl -L \
curl -C - -L \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
-O "https://ijg.org/files/jpegsrc.v$LIBJPEG.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://github.com/lz4/lz4/archive/$LZ4.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz"
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"
shasum -a 256 --check SHASUMS
echo "Building SDL..."
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --disable-dbus --without-x --disable-video-opengl --disable-video-opengles --disable-video-vulkan --disable-wayland-shared --disable-ime --disable-oss --disable-alsa --disable-jack --disable-esd --disable-pipewire --disable-pulseaudio --disable-arts --disable-nas --disable-sndio --disable-fusionsound --disable-diskaudio
echo "Building libbacktrace..."
rm -fr "libbacktrace-$LIBBACKTRACE"
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$INSTALLDIR"
make
make install
cd ..
echo "Building libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building libjpeg..."
rm -fr "jpeg-$LIBJPEG"
tar xf "jpegsrc.v$LIBJPEG.tar.gz"
cd "jpeg-$LIBJPEG"
mkdir build
cd build
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared
make "-j$NPROCS"
make install
cd ../..
echo "Building LZ4..."
rm -fr "lz4-$LZ4"
tar xf "$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir -G Ninja build/cmake
cmake --build build-dir --parallel
ninja -C build-dir install
cd ..
echo "Building Zstandard..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
# Couple notes:
@@ -43,49 +145,51 @@ cd ..
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
# OpenGL is needed to render window decorations in Wayland, apparently.
echo "Building Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
mkdir build
cd build
../configure -prefix "$INSTALLDIR" -release -no-dbus -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -- -DFEATURE_dbus=OFF -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_system_webp=ON
cmake --build . --parallel
ninja install
cd ../../
echo "Building Qt Wayland..."
rm -fr "qtwayland-everywhere-src-$QT"
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
cd "qtwayland-everywhere-src-$QT"
# qtwayland does not build without qml/qtdeclarative in 6.3.1. Work around it.
patch -u src/compositor/CMakeLists.txt <<EOF
--- src/compositor/CMakeLists.txt 2022-06-08 13:44:30.000000000 +1000
+++ src/compositor/CMakeLists.txt 2022-07-17 20:05:25.461881785 +1000
@@ -46,7 +46,6 @@
global/qtwaylandcompositorglobal.h
global/qtwaylandqmlinclude.h
global/qwaylandcompositorextension.cpp global/qwaylandcompositorextension.h global/qwaylandcompositorextension_p.h
- global/qwaylandquickextension.cpp global/qwaylandquickextension.h
global/qwaylandutils_p.h
hardware_integration/qwlclientbufferintegration.cpp hardware_integration/qwlclientbufferintegration_p.h
wayland_wrapper/qwlbuffermanager.cpp wayland_wrapper/qwlbuffermanager_p.h
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# From Mac build-dependencies.sh:
@@ -103,23 +207,66 @@ patch -u src/linguist/CMakeLists.txt <<EOF
add_subdirectory(linguist)
endif()
EOF
# Also force disable clang scanning, it gets very confused.
patch -u configure.cmake <<EOF
--- configure.cmake
+++ configure.cmake
@@ -14,12 +14,12 @@
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
# In any case explicitly request a minimum version of 8.x for now, otherwise
# building with CMake will fail at compilation time.
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
# special case end
-if(TARGET WrapLibClang::WrapLibClang)
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
-endif()
+#if(TARGET WrapLibClang::WrapLibClang)
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
+#endif()
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -r deps-build

View File

@@ -1,15 +0,0 @@
#!/bin/bash
set -e
if [ -n "${GITHUB_ACTIONS}" ]; then
echo "Warning: Running this script outside of GitHub Actions isn't recommended."
fi
# Prepare the Cache
ccache -p
ccache -z
# Build
ninja
# Save the Cache
ccache -s

View File

@@ -0,0 +1,24 @@
{
"name": "libpcap",
"buildsystem": "cmake-ninja",
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/the-tcpdump-group/libpcap.git",
"tag": "libpcap-1.10.4",
"commit": "104271ba4a14de6743e43bcf87536786d8fddea4"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/pkgconfig",
"/share/man"
]
}

View File

@@ -0,0 +1,30 @@
{
"name": "sdl2",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DSDL_SHARED=ON",
"-DSDL_STATIC=OFF",
"-DSDL_TESTS=OFF"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "archive",
"url": "https://libsdl.org/release/SDL2-2.30.3.tar.gz",
"sha256": "820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig",
"/share/aclocal"
]
}

View File

@@ -0,0 +1,22 @@
{
"name": "libbacktrace",
"buildsystem": "autotools",
"no-autogen": true,
"build-options": {
"strip": false,
"no-debuginfo": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/ianlancetaylor/libbacktrace.git",
"commit": "ad106d5fdd5d960bd33fae1c48a351af567fd075"
}
],
"cleanup": [
"/include",
"/lib/*.a",
"/lib/*.la"
]
}

View File

@@ -0,0 +1,51 @@
{
"name": "shaderc",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DSHADERC_SKIP_TESTS=ON",
"-DSHADERC_SKIP_EXAMPLES=ON",
"-DSHADERC_SKIP_COPYRIGHT_CHECK=ON"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/google/shaderc.git",
"commit": "47a9387ef5b3600d30d84c71ec77a59dc7db46fa"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/glslang/archive/142052fa30f9eca191aa9dcf65359fcaed09eeec.tar.gz",
"sha256": "aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f",
"dest": "third_party/glslang"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/SPIRV-Headers/archive/5e3ad389ee56fca27c9705d093ae5387ce404df4.tar.gz",
"sha256": "5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697",
"dest": "third_party/spirv-headers"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/SPIRV-Tools/archive/dd4b663e13c07fea4fbb3f70c1c91c86731099f7.tar.gz",
"sha256": "03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47",
"dest": "third_party/spirv-tools"
},
{
"type": "patch",
"path": "../../../common/shaderc-changes.patch"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig"
]
}

View File

@@ -0,0 +1,73 @@
{
"app-id": "net.pcsx2.PCSX2",
"runtime": "org.kde.Platform",
"runtime-version": "6.7",
"sdk": "org.kde.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.llvm17"
],
"add-extensions": {
"org.freedesktop.Platform.ffmpeg-full": {
"directory": "lib/ffmpeg",
"version": "22.08",
"add-ld-path": ".",
"autodownload": true
}
},
"command": "pcsx2-qt",
"finish-args": [
"--device=all",
"--share=network",
"--share=ipc",
"--socket=x11",
"--socket=pulseaudio",
"--talk-name=org.freedesktop.ScreenSaver",
"--env=QT_QPA_PLATFORM=xcb"
],
"modules": [
"modules/10-libpcap.json",
"modules/20-sdl2.json",
"modules/21-libbacktrace.json",
"modules/22-shaderc.json",
{
"name": "pcsx2",
"buildsystem": "cmake-ninja",
"builddir": true,
"no-make-install": true,
"build-options": {
"strip": false,
"no-debuginfo": true,
"cflags": "",
"cflags-override": true,
"cxxflags": "",
"cxxflags-override": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
"-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm17/bin/clang",
"-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm17/bin/clang++",
"-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DUSE_LINKED_FFMPEG=ON",
"-DDISABLE_ADVANCE_SIMD=TRUE"
]
},
"sources": [
{
"type": "dir",
"path": "../../../../.."
}
],
"post-install": [
"cp -a bin \"${FLATPAK_DEST}\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/bin/resources/icons/AppIconLarge.png\" \"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/net.pcsx2.PCSX2.png\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/.github/workflows/scripts/linux/pcsx2-qt.desktop\" \"${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop\"",
"desktop-file-edit --set-key=Icon --set-value=net.pcsx2.PCSX2 \"${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/.github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml\" \"${FLATPAK_DEST}/share/metainfo/net.pcsx2.PCSX2.metainfo.xml\"",
"mkdir -p \"${FLATPAK_DEST}/lib/ffmpeg\""
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@@ -1,16 +0,0 @@
#!/bin/bash
function retry_command {
# Package servers tend to be unreliable at times..
# Retry a bunch of times.
local RETRIES=10
for i in $(seq 1 "$RETRIES"); do
"$@" && break
if [ "$i" == "$RETRIES" ]; then
echo "Command \"$@\" failed after ${RETRIES} retries."
exit 1
fi
done
}

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
set -e
if [ "${COMPILER}" = "clang" ]; then
echo "Using clang toolchain"
cat > "$HOME/clang-toolchain.cmake" << EOF
set(CMAKE_C_COMPILER /usr/bin/clang-12)
set(CMAKE_CXX_COMPILER /usr/bin/clang++-12)
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
EOF
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=$HOME/clang-toolchain.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
# DISABLE_ADVANCE_SIMD is needed otherwise we end up doing -march=native.
# shellcheck disable=SC2086
cmake \
-B build \
-G Ninja \
$ADDITIONAL_CMAKE_ARGS \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DQT_BUILD=ON \
-DCUBEB_API=ON \
-DX11_API=ON \
-DWAYLAND_API=ON \
-DENABLE_SETCAP=OFF \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_SYSTEM_ZSTD=OFF \
-DDISABLE_ADVANCE_SIMD=TRUE

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
if [[ $# -lt 1 ]]; then
echo "Output file must be provided as a parameter"
exit 1
fi
OUTFILE=$1
GIT_DATE=$(git log -1 --pretty=%cd --date=iso8601)
GIT_VERSION=$(git tag --points-at HEAD)
GIT_HASH=$(git rev-parse HEAD)
if [[ "${GIT_VERSION}" == "" ]]; then
# In the odd event that we run this script before the release gets tagged.
GIT_VERSION=$(git describe --tags)
if [[ "${GIT_VERSION}" == "" ]]; then
GIT_VERSION=$(git rev-parse HEAD)
fi
fi
echo "GIT_DATE: ${GIT_DATE}"
echo "GIT_VERSION: ${GIT_VERSION}"
echo "GIT_HASH: ${GIT_HASH}"
cp "${SCRIPTDIR}"/pcsx2-qt.metainfo.xml.in "${OUTFILE}"
sed -i -e "s/@GIT_VERSION@/${GIT_VERSION}/" "${OUTFILE}"
sed -i -e "s/@GIT_DATE@/${GIT_DATE}/" "${OUTFILE}"
sed -i -e "s/@GIT_HASH@/${GIT_HASH}/" "${OUTFILE}"

View File

@@ -1,77 +0,0 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
# Packages - Build and Qt
declare -a BUILD_PACKAGES=(
"build-essential"
"git"
"cmake"
"ccache"
"ninja-build"
"libclang-dev" # Qt goes hunting for libclang-11 specifically.
"libclang-11-dev"
"libclang-12-dev"
"patchelf"
"libglib2.0-dev"
"libfontconfig1-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"libpng-dev"
"libfreetype-dev"
"libinput-dev"
"libxcb-*-dev"
"libxkbcommon-dev"
"libxkbcommon-x11-dev"
"libxrender-dev"
"libwayland-dev"
"libgl1-mesa-dev"
"libegl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libssl-dev"
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
"libcurl4-openssl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libsoundtouch-dev"
"libudev-dev"
"libx11-xcb-dev"
"pkg-config"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10")
else
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
fi
retry_command sudo apt-get -qq update && break
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
retry_command sudo apt-get -y install "${PCSX2_PACKAGES[@]}"

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>net.pcsx2.PCSX2</id>
<launchable type="desktop-id">net.pcsx2.PCSX2.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>PCSX2</name>
<developer_name>PCSX2</developer_name>
<summary>PlayStation 2 Emulator</summary>
<description>
<p>PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. This allows you to play PS2 games on your PC, with many additional features and benefits.</p>
<p>PlayStation 2 and PS2 are registered trademarks of Sony Interactive Entertainment. This application is not affiliated in any way with Sony Interactive Entertainment.</p>
</description>
<url type="homepage">https://pcsx2.net/</url>
<url type="bugtracker">https://github.com/PCSX2/pcsx2/issues</url>
<url type="donation">https://github.com/sponsors/PCSX2</url>
<url type="faq">https://pcsx2.net/docs/</url>
<url type="help">https://discord.com/invite/TCz3t9k</url>
<url type="translate">https://crowdin.com/project/pcsx2-emulator</url>
<url type="vcs-browser">https://github.com/PCSX2/pcsx2</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"/>
<update_contact>stenzek_AT_gmail.com</update_contact>
<releases>
<release version="@GIT_VERSION@" date="@GIT_DATE@" />
</releases>
<custom>
<value key="flathub::manifest">https://raw.githubusercontent.com/PCSX2/pcsx2/@GIT_HASH@/.github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json</value>
</custom>
</component>

View File

@@ -2,95 +2,290 @@
set -e
export MACOSX_DEPLOYMENT_TARGET=10.14
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
# The bundled ffmpeg has a lot of things disabled to reduce code size.
# Users may want to use system ffmpeg for additional features
: ${BUILD_FFMPEG:=1}
export MACOSX_DEPLOYMENT_TARGET=11.0
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
PNG=1.6.37
JPG=9e
SOUNDTOUCH=soundtouch-2.3.1
QT=6.3.1
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
mkdir deps-build
FREETYPE=2.13.2
HARFBUZZ=8.3.1
SDL=SDL2-2.30.3
ZSTD=1.5.5
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
LIBPNG=1.6.43
LIBJPEG=9f
LIBWEBP=1.3.2
FFMPEG=6.0
MOLTENVK=1.2.8
QT=6.7.1
SHADERC=2024.1
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
mkdir -p deps-build
cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
CMAKE_COMMON=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_SHARED_LINKER_FLAGS="-dead_strip -dead_strip_dylibs"
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
-DCMAKE_OSX_ARCHITECTURES="x86_64"
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
)
cat > SHASUMS <<EOF
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
6900996607258496ce126924a19fe9d598af9d892cf3f33d1e4daaa9b42ae0b1 $SOUNDTOUCH.tar.gz
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d freetype-$FREETYPE.tar.xz
19a54fe9596f7a47c502549fce8e8a10978c697203774008cc173f8360b19a9a harfbuzz-$HARFBUZZ.tar.gz
820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec $SDL.tar.gz
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
85beaf8abfcc54d9da0ff0257ae311abd9e7aa96e53da37e1c37d6bc04ac83cd v$MOLTENVK.tar.gz
b7338da1bdccb4d861e714efffaa83f174dfe37e194916bfd7ec82279a6ace19 qtbase-everywhere-src-$QT.tar.xz
a733b98f771064d000476b8861f822143982749448ba8abf9f1813edb8dfe79f qtimageformats-everywhere-src-$QT.tar.xz
3ed5b80f7228c41dd463b7a57284ed273d224d1c323c0dd78c5209635807cbce qtsvg-everywhere-src-$QT.tar.xz
0953cddf6248f3959279a10904892e8a98eb3e463d729a174b6fc47febd99824 qttools-everywhere-src-$QT.tar.xz
03d71565872b0e0e7303349071df031ab0f922f6dbdd3a5ec1ade9e188e4fbf4 qttranslations-everywhere-src-$QT.tar.xz
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
EOF
curl -L \
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
-O "https://www.ijg.org/files/jpegsrc.v$JPG.tar.gz" \
-O "https://www.surina.net/soundtouch/$SOUNDTOUCH.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/lz4/lz4/archive/$LZ4.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://ijg.org/files/jpegsrc.v$LIBJPEG.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"
shasum -a 256 --check SHASUMS
echo "Installing SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --without-x
make "-j$NPROCS"
make install
cmake -B build "${CMAKE_COMMON[@]}" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
if [ "$BUILD_FFMPEG" -ne 0 ]; then
echo "Installing FFmpeg..."
rm -fr "ffmpeg-$FFMPEG"
tar xf "ffmpeg-$FFMPEG.tar.xz"
cd "ffmpeg-$FFMPEG"
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
./configure --prefix="$INSTALLDIR" \
--enable-cross-compile --arch=x86_64 --cc='clang -arch x86_64' --cxx='clang++ -arch x86_64' \
--disable-all --disable-autodetect --disable-static --enable-shared \
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
--enable-audiotoolbox --enable-videotoolbox \
--enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \
--enable-muxer=avi,matroska,mov,mp3,mp4,wav \
--enable-protocol=file
make "-j$NPROCS"
make install
cd ..
fi
echo "Installing Zstd..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
make -C build-dir install
cd ..
echo "Installing LZ4..."
rm -fr "lz4-$LZ4"
tar xf "$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
make -C build-dir install
cd ..
echo "Installing libpng..."
tar xf "libpng-$PNG.tar.xz"
cd "libpng-$PNG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
make "-j$NPROCS"
make install
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing libjpeg..."
tar xf "jpegsrc.v$JPG.tar.gz"
cd "jpeg-$JPG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
rm -fr "jpeg-$LIBJPEG"
tar xf "jpegsrc.v$LIBJPEG.tar.gz"
cd "jpeg-$LIBJPEG"
mkdir build
cd build
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="x86_64-apple-darwin" CFLAGS="-arch x86_64"
make "-j$NPROCS"
make install
cd ..
cd ../..
echo "Installing soundtouch..."
tar xf "$SOUNDTOUCH.tar.gz"
cd "$SOUNDTOUCH"
cmake -B build -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
echo "Installing WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake "${CMAKE_COMMON[@]}" -B build \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building FreeType without HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build
cmake --build build --parallel
cmake --install build
cd ..
echo "Building HarfBuzz..."
rm -fr "harfbuzz-$HARFBUZZ"
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
cd "harfbuzz-$HARFBUZZ"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build
cmake --build build --parallel
cmake --install build
cd ..
echo "Building FreeType with HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build
cmake --build build --parallel
cmake --install build
cd ..
# MoltenVK already builds universal binaries, nothing special to do here.
echo "Installing MoltenVK..."
rm -fr "MoltenVK-${MOLTENVK}"
tar xf "v$MOLTENVK.tar.gz"
cd "MoltenVK-${MOLTENVK}"
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd ..
echo "Installing Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it.
# https://github.com/qt/qtbase/commit/7b018629c3c3ab23665bf1da00c43c1546042035
# The QProcess default wait time of 30s may be too short in e.g. CI environments where processes may be blocked
# for a longer time waiting for CPU or IO.
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
--- shared.cpp
+++ shared.cpp
@@ -152,7 +152,7 @@
LogDebug() << " inspecting" << binaryPath;
QProcess otool;
otool.start("otool", QStringList() << "-L" << binaryPath);
- otool.waitForFinished();
+ otool.waitForFinished(-1);
if (otool.exitStatus() != QProcess::NormalExit || otool.exitCode() != 0) {
LogError() << otool.readAllStandardError();
@@ -1122,14 +1122,8 @@
addPlugins(QStringLiteral("networkinformation"));
}
- // All image formats (svg if QtSvg is used)
- const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
- addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
- if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
- return false;
- return true;
- });
-
+ // All image formats
+ addPlugins(QStringLiteral("imageformats"));
addPlugins(QStringLiteral("iconengines"));
// Platforminputcontext plugins if QtGui is in use
EOF
cmake -B build "${CMAKE_COMMON[@]}" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
@@ -107,18 +302,42 @@ patch -u src/linguist/CMakeLists.txt <<EOF
add_subdirectory(linguist)
endif()
EOF
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make -C build "-j$NPROCS"
make -C build install
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make "-j$NPROCS"
make install
cd ../..
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
echo "Installing Qt Translations..."
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
make "-j$NPROCS"
make install
cd ../..
echo "Cleaning up..."
cd ..
rm -r deps-build
rm -rf deps-build

View File

@@ -1,7 +1,58 @@
import { MessageEmbed, WebhookClient } from "discord.js";
import * as github from '@actions/github';
import { Octokit } from "@octokit/rest";
import { throttling } from "@octokit/plugin-throttling";
import { retry } from "@octokit/plugin-retry";
const releaseInfo = github.context.payload.release;
let owner = process.env.OWNER;
let repo = process.env.REPO;
Octokit.plugin(throttling);
Octokit.plugin(retry);
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
userAgent: `${owner}/${repo}`,
log: {
debug: () => { },
info: () => { },
warn: console.warn,
error: console.error
},
throttle: {
onRateLimit: (retryAfter, options) => {
octokit.log.warn(
`Request quota exhausted for request ${options.method} ${options.url}`
);
// Retry twice after hitting a rate limit error, then give up
if (options.request.retryCount <= 2) {
console.log(`Retrying after ${retryAfter} seconds!`);
return true;
}
},
onAbuseLimit: (retryAfter, options) => {
// does not retry, only logs a warning
octokit.log.warn(
`Abuse detected for request ${options.method} ${options.url}`
);
},
}
});
if (process.env.TAG_VAL === undefined || process.env.TAG_VAL === "") {
console.log(`Not announcing - TAG_VAL not defined`);
process.exit(1);
}
const { data: releaseInfo } = await octokit.rest.repos.getReleaseByTag({
owner: owner,
repo: repo,
tag: process.env.TAG_VAL,
});
if (releaseInfo === undefined) {
console.log(`Not announcing - could not locate release with tag ${process.env.TAG_VAL}`);
process.exit(1);
}
if (!releaseInfo.prerelease) {
console.log("Not announcing - release was not a pre-release (aka a Nightly)");
@@ -18,6 +69,7 @@ const embed = new MessageEmbed()
{ name: 'Installation Steps', value: '[See Here](https://github.com/PCSX2/pcsx2/wiki/Nightly-Build-Usage-Guide)', inline: true },
{ name: 'Included Changes', value: releaseInfo.body, inline: false }
);
console.log(embed);
// Get all webhooks, simple comma-sep string
const webhookUrls = process.env.DISCORD_BUILD_WEBHOOK.split(",");

View File

@@ -5,32 +5,16 @@
"requires": true,
"packages": {
"": {
"name": "announce-release",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@actions/github": "^5.0.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"discord.js": "^13.2.0"
}
},
"node_modules/@actions/github": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz",
"integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==",
"dependencies": {
"@actions/http-client": "^1.0.11",
"@octokit/core": "^3.4.0",
"@octokit/plugin-paginate-rest": "^2.13.3",
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
}
},
"node_modules/@actions/http-client": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
"dependencies": {
"tunnel": "0.0.6"
}
},
"node_modules/@discordjs/builders": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.6.0.tgz",
@@ -131,6 +115,14 @@
"@octokit/types": "^6.33.0"
}
},
"node_modules/@octokit/plugin-request-log": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
"peerDependencies": {
"@octokit/core": ">=3"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
@@ -140,6 +132,27 @@
"deprecation": "^2.3.1"
}
},
"node_modules/@octokit/plugin-retry": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
"dependencies": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"node_modules/@octokit/plugin-throttling": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz",
"integrity": "sha512-qrKT1Yl/KuwGSC6/oHpLBot3ooC9rq0/ryDYBCpkRtoj+R8T47xTMDT6Tk2CxWopFota/8Pi/2SqArqwC0JPow==",
"dependencies": {
"@octokit/types": "^6.0.1",
"bottleneck": "^2.15.3"
},
"peerDependencies": {
"@octokit/core": "^3.5.0"
}
},
"node_modules/@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
@@ -163,6 +176,17 @@
"once": "^1.4.0"
}
},
"node_modules/@octokit/rest": {
"version": "18.12.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
"dependencies": {
"@octokit/core": "^3.5.1",
"@octokit/plugin-paginate-rest": "^2.16.8",
"@octokit/plugin-request-log": "^1.0.4",
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
}
},
"node_modules/@octokit/types": {
"version": "6.33.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
@@ -214,6 +238,11 @@
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
},
"node_modules/bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -388,14 +417,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
@@ -461,25 +482,6 @@
}
},
"dependencies": {
"@actions/github": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz",
"integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==",
"requires": {
"@actions/http-client": "^1.0.11",
"@octokit/core": "^3.4.0",
"@octokit/plugin-paginate-rest": "^2.13.3",
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
}
},
"@actions/http-client": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
"requires": {
"tunnel": "0.0.6"
}
},
"@discordjs/builders": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.6.0.tgz",
@@ -569,6 +571,12 @@
"@octokit/types": "^6.33.0"
}
},
"@octokit/plugin-request-log": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
"requires": {}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
@@ -578,6 +586,24 @@
"deprecation": "^2.3.1"
}
},
"@octokit/plugin-retry": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
"requires": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"@octokit/plugin-throttling": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz",
"integrity": "sha512-qrKT1Yl/KuwGSC6/oHpLBot3ooC9rq0/ryDYBCpkRtoj+R8T47xTMDT6Tk2CxWopFota/8Pi/2SqArqwC0JPow==",
"requires": {
"@octokit/types": "^6.0.1",
"bottleneck": "^2.15.3"
}
},
"@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
@@ -601,6 +627,17 @@
"once": "^1.4.0"
}
},
"@octokit/rest": {
"version": "18.12.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
"requires": {
"@octokit/core": "^3.5.1",
"@octokit/plugin-paginate-rest": "^2.16.8",
"@octokit/plugin-request-log": "^1.0.4",
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
}
},
"@octokit/types": {
"version": "6.33.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
@@ -642,6 +679,11 @@
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
},
"bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -765,11 +807,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
},
"type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",

View File

@@ -10,7 +10,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@actions/github": "^5.0.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"discord.js": "^13.2.0"
}
}

View File

@@ -1,10 +1,10 @@
import os
import shutil
tag = os.environ['TAG'].split("refs/tags/")[1]
tag = os.environ['TAG_VAL']
scan_dir = os.environ['SCAN_DIR']
output_dir = os.environ['OUT_DIR']
accepted_exts = ["AppImage", "tar.gz", "7z"]
accepted_exts = ["AppImage", "flatpak", "tar.xz", "7z"]
for dir_name in os.listdir(scan_dir):
@@ -12,9 +12,12 @@ for dir_name in os.listdir(scan_dir):
if "macos" in dir_name.lower():
asset_name += "-macos"
elif "linux" in dir_name.lower():
asset_name += "-linux-AppImage-64bit"
if "flatpak" in dir_name.lower():
asset_name += "-linux-flatpak-x64"
else:
asset_name += "-linux-appimage-x64"
elif "windows" in dir_name.lower():
asset_name += "-windows-64bit"
asset_name += "-windows-x64"
else:
continue;

View File

@@ -0,0 +1,291 @@
@echo off
setlocal enabledelayedexpansion
echo Setting environment...
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
) else (
echo Visual Studio 2022 not found.
goto error
)
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
set PATCH="C:\Program Files\Git\usr\bin\patch.exe"
if defined DEBUG (
echo DEBUG=%DEBUG%
) else (
set DEBUG=1
)
pushd %~dp0
set "SCRIPTDIR=%CD%"
cd ..\..\..\..
mkdir deps-build
cd deps-build || goto error
set "BUILDDIR=%CD%"
cd ..
mkdir deps
cd deps || goto error
set "INSTALLDIR=%CD%"
popd
echo SCRIPTDIR=%SCRIPTDIR%
echo BUILDDIR=%BUILDDIR%
echo INSTALLDIR=%INSTALLDIR%
set "PATH=%PATH%;%INSTALLDIR%\bin"
cd "%BUILDDIR%"
set FREETYPE=2.13.2
set HARFBUZZ=8.3.1
set LIBJPEG=9f
set LIBPNG=1643
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
set QT=6.7.1
set QTMINOR=6.7
set SDL=SDL2-2.30.3
set WEBP=1.3.2
set ZLIB=1.3.1
set ZLIBSHORT=131
set ZSTD=1.5.5
set SHADERC=2024.1
set SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
set SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
set SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 || goto error
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip b2bc56184ae37324bc4829fde7d3f9e6916866ad711ee85792e457547c9fd127 || goto error
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1643.zip fc466a1e638e635d6c66363bdf3f38555b81b0141d0b06ba45b49ccca327436d || goto error
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || goto error
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 || goto error
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/%LZ4%.zip" 0c33119688d6b180c7e760b0acd70059222389cfd581632623784bee27e51a31 || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" c5d78a9e0346c6695f03df8ba25e5e111a1e23c8aefa8372a1c5a0dd79acaf10 || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 3027fb990cb66436b5476b9dd17cd58f23b55a42eb1c1bcf9c7d78bca3ad7d63 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" f30065289517847d721467827ee446a5f606f6d1c750e166cbfb0ed5bf066c5e || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 882d1db58d35155bd92e4ed92b485d7d713b6aff0d7cf78655de0b414a980689 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 93a31892ca8a4f38464e923328788ce3da881d82016fe18fa1ed12dd43ce486c || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 102ca62fa682c0d3e700ba89069fd3b6663b9f0c2890b058e97998b6e8971fb3 || goto error
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" c5c8daa1d40dabc51790c62a5b86af2b36dfc4e1a738ff10dc4a46ea4e68ee51 || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 6c9f42ed6bf42750f5369b089909abfdcf0101488b4a1f41116d5159d00af8e7 || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 03ad8a6fa987af4653d0cfe6bdaed41bcf617f1366a151fb1574da75950cd3e8 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" fa59a54334feaba5702b9c25724c3f4746123865769b36dd5a28d9ef5e9d39ab || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" bf385994c20293485b378c27dfdbd77a31b949deabccd9218a977f173eda9f6f || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
) else (
echo Building release libraries...
)
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG"
echo Building Zlib...
rmdir /S /Q "zlib-%ZLIB%"
%SEVENZIP% x "zlib%ZLIBSHORT%.zip" || goto error
cd "zlib-%ZLIB%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZLIB_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libpng...
rmdir /S /Q "lpng%LIBPNG%"
%SEVENZIP% x "lpng%LIBPNG%.zip" || goto error
cd "lpng%LIBPNG%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libjpeg...
rmdir /S /Q "jpeg-%LIBJPEG%"
%SEVENZIP% x "jpegsr%LIBJPEG%.zip" || goto error
cd "jpeg-%LIBJPEG%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\libjpeg-cmake.patch" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building LZ4...
rmdir /S /Q "lz4"
%SEVENZIP% x "lz4-%LZ4%.zip" || goto error
rename "lz4-%LZ4%" "lz4" || goto error
cd "lz4" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -DCMAKE_C_FLAGS="/wd4711 /wd5045" -B build-dir -G Ninja build/cmake || goto error
cmake --build build-dir --parallel || goto error
ninja -C build-dir install || goto error
cd ..
echo Building FreeType without HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building HarfBuzz...
rmdir /S /Q "harfbuzz-%HARFBUZZ%"
%SEVENZIP% x "-x^!harfbuzz-%HARFBUZZ%\README" "harfbuzz-%HARFBUZZ%.zip" || goto error
cd "harfbuzz-%HARFBUZZ%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building FreeType with HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building Zstandard...
rmdir /S /Q "zstd-%ZSTD%"
%SEVENZIP% x "-x^!zstd-1.5.5\tests\cli-tests\bin" "zstd-%ZSTD%.zip" || goto error
cd "zstd-%ZSTD%"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building WebP...
rmdir /S /Q "libwebp-%WEBP%"
tar -xf "libwebp-%WEBP%.tar.gz" || goto error
cd "libwebp-%WEBP%" || goto error
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building SDL...
rmdir /S /Q "%SDL%"
%SEVENZIP% x "%SDL%.zip" || goto error
cd "%SDL%" || goto error
cmake -B build -DCMAKE_BUILD_TYPE=Release %FORCEPDB% -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
copy build\SDL2.pdb "%INSTALLDIR%\bin" || goto error
cd .. || goto error
if %DEBUG%==1 (
set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config"
) else (
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
)
echo Building Qt base...
rmdir /S /Q "qtbase-everywhere-src-%QT%"
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
cd "qtbase-everywhere-src-%QT%" || goto error
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building Qt SVG...
rmdir /S /Q "qtsvg-everywhere-src-%QT%"
%SEVENZIP% x "qtsvg-everywhere-src-%QT%.zip" || goto error
cd "qtsvg-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building Qt Image Formats...
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
%SEVENZIP% x "qtimageformats-everywhere-src-%QT%.zip" || goto error
cd "qtimageformats-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DFEATURE_system_webp=ON || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building Qt Tools...
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
%SEVENZIP% x "qttools-everywhere-src-%QT%.zip" || goto error
cd "qttools-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building Qt Translations...
rmdir /S /Q "qttranslations-everywhere-src-%QT%"
%SEVENZIP% x "qttranslations-everywhere-src-%QT%.zip" || goto error
cd "qttranslations-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building shaderc...
rmdir /S /Q "shaderc-%SHADERC%"
%SEVENZIP% x "shaderc-%SHADERC%.zip" || goto error
cd "shaderc-%SHADERC%" || goto error
cd third_party || goto error
%SEVENZIP% x "..\..\shaderc-glslang-%SHADERC_GLSLANG%.zip" || goto error
rename "glslang-%SHADERC_GLSLANG%" "glslang" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" || goto error
rename "SPIRV-Headers-%SHADERC_SPIRVHEADERS%" "spirv-headers" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" || goto error
rename "SPIRV-Tools-%SHADERC_SPIRVTOOLS%" "spirv-tools" || goto error
cd .. || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\shaderc-changes.patch" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -DSHADERC_ENABLE_SHARED_CRT=ON -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Cleaning up...
cd ..
rd /S /Q deps-build
echo Exiting with success.
exit 0
:error
echo Failed with error #%errorlevel%.
pause
exit %errorlevel%
:downloadfile
if not exist "%~1" (
echo Downloading %~1 from %~2...
curl -L -o "%~1" "%~2" || goto error
)
rem based on https://gist.github.com/gsscoder/e22daefaff9b5d8ac16afb070f1a7971
set idx=0
for /f %%F in ('certutil -hashfile "%~1" SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
set filechecksum=%out1%
if /i %~3==%filechecksum% (
echo Validated %~1.
exit /B 0
) else (
echo Expected %~3 got %filechecksum%.
exit /B 1
)

View File

@@ -0,0 +1,422 @@
diff -ruN jpeg-9f/CMakeLists.txt jpeg-9f-new/CMakeLists.txt
--- jpeg-9f/CMakeLists.txt 1970-01-01 10:00:00.000000000 +1000
+++ jpeg-9f-new/CMakeLists.txt 2024-03-23 21:29:37.969221600 +1000
@@ -0,0 +1,110 @@
+# CMake configuration for IJG libjpeg
+# Modified from https://github.com/csparker247/jpeg-cmake/blob/develop/resources/CMakeLists.txt
+# To install, copy this file and jconfig.h.in into a libjpeg source directory
+# Adapted from LuaDist's CMakeLists
+# https://github.com/LuaDist/libjpeg/blob/master/CMakeLists.txt
+
+cmake_minimum_required(VERSION 3.5)
+
+### Setup the project ###
+file(READ "configure.ac" ac)
+string(REGEX MATCH "AC_INIT\\(\\[libjpeg\\],\ \\[([0-9]*\\.[0-9]*\\.[0-9]*)\\]\\)" _ ${ac})
+set(version ${CMAKE_MATCH_1})
+project(libjpeg VERSION ${version} LANGUAGES C)
+set(C_STANDARD 99)
+
+### Include extra packages ###
+include(CMakeDependentOption)
+include(GNUInstallDirs)
+
+### Options ###
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+option(BUILD_STATIC_LIBS "Build static libraries" ON)
+
+# Make sure we build at least one library
+if(NOT(BUILD_SHARED_LIBS OR BUILD_STATIC_LIBS))
+ message(FATAL_ERROR "Both static and shared libraries are disabled. Nothing will be built.")
+endif()
+
+### Configure jconfig.h ###
+include(ConfigureJConfig.cmake)
+
+### Build the object library ###
+set(PUBLIC_HDRS
+ jconfig.h
+ jerror.h
+ jmorecfg.h
+ jpeglib.h
+)
+
+set(SRCS
+ jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c
+ jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdarith.c
+ jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdinput.c
+ jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdpostct.c jdsample.c jdtrans.c
+ jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c
+ jmemmgr.c jmemnobs.c jquant1.c jquant2.c jutils.c
+)
+
+### Create static and shared libs ###
+if(BUILD_SHARED_LIBS)
+ add_library(libjpeg SHARED ${SRCS})
+ target_compile_definitions(libjpeg PRIVATE COMPILING_LIBJPEG)
+ target_include_directories(libjpeg
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include>
+ )
+ set_target_properties(libjpeg
+ PROPERTIES
+ VERSION ${PROJECT_VERSION_MAJOR}
+ POSITION_INDEPENDENT_CODE ON
+ CLEAN_DIRECT_OUTPUT ON
+ PUBLIC_HEADER "${PUBLIC_HDRS}"
+ )
+ install(TARGETS libjpeg
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+endif()
+
+if(BUILD_STATIC_LIBS)
+ add_library(libjpeg_static STATIC $<TARGET_OBJECTS:jpeg_objs>)
+ target_include_directories(libjpeg_static
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include>
+ )
+ set_target_properties(libjpeg_static
+ PROPERTIES
+ OUTPUT_NAME jpeg
+ VERSION ${PROJECT_VERSION_MAJOR}
+ POSITION_INDEPENDENT_CODE ON
+ CLEAN_DIRECT_OUTPUT ON
+ PUBLIC_HEADER "${PUBLIC_HDRS}"
+ )
+ install(TARGETS libjpeg_static
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+endif()
+
+# Configure and install pkg-config and libtool files
+if(BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS)
+ # Compute the la file's weird version number
+ math(EXPR JPEG_CONF_VER_MAJOR "${PROJECT_VERSION_MAJOR} + ${PROJECT_VERSION_MINOR}")
+ set(JPEG_LIB_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+ set(JPEG_LIB_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+
+ # Configure and install
+ configure_file(libjpeg.pc.cmakein libjpeg.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libjpeg.pc
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig
+ )
+endif()
+
diff -ruN jpeg-9f/ConfigureJConfig.cmake jpeg-9f-new/ConfigureJConfig.cmake
--- jpeg-9f/ConfigureJConfig.cmake 1970-01-01 10:00:00.000000000 +1000
+++ jpeg-9f-new/ConfigureJConfig.cmake 2024-03-23 21:09:37.223882900 +1000
@@ -0,0 +1,95 @@
+include(CheckIncludeFile)
+include(CheckSymbolExists)
+include(CheckTypeSize)
+
+# Define this if your system has an ANSI-conforming <stddef.h> file.
+check_include_file(stddef.h HAVE_STDDEF_H)
+
+# Define this if your system has an ANSI-conforming <stdlib.h> file.
+check_include_file(stdlib.h HAVE_STDLIB_H)
+
+# Does your compiler support function prototypes?
+# (If not, you also need to use ansi2knr, see install.txt)
+set(HAVE_PROTOTYPES true CACHE BOOL "Does your compiler support function prototypes?")
+
+# Does your compiler support the declaration "unsigned char" ?
+# How about "unsigned short" ?
+check_type_size("unsigned char" UNSIGNED_CHAR LANGUAGE C)
+check_type_size("unsigned short" UNSIGNED_SHORT LANGUAGE C)
+
+# Define "void" as "char" if your compiler doesn't know about type void.
+# NOTE: be sure to define void such that "void *" represents the most general
+# pointer type, e.g., that returned by malloc().
+# NOT IMPLEMENTED: Modify in jconfig.h.in #
+
+# Define "const" as empty if your compiler doesn't know the "const" keyword.
+# NOT IMPLEMENTED: Modify in jconfig.h.in #
+
+# Define this if an ordinary "char" type is unsigned.
+# If you're not sure, leaving it undefined will work at some cost in speed.
+# If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
+set(CHAR_IS_UNSIGNED false CACHE BOOL "char type is unsigned")
+
+# Define this if your system does not have an ANSI/SysV <string.h>,
+# but does have a BSD-style <strings.h>.
+set(NEED_BSD_STRINGS false CACHE BOOL "Use BSD <strings.h>. Use only if system lacks ANSI/SysV <strings.h>")
+
+# Define this if your system does not provide typedef size_t in any of the
+# ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
+# <sys/types.h> instead.
+set(NEED_SYS_TYPES_H false CACHE BOOL "size_t defined in <sys/types.h>")
+
+# For 80x86 machines, you need to define NEED_FAR_POINTERS,
+# unless you are using a large-data memory model or 80386 flat-memory mode.
+# On less brain-damaged CPUs this symbol must not be defined.
+# (Defining this symbol causes large data structures to be referenced through
+# "far" pointers and to be allocated with a special version of malloc.)
+set(NEED_FAR_POINTERS false CACHE BOOL "Reference large data structures through 'far' pointers allocated with a special version of malloc")
+
+# Define this if your linker needs global names to be unique in less
+# than the first 15 characters.
+set(NEED_SHORT_EXTERNAL_NAMES false CACHE BOOL "Global names must be unique in less than the first 15 characters")
+
+# Although a real ANSI C compiler can deal perfectly well with pointers to
+# unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
+# and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
+# define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
+# actually get "missing structure definition" warnings or errors while
+# compiling the JPEG code.
+set(INCOMPLETE_TYPES_BROKEN false CACHE BOOL "Disable pointers to unspecified structures")
+
+# Define "boolean" as unsigned char, not enum, on Windows systems.
+# NOT IMPLEMENTED: Modify in jconfig.h.in #
+
+# The following options affect code selection within the JPEG library,
+# but they don't need to be visible to applications using the library.
+# To minimize application namespace pollution, the symbols won't be
+# defined unless JPEG_INTERNALS has been defined.
+#
+
+# Define this if your compiler implements ">>" on signed values as a logical
+# (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
+# which is the normal and rational definition.
+set(RIGHT_SHIFT_IS_UNSIGNED false CACHE BOOL "Compiler implements >> on signed values as a logical (unsigned) shift")
+
+# The remaining options do not affect the JPEG library proper,
+# but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
+# Other applications can ignore these.
+#
+
+mark_as_advanced(FORCE
+ HAVE_PROTOTYPES
+ HAVE_UNSIGNED_CHAR
+ HAVE_UNSIGNED_SHORT
+ CHAR_IS_UNSIGNED
+ HAVE_STDDEF_H
+ HAVE_STDLIB_H
+ NEED_BSD_STRINGS
+ NEED_SYS_TYPES_H
+ NEED_FAR_POINTERS
+ NEED_SHORT_EXTERNAL_NAMES
+ INCOMPLETE_TYPES_BROKEN
+ RIGHT_SHIFT_IS_UNSIGNED
+)
+
+configure_file(jconfig.h.in ${CMAKE_CURRENT_SOURCE_DIR}/jconfig.h)
diff -ruN jpeg-9f/jconfig.h.in jpeg-9f-new/jconfig.h.in
--- jpeg-9f/jconfig.h.in 1970-01-01 10:00:00.000000000 +1000
+++ jpeg-9f-new/jconfig.h.in 2024-03-23 21:06:05.204994600 +1000
@@ -0,0 +1,173 @@
+/*
+ * jconfig.h.in
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * Modified 2009-2013 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file is a modification of jconfig.txt from libjpeg. In addition to
+ * documenting the configuration options that are required to customize the
+ * JPEG software for a particular system, it is used by jpeg-cmake to configure
+ * jconfig.h
+ */
+
+
+/*
+ * These symbols indicate the properties of your machine or compiler.
+ * #define the symbol if yes, #undef it if no.
+ */
+
+/* Does your compiler support function prototypes?
+ * (If not, you also need to use ansi2knr, see install.txt)
+ */
+#cmakedefine HAVE_PROTOTYPES
+
+/* Does your compiler support the declaration "unsigned char" ?
+ * How about "unsigned short" ?
+ */
+#cmakedefine HAVE_UNSIGNED_CHAR
+#cmakedefine HAVE_UNSIGNED_SHORT
+
+/* Define "void" as "char" if your compiler doesn't know about type void.
+ * NOTE: be sure to define void such that "void *" represents the most general
+ * pointer type, e.g., that returned by malloc().
+ */
+/* #define void char */
+
+/* Define "const" as empty if your compiler doesn't know the "const" keyword.
+ */
+/* #define const */
+
+/* Define this if an ordinary "char" type is unsigned.
+ * If you're not sure, leaving it undefined will work at some cost in speed.
+ * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
+ */
+#cmakedefine CHAR_IS_UNSIGNED
+
+/* Define this if your system has an ANSI-conforming <stddef.h> file.
+ */
+#cmakedefine HAVE_STDDEF_H
+
+/* Define this if your system has an ANSI-conforming <stdlib.h> file.
+ */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define this if your system does not have an ANSI/SysV <string.h>,
+ * but does have a BSD-style <strings.h>.
+ */
+#cmakedefine NEED_BSD_STRINGS
+
+/* Define this if your system does not provide typedef size_t in any of the
+ * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
+ * <sys/types.h> instead.
+ */
+#cmakedefine NEED_SYS_TYPES_H
+
+/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
+ * unless you are using a large-data memory model or 80386 flat-memory mode.
+ * On less brain-damaged CPUs this symbol must not be defined.
+ * (Defining this symbol causes large data structures to be referenced through
+ * "far" pointers and to be allocated with a special version of malloc.)
+ */
+#cmakedefine NEED_FAR_POINTERS
+
+/* Define this if your linker needs global names to be unique in less
+ * than the first 15 characters.
+ */
+#cmakedefine NEED_SHORT_EXTERNAL_NAMES
+
+/* Although a real ANSI C compiler can deal perfectly well with pointers to
+ * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
+ * and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
+ * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
+ * actually get "missing structure definition" warnings or errors while
+ * compiling the JPEG code.
+ */
+#cmakedefine INCOMPLETE_TYPES_BROKEN
+
+/* Define "boolean" as unsigned char, not enum, on Windows systems.
+ */
+#ifdef _WIN32
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#ifndef FALSE /* in case these macros already exist */
+#define FALSE 0 /* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
+#endif
+
+
+/*
+ * The following options affect code selection within the JPEG library,
+ * but they don't need to be visible to applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+
+/* Define this if your compiler implements ">>" on signed values as a logical
+ * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
+ * which is the normal and rational definition.
+ */
+#cmakedefine RIGHT_SHIFT_IS_UNSIGNED
+
+
+#endif /* JPEG_INTERNALS */
+
+
+/*
+ * The remaining options do not affect the JPEG library proper,
+ * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
+ * Other applications can ignore these.
+ */
+
+#ifdef JPEG_CJPEG_DJPEG
+
+/* These defines indicate which image (non-JPEG) file formats are allowed. */
+
+#cmakedefine BMP_SUPPORTED /* BMP image file format */
+#cmakedefine GIF_SUPPORTED /* GIF image file format */
+#cmakedefine PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
+#cmakedefine RLE_SUPPORTED /* Utah RLE image file format */
+#cmakedefine TARGA_SUPPORTED /* Targa image file format */
+
+/*
+ * This defines the default output format for djpeg. Must be one of the FMT_*
+ * enums found in djpeg.c or djpegalt.c
+ */
+#cmakedefine DEFAULT_FMT @DEFAULT_FMT@
+
+/* Define this if you want to name both input and output files on the command
+ * line, rather than using stdout and optionally stdin. You MUST do this if
+ * your system can't cope with binary I/O to stdin/stdout. See comments at
+ * head of cjpeg.c or djpeg.c.
+ */
+#cmakedefine TWO_FILE_COMMANDLINE
+
+/* Define this if your system needs explicit cleanup of temporary files.
+ * This is crucial under MS-DOS, where the temporary "files" may be areas
+ * of extended memory; on most other systems it's not as important.
+ */
+#cmakedefine NEED_SIGNAL_CATCHER
+
+/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
+ * This is necessary on systems that distinguish text files from binary files,
+ * and is harmless on most systems that don't. If you have one of the rare
+ * systems that complains about the "b" spec, define this symbol.
+ */
+#cmakedefine DONT_USE_B_MODE
+
+/* Define this if you want percent-done progress reports from cjpeg/djpeg.
+ */
+#cmakedefine PROGRESS_REPORT
+
+/* Define this if you *don't* want overwrite confirmation */
+#cmakedefine NO_OVERWRITE_CHECK
+
+#endif /* JPEG_CJPEG_DJPEG */
diff -ruN jpeg-9f/jmorecfg.h jpeg-9f-new/jmorecfg.h
--- jpeg-9f/jmorecfg.h 2022-03-31 19:41:26.000000000 +1000
+++ jpeg-9f-new/jmorecfg.h 2024-03-23 21:20:25.514814400 +1000
@@ -244,8 +244,13 @@
#define LOCAL(type) static type
/* a function referenced thru EXTERNs: */
#define GLOBAL(type) type
+
/* a reference to a GLOBAL function: */
-#define EXTERN(type) extern type
+#ifdef COMPILING_LIBJPEG
+#define EXTERN(type) __declspec(dllexport) extern type
+#else
+#define EXTERN(type) __declspec(dllimport) extern type
+#endif
/* This macro is used to declare a "method", that is, a function pointer.
diff -ruN jpeg-9f/libjpeg.pc.cmakein jpeg-9f-new/libjpeg.pc.cmakein
--- jpeg-9f/libjpeg.pc.cmakein 1970-01-01 10:00:00.000000000 +1000
+++ jpeg-9f-new/libjpeg.pc.cmakein 2024-03-23 21:06:13.922695100 +1000
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: libjpeg
+Description: Reads and writes JPEG files
+Version: @JPEG_LIB_VERSION_MAJOR@.@JPEG_LIB_VERSION_MINOR@.0
+Libs: -L${libdir} -ljpeg
+Cflags: -I${includedir}

View File

@@ -8,7 +8,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,8 +2,8 @@ name: 🖥️ Windows Builds
on:
push:
branches:
- '*'
branches-ignore:
- "l10n_master"
pull_request:
branches:
- master
@@ -12,19 +12,22 @@ jobs:
# MSBUILD
lint_vs_proj_files:
name: Lint VS Project Files
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
runs-on: windows-2019
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
build_qt_sse4:
needs: lint_vs_proj_files
name: "SSE4"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
jobName: "MSVC SSE4"
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-msvc"
configuration: Release
simd: "SSE4"
secrets: inherit
@@ -32,17 +35,21 @@ jobs:
build_qt_avx2:
needs: lint_vs_proj_files
name: "AVX2"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
jobName: "MSVC AVX2"
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-msvc"
configuration: Release AVX2
secrets: inherit
build_qt_sse4_cmake:
name: "CMake SSE4"
build_qt_cmake:
name: "CMake"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
jobName: "CMake MSVC"
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-msvc"
configuration: CMake
buildSystem: cmake
secrets: inherit
@@ -50,9 +57,11 @@ jobs:
build_qt_clang_sse4:
needs: lint_vs_proj_files
name: "SSE4"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
jobName: "Clang SSE4"
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-clang"
configuration: Release Clang
simd: "SSE4"
secrets: inherit
@@ -60,8 +69,22 @@ jobs:
build_qt_clang_avx2:
needs: lint_vs_proj_files
name: "AVX2"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
jobName: "Clang AVX2"
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-clang"
configuration: Release Clang AVX2
secrets: inherit
build_qt_cmake_clang:
name: "CMake"
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "CMake Clang"
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-clang"
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang
secrets: inherit

View File

@@ -6,6 +6,9 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
@@ -25,43 +28,59 @@ on:
required: false
type: string
default: msbuild
qt_binary_url:
cmakeFlags:
required: false
type: string
default: https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-11-20/qt-6.4.0-x64.7z
qt_dir:
required: false
type: string
default: 3rdparty\qt\6.4.0\msvc2022_64
cheats_url:
default: ""
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_windows_qt:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
timeout-minutes: 90
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- name: Tempfix Clang
if: inputs.configuration == 'CMake'
run: choco upgrade llvm
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: windows
BUILD_SYSTEM: ${{ inputs.buildSystem }}
GUI_FRAMEWORK: Qt
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -70,21 +89,26 @@ jobs:
- name: Setup msbuild
if: inputs.configuration != 'CMake'
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v2
- name: Download Qt build files
shell: cmd
run: |
cd 3rdparty\qt
aria2c ${{ inputs.qt_binary_url }}
7z x qt-*-x64.7z
del qt-*-x64.7z
- name: Download cheats
- name: Download patches
shell: cmd
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
DEBUG: 0
run: .github/workflows/scripts/windows/build-dependencies.bat
- name: Generate CMake
if: inputs.configuration == 'CMake'
@@ -92,7 +116,7 @@ jobs:
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -B build "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
cmake . -B build ${{ inputs.cmakeFlags }} "-DCMAKE_PREFIX_PATH=%cd%\deps" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
- name: Build PCSX2
shell: cmd
@@ -110,10 +134,11 @@ jobs:
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%PATH%;%GITHUB_WORKSPACE%\bin
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: |
@@ -127,7 +152,7 @@ jobs:
!./bin/**/*.lib
- name: Upload artifact - with symbols
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
path: ./bin/**/*.pdb

33
.gitignore vendored
View File

@@ -23,13 +23,6 @@
*.VC.db
*.VC.VC.opendb
**/Win32/Release*
**/Win32/Debug*
**/Win32/Devel*
**/x64/Release*
**/x64/Debug*
**/x64/Devel*
_ReSharper.*
pcsx2.snapshot_*
svnrev.h
@@ -44,6 +37,7 @@ Thumbs.db
Debug.txt
install_log.txt
bad_shader_*
crash-*.txt
Debug
Release
@@ -62,6 +56,13 @@ oprofile_data/
/UpgradeLog*.htm
/.vscode*
# Jetbrains Rider
/.idea*
# KDevelop 4 Workspace Configuration Files
*.kdev4
/.kdev4*
/bin/**/*.dll
/bin/**/*.dmp
/bin/**/*.exp
@@ -73,11 +74,13 @@ oprofile_data/
/bin/bios
/bin/cache
/bin/cheats
/bin/patches
/bin/covers
/bin/dumps
/bin/gamesettings
/bin/help
/bin/inis
/bin/inis/debuggersettings
/bin/logs
/bin/memcards
/bin/plugins
@@ -86,12 +89,24 @@ oprofile_data/
/bin/textures
/bin/translations
/bin/inputprofiles
/bin/videos
/bin/portable.ini
/bin/portable.txt
# Manually added by user.
/bin/resources/patches.zip
# Resources that are runtime downloaded.
/bin/resources/fonts/NotoSansJP-Regular.ttf
/bin/resources/fonts/NotoSansKR-Regular.ttf
/bin/resources/fonts/NotoSansSC-Regular.ttf
/bin/resources/fonts/NotoSansTC-Regular.ttf
/deps-build
/deps
/ipch
!/3rdparty/libjpeg/change.log
/pcsx2/gui/Resources/*.h
!/pcsx2/gui/Resources/EmbeddedImage.h
/tools/bin
.vs

21
.gitmodules vendored
View File

@@ -1,15 +1,9 @@
[submodule "3rdparty/xz/xz"]
path = 3rdparty/xz/xz
url = https://github.com/PCSX2/xz.git
[submodule "3rdparty/gtest"]
path = 3rdparty/gtest
url = https://github.com/google/googletest.git
[submodule "3rdparty/fmt/fmt"]
path = 3rdparty/fmt/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "3rdparty/libchdr/libchdr"]
path = 3rdparty/libchdr/libchdr
url = https://github.com/rtissera/libchdr.git
[submodule "3rdparty/wil"]
path = 3rdparty/wil
url = https://github.com/microsoft/wil.git
@@ -18,21 +12,6 @@
path = 3rdparty/rapidyaml/rapidyaml
url = https://github.com/biojppm/rapidyaml.git
branch = master
[submodule "3rdparty/glslang/glslang"]
path = 3rdparty/glslang/glslang
url = https://github.com/KhronosGroup/glslang.git
[submodule "3rdparty/vulkan-headers"]
path = 3rdparty/vulkan-headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "3rdparty/sdl2/SDL"]
path = 3rdparty/sdl2/SDL
url = https://github.com/libsdl-org/SDL.git
[submodule "3rdparty/libzip/libzip"]
path = 3rdparty/libzip/libzip
url = https://github.com/nih-at/libzip.git
[submodule "3rdparty/zstd/zstd"]
path = 3rdparty/zstd/zstd
url = https://github.com/facebook/zstd.git
[submodule "3rdparty/rcheevos/rcheevos"]
path = 3rdparty/rcheevos/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git

View File

@@ -2,19 +2,36 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir>$(SolutionDir)deps\$(PlatformName)\$(Configuration)\</OutDir>
<IntDir>$(PlatformName)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)build\3rdparty\lib-$(PlatformName)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\3rdparty\obj-$(ProjectName)-$(PlatformName)-$(Configuration)\</IntDir>
<ExtensionsToDeleteOnClean>*.bsc;*.idb;*.sbr;*.res;*.pch;*.pdb;*.obj;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp20</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ConformanceMode>true</ConformanceMode>
<!-- MSVC automatically adds __AVX__ and __AVX2__ appropriately -->
<PreprocessorDefinitions>_M_X86;__SSE4_1__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="!$(Configuration.Contains(AVX2)) Or $(Configuration.Contains(Clang))">NotSet</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="$(Configuration.Contains(AVX2)) And !$(Configuration.Contains(Clang))">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And !$(Configuration.Contains(AVX2))"> -march=nehalem %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(AVX2))"> -march=haswell %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="!$(Configuration.Contains(Clang))">%(AdditionalOptions) /Zc:externConstexpr /Zc:__cplusplus /Zo /utf-8</AdditionalOptions>
<!-- Force ThinLTO for Release builds, MSVC doesn't seem to do it otherwise. -->
<!-- Also due to include order, needs to be set here, rather than in CodeGen_Release.props -->
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(Release))"> -flto=thin %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
</Project>

View File

@@ -3,7 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
# ---[ Setup project
PROJECT(
cpuinfo
LANGUAGES C CXX
LANGUAGES C
)
# ---[ Options.
@@ -13,6 +13,26 @@ SET(CPUINFO_RUNTIME_TYPE "default" CACHE STRING "Type of runtime library (shared
SET_PROPERTY(CACHE CPUINFO_RUNTIME_TYPE PROPERTY STRINGS default static shared)
SET(CPUINFO_LOG_LEVEL "default" CACHE STRING "Minimum logging level (info with lower severity will be ignored)")
SET_PROPERTY(CACHE CPUINFO_LOG_LEVEL PROPERTY STRINGS default debug info warning error fatal none)
IF(ANDROID)
OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" OFF)
ELSE()
OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" ON)
ENDIF()
OPTION(CPUINFO_BUILD_TOOLS "Build command-line tools" OFF)
OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" OFF)
OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" OFF)
OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" OFF)
OPTION(CPUINFO_BUILD_PKG_CONFIG "Build pkg-config manifest" OFF)
OPTION(USE_SYSTEM_LIBS "Use system libraries instead of downloading and building them" OFF)
OPTION(USE_SYSTEM_GOOGLEBENCHMARK "Use system Google Benchmark library instead of downloading and building it" ${USE_SYSTEM_LIBS})
OPTION(USE_SYSTEM_GOOGLETEST "Use system Google Test library instead of downloading and building it" ${USE_SYSTEM_LIBS})
# ---[ CMake options
INCLUDE(GNUInstallDirs)
IF(CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_MOCK_TESTS)
ENABLE_TESTING()
ENDIF()
MACRO(CPUINFO_TARGET_ENABLE_C99 target)
SET_TARGET_PROPERTIES(${target} PROPERTIES
@@ -22,7 +42,7 @@ ENDMACRO()
MACRO(CPUINFO_TARGET_ENABLE_CXX11 target)
SET_TARGET_PROPERTIES(${target} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD 14
CXX_EXTENSIONS NO)
ENDMACRO()
@@ -38,10 +58,29 @@ MACRO(CPUINFO_TARGET_RUNTIME_LIBRARY target)
ENDIF()
ENDMACRO()
# -- [ Determine whether building for Apple's desktop or mobile OSes
IF(CMAKE_SYSTEM_NAME MATCHES "^(Darwin|iOS|tvOS|watchOS)$")
SET(IS_APPLE_OS TRUE)
ELSE()
SET(IS_APPLE_OS FALSE)
ENDIF()
# -- [ Determine target processor
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64)$")
IF(IS_APPLE_OS AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64.*)$")
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}")
ELSEIF(CMAKE_GENERATOR MATCHES "^Visual Studio " AND CMAKE_VS_PLATFORM_NAME)
IF(CMAKE_VS_PLATFORM_NAME STREQUAL "Win32")
SET(CPUINFO_TARGET_PROCESSOR "x86")
ELSEIF(CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
SET(CPUINFO_TARGET_PROCESSOR "x86_64")
ELSEIF(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
SET(CPUINFO_TARGET_PROCESSOR "arm64")
ELSEIF(CMAKE_VS_PLATFORM_NAME MATCHES "^(ARM64EC|arm64ec|ARM64E|arm64e)")
SET(CPUINFO_TARGET_PROCESSOR "arm64")
ELSE()
MESSAGE(FATAL_ERROR "Unsupported Visual Studio architecture \"${CMAKE_VS_PLATFORM_NAME}\"")
ENDIF()
ENDIF()
# ---[ Build flags
@@ -53,20 +92,21 @@ IF(NOT CMAKE_SYSTEM_PROCESSOR)
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
ENDIF()
ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64)$")
ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$")
MESSAGE(WARNING
"Target processor architecture \"${CPUINFO_TARGET_PROCESSOR}\" is not supported in cpuinfo. "
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
ENDIF()
IF(NOT CMAKE_SYSTEM_NAME)
MESSAGE(WARNING
"Target operating system is not specified. "
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android)$")
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android)$")
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT IS_APPLE_OS)
MESSAGE(WARNING
"Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. "
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
@@ -74,11 +114,48 @@ ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android
ENDIF()
ENDIF()
IF(CPUINFO_SUPPORTED_PLATFORM)
IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_BENCHMARKS)
ENABLE_LANGUAGE(CXX)
ENDIF()
ENDIF()
# ---[ Download deps
SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps
CACHE PATH "Confu-style dependencies source directory")
SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
CACHE PATH "Confu-style dependencies binary directory")
IF(CPUINFO_SUPPORTED_PLATFORM AND (CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS))
IF(USE_SYSTEM_GOOGLETEST)
FIND_PACKAGE(GTest REQUIRED)
ELSEIF(NOT DEFINED GOOGLETEST_SOURCE_DIR)
MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
ENDIF()
ENDIF()
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS)
IF(USE_SYSTEM_GOOGLEBENCHMARK)
FIND_PACKAGE(benchmark REQUIRED)
ELSEIF(NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR)
MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)")
CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download")
SET(GOOGLEBENCHMARK_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark" CACHE STRING "Google Benchmark source directory")
ENDIF()
ENDIF()
# ---[ cpuinfo library
SET(CPUINFO_SRCS
src/init.c
src/api.c
src/cache.c)
SET(CPUINFO_SRCS src/api.c src/cache.c src/init.c src/log.c)
IF(CPUINFO_SUPPORTED_PLATFORM)
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND (CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$" OR IOS_ARCH MATCHES "^(i386|x86_64)$"))
@@ -97,12 +174,16 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
LIST(APPEND CPUINFO_SRCS
src/x86/linux/init.c
src/x86/linux/cpuinfo.c)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
ELSEIF(IS_APPLE_OS)
LIST(APPEND CPUINFO_SRCS src/x86/mach/init.c)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$")
LIST(APPEND CPUINFO_SRCS src/x86/windows/init.c)
ENDIF()
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(armv[5-8].*|aarch64|arm64)$" OR IOS_ARCH MATCHES "^(armv7.*|arm64.*)$")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^Windows" AND CPUINFO_TARGET_PROCESSOR MATCHES "^(ARM64|arm64)$")
LIST(APPEND CPUINFO_SRCS
src/arm/windows/init-by-logical-sys-info.c
src/arm/windows/init.c)
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(armv[5-8].*|aarch64|arm64.*)$" OR IOS_ARCH MATCHES "^(armv7.*|arm64.*)$")
LIST(APPEND CPUINFO_SRCS
src/arm/uarch.c
src/arm/cache.c)
@@ -122,13 +203,22 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$")
LIST(APPEND CPUINFO_SRCS src/arm/linux/aarch64-isa.c)
ENDIF()
ELSEIF(IOS OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CPUINFO_TARGET_PROCESSOR STREQUAL "arm64"))
ELSEIF(IS_APPLE_OS AND CPUINFO_TARGET_PROCESSOR MATCHES "arm64.*")
LIST(APPEND CPUINFO_SRCS src/arm/mach/init.c)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android")
LIST(APPEND CPUINFO_SRCS
src/arm/android/properties.c)
ENDIF()
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(riscv(32|64))$")
LIST(APPEND CPUINFO_SRCS
src/riscv/uarch.c)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
LIST(APPEND CPUINFO_SRCS
src/riscv/linux/init.c
src/riscv/linux/riscv-hw.c
src/riscv/linux/riscv-isa.c)
ENDIF()
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
@@ -142,7 +232,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
src/linux/multiline.c
src/linux/cpulist.c
src/linux/processors.c)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
ELSEIF(IS_APPLE_OS)
LIST(APPEND CPUINFO_SRCS src/mach/topology.c)
ENDIF()
@@ -166,34 +256,43 @@ ADD_LIBRARY(cpuinfo_internals STATIC ${CPUINFO_SRCS})
CPUINFO_TARGET_ENABLE_C99(cpuinfo)
CPUINFO_TARGET_ENABLE_C99(cpuinfo_internals)
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo)
IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$")
# Target Windows 7+ API
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _WIN32_WINNT=0x0601)
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _WIN32_WINNT=0x0601 _CRT_SECURE_NO_WARNINGS)
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601 _CRT_SECURE_NO_WARNINGS)
# Explicitly link Kernel32 for UWP build
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
TARGET_LINK_LIBRARIES(cpuinfo PUBLIC Kernel32)
endif()
ENDIF()
IF(ANDROID AND NOT CPUINFO_LOG_TO_STDIO)
TARGET_LINK_LIBRARIES(cpuinfo PRIVATE "log")
ENDIF()
SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h)
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include)
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src)
TARGET_INCLUDE_DIRECTORIES(cpuinfo_internals BEFORE PUBLIC include src)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_TO_STDIO=$<BOOL:${CPUINFO_LOG_TO_STDIO}>")
IF(CPUINFO_LOG_LEVEL STREQUAL "default")
# default logging level: error (subject to change)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=2)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=2")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "debug")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=5)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=5")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "info")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=4)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=4")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "warning")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=3)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=3")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "error")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=2)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=2")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "fatal")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=1)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=1")
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "none")
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=0)
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=0")
ELSE()
MESSAGE(FATAL_ERROR "Unsupported logging level ${CPUINFO_LOG_LEVEL}")
ENDIF()
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE CPUINFO_LOG_LEVEL=0)
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE "CPUINFO_LOG_LEVEL=0")
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE "CPUINFO_LOG_TO_STDIO=1")
IF(CPUINFO_SUPPORTED_PLATFORM)
TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=1)
@@ -207,17 +306,610 @@ ELSE()
TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=0)
ENDIF()
# ---[ cpuinfo dependencies: clog
IF(NOT DEFINED CLOG_SOURCE_DIR)
SET(CLOG_SOURCE_DIR "${PROJECT_SOURCE_DIR}/deps/clog")
ADD_LIBRARY(${PROJECT_NAME}::cpuinfo ALIAS cpuinfo)
# support find_package(cpuinfo CONFIG)
INCLUDE(CMakePackageConfigHelpers)
GET_FILENAME_COMPONENT(CONFIG_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/cpuinfo-config.cmake ABSOLUTE)
CONFIGURE_PACKAGE_CONFIG_FILE(
cmake/cpuinfo-config.cmake.in ${CONFIG_FILE_PATH}
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME})
INSTALL(FILES ${CONFIG_FILE_PATH}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}) # cpuinfo_DIR ${prefix}/share/cpuinfo
INSTALL(TARGETS cpuinfo
EXPORT cpuinfo-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
INSTALL(EXPORT cpuinfo-targets
NAMESPACE ${PROJECT_NAME}:: # IMPORTED cpuinfo::cpuinfo
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME})
# ---[ cpuinfo micro-benchmarks
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS)
# ---[ Build google benchmark
IF(NOT TARGET benchmark AND NOT USE_SYSTEM_GOOGLEBENCHMARK)
SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "")
ADD_SUBDIRECTORY(
"${GOOGLEBENCHMARK_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark")
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Android)$")
ADD_EXECUTABLE(get-current-bench bench/get-current.cc)
TARGET_LINK_LIBRARIES(get-current-bench cpuinfo benchmark)
ENDIF()
ADD_EXECUTABLE(init-bench bench/init.cc)
TARGET_LINK_LIBRARIES(init-bench cpuinfo benchmark)
ENDIF()
IF(NOT TARGET clog)
SET(CLOG_BUILD_TESTS OFF CACHE BOOL "")
SET(CLOG_RUNTIME_TYPE "${CPUINFO_RUNTIME_TYPE}" CACHE STRING "")
ADD_SUBDIRECTORY(
"${CLOG_SOURCE_DIR}")
# We build static version of clog but a dynamic library may indirectly depend on it
SET_PROPERTY(TARGET clog PROPERTY POSITION_INDEPENDENT_CODE ON)
IF(CPUINFO_SUPPORTED_PLATFORM)
IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS)
# ---[ Build google test
IF(NOT TARGET gtest AND NOT USE_SYSTEM_GOOGLETEST)
IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static")
SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
ENDIF()
ADD_SUBDIRECTORY(
"${GOOGLETEST_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
ENDIF()
ENDIF()
ENDIF()
# ---[ cpuinfo mock library and mock tests
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS)
SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}")
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
LIST(APPEND CPUINFO_MOCK_SRCS src/linux/mockfile.c)
ENDIF()
ADD_LIBRARY(cpuinfo_mock STATIC ${CPUINFO_MOCK_SRCS})
CPUINFO_TARGET_ENABLE_C99(cpuinfo_mock)
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo_mock)
SET_TARGET_PROPERTIES(cpuinfo_mock PROPERTIES PUBLIC_HEADER include/cpuinfo.h)
TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PUBLIC include)
TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PRIVATE src)
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PUBLIC "CPUINFO_MOCK=1")
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE "CPUINFO_LOG_LEVEL=5")
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE "CPUINFO_LOG_TO_STDIO=1")
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
TARGET_LINK_LIBRARIES(cpuinfo_mock PUBLIC ${CMAKE_THREAD_LIBS_INIT})
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE _GNU_SOURCE=1)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a)$")
ADD_EXECUTABLE(atm7029b-tablet-test test/mock/atm7029b-tablet.cc)
TARGET_INCLUDE_DIRECTORIES(atm7029b-tablet-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(atm7029b-tablet-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME atm7029b-tablet-test COMMAND atm7029b-tablet-test)
ADD_EXECUTABLE(blu-r1-hd-test test/mock/blu-r1-hd.cc)
TARGET_INCLUDE_DIRECTORIES(blu-r1-hd-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(blu-r1-hd-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME blu-r1-hd-test COMMAND blu-r1-hd-test)
ADD_EXECUTABLE(galaxy-a3-2016-eu-test test/mock/galaxy-a3-2016-eu.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-a3-2016-eu-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-a3-2016-eu-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-a3-2016-eu-test COMMAND galaxy-a3-2016-eu-test)
ADD_EXECUTABLE(galaxy-a8-2016-duos-test test/mock/galaxy-a8-2016-duos.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2016-duos-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-a8-2016-duos-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-a8-2016-duos-test COMMAND galaxy-a8-2016-duos-test)
ADD_EXECUTABLE(galaxy-grand-prime-value-edition-test test/mock/galaxy-grand-prime-value-edition.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-grand-prime-value-edition-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-grand-prime-value-edition-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-grand-prime-value-edition-test COMMAND galaxy-grand-prime-value-edition-test)
ADD_EXECUTABLE(galaxy-j1-2016-test test/mock/galaxy-j1-2016.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-j1-2016-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-j1-2016-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-j1-2016-test COMMAND galaxy-j1-2016-test)
ADD_EXECUTABLE(galaxy-j5-test test/mock/galaxy-j5.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-j5-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-j5-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-j5-test COMMAND galaxy-j5-test)
ADD_EXECUTABLE(galaxy-j7-prime-test test/mock/galaxy-j7-prime.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-prime-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-j7-prime-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-j7-prime-test COMMAND galaxy-j7-prime-test)
ADD_EXECUTABLE(galaxy-j7-tmobile-test test/mock/galaxy-j7-tmobile.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-tmobile-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-j7-tmobile-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-j7-tmobile-test COMMAND galaxy-j7-tmobile-test)
ADD_EXECUTABLE(galaxy-j7-uae-test test/mock/galaxy-j7-uae.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-uae-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-j7-uae-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-j7-uae-test COMMAND galaxy-j7-uae-test)
ADD_EXECUTABLE(galaxy-s3-us-test test/mock/galaxy-s3-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s3-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s3-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s3-us-test COMMAND galaxy-s3-us-test)
ADD_EXECUTABLE(galaxy-s4-us-test test/mock/galaxy-s4-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s4-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s4-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s4-us-test COMMAND galaxy-s4-us-test)
ADD_EXECUTABLE(galaxy-s5-global-test test/mock/galaxy-s5-global.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s5-global-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s5-global-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s5-global-test COMMAND galaxy-s5-global-test)
ADD_EXECUTABLE(galaxy-s5-us-test test/mock/galaxy-s5-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s5-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s5-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s5-us-test COMMAND galaxy-s5-us-test)
ADD_EXECUTABLE(galaxy-tab-3-7.0-test test/mock/galaxy-tab-3-7.0.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-7.0-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-tab-3-7.0-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-tab-3-7.0-test COMMAND galaxy-tab-3-7.0-test)
ADD_EXECUTABLE(galaxy-tab-3-lite-test test/mock/galaxy-tab-3-lite.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-lite-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-tab-3-lite-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-tab-3-lite-test COMMAND galaxy-tab-3-lite-test)
ADD_EXECUTABLE(galaxy-win-duos-test test/mock/galaxy-win-duos.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-win-duos-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-win-duos-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-win-duos-test COMMAND galaxy-win-duos-test)
ADD_EXECUTABLE(huawei-ascend-p7-test test/mock/huawei-ascend-p7.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-ascend-p7-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-ascend-p7-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-ascend-p7-test COMMAND huawei-ascend-p7-test)
ADD_EXECUTABLE(huawei-honor-6-test test/mock/huawei-honor-6.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-honor-6-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-honor-6-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-honor-6-test COMMAND huawei-honor-6-test)
ADD_EXECUTABLE(lenovo-a6600-plus-test test/mock/lenovo-a6600-plus.cc)
TARGET_INCLUDE_DIRECTORIES(lenovo-a6600-plus-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(lenovo-a6600-plus-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME lenovo-a6600-plus-test COMMAND lenovo-a6600-plus-test)
ADD_EXECUTABLE(lenovo-vibe-x2-test test/mock/lenovo-vibe-x2.cc)
TARGET_INCLUDE_DIRECTORIES(lenovo-vibe-x2-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(lenovo-vibe-x2-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME lenovo-vibe-x2-test COMMAND lenovo-vibe-x2-test)
ADD_EXECUTABLE(lg-k10-eu-test test/mock/lg-k10-eu.cc)
TARGET_INCLUDE_DIRECTORIES(lg-k10-eu-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(lg-k10-eu-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME lg-k10-eu-test COMMAND lg-k10-eu-test)
ADD_EXECUTABLE(lg-optimus-g-pro-test test/mock/lg-optimus-g-pro.cc)
TARGET_INCLUDE_DIRECTORIES(lg-optimus-g-pro-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(lg-optimus-g-pro-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME lg-optimus-g-pro-test COMMAND lg-optimus-g-pro-test)
ADD_EXECUTABLE(moto-e-gen1-test test/mock/moto-e-gen1.cc)
TARGET_INCLUDE_DIRECTORIES(moto-e-gen1-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-e-gen1-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-e-gen1-test COMMAND moto-e-gen1-test)
ADD_EXECUTABLE(moto-g-gen1-test test/mock/moto-g-gen1.cc)
TARGET_INCLUDE_DIRECTORIES(moto-g-gen1-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-g-gen1-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-g-gen1-test COMMAND moto-g-gen1-test)
ADD_EXECUTABLE(moto-g-gen2-test test/mock/moto-g-gen2.cc)
TARGET_INCLUDE_DIRECTORIES(moto-g-gen2-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-g-gen2-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-g-gen2-test COMMAND moto-g-gen2-test)
ADD_EXECUTABLE(moto-g-gen3-test test/mock/moto-g-gen3.cc)
TARGET_INCLUDE_DIRECTORIES(moto-g-gen3-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-g-gen3-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-g-gen3-test COMMAND moto-g-gen3-test)
ADD_EXECUTABLE(moto-g-gen4-test test/mock/moto-g-gen4.cc)
TARGET_INCLUDE_DIRECTORIES(moto-g-gen4-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-g-gen4-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-g-gen4-test COMMAND moto-g-gen4-test)
ADD_EXECUTABLE(moto-g-gen5-test test/mock/moto-g-gen5.cc)
TARGET_INCLUDE_DIRECTORIES(moto-g-gen5-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(moto-g-gen5-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME moto-g-gen5-test COMMAND moto-g-gen5-test)
ADD_EXECUTABLE(nexus-s-test test/mock/nexus-s.cc)
TARGET_INCLUDE_DIRECTORIES(nexus-s-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus-s-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus-s-test COMMAND nexus-s-test)
ADD_EXECUTABLE(nexus4-test test/mock/nexus4.cc)
TARGET_INCLUDE_DIRECTORIES(nexus4-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus4-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus4-test COMMAND nexus4-test)
ADD_EXECUTABLE(nexus6-test test/mock/nexus6.cc)
TARGET_INCLUDE_DIRECTORIES(nexus6-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus6-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus6-test COMMAND nexus6-test)
ADD_EXECUTABLE(nexus10-test test/mock/nexus10.cc)
TARGET_INCLUDE_DIRECTORIES(nexus10-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus10-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus10-test COMMAND nexus10-test)
ADD_EXECUTABLE(padcod-10.1-test test/mock/padcod-10.1.cc)
TARGET_INCLUDE_DIRECTORIES(padcod-10.1-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(padcod-10.1-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME padcod-10.1-test COMMAND padcod-10.1-test)
ADD_EXECUTABLE(xiaomi-redmi-2a-test test/mock/xiaomi-redmi-2a.cc)
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-2a-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xiaomi-redmi-2a-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xiaomi-redmi-2a-test COMMAND xiaomi-redmi-2a-test)
ADD_EXECUTABLE(xperia-sl-test test/mock/xperia-sl.cc)
TARGET_INCLUDE_DIRECTORIES(xperia-sl-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xperia-sl-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xperia-sl-test COMMAND xperia-sl-test)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a|aarch64)$")
ADD_EXECUTABLE(alcatel-revvl-test test/mock/alcatel-revvl.cc)
TARGET_INCLUDE_DIRECTORIES(alcatel-revvl-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(alcatel-revvl-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME alcatel-revvl-test COMMAND alcatel-revvl-test)
ADD_EXECUTABLE(galaxy-a8-2018-test test/mock/galaxy-a8-2018.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2018-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-a8-2018-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-a8-2018-test COMMAND galaxy-a8-2018-test)
ADD_EXECUTABLE(galaxy-c9-pro-test test/mock/galaxy-c9-pro.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-c9-pro-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-c9-pro-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-c9-pro-test COMMAND galaxy-c9-pro-test)
ADD_EXECUTABLE(galaxy-s6-test test/mock/galaxy-s6.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s6-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s6-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s6-test COMMAND galaxy-s6-test)
ADD_EXECUTABLE(galaxy-s7-us-test test/mock/galaxy-s7-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s7-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s7-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s7-us-test COMMAND galaxy-s7-us-test)
ADD_EXECUTABLE(galaxy-s7-global-test test/mock/galaxy-s7-global.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s7-global-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s7-global-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s7-global-test COMMAND galaxy-s7-global-test)
ADD_EXECUTABLE(galaxy-s8-us-test test/mock/galaxy-s8-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s8-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s8-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s8-us-test COMMAND galaxy-s8-us-test)
ADD_EXECUTABLE(galaxy-s8-global-test test/mock/galaxy-s8-global.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s8-global-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s8-global-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s8-global-test COMMAND galaxy-s8-global-test)
ADD_EXECUTABLE(galaxy-s9-us-test test/mock/galaxy-s9-us.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s9-us-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s9-us-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s9-us-test COMMAND galaxy-s9-us-test)
ADD_EXECUTABLE(galaxy-s9-global-test test/mock/galaxy-s9-global.cc)
TARGET_INCLUDE_DIRECTORIES(galaxy-s9-global-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(galaxy-s9-global-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME galaxy-s9-global-test COMMAND galaxy-s9-global-test)
ADD_EXECUTABLE(huawei-mate-8-test test/mock/huawei-mate-8.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-mate-8-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-mate-8-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-mate-8-test COMMAND huawei-mate-8-test)
ADD_EXECUTABLE(huawei-mate-9-test test/mock/huawei-mate-9.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-mate-9-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-mate-9-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-mate-9-test COMMAND huawei-mate-9-test)
ADD_EXECUTABLE(huawei-mate-10-test test/mock/huawei-mate-10.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-mate-10-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-mate-10-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-mate-10-test COMMAND huawei-mate-10-test)
ADD_EXECUTABLE(huawei-mate-20-test test/mock/huawei-mate-20.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-mate-20-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-mate-20-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-mate-20-test COMMAND huawei-mate-20-test)
ADD_EXECUTABLE(huawei-p8-lite-test test/mock/huawei-p8-lite.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-p8-lite-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-p8-lite-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-p8-lite-test COMMAND huawei-p8-lite-test)
ADD_EXECUTABLE(huawei-p9-lite-test test/mock/huawei-p9-lite.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-p9-lite-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-p9-lite-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-p9-lite-test COMMAND huawei-p9-lite-test)
ADD_EXECUTABLE(huawei-p20-pro-test test/mock/huawei-p20-pro.cc)
TARGET_INCLUDE_DIRECTORIES(huawei-p20-pro-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(huawei-p20-pro-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME huawei-p20-pro-test COMMAND huawei-p20-pro-test)
ADD_EXECUTABLE(iconia-one-10-test test/mock/iconia-one-10.cc)
TARGET_INCLUDE_DIRECTORIES(iconia-one-10-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(iconia-one-10-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME iconia-one-10-test COMMAND iconia-one-10-test)
ADD_EXECUTABLE(meizu-pro-6-test test/mock/meizu-pro-6.cc)
TARGET_INCLUDE_DIRECTORIES(meizu-pro-6-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(meizu-pro-6-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME meizu-pro-6-test COMMAND meizu-pro-6-test)
ADD_EXECUTABLE(meizu-pro-6s-test test/mock/meizu-pro-6s.cc)
TARGET_INCLUDE_DIRECTORIES(meizu-pro-6s-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(meizu-pro-6s-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME meizu-pro-6s-test COMMAND meizu-pro-6s-test)
ADD_EXECUTABLE(meizu-pro-7-plus-test test/mock/meizu-pro-7-plus.cc)
TARGET_INCLUDE_DIRECTORIES(meizu-pro-7-plus-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(meizu-pro-7-plus-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME meizu-pro-7-plus-test COMMAND meizu-pro-7-plus-test)
ADD_EXECUTABLE(nexus5x-test test/mock/nexus5x.cc)
TARGET_INCLUDE_DIRECTORIES(nexus5x-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus5x-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus5x-test COMMAND nexus5x-test)
ADD_EXECUTABLE(nexus6p-test test/mock/nexus6p.cc)
TARGET_INCLUDE_DIRECTORIES(nexus6p-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus6p-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus6p-test COMMAND nexus6p-test)
ADD_EXECUTABLE(nexus9-test test/mock/nexus9.cc)
TARGET_INCLUDE_DIRECTORIES(nexus9-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(nexus9-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME nexus9-test COMMAND nexus9-test)
ADD_EXECUTABLE(oneplus-3t-test test/mock/oneplus-3t.cc)
TARGET_INCLUDE_DIRECTORIES(oneplus-3t-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oneplus-3t-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oneplus-3t-test COMMAND oneplus-3t-test)
ADD_EXECUTABLE(oneplus-5-test test/mock/oneplus-5.cc)
TARGET_INCLUDE_DIRECTORIES(oneplus-5-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oneplus-5-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oneplus-5-test COMMAND oneplus-5-test)
ADD_EXECUTABLE(oneplus-5t-test test/mock/oneplus-5t.cc)
TARGET_INCLUDE_DIRECTORIES(oneplus-5t-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oneplus-5t-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oneplus-5t-test COMMAND oneplus-5t-test)
ADD_EXECUTABLE(oppo-a37-test test/mock/oppo-a37.cc)
TARGET_INCLUDE_DIRECTORIES(oppo-a37-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oppo-a37-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oppo-a37-test COMMAND oppo-a37-test)
ADD_EXECUTABLE(oppo-r9-test test/mock/oppo-r9.cc)
TARGET_INCLUDE_DIRECTORIES(oppo-r9-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oppo-r9-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oppo-r9-test COMMAND oppo-r9-test)
ADD_EXECUTABLE(oppo-r15-test test/mock/oppo-r15.cc)
TARGET_INCLUDE_DIRECTORIES(oppo-r15-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(oppo-r15-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME oppo-r15-test COMMAND oppo-r15-test)
ADD_EXECUTABLE(pixel-test test/mock/pixel.cc)
TARGET_INCLUDE_DIRECTORIES(pixel-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(pixel-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-test COMMAND pixel-test)
ADD_EXECUTABLE(pixel-c-test test/mock/pixel-c.cc)
TARGET_INCLUDE_DIRECTORIES(pixel-c-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(pixel-c-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-c-test COMMAND pixel-c-test)
ADD_EXECUTABLE(pixel-xl-test test/mock/pixel-xl.cc)
TARGET_INCLUDE_DIRECTORIES(pixel-xl-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(pixel-xl-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-xl-test COMMAND pixel-xl-test)
ADD_EXECUTABLE(pixel-2-xl-test test/mock/pixel-2-xl.cc)
TARGET_INCLUDE_DIRECTORIES(pixel-2-xl-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(pixel-2-xl-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-2-xl-test COMMAND pixel-2-xl-test)
ADD_EXECUTABLE(xiaomi-mi-5c-test test/mock/xiaomi-mi-5c.cc)
TARGET_INCLUDE_DIRECTORIES(xiaomi-mi-5c-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xiaomi-mi-5c-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xiaomi-mi-5c-test COMMAND xiaomi-mi-5c-test)
ADD_EXECUTABLE(xiaomi-redmi-note-3-test test/mock/xiaomi-redmi-note-3.cc)
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-3-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xiaomi-redmi-note-3-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xiaomi-redmi-note-3-test COMMAND xiaomi-redmi-note-3-test)
ADD_EXECUTABLE(xiaomi-redmi-note-4-test test/mock/xiaomi-redmi-note-4.cc)
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-4-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xiaomi-redmi-note-4-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xiaomi-redmi-note-4-test COMMAND xiaomi-redmi-note-4-test)
ADD_EXECUTABLE(xperia-c4-dual-test test/mock/xperia-c4-dual.cc)
TARGET_INCLUDE_DIRECTORIES(xperia-c4-dual-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xperia-c4-dual-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME xperia-c4-dual-test COMMAND xperia-c4-dual-test)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64)$")
ADD_EXECUTABLE(alldocube-iwork8-test test/mock/alldocube-iwork8.cc)
TARGET_INCLUDE_DIRECTORIES(alldocube-iwork8-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(alldocube-iwork8-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME alldocube-iwork8-test COMMAND alldocube-iwork8-test)
ADD_EXECUTABLE(leagoo-t5c-test test/mock/leagoo-t5c.cc)
TARGET_INCLUDE_DIRECTORIES(leagoo-t5c-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(leagoo-t5c-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME leagoo-t5c-test COMMAND leagoo-t5c-test)
ADD_EXECUTABLE(memo-pad-7-test test/mock/memo-pad-7.cc)
TARGET_INCLUDE_DIRECTORIES(memo-pad-7-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(memo-pad-7-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME memo-pad-7-test COMMAND memo-pad-7-test)
ADD_EXECUTABLE(zenfone-c-test test/mock/zenfone-c.cc)
TARGET_INCLUDE_DIRECTORIES(zenfone-c-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(zenfone-c-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME zenfone-c-test COMMAND zenfone-c-test)
ADD_EXECUTABLE(zenfone-2-test test/mock/zenfone-2.cc)
TARGET_INCLUDE_DIRECTORIES(zenfone-2-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(zenfone-2-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME zenfone-2-test COMMAND zenfone-2-test)
ADD_EXECUTABLE(zenfone-2e-test test/mock/zenfone-2e.cc)
TARGET_INCLUDE_DIRECTORIES(zenfone-2e-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(zenfone-2e-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME zenfone-2e-test COMMAND zenfone-2e-test)
ENDIF()
ENDIF()
# ---[ cpuinfo unit tests
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS)
ADD_EXECUTABLE(init-test test/init.cc)
CPUINFO_TARGET_ENABLE_CXX11(init-test)
CPUINFO_TARGET_RUNTIME_LIBRARY(init-test)
TARGET_LINK_LIBRARIES(init-test PRIVATE cpuinfo gtest gtest_main)
ADD_TEST(NAME init-test COMMAND init-test)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
ADD_EXECUTABLE(get-current-test test/get-current.cc)
CPUINFO_TARGET_ENABLE_CXX11(get-current-test)
CPUINFO_TARGET_RUNTIME_LIBRARY(get-current-test)
TARGET_LINK_LIBRARIES(get-current-test PRIVATE cpuinfo gtest gtest_main)
ADD_TEST(NAME get-current-test COMMAND get-current-test)
ENDIF()
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc)
CPUINFO_TARGET_ENABLE_CXX11(brand-string-test)
CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test)
TARGET_LINK_LIBRARIES(brand-string-test PRIVATE cpuinfo_internals gtest gtest_main)
ADD_TEST(NAME brand-string-test COMMAND brand-string-test)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
ADD_LIBRARY(android_properties_interface STATIC test/name/android-properties-interface.c)
CPUINFO_TARGET_ENABLE_C99(android_properties_interface)
CPUINFO_TARGET_RUNTIME_LIBRARY(android_properties_interface)
TARGET_LINK_LIBRARIES(android_properties_interface PRIVATE cpuinfo_internals)
ADD_EXECUTABLE(chipset-test
test/name/proc-cpuinfo-hardware.cc
test/name/ro-product-board.cc
test/name/ro-board-platform.cc
test/name/ro-mediatek-platform.cc
test/name/ro-arch.cc
test/name/ro-chipname.cc
test/name/android-properties.cc)
CPUINFO_TARGET_ENABLE_CXX11(chipset-test)
CPUINFO_TARGET_RUNTIME_LIBRARY(chipset-test)
TARGET_LINK_LIBRARIES(chipset-test PRIVATE android_properties_interface gtest gtest_main)
ADD_TEST(NAME chipset-test COMMAND chipset-test)
ADD_EXECUTABLE(cache-test test/arm-cache.cc)
CPUINFO_TARGET_ENABLE_CXX11(cache-test)
CPUINFO_TARGET_RUNTIME_LIBRARY(cache-test)
TARGET_COMPILE_DEFINITIONS(cache-test PRIVATE __STDC_LIMIT_MACROS=1 __STDC_CONSTANT_MACROS=1)
TARGET_LINK_LIBRARIES(cache-test PRIVATE cpuinfo_internals gtest gtest_main)
ADD_TEST(NAME cache-test COMMAND cache-test)
ENDIF()
ENDIF()
# ---[ Helper and debug tools
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS)
ADD_EXECUTABLE(isa-info tools/isa-info.c)
CPUINFO_TARGET_ENABLE_C99(isa-info)
CPUINFO_TARGET_RUNTIME_LIBRARY(isa-info)
TARGET_LINK_LIBRARIES(isa-info PRIVATE cpuinfo)
INSTALL(TARGETS isa-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
ADD_EXECUTABLE(cpu-info tools/cpu-info.c)
CPUINFO_TARGET_ENABLE_C99(cpu-info)
CPUINFO_TARGET_RUNTIME_LIBRARY(cpu-info)
TARGET_LINK_LIBRARIES(cpu-info PRIVATE cpuinfo)
INSTALL(TARGETS cpu-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
ADD_EXECUTABLE(cache-info tools/cache-info.c)
CPUINFO_TARGET_ENABLE_C99(cache-info)
CPUINFO_TARGET_RUNTIME_LIBRARY(cache-info)
TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo)
INSTALL(TARGETS cache-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c)
CPUINFO_TARGET_ENABLE_C99(auxv-dump)
CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump)
TARGET_LINK_LIBRARIES(auxv-dump PRIVATE ${CMAKE_DL_LIBS} cpuinfo)
ADD_EXECUTABLE(cpuinfo-dump tools/cpuinfo-dump.c)
CPUINFO_TARGET_ENABLE_C99(cpuinfo-dump)
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo-dump)
ENDIF()
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
ADD_EXECUTABLE(cpuid-dump tools/cpuid-dump.c)
CPUINFO_TARGET_ENABLE_C99(cpuid-dump)
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuid-dump)
TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE src)
TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE include)
INSTALL(TARGETS cpuid-dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()
ENDIF()
# ---[ pkg-config manifest. This is mostly from JsonCpp...
IF(CPUINFO_BUILD_PKG_CONFIG)
FUNCTION(JOIN_PATHS joined_path first_path_segment)
SET(temp_path "${first_path_segment}")
FOREACH(current_segment IN LISTS ARGN)
IF(NOT ("${current_segment}" STREQUAL ""))
IF(IS_ABSOLUTE "${current_segment}")
SET(temp_path "${current_segment}")
ELSE()
SET(temp_path "${temp_path}/${current_segment}")
ENDIF()
ENDIF()
ENDFOREACH()
SET(${joined_path} "${temp_path}" PARENT_SCOPE)
ENDFUNCTION()
JOIN_PATHS(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
JOIN_PATHS(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
CONFIGURE_FILE(
"libcpuinfo.pc.in"
"libcpuinfo.pc"
@ONLY)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcpuinfo.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
ENDIF()
TARGET_LINK_LIBRARIES(cpuinfo PRIVATE clog)
TARGET_LINK_LIBRARIES(cpuinfo_internals PRIVATE clog)

View File

@@ -48,7 +48,7 @@ Detect if target is a 32-bit or 64-bit ARM system:
#endif
```
Check if the host CPU support ARM NEON
Check if the host CPU supports ARM NEON
```c
cpuinfo_initialize();
@@ -151,6 +151,36 @@ executable(
)
```
### Bazel
This project can be built using [Bazel](https://bazel.build/install).
You can also use this library as a dependency to your Bazel project. Add to the `WORKSPACE` file:
```python
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "org_pytorch_cpuinfo",
branch = "master",
remote = "https://github.com/Vertexwahn/cpuinfo.git",
)
```
And to your `BUILD` file:
```python
cc_binary(
name = "cpuinfo_test",
srcs = [
# ...
],
deps = [
"@org_pytorch_cpuinfo//:cpuinfo",
],
)
```
### CMake
To use with CMake use the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. Here is an example:
@@ -220,12 +250,14 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
- [x] x86-64 (iPhone simulator)
- [x] ARMv7
- [x] ARM64
- [x] OS X
- [x] macOS
- [x] x86
- [x] x86-64
- [x] ARM64 (Apple silicon)
- [x] Windows
- [x] x86
- [x] x86-64
- [x] arm64
## Methods
@@ -234,12 +266,13 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
- [x] Using `/proc/cpuinfo` on ARM
- [x] Using `ro.chipname`, `ro.board.platform`, `ro.product.board`, `ro.mediatek.platform`, `ro.arch` properties (Android)
- [ ] Using kernel log (`dmesg`) on ARM Linux
- [x] Using Windows registry on ARM64 Windows
- Vendor and microarchitecture detection
- [x] Intel-designed x86/x86-64 cores (up to Sunny Cove, Goldmont Plus, and Knights Mill)
- [x] AMD-designed x86/x86-64 cores (up to Puma/Jaguar and Zen 2)
- [ ] VIA-designed x86/x86-64 cores
- [ ] Other x86 cores (DM&P, RDC, Transmeta, Cyrix, Rise)
- [x] ARM-designed ARM cores (up to Cortex-A55, Cortex-A77, and Neoverse E1/N1)
- [x] ARM-designed ARM cores (up to Cortex-A55, Cortex-A77, and Neoverse E1/V1/N2/V2)
- [x] Qualcomm-designed ARM cores (Scorpion, Krait, and Kryo)
- [x] Nvidia-designed ARM cores (Denver and Carmel)
- [x] Samsung-designed ARM cores (Exynos)
@@ -256,6 +289,7 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
- [x] Using `/proc/self/auxv` (Android/ARM)
- [ ] Using instruction probing on ARM (Linux)
- [ ] Using CPUID registers on ARM64 (Linux)
- [x] Using IsProcessorFeaturePresent on ARM64 Windows
- Cache detection
- [x] Using CPUID leaf 0x00000002 (x86/x86-64)
- [x] Using CPUID leaf 0x00000004 (non-AMD x86/x86-64)
@@ -267,6 +301,7 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
- [x] Using `sysctlbyname` (Mach)
- [x] Using sysfs `typology` directories (ARM/Linux)
- [ ] Using sysfs `cache` directories (Linux)
- [x] Using `GetLogicalProcessorInformationEx` on ARM64 Windows
- TLB detection
- [x] Using CPUID leaf 0x00000002 (x86/x86-64)
- [ ] Using CPUID leaves 0x80000005-0x80000006 and 0x80000019 (AMD x86/x86-64)

View File

@@ -0,0 +1,15 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.6.1.zip
URL_HASH SHA256=367e963b8620080aff8c831e24751852cffd1f74ea40f25d9cc1b667a9dd5e45
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)

View File

@@ -0,0 +1,15 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
PROJECT(googletest-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googletest
URL https://github.com/google/googletest/archive/release-1.11.0.zip
URL_HASH SHA256=353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)

View File

@@ -0,0 +1,12 @@
@PACKAGE_INIT@
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/cpuinfo-config-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# ${_DIR}/cpuinfo-targets-*.cmake will be included here
include("${_DIR}/cpuinfo-targets.cmake")
check_required_components(@PROJECT_NAME@)

View File

@@ -59,7 +59,7 @@
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CPUINFO_LOG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir)deps\clog\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ObjectFileName>$(IntDir)%(RelativeDir)</ObjectFileName>

View File

@@ -1,5 +1,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)
INCLUDE(GNUInstallDirs)
# ---[ Project and semantic versioning.
PROJECT(clog C CXX)
@@ -11,6 +13,14 @@ IF(ANDROID)
ELSE()
OPTION(CLOG_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" ON)
ENDIF()
OPTION(CLOG_BUILD_TESTS "Build clog tests" ON)
OPTION(USE_SYSTEM_LIBS "Use system libraries instead of downloading and building them" OFF)
OPTION(USE_SYSTEM_GOOGLETEST "Use system Google Test library instead of downloading and building it" ${USE_SYSTEM_LIBS})
# ---[ CMake options
IF(CLOG_BUILD_TESTS)
ENABLE_TESTING()
ENDIF()
MACRO(CLOG_TARGET_RUNTIME_LIBRARY target)
IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "default")
@@ -24,6 +34,26 @@ MACRO(CLOG_TARGET_RUNTIME_LIBRARY target)
ENDIF()
ENDMACRO()
# ---[ Download deps
SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps
CACHE PATH "Confu-style dependencies source directory")
SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
CACHE PATH "Confu-style dependencies binary directory")
IF(CLOG_BUILD_TESTS)
IF(USE_SYSTEM_GOOGLETEST)
FIND_PACKAGE(GTest REQUIRED)
ELSEIF(NOT DEFINED GOOGLETEST_SOURCE_DIR)
MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
ENDIF()
ENDIF()
# ---[ clog library
ADD_LIBRARY(clog STATIC src/clog.c)
SET_TARGET_PROPERTIES(clog PROPERTIES
@@ -31,7 +61,7 @@ SET_TARGET_PROPERTIES(clog PROPERTIES
C_EXTENSIONS NO)
CLOG_TARGET_RUNTIME_LIBRARY(clog)
SET_TARGET_PROPERTIES(clog PROPERTIES PUBLIC_HEADER include/clog.h)
TARGET_INCLUDE_DIRECTORIES(clog BEFORE PUBLIC include)
TARGET_INCLUDE_DIRECTORIES(clog PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
IF(CLOG_LOG_TO_STDIO)
TARGET_COMPILE_DEFINITIONS(clog PRIVATE CLOG_LOG_TO_STDIO=1)
ELSE()
@@ -39,4 +69,33 @@ ELSE()
ENDIF()
IF(ANDROID AND NOT CLOG_LOG_TO_STDIO)
TARGET_LINK_LIBRARIES(clog PRIVATE log)
ENDIF()
ENDIF()
ADD_LIBRARY(cpuinfo::clog ALIAS clog)
INSTALL(TARGETS clog
EXPORT cpuinfo-targets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
# ---[ clog tests
IF(CLOG_BUILD_TESTS)
# ---[ Build google test
IF(NOT TARGET gtest AND NOT USE_SYSTEM_GOOGLETEST)
IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "static")
SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
ENDIF()
ADD_SUBDIRECTORY(
"${GOOGLETEST_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
ENDIF()
ADD_EXECUTABLE(clog-test test/clog.cc)
SET_TARGET_PROPERTIES(clog-test PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS NO)
CLOG_TARGET_RUNTIME_LIBRARY(clog-test)
TARGET_LINK_LIBRARIES(clog-test PRIVATE clog gtest gtest_main)
ADD_TEST(clog-test clog-test)
ENDIF()

View File

@@ -10,6 +10,9 @@
#ifdef __ANDROID__
#include <android/log.h>
#endif
#ifdef __hexagon__
#include <qurt_printf.h>
#endif
#ifndef CLOG_LOG_TO_STDIO
#ifdef __ANDROID__
@@ -102,12 +105,14 @@ void clog_vlog_fatal(const char* module, const char* format, va_list args) {
out_buffer = heap_buffer;
}
out_buffer[prefix_chars + format_chars] = '\n';
#ifdef _WIN32
#if defined(_WIN32)
DWORD bytes_written;
WriteFile(
GetStdHandle(STD_ERROR_HANDLE),
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
#endif
@@ -178,12 +183,14 @@ void clog_vlog_error(const char* module, const char* format, va_list args) {
out_buffer = heap_buffer;
}
out_buffer[prefix_chars + format_chars] = '\n';
#ifdef _WIN32
#if defined(_WIN32)
DWORD bytes_written;
WriteFile(
GetStdHandle(STD_ERROR_HANDLE),
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
#endif
@@ -254,12 +261,14 @@ void clog_vlog_warning(const char* module, const char* format, va_list args) {
out_buffer = heap_buffer;
}
out_buffer[prefix_chars + format_chars] = '\n';
#ifdef _WIN32
#if defined(_WIN32)
DWORD bytes_written;
WriteFile(
GetStdHandle(STD_ERROR_HANDLE),
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
#endif
@@ -330,12 +339,14 @@ void clog_vlog_info(const char* module, const char* format, va_list args) {
out_buffer = heap_buffer;
}
out_buffer[prefix_chars + format_chars] = '\n';
#ifdef _WIN32
#if defined(_WIN32)
DWORD bytes_written;
WriteFile(
GetStdHandle(STD_OUTPUT_HANDLE),
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
#endif
@@ -406,12 +417,14 @@ void clog_vlog_debug(const char* module, const char* format, va_list args) {
out_buffer = heap_buffer;
}
out_buffer[prefix_chars + format_chars] = '\n';
#ifdef _WIN32
#if defined(_WIN32)
DWORD bytes_written;
WriteFile(
GetStdHandle(STD_OUTPUT_HANDLE),
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
#endif

View File

@@ -46,6 +46,14 @@
#endif
#endif
#if defined(__riscv)
#if (__riscv_xlen == 32)
#define CPUINFO_ARCH_RISCV32 1
#elif (__riscv_xlen == 64)
#define CPUINFO_ARCH_RISCV64 1
#endif
#endif
/* Define other architecture-specific macros as 0 */
#ifndef CPUINFO_ARCH_X86
@@ -80,6 +88,14 @@
#define CPUINFO_ARCH_WASMSIMD 0
#endif
#ifndef CPUINFO_ARCH_RISCV32
#define CPUINFO_ARCH_RISCV32 0
#endif
#ifndef CPUINFO_ARCH_RISCV64
#define CPUINFO_ARCH_RISCV64 0
#endif
#if CPUINFO_ARCH_X86 && defined(_MSC_VER)
#define CPUINFO_ABI __cdecl
#elif CPUINFO_ARCH_X86 && defined(__GNUC__)
@@ -188,6 +204,8 @@ enum cpuinfo_vendor {
* Processors are variants of AMD cores.
*/
cpuinfo_vendor_hygon = 16,
/** SiFive, Inc. Vendor of RISC-V processor microarchitectures. */
cpuinfo_vendor_sifive = 17,
/* Active vendors of embedded CPUs */
@@ -363,6 +381,8 @@ enum cpuinfo_uarch {
cpuinfo_uarch_zen2 = 0x0020010A,
/** AMD Zen 3 microarchitecture. */
cpuinfo_uarch_zen3 = 0x0020010B,
/** AMD Zen 4 microarchitecture. */
cpuinfo_uarch_zen4 = 0x0020010C,
/** NSC Geode and AMD Geode GX and LX. */
cpuinfo_uarch_geode = 0x00200200,
@@ -426,9 +446,26 @@ enum cpuinfo_uarch {
cpuinfo_uarch_neoverse_n1 = 0x00300400,
/** ARM Neoverse E1. */
cpuinfo_uarch_neoverse_e1 = 0x00300401,
/** ARM Neoverse V1. */
cpuinfo_uarch_neoverse_v1 = 0x00300402,
/** ARM Neoverse N2. */
cpuinfo_uarch_neoverse_n2 = 0x00300403,
/** ARM Neoverse V2. */
cpuinfo_uarch_neoverse_v2 = 0x00300404,
/** ARM Cortex-X1. */
cpuinfo_uarch_cortex_x1 = 0x00300500,
cpuinfo_uarch_cortex_x1 = 0x00300501,
/** ARM Cortex-X2. */
cpuinfo_uarch_cortex_x2 = 0x00300502,
/** ARM Cortex-X3. */
cpuinfo_uarch_cortex_x3 = 0x00300503,
/** ARM Cortex-A510. */
cpuinfo_uarch_cortex_a510 = 0x00300551,
/** ARM Cortex-A710. */
cpuinfo_uarch_cortex_a710 = 0x00300571,
/** ARM Cortex-A715. */
cpuinfo_uarch_cortex_a715 = 0x00300572,
/** Qualcomm Scorpion. */
cpuinfo_uarch_scorpion = 0x00400100,
@@ -489,10 +526,14 @@ enum cpuinfo_uarch {
cpuinfo_uarch_lightning = 0x00700109,
/** Apple A13 processor (little cores). */
cpuinfo_uarch_thunder = 0x0070010A,
/** Apple M1 processor (big cores). */
/** Apple A14 / M1 processor (big cores). */
cpuinfo_uarch_firestorm = 0x0070010B,
/** Apple M1 processor (little cores). */
/** Apple A14 / M1 processor (little cores). */
cpuinfo_uarch_icestorm = 0x0070010C,
/** Apple A15 / M2 processor (big cores). */
cpuinfo_uarch_avalanche = 0x0070010D,
/** Apple A15 / M2 processor (little cores). */
cpuinfo_uarch_blizzard = 0x0070010E,
/** Cavium ThunderX. */
cpuinfo_uarch_thunderx = 0x00800100,
@@ -706,6 +747,7 @@ void CPUINFO_ABI cpuinfo_deinitialize(void);
bool sse4a;
bool misaligned_sse;
bool avx;
bool avxvnni;
bool fma3;
bool fma4;
bool xop;
@@ -725,6 +767,7 @@ void CPUINFO_ABI cpuinfo_deinitialize(void);
bool avx512vpopcntdq;
bool avx512vnni;
bool avx512bf16;
bool avx512fp16;
bool avx512vp2intersect;
bool avx512_4vnniw;
bool avx512_4fmaps;
@@ -1052,6 +1095,14 @@ static inline bool cpuinfo_has_x86_avx(void) {
#endif
}
static inline bool cpuinfo_has_x86_avxvnni(void) {
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
return cpuinfo_isa.avxvnni;
#else
return false;
#endif
}
static inline bool cpuinfo_has_x86_fma3(void) {
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
return cpuinfo_isa.fma3;
@@ -1204,6 +1255,14 @@ static inline bool cpuinfo_has_x86_avx512bf16(void) {
#endif
}
static inline bool cpuinfo_has_x86_avx512fp16(void) {
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
return cpuinfo_isa.avx512fp16;
#else
return false;
#endif
}
static inline bool cpuinfo_has_x86_avx512vp2intersect(void) {
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
return cpuinfo_isa.avx512vp2intersect;
@@ -1460,14 +1519,17 @@ static inline bool cpuinfo_has_x86_sha(void) {
#endif
#if CPUINFO_ARCH_ARM64
bool atomics;
bool bf16;
bool sve;
bool sve2;
bool i8mm;
#endif
bool rdm;
bool fp16arith;
bool dot;
bool jscvt;
bool fcma;
bool fhm;
bool aes;
bool sha1;
@@ -1623,6 +1685,22 @@ static inline bool cpuinfo_has_arm_vfpv4_d32(void) {
#endif
}
static inline bool cpuinfo_has_arm_fp16_arith(void) {
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
return cpuinfo_isa.fp16arith;
#else
return false;
#endif
}
static inline bool cpuinfo_has_arm_bf16(void) {
#if CPUINFO_ARCH_ARM64
return cpuinfo_isa.bf16;
#else
return false;
#endif
}
static inline bool cpuinfo_has_arm_wmmx(void) {
#if CPUINFO_ARCH_ARM
return cpuinfo_isa.wmmx;
@@ -1705,9 +1783,9 @@ static inline bool cpuinfo_has_arm_neon_fp16_arith(void) {
#endif
}
static inline bool cpuinfo_has_arm_fp16_arith(void) {
static inline bool cpuinfo_has_arm_fhm(void) {
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
return cpuinfo_isa.fp16arith;
return cpuinfo_isa.fhm;
#else
return false;
#endif
@@ -1721,6 +1799,14 @@ static inline bool cpuinfo_has_arm_neon_dot(void) {
#endif
}
static inline bool cpuinfo_has_arm_neon_bf16(void) {
#if CPUINFO_ARCH_ARM64
return cpuinfo_isa.bf16;
#else
return false;
#endif
}
static inline bool cpuinfo_has_arm_jscvt(void) {
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
return cpuinfo_isa.jscvt;
@@ -1737,6 +1823,14 @@ static inline bool cpuinfo_has_arm_fcma(void) {
#endif
}
static inline bool cpuinfo_has_arm_i8mm(void) {
#if CPUINFO_ARCH_ARM64
return cpuinfo_isa.i8mm;
#else
return false;
#endif
}
static inline bool cpuinfo_has_arm_aes(void) {
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
return cpuinfo_isa.aes;
@@ -1785,6 +1879,14 @@ static inline bool cpuinfo_has_arm_sve(void) {
#endif
}
static inline bool cpuinfo_has_arm_sve_bf16(void) {
#if CPUINFO_ARCH_ARM64
return cpuinfo_isa.sve && cpuinfo_isa.bf16;
#else
return false;
#endif
}
static inline bool cpuinfo_has_arm_sve2(void) {
#if CPUINFO_ARCH_ARM64
return cpuinfo_isa.sve2;
@@ -1793,6 +1895,109 @@ static inline bool cpuinfo_has_arm_sve2(void) {
#endif
}
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
/* This structure is not a part of stable API. Use cpuinfo_has_riscv_* functions instead. */
struct cpuinfo_riscv_isa {
/**
* Keep fields in line with the canonical order as defined by
* Section 27.11 Subset Naming Convention.
*/
/* RV32I/64I/128I Base ISA. */
bool i;
#if CPUINFO_ARCH_RISCV32
/* RV32E Base ISA. */
bool e;
#endif
/* Integer Multiply/Divide Extension. */
bool m;
/* Atomic Extension. */
bool a;
/* Single-Precision Floating-Point Extension. */
bool f;
/* Double-Precision Floating-Point Extension. */
bool d;
/* Compressed Extension. */
bool c;
/* Vector Extension. */
bool v;
};
extern struct cpuinfo_riscv_isa cpuinfo_isa;
#endif
static inline bool cpuinfo_has_riscv_i(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.i;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_e(void) {
#if CPUINFO_ARCH_RISCV32
return cpuinfo_isa.e;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_m(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.m;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_a(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.a;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_f(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.f;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_d(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.d;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_g(void) {
// The 'G' extension is simply shorthand for 'IMAFD'.
return cpuinfo_has_riscv_i()
&& cpuinfo_has_riscv_m()
&& cpuinfo_has_riscv_a()
&& cpuinfo_has_riscv_f()
&& cpuinfo_has_riscv_d();
}
static inline bool cpuinfo_has_riscv_c(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.c;
#else
return false;
#endif
}
static inline bool cpuinfo_has_riscv_v(void) {
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_isa.v;
#else
return false;
#endif
}
const struct cpuinfo_processor* CPUINFO_ABI cpuinfo_get_processors(void);
const struct cpuinfo_core* CPUINFO_ABI cpuinfo_get_cores(void);
const struct cpuinfo_cluster* CPUINFO_ABI cpuinfo_get_clusters(void);

View File

@@ -30,7 +30,8 @@ uint32_t cpuinfo_packages_count = 0;
uint32_t cpuinfo_cache_count[cpuinfo_cache_level_max] = { 0 };
uint32_t cpuinfo_max_cache_size = 0;
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
struct cpuinfo_uarch_info* cpuinfo_uarchs = NULL;
uint32_t cpuinfo_uarchs_count = 0;
#else
@@ -41,7 +42,8 @@ uint32_t cpuinfo_max_cache_size = 0;
uint32_t cpuinfo_linux_cpu_max = 0;
const struct cpuinfo_processor** cpuinfo_linux_cpu_to_processor_map = NULL;
const struct cpuinfo_core** cpuinfo_linux_cpu_to_core_map = NULL;
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
const uint32_t* cpuinfo_linux_cpu_to_uarch_index_map = NULL;
#endif
#endif
@@ -79,7 +81,8 @@ const struct cpuinfo_uarch_info* cpuinfo_get_uarchs() {
if (!cpuinfo_is_initialized) {
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarchs");
}
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_uarchs;
#else
return &cpuinfo_global_uarch;
@@ -130,7 +133,8 @@ const struct cpuinfo_uarch_info* cpuinfo_get_uarch(uint32_t index) {
if (!cpuinfo_is_initialized) {
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarch");
}
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
if CPUINFO_UNLIKELY(index >= cpuinfo_uarchs_count) {
return NULL;
}
@@ -175,7 +179,8 @@ uint32_t cpuinfo_get_uarchs_count(void) {
if (!cpuinfo_is_initialized) {
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarchs_count");
}
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
return cpuinfo_uarchs_count;
#else
return 1;
@@ -351,7 +356,8 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index(void) {
if CPUINFO_UNLIKELY(!cpuinfo_is_initialized) {
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "current_uarch_index");
}
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
#ifdef __linux__
if (cpuinfo_linux_cpu_to_uarch_index_map == NULL) {
/* Special case: avoid syscall on systems with only a single type of cores */
@@ -373,7 +379,7 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index(void) {
return 0;
#endif
#else
/* Only ARM/ARM64 processors may include cores of different types in the same package. */
/* Only ARM/ARM64/RISCV processors may include cores of different types in the same package. */
return 0;
#endif
}
@@ -382,7 +388,8 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index_with_default(uint32_t defau
if CPUINFO_UNLIKELY(!cpuinfo_is_initialized) {
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "current_uarch_index_with_default");
}
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
#ifdef __linux__
if (cpuinfo_linux_cpu_to_uarch_index_map == NULL) {
/* Special case: avoid syscall on systems with only a single type of cores */
@@ -404,7 +411,7 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index_with_default(uint32_t defau
return default_uarch_index;
#endif
#else
/* Only ARM/ARM64 processors may include cores of different types in the same package. */
/* Only ARM/ARM64/RISCV processors may include cores of different types in the same package. */
return 0;
#endif
}

View File

@@ -28,6 +28,7 @@ enum cpuinfo_arm_chipset_vendor {
cpuinfo_arm_chipset_vendor_spreadtrum,
cpuinfo_arm_chipset_vendor_telechips,
cpuinfo_arm_chipset_vendor_texas_instruments,
cpuinfo_arm_chipset_vendor_unisoc,
cpuinfo_arm_chipset_vendor_wondermedia,
cpuinfo_arm_chipset_vendor_max,
};
@@ -62,6 +63,7 @@ enum cpuinfo_arm_chipset_series {
cpuinfo_arm_chipset_series_spreadtrum_sc,
cpuinfo_arm_chipset_series_telechips_tcc,
cpuinfo_arm_chipset_series_texas_instruments_omap,
cpuinfo_arm_chipset_series_unisoc_t,
cpuinfo_arm_chipset_series_wondermedia_wm,
cpuinfo_arm_chipset_series_max,
};

View File

@@ -1238,6 +1238,57 @@ void cpuinfo_arm_decode_cache(
};
break;
}
case cpuinfo_uarch_neoverse_n1:
case cpuinfo_uarch_neoverse_v1:
case cpuinfo_uarch_neoverse_n2:
case cpuinfo_uarch_neoverse_v2:
{
/*
* The specifications here below are taken from the
* Arm Core Technical Reference Manuals for
* - Neoverse N1: https://developer.arm.com/documentation/100616/0401/?lang=en
* - Neoverse N2: https://developer.arm.com/documentation/102099/0003/?lang=en
* - Neoverse V1: https://developer.arm.com/documentation/101427/0102/?lang=en
* - Neoverse V2: https://developer.arm.com/documentation/102375/0002/?lang=en
*
* All four Arm architectures have L1 memory system with instruction and data caches,
* both of fixed size of 64KB. The instruction side memory system is 4-way set associative
* with a cache line length of 64 bytes. The data cache is also 4-way set associative with
* a cache line length of 64 bytes.
*
* The L2 memory system differs across the four Architectures in the minimum
* length of the L2 cache. Namely:
* - Arm Neoverse N1/N2/V1 have a L2 cache of configurable size of 256KB, 512KB, or 1024KB
* - Arm Neoverse V2 has a L2 cache of configurable size of 1MB or 2MB
* For all four architectures, the L2 cache is 8-way set associative
* For all other information, please refer to the technical manuals linked above
*/
const uint32_t min_l2_size_KB = uarch == cpuinfo_uarch_neoverse_v2 ? 1024 : 256;
const uint32_t min_l3_size_KB = 0;
*l1i = (struct cpuinfo_cache) {
.size = 64 * 1024,
.associativity = 4,
.line_size = 64,
};
*l1d = (struct cpuinfo_cache) {
.size = 64 * 1024,
.associativity = 4,
.line_size = 64,
};
*l2 = (struct cpuinfo_cache) {
.size = min_l2_size_KB * 1024,
.associativity = 8,
.line_size = 64,
.flags = CPUINFO_CACHE_INCLUSIVE,
};
*l3 = (struct cpuinfo_cache) {
.size = min_l3_size_KB * 1024,
.associativity = 16,
.line_size = 64,
};
break;
}
#if CPUINFO_ARCH_ARM && !defined(__ARM_ARCH_8A__)
case cpuinfo_uarch_scorpion:
/*
@@ -1655,6 +1706,10 @@ uint32_t cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor* proc
*/
return 8 * 1024 * 1024;
case cpuinfo_uarch_cortex_a55:
case cpuinfo_uarch_neoverse_n1:
case cpuinfo_uarch_neoverse_v1:
case cpuinfo_uarch_neoverse_n2:
case cpuinfo_uarch_neoverse_v2:
case cpuinfo_uarch_cortex_a75:
case cpuinfo_uarch_cortex_a76:
case cpuinfo_uarch_exynos_m4:

View File

@@ -33,6 +33,13 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
const struct cpuinfo_arm_chipset chipset[restrict static 1],
struct cpuinfo_arm_isa isa[restrict static 1])
{
if (architecture_version < 8) {
const uint32_t armv8_features2_mask = CPUINFO_ARM_LINUX_FEATURE2_AES | CPUINFO_ARM_LINUX_FEATURE2_PMULL |
CPUINFO_ARM_LINUX_FEATURE2_SHA1 | CPUINFO_ARM_LINUX_FEATURE2_SHA2 | CPUINFO_ARM_LINUX_FEATURE2_CRC32;
if (features2 & armv8_features2_mask) {
architecture_version = 8;
}
}
if (architecture_version >= 8) {
/*
* ARMv7 code running on ARMv8: IDIV, VFP, NEON are always supported,
@@ -57,13 +64,22 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
* NEON FP16 compute extension and VQRDMLAH/VQRDMLSH instructions are not indicated in /proc/cpuinfo.
* Use a MIDR-based heuristic to whitelist processors known to support it:
* - Processors with Cortex-A55 cores
* - Processors with Cortex-A65 cores
* - Processors with Cortex-A75 cores
* - Processors with Cortex-A76 cores
* - Processors with Cortex-A77 cores
* - Processors with Cortex-A78 cores
* - Processors with Cortex-A510 cores
* - Processors with Cortex-A710 cores
* - Processors with Cortex-A715 cores
* - Processors with Cortex-X1 cores
* - Processors with Cortex-X2 cores
* - Processors with Cortex-X3 cores
* - Processors with Exynos M4 cores
* - Processors with Exynos M5 cores
* - Neoverse N1 cores
* - Neoverse N2 cores
* - Neoverse V1 cores
* - Neoverse V2 cores
*/
if (chipset->series == cpuinfo_arm_chipset_series_samsung_exynos && chipset->model == 9810) {
/* Only little cores of Exynos 9810 support FP16 & RDM */
@@ -71,11 +87,21 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
} else {
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
case UINT32_C(0x4100D050): /* Cortex-A55 */
case UINT32_C(0x4100D060): /* Cortex-A65 */
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4100D400): /* Neoverse V1 */
case UINT32_C(0x4100D410): /* Cortex-A78 */
case UINT32_C(0x4100D440): /* Cortex-X1 */
case UINT32_C(0x4100D460): /* Cortex-A510 */
case UINT32_C(0x4100D470): /* Cortex-A710 */
case UINT32_C(0x4100D480): /* Cortex-X2 */
case UINT32_C(0x4100D490): /* Neoverse N2 */
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x51008020): /* Kryo 385 Gold (Cortex-A75) */
case UINT32_C(0x51008030): /* Kryo 385 Silver (Cortex-A55) */
@@ -91,25 +117,57 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
/*
* NEON VDOT instructions are not indicated in /proc/cpuinfo.
* Use a MIDR-based heuristic to whitelist processors known to support it.
* Use a MIDR-based heuristic to whitelist processors known to support it:
* - Processors with Cortex-A76 cores
* - Processors with Cortex-A77 cores
* - Processors with Cortex-A78 cores
* - Processors with Cortex-A510 cores
* - Processors with Cortex-A710 cores
* - Processors with Cortex-A715 cores
* - Processors with Cortex-X1 cores
* - Processors with Cortex-X2 cores
* - Processors with Cortex-X3 cores
* - Processors with Exynos M4 cores
* - Processors with Exynos M5 cores
* - Neoverse N1 cores
* - Neoverse N2 cores
* - Neoverse V1 cores
* - Neoverse V2 cores
*/
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
case UINT32_C(0x53000030): /* Exynos-M4 */
case UINT32_C(0x53000040): /* Exynos-M5 */
isa->dot = true;
break;
case UINT32_C(0x4100D050): /* Cortex A55: revision 1 or later only */
isa->dot = !!(midr_get_variant(midr) >= 1);
break;
case UINT32_C(0x4100D0A0): /* Cortex A75: revision 2 or later only */
isa->dot = !!(midr_get_variant(midr) >= 2);
break;
if (chipset->series == cpuinfo_arm_chipset_series_spreadtrum_sc && chipset->model == 9863) {
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Spreadtrum SC9863A");
} else if (chipset->series == cpuinfo_arm_chipset_series_unisoc_t && chipset->model == 310) {
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Unisoc T310");
} else {
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4100D400): /* Neoverse V1 */
case UINT32_C(0x4100D410): /* Cortex-A78 */
case UINT32_C(0x4100D440): /* Cortex-X1 */
case UINT32_C(0x4100D460): /* Cortex-A510 */
case UINT32_C(0x4100D470): /* Cortex-A710 */
case UINT32_C(0x4100D480): /* Cortex-X2 */
case UINT32_C(0x4100D490): /* Neoverse N2 */
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
case UINT32_C(0x53000030): /* Exynos M4 */
case UINT32_C(0x53000040): /* Exynos M5 */
isa->dot = true;
break;
case UINT32_C(0x4100D050): /* Cortex A55: revision 1 or later only */
isa->dot = !!(midr_get_variant(midr) >= 1);
break;
case UINT32_C(0x4100D0A0): /* Cortex A75: revision 2 or later only */
isa->dot = !!(midr_get_variant(midr) >= 2);
break;
}
}
} else {
/* ARMv7 or lower: use feature flags to detect optional features */
@@ -167,19 +225,24 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
}
if (features & CPUINFO_ARM_LINUX_FEATURE_IWMMXT) {
const uint32_t wcid = read_wcid();
cpuinfo_log_debug("WCID = 0x%08"PRIx32, wcid);
const uint32_t coprocessor_type = (wcid >> 8) & UINT32_C(0xFF);
if (coprocessor_type >= 0x10) {
isa->wmmx = true;
if (coprocessor_type >= 0x20) {
isa->wmmx2 = true;
#if !defined(__ARM_ARCH_8A__) && !(defined(__ARM_ARCH) && (__ARM_ARCH >= 8))
const uint32_t wcid = read_wcid();
cpuinfo_log_debug("WCID = 0x%08"PRIx32, wcid);
const uint32_t coprocessor_type = (wcid >> 8) & UINT32_C(0xFF);
if (coprocessor_type >= 0x10) {
isa->wmmx = true;
if (coprocessor_type >= 0x20) {
isa->wmmx2 = true;
}
} else {
cpuinfo_log_warning("WMMX ISA disabled: OS reported iwmmxt feature, "
"but WCID coprocessor type 0x%"PRIx32" indicates no WMMX support",
coprocessor_type);
}
} else {
#else
cpuinfo_log_warning("WMMX ISA disabled: OS reported iwmmxt feature, "
"but WCID coprocessor type 0x%"PRIx32" indicates no WMMX support",
coprocessor_type);
}
"but there is no iWMMXt coprocessor");
#endif
}
if ((features & CPUINFO_ARM_LINUX_FEATURE_THUMB) || (architecture_flags & CPUINFO_ARM_LINUX_ARCH_T)) {

View File

@@ -41,6 +41,9 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
* - Processors with Exynos M4 cores
* - Processors with Exynos M5 cores
* - Neoverse N1 cores
* - Neoverse V1 cores
* - Neoverse N2 cores
* - Neoverse V2 cores
*/
if (chipset->series == cpuinfo_arm_chipset_series_samsung_exynos && chipset->model == 9810) {
/* Exynos 9810 reports that it supports FP16 compute, but in fact only little cores do */
@@ -50,10 +53,14 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
case UINT32_C(0x4100D050): /* Cortex-A55 */
case UINT32_C(0x4100D060): /* Cortex-A65 */
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4100D400): /* Neoverse V1 */
case UINT32_C(0x4100D490): /* Neoverse N2 */
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x51008020): /* Kryo 385 Gold (Cortex-A75) */
case UINT32_C(0x51008030): /* Kryo 385 Silver (Cortex-A55) */
@@ -78,6 +85,9 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
break;
}
}
if (features2 & CPUINFO_ARM_LINUX_FEATURE2_I8MM) {
isa->i8mm = true;
}
/*
* Many phones ship with an old kernel configuration that doesn't report UDOT/SDOT instructions.
@@ -89,7 +99,10 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4100D400): /* Neoverse V1 */
case UINT32_C(0x4100D490): /* Neoverse N2 */
case UINT32_C(0x4100D4A0): /* Neoverse E1 */
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
@@ -124,4 +137,13 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
if (features2 & CPUINFO_ARM_LINUX_FEATURE2_SVE2) {
isa->sve2 = true;
}
// SVEBF16 is set iff SVE and BF16 are both supported, but the SVEBF16 feature flag
// was added in Linux kernel before the BF16 feature flag, so we check for either.
if (features2 & (CPUINFO_ARM_LINUX_FEATURE2_BF16 | CPUINFO_ARM_LINUX_FEATURE2_SVEBF16)) {
isa->bf16 = true;
}
if (features & CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM) {
isa->fhm = true;
}
}

View File

@@ -314,7 +314,7 @@ CPUINFO_INTERNAL bool cpuinfo_arm_linux_parse_proc_cpuinfo(
struct cpuinfo_arm_isa isa[restrict static 1]);
#endif
#ifdef __ANDROID__
#if defined(__ANDROID__)
CPUINFO_INTERNAL struct cpuinfo_arm_chipset
cpuinfo_arm_android_decode_chipset(
const struct cpuinfo_android_properties properties[restrict static 1],

View File

@@ -37,29 +37,17 @@ static inline bool is_ascii_numeric(char c) {
}
static inline uint16_t load_u16le(const void* ptr) {
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
return *((const uint16_t*) ptr);
#else
const uint8_t* byte_ptr = (const uint8_t*) ptr;
return ((uint16_t) byte_ptr[1] << 8) | (uint16_t) byte_ptr[0];
#endif
}
static inline uint32_t load_u24le(const void* ptr) {
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
return ((uint32_t) ((const uint8_t*) ptr)[2] << 16) | ((uint32_t) *((const uint16_t*) ptr));
#else
const uint8_t* byte_ptr = (const uint8_t*) ptr;
return ((uint32_t) byte_ptr[2] << 16) | ((uint32_t) byte_ptr[1] << 8) | (uint32_t) byte_ptr[0];
#endif
return ((uint32_t) ((const uint8_t*) ptr)[2] << 16) | (uint32_t) load_u16le(ptr);
}
static inline uint32_t load_u32le(const void* ptr) {
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
return *((const uint32_t*) ptr);
#else
return ((uint32_t) ((const uint8_t*) ptr)[3] << 24) | load_u24le(ptr);
#endif
const uint8_t* byte_ptr = (const uint8_t*) ptr;
return ((uint32_t) byte_ptr[3] << 24) | ((uint32_t) byte_ptr[2] << 16) | ((uint32_t) byte_ptr[1] << 8) | (uint32_t) byte_ptr[0];
}
/*
@@ -96,6 +84,7 @@ static enum cpuinfo_arm_chipset_vendor chipset_series_vendor[cpuinfo_arm_chipset
[cpuinfo_arm_chipset_series_spreadtrum_sc] = cpuinfo_arm_chipset_vendor_spreadtrum,
[cpuinfo_arm_chipset_series_telechips_tcc] = cpuinfo_arm_chipset_vendor_telechips,
[cpuinfo_arm_chipset_series_texas_instruments_omap] = cpuinfo_arm_chipset_vendor_texas_instruments,
[cpuinfo_arm_chipset_series_unisoc_t] = cpuinfo_arm_chipset_vendor_unisoc,
[cpuinfo_arm_chipset_series_wondermedia_wm] = cpuinfo_arm_chipset_vendor_wondermedia,
};
@@ -877,6 +866,63 @@ static bool match_sc(
return true;
}
/**
* Tries to match, case-sentitively, /Unisoc T\d{3,4}/ signature for Unisoc T chipset.
* If match successful, extracts model information into \p chipset argument.
*
* @param start - start of the platform identifier (/proc/cpuinfo Hardware string, ro.product.board,
* ro.board.platform, or ro.chipname) to match.
* @param end - end of the platform identifier (/proc/cpuinfo Hardware string, ro.product.board,
* ro.board.platform, or ro.chipname) to match.
* @param[out] chipset - location where chipset information will be stored upon a successful match.
*
* @returns true if signature matched, false otherwise.
*/
static bool match_t(
const char* start, const char* end,
struct cpuinfo_arm_chipset chipset[restrict static 1])
{
/* Expect 11-12 symbols: "Unisoc T" (8 symbols) + 3-4-digit model number */
const size_t length = end - start;
switch (length) {
case 11:
case 12:
break;
default:
return false;
}
/* Check that string starts with "Unisoc T". The first four characters are loaded as 32-bit little endian word */
const uint32_t expected_unis = load_u32le(start);
if (expected_unis != UINT32_C(0x73696E55) /* "sinU" = reverse("Unis") */) {
return false;
}
/* The next four characters are loaded as 32-bit little endian word */
const uint32_t expected_oc_t = load_u32le(start + 4);
if (expected_oc_t != UINT32_C(0x5420636F) /* "T co" = reverse("oc T") */) {
return false;
}
/* Validate and parse 3-4 digit model number */
uint32_t model = 0;
for (uint32_t i = 8; i < length; i++) {
const uint32_t digit = (uint32_t) (uint8_t) start[i] - '0';
if (digit >= 10) {
/* Not really a digit */
return false;
}
model = model * 10 + digit;
}
*chipset = (struct cpuinfo_arm_chipset) {
.vendor = cpuinfo_arm_chipset_vendor_unisoc,
.series = cpuinfo_arm_chipset_series_unisoc_t,
.model = model,
};
return true;
}
/**
* Tries to match /lc\d{4}[a-z]?$/ signature for Leadcore LC chipsets.
* If match successful, extracts model information into \p chipset argument.
@@ -891,7 +937,7 @@ static bool match_lc(
const char* start, const char* end,
struct cpuinfo_arm_chipset chipset[restrict static 1])
{
/* Expect at 6-7 symbols: "lc" (2 symbols) + 4-digit model number + optional 1-letter suffix */
/* Expect 6-7 symbols: "lc" (2 symbols) + 4-digit model number + optional 1-letter suffix */
const size_t length = end - start;
switch (length) {
case 6:
@@ -1351,7 +1397,7 @@ static bool match_and_parse_sunxi(
return false;
}
/* Compare sunXi platform id and number of cores to tabluted values to decode chipset name */
/* Compare sunXi platform id and number of cores to tabulated values to decode chipset name */
uint32_t model = 0;
char suffix = 0;
for (size_t i = 0; i < CPUINFO_COUNT_OF(sunxi_map_entries); i++) {
@@ -2354,6 +2400,16 @@ struct cpuinfo_arm_chipset cpuinfo_arm_linux_decode_chipset_from_proc_cpuinfo_ha
cpuinfo_log_debug(
"matched Spreadtrum SC signature in /proc/cpuinfo Hardware string \"%.*s\"",
(int) hardware_length, hardware);
return chipset;
}
/* Check Unisoc T signature */
if (match_t(hardware, hardware_end, &chipset)) {
cpuinfo_log_debug(
"matched Unisoc T signature in /proc/cpuinfo Hardware string \"%.*s\"",
(int) hardware_length, hardware);
return chipset;
}
@@ -3417,6 +3473,7 @@ static const char* chipset_vendor_string[cpuinfo_arm_chipset_vendor_max] = {
[cpuinfo_arm_chipset_vendor_spreadtrum] = "Spreadtrum",
[cpuinfo_arm_chipset_vendor_telechips] = "Telechips",
[cpuinfo_arm_chipset_vendor_texas_instruments] = "Texas Instruments",
[cpuinfo_arm_chipset_vendor_unisoc] = "Unisoc",
[cpuinfo_arm_chipset_vendor_wondermedia] = "WonderMedia",
};
@@ -3451,6 +3508,7 @@ static const char* chipset_series_string[cpuinfo_arm_chipset_series_max] = {
[cpuinfo_arm_chipset_series_spreadtrum_sc] = "SC",
[cpuinfo_arm_chipset_series_telechips_tcc] = "TCC",
[cpuinfo_arm_chipset_series_texas_instruments_omap] = "OMAP",
[cpuinfo_arm_chipset_series_unisoc_t] = "T",
[cpuinfo_arm_chipset_series_wondermedia_wm] = "WM",
};
@@ -3484,7 +3542,7 @@ void cpuinfo_arm_chipset_to_string(
}
}
#ifdef __ANDROID__
#if defined(__ANDROID__)
static inline struct cpuinfo_arm_chipset disambiguate_qualcomm_chipset(
const struct cpuinfo_arm_chipset proc_cpuinfo_hardware_chipset[restrict static 1],
const struct cpuinfo_arm_chipset ro_product_board_chipset[restrict static 1],
@@ -3776,7 +3834,7 @@ void cpuinfo_arm_chipset_to_string(
*/
void cpuinfo_arm_fixup_raspberry_pi_chipset(
struct cpuinfo_arm_chipset chipset[restrict static 1],
const char revision[restrict static CPUINFO_HARDWARE_VALUE_MAX])
const char revision[restrict static CPUINFO_REVISION_VALUE_MAX])
{
const size_t revision_length = strnlen(revision, CPUINFO_REVISION_VALUE_MAX);

View File

@@ -48,7 +48,7 @@ static inline bool bitmask_all(uint32_t bitfield, uint32_t mask) {
* @param usable_processors - number of processors in the @p processors array with CPUINFO_LINUX_FLAG_VALID flags.
* @param max_processors - number of elements in the @p processors array.
* @param[in,out] processors - processor descriptors with pre-parsed POSSIBLE and PRESENT flags, minimum/maximum
* frequency, MIDR infromation, and core cluster (package siblings list) information.
* frequency, MIDR information, and core cluster (package siblings list) information.
*
* @retval true if the heuristic successfully assigned all processors into clusters of cores.
* @retval false if known details about processors contradict the heuristic configuration of core clusters.
@@ -292,9 +292,9 @@ bool cpuinfo_arm_linux_detect_core_clusters_by_heuristic(
* - Processors assigned to these clusters stay assigned to the same clusters
* - No new processors are added to these clusters
* - Processors without pre-assigned cluster are clustered in one sequential scan:
* - If known details (min/max frequency, MIDR components) of a processor are compatible with a preceeding
* processor, without pre-assigned cluster, the processor is assigned to the cluster of the preceeding processor.
* - If known details (min/max frequency, MIDR components) of a processor are not compatible with a preceeding
* - If known details (min/max frequency, MIDR components) of a processor are compatible with a preceding
* processor, without pre-assigned cluster, the processor is assigned to the cluster of the preceding processor.
* - If known details (min/max frequency, MIDR components) of a processor are not compatible with a preceding
* processor, the processor is assigned to a newly created cluster.
*
* The function must be called after parsing OS-provided information on core clusters, and usually is called only
@@ -309,7 +309,7 @@ bool cpuinfo_arm_linux_detect_core_clusters_by_heuristic(
*
* @param max_processors - number of elements in the @p processors array.
* @param[in,out] processors - processor descriptors with pre-parsed POSSIBLE and PRESENT flags, minimum/maximum
* frequency, MIDR infromation, and core cluster (package siblings list) information.
* frequency, MIDR information, and core cluster (package siblings list) information.
*
* @retval true if the heuristic successfully assigned all processors into clusters of cores.
* @retval false if known details about processors contradict the heuristic configuration of core clusters.
@@ -331,7 +331,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
if (cluster_flags & CPUINFO_LINUX_FLAG_MIN_FREQUENCY) {
if (cluster_min_frequency != processors[i].min_frequency) {
cpuinfo_log_info(
"minimum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceeding cluster (%"PRIu32" KHz); "
"minimum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceding cluster (%"PRIu32" KHz); "
"processor %"PRIu32" starts to a new cluster",
i, processors[i].min_frequency, cluster_min_frequency, i);
goto new_cluster;
@@ -346,7 +346,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
if (cluster_flags & CPUINFO_LINUX_FLAG_MAX_FREQUENCY) {
if (cluster_max_frequency != processors[i].max_frequency) {
cpuinfo_log_debug(
"maximum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceeding cluster (%"PRIu32" KHz); "
"maximum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceding cluster (%"PRIu32" KHz); "
"processor %"PRIu32" starts a new cluster",
i, processors[i].max_frequency, cluster_max_frequency, i);
goto new_cluster;
@@ -361,7 +361,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
if (cluster_flags & CPUINFO_ARM_LINUX_VALID_IMPLEMENTER) {
if ((cluster_midr & CPUINFO_ARM_MIDR_IMPLEMENTER_MASK) != (processors[i].midr & CPUINFO_ARM_MIDR_IMPLEMENTER_MASK)) {
cpuinfo_log_debug(
"CPU Implementer of processor %"PRIu32" (0x%02"PRIx32") is different than of preceeding cluster (0x%02"PRIx32"); "
"CPU Implementer of processor %"PRIu32" (0x%02"PRIx32") is different than of preceding cluster (0x%02"PRIx32"); "
"processor %"PRIu32" starts to a new cluster",
i, midr_get_implementer(processors[i].midr), midr_get_implementer(cluster_midr), i);
goto new_cluster;
@@ -417,11 +417,11 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
}
}
/* All checks passed, attach processor to the preceeding cluster */
/* All checks passed, attach processor to the preceding cluster */
cluster_processors++;
processors[i].package_leader_id = cluster_start;
processors[i].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
cpuinfo_log_debug("assigned processor %"PRIu32" to preceeding cluster of processor %"PRIu32, i, cluster_start);
cpuinfo_log_debug("assigned processor %"PRIu32" to preceding cluster of processor %"PRIu32, i, cluster_start);
continue;
new_cluster:

View File

@@ -35,10 +35,16 @@
return mvfr0;
}
#endif
static inline uint32_t read_wcid(void) {
uint32_t wcid;
__asm__ __volatile__("MRC p1, 0, %[wcid], c0, c0" : [wcid] "=r" (wcid));
return wcid;
}
#if !defined(__ARM_ARCH_8A__) && !(defined(__ARM_ARCH) && (__ARM_ARCH >= 8))
/*
* In ARMv8, AArch32 state supports only conceptual coprocessors CP10, CP11, CP14, and CP15.
* AArch64 does not support the concept of coprocessors.
* and clang refuses to compile inline assembly when targeting ARMv8+
*/
static inline uint32_t read_wcid(void) {
uint32_t wcid;
__asm__ __volatile__("MRC p1, 0, %[wcid], c0, c0" : [wcid] "=r" (wcid));
return wcid;
}
#endif
#endif

View File

@@ -177,6 +177,10 @@ static void parse_features(
#if CPUINFO_ARCH_ARM64
processor->features |= CPUINFO_ARM_LINUX_FEATURE_FCMA;
#endif
} else if (memcmp(feature_start, "i8mm", feature_length) == 0) {
#if CPUINFO_ARCH_ARM64
processor->features2 |= CPUINFO_ARM_LINUX_FEATURE2_I8MM;
#endif
#if CPUINFO_ARCH_ARM
} else if (memcmp(feature_start, "half", feature_length) == 0) {
processor->features |= CPUINFO_ARM_LINUX_FEATURE_HALF;
@@ -283,6 +287,10 @@ static void parse_features(
#if CPUINFO_ARCH_ARM64
processor->features |= CPUINFO_ARM_LINUX_FEATURE_ASIMDRDM;
#endif
} else if (memcmp(feature_start, "asimdfhm", feature_length) == 0) {
#if CPUINFO_ARCH_ARM64
processor->features |= CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM;
#endif
#if CPUINFO_ARCH_ARM
} else if (memcmp(feature_start, "fastmult", feature_length) == 0) {
processor->features |= CPUINFO_ARM_LINUX_FEATURE_FASTMULT;
@@ -896,6 +904,7 @@ bool cpuinfo_arm_linux_parse_proc_cpuinfo(
uint32_t max_processors_count,
struct cpuinfo_arm_linux_processor processors[restrict static max_processors_count])
{
hardware[0] = '\0';
struct proc_cpuinfo_parser_state state = {
.hardware = hardware,
.revision = revision,

View File

@@ -1,3 +1,4 @@
#include <limits.h>
#include <string.h>
#include <unistd.h>
@@ -15,7 +16,8 @@
#include <arm/linux/api.h>
#include <cpuinfo/log.h>
#if CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_ARM && !defined(__ANDROID__)
#if CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_ARM && \
defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)
#include <sys/auxv.h>
#else
#define AT_HWCAP 16
@@ -74,11 +76,13 @@
libc = NULL;
}
return getauxval != NULL;
#else
/* GNU/Linux: getauxval is always supported */
#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)
/* GNU/Linux: getauxval is supported since glibc-2.16 */
*hwcap = getauxval(AT_HWCAP);
*hwcap2 = getauxval(AT_HWCAP2);
return true;
#else
return false;
#endif
}

View File

@@ -199,9 +199,13 @@ void cpuinfo_arm_linux_init(void) {
for (uint32_t i = 0; i < arm_linux_processors_count; i++) {
arm_linux_processors[i].system_processor_id = i;
if (bitmask_all(arm_linux_processors[i].flags, CPUINFO_LINUX_FLAG_VALID)) {
valid_processors += 1;
if (!(arm_linux_processors[i].flags & CPUINFO_ARM_LINUX_VALID_PROCESSOR)) {
if (arm_linux_processors[i].flags & CPUINFO_ARM_LINUX_VALID_PROCESSOR) {
/*
* Processor is in possible and present lists, and also reported in /proc/cpuinfo.
* This processor is availble for compute.
*/
valid_processors += 1;
} else {
/*
* Processor is in possible and present lists, but not reported in /proc/cpuinfo.
* This is fairly common: high-index processors can be not reported if they are offline.
@@ -510,7 +514,7 @@ void cpuinfo_arm_linux_init(void) {
uint32_t l2_count = 0, l3_count = 0, big_l3_size = 0, cluster_id = UINT32_MAX;
/* Indication whether L3 (if it exists) is shared between all cores */
bool shared_l3 = true;
/* Populate cache infromation structures in l1i, l1d */
/* Populate cache information structures in l1i, l1d */
for (uint32_t i = 0; i < valid_processors; i++) {
if (arm_linux_processors[i].package_leader_id == arm_linux_processors[i].system_processor_id) {
cluster_id += 1;

View File

@@ -675,10 +675,10 @@ static bool cpuinfo_arm_linux_detect_cluster_midr_by_big_little_heuristic(
/*
* Initializes MIDR for leaders of core clusters in a single sequential scan:
* - Clusters preceeding the first reported MIDR value are assumed to have default MIDR value.
* - Clusters preceding the first reported MIDR value are assumed to have default MIDR value.
* - Clusters following any reported MIDR value to have that MIDR value.
*
* @param default_midr - MIDR value that will be assigned to cluster leaders preceeding any reported MIDR value.
* @param default_midr - MIDR value that will be assigned to cluster leaders preceding any reported MIDR value.
* @param processors_count - number of logical processor descriptions in the @p processors array.
* @param[in,out] processors - array of logical processor descriptions with pre-parsed MIDR, maximum frequency,
* and decoded core cluster (package_leader_id) information.
@@ -833,7 +833,7 @@ uint32_t cpuinfo_arm_linux_detect_cluster_midr(
* 2. For systems with 2 clusters and MIDR known for one cluster, assume big.LITTLE configuration,
* and estimate MIDR for the other cluster under assumption that MIDR for the big cluster is known.
* 3. Initialize MIDRs for core clusters in a single sequential scan:
* - Clusters preceeding the first reported MIDR value are assumed to have the last reported MIDR value.
* - Clusters preceding the first reported MIDR value are assumed to have the last reported MIDR value.
* - Clusters following any reported MIDR value to have that MIDR value.
*/

View File

@@ -15,43 +15,25 @@
#include <cpuinfo/log.h>
/* Polyfill recent CPUFAMILY_ARM_* values for older SDKs */
#ifndef CPUFAMILY_ARM_MONSOON_MISTRAL
#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xE81E7EF6
#endif
#ifndef CPUFAMILY_ARM_VORTEX_TEMPEST
#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07D34B9F
#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07D34B9F
#endif
#ifndef CPUFAMILY_ARM_LIGHTNING_THUNDER
#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504D2
#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504D2
#endif
#ifndef CPUFAMILY_ARM_FIRESTORM_ICESTORM
#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1B588BB3
#endif
#ifndef CPUFAMILY_ARM_AVALANCHE_BLIZZARD
#define CPUFAMILY_ARM_AVALANCHE_BLIZZARD 0xDA33D83D
#endif
struct cpuinfo_arm_isa cpuinfo_isa = {
#if CPUINFO_ARCH_ARM
.thumb = true,
.thumb2 = true,
.thumbee = false,
.jazelle = false,
.armv5e = true,
.armv6 = true,
.armv6k = true,
.armv7 = true,
.vfpv2 = false,
.vfpv3 = true,
.d32 = true,
.wmmx = false,
.wmmx2 = false,
.neon = true,
#endif
#if CPUINFO_ARCH_ARM64
.aes = true,
.sha1 = true,
.sha2 = true,
.pmull = true,
.crc32 = true,
#endif
};
static uint32_t get_sys_info(int type_specifier, const char* name) {
@@ -83,10 +65,8 @@ static uint32_t get_sys_info_by_name(const char* type_specifier) {
return result;
}
static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t cpu_subtype, uint32_t core_index, uint32_t core_count) {
static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t core_index, uint32_t core_count) {
switch (cpu_family) {
case CPUFAMILY_ARM_SWIFT:
return cpuinfo_uarch_swift;
case CPUFAMILY_ARM_CYCLONE:
return cpuinfo_uarch_cyclone;
case CPUFAMILY_ARM_TYPHOON:
@@ -107,25 +87,15 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t cpu_subtype
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
/* Hexa-core: 2x Firestorm + 4x Icestorm; Octa-core: 4x Firestorm + 4x Icestorm */
return core_index + 4 < core_count ? cpuinfo_uarch_firestorm : cpuinfo_uarch_icestorm;
case CPUFAMILY_ARM_AVALANCHE_BLIZZARD:
/* Hexa-core: 2x Avalanche + 4x Blizzard */
return core_index + 4 < core_count ? cpuinfo_uarch_avalanche : cpuinfo_uarch_blizzard;
default:
/* Use hw.cpusubtype for detection */
break;
}
#if CPUINFO_ARCH_ARM
switch (cpu_subtype) {
case CPU_SUBTYPE_ARM_V7:
return cpuinfo_uarch_cortex_a8;
case CPU_SUBTYPE_ARM_V7F:
return cpuinfo_uarch_cortex_a9;
case CPU_SUBTYPE_ARM_V7K:
return cpuinfo_uarch_cortex_a7;
default:
return cpuinfo_uarch_unknown;
}
#else
return cpuinfo_uarch_unknown;
#endif
return cpuinfo_uarch_unknown;
}
static void decode_package_name(char* package_name) {
@@ -299,71 +269,118 @@ void cpuinfo_arm_mach_init(void) {
const uint32_t cpu_family = get_sys_info_by_name("hw.cpufamily");
const uint32_t cpu_type = get_sys_info_by_name("hw.cputype");
const uint32_t cpu_subtype = get_sys_info_by_name("hw.cpusubtype");
switch (cpu_type) {
case CPU_TYPE_ARM64:
cpuinfo_isa.aes = true;
cpuinfo_isa.sha1 = true;
cpuinfo_isa.sha2 = true;
cpuinfo_isa.pmull = true;
cpuinfo_isa.crc32 = true;
break;
#if CPUINFO_ARCH_ARM
case CPU_TYPE_ARM:
switch (cpu_subtype) {
case CPU_SUBTYPE_ARM_V8:
cpuinfo_isa.armv8 = true;
cpuinfo_isa.aes = true;
cpuinfo_isa.sha1 = true;
cpuinfo_isa.sha2 = true;
cpuinfo_isa.pmull = true;
cpuinfo_isa.crc32 = true;
/* Fall-through to add ARMv7S features */
case CPU_SUBTYPE_ARM_V7S:
case CPU_SUBTYPE_ARM_V7K:
cpuinfo_isa.fma = true;
/* Fall-through to add ARMv7F features */
case CPU_SUBTYPE_ARM_V7F:
cpuinfo_isa.armv7mp = true;
cpuinfo_isa.fp16 = true;
/* Fall-through to add ARMv7 features */
case CPU_SUBTYPE_ARM_V7:
break;
default:
break;
}
break;
#endif
}
/*
* Support for ARMv8.1 Atomics & FP16 arithmetic instructions is supposed to be detected via
* sysctlbyname calls with "hw.optional.armv8_1_atomics" and "hw.optional.neon_fp16" arguments
* (see https://devstreaming-cdn.apple.com/videos/wwdc/2018/409t8zw7rumablsh/409/409_whats_new_in_llvm.pdf),
* but on new iOS versions these calls just fail with EPERM.
*
* Thus, we whitelist CPUs known to support these instructions.
*/
switch (cpu_family) {
case CPUFAMILY_ARM_MONSOON_MISTRAL:
case CPUFAMILY_ARM_VORTEX_TEMPEST:
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
#if CPUINFO_ARCH_ARM64
cpuinfo_isa.atomics = true;
#endif
cpuinfo_isa.fp16arith = true;
}
/*
* There does not yet seem to exist an OS mechanism to detect support for
* ARMv8.2 optional dot-product instructions, so we currently whitelist CPUs
* known to support these instruction.
* iOS 15 and macOS 12 added sysctls for ARM features, use them where possible.
* Otherwise, fallback to hardcoded set of CPUs with known support.
*/
switch (cpu_family) {
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.dot = true;
const uint32_t has_feat_lse = get_sys_info_by_name("hw.optional.arm.FEAT_LSE");
if (has_feat_lse != 0) {
cpuinfo_isa.atomics = true;
} else {
// Mandatory in ARMv8.1-A, list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_MONSOON_MISTRAL:
case CPUFAMILY_ARM_VORTEX_TEMPEST:
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.atomics = true;
}
}
const uint32_t has_feat_rdm = get_sys_info_by_name("hw.optional.arm.FEAT_RDM");
if (has_feat_rdm != 0) {
cpuinfo_isa.rdm = true;
} else {
// Optional in ARMv8.2-A (implemented in Apple cores),
// list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_MONSOON_MISTRAL:
case CPUFAMILY_ARM_VORTEX_TEMPEST:
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.rdm = true;
}
}
const uint32_t has_feat_fp16 = get_sys_info_by_name("hw.optional.arm.FEAT_FP16");
if (has_feat_fp16 != 0) {
cpuinfo_isa.fp16arith = true;
} else {
// Optional in ARMv8.2-A (implemented in Apple cores),
// list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_MONSOON_MISTRAL:
case CPUFAMILY_ARM_VORTEX_TEMPEST:
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.fp16arith = true;
}
}
const uint32_t has_feat_fhm = get_sys_info_by_name("hw.optional.arm.FEAT_FHM");
if (has_feat_fhm != 0) {
cpuinfo_isa.fhm = true;
} else {
// Prior to iOS 15, use 'hw.optional.armv8_2_fhm'
const uint32_t has_feat_fhm_legacy = get_sys_info_by_name("hw.optional.armv8_2_fhm");
if (has_feat_fhm_legacy != 0) {
cpuinfo_isa.fhm = true;
} else {
// Mandatory in ARMv8.4-A when FP16 arithmetics is implemented,
// list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.fhm = true;
}
}
}
const uint32_t has_feat_bf16 = get_sys_info_by_name("hw.optional.arm.FEAT_BF16");
if (has_feat_bf16 != 0) {
cpuinfo_isa.bf16 = true;
}
const uint32_t has_feat_fcma = get_sys_info_by_name("hw.optional.arm.FEAT_FCMA");
if (has_feat_fcma != 0) {
cpuinfo_isa.fcma = true;
} else {
// Mandatory in ARMv8.3-A, list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.fcma = true;
}
}
const uint32_t has_feat_jscvt = get_sys_info_by_name("hw.optional.arm.FEAT_JSCVT");
if (has_feat_jscvt != 0) {
cpuinfo_isa.jscvt = true;
} else {
// Mandatory in ARMv8.3-A, list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.jscvt = true;
}
}
const uint32_t has_feat_dotprod = get_sys_info_by_name("hw.optional.arm.FEAT_DotProd");
if (has_feat_dotprod != 0) {
cpuinfo_isa.dot = true;
} else {
// Mandatory in ARMv8.4-A, list only cores released before iOS 15 / macOS 12
switch (cpu_family) {
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
cpuinfo_isa.dot = true;
}
}
const uint32_t has_feat_i8mm = get_sys_info_by_name("hw.optional.arm.FEAT_I8MM");
if (has_feat_i8mm != 0) {
cpuinfo_isa.i8mm = true;
}
uint32_t num_clusters = 1;
@@ -374,7 +391,7 @@ void cpuinfo_arm_mach_init(void) {
.core_id = i % cores_per_package,
.package = packages + i / cores_per_package,
.vendor = cpuinfo_vendor_apple,
.uarch = decode_uarch(cpu_family, cpu_subtype, i, mach_topology.cores),
.uarch = decode_uarch(cpu_family, i, mach_topology.cores),
};
if (i != 0 && cores[i].uarch != cores[i - 1].uarch) {
num_clusters++;

View File

@@ -174,23 +174,27 @@ inline static uint32_t midr_score_core(uint32_t midr) {
case UINT32_C(0x53000030): /* Exynos M4 */
case UINT32_C(0x53000040): /* Exynos M5 */
case UINT32_C(0x4100D440): /* Cortex-X1 */
/* These cores are in big role w.r.t Cortex-A75/-A76/-A77/-A78 */
case UINT32_C(0x4100D480): /* Cortex-X2 */
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
/* These cores are in big role w.r.t Cortex-A75/-A76/-A77/-A78/-A710/-A715 */
return 6;
case UINT32_C(0x4E000030): /* Denver 2 */
case UINT32_C(0x53000010): /* Exynos M1 and Exynos M2 */
case UINT32_C(0x53000020): /* Exynos M3 */
case UINT32_C(0x51008040): /* Kryo 485 Gold / Gold Prime */
case UINT32_C(0x51008020): /* Kryo 385 Gold */
case UINT32_C(0x51008000): /* Kryo 260 / 280 Gold */
case UINT32_C(0x51002050): /* Kryo Gold */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x4100D410): /* Cortex-A78 */
case UINT32_C(0x4100D080): /* Cortex-A72 */
case UINT32_C(0x4100D090): /* Cortex-A73 */
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
case UINT32_C(0x4100D090): /* Cortex-A73 */
case UINT32_C(0x4100D080): /* Cortex-A72 */
case UINT32_C(0x4100D410): /* Cortex-A78 */
case UINT32_C(0x4100D470): /* Cortex-A710 */
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
case UINT32_C(0x4E000030): /* Denver 2 */
case UINT32_C(0x51002050): /* Kryo Gold */
case UINT32_C(0x51008000): /* Kryo 260 / 280 Gold */
case UINT32_C(0x51008020): /* Kryo 385 Gold */
case UINT32_C(0x51008040): /* Kryo 485 Gold / Gold Prime */
case UINT32_C(0x53000010): /* Exynos M1 and Exynos M2 */
case UINT32_C(0x53000020): /* Exynos M3 */
#if CPUINFO_ARCH_ARM
case UINT32_C(0x4100C0F0): /* Cortex-A15 */
case UINT32_C(0x4100C0E0): /* Cortex-A17 */
@@ -205,8 +209,9 @@ inline static uint32_t midr_score_core(uint32_t midr) {
#if CPUINFO_ARCH_ARM64
case UINT32_C(0x4100D060): /* Cortex-A65 */
#endif /* CPUINFO_ARCH_ARM64 */
case UINT32_C(0x4100D050): /* Cortex-A55 */
case UINT32_C(0x4100D030): /* Cortex-A53 */
case UINT32_C(0x4100D050): /* Cortex-A55 */
case UINT32_C(0x4100D460): /* Cortex-A510 */
/* Cortex-A53 is usually in LITTLE role, but can be in big role w.r.t. Cortex-A35 */
return 2;
case UINT32_C(0x4100D040): /* Cortex-A35 */

View File

@@ -80,28 +80,50 @@ void cpuinfo_arm_decode_vendor_uarch(
case 0xD0B:
*uarch = cpuinfo_uarch_cortex_a76;
break;
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
case 0xD0C:
*uarch = cpuinfo_uarch_neoverse_n1;
break;
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
case 0xD0D:
*uarch = cpuinfo_uarch_cortex_a77;
break;
case 0xD0E: /* Cortex-A76AE */
*uarch = cpuinfo_uarch_cortex_a76;
break;
case 0xD40: /* Neoverse V1 */
*uarch = cpuinfo_uarch_neoverse_v1;
break;
case 0xD41: /* Cortex-A78 */
*uarch = cpuinfo_uarch_cortex_a78;
break;
case 0xD44: /* Cortex-X1 */
*uarch = cpuinfo_uarch_cortex_x1;
break;
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
case 0xD46: /* Cortex-A510 */
*uarch = cpuinfo_uarch_cortex_a510;
break;
case 0xD47: /* Cortex-A710 */
*uarch = cpuinfo_uarch_cortex_a710;
break;
case 0xD48: /* Cortex-X2 */
*uarch = cpuinfo_uarch_cortex_x2;
break;
case 0xD49: /* Neoverse N2 */
*uarch = cpuinfo_uarch_neoverse_n2;
break;
#if CPUINFO_ARCH_ARM64
case 0xD4A:
*uarch = cpuinfo_uarch_neoverse_e1;
break;
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
#endif /* CPUINFO_ARCH_ARM64 */
case 0xD4D: /* Cortex-A715 */
*uarch = cpuinfo_uarch_cortex_a715;
break;
case 0xD4E: /* Cortex-X3 */
*uarch = cpuinfo_uarch_cortex_x3;
break;
case 0xD4F: /* Neoverse V2 */
*uarch = cpuinfo_uarch_neoverse_v2;
break;
default:
switch (midr_get_part(midr) >> 8) {
#if CPUINFO_ARCH_ARM
@@ -129,18 +151,18 @@ void cpuinfo_arm_decode_vendor_uarch(
case 0x100:
*uarch = cpuinfo_uarch_brahma_b53;
break;
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
#if CPUINFO_ARCH_ARM64
case 0x516:
/* Broadcom Vulkan was sold to Cavium before it reached the market, so we identify it as Cavium ThunderX2 */
*vendor = cpuinfo_vendor_cavium;
*uarch = cpuinfo_uarch_thunderx2;
break;
#endif
#endif /* CPUINFO_ARCH_ARM64 */
default:
cpuinfo_log_warning("unknown Broadcom CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
}
break;
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
#if CPUINFO_ARCH_ARM64
case 'C':
*vendor = cpuinfo_vendor_cavium;
switch (midr_get_part(midr)) {
@@ -157,15 +179,15 @@ void cpuinfo_arm_decode_vendor_uarch(
cpuinfo_log_warning("unknown Cavium CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
}
break;
#endif
#endif /* CPUINFO_ARCH_ARM64 */
case 'H':
*vendor = cpuinfo_vendor_huawei;
switch (midr_get_part(midr)) {
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
#if CPUINFO_ARCH_ARM64
case 0xD01: /* Kunpeng 920 series */
*uarch = cpuinfo_uarch_taishan_v110;
break;
#endif
#endif /* CPUINFO_ARCH_ARM64 */
case 0xD40: /* Kirin 980 Big/Medium cores -> Cortex-A76 */
*vendor = cpuinfo_vendor_arm;
*uarch = cpuinfo_uarch_cortex_a76;
@@ -204,7 +226,6 @@ void cpuinfo_arm_decode_vendor_uarch(
cpuinfo_log_warning("unknown Nvidia CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
}
break;
#if !defined(__ANDROID__)
case 'P':
*vendor = cpuinfo_vendor_apm;
switch (midr_get_part(midr)) {
@@ -215,7 +236,6 @@ void cpuinfo_arm_decode_vendor_uarch(
cpuinfo_log_warning("unknown Applied Micro CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
}
break;
#endif
case 'Q':
*vendor = cpuinfo_vendor_qualcomm;
switch (midr_get_part(midr)) {
@@ -282,14 +302,14 @@ void cpuinfo_arm_decode_vendor_uarch(
*vendor = cpuinfo_vendor_arm;
*uarch = cpuinfo_uarch_cortex_a55;
break;
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
#if CPUINFO_ARCH_ARM64
case 0xC00:
*uarch = cpuinfo_uarch_falkor;
break;
case 0xC01:
*uarch = cpuinfo_uarch_saphira;
break;
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
#endif /* CPUINFO_ARCH_ARM64 */
default:
cpuinfo_log_warning("unknown Qualcomm CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
}

View File

@@ -0,0 +1,901 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <errno.h>
#include <sys/types.h>
#include <cpuinfo.h>
#include <cpuinfo/internal-api.h>
#include <cpuinfo/log.h>
#include "windows-arm-init.h"
#define MAX_NR_OF_CACHES (cpuinfo_cache_level_max - 1)
/* Call chain:
* cpu_info_init_by_logical_sys_info
* read_packages_for_processors
* read_cores_for_processors
* read_caches_for_processors
* read_all_logical_processor_info_of_relation
* parse_relation_processor_info
* store_package_info_per_processor
* store_core_info_per_processor
* parse_relation_cache_info
* store_cache_info_per_processor
*/
static uint32_t count_logical_processors(
const uint32_t max_group_count,
uint32_t* global_proc_index_per_group);
static uint32_t read_packages_for_processors(
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info *chip_info);
static uint32_t read_cores_for_processors(
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
const uint32_t* global_proc_index_per_group,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info);
static uint32_t read_caches_for_processors(
struct cpuinfo_processor *processors,
const uint32_t number_of_processors,
struct cpuinfo_cache *caches,
uint32_t* numbers_of_caches,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info *chip_info);
static uint32_t read_all_logical_processor_info_of_relation(
LOGICAL_PROCESSOR_RELATIONSHIP info_type,
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
struct cpuinfo_cache* caches,
uint32_t* numbers_of_caches,
struct cpuinfo_core* cores,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info *chip_info);
static bool parse_relation_processor_info(
struct cpuinfo_processor* processors,
uint32_t nr_of_processors,
const uint32_t* global_proc_index_per_group,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
const uint32_t info_id,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info);
static bool parse_relation_cache_info(
struct cpuinfo_processor* processors,
struct cpuinfo_cache* caches,
uint32_t* numbers_of_caches,
const uint32_t* global_proc_index_per_group,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info);
static void store_package_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
const uint32_t package_id,
const uint32_t group_id,
const uint32_t processor_id_in_group);
static void store_core_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
const uint32_t core_id,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX core_info,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info);
static void store_cache_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
struct cpuinfo_cache* current_cache);
static bool connect_packages_cores_clusters_by_processors(
struct cpuinfo_processor* processors,
const uint32_t nr_of_processors,
struct cpuinfo_package* packages,
const uint32_t nr_of_packages,
struct cpuinfo_cluster* clusters,
struct cpuinfo_core* cores,
const uint32_t nr_of_cores,
const struct woa_chip_info* chip_info,
enum cpuinfo_vendor vendor);
static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity);
bool cpu_info_init_by_logical_sys_info(
const struct woa_chip_info *chip_info,
const enum cpuinfo_vendor vendor)
{
struct cpuinfo_processor* processors = NULL;
struct cpuinfo_package* packages = NULL;
struct cpuinfo_cluster* clusters = NULL;
struct cpuinfo_core* cores = NULL;
struct cpuinfo_cache* caches = NULL;
struct cpuinfo_uarch_info* uarchs = NULL;
uint32_t nr_of_packages = 0;
uint32_t nr_of_cores = 0;
uint32_t nr_of_all_caches = 0;
uint32_t numbers_of_caches[MAX_NR_OF_CACHES] = {0};
uint32_t nr_of_uarchs = 0;
bool result = false;
HANDLE heap = GetProcessHeap();
/* 1. Count available logical processor groups and processors */
const uint32_t max_group_count = (uint32_t) GetMaximumProcessorGroupCount();
cpuinfo_log_debug("detected %"PRIu32" processor group(s)", max_group_count);
/* We need to store the absolute processor ID offsets for every groups, because
* 1. We can't assume every processor groups include the same number of
* logical processors.
* 2. Every processor groups know its group number and processor IDs within
* the group, but not the global processor IDs.
* 3. We need to list every logical processors by global IDs.
*/
uint32_t* global_proc_index_per_group =
(uint32_t*) HeapAlloc(heap, 0, max_group_count * sizeof(uint32_t));
if (global_proc_index_per_group == NULL) {
cpuinfo_log_error(
"failed to allocate %zu bytes for descriptions of %"PRIu32" processor groups",
max_group_count * sizeof(struct cpuinfo_processor), max_group_count);
goto clean_up;
}
uint32_t nr_of_processors =
count_logical_processors(max_group_count, global_proc_index_per_group);
processors = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_processors * sizeof(struct cpuinfo_processor));
if (processors == NULL) {
cpuinfo_log_error(
"failed to allocate %zu bytes for descriptions of %"PRIu32" logical processors",
nr_of_processors * sizeof(struct cpuinfo_processor), nr_of_processors);
goto clean_up;
}
/* 2. Read topology information via MSDN API: packages, cores and caches*/
nr_of_packages = read_packages_for_processors(
processors, nr_of_processors,
global_proc_index_per_group,
chip_info);
if (!nr_of_packages) {
cpuinfo_log_error("error in reading package information");
goto clean_up;
}
cpuinfo_log_debug("detected %"PRIu32" processor package(s)", nr_of_packages);
/* We need the EfficiencyClass to parse uarch from the core information,
* but we need to iterate first to count cores and allocate memory then
* we will iterate again to read and store data to cpuinfo_core structures.
*/
nr_of_cores = read_cores_for_processors(
processors, nr_of_processors,
global_proc_index_per_group, NULL,
chip_info);
if (!nr_of_cores) {
cpuinfo_log_error("error in reading core information");
goto clean_up;
}
cpuinfo_log_debug("detected %"PRIu32" processor core(s)", nr_of_cores);
/* There is no API to read number of caches, so we need to iterate twice on caches:
1. Count all type of caches -> allocate memory
2. Read out cache data and store to allocated memory
*/
nr_of_all_caches = read_caches_for_processors(
processors, nr_of_processors,
caches, numbers_of_caches,
global_proc_index_per_group, chip_info);
if (!nr_of_all_caches) {
cpuinfo_log_error("error in reading cache information");
goto clean_up;
}
cpuinfo_log_debug("detected %"PRIu32" processor cache(s)", nr_of_all_caches);
/* 3. Allocate memory for package, cluster, core and cache structures */
packages = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_packages * sizeof(struct cpuinfo_package));
if (packages == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" physical packages",
nr_of_packages * sizeof(struct cpuinfo_package), nr_of_packages);
goto clean_up;
}
/* We don't have cluster information so we explicitly set clusters to equal to cores. */
clusters = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_cores * sizeof(struct cpuinfo_cluster));
if (clusters == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" core clusters",
nr_of_cores * sizeof(struct cpuinfo_cluster), nr_of_cores);
goto clean_up;
}
cores = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_cores * sizeof(struct cpuinfo_core));
if (cores == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" cores",
nr_of_cores * sizeof(struct cpuinfo_core), nr_of_cores);
goto clean_up;
}
/* We allocate one contiguous cache array for all caches, then use offsets per cache type. */
caches = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_all_caches * sizeof(struct cpuinfo_cache));
if (caches == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" caches",
nr_of_all_caches * sizeof(struct cpuinfo_cache), nr_of_all_caches);
goto clean_up;
}
/* 4.Read missing topology information that can't be saved without counted
* allocate structures in the first round.
*/
nr_of_all_caches = read_caches_for_processors(
processors, nr_of_processors,
caches, numbers_of_caches, global_proc_index_per_group, chip_info);
if (!nr_of_all_caches) {
cpuinfo_log_error("error in reading cache information");
goto clean_up;
}
nr_of_cores = read_cores_for_processors(
processors, nr_of_processors,
global_proc_index_per_group, cores,
chip_info);
if (!nr_of_cores) {
cpuinfo_log_error("error in reading core information");
goto clean_up;
}
/* 5. Now that we read out everything from the system we can, fill the package, cluster
* and core structures respectively.
*/
result = connect_packages_cores_clusters_by_processors(
processors, nr_of_processors,
packages, nr_of_packages,
clusters,
cores, nr_of_cores,
chip_info,
vendor);
if(!result) {
cpuinfo_log_error("error in connecting information");
goto clean_up;
}
/* 6. Count and store uarchs of cores, assuming same uarchs are neighbors */
enum cpuinfo_uarch prev_uarch = cpuinfo_uarch_unknown;
for (uint32_t i = 0; i < nr_of_cores; i++) {
if (prev_uarch != cores[i].uarch) {
nr_of_uarchs++;
prev_uarch = cores[i].uarch;
}
}
uarchs = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_uarchs * sizeof(struct cpuinfo_uarch_info));
if (uarchs == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" uarchs",
nr_of_uarchs * sizeof(struct cpuinfo_uarch_info), nr_of_uarchs);
goto clean_up;
}
prev_uarch = cpuinfo_uarch_unknown;
for (uint32_t i = 0, uarch_index = 0; i < nr_of_cores; i++) {
if (prev_uarch != cores[i].uarch) {
if (i != 0) {
uarch_index++;
}
if (uarch_index >= nr_of_uarchs) {
cpuinfo_log_error("more uarchs detected than reported");
}
prev_uarch = cores[i].uarch;
uarchs[uarch_index].uarch = cores[i].uarch;
uarchs[uarch_index].core_count = 1;
uarchs[uarch_index].processor_count = cores[i].processor_count;
} else if (prev_uarch != cpuinfo_uarch_unknown) {
uarchs[uarch_index].core_count++;
uarchs[uarch_index].processor_count += cores[i].processor_count;
}
}
/* 7. Commit changes */
cpuinfo_processors = processors;
cpuinfo_packages = packages;
cpuinfo_clusters = clusters;
cpuinfo_cores = cores;
cpuinfo_uarchs = uarchs;
cpuinfo_processors_count = nr_of_processors;
cpuinfo_packages_count = nr_of_packages;
cpuinfo_clusters_count = nr_of_cores;
cpuinfo_cores_count = nr_of_cores;
cpuinfo_uarchs_count = nr_of_uarchs;
for (uint32_t i = 0; i < MAX_NR_OF_CACHES; i++) {
cpuinfo_cache_count[i] = numbers_of_caches[i];
}
cpuinfo_cache[cpuinfo_cache_level_1i] = caches;
cpuinfo_cache[cpuinfo_cache_level_1d] = cpuinfo_cache[cpuinfo_cache_level_1i] + cpuinfo_cache_count[cpuinfo_cache_level_1i];
cpuinfo_cache[cpuinfo_cache_level_2] = cpuinfo_cache[cpuinfo_cache_level_1d] + cpuinfo_cache_count[cpuinfo_cache_level_1d];
cpuinfo_cache[cpuinfo_cache_level_3] = cpuinfo_cache[cpuinfo_cache_level_2] + cpuinfo_cache_count[cpuinfo_cache_level_2];
cpuinfo_cache[cpuinfo_cache_level_4] = cpuinfo_cache[cpuinfo_cache_level_3] + cpuinfo_cache_count[cpuinfo_cache_level_3];
cpuinfo_max_cache_size = cpuinfo_compute_max_cache_size(&processors[0]);
result = true;
MemoryBarrier();
processors = NULL;
packages = NULL;
clusters = NULL;
cores = NULL;
caches = NULL;
uarchs = NULL;
clean_up:
/* The propagated pointers, shouldn't be freed, only in case of error
* and unfinished init.
*/
if (processors != NULL) {
HeapFree(heap, 0, processors);
}
if (packages != NULL) {
HeapFree(heap, 0, packages);
}
if (clusters != NULL) {
HeapFree(heap, 0, clusters);
}
if (cores != NULL) {
HeapFree(heap, 0, cores);
}
if (caches != NULL) {
HeapFree(heap, 0, caches);
}
if (uarchs != NULL) {
HeapFree(heap, 0, uarchs);
}
/* Free the locally used temporary pointers */
HeapFree(heap, 0, global_proc_index_per_group);
global_proc_index_per_group = NULL;
return result;
}
static uint32_t count_logical_processors(
const uint32_t max_group_count,
uint32_t* global_proc_index_per_group)
{
uint32_t nr_of_processors = 0;
for (uint32_t i = 0; i < max_group_count; i++) {
uint32_t nr_of_processors_per_group = GetMaximumProcessorCount((WORD) i);
cpuinfo_log_debug("detected %"PRIu32" processor(s) in group %"PRIu32"",
nr_of_processors_per_group, i);
global_proc_index_per_group[i] = nr_of_processors;
nr_of_processors += nr_of_processors_per_group;
}
return nr_of_processors;
}
static uint32_t read_packages_for_processors(
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info *chip_info)
{
return read_all_logical_processor_info_of_relation(
RelationProcessorPackage,
processors,
number_of_processors,
NULL,
NULL,
NULL,
global_proc_index_per_group,
chip_info);
}
uint32_t read_cores_for_processors(
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
const uint32_t* global_proc_index_per_group,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info)
{
return read_all_logical_processor_info_of_relation(
RelationProcessorCore,
processors,
number_of_processors,
NULL,
NULL,
cores,
global_proc_index_per_group,
chip_info);
}
static uint32_t read_caches_for_processors(
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
struct cpuinfo_cache* caches,
uint32_t* numbers_of_caches,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info *chip_info)
{
/* Reset processor start indexes */
if (caches) {
uint32_t cache_offset = 0;
for (uint32_t i = 0; i < MAX_NR_OF_CACHES; i++) {
for (uint32_t j = 0; j < numbers_of_caches[i]; j++) {
caches[cache_offset + j].processor_start = UINT32_MAX;
}
cache_offset += numbers_of_caches[i];
}
}
return read_all_logical_processor_info_of_relation(
RelationCache,
processors,
number_of_processors,
caches,
numbers_of_caches,
NULL,
global_proc_index_per_group,
chip_info);
}
static uint32_t read_all_logical_processor_info_of_relation(
LOGICAL_PROCESSOR_RELATIONSHIP info_type,
struct cpuinfo_processor* processors,
const uint32_t number_of_processors,
struct cpuinfo_cache* caches,
uint32_t* numbers_of_caches,
struct cpuinfo_core* cores,
const uint32_t* global_proc_index_per_group,
const struct woa_chip_info* chip_info)
{
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX infos = NULL;
uint32_t nr_of_structs = 0;
DWORD info_size = 0;
bool result = false;
HANDLE heap = GetProcessHeap();
/* 1. Query the size of the information structure first */
if (GetLogicalProcessorInformationEx(info_type, NULL, &info_size) == FALSE) {
const DWORD last_error = GetLastError();
if (last_error != ERROR_INSUFFICIENT_BUFFER) {
cpuinfo_log_error(
"failed to query size of processor %"PRIu32" information information: error %"PRIu32"",
(uint32_t)info_type, (uint32_t) last_error);
goto clean_up;
}
}
/* 2. Allocate memory for the information structure */
infos = HeapAlloc(heap, 0, info_size);
if (infos == NULL) {
cpuinfo_log_error("failed to allocate %"PRIu32" bytes for logical processor information",
(uint32_t) info_size);
goto clean_up;
}
/* 3. Read the information structure */
if (GetLogicalProcessorInformationEx(info_type, infos, &info_size) == FALSE) {
cpuinfo_log_error("failed to query processor %"PRIu32" information: error %"PRIu32"",
(uint32_t)info_type, (uint32_t) GetLastError());
goto clean_up;
}
/* 4. Parse the structure and store relevant data */
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info_end =
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) ((uintptr_t) infos + info_size);
for (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info = infos;
info < info_end;
info = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) ((uintptr_t) info + info->Size))
{
if (info->Relationship != info_type) {
cpuinfo_log_warning(
"unexpected processor info type (%"PRIu32") for processor information",
(uint32_t) info->Relationship);
continue;
}
const uint32_t info_id = nr_of_structs++;
switch(info_type) {
case RelationProcessorPackage:
result = parse_relation_processor_info(
processors,
number_of_processors,
global_proc_index_per_group,
info,
info_id,
cores,
chip_info);
break;
case RelationProcessorCore:
result = parse_relation_processor_info(
processors,
number_of_processors,
global_proc_index_per_group,
info,
info_id,
cores,
chip_info);
break;
case RelationCache:
result = parse_relation_cache_info(
processors,
caches,
numbers_of_caches,
global_proc_index_per_group,
info);
break;
default:
cpuinfo_log_error(
"unexpected processor info type (%"PRIu32") for processor information",
(uint32_t) info->Relationship);
result = false;
break;
}
if (!result) {
nr_of_structs = 0;
goto clean_up;
}
}
clean_up:
/* 5. Release dynamically allocated info structure. */
HeapFree(heap, 0, infos);
infos = NULL;
return nr_of_structs;
}
static bool parse_relation_processor_info(
struct cpuinfo_processor* processors,
uint32_t nr_of_processors,
const uint32_t* global_proc_index_per_group,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
const uint32_t info_id,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info)
{
for (uint32_t i = 0; i < info->Processor.GroupCount; i++) {
const uint32_t group_id = info->Processor.GroupMask[i].Group;
/* Bitmask representing processors in this group belonging to this package */
KAFFINITY group_processors_mask = info->Processor.GroupMask[i].Mask;
while (group_processors_mask != 0) {
const uint32_t processor_id_in_group =
low_index_from_kaffinity(group_processors_mask);
const uint32_t processor_global_index =
global_proc_index_per_group[group_id] + processor_id_in_group;
if(processor_global_index >= nr_of_processors) {
cpuinfo_log_error("unexpected processor index %"PRIu32"",
processor_global_index);
return false;
}
switch(info->Relationship) {
case RelationProcessorPackage:
store_package_info_per_processor(
processors, processor_global_index, info_id,
group_id, processor_id_in_group);
break;
case RelationProcessorCore:
store_core_info_per_processor(
processors, processor_global_index,
info_id, info,
cores, chip_info);
break;
default:
cpuinfo_log_error(
"unexpected processor info type (%"PRIu32") for processor information",
(uint32_t) info->Relationship);
break;
}
/* Clear the bits in affinity mask, lower the least set bit. */
group_processors_mask &= (group_processors_mask - 1);
}
}
return true;
}
static bool parse_relation_cache_info(
struct cpuinfo_processor* processors,
struct cpuinfo_cache* caches,
uint32_t* numbers_of_caches,
const uint32_t* global_proc_index_per_group,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info)
{
static uint32_t l1i_counter = 0;
static uint32_t l1d_counter = 0;
static uint32_t l2_counter = 0;
static uint32_t l3_counter = 0;
/* Count cache types for allocation at first. */
if (caches == NULL) {
switch(info->Cache.Level) {
case 1:
switch (info->Cache.Type) {
case CacheInstruction:
numbers_of_caches[cpuinfo_cache_level_1i]++;
break;
case CacheData:
numbers_of_caches[cpuinfo_cache_level_1d]++;
break;
case CacheUnified:
break;
case CacheTrace:
break;
default:
break;
}
break;
case 2:
numbers_of_caches[cpuinfo_cache_level_2]++;
break;
case 3:
numbers_of_caches[cpuinfo_cache_level_3]++;
break;
}
return true;
}
struct cpuinfo_cache* l1i_base = caches;
struct cpuinfo_cache* l1d_base = l1i_base + numbers_of_caches[cpuinfo_cache_level_1i];
struct cpuinfo_cache* l2_base = l1d_base + numbers_of_caches[cpuinfo_cache_level_1d];
struct cpuinfo_cache* l3_base = l2_base + numbers_of_caches[cpuinfo_cache_level_2];
cpuinfo_log_debug(
"info->Cache.GroupCount:%"PRIu32", info->Cache.GroupMask:%"PRIu32","
"info->Cache.Level:%"PRIu32", info->Cache.Associativity:%"PRIu32","
"info->Cache.LineSize:%"PRIu32","
"info->Cache.CacheSize:%"PRIu32", info->Cache.Type:%"PRIu32"",
info->Cache.GroupCount, (unsigned int)info->Cache.GroupMask.Mask,
info->Cache.Level, info->Cache.Associativity, info->Cache.LineSize,
info->Cache.CacheSize, info->Cache.Type);
struct cpuinfo_cache* current_cache = NULL;
switch (info->Cache.Level) {
case 1:
switch (info->Cache.Type) {
case CacheInstruction:
current_cache = l1i_base + l1i_counter;
l1i_counter++;
break;
case CacheData:
current_cache = l1d_base + l1d_counter;
l1d_counter++;
break;
case CacheUnified:
break;
case CacheTrace:
break;
default:
break;
}
break;
case 2:
current_cache = l2_base + l2_counter;
l2_counter++;
break;
case 3:
current_cache = l3_base + l3_counter;
l3_counter++;
break;
}
current_cache->size = info->Cache.CacheSize;
current_cache->line_size = info->Cache.LineSize;
current_cache->associativity = info->Cache.Associativity;
/* We don't have partition and set information of caches on Windows,
* so we set partitions to 1 and calculate the expected sets.
*/
current_cache->partitions = 1;
current_cache->sets =
current_cache->size / current_cache->line_size / current_cache->associativity;
if (info->Cache.Type == CacheUnified) {
current_cache->flags = CPUINFO_CACHE_UNIFIED;
}
for (uint32_t i = 0; i < info->Cache.GroupCount; i++) {
/* Zero GroupCount is valid, GroupMask still can store bits set. */
const uint32_t group_id = info->Cache.GroupMasks[i].Group;
/* Bitmask representing processors in this group belonging to this package */
KAFFINITY group_processors_mask = info->Cache.GroupMasks[i].Mask;
while (group_processors_mask != 0) {
const uint32_t processor_id_in_group =
low_index_from_kaffinity(group_processors_mask);
const uint32_t processor_global_index =
global_proc_index_per_group[group_id] + processor_id_in_group;
store_cache_info_per_processor(
processors, processor_global_index,
info, current_cache);
/* Clear the bits in affinity mask, lower the least set bit. */
group_processors_mask &= (group_processors_mask - 1);
}
}
return true;
}
static void store_package_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
const uint32_t package_id,
const uint32_t group_id,
const uint32_t processor_id_in_group)
{
processors[processor_global_index].windows_group_id =
(uint16_t) group_id;
processors[processor_global_index].windows_processor_id =
(uint16_t) processor_id_in_group;
/* As we're counting the number of packages now, we haven't allocated memory for
* cpuinfo_packages yet, so we only set the package pointer's offset now.
*/
processors[processor_global_index].package =
(const struct cpuinfo_package*) NULL + package_id;
}
void store_core_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
const uint32_t core_id,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX core_info,
struct cpuinfo_core* cores,
const struct woa_chip_info *chip_info)
{
if (cores) {
processors[processor_global_index].core = cores + core_id;
cores[core_id].core_id = core_id;
get_core_uarch_for_efficiency(
chip_info->chip_name, core_info->Processor.EfficiencyClass,
&(cores[core_id].uarch), &(cores[core_id].frequency));
/* We don't have cluster information, so we handle it as
* fixed 1 to (cluster / cores).
* Set the cluster offset ID now, as soon as we have the
* cluster base address, we'll set the absolute address.
*/
processors[processor_global_index].cluster =
(const struct cpuinfo_cluster*) NULL + core_id;
}
}
static void store_cache_info_per_processor(
struct cpuinfo_processor* processors,
const uint32_t processor_global_index,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
struct cpuinfo_cache* current_cache)
{
if (current_cache->processor_start > processor_global_index) {
current_cache->processor_start = processor_global_index;
}
current_cache->processor_count++;
switch(info->Cache.Level) {
case 1:
switch (info->Cache.Type) {
case CacheInstruction:
processors[processor_global_index].cache.l1i = current_cache;
break;
case CacheData:
processors[processor_global_index].cache.l1d = current_cache;
break;
case CacheUnified:
break;
case CacheTrace:
break;
default:
break;
}
break;
case 2:
processors[processor_global_index].cache.l2 = current_cache;
break;
case 3:
processors[processor_global_index].cache.l3 = current_cache;
break;
}
}
static bool connect_packages_cores_clusters_by_processors(
struct cpuinfo_processor* processors,
const uint32_t nr_of_processors,
struct cpuinfo_package* packages,
const uint32_t nr_of_packages,
struct cpuinfo_cluster* clusters,
struct cpuinfo_core* cores,
const uint32_t nr_of_cores,
const struct woa_chip_info* chip_info,
enum cpuinfo_vendor vendor)
{
/* Adjust core and package pointers for all logical processors. */
for (uint32_t i = nr_of_processors; i != 0; i--) {
const uint32_t processor_id = i - 1;
struct cpuinfo_processor* processor = processors + processor_id;
struct cpuinfo_core* core = (struct cpuinfo_core*)processor->core;
/* We stored the offset of pointers when we haven't allocated memory
* for packages and clusters, so now add offsets to base addresses.
*/
struct cpuinfo_package* package =
(struct cpuinfo_package*) ((uintptr_t) packages + (uintptr_t) processor->package);
if (package < packages ||
package >= (packages + nr_of_packages)) {
cpuinfo_log_error("invalid package indexing");
return false;
}
processor->package = package;
struct cpuinfo_cluster* cluster =
(struct cpuinfo_cluster*) ((uintptr_t) clusters + (uintptr_t) processor->cluster);
if (cluster < clusters ||
cluster >= (clusters + nr_of_cores)) {
cpuinfo_log_error("invalid cluster indexing");
return false;
}
processor->cluster = cluster;
if (chip_info) {
size_t converted_chars = 0;
if (!WideCharToMultiByte(
CP_UTF8,
WC_ERR_INVALID_CHARS,
chip_info->chip_name_string,
-1,
package->name,
CPUINFO_PACKAGE_NAME_MAX,
NULL,
NULL)) {
cpuinfo_log_error("cpu name character conversion error");
return false;
};
}
/* Set start indexes and counts per packages / clusters / cores - going backwards */
/* This can be overwritten by lower-index processors on the same package. */
package->processor_start = processor_id;
package->processor_count++;
/* This can be overwritten by lower-index processors on the same cluster. */
cluster->processor_start = processor_id;
cluster->processor_count++;
/* This can be overwritten by lower-index processors on the same core. */
core->processor_start = processor_id;
core->processor_count++;
}
/* Fill cores */
for (uint32_t i = nr_of_cores; i != 0; i--) {
const uint32_t global_core_id = i - 1;
struct cpuinfo_core* core = cores + global_core_id;
const struct cpuinfo_processor* processor = processors + core->processor_start;
struct cpuinfo_package* package = (struct cpuinfo_package*) processor->package;
struct cpuinfo_cluster* cluster = (struct cpuinfo_cluster*) processor->cluster;
core->package = package;
core->cluster = cluster;
core->vendor = vendor;
/* This can be overwritten by lower-index cores on the same cluster/package. */
cluster->core_start = global_core_id;
cluster->core_count++;
package->core_start = global_core_id;
package->core_count++;
package->cluster_start = global_core_id;
package->cluster_count = package->core_count;
cluster->package = package;
cluster->vendor = cores[cluster->core_start].vendor;
cluster->uarch = cores[cluster->core_start].uarch;
cluster->frequency = cores[cluster->core_start].frequency;
}
return true;
}
static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity) {
unsigned long index;
_BitScanForward64(&index, (unsigned __int64) kaffinity);
return (uint32_t) index;
}

243
3rdparty/cpuinfo/src/arm/windows/init.c vendored Normal file
View File

@@ -0,0 +1,243 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include <cpuinfo.h>
#include <cpuinfo/internal-api.h>
#include <cpuinfo/log.h>
#include "windows-arm-init.h"
struct cpuinfo_arm_isa cpuinfo_isa;
static void set_cpuinfo_isa_fields(void);
static struct woa_chip_info* get_system_info_from_registry(void);
static struct woa_chip_info woa_chip_unknown = {
L"Unknown",
woa_chip_name_unknown,
{
{
cpuinfo_vendor_unknown,
cpuinfo_uarch_unknown,
0
}
}
};
/* Please add new SoC/chip info here! */
static struct woa_chip_info woa_chips[] = {
/* Microsoft SQ1 Kryo 495 4 + 4 cores (3 GHz + 1.80 GHz) */
{
L"Microsoft SQ1",
woa_chip_name_microsoft_sq_1,
{
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_a55,
1800000000,
},
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_a76,
3000000000,
}
}
},
/* Microsoft SQ2 Kryo 495 4 + 4 cores (3.15 GHz + 2.42 GHz) */
{
L"Microsoft SQ2",
woa_chip_name_microsoft_sq_2,
{
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_a55,
2420000000,
},
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_a76,
3150000000
}
}
},
/* Microsoft Windows Dev Kit 2023 */
{
L"Snapdragon Compute Platform",
woa_chip_name_microsoft_sq_3,
{
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_a78,
2420000000,
},
{
cpuinfo_vendor_arm,
cpuinfo_uarch_cortex_x1,
3000000000
}
}
},
/* Ampere Altra */
{
L"Ampere(R) Altra(R) Processor",
woa_chip_name_ampere_altra,
{
{
cpuinfo_vendor_arm,
cpuinfo_uarch_neoverse_n1,
3000000000
}
}
}
};
BOOL CALLBACK cpuinfo_arm_windows_init(
PINIT_ONCE init_once, PVOID parameter, PVOID* context)
{
struct woa_chip_info *chip_info = NULL;
enum cpuinfo_vendor vendor = cpuinfo_vendor_unknown;
set_cpuinfo_isa_fields();
chip_info = get_system_info_from_registry();
if (chip_info == NULL) {
chip_info = &woa_chip_unknown;
}
cpuinfo_is_initialized = cpu_info_init_by_logical_sys_info(chip_info, chip_info->uarchs[0].vendor);
return true;
}
bool get_core_uarch_for_efficiency(
enum woa_chip_name chip, BYTE EfficiencyClass,
enum cpuinfo_uarch* uarch, uint64_t* frequency)
{
/* For currently supported WoA chips, the Efficiency class selects
* the pre-defined little and big core.
* Any further supported SoC's logic should be implemented here.
*/
if (uarch && frequency && chip < woa_chip_name_last &&
EfficiencyClass < MAX_WOA_VALID_EFFICIENCY_CLASSES) {
*uarch = woa_chips[chip].uarchs[EfficiencyClass].uarch;
*frequency = woa_chips[chip].uarchs[EfficiencyClass].frequency;
return true;
}
return false;
}
/* Static helper functions */
static wchar_t* read_registry(
LPCWSTR subkey,
LPCWSTR value)
{
DWORD key_type = 0;
DWORD data_size = 0;
const DWORD flags = RRF_RT_REG_SZ; /* Only read strings (REG_SZ) */
wchar_t *text_buffer = NULL;
LSTATUS result = 0;
HANDLE heap = GetProcessHeap();
result = RegGetValueW(
HKEY_LOCAL_MACHINE,
subkey,
value,
flags,
&key_type,
NULL, /* Request buffer size */
&data_size);
if (result != 0 || data_size == 0) {
cpuinfo_log_error("Registry entry size read error");
return NULL;
}
text_buffer = HeapAlloc(heap, HEAP_ZERO_MEMORY, data_size);
if (text_buffer == NULL) {
cpuinfo_log_error("Registry textbuffer allocation error");
return NULL;
}
result = RegGetValueW(
HKEY_LOCAL_MACHINE,
subkey,
value,
flags,
NULL,
text_buffer, /* Write string in this destination buffer */
&data_size);
if (result != 0) {
cpuinfo_log_error("Registry read error");
HeapFree(heap, 0, text_buffer);
return NULL;
}
return text_buffer;
}
static struct woa_chip_info* get_system_info_from_registry(void)
{
wchar_t* text_buffer = NULL;
LPCWSTR cpu0_subkey = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
LPCWSTR chip_name_value = L"ProcessorNameString";
struct woa_chip_info* chip_info = NULL;
HANDLE heap = GetProcessHeap();
/* Read processor model name from registry and find in the hard-coded list. */
text_buffer = read_registry(cpu0_subkey, chip_name_value);
if (text_buffer == NULL) {
cpuinfo_log_error("Registry read error");
return NULL;
}
for (uint32_t i = 0; i < (uint32_t) woa_chip_name_last; i++) {
size_t compare_length = wcsnlen(woa_chips[i].chip_name_string, CPUINFO_PACKAGE_NAME_MAX);
int compare_result = wcsncmp(text_buffer, woa_chips[i].chip_name_string, compare_length);
if (compare_result == 0) {
chip_info = woa_chips+i;
break;
}
}
if (chip_info == NULL) {
/* No match was found, so print a warning and assign the unknown case. */
cpuinfo_log_error("Unknown chip model name '%ls'.\nPlease add new Windows on Arm SoC/chip support to arm/windows/init.c!", text_buffer);
} else {
cpuinfo_log_debug("detected chip model name: %s", chip_info->chip_name_string);
}
HeapFree(heap, 0, text_buffer);
return chip_info;
}
static void set_cpuinfo_isa_fields(void)
{
cpuinfo_isa.atomics = IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) != 0;
const bool dotprod = IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.dot = dotprod;
SYSTEM_INFO system_info;
GetSystemInfo(&system_info);
switch (system_info.wProcessorLevel) {
case 0x803: // Kryo 385 Silver (Snapdragon 850)
cpuinfo_isa.fp16arith = dotprod;
cpuinfo_isa.rdm = dotprod;
break;
default:
// Assume that Dot Product support implies FP16 arithmetics and RDM support.
// ARM manuals don't guarantee that, but it holds in practice.
cpuinfo_isa.fp16arith = dotprod;
cpuinfo_isa.rdm = dotprod;
break;
}
/* Windows API reports all or nothing for cryptographic instructions. */
const bool crypto = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.aes = crypto;
cpuinfo_isa.sha1 = crypto;
cpuinfo_isa.sha2 = crypto;
cpuinfo_isa.pmull = crypto;
cpuinfo_isa.crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) != 0;
}

View File

@@ -0,0 +1,38 @@
#pragma once
/* Efficiency class = 0 means little core, while 1 means big core for now. */
#define MAX_WOA_VALID_EFFICIENCY_CLASSES 2
/* List of known and supported Windows on Arm SoCs/chips. */
enum woa_chip_name {
woa_chip_name_microsoft_sq_1 = 0,
woa_chip_name_microsoft_sq_2 = 1,
woa_chip_name_microsoft_sq_3 = 2,
woa_chip_name_ampere_altra = 3,
woa_chip_name_unknown = 4,
woa_chip_name_last = woa_chip_name_unknown
};
/* Topology information hard-coded by SoC/chip name */
struct core_info_by_chip_name {
enum cpuinfo_vendor vendor;
enum cpuinfo_uarch uarch;
uint64_t frequency; /* Hz */
};
/* SoC/chip info that's currently not readable by logical system information,
* but can be read from registry.
*/
struct woa_chip_info {
wchar_t* chip_name_string;
enum woa_chip_name chip_name;
struct core_info_by_chip_name uarchs[MAX_WOA_VALID_EFFICIENCY_CLASSES];
};
bool get_core_uarch_for_efficiency(
enum woa_chip_name chip, BYTE EfficiencyClass,
enum cpuinfo_uarch* uarch, uint64_t* frequency);
bool cpu_info_init_by_logical_sys_info(
const struct woa_chip_info *chip_info,
enum cpuinfo_vendor vendor);

View File

@@ -35,7 +35,7 @@ extern CPUINFO_INTERNAL uint32_t cpuinfo_packages_count;
extern CPUINFO_INTERNAL uint32_t cpuinfo_cache_count[cpuinfo_cache_level_max];
extern CPUINFO_INTERNAL uint32_t cpuinfo_max_cache_size;
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
extern CPUINFO_INTERNAL struct cpuinfo_uarch_info* cpuinfo_uarchs;
extern CPUINFO_INTERNAL uint32_t cpuinfo_uarchs_count;
#else
@@ -51,10 +51,15 @@ extern CPUINFO_INTERNAL uint32_t cpuinfo_max_cache_size;
CPUINFO_PRIVATE void cpuinfo_x86_mach_init(void);
CPUINFO_PRIVATE void cpuinfo_x86_linux_init(void);
#if defined(_WIN32) || defined(__CYGWIN__)
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_x86_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
#if CPUINFO_ARCH_ARM64
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
#else
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_x86_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
#endif
#endif
CPUINFO_PRIVATE void cpuinfo_arm_mach_init(void);
CPUINFO_PRIVATE void cpuinfo_arm_linux_init(void);
CPUINFO_PRIVATE void cpuinfo_riscv_linux_init(void);
CPUINFO_PRIVATE void cpuinfo_emscripten_init(void);
CPUINFO_PRIVATE uint32_t cpuinfo_compute_max_cache_size(const struct cpuinfo_processor* processor);

View File

@@ -1,17 +1,103 @@
#pragma once
#include <inttypes.h>
#include <clog.h>
#define CPUINFO_LOG_DEBUG_PARSERS 0
#include <stdarg.h>
#include <stdlib.h>
#ifndef CPUINFO_LOG_LEVEL
#define CPUINFO_LOG_LEVEL CLOG_ERROR
#error "Undefined CPUINFO_LOG_LEVEL"
#endif
CLOG_DEFINE_LOG_DEBUG(cpuinfo_log_debug, "cpuinfo", CPUINFO_LOG_LEVEL);
CLOG_DEFINE_LOG_INFO(cpuinfo_log_info, "cpuinfo", CPUINFO_LOG_LEVEL);
CLOG_DEFINE_LOG_WARNING(cpuinfo_log_warning, "cpuinfo", CPUINFO_LOG_LEVEL);
CLOG_DEFINE_LOG_ERROR(cpuinfo_log_error, "cpuinfo", CPUINFO_LOG_LEVEL);
CLOG_DEFINE_LOG_FATAL(cpuinfo_log_fatal, "cpuinfo", CPUINFO_LOG_LEVEL);
#define CPUINFO_LOG_NONE 0
#define CPUINFO_LOG_FATAL 1
#define CPUINFO_LOG_ERROR 2
#define CPUINFO_LOG_WARNING 3
#define CPUINFO_LOG_INFO 4
#define CPUINFO_LOG_DEBUG 5
#ifndef CPUINFO_LOG_DEBUG_PARSERS
#define CPUINFO_LOG_DEBUG_PARSERS 0
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
void cpuinfo_vlog_debug(const char* format, va_list args);
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
void cpuinfo_vlog_info(const char* format, va_list args);
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
void cpuinfo_vlog_warning(const char* format, va_list args);
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
void cpuinfo_vlog_error(const char* format, va_list args);
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
void cpuinfo_vlog_fatal(const char* format, va_list args);
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef CPUINFO_LOG_ARGUMENTS_FORMAT
#ifdef __GNUC__
#define CPUINFO_LOG_ARGUMENTS_FORMAT __attribute__((__format__(__printf__, 1, 2)))
#else
#define CPUINFO_LOG_ARGUMENTS_FORMAT
#endif
#endif
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_debug(const char* format, ...) {
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
va_list args;
va_start(args, format);
cpuinfo_vlog_debug(format, args);
va_end(args);
#endif
}
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_info(const char* format, ...) {
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
va_list args;
va_start(args, format);
cpuinfo_vlog_info(format, args);
va_end(args);
#endif
}
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_warning(const char* format, ...) {
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
va_list args;
va_start(args, format);
cpuinfo_vlog_warning(format, args);
va_end(args);
#endif
}
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_error(const char* format, ...) {
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
va_list args;
va_start(args, format);
cpuinfo_vlog_error(format, args);
va_end(args);
#endif
}
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_fatal(const char* format, ...) {
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
va_list args;
va_start(args, format);
cpuinfo_vlog_fatal(format, args);
va_end(args);
#endif
abort();
}

View File

@@ -1,5 +1,8 @@
#pragma once
#ifdef _MSC_VER
#include <intrin.h>
#endif
#include <stdint.h>

View File

@@ -37,6 +37,14 @@ bool CPUINFO_ABI cpuinfo_initialize(void) {
pthread_once(&init_guard, &cpuinfo_arm_linux_init);
#elif defined(__MACH__) && defined(__APPLE__)
pthread_once(&init_guard, &cpuinfo_arm_mach_init);
#elif defined(_WIN32)
InitOnceExecuteOnce(&init_guard, &cpuinfo_arm_windows_init, NULL, NULL);
#else
cpuinfo_log_error("operating system is not supported in cpuinfo");
#endif
#elif CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
#if defined(__linux__)
pthread_once(&init_guard, &cpuinfo_riscv_linux_init);
#else
cpuinfo_log_error("operating system is not supported in cpuinfo");
#endif

View File

@@ -21,7 +21,8 @@
#define CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER UINT32_C(0x00000400)
#define CPUINFO_LINUX_FLAG_PROC_CPUINFO UINT32_C(0x00000800)
#define CPUINFO_LINUX_FLAG_VALID UINT32_C(0x00001000)
#define CPUINFO_LINUX_FLAG_CUR_FREQUENCY UINT32_C(0x00002000)
#define CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER UINT32_C(0x00004000)
typedef bool (*cpuinfo_cpulist_callback)(uint32_t, uint32_t, void*);
CPUINFO_INTERNAL bool cpuinfo_linux_parse_cpulist(const char* filename, cpuinfo_cpulist_callback callback, void* context);
@@ -33,6 +34,7 @@ CPUINFO_INTERNAL bool cpuinfo_linux_parse_multiline_file(const char* filename, s
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_processors_count(void);
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_possible_processor(uint32_t max_processors_count);
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_present_processor(uint32_t max_processors_count);
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_cur_frequency(uint32_t processor);
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_min_frequency(uint32_t processor);
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_max_frequency(uint32_t processor);
CPUINFO_INTERNAL bool cpuinfo_linux_get_processor_package_id(uint32_t processor, uint32_t package_id[restrict static 1]);
@@ -54,6 +56,21 @@ CPUINFO_INTERNAL bool cpuinfo_linux_detect_thread_siblings(
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context);
CPUINFO_INTERNAL bool cpuinfo_linux_detect_cluster_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context);
CPUINFO_INTERNAL bool cpuinfo_linux_detect_core_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context);
CPUINFO_INTERNAL bool cpuinfo_linux_detect_package_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context);
extern CPUINFO_INTERNAL const struct cpuinfo_processor** cpuinfo_linux_cpu_to_processor_map;
extern CPUINFO_INTERNAL const struct cpuinfo_core** cpuinfo_linux_cpu_to_core_map;

View File

@@ -21,6 +21,7 @@
#define KERNEL_MAX_FILENAME "/sys/devices/system/cpu/kernel_max"
#define KERNEL_MAX_FILESIZE 32
#define FREQUENCY_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/cpufreq/cpuinfo_max_freq"))
#define CUR_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_cur_freq"
#define MAX_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_max_freq"
#define MIN_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_min_freq"
#define FREQUENCY_FILESIZE 32
@@ -31,8 +32,14 @@
#define CORE_ID_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_id"
#define CORE_ID_FILESIZE 32
#define CORE_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/core_cpus_list"))
#define CORE_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_cpus_list"
#define CORE_SIBLINGS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/core_siblings_list"))
#define CORE_SIBLINGS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_siblings_list"
#define CLUSTER_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/cluster_cpus_list"))
#define CLUSTER_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/cluster_cpus_list"
#define PACKAGE_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/package_cpus_list"))
#define PACKAGE_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/package_cpus_list"
#define THREAD_SIBLINGS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/thread_siblings_list"))
#define THREAD_SIBLINGS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/thread_siblings_list"
@@ -125,6 +132,27 @@ uint32_t cpuinfo_linux_get_max_processors_count(void) {
}
}
uint32_t cpuinfo_linux_get_processor_cur_frequency(uint32_t processor) {
char cur_frequency_filename[FREQUENCY_FILENAME_SIZE];
const int chars_formatted = snprintf(
cur_frequency_filename, FREQUENCY_FILENAME_SIZE, CUR_FREQUENCY_FILENAME_FORMAT, processor);
if ((unsigned int) chars_formatted >= FREQUENCY_FILENAME_SIZE) {
cpuinfo_log_warning("failed to format filename for current frequency of processor %"PRIu32, processor);
return 0;
}
uint32_t cur_frequency;
if (cpuinfo_linux_parse_small_file(cur_frequency_filename, FREQUENCY_FILESIZE, uint32_parser, &cur_frequency)) {
cpuinfo_log_debug("parsed currrent frequency value of %"PRIu32" KHz for logical processor %"PRIu32" from %s",
cur_frequency, processor, cur_frequency_filename);
return cur_frequency;
} else {
cpuinfo_log_warning("failed to parse current frequency for processor %"PRIu32" from %s",
processor, cur_frequency_filename);
return 0;
}
}
uint32_t cpuinfo_linux_get_processor_max_frequency(uint32_t processor) {
char max_frequency_filename[FREQUENCY_FILENAME_SIZE];
const int chars_formatted = snprintf(
@@ -285,8 +313,7 @@ static bool detect_processor_parser(uint32_t processor_list_start, uint32_t proc
}
bool cpuinfo_linux_detect_possible_processors(uint32_t max_processors_count,
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t possible_flag)
{
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t possible_flag) {
struct detect_processors_context context = {
.max_processors_count = max_processors_count,
.processor0_flags = processor0_flags,
@@ -302,8 +329,7 @@ bool cpuinfo_linux_detect_possible_processors(uint32_t max_processors_count,
}
bool cpuinfo_linux_detect_present_processors(uint32_t max_processors_count,
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t present_flag)
{
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t present_flag) {
struct detect_processors_context context = {
.max_processors_count = max_processors_count,
.processor0_flags = processor0_flags,
@@ -340,12 +366,41 @@ static bool siblings_parser(uint32_t sibling_list_start, uint32_t sibling_list_e
return context->callback(processor, sibling_list_start, sibling_list_end, context->callback_context);
}
bool cpuinfo_linux_detect_core_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context) {
char core_cpus_filename[CORE_CPUS_FILENAME_SIZE];
const int chars_formatted = snprintf(
core_cpus_filename, CORE_CPUS_FILENAME_SIZE, CORE_CPUS_FILENAME_FORMAT, processor);
if ((unsigned int) chars_formatted >= CORE_CPUS_FILENAME_SIZE) {
cpuinfo_log_warning("failed to format filename for core cpus of processor %"PRIu32, processor);
return false;
}
struct siblings_context siblings_context = {
.group_name = "cpus",
.max_processors_count = max_processors_count,
.processor = processor,
.callback = callback,
.callback_context = context,
};
if (cpuinfo_linux_parse_cpulist(core_cpus_filename,
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
return true;
} else {
cpuinfo_log_info("failed to parse the list of core cpus for processor %"PRIu32" from %s",
processor, core_cpus_filename);
return false;
}
}
bool cpuinfo_linux_detect_core_siblings(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context)
{
void* context) {
char core_siblings_filename[CORE_SIBLINGS_FILENAME_SIZE];
const int chars_formatted = snprintf(
core_siblings_filename, CORE_SIBLINGS_FILENAME_SIZE, CORE_SIBLINGS_FILENAME_FORMAT, processor);
@@ -362,8 +417,7 @@ bool cpuinfo_linux_detect_core_siblings(
.callback_context = context,
};
if (cpuinfo_linux_parse_cpulist(core_siblings_filename,
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context))
{
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
return true;
} else {
cpuinfo_log_info("failed to parse the list of core siblings for processor %"PRIu32" from %s",
@@ -376,8 +430,7 @@ bool cpuinfo_linux_detect_thread_siblings(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context)
{
void* context) {
char thread_siblings_filename[THREAD_SIBLINGS_FILENAME_SIZE];
const int chars_formatted = snprintf(
thread_siblings_filename, THREAD_SIBLINGS_FILENAME_SIZE, THREAD_SIBLINGS_FILENAME_FORMAT, processor);
@@ -394,8 +447,7 @@ bool cpuinfo_linux_detect_thread_siblings(
.callback_context = context,
};
if (cpuinfo_linux_parse_cpulist(thread_siblings_filename,
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context))
{
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
return true;
} else {
cpuinfo_log_info("failed to parse the list of thread siblings for processor %"PRIu32" from %s",
@@ -404,3 +456,62 @@ bool cpuinfo_linux_detect_thread_siblings(
}
}
bool cpuinfo_linux_detect_cluster_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context) {
char cluster_cpus_filename[CLUSTER_CPUS_FILENAME_SIZE];
const int chars_formatted = snprintf(
cluster_cpus_filename, CLUSTER_CPUS_FILENAME_SIZE, CLUSTER_CPUS_FILENAME_FORMAT, processor);
if ((unsigned int) chars_formatted >= CLUSTER_CPUS_FILENAME_SIZE) {
cpuinfo_log_warning("failed to format filename for cluster cpus of processor %"PRIu32, processor);
return false;
}
struct siblings_context siblings_context = {
.group_name = "cluster",
.max_processors_count = max_processors_count,
.processor = processor,
.callback = callback,
.callback_context = context,
};
if (cpuinfo_linux_parse_cpulist(cluster_cpus_filename,
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
return true;
} else {
cpuinfo_log_info("failed to parse the list of cluster cpus for processor %"PRIu32" from %s",
processor, cluster_cpus_filename);
return false;
}
}
bool cpuinfo_linux_detect_package_cpus(
uint32_t max_processors_count,
uint32_t processor,
cpuinfo_siblings_callback callback,
void* context) {
char package_cpus_filename[PACKAGE_CPUS_FILENAME_SIZE];
const int chars_formatted = snprintf(
package_cpus_filename, PACKAGE_CPUS_FILENAME_SIZE, PACKAGE_CPUS_FILENAME_FORMAT, processor);
if ((unsigned int) chars_formatted >= PACKAGE_CPUS_FILENAME_SIZE) {
cpuinfo_log_warning("failed to format filename for package cpus of processor %"PRIu32, processor);
return false;
}
struct siblings_context siblings_context = {
.group_name = "package",
.max_processors_count = max_processors_count,
.processor = processor,
.callback = callback,
.callback_context = context,
};
if (cpuinfo_linux_parse_cpulist(package_cpus_filename,
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
return true;
} else {
cpuinfo_log_info("failed to parse the list of package cpus for processor %"PRIu32" from %s",
processor, package_cpus_filename);
return false;
}
}

192
3rdparty/cpuinfo/src/log.c vendored Normal file
View File

@@ -0,0 +1,192 @@
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#if defined(__ANDROID__)
#include <android/log.h>
#endif
#if defined(__hexagon__)
#include <qurt_printf.h>
#endif
#ifndef CPUINFO_LOG_TO_STDIO
#if defined(__ANDROID__)
#define CPUINFO_LOG_TO_STDIO 0
#else
#define CPUINFO_LOG_TO_STDIO 1
#endif
#endif
#include <cpuinfo/log.h>
/* Messages up to this size are formatted entirely on-stack, and don't allocate heap memory */
#define CPUINFO_LOG_STACK_BUFFER_SIZE 1024
#ifdef _WIN32
#define CPUINFO_LOG_NEWLINE_LENGTH 2
#define CPUINFO_LOG_STDERR STD_ERROR_HANDLE
#define CPUINFO_LOG_STDOUT STD_OUTPUT_HANDLE
#elif defined(__hexagon__)
#define CPUINFO_LOG_NEWLINE_LENGTH 1
#define CPUINFO_LOG_STDERR 0
#define CPUINFO_LOG_STDOUT 0
#else
#define CPUINFO_LOG_NEWLINE_LENGTH 1
#define CPUINFO_LOG_STDERR STDERR_FILENO
#define CPUINFO_LOG_STDOUT STDOUT_FILENO
#endif
#if CPUINFO_LOG_TO_STDIO
static void cpuinfo_vlog(int output_handle, const char* prefix, size_t prefix_length, const char* format, va_list args) {
char stack_buffer[CPUINFO_LOG_STACK_BUFFER_SIZE];
char* heap_buffer = NULL;
char* out_buffer = &stack_buffer[0];
/* The first call to vsnprintf will clobber args, thus need a copy in case a second vsnprintf call is needed */
va_list args_copy;
va_copy(args_copy, args);
memcpy(stack_buffer, prefix, prefix_length * sizeof(char));
assert((prefix_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char) <= CPUINFO_LOG_STACK_BUFFER_SIZE);
const int format_chars = vsnprintf(
&stack_buffer[prefix_length],
CPUINFO_LOG_STACK_BUFFER_SIZE - (prefix_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char),
format,
args);
if (format_chars < 0) {
/* Format error in the message: silently ignore this particular message. */
goto cleanup;
}
const size_t format_length = (size_t) format_chars;
if ((prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char) > CPUINFO_LOG_STACK_BUFFER_SIZE) {
/* Allocate a buffer on heap, and vsnprintf to this buffer */
const size_t heap_buffer_size = (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char);
#if _WIN32
heap_buffer = HeapAlloc(GetProcessHeap(), 0, heap_buffer_size);
#else
heap_buffer = malloc(heap_buffer_size);
#endif
if (heap_buffer == NULL) {
goto cleanup;
}
/* Copy pre-formatted prefix into the on-heap buffer */
memcpy(heap_buffer, prefix, prefix_length * sizeof(char));
vsnprintf(&heap_buffer[prefix_length], (format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char), format, args_copy);
out_buffer = heap_buffer;
}
#ifdef _WIN32
out_buffer[prefix_length + format_length] = '\r';
out_buffer[prefix_length + format_length + 1] = '\n';
DWORD bytes_written;
WriteFile(
GetStdHandle((DWORD) output_handle),
out_buffer, (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char),
&bytes_written, NULL);
#elif defined(__hexagon__)
qurt_printf("%s", out_buffer);
#else
out_buffer[prefix_length + format_length] = '\n';
ssize_t bytes_written = write(output_handle, out_buffer, (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char));
(void) bytes_written;
#endif
cleanup:
#ifdef _WIN32
HeapFree(GetProcessHeap(), 0, heap_buffer);
#else
free(heap_buffer);
#endif
va_end(args_copy);
}
#elif defined(__ANDROID__) && CPUINFO_LOG_LEVEL > CPUINFO_LOG_NONE
static const char cpuinfo_module[] = "XNNPACK";
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
void cpuinfo_vlog_debug(const char* format, va_list args) {
#if CPUINFO_LOG_TO_STDIO
static const char debug_prefix[17] = {
'D', 'e', 'b', 'u', 'g', ' ', '(', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ')', ':', ' '
};
cpuinfo_vlog(CPUINFO_LOG_STDOUT, debug_prefix, 17, format, args);
#elif defined(__ANDROID__)
__android_log_vprint(ANDROID_LOG_DEBUG, cpuinfo_module, format, args);
#else
#error "Platform-specific implementation required"
#endif
}
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
void cpuinfo_vlog_info(const char* format, va_list args) {
#if CPUINFO_LOG_TO_STDIO
static const char info_prefix[16] = {
'N', 'o', 't', 'e', ' ', '(', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ')', ':', ' '
};
cpuinfo_vlog(CPUINFO_LOG_STDOUT, info_prefix, 16, format, args);
#elif defined(__ANDROID__)
__android_log_vprint(ANDROID_LOG_INFO, cpuinfo_module, format, args);
#else
#error "Platform-specific implementation required"
#endif
}
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
void cpuinfo_vlog_warning(const char* format, va_list args) {
#if CPUINFO_LOG_TO_STDIO
static const char warning_prefix[20] = {
'W', 'a', 'r', 'n', 'i', 'n', 'g', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
};
cpuinfo_vlog(CPUINFO_LOG_STDERR, warning_prefix, 20, format, args);
#elif defined(__ANDROID__)
__android_log_vprint(ANDROID_LOG_WARN, cpuinfo_module, format, args);
#else
#error "Platform-specific implementation required"
#endif
}
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
void cpuinfo_vlog_error(const char* format, va_list args) {
#if CPUINFO_LOG_TO_STDIO
static const char error_prefix[18] = {
'E', 'r', 'r', 'o', 'r', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
};
cpuinfo_vlog(CPUINFO_LOG_STDERR, error_prefix, 18, format, args);
#elif defined(__ANDROID__)
__android_log_vprint(ANDROID_LOG_ERROR, cpuinfo_module, format, args);
#else
#error "Platform-specific implementation required"
#endif
}
#endif
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
void cpuinfo_vlog_fatal(const char* format, va_list args) {
#if CPUINFO_LOG_TO_STDIO
static const char fatal_prefix[24] = {
'F', 'a', 't', 'a', 'l', ' ', 'e', 'r', 'r', 'o', 'r', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
};
cpuinfo_vlog(CPUINFO_LOG_STDERR, fatal_prefix, 24, format, args);
#elif defined(__ANDROID__)
__android_log_vprint(ANDROID_LOG_FATAL, cpuinfo_module, format, args);
#else
#error "Platform-specific implementation required"
#endif
}
#endif

42
3rdparty/cpuinfo/src/riscv/api.h vendored Normal file
View File

@@ -0,0 +1,42 @@
#pragma once
#include <stdint.h>
#include <cpuinfo.h>
#include <cpuinfo/common.h>
/* RISC-V Vendor IDs. */
enum cpuinfo_riscv_chipset_vendor {
cpuinfo_riscv_chipset_vendor_unknown = 0,
cpuinfo_riscv_chipset_sifive = 0x489,
cpuinfo_riscv_chipset_vendor_max,
};
/* RISC-V Architecture IDs. */
enum cpuinfo_riscv_chipset_arch {
cpuinfo_riscv_chipset_arch_unknown = 0,
cpuinfo_riscv_chipset_arch_max,
};
/* RISC-V Implementation IDs. */
enum cpuinfo_riscv_chipset_impl {
cpuinfo_riscv_chipset_impl_unknown = 0,
cpuinfo_riscv_chipset_impl_max,
};
/**
* Decodes the vendor and micro-architecture based on the provided input
* parameters, regardless of underlying operating system.
*
* @param[vendor_id]: The 'mvendorid' as described by the RISC-V Manual.
* @param[arch_id]: The 'marchid' as described by the RISC-V Manual.
* @param[imp_id]: The 'mimplid' as described by the RISC-V Manual.
* @param[vendor] - Reference to the cpuinfo_vendor to populate.
* @param[uarch] - Reference to the cpuinfo_uarch to populate.
*/
CPUINFO_INTERNAL void cpuinfo_riscv_decode_vendor_uarch(
uint32_t vendor_id,
uint32_t arch_id,
uint32_t imp_id,
enum cpuinfo_vendor vendor[restrict static 1],
enum cpuinfo_uarch uarch[restrict static 1]);

69
3rdparty/cpuinfo/src/riscv/linux/api.h vendored Normal file
View File

@@ -0,0 +1,69 @@
#pragma once
#include <cpuinfo.h>
#include <cpuinfo/common.h>
/**
* Definition of a RISC-V Linux processor. It is composed of the base processor
* definition in "include/cpuinfo.h" and flags specific to RISC-V Linux
* implementations.
*/
struct cpuinfo_riscv_linux_processor {
/* Public ABI cpuinfo structures. */
struct cpuinfo_processor processor;
struct cpuinfo_core core;
struct cpuinfo_cluster cluster;
struct cpuinfo_package package;
/**
* Linux-specific flags for the logical processor:
* - Bit field that can be masked with CPUINFO_LINUX_FLAG_*.
*/
uint32_t flags;
/**
* Minimum processor ID on the cluster which includes this logical processor.
* This value can serve as an ID for the cluster of logical processors: it is the
* same for all logical processors on the same package.
*/
uint32_t cluster_leader_id;
/**
* Minimum processor ID on the core which includes this logical processor.
* This value can serve as an ID for the core of logical processors: it
* is the same for all logical processors on the same core.
*/
uint32_t core_leader_id;
/**
* Minimum processor ID on the package which includes this logical processor.
* This value can serve as an ID for the package of logical processors: it
* is the same for all logical processors on the same package.
*/
uint32_t package_leader_id;
};
/**
* Reads AT_HWCAP from `getauxval` and populates the cpuinfo_riscv_isa
* structure.
*
* @param[isa] - Reference to cpuinfo_riscv_isa structure to populate.
*/
CPUINFO_INTERNAL void cpuinfo_riscv_linux_decode_isa_from_hwcap(
struct cpuinfo_riscv_isa isa[restrict static 1]);
/**
* Reads `sys_riscv_hwprobe` and determines the processor vendor and
* micro-architecture.
*
* @param[processor] - The Linux ID of the target processor.
* @param[vendor] - Reference to the cpuinfo_vendor to populate.
* @param[uarch] - Reference to the cpuinfo_uarch to populate.
*/
CPUINFO_INTERNAL void cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
uint32_t processor,
enum cpuinfo_vendor vendor[restrict static 1],
enum cpuinfo_uarch uarch[restrict static 1]);
/* Used to determine which uarch is associated with the current thread. */
extern CPUINFO_INTERNAL const uint32_t* cpuinfo_linux_cpu_to_uarch_index_map;

620
3rdparty/cpuinfo/src/riscv/linux/init.c vendored Normal file
View File

@@ -0,0 +1,620 @@
#include <string.h>
#include <cpuinfo/internal-api.h>
#include <cpuinfo/log.h>
#include <linux/api.h>
#include <riscv/linux/api.h>
/* ISA structure to hold supported extensions. */
struct cpuinfo_riscv_isa cpuinfo_isa;
/* Helper function to bitmask flags and ensure operator precedence. */
static inline bool bitmask_all(uint32_t flags, uint32_t mask) {
return (flags & mask) == mask;
}
static int compare_riscv_linux_processors(const void* a, const void* b) {
/**
* For our purposes, it is only relevant that the list is sorted by
* micro-architecture, so the nature of ordering is irrelevant.
*/
return ((const struct cpuinfo_riscv_linux_processor*)a)->core.uarch
- ((const struct cpuinfo_riscv_linux_processor*)b)->core.uarch;
}
/**
* Parses the core cpus list for each processor. This function is called once
* per-processor, with the IDs of all other processors in the core list.
*
* The 'processor_[start|count]' are populated in the processor's 'core'
* attribute, with 'start' being the smallest ID in the core list.
*
* The 'core_leader_id' of each processor is set to the smallest ID in it's
* cluster CPU list.
*
* Precondition: The element in the 'processors' list must be initialized with
* their 'core_leader_id' to their index in the list.
* E.g. processors[0].core_leader_id = 0.
*/
static bool core_cpus_parser(uint32_t processor,
uint32_t core_cpus_start,
uint32_t core_cpus_end,
struct cpuinfo_riscv_linux_processor* processors) {
uint32_t processor_start = UINT32_MAX;
uint32_t processor_count = 0;
/* If the processor already has a leader, use it. */
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CORE_CLUSTER)) {
processor_start = processors[processor].core_leader_id;
}
for (size_t core_cpu = core_cpus_start; core_cpu < core_cpus_end; core_cpu++) {
if (!bitmask_all(processors[core_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/**
* The first valid processor observed is the smallest ID in the
* list that attaches to this core.
*/
if (processor_start == UINT32_MAX) {
processor_start = core_cpu;
}
processors[core_cpu].core_leader_id = processor_start;
processor_count++;
}
/**
* If the cluster flag has not been set, assign the processor start. If
* it has been set, only apply the processor start if it's less than the
* held value. This can happen if the callback is invoked twice:
*
* e.g. core_cpu_list=1,10-12
*/
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CORE_CLUSTER)
|| processors[processor].core.processor_start > processor_start) {
processors[processor].core.processor_start = processor_start;
processors[processor].core_leader_id = processor_start;
}
processors[processor].core.processor_count += processor_count;
processors[processor].flags |= CPUINFO_LINUX_FLAG_CORE_CLUSTER;
/* The parser has failed only if no processors were found. */
return processor_count != 0;
}
/**
* Parses the cluster cpu list for each processor. This function is called once
* per-processor, with the IDs of all other processors in the cluster.
*
* The 'cluster_leader_id' of each processor is set to the smallest ID in it's
* cluster CPU list.
*
* Precondition: The element in the 'processors' list must be initialized with
* their 'cluster_leader_id' to their index in the list.
* E.g. processors[0].cluster_leader_id = 0.
*/
static bool cluster_cpus_parser(uint32_t processor,
uint32_t cluster_cpus_start,
uint32_t cluster_cpus_end,
struct cpuinfo_riscv_linux_processor* processors) {
uint32_t processor_start = UINT32_MAX;
uint32_t processor_count = 0;
uint32_t core_count = 0;
/* If the processor already has a leader, use it. */
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER)) {
processor_start = processors[processor].cluster_leader_id;
}
for (size_t cluster_cpu = cluster_cpus_start; cluster_cpu < cluster_cpus_end; cluster_cpu++) {
if (!bitmask_all(processors[cluster_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/**
* The first valid processor observed is the smallest ID in the
* list that attaches to this core.
*/
if (processor_start == UINT32_MAX) {
processor_start = cluster_cpu;
}
processors[cluster_cpu].cluster_leader_id = processor_start;
processor_count++;
/**
* A processor should only represent it's core if it is the
* assigned leader of that core.
*/
if (processors[cluster_cpu].core_leader_id == cluster_cpu) {
core_count++;
}
}
/**
* If the cluster flag has not been set, assign the processor start. If
* it has been set, only apply the processor start if it's less than the
* held value. This can happen if the callback is invoked twice:
*
* e.g. cluster_cpus_list=1,10-12
*/
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER)
|| processors[processor].cluster.processor_start > processor_start) {
processors[processor].cluster.processor_start = processor_start;
processors[processor].cluster.core_start = processor_start;
processors[processor].cluster.cluster_id = processor_start;
processors[processor].cluster_leader_id = processor_start;
}
processors[processor].cluster.processor_count += processor_count;
processors[processor].cluster.core_count += core_count;
processors[processor].flags |= CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER;
return true;
}
/**
* Parses the package cpus list for each processor. This function is called once
* per-processor, with the IDs of all other processors in the package list.
*
* The 'processor_[start|count]' are populated in the processor's 'package'
* attribute, with 'start' being the smallest ID in the package list.
*
* The 'package_leader_id' of each processor is set to the smallest ID in it's
* cluster CPU list.
*
* Precondition: The element in the 'processors' list must be initialized with
* their 'package_leader_id' to their index in the list.
* E.g. processors[0].package_leader_id = 0.
*/
static bool package_cpus_parser(uint32_t processor,
uint32_t package_cpus_start,
uint32_t package_cpus_end,
struct cpuinfo_riscv_linux_processor* processors) {
uint32_t processor_start = UINT32_MAX;
uint32_t processor_count = 0;
uint32_t cluster_count = 0;
uint32_t core_count = 0;
/* If the processor already has a leader, use it. */
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER)) {
processor_start = processors[processor].package_leader_id;
}
for (size_t package_cpu = package_cpus_start; package_cpu < package_cpus_end; package_cpu++) {
if (!bitmask_all(processors[package_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/**
* The first valid processor observed is the smallest ID in the
* list that attaches to this package.
*/
if (processor_start == UINT32_MAX) {
processor_start = package_cpu;
}
processors[package_cpu].package_leader_id = processor_start;
processor_count++;
/**
* A processor should only represent it's core if it is the
* assigned leader of that core, and similarly for it's cluster.
*/
if (processors[package_cpu].cluster_leader_id == package_cpu) {
cluster_count++;
}
if (processors[package_cpu].core_leader_id == package_cpu) {
core_count++;
}
}
/**
* If the cluster flag has not been set, assign the processor start. If
* it has been set, only apply the processor start if it's less than the
* held value. This can happen if the callback is invoked twice:
*
* e.g. package_cpus_list=1,10-12
*/
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER)
|| processors[processor].package.processor_start > processor_start) {
processors[processor].package.processor_start = processor_start;
processors[processor].package.cluster_start = processor_start;
processors[processor].package.core_start = processor_start;
processors[processor].package_leader_id = processor_start;
}
processors[processor].package.processor_count += processor_count;
processors[processor].package.cluster_count += cluster_count;
processors[processor].package.core_count += core_count;
processors[processor].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
return true;
}
/* Initialization for the RISC-V Linux system. */
void cpuinfo_riscv_linux_init(void) {
struct cpuinfo_riscv_linux_processor* riscv_linux_processors = NULL;
struct cpuinfo_processor* processors = NULL;
struct cpuinfo_package* packages = NULL;
struct cpuinfo_cluster* clusters = NULL;
struct cpuinfo_core* cores = NULL;
struct cpuinfo_uarch_info* uarchs = NULL;
const struct cpuinfo_processor** linux_cpu_to_processor_map = NULL;
const struct cpuinfo_core** linux_cpu_to_core_map = NULL;
uint32_t* linux_cpu_to_uarch_index_map = NULL;
/**
* The interesting set of processors are the number of 'present'
* processors on the system. There may be more 'possible' processors, but
* processor information cannot be gathered on non-present processors.
*
* Note: For SoCs, it is largely the case that all processors are known
* at boot and no processors are hotplugged at runtime, so the
* 'present' and 'possible' list is often the same.
*
* Note: This computes the maximum processor ID of the 'present'
* processors. It is not a count of the number of processors on the
* system.
*/
const uint32_t max_processor_id = 1 +
cpuinfo_linux_get_max_present_processor(
cpuinfo_linux_get_max_processors_count());
if (max_processor_id == 0) {
cpuinfo_log_error("failed to discover any processors");
return;
}
/**
* Allocate space to store all processor information. This array is
* sized to the max processor ID as opposed to the number of 'present'
* processors, to leverage pointer math in the common utility functions.
*/
riscv_linux_processors = calloc(max_processor_id,
sizeof(struct cpuinfo_riscv_linux_processor));
if (riscv_linux_processors == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" processors.",
max_processor_id * sizeof(struct cpuinfo_riscv_linux_processor),
max_processor_id);
goto cleanup;
}
/**
* Attempt to detect all processors and apply the corresponding flag to
* each processor struct that we find.
*/
if (!cpuinfo_linux_detect_present_processors(max_processor_id,
&riscv_linux_processors->flags,
sizeof(struct cpuinfo_riscv_linux_processor),
CPUINFO_LINUX_FLAG_PRESENT | CPUINFO_LINUX_FLAG_VALID)) {
cpuinfo_log_error("failed to detect present processors");
goto cleanup;
}
/* Populate processor information. */
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/* TODO: Determine if an 'smt_id' is available. */
riscv_linux_processors[processor].processor.linux_id = processor;
}
/* Populate core information. */
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/* Populate processor start and count information. */
if (!cpuinfo_linux_detect_core_cpus(
max_processor_id,
processor,
(cpuinfo_siblings_callback) core_cpus_parser,
riscv_linux_processors)) {
cpuinfo_log_error("failed to detect core cpus for processor %zu.", processor);
goto cleanup;
}
/* Populate core ID information. */
if (cpuinfo_linux_get_processor_core_id(
processor,
&riscv_linux_processors[processor].core.core_id)) {
riscv_linux_processors[processor].flags |= CPUINFO_LINUX_FLAG_CORE_ID;
}
/**
* Populate the vendor and uarch of this core from this
* processor. When the final 'cores' list is constructed, only
* the values from the core leader will be honored.
*/
cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
processor,
&riscv_linux_processors[processor].core.vendor,
&riscv_linux_processors[processor].core.uarch);
/* Populate frequency information of this core. */
uint32_t frequency = cpuinfo_linux_get_processor_cur_frequency(processor);
if (frequency != 0) {
riscv_linux_processors[processor].core.frequency = frequency;
riscv_linux_processors[processor].flags |= CPUINFO_LINUX_FLAG_CUR_FREQUENCY;
}
}
/* Populate cluster information. */
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
if (!cpuinfo_linux_detect_cluster_cpus(
max_processor_id,
processor,
(cpuinfo_siblings_callback) cluster_cpus_parser,
riscv_linux_processors)) {
cpuinfo_log_warning("failed to detect cluster cpus for processor %zu.", processor);
goto cleanup;
}
/**
* Populate the vendor, uarch and frequency of this cluster from
* this logical processor. When the 'clusters' list is constructed,
* only the values from the cluster leader will be honored.
*/
riscv_linux_processors[processor].cluster.vendor =
riscv_linux_processors[processor].core.vendor;
riscv_linux_processors[processor].cluster.uarch =
riscv_linux_processors[processor].core.uarch;
riscv_linux_processors[processor].cluster.frequency =
riscv_linux_processors[processor].core.frequency;
}
/* Populate package information. */
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
if (!cpuinfo_linux_detect_package_cpus(
max_processor_id,
processor,
(cpuinfo_siblings_callback) package_cpus_parser,
riscv_linux_processors)) {
cpuinfo_log_warning("failed to detect package cpus for processor %zu.", processor);
goto cleanup;
}
}
/* Populate ISA structure with hwcap information. */
cpuinfo_riscv_linux_decode_isa_from_hwcap(&cpuinfo_isa);
/**
* To efficiently compute the number of unique micro-architectures
* present on the system, sort the processor list by micro-architecture
* and then scan through the list to count the differences.
*
* Ensure this is done at the end of composing the processor list - the
* parsing functions assume that the position of the processor in the
* list matches it's Linux ID, which this sorting operation breaks.
*/
qsort(riscv_linux_processors,
max_processor_id,
sizeof(struct cpuinfo_riscv_linux_processor),
compare_riscv_linux_processors);
/**
* Determine the number of *valid* detected processors, cores,
* clusters, packages and uarchs in the list.
*/
size_t valid_processors_count = 0;
size_t valid_cores_count = 0;
size_t valid_clusters_count = 0;
size_t valid_packages_count = 0;
size_t valid_uarchs_count = 0;
enum cpuinfo_uarch last_uarch = cpuinfo_uarch_unknown;
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/**
* All comparisons to the leader id values MUST be done against
* the 'linux_id' as opposed to 'processor'. The sort function
* above no longer allows us to make the assumption that these
* two values are the same.
*/
uint32_t linux_id = riscv_linux_processors[processor].processor.linux_id;
valid_processors_count++;
if (riscv_linux_processors[processor].core_leader_id == linux_id) {
valid_cores_count++;
}
if (riscv_linux_processors[processor].cluster_leader_id == linux_id) {
valid_clusters_count++;
}
if (riscv_linux_processors[processor].package_leader_id == linux_id) {
valid_packages_count++;
}
/**
* As we've sorted by micro-architecture, when the uarch differs
* between two entries, a unique uarch has been observed.
*/
if (last_uarch != riscv_linux_processors[processor].core.uarch
|| valid_uarchs_count == 0) {
valid_uarchs_count++;
last_uarch = riscv_linux_processors[processor].core.uarch;
}
}
/* Allocate and populate final public ABI structures. */
processors = calloc(valid_processors_count,
sizeof(struct cpuinfo_processor));
if (processors == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %zu processors.",
valid_processors_count * sizeof(struct cpuinfo_processor),
valid_processors_count);
goto cleanup;
}
cores = calloc(valid_cores_count,
sizeof(struct cpuinfo_core));
if (cores == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %zu cores.",
valid_cores_count * sizeof(struct cpuinfo_core),
valid_cores_count);
goto cleanup;
}
clusters = calloc(valid_clusters_count,
sizeof(struct cpuinfo_cluster));
if (clusters == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %zu clusters.",
valid_clusters_count * sizeof(struct cpuinfo_cluster),
valid_clusters_count);
goto cleanup;
}
packages = calloc(valid_packages_count,
sizeof(struct cpuinfo_package));
if (packages == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %zu packages.",
valid_packages_count * sizeof(struct cpuinfo_package),
valid_packages_count);
goto cleanup;
}
uarchs = calloc(valid_uarchs_count, sizeof(struct cpuinfo_uarch_info));
if (uarchs == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %zu packages.",
valid_uarchs_count * sizeof(struct cpuinfo_uarch_info),
valid_uarchs_count);
goto cleanup;
}
linux_cpu_to_processor_map = calloc(max_processor_id,
sizeof(struct cpuinfo_processor*));
if (linux_cpu_to_processor_map == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" processor map.",
max_processor_id * sizeof(struct cpuinfo_processor*),
max_processor_id);
goto cleanup;
}
linux_cpu_to_core_map = calloc(max_processor_id,
sizeof(struct cpuinfo_core*));
if (linux_cpu_to_core_map == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" core map.",
max_processor_id * sizeof(struct cpuinfo_core*),
max_processor_id);
goto cleanup;
}
linux_cpu_to_uarch_index_map = calloc(max_processor_id,
sizeof(struct cpuinfo_uarch_info*));
if (linux_cpu_to_uarch_index_map == NULL) {
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" uarch map.",
max_processor_id * sizeof(struct cpuinfo_uarch_info*),
max_processor_id);
goto cleanup;
}
/* Transfer contents of processor list to ABI structures. */
size_t valid_processors_index = 0;
size_t valid_cores_index = 0;
size_t valid_clusters_index = 0;
size_t valid_packages_index = 0;
size_t valid_uarchs_index = 0;
last_uarch = cpuinfo_uarch_unknown;
for (size_t processor = 0; processor < max_processor_id; processor++) {
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
continue;
}
/**
* All comparisons to the leader id values MUST be done against
* the 'linux_id' as opposed to 'processor'. The sort function
* above no longer allows us to make the assumption that these
* two values are the same.
*/
uint32_t linux_id = riscv_linux_processors[processor].processor.linux_id;
/* Create uarch entry if this uarch has not been seen before. */
if (last_uarch != riscv_linux_processors[processor].core.uarch
|| valid_uarchs_index == 0) {
uarchs[valid_uarchs_index++].uarch =
riscv_linux_processors[processor].core.uarch;
last_uarch = riscv_linux_processors[processor].core.uarch;
}
/* Copy cpuinfo_processor information. */
memcpy(&processors[valid_processors_index++],
&riscv_linux_processors[processor].processor,
sizeof(struct cpuinfo_processor));
/* Update uarch processor count. */
uarchs[valid_uarchs_index - 1].processor_count++;
/* Copy cpuinfo_core information, if this is the leader. */
if (riscv_linux_processors[processor].core_leader_id == linux_id) {
memcpy(&cores[valid_cores_index++],
&riscv_linux_processors[processor].core,
sizeof(struct cpuinfo_core));
/* Update uarch core count. */
uarchs[valid_uarchs_index - 1].core_count++;
}
/* Copy cpuinfo_cluster information, if this is the leader. */
if (riscv_linux_processors[processor].cluster_leader_id == linux_id) {
memcpy(&clusters[valid_clusters_index++],
&riscv_linux_processors[processor].cluster,
sizeof(struct cpuinfo_cluster));
}
/* Copy cpuinfo_package information, if this is the leader. */
if (riscv_linux_processors[processor].package_leader_id == linux_id) {
memcpy(&packages[valid_packages_index++],
&riscv_linux_processors[processor].package,
sizeof(struct cpuinfo_package));
}
/* Commit pointers on the final structures. */
processors[valid_processors_index - 1].core = &cores[valid_cores_index - 1];
processors[valid_processors_index - 1].cluster = &clusters[valid_clusters_index - 1];
processors[valid_processors_index - 1].package = &packages[valid_packages_index - 1];
cores[valid_cores_index - 1].cluster = &clusters[valid_clusters_index - 1];
cores[valid_cores_index - 1].package = &packages[valid_packages_index - 1];
clusters[valid_clusters_index - 1].package = &packages[valid_packages_index - 1];
linux_cpu_to_processor_map[linux_id] = &processors[valid_processors_index - 1];
linux_cpu_to_core_map[linux_id] = &cores[valid_cores_index - 1];
linux_cpu_to_uarch_index_map[linux_id] = valid_uarchs_index - 1;
}
/* Commit */
cpuinfo_processors = processors;
cpuinfo_processors_count = valid_processors_count;
cpuinfo_cores = cores;
cpuinfo_cores_count = valid_cores_count;
cpuinfo_clusters = clusters;
cpuinfo_clusters_count = valid_clusters_count;
cpuinfo_packages = packages;
cpuinfo_packages_count = valid_packages_count;
cpuinfo_uarchs = uarchs;
cpuinfo_uarchs_count = valid_uarchs_count;
cpuinfo_linux_cpu_max = max_processor_id;
cpuinfo_linux_cpu_to_processor_map = linux_cpu_to_processor_map;
cpuinfo_linux_cpu_to_core_map = linux_cpu_to_core_map;
cpuinfo_linux_cpu_to_uarch_index_map = linux_cpu_to_uarch_index_map;
__sync_synchronize();
cpuinfo_is_initialized = true;
/* Mark all public structures NULL to prevent cleanup from erasing them. */
processors = NULL;
cores = NULL;
clusters = NULL;
packages = NULL;
uarchs = NULL;
linux_cpu_to_processor_map = NULL;
linux_cpu_to_core_map = NULL;
linux_cpu_to_uarch_index_map = NULL;
cleanup:
free(riscv_linux_processors);
free(processors);
free(cores);
free(clusters);
free(packages);
free(uarchs);
free(linux_cpu_to_processor_map);
free(linux_cpu_to_core_map);
free(linux_cpu_to_uarch_index_map);
}

View File

@@ -0,0 +1,62 @@
#include <sys/hwprobe.h>
#include <sched.h>
#include <cpuinfo/log.h>
#include <riscv/api.h>
#include <riscv/linux/api.h>
void cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
uint32_t processor,
enum cpuinfo_vendor vendor[restrict static 1],
enum cpuinfo_uarch uarch[restrict static 1]) {
struct riscv_hwprobe pairs[] = {
{ .key = RISCV_HWPROBE_KEY_MVENDORID, },
{ .key = RISCV_HWPROBE_KEY_MARCHID, },
{ .key = RISCV_HWPROBE_KEY_MIMPID, },
};
const size_t pairs_count = sizeof(pairs) / sizeof(struct riscv_hwprobe);
/* In case of failure, report unknown. */
*vendor = cpuinfo_vendor_unknown;
*uarch = cpuinfo_uarch_unknown;
/* Create a CPU set with this processor flagged. */
const size_t cpu_set_size = processor + 1;
cpu_set_t* cpu_set = CPU_ALLOC(cpu_set_size);
CPU_SET(processor, cpu_set);
/* Request all available information from hwprobe. */
int ret = __riscv_hwprobe(pairs, pairs_count,
cpu_set_size, (unsigned long*)cpu_set,
0 /* flags */);
if (ret < 0) {
cpuinfo_log_warning("failed to get hwprobe information, err: %d", ret);
return;
}
/**
* The syscall may not have populated all requested keys, loop through
* the list and store the values that were discovered.
*/
uint32_t vendor_id = 0;
uint32_t arch_id = 0;
uint32_t imp_id = 0;
for (size_t pair = 0; pair < pairs_count; pair++) {
switch (pairs[pair].key) {
case RISCV_HWPROBE_KEY_MVENDORID:
vendor_id = pairs[pair].value;
break;
case RISCV_HWPROBE_KEY_MARCHID:
arch_id = pairs[pair].value;
break;
case RISCV_HWPROBE_KEY_MIMPID:
imp_id = pairs[pair].value;
break;
default:
/* The key value may be -1 if unsupported. */
break;
}
}
cpuinfo_riscv_decode_vendor_uarch(vendor_id, arch_id, imp_id,
vendor, uarch);
}

View File

@@ -0,0 +1,44 @@
#include <string.h>
#include <sys/auxv.h>
#include <riscv/linux/api.h>
/**
* arch/riscv/include/uapi/asm/hwcap.h
*
* This must be kept in sync with the upstream kernel header.
*/
#define COMPAT_HWCAP_ISA_I (1 << ('I' - 'A'))
#define COMPAT_HWCAP_ISA_M (1 << ('M' - 'A'))
#define COMPAT_HWCAP_ISA_A (1 << ('A' - 'A'))
#define COMPAT_HWCAP_ISA_F (1 << ('F' - 'A'))
#define COMPAT_HWCAP_ISA_D (1 << ('D' - 'A'))
#define COMPAT_HWCAP_ISA_C (1 << ('C' - 'A'))
#define COMPAT_HWCAP_ISA_V (1 << ('V' - 'A'))
void cpuinfo_riscv_linux_decode_isa_from_hwcap(
struct cpuinfo_riscv_isa isa[restrict static 1]) {
const unsigned long hwcap = getauxval(AT_HWCAP);
if (hwcap & COMPAT_HWCAP_ISA_I) {
isa->i = true;
}
if (hwcap & COMPAT_HWCAP_ISA_M) {
isa->m = true;
}
if (hwcap & COMPAT_HWCAP_ISA_A) {
isa->a = true;
}
if (hwcap & COMPAT_HWCAP_ISA_F) {
isa->f = true;
}
if (hwcap & COMPAT_HWCAP_ISA_D) {
isa->d = true;
}
if (hwcap & COMPAT_HWCAP_ISA_C) {
isa->c = true;
}
if (hwcap & COMPAT_HWCAP_ISA_V) {
isa->v = true;
}
}

27
3rdparty/cpuinfo/src/riscv/uarch.c vendored Normal file
View File

@@ -0,0 +1,27 @@
#include <stdint.h>
#include <cpuinfo/log.h>
#include <riscv/api.h>
void cpuinfo_riscv_decode_vendor_uarch(
uint32_t vendor_id,
uint32_t arch_id,
uint32_t imp_id,
enum cpuinfo_vendor vendor[restrict static 1],
enum cpuinfo_uarch uarch[restrict static 1]) {
/* The vendor ID is sufficient to determine the cpuinfo_vendor. */
switch(vendor_id) {
case cpuinfo_riscv_chipset_sifive:
*vendor = cpuinfo_vendor_sifive;
break;
default:
*vendor = cpuinfo_vendor_unknown;
cpuinfo_log_warning("unknown vendor ID: %"PRIu32, vendor_id);
break;
}
/**
* TODO: Add support for parsing chipset architecture and implementation
* IDs here, when a chipset of interest comes along.
*/
*uarch = cpuinfo_uarch_unknown;
}

View File

@@ -490,6 +490,18 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
*/
isa.avx512vp2intersect = avx512_regs && !!(structured_feature_info0.edx & UINT32_C(0x00000100));
/*
* AVX512_FP16 instructions:
* - Intel: edx[bit 23] in structured feature info (ecx = 0).
*/
isa.avx512fp16 = avx512_regs && !!(structured_feature_info0.edx & UINT32_C(0x00800000));
/*
* AVX_VNNI instructions:
* - Intel: eax[bit 4] in structured feature info (ecx = 1).
*/
isa.avxvnni = avx_regs && !!(structured_feature_info1.eax & UINT32_C(0x00000010));
/*
* AVX512_BF16 instructions:
* - Intel: eax[bit 5] in structured feature info (ecx = 1).

View File

@@ -234,7 +234,7 @@ static bool transform_token(char* token_start, char* token_end, struct parser_st
return true;
}
/*
* Erase everywhing after "SOC" on AMD System-on-Chips, e.g.
* Erase everything after "SOC" on AMD System-on-Chips, e.g.
* "AMD GX-212JC SOC with Radeon(TM) R2E Graphics \0"
*/
if (erase_matching(token_start, token_length, "SOC")) {
@@ -581,7 +581,7 @@ uint32_t cpuinfo_x86_normalize_brand_string(
/* Iterate through all tokens and erase redundant parts */
{
bool is_token = false;
char* token_start;
char* token_start = NULL;
for (char* char_ptr = name; char_ptr != name_end; char_ptr++) {
if (*char_ptr == ' ') {
if (is_token) {
@@ -619,7 +619,7 @@ uint32_t cpuinfo_x86_normalize_brand_string(
/* Compact tokens: collapse multiple spacing into one */
{
char* output_ptr = normalized_name;
char* token_start;
char* token_start = NULL;
bool is_token = false;
bool previous_token_ends_with_dash = true;
bool current_token_starts_with_dash = false;

View File

@@ -195,35 +195,37 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
}
break;
case 0x16:
if (model_info->model >= 0x03) {
if (model_info->extended_model >= 0x03) {
return cpuinfo_uarch_puma;
} else {
return cpuinfo_uarch_jaguar;
}
case 0x17:
switch (model_info->model) {
case 0x01: // 14 nm Naples, Whitehaven, Summit Ridge, Snowy Owl
case 0x08: // 12 nm Pinnacle Ridge
case 0x11: // 14 nm Raven Ridge, Great Horned Owl
case 0x18: // 12 nm Picasso
switch (model_info->extended_model) {
case 0x0: // model 01h -> 14 nm Naples/Whitehaven/Summit Ridge/Snowy Owl, model 08h -> 12 nm Colfax/Pinnacle Ridge
case 0x1: // model 11h -> 14 nm Raven Ridge/Great Horned Owl, model 18h -> 14 nm Banded Kestrel / 12 nm Picasso
return cpuinfo_uarch_zen;
case 0x31: // Rome, Castle Peak
case 0x60: // Renoir
case 0x68: // Lucienne
case 0x71: // Matisse
case 0x90: // Van Gogh
case 0x98: // Mero
case 0x3: // model 31h -> Rome/Castle Peak
case 0x4: // model 47h -> Xbox Series X
case 0x6: // model 60h -> Renoir/Grey Hawk, model 68h -> Lucienne
case 0x7: // model 71h -> Matisse
case 0x9: // model 90h -> Van Gogh, model 98h -> Mero
return cpuinfo_uarch_zen2;
}
break;
case 0x19:
switch (model_info->model) {
case 0x01: // Genesis
case 0x21: // Vermeer
case 0x30: // Badami, Trento
case 0x40: // Rembrandt
case 0x50: // Cezanne
switch (model_info->extended_model) {
case 0x0: // model 00h -> Genesis, model 01h -> Milan, model 08h -> Chagall
case 0x2: // model 21h -> Vermeer
case 0x3: // model 30h -> Badami, Trento
case 0x4: // model 40h -> Rembrandt
case 0x5: // model 50h -> Cezanne
return cpuinfo_uarch_zen3;
case 0x1: // model 10h..1Fh -> Stones
case 0x6: // model 60h..6Fh -> Raphael
case 0x7: // model 70h..77h -> Phoenix/Hawkpoint1, model 78h..7Fh -> Phoenix 2/Hawkpoint2
case 0xA: // model A0h..AFh -> Stones-Dense
return cpuinfo_uarch_zen4;
}
break;
}

View File

@@ -2,10 +2,8 @@
# - backend selection via command line, rather than simply detecting headers.
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(cubeb
VERSION 0.0.0)
project(cubeb C CXX)
option(BUILD_RUST_LIBS "Build rust backends" OFF)
option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON)
if(NOT CMAKE_BUILD_TYPE)
@@ -14,25 +12,17 @@ if(NOT CMAKE_BUILD_TYPE)
endif()
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (BUILD_RUST_LIBS)
if(EXISTS "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs")
set(USE_PULSE_RUST 1)
endif()
if(EXISTS "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs")
set(USE_AUDIOUNIT_RUST 1)
endif()
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_WARNING_LEVEL 4)
if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -fno-exceptions -fno-rtti")
else()
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable Exceptions
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable RTTI
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable Exceptions
endif()
add_library(cubeb
@@ -46,44 +36,16 @@ add_library(cubeb
target_include_directories(cubeb
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
)
set_target_properties(cubeb PROPERTIES
VERSION ${cubeb_VERSION}
SOVERSION ${cubeb_VERSION_MAJOR}
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
)
configure_package_config_file(
"Config.cmake.in"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(
FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(TARGETS cubeb EXPORT "${PROJECT_NAME}Targets")
install(
EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${PROJECT_NAME}::"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
add_library(speex OBJECT subprojects/speex/resample.c)
set_target_properties(speex PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_include_directories(speex INTERFACE subprojects)
target_compile_definitions(speex PUBLIC
OUTSIDE_SPEEX
FLOATING_POINT
EXPORT=
RANDOM_PREFIX=speex
)
add_library(speex OBJECT subprojects/speex/resample.c)
set_target_properties(speex PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_include_directories(speex INTERFACE subprojects)
target_compile_definitions(speex PUBLIC
OUTSIDE_SPEEX
FLOATING_POINT
EXPORT=
RANDOM_PREFIX=speex
)
# $<BUILD_INTERFACE:> required because of https://gitlab.kitware.com/cmake/cmake/-/issues/15415
target_link_libraries(cubeb PRIVATE $<BUILD_INTERFACE:speex>)
@@ -96,17 +58,22 @@ find_package(Threads)
target_link_libraries(cubeb PRIVATE Threads::Threads)
if(LAZY_LOAD_LIBS)
if(NOT APPLE AND NOT WIN32) # Skip checks on MacOS because it takes ages in XCode.
check_include_files(pulse/pulseaudio.h USE_PULSE)
check_include_files(alsa/asoundlib.h USE_ALSA)
check_include_files(jack/jack.h USE_JACK)
check_include_files(sndio.h USE_SNDIO)
check_include_files(aaudio/AAudio.h USE_AAUDIO)
if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO OR USE_AAUDIO)
target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS})
if(ANDROID)
target_compile_definitions(cubeb PRIVATE __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
endif()
endif()
endif()
else()
elseif(NOT APPLE AND NOT WIN32)
find_package(PkgConfig REQUIRED)
@@ -136,12 +103,6 @@ else()
target_compile_definitions(cubeb PRIVATE DISABLE_LIBSNDIO_DLOPEN)
target_link_libraries(cubeb PRIVATE sndio)
endif()
check_include_files(aaudio/AAudio.h USE_AAUDIO)
if(USE_AAUDIO)
target_compile_definitions(cubeb PRIVATE DISABLE_LIBAAUDIO_DLOPEN)
target_link_libraries(cubeb PRIVATE aaudio)
endif()
endif()
if(USE_PULSE)
@@ -164,22 +125,7 @@ if(USE_SNDIO)
target_compile_definitions(cubeb PRIVATE USE_SNDIO)
endif()
if(USE_AAUDIO)
target_sources(cubeb PRIVATE src/cubeb_aaudio.cpp)
target_compile_definitions(cubeb PRIVATE USE_AAUDIO)
# set this definition to enable low latency mode. Possibly bad for battery
target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_LATENCY)
# set this definition to enable power saving mode. Possibly resulting
# in high latency
# target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_POWER_SAVING)
# set this mode to make the backend use an exclusive stream.
# will decrease latency.
# target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_EXCLUSIVE_STREAM)
endif()
if(APPLE)
check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT)
if(USE_AUDIOUNIT)
target_sources(cubeb PRIVATE
@@ -188,13 +134,15 @@ if(USE_AUDIOUNIT)
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT)
target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices")
endif()
endif()
if(WIN32)
check_include_files(audioclient.h USE_WASAPI)
if(USE_WASAPI)
target_sources(cubeb PRIVATE
src/cubeb_wasapi.cpp)
target_compile_definitions(cubeb PRIVATE USE_WASAPI)
target_link_libraries(cubeb PRIVATE avrt ole32 ksuser)
target_link_libraries(cubeb PRIVATE ole32 ksuser)
endif()
check_include_files("windows.h;mmsystem.h" USE_WINMM)
@@ -204,16 +152,9 @@ if(USE_WINMM)
target_compile_definitions(cubeb PRIVATE USE_WINMM)
target_link_libraries(cubeb PRIVATE winmm)
endif()
check_include_files(SLES/OpenSLES.h USE_OPENSL)
if(USE_OPENSL)
target_sources(cubeb PRIVATE
src/cubeb_opensl.c
src/cubeb-jni.cpp)
target_compile_definitions(cubeb PRIVATE USE_OPENSL)
target_link_libraries(cubeb PRIVATE OpenSLES)
endif()
if(NOT WIN32 AND NOT APPLE)
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
if(HAVE_SYS_SOUNDCARD_H)
try_compile(USE_OSS "${PROJECT_BINARY_DIR}/compile_tests"
@@ -237,65 +178,4 @@ if(HAVE_SYS_SOUNDCARD_H)
endif()
endif()
endif()
check_include_files(android/log.h USE_AUDIOTRACK)
if(USE_AUDIOTRACK)
target_sources(cubeb PRIVATE
src/cubeb_audiotrack.c)
target_compile_definitions(cubeb PRIVATE USE_AUDIOTRACK)
target_link_libraries(cubeb PRIVATE log)
endif()
check_include_files(sys/audioio.h USE_SUN)
if(USE_SUN)
target_sources(cubeb PRIVATE
src/cubeb_sun.c)
target_compile_definitions(cubeb PRIVATE USE_SUN)
endif()
check_include_files(kai.h USE_KAI)
if(USE_KAI)
target_sources(cubeb PRIVATE
src/cubeb_kai.c)
target_compile_definitions(cubeb PRIVATE USE_KAI)
target_link_libraries(cubeb PRIVATE kai)
endif()
if(USE_PULSE AND USE_PULSE_RUST)
include(ExternalProject)
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust)
ExternalProject_Add(
cubeb_pulse_rs
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND cargo build COMMAND cargo build --release
BUILD_ALWAYS ON
BINARY_DIR "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs"
INSTALL_COMMAND ""
LOG_BUILD ON)
add_dependencies(cubeb cubeb_pulse_rs)
target_compile_definitions(cubeb PRIVATE USE_PULSE_RUST)
target_link_libraries(cubeb PRIVATE
debug "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs/target/debug/libcubeb_pulse.a"
optimized "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs/target/release/libcubeb_pulse.a" pulse)
endif()
if(USE_AUDIOUNIT AND USE_AUDIOUNIT_RUST)
include(ExternalProject)
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust)
ExternalProject_Add(
cubeb_coreaudio_rs
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND cargo build COMMAND cargo build --release
BUILD_ALWAYS ON
BINARY_DIR "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs"
INSTALL_COMMAND ""
LOG_BUILD ON)
add_dependencies(cubeb cubeb_coreaudio_rs)
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT_RUST)
target_link_libraries(cubeb PRIVATE
debug "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs/target/debug/libcubeb_coreaudio.a"
optimized "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs/target/release/libcubeb_coreaudio.a")
endif()
endif()

View File

@@ -1,4 +0,0 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/cubebTargets.cmake")
check_required_components(cubeb)

View File

@@ -1,14 +0,0 @@
SET(CMAKE_SYSTEM_NAME Windows)
set(COMPILER_PREFIX "i686-w64-mingw32")
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc-posix)
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++-posix)
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@@ -1,36 +0,0 @@
{
snd_config_update-malloc
Memcheck:Leak
fun:malloc
...
fun:snd_config_update_r
}
{
snd1_dlobj_cache_get-malloc
Memcheck:Leak
fun:malloc
...
fun:snd1_dlobj_cache_get
}
{
parse_defs-malloc
Memcheck:Leak
fun:malloc
...
fun:parse_defs
}
{
parse_defs-calloc
Memcheck:Leak
fun:calloc
...
fun:parse_defs
}
{
pa_client_conf_from_x11-malloc
Memcheck:Leak
fun:malloc
...
fun:pa_client_conf_from_x11
}

Some files were not shown because too many files have changed in this diff Show More