Compare commits

...

1978 Commits

Author SHA1 Message Date
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
1748 changed files with 907801 additions and 181338 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,24 @@ 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).
- type: textarea
id: desc
attributes:
@@ -76,3 +81,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,24 @@ 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).
- type: textarea
id: desc
attributes:
@@ -52,13 +57,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
@@ -117,11 +122,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 the safe preset works for most games. MTVU can have some compatibility issues so please disable it before making a report.
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 because a game requires you to do so to work, please state that explicitly.
validations:
required: false
- type: textarea
@@ -136,8 +141,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:

12
.github/labeler.yml vendored
View File

@@ -39,8 +39,8 @@
'Debugger':
- 'pcsx2/DebugTools/*'
- 'pcsx2/DebugTools/**/*'
- 'pcsx2/gui/Debugger/*'
- 'pcsx2/gui/Debugger/**/*'
- 'pcsx2-qt/Debugger/*'
- 'pcsx2-qt/Debugger/**/*'
'IPC':
- 'pcsx2/IPC*'
- 'pcsx2/**/IPC*'
@@ -115,11 +115,11 @@
- 'pcsx2/IPU/*'
- 'pcsx2/IPU/**/*'
'Memory Card':
- 'pcsx2/gui/MemoryCard*'
- 'pcsx2/gui/**/MemoryCard*'
- 'pcsx2/SIO/Memcard/*'
- 'pcsx2/SIO/Memcard/**/*'
'PAD':
- 'pcsx2/PAD/*'
- 'pcsx2/PAD/**/*'
- 'pcsx2/SIO/Pad/*'
- 'pcsx2/SIO/Pad/**/*'
'SPU2':
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'

View File

@@ -0,0 +1,42 @@
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"
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@v5
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@v5
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,133 @@
name: Flatpak Build Steps
on:
workflow_call:
inputs:
jobName:
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
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
# 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: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
BUILD_SYSTEM: flatpak
ARCH: ${{ inputs.platform }}
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: Install Packages
env:
COMPILER: ${{ inputs.compiler }}
run: .github/workflows/scripts/linux/install-packages-flatpak.sh
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ 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 run org.freedesktop.appstream-glib validate .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
- name: Validate manifest
run: |
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
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/repo/screenshots
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: Commit screenshots to OSTree
run: |
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
#- name: Validate build directory
# run: |
# flatpak run --command=flatpak-builder-lint org.flatpak.Builder builddir flatpak_app
#
#- name: Validate repo
# run: |
# flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo
- name: Push to Flathub beta
if: inputs.publish == true && inputs.branch == 'beta'
uses: flatpak/flatpak-github-actions/flat-manager@v6.3
with:
flat-manager-url: https://hub.flathub.org/
repository: beta
token: ${{ secrets.FLATHUB_BETA_TOKEN }}
- name: Push to Flathub stable
if: inputs.publish == true && inputs.branch == 'stable'
uses: flatpak/flatpak-github-actions/flat-manager@v6.3
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
token: ${{ secrets.FLATHUB_TOKEN }}

View File

@@ -2,8 +2,8 @@ name: 🐧 Linux Builds
on:
push:
branches:
- '*'
branches-ignore:
- "l10n_master"
pull_request:
branches:
- master
@@ -11,10 +11,21 @@ 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"
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"
compiler: clang
cmakeflags: ""
publish: false
secrets: inherit

View File

@@ -9,7 +9,7 @@ on:
os:
required: false
type: string
default: ubuntu-20.04
default: ubuntu-22.04
platform:
required: false
type: string
@@ -28,17 +28,21 @@ 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
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,17 +51,29 @@ 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-0ubuntu3.5 libc6-dev=2.35-0ubuntu3.5 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: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
GUI_FRAMEWORK: QT
ARCH: ${{ inputs.platform }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
@@ -87,22 +103,25 @@ jobs:
uses: actions/cache@v3
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
- 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
CLANG_PATH: /usr/bin/clang-17
CLANGXX_PATH: /usr/bin/clang++-17
run: |
DEPS_PREFIX="$HOME/deps" .github/workflows/scripts/linux/generate-cmake-qt.sh
- name: Build PCSX2
working-directory: build
@@ -117,9 +136,9 @@ 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

View File

@@ -9,18 +9,15 @@ on:
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-13
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
jobs:
build_macos:
@@ -38,17 +35,23 @@ 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: Use Xcode 14.3.1
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: macos
GUI_FRAMEWORK: ${{ inputs.gui }}
ARCH: ${{ inputs.platform }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -57,16 +60,14 @@ jobs:
- name: Install Packages
env:
PLATFORM: ${{ inputs.platform }}
PLATFORM: "x64"
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 molten-vk ccache nasm; then
brew update
brew install molten-vk ccache
brew install molten-vk ccache nasm
fi
- name: Cache Dependencies
@@ -74,18 +75,16 @@ jobs:
uses: actions/cache@v3
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
- 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
@@ -96,8 +95,8 @@ jobs:
uses: actions/cache@v3
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: |
@@ -108,6 +107,7 @@ jobs:
-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,7 +130,6 @@ jobs:
done
- name: Run Tests
if: inputs.gui == 'Qt'
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
@@ -144,12 +143,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
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,8 @@ 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"
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

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

@@ -0,0 +1,201 @@
# 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
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.1
with:
github_token: ${{ github.token }}
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
# 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
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 }}
# 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"
compiler: clang
cmakeflags: ""
buildAppImage: true
fetchTags: true
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"
compiler: clang
cmakeflags: ""
branch: "stable"
publish: false
fetchTags: true
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"
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
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"
fetchTags: true
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@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: ${{ 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,7 +1,7 @@
#!/bin/bash
# Artifact Naming Scheme:
# PCSX2-<OS>-<GUI>-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# PCSX2-<OS>-Qt-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# -- limited to 200 chars
# Outputs:
# - artifact-name
@@ -9,7 +9,6 @@
# Inputs as env-vars
# OS
# BUILD_SYSTEM
# GUI_FRAMEWORK
# ARCH
# SIMD
# EVENT_NAME
@@ -20,17 +19,18 @@
NAME=""
if [ "${OS}" == "macos" ]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
# MacOS has combined binaries for x64 and ARM64.
NAME="PCSX2-${OS}-Qt"
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
NAME="PCSX2-${OS}-Qt-${ARCH}-${SIMD}"
else
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
NAME="PCSX2-${OS}-Qt-${ARCH}"
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
if [[ "${BUILD_SYSTEM}" == "cmake" ]] || [[ "${BUILD_SYSTEM}" == "flatpak" ]]; then
NAME="${NAME}-${BUILD_SYSTEM}"
fi
fi

View File

@@ -0,0 +1,12 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/../linux/functions.sh"
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.
retry_command sudo apt-get -y install qt6-l10n-tools
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_en_translation.sh"

View File

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

View File

@@ -40,251 +40,127 @@ 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 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
retry_command 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
retry_command 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
retry_command 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"
# 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?
# 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'"
exit 1
fi
$STRIP "$OUTDIR/usr/lib/$blib"
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
# 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"
else
echo "*** Failed to find '$blib'"
exit 1
fi
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"
$STRIP "$OUTDIR/usr/lib/$blib"
echo "Running linuxdeploy to create AppDir..."
EXTRA_QT_PLUGINS="core;gui;network;svg;waylandclient;widgets;xcbqpa" \
EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
QMAKE="$DEPSDIR/bin/qmake" \
NO_STRIP="1" \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" \
--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
echo "Copying Qt libraries..."
for lib in "${QTLIBS[@]}"; do
cp -aL "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib"
$STRIP "$OUTDIR/usr/lib/$lib"
# .. 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
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/"
# 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
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
echo "Generating AppImage..."
rm -f "$NAME.AppImage"
$APPIMAGETOOL -v "$OUTDIR" "$NAME.AppImage"
for so in $(find "$OUTDIR/usr/lib" -maxdepth 1); do
if [ -f "$so" ]; then
echo "Patching RPATH in ${so}"
patchelf --set-rpath '$ORIGIN' "$so"
fi
done
echo "Creating qt.conf..."
cat > "$OUTDIR/usr/bin/qt.conf" << EOF
[Paths]
Plugins = ../lib/plugins
EOF
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"
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

@@ -4,24 +4,29 @@ set -e
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
QT=6.3.1
SDL=SDL2-2.28.5
QT=6.6.1
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
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
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $SDL.tar.gz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
450c5b4677b2fe40ed07954d7f0f40690068e80a94c9df86c2c905ccd59d02f7 qtbase-everywhere-src-$QT.tar.xz
ac4ed08950072e375be662cfa64fdb447dd6e935cf29c56a4128d1500492188f qtimageformats-everywhere-src-$QT.tar.xz
248deb56d26a463cf3162f530358ccf90cfb654bbf518bb35ddf81b205e09228 qtsvg-everywhere-src-$QT.tar.xz
4939105a7345ab4e19e7caee8654a836e65bd41910359623e0f233f3aff0914a qttools-everywhere-src-$QT.tar.xz
668702e822ad7150b27e7caa2158595fd9b3b77ffbc8262e6509872a3920ee88 qttranslations-everywhere-src-$QT.tar.xz
66cc2d632dc07fc6cc4e35247f48b7c1753276ccbf86e86d7b24d799725568b1 qtwayland-everywhere-src-$QT.tar.xz
EOF
curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
-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" \
@@ -32,11 +37,19 @@ 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
./configure --prefix "$INSTALLDIR" --enable-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
make "-j$NPROCS"
make install
cd ..
echo "Building libbacktrace..."
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$HOME/deps"
make
make install
cd ..
# Couple notes:
# -fontconfig is needed otherwise Qt Widgets render only boxes.
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
@@ -47,7 +60,7 @@ 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 -- -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
cmake --build . --parallel
cmake --install .
cd ../../
@@ -62,22 +75,19 @@ cmake --build . --parallel
cmake --install .
cd ../../
echo "Building Qt Image Formats..."
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel
cmake --install .
cd ../../
echo "Building Qt Wayland..."
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 ..
@@ -103,6 +113,30 @@ 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 ..

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,24 @@
{
"name": "libaio",
"no-autogen": true,
"make-install-args": [
"prefix=/app"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://pagure.io/libaio.git",
"tag": "libaio-0.3.113",
"commit": "1b18bfafc6a2f7b9fa2c6be77a95afed8b7be448"
}
],
"cleanup": [
"/include",
"/lib/*.a",
"/lib/*.la"
]
}

View File

@@ -0,0 +1,45 @@
{
"name": "sdl2",
"buildsystem": "autotools",
"no-autogen": true,
"config-opts": [
"--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"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "archive",
"url": "https://libsdl.org/release/SDL2-2.28.5.tar.gz",
"sha256": "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4"
}
],
"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,68 @@
{
"app-id": "net.pcsx2.PCSX2",
"runtime": "org.kde.Platform",
"runtime-version": "6.6",
"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/11-libaio.json",
"modules/20-sdl2.json",
"modules/21-libbacktrace.json",
{
"name": "pcsx2",
"buildsystem": "simple",
"build-options": {
"strip": false,
"no-debuginfo": true,
"env": {
"DEPS_PREFIX": "/app",
"COMPILER": "clang",
"CLANG_PATH": "/usr/lib/sdk/llvm17/bin/clang",
"CLANGXX_PATH": "/usr/lib/sdk/llvm17/bin/clang++",
"ADDITIONAL_CMAKE_ARGS": "-DUSE_LINKED_FFMPEG=ON"
}
},
"sources": [
{
"type": "dir",
"path": "../../../../.."
}
],
"build-commands": [
".github/workflows/scripts/linux/generate-cmake-qt.sh",
"cd build && ../.github/workflows/scripts/linux/compile.sh && cd ..",
"cp -a build/bin ${FLATPAK_DEST}",
"cd build && ninja unittests && cd .."
],
"post-install": [
"install -Dm644 bin/resources/icons/AppIconLarge.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/net.pcsx2.PCSX2.png",
"install -Dm644 .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 .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

@@ -2,16 +2,28 @@
set -e
if [[ -z "${DEPS_PREFIX}" ]]; then
echo "DEPS_PREFIX is not set."
exit 1
fi
echo "Using build dependencies from: ${DEPS_PREFIX}"
if [ "${COMPILER}" = "clang" ]; then
if [[ -z "${CLANG_PATH}" ]] || [[ -z "${CLANGXX_PATH}" ]]; then
echo "CLANG_PATH or CLANGXX_PATH is not set."
exit 1
fi
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)
cat > "clang-toolchain.cmake" << EOF
set(CMAKE_C_COMPILER "${CLANG_PATH}")
set(CMAKE_CXX_COMPILER "${CLANGXX_PATH}")
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"
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=clang-toolchain.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
@@ -31,7 +43,7 @@ cmake \
-DX11_API=ON \
-DWAYLAND_API=ON \
-DENABLE_SETCAP=OFF \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_PREFIX_PATH="${DEPS_PREFIX}" \
-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=short)
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

@@ -0,0 +1,58 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
ARCH=x86_64
KDE_BRANCH=6.6
BRANCH=23.08
FLAT_MANAGER_CLIENT_DIR="$HOME/.local/bin"
# Build packages. Mostly needed for flat-manager-client.
declare -a BUILD_PACKAGES=(
"flatpak"
"flatpak-builder"
"appstream-util"
"python3-aiohttp"
"python3-tenacity"
"python3-gi"
"gobject-introspection"
"libappstream-glib8"
"libappstream-glib-dev"
"libappstream-dev"
"gir1.2-ostree-1.0"
)
# Flatpak runtimes and SDKs.
declare -a FLATPAK_PACKAGES=(
"org.kde.Platform/${ARCH}/${KDE_BRANCH}"
"org.kde.Sdk/${ARCH}/${KDE_BRANCH}"
"org.freedesktop.Platform.ffmpeg-full/${ARCH}/${BRANCH}"
"org.freedesktop.Sdk.Extension.llvm17/${ARCH}/${BRANCH}"
"org.freedesktop.appstream-glib/${ARCH}/stable"
)
retry_command sudo apt-get -qq update
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install packages needed for building
echo "Will install the following packages for building - ${FLATPAK_PACKAGES[*]}"
retry_command sudo flatpak -y install "${FLATPAK_PACKAGES[@]}"
echo "Installing Flatpak Builder"
retry_command sudo flatpak -y install flathub org.flatpak.builder
echo "Downloading flat-manager-client"
mkdir -p "$FLAT_MANAGER_CLIENT_DIR"
pushd "$FLAT_MANAGER_CLIENT_DIR"
aria2c -Z "https://raw.githubusercontent.com/flatpak/flat-manager/9401efbdc0d6bd489507d8401c567ba219d735d5/flat-manager-client"
chmod +x flat-manager-client
echo "$FLAT_MANAGER_CLIENT_DIR" >> $GITHUB_PATH
popd

View File

@@ -8,14 +8,13 @@ set -e
# Packages - Build and Qt
declare -a BUILD_PACKAGES=(
"build-essential"
"g++"
"git"
"cmake"
"ccache"
"ninja-build"
"libclang-dev" # Qt goes hunting for libclang-11 specifically.
"libclang-11-dev"
"libclang-12-dev"
"patchelf"
"libfuse2"
"libglib2.0-dev"
"libfontconfig1-dev"
"libharfbuzz-dev"
@@ -37,10 +36,12 @@ declare -a BUILD_PACKAGES=(
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"extra-cmake-modules"
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
"libcurl4-openssl-dev"
"libdbus-1-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
@@ -52,17 +53,23 @@ declare -a PCSX2_PACKAGES=(
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libsoundtouch-dev"
"libudev-dev"
"libx11-xcb-dev"
"libavcodec-dev"
"libavformat-dev"
"libavutil-dev"
"libswresample-dev"
"libswscale-dev"
"pkg-config"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10")
else
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
if [ "${COMPILER}" = "clang" ]; then
BUILD_PACKAGES+=("llvm-17" "lld-17" "clang-17")
# Ubuntu 22.04 doesn't ship with LLVM 16, so we need to pull it from the llvm.org repos.
retry_command wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -n 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
fi
retry_command sudo apt-get -qq update && break

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,15 +2,15 @@
set -e
export MACOSX_DEPLOYMENT_TARGET=10.14
export MACOSX_DEPLOYMENT_TARGET=11.0
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
SDL=SDL2-2.28.5
PNG=1.6.37
JPG=9e
SOUNDTOUCH=soundtouch-2.3.1
QT=6.3.1
FFMPEG=6.0
QT=6.6.0
mkdir deps-build
cd deps-build
@@ -21,22 +21,22 @@ export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
cat > SHASUMS <<EOF
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $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
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
039d53312acb5897a9054bd38c9ccbdab72500b71fdccdb3f4f0844b0dd39e0e qtbase-everywhere-src-$QT.tar.xz
e1542cb50176e237809895c6549598c08587c63703d100be54ac2d806834e384 qtimageformats-everywhere-src-$QT.tar.xz
33da25fef51102f564624a7ea3e57cb4a0a31b7b44783d1af5749ac36d3c72de qtsvg-everywhere-src-$QT.tar.xz
4e9feebc142bbb6e453e1dc3277e09ec45c8ef081b5ee2a029e6684b5905ba99 qttools-everywhere-src-$QT.tar.xz
a0d89a236f64b810eb0fe4ae1e90db22b0e86263521b35f89e69f1392815078c qttranslations-everywhere-src-$QT.tar.xz
EOF
curl -L \
-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://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
-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" \
@@ -46,9 +46,27 @@ shasum -a 256 --check SHASUMS
echo "Installing SDL..."
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --without-x
make "-j$NPROCS"
make install
# MFI causes multiple joystick connection events, I'm guessing because both the HIDAPI and MFI interfaces
# race each other, and sometimes both end up getting through. So, just force MFI off.
patch -u CMakeLists.txt <<EOF
--- CMakeLists.txt 2023-08-03 01:33:11
+++ CMakeLists.txt 2023-08-26 12:58:53
@@ -2105,7 +2105,7 @@
#import <Foundation/Foundation.h>
#import <CoreHaptics/CoreHaptics.h>
int main() { return 0; }" HAVE_FRAMEWORK_COREHAPTICS)
- if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS)
+ if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS AND FALSE)
# Only enable MFI if we also have CoreHaptics to ensure rumble works
set(SDL_JOYSTICK_MFI 1)
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
EOF
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSDL_X11=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing libpng..."
@@ -59,23 +77,19 @@ make "-j$NPROCS"
make install
cd ..
echo "Installing libjpeg..."
tar xf "jpegsrc.v$JPG.tar.gz"
cd "jpeg-$JPG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
echo "Installing FFmpeg..."
tar xf "ffmpeg-$FFMPEG.tar.xz"
cd "ffmpeg-$FFMPEG"
./configure --prefix="$INSTALLDIR" --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 ..
echo "Installing soundtouch..."
tar xf "$SOUNDTOUCH.tar.gz"
cd "$SOUNDTOUCH"
cmake -B build -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Base..."
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
@@ -90,6 +104,13 @@ cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTAL
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Image Formats..."
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-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 ..
echo "Installing Qt Tools..."
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"

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,162 @@
@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"
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%
cd "%BUILDDIR%"
set QT=6.6.1
set QTMINOR=6.6
set SDL=SDL2-2.28.5
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 97bd14ee0ec67494d2b93f1a4f7da2bf891103c57090d96fdcc2b019d885c76a || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 818f92518d1a89ee98ae818891a7d2f0e41aa45b933d55215da2df6d5459428e || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 03f01042f86b4dbf7329a179f20835817c660a183178c11570cc0535b3c3ba58 || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" d44d5ead8d4682f54c91687b5e32f2735f086419e3889e05609feae1a7f02da9 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" a17eba4e1c00dbd62c13d708c2bc918c2954b2b25a94d3c05e891d62e8f187c8 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" e5ccf0eefd6b1ef9604fdf57f6d16ad8484d07fb141ca3a2d9c3f1771296ae25 || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
) else (
echo Building release libraries...
)
echo Building SDL...
rmdir /S /Q "%SDL%"
%SEVENZIP% x "%SDL%.zip" || goto error
cd "%SDL%" || goto error
if %DEBUG%==1 (
cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
cmake --build build-debug --parallel || goto error
ninja -C build-debug install || goto error
)
cmake -B build -DCMAKE_BUILD_TYPE=Release -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
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%" -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes %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" .. || 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" .. || 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" .. -- -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 || 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" .. || goto error
cmake --build . --parallel || goto error
ninja 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

@@ -8,7 +8,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
- uses: actions/labeler@v4.3.0
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,21 @@ 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"
configuration: Release
simd: "SSE4"
secrets: inherit
@@ -32,17 +34,19 @@ 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"
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"
configuration: CMake
buildSystem: cmake
secrets: inherit
@@ -50,9 +54,10 @@ 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"
configuration: Release Clang
simd: "SSE4"
secrets: inherit
@@ -60,8 +65,20 @@ 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"
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"
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

@@ -25,41 +25,45 @@ 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
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: 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: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: windows
BUILD_SYSTEM: ${{ inputs.buildSystem }}
GUI_FRAMEWORK: Qt
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
EVENT_NAME: ${{ github.event_name }}
@@ -72,19 +76,24 @@ jobs:
if: inputs.configuration != 'CMake'
uses: microsoft/setup-msbuild@v1
- 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@v3
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 +101,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

10
.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
@@ -90,8 +84,6 @@ oprofile_data/
/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
@@ -24,15 +18,18 @@
[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
[submodule "3rdparty/libwebp/libwebp"]
path = 3rdparty/libwebp/libwebp
url = https://github.com/webmproject/libwebp
[submodule "3rdparty/xz/xz"]
path = 3rdparty/xz/xz
url = https://github.com/tukaani-project/xz.git
[submodule "3rdparty/lz4/lz4"]
path = 3rdparty/lz4/lz4
url = https://github.com/lz4/lz4

View File

@@ -2,16 +2,17 @@
<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>

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,43 +36,15 @@ 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
OUTSIDE_SPEEX
FLOATING_POINT
EXPORT=
RANDOM_PREFIX=speex
)
# $<BUILD_INTERFACE:> required because of https://gitlab.kitware.com/cmake/cmake/-/issues/15415
@@ -96,17 +58,19 @@ find_package(Threads)
target_link_libraries(cubeb PRIVATE Threads::Threads)
if(LAZY_LOAD_LIBS)
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(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)
if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO OR USE_AAUDIO)
target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS})
if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO)
target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS})
endif()
endif()
else()
elseif(NOT APPLE AND NOT WIN32)
find_package(PkgConfig REQUIRED)
@@ -136,12 +100,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,138 +122,57 @@ 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()
check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT)
if(USE_AUDIOUNIT)
target_sources(cubeb PRIVATE
src/cubeb_audiounit.cpp
src/cubeb_osx_run_loop.cpp)
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT)
target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices")
endif()
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)
endif()
check_include_files("windows.h;mmsystem.h" USE_WINMM)
if(USE_WINMM)
target_sources(cubeb PRIVATE
src/cubeb_winmm.c)
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()
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
if(HAVE_SYS_SOUNDCARD_H)
try_compile(USE_OSS "${PROJECT_BINARY_DIR}/compile_tests"
${PROJECT_SOURCE_DIR}/cmake/compile_tests/oss_is_v4.c)
if(USE_OSS)
# strlcpy is not available on BSD systems that use glibc,
# like Debian kfreebsd, so try using libbsd if available
include(CheckSymbolExists)
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
if(NOT HAVE_STRLCPY)
pkg_check_modules(libbsd-overlay IMPORTED_TARGET libbsd-overlay)
if(libbsd-overlay_FOUND)
target_link_libraries(cubeb PRIVATE PkgConfig::libbsd-overlay)
set(HAVE_STRLCPY true)
endif()
endif()
if (HAVE_STRLCPY)
target_sources(cubeb PRIVATE
src/cubeb_oss.c)
target_compile_definitions(cubeb PRIVATE USE_OSS)
endif()
if(APPLE)
check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT)
if(USE_AUDIOUNIT)
target_sources(cubeb PRIVATE
src/cubeb_audiounit.cpp
src/cubeb_osx_run_loop.cpp)
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT)
target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices")
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)
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)
endif()
check_include_files("windows.h;mmsystem.h" USE_WINMM)
if(USE_WINMM)
target_sources(cubeb PRIVATE
src/cubeb_winmm.c)
target_compile_definitions(cubeb PRIVATE USE_WINMM)
target_link_libraries(cubeb PRIVATE winmm)
endif()
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)
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"
${PROJECT_SOURCE_DIR}/cmake/compile_tests/oss_is_v4.c)
if(USE_OSS)
# strlcpy is not available on BSD systems that use glibc,
# like Debian kfreebsd, so try using libbsd if available
include(CheckSymbolExists)
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
if(NOT HAVE_STRLCPY)
pkg_check_modules(libbsd-overlay IMPORTED_TARGET libbsd-overlay)
if(libbsd-overlay_FOUND)
target_link_libraries(cubeb PRIVATE PkgConfig::libbsd-overlay)
set(HAVE_STRLCPY true)
endif()
endif()
if (HAVE_STRLCPY)
target_sources(cubeb PRIVATE
src/cubeb_oss.c)
target_compile_definitions(cubeb PRIVATE USE_OSS)
endif()
endif()
endif()
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()

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
}

View File

@@ -49,7 +49,6 @@
<ClInclude Include="subprojects\speex\stack_alloc.h" />
<ClInclude Include="src\cubeb-internal.h" />
<ClInclude Include="src\cubeb-speex-resampler.h" />
<ClInclude Include="src\cubeb_array_queue.h" />
<ClInclude Include="src\cubeb_assert.h" />
<ClInclude Include="src\cubeb_log.h" />
<ClInclude Include="src\cubeb_mixer.h" />
@@ -73,6 +72,11 @@
<ClCompile Include="src\cubeb_winmm.c" />
<ClCompile Include="subprojects\speex\resample.c" />
</ItemGroup>
<ItemDefinitionGroup>
<Lib>
<AdditionalDependencies Condition="'$(Platform)'!='ARM64'">ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@@ -3,7 +3,6 @@
<ItemGroup>
<ClInclude Include="src\cubeb-internal.h" />
<ClInclude Include="src\cubeb-speex-resampler.h" />
<ClInclude Include="src\cubeb_array_queue.h" />
<ClInclude Include="src\cubeb_assert.h" />
<ClInclude Include="src\cubeb_log.h" />
<ClInclude Include="src\cubeb_mixer.h" />

View File

@@ -163,6 +163,7 @@ typedef enum {
implications. */
} cubeb_log_level;
/// A single channel position, to be used in a bitmask.
typedef enum {
CHANNEL_UNKNOWN = 0,
CHANNEL_FRONT_LEFT = 1 << 0,
@@ -185,43 +186,46 @@ typedef enum {
CHANNEL_TOP_BACK_RIGHT = 1 << 17
} cubeb_channel;
/// A bitmask representing the channel layout of a cubeb stream. This is
/// bit-compatible with WAVEFORMATEXENSIBLE and in the same order as the SMPTE
/// ordering.
typedef uint32_t cubeb_channel_layout;
// Some common layout definitions.
enum {
CUBEB_LAYOUT_UNDEFINED = 0, // Indicate the speaker's layout is undefined.
CUBEB_LAYOUT_MONO = CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_MONO_LFE = CUBEB_LAYOUT_MONO | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_STEREO = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT,
CUBEB_LAYOUT_STEREO_LFE = CUBEB_LAYOUT_STEREO | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_MONO = (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_MONO_LFE = (uint32_t)CUBEB_LAYOUT_MONO | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_STEREO = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT,
CUBEB_LAYOUT_STEREO_LFE = (uint32_t)CUBEB_LAYOUT_STEREO | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F =
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F_LFE = CUBEB_LAYOUT_3F | CHANNEL_LOW_FREQUENCY,
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F_LFE = (uint32_t)CUBEB_LAYOUT_3F | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F1 =
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_2F1_LFE = CUBEB_LAYOUT_2F1 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F1 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_3F1_LFE = CUBEB_LAYOUT_3F1 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_2F2_LFE = CUBEB_LAYOUT_2F2 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_QUAD = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT,
CUBEB_LAYOUT_QUAD_LFE = CUBEB_LAYOUT_QUAD | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_SIDE_LEFT |
CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F2_LFE = CUBEB_LAYOUT_3F2 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2_BACK = CUBEB_LAYOUT_QUAD | CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F2_LFE_BACK = CUBEB_LAYOUT_3F2_BACK | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F3R_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
CHANNEL_BACK_CENTER | CHANNEL_SIDE_LEFT |
CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F4_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT |
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_2F1_LFE = (uint32_t)CUBEB_LAYOUT_2F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F1 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_3F1_LFE = (uint32_t)CUBEB_LAYOUT_3F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_2F2_LFE = (uint32_t)CUBEB_LAYOUT_2F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_QUAD = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT,
CUBEB_LAYOUT_QUAD_LFE = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
(uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F2_LFE = (uint32_t)CUBEB_LAYOUT_3F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2_BACK = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F2_LFE_BACK = (uint32_t)CUBEB_LAYOUT_3F2_BACK | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F3R_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
(uint32_t)CHANNEL_BACK_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
(uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F4_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT |
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
};
/** Miscellaneous stream preferences. */
@@ -433,7 +437,7 @@ typedef void (*cubeb_state_callback)(cubeb_stream * stream, void * user_ptr,
/**
* User supplied callback called when the underlying device changed.
* @param user The pointer passed to cubeb_stream_init. */
* @param user_ptr The pointer passed to cubeb_stream_init. */
typedef void (*cubeb_device_changed_callback)(void * user_ptr);
/**
@@ -471,7 +475,7 @@ cubeb_init(cubeb ** context, char const * context_name,
/** Returns a list of backend names which can be supplid to cubeb_init().
Array is null-terminated. */
CUBEB_EXPORT const char* const*
CUBEB_EXPORT const char**
cubeb_get_backend_names();
/** Get a read-only string identifying this context's current backend.

View File

@@ -0,0 +1,12 @@
#ifndef CUBEB_EXPORT_H
#define CUBEB_EXPORT_H
#define CUBEB_EXPORT
#define CUBEB_NO_EXPORT
#ifdef WIN32
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "avrt.lib")
#endif
#endif

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