Compare commits

...

2594 Commits

Author SHA1 Message Date
icup321
3e7ac3d66c GameDB: Add native scaling to Scooby-Doo! Unmasked 2025-06-06 23:09:37 +02:00
JordanTheToaster
730e6fa737 GameDB: Simple 2000 Vol 92 Fixes 2025-06-06 23:09:26 +02:00
PCSX2 Bot
cdfcd9fddd [ci skip] Qt: Update Base Translation. 2025-06-06 02:31:08 +02:00
refractionpcsx2
b6930c10b9 GS/HW: Clean up target download formats 2025-06-05 13:51:21 +02:00
refractionpcsx2
852734580d GameDB: Update Harry Potter fixes. 2025-06-05 13:51:21 +02:00
refractionpcsx2
d1dc6a9c1d GS/HW: Add 16bit to 8bit conversion shader 2025-06-05 13:51:21 +02:00
Ty
4fa6d3ed3f GSRunner: Add type to shutdown message code 2025-06-04 20:25:32 -04:00
TellowKrinkle
92e190ad6c GSRunner: Fix surfaceless run on macOS 2025-06-04 20:25:32 -04:00
TellowKrinkle
da4fcffef4 Input: Fix crash when shutting down without initializing input 2025-06-04 20:25:32 -04:00
TellowKrinkle
1a5731dd8e MacOS: Better handle directories of non-bundle applications 2025-06-04 20:25:32 -04:00
TellowKrinkle
e764c5cd4e GSRunner: macOS support 2025-06-04 20:25:32 -04:00
TellowKrinkle
e23b247947 GSRunner: Use separate CPU thread 2025-06-04 20:25:32 -04:00
PCSX2 Bot
3d7792436f [ci skip] Qt: Update Base Translation. 2025-06-04 20:03:38 -04:00
chaoticgd
d8187fbea4 Deps: Specify minimum version of KDDockWidgets 2025-06-04 20:02:02 -04:00
chaoticgd
02259ad0a5 Debugger: Add include required for older versions of KDDockWidgets 2025-06-04 20:02:02 -04:00
TellowKrinkle
220a68df9a GS: Warn on texture replacement folder with wrong case 2025-06-04 19:58:41 -04:00
TellowKrinkle
2ced24f69e GS: Create texture dump directory if it doesn't exist 2025-06-04 19:58:41 -04:00
TellowKrinkle
ec91d0dc74 GS: Formatting 2025-06-04 19:58:41 -04:00
TheLastRar
46874f4673 Qt: Add workaround for incorrectly tinted icons after theme switch 2025-06-04 19:39:18 -04:00
TheLastRar
9eac47dc6c Qt: Fix selected gamelist icons being wrong colour after theme switch 2025-06-04 19:39:18 -04:00
RedDevilus
9e3fd5c2e0 CI: Fix flatpak
Try to fix build failing
2025-06-04 20:19:46 +01:00
refractionpcsx2
ae4be6e2b1 GS/CRC: Remove CRC for Simple 2000 Series Vol. 114, update GameDB Fixes 2025-06-04 18:35:00 +02:00
refractionpcsx2
434df49a7d GS/HW: Clear matched target on HW Move 2025-06-04 18:35:00 +02:00
JordanTheToaster
c939c0fcd5 GameDB: Re-add CRC to Death by Degrees 2025-06-04 18:33:36 +02:00
Berylskid
952c39f324 GameDB: Remove SoftwareRendererFMVHack from Armored Core 2 2025-06-03 13:44:40 +02:00
PCSX2 Bot
0fea7e2a70 [ci skip] Qt: Update Base Translation. 2025-06-03 03:40:13 +02:00
lightningterror
c1baab68d0 GS: Better handle hazards when dx12/vk device creation fails.
VK/DX12: Move CreateNullTexture before reading shader resource.
Fixes null pointer dereference.

VK: Check if vertex buffer is valid before binding.
Fixes vertex buffer validation error null handle.
2025-06-02 21:28:41 +02:00
PCSX2 Bot
ccef18f7a9 [ci skip] PAD: Update to latest controller database. 2025-06-02 19:08:36 +02:00
TheLastRar
8cb056bde3 Qt: Use DevicePixelRatioChange to detect DPR changes 2025-06-02 14:58:00 +02:00
TheLastRar
6ecaaee9e0 QtUtils: Remove redundant method 2025-06-02 14:58:00 +02:00
TheLastRar
c5f916bda0 Qt: Fix DPI icon scaling in various settings windows 2025-06-02 14:58:00 +02:00
TheLastRar
52a9a4649c Qt: Improve handling of DPI 2025-06-02 14:58:00 +02:00
refractionpcsx2
d2219b4dbd GS/TC: On RT->Z dst_match delete on format change if not a shuffle 2025-06-02 14:52:46 +02:00
refractionpcsx2
155f603245 GS/HW: Don't make new scaled targets on shuffles if source is downscaled 2025-06-02 14:52:46 +02:00
refractionpcsx2
cb7630a6ab GS/HW: Create new targets on shuffles when no target found
And get rid of some valid sizing thing which is just insane
2025-06-02 14:52:46 +02:00
refractionpcsx2
284fba1ce3 GS/TC: Don't allow Tex in RT 8bit textures from C24
C24 has no alpha channel, 8bit requires all.  This is still allowed for shuffles as that depends which channel it's reading.
2025-06-02 14:52:46 +02:00
refractionpcsx2
aa4bd6c88c GS/HW: Replace frame target if dirty data matches old format. 2025-06-02 14:52:46 +02:00
refractionpcsx2
623993930b GS/HW: Adjust depth size on clear if overlapping by 1 pixel
This is developer misunderstanding of how to use the SCISSOR register, which adds 1 on to the value when it's used, but they put 512x512, when they wanted 512x512.
2025-06-02 14:52:46 +02:00
refractionpcsx2
dbf2c854c6 GS/TC: Adopt valid rgb/alpha from preload merged targets 2025-06-02 14:52:46 +02:00
refractionpcsx2
25351bc05c GS/TC: Correct valid area checks for target combining 2025-06-02 14:52:46 +02:00
refractionpcsx2
27cc5f499c GS/HW: Fix up alpha blending checks 2025-06-02 14:52:46 +02:00
refractionpcsx2
b7c2f39a17 GS/TC: Further matching parameters on preload and tex in rt 2025-06-02 14:52:46 +02:00
refractionpcsx2
3541c1ccf8 GS/TC: Simplify and improve P8 texture conversion inside target 2025-06-02 14:52:46 +02:00
refractionpcsx2
7a05738d11 GS/TC: Allow matching on source if TEX == RT 2025-06-02 14:52:46 +02:00
refractionpcsx2
686220ae0c GS/TC: Improve copying of dst matched data 2025-06-02 14:52:46 +02:00
refractionpcsx2
cf380d36b9 GS/TC: Fix inside target alignment check for ExactTarget lookup 2025-06-02 14:52:46 +02:00
lightningterror
50bc0193ac Core: Bump savestate version.
[SAVEVERSION+]
2025-06-02 01:30:50 +02:00
refractionpcsx2
2162a72831 GS: Bump GS Dump version and add transfer parameters to dump 2025-06-02 00:40:03 +02:00
refractionpcsx2
313666f85b GS: Store entire GS transfer state at TRXDIR write 2025-06-02 00:40:03 +02:00
TheTechnician27
e9d79263b4 UI: Fix Discord Rich Presence not activating in FSUI 2025-06-01 23:21:39 +02:00
JordanTheToaster
4ede6d65fd GameDB: Fix half right issue with Xtreme Bowling 2025-06-01 13:28:25 -04:00
PCSX2 Bot
14d2eee371 [ci skip] Qt: Update Base Translation. 2025-05-31 20:46:33 -04:00
chaoticgd
717f370be0 Debugger: Improve DockTabBar ownership workaround 2025-05-31 03:30:13 +02:00
refractionpcsx2
d05e4b9727 GS/HW: Adjust SpriteNoGaps check for vertical strips 2025-05-31 03:25:47 +02:00
TheTechnician27
697c53b4d8 UI: Standardize order of option groups 2025-05-31 02:51:20 +02:00
refractionpcsx2
d9b58ec3ce GS/HW: Invalidate single columns on small writes when formats mismatch 2025-05-31 02:49:35 +02:00
refractionpcsx2
6c8b37d7ca GS: Add column sizing to psm format information 2025-05-31 02:49:35 +02:00
refractionpcsx2
39f43e766d GameDB: Add Tex in RT to Sand Grain Studios games 2025-05-31 02:37:16 +02:00
refractionpcsx2
5379a13944 GS/HW: Read back 16bit target if read as 8H 2025-05-31 02:37:16 +02:00
chaoticgd
cd0c1607ef GameList: Clip flag and compatibility pixmaps to the available space 2025-05-31 02:35:34 +02:00
chaoticgd
26a4f71385 GameList: Prevent "Invalid" entry type appearing in filter list 2025-05-31 02:35:34 +02:00
chaoticgd
06b3e6ad71 GameList: Fix region flag icons for non-English languages 2025-05-31 02:35:34 +02:00
lightningterror
79d22a8d77 GS/HW: Add/adjust logs for failed texture creation. 2025-05-31 02:04:12 +02:00
lightningterror
9914212600 GS/GL: Add another hazard check, colclip hw.
Bonus, add missing texture copies info when doing shader copies.
2025-05-31 02:04:12 +02:00
lightningterror
765f55e67b GS/TC: Fine tune Frame buffer conversion. 2025-05-31 01:55:40 +02:00
PCSX2 Bot
2d922cc035 [ci skip] Qt: Update Base Translation. 2025-05-30 15:57:49 +02:00
TellowKrinkle
42e0625ab3 Interpreter: Fix FTOI on negative numbers 2025-05-29 13:15:09 +02:00
TellowKrinkle
c72e894fc7 iR5900: Faster FTOI 2025-05-29 13:15:09 +02:00
JordanTheToaster
5bc2342d47 MemoryCardFile: Fix memory card sorting on Linux 2025-05-29 13:07:27 +02:00
Ty
ea2b0b5e59 CI: Fix a regression for flathub uploads 2025-05-28 19:22:47 -04:00
refractionpcsx2
d70cc0221a GS/DX12: Fix HDR copy scissor area 2025-05-28 22:32:12 +02:00
refractionpcsx2
b12587b44e GameDB: Add Tex in RT for Bard's Tale 2025-05-28 18:33:27 +01:00
refractionpcsx2
c4708bdc35 GameDB: Add Tex in RT to required games 2025-05-28 18:01:49 +02:00
refractionpcsx2
1fa2c0bf50 GS/TC: Replace half right with Tex in RT, only update needed dirty 2025-05-28 18:01:49 +02:00
lightningterror
b4c70d357a GS/HW: Restore old coverage after updating mip layers. 2025-05-28 18:00:45 +02:00
PCSX2 Bot
f18262ee96 [ci skip] PAD: Update to latest controller database. 2025-05-26 21:18:58 +02:00
refractionpcsx2
c1f1761482 GS/HW: Invalidate cleared area if overlapping existing dirty 2025-05-26 13:45:47 +02:00
PCSX2 Bot
067c3eea16 [ci skip] Qt: Update Base Translation. 2025-05-26 02:03:40 +02:00
KamFretoZ
6957cc7001 FSUI: Fix save state duplicate entry 2025-05-26 01:46:30 +02:00
PCSX2 Bot
7dea23eea8 [ci skip] Qt: Update Base Translation. 2025-05-24 20:10:08 -04:00
TheTechnician27
319ec1f774 OSD: Fix performance overlay overwriting dump stats when shifted left 2025-05-24 12:33:32 +02:00
JohnSmith774
2079532e83 GameDB: Add memcard filters for some NTSC-J titles. (#12708)
Add memcard filters for OutRun2 SP - SPECIAL TOURS.
Add memcard filters for Another Century's Episode 2 Special Vocal Version.
Add memcard filters for Armored Core - Last Raven.
2025-05-24 12:32:03 +02:00
Mrlinkwii
de1d646fe9 github-workflows: Fix a broken link. 2025-05-24 12:30:08 +02:00
JordanTheToaster
4bc3ab6285 OSD: Add VSync to the OSD 2025-05-24 05:04:39 +02:00
JordanTheToaster
1adc9cbb49 GameDB: Various Fixes Part 4 (one with cheese) 2025-05-24 05:04:39 +02:00
refractionpcsx2
7cdf5eefc9 GS/TC: On clear delete overlapping depth targets 2025-05-24 05:03:48 +02:00
refractionpcsx2
c7ee72647d GS/HW: Improve texture shuffle/copy detection 2025-05-23 20:33:30 +02:00
Imre Eilertsen
5434af348e GameDB: Add listings for PSX Update Disc. 2025-05-23 13:31:40 +02:00
GovanifY
169cea0f01 docs: update in order to redirect from the GH wiki to our website 2025-05-22 17:43:42 +02:00
lightningterror
a8f3ec8184 GSClut: Get rid of m_read.dirty assert in GetAlphaMinMax32.
Replace it with a log.
2025-05-21 03:40:22 +02:00
lightningterror
7796b2a12b GS/HW: Add sanity/hazard checks for DATE and Texture barriers.
When checking for full barrier, also check if texture barriers
are supported.

Get rid of preprocessSel in DX11, turn off full barrier and related
stuff when not supported in rendererhw instead.

Check if StencilDate types are actually enabled, don't want to turn
it on for any others.
2025-05-21 03:40:22 +02:00
RedDevilus
d9cffd58ba GameDB: Add missing variants + fixes
Some games are missing some gamefixes or other type of fixes. Also added comment for like Energy Airforce where a legacy code never had a comment and removed mtvu for some variant + need to check in future to amend properly. Also missing entry SLPS-25875:
  name: "xxxHolic - Shigatsu Tsuitachi no Izayoi Sowa [Best Collection]"
2025-05-21 00:56:32 +02:00
refractionpcsx2
e566386240 GS/TC: only kill old misaligned targets on preload from previous frames. 2025-05-20 20:21:05 +02:00
refractionpcsx2
45af1e172f GS/HW: Improve shuffle pre-detection 2025-05-20 20:21:05 +02:00
refractionpcsx2
768b2e52a6 GS/TC: Don't allow Tex in RT 32bit target use as 16bit if not a shuffle 2025-05-20 20:21:05 +02:00
Ziemas
7abd2009b0 debugger: fix thread view row lookup 2025-05-20 11:57:11 -04:00
chaoticgd
46f075e891 DebugTools: Fix uninitialized variable in breakpoint code 2025-05-19 22:17:54 -04:00
lightningterror
832c381ac4 GS/HW: Allow partial depth copy on dx12. 2025-05-19 22:10:42 +02:00
SquishyLeaf
e021282264 CI: Fix script building universal dependencies on macOS
- Skip arm64 binaries when looking for x86_64 binaries to merge

- Change Qt download link to archive

- Build universal binaries for libjpegturbo, PlutoVG and PlutoSVG
2025-05-19 14:21:14 -04:00
PCSX2 Bot
2a60d385c6 [ci skip] PAD: Update to latest controller database. 2025-05-19 18:42:36 +02:00
refractionpcsx2
4d37e35675 GS/TC: Delete dirty rt's in src lookup + usert in rt on 3 draw old rt's 2025-05-18 11:13:35 +02:00
refractionpcsx2
df3868a280 GS/HW: Avoid target height mistakes on shuffles + Update new src == rt 2025-05-18 11:13:35 +02:00
lightningterror
0799bb8cf1 GS/DX: DX requires a copy to sample the depth buffer. 2025-05-17 22:54:04 +02:00
lightningterror
69048dede4 GS/DX11: Merge CloneTexture with CopyRect.
Unified between renderers, easier to make shared changes.
2025-05-17 22:54:04 +02:00
lightningterror
76df6d1f43 GS/GL: Check for texture creation hazard for fb copy. 2025-05-17 22:54:04 +02:00
refractionpcsx2
2d03b21f2b Formatting: Clean up some if spaces 2025-05-17 22:47:38 +02:00
refractionpcsx2
62cbd44933 GS/HW: Fix up offset Z behaviour + work even when RT isn't offset. 2025-05-17 22:47:38 +02:00
refractionpcsx2
44c8f6d8b0 GS/HW: Correct valid area for depth when taking alpha from rt. Add Tex in RT to Area 51 2025-05-17 22:47:38 +02:00
refractionpcsx2
f3fc1dd59c GS/HW: Fix some regressions relating to overlapping targets and valid rect + rgb 2025-05-17 22:47:38 +02:00
lightningterror
708931e48b GS/HW: Clean up HandleTextureHazards.
Warnings, initializations, dereferencing null pointers.
2025-05-17 22:46:37 +02:00
TheLastRar
81800d2883 CMake: Support more package configurations to import with a Devel build 2025-05-17 09:39:56 -04:00
TellowKrinkle
d0411d7ddf Core:macOS: Initialize all address variables passed to vm_map 2025-05-16 12:41:09 +02:00
Ty
70e232cab3 GitHub: Make authors disclose whether they used AI or not.
Using checkboxes implicitly made it a task list that cluttered up the PR list.

[ci skip]
2025-05-16 12:27:15 +02:00
refractionpcsx2
f90396bda4 GS/DX12: Fix command list not flushing when in surfaceless mode. 2025-05-16 12:25:16 +02:00
lightningterror
ae8808b86e GS/HW: Backport some tex is fb shaders to dx and opengl. 2025-05-15 20:08:16 +02:00
lightningterror
8d5b827432 GS/HW: Fix texture copies when tex is fb draw.
Fixes an issue with texture copies didn't work properly on tex is fb draw:
Fixes Hitman Blood Money on minimum blend.

DX can't do partial depth copy so do a shader based copy which works.
Fixes a bunch of games that couldn't do partial depth copy on dx.
2025-05-15 20:08:16 +02:00
lightningterror
cb672697e7 FullscreenUI: Fix -Wlogical-op-parentheses warning. 2025-05-15 20:08:16 +02:00
JordanTheToaster
0bae9fc29b Deps: Update SDL3 to 3.2.14 2025-05-15 18:43:45 +02:00
lightningterror
49c8b68700 GS/HW: Enable feedback loop if channel shuffle enabled barriers. 2025-05-15 18:43:35 +02:00
refractionpcsx2
1e2fcd17e0 GS/HW: Fix new target creation width when doing a page copy 2025-05-15 01:45:11 +02:00
refractionpcsx2
468b9d2655 GS/TC: Use frame width on PSMT8H read if target width doesn't match frame on Tex in RT.
Also changed LookupSource/Depth to receive the whole FRAME struct, not just the pointer.
2025-05-15 01:45:11 +02:00
refractionpcsx2
a3305ff791 GS/TC: Used unwrapped end blocks for combine 2025-05-15 01:45:11 +02:00
PCSX2 Bot
814b0d5873 [ci skip] Qt: Update Base Translation. 2025-05-13 20:00:55 +02:00
refractionpcsx2
863f3e82ac GS/HW: Combine target using the drawn area, not valid area (some of this can be garbage) 2025-05-13 19:56:39 +02:00
Ty
529c756458 GitHub: Require PR authors to disclose AI usage
[noci]
2025-05-12 18:12:02 -04:00
TheLastRar
67b98dbdaa Deps: Also build KDDockWidgets as Debug 2025-05-12 22:35:07 +02:00
TheLastRar
a16981cbe5 CMake: Pick release packages when building with devel 2025-05-12 22:35:07 +02:00
lightningterror
777bf338fa GS/HW: Fix tex is fb log for palette conversion. 2025-05-12 22:23:14 +02:00
lightningterror
3ba8d9ebff GS/HW: Move texture sampling before EmulateBlending.
Tex is fb setting is done in Texture sampler which resulted
in hw blend being applied before with barriers on.

Tex is fb can use sw blend so this optimizes that with no cost.

Also fixes an issue where hw blend was on with fbfetch.
2025-05-12 21:40:51 +02:00
lightningterror
db5384e19c GS/HW: Add hazard check for date depth buffer creation.
Add fallback to PrimIDTracking if possible.
2025-05-12 21:39:43 +02:00
lightningterror
fd3984287b GS/HW: Add hazard check for temporary depth buffer creation. 2025-05-12 21:39:43 +02:00
lightningterror
31dbea4e0b GS: Retry texture creation after initial retry fails.
This should've been done.
2025-05-12 21:39:43 +02:00
refractionpcsx2
0992e784f1 GS/HW: Tighten shuffle check on source lookup 2025-05-12 21:28:41 +02:00
refractionpcsx2
c59cc1fbb7 GS/TC: Kill partially dirty RT in RT targets which haven't been used recently 2025-05-12 21:28:41 +02:00
refractionpcsx2
903edc79f7 GS/TC: Alter RT in RT target lookup further and expand target on Move if needed 2025-05-12 21:28:41 +02:00
refractionpcsx2
4c94c69f02 GS: Clear Adaptive Interlacing buffer when outputs are disabled 2025-05-12 21:28:41 +02:00
refractionpcsx2
4c57c214bd GS/HW: Expand target to fix requested source rect when dirty covers area 2025-05-12 21:28:41 +02:00
refractionpcsx2
1cbeea3016 GS/HW: Fix up inside target lookup behaviour in HW renderer 2025-05-12 21:28:41 +02:00
PCSX2 Bot
0d18738192 [ci skip] PAD: Update to latest controller database. 2025-05-12 21:01:31 +02:00
JordanTheToaster
1e7c7db29b GameDB: Various Fixes Part 3 Because I Forgot More 2025-05-12 01:05:14 +02:00
PCSX2 Bot
7c098a2665 [ci skip] Qt: Update Base Translation. 2025-05-11 02:02:52 +02:00
Ty
3ab539be1e CDVD: Fix for non-PCH builds 2025-05-10 15:38:02 -04:00
Ty
b46d5e4efc CI: Disable PCH on Linux 2025-05-10 15:38:02 -04:00
Jordan
db06e11a7c GameDB: RT in RT Part Deux.
Adds fixes such as ATNWTO to around 104 games and adjusts the names of even more. Don't ask me what I fixed I don't even remember at this point.
2025-05-10 19:54:21 +02:00
KamFretoZ
757ed33e4f FSUI: Add ImDrawList helper for drawing SVG images
Co-Authored-By: TheLastRar <TheLastRar@users.noreply.github.com>
2025-05-10 19:53:04 +02:00
KamFretoZ
8eb5dfce85 Qt/FSUI: Update branding to the about section 2025-05-10 19:53:04 +02:00
PCSX2 Bot
f34db72a97 [ci skip] Qt: Update Base Translation. 2025-05-09 18:13:36 -04:00
chaoticgd
3dfdc8ee6f Debugger: Fix a typo in the memory search view 2025-05-08 22:16:38 +02:00
chaoticgd
5a846296ca Docs: Add even more missing third party licenses 2025-05-08 09:23:22 -04:00
lightningterror
0bea015dcd GS/HW: Adjust blending when tex is fb.
Prefer sw blend when it's a channel shuffle with barriers enabled.
Prefer sw blend if it's tex is fb when there is no overlap, fb is already
being read so we can use sw blend.
Swap full barriers with one barrier if it's a channel shuffle,
prims shouldn't overlap anyway.
2025-05-08 05:05:49 +02:00
Ziemas
fe0b401edd vtlb: silence backpatch log spam
Since this works well right now I don't think we need this.
2025-05-07 19:46:33 +02:00
Ziemas
69f8e82c3f gs: Missing cmath include 2025-05-07 19:31:44 +02:00
chaoticgd
79d3d43a85 Docs: Update Zydis license 2025-05-07 14:40:51 +02:00
chaoticgd
e8a7f596bc Docs: Update LZ4 license 2025-05-07 14:40:51 +02:00
chaoticgd
a096c00b68 Docs: Escape third party license text with HTML entities 2025-05-07 14:40:51 +02:00
chaoticgd
e284ef8906 Docs: Add index section to third party licenses file 2025-05-07 14:40:51 +02:00
chaoticgd
154a8750dc Docs: Add more missing third party licenses 2025-05-07 14:40:51 +02:00
chaoticgd
0de4ca4a19 Docs: Sort third party licenses alphabetically 2025-05-07 14:40:51 +02:00
lightningterror
23c9c9f72e GS/TC: Also update tc logs with prefixes. 2025-05-07 14:39:12 +02:00
lightningterror
96ff10c692 GS/HW: Update logs.
Cleanup/remove some logs, name them properly with HW prefix.
2025-05-07 14:39:12 +02:00
lightningterror
30bc7ea132 GSDumpRunner: Fix some userhack arguments not working. 2025-05-07 13:39:12 +02:00
lightningterror
d9ea1591b0 GS/HW: Enable tex-is-fb on channel shuffles when barriers aren't supported. 2025-05-07 02:50:24 +02:00
PCSX2 Bot
0cc1bb5ad8 [ci skip] Qt: Update Base Translation. 2025-05-07 02:08:22 +02:00
TheLastRar
509bbd7605 Qt: Allow translating the default adapter text
Strangely, the needed logic was already present (but partly unused)
Also adjust loading logic to match 1b50057764
2025-05-05 22:12:15 -04:00
PCSX2 Bot
4632afe1ab [ci skip] PAD: Update to latest controller database. 2025-05-05 19:25:52 +02:00
JordanTheToaster
6680698ba6 Deps: Update SDL to 3.2.12 2025-05-05 19:25:41 +02:00
JordanTheToaster
2b06b12ca2 3rdparty: Update googletest to v1.16.0 2025-05-05 19:25:41 +02:00
JordanTheToaster
9b53916e06 Deps: Update harfbuzz to 11.2.0 2025-05-05 19:25:41 +02:00
JordanTheToaster
f3ce1dd7a3 Deps: Update libpng to 1.6.48
a
2025-05-05 19:25:41 +02:00
JordanTheToaster
91b0426d68 Deps: Update LZ4 to v1.10.0 2025-05-05 19:25:41 +02:00
TheTechnician27
63a5b95939 Audio: Fix global settings overriding per-game ones 2025-05-04 21:55:22 +02:00
Gilad
480a3fe171 GameDB: Add HPO:ATN to Fatal Frame III 2025-05-04 21:32:41 +02:00
Gilad
b160eac49f GameDB: Add ATNTWO to Fatal Frame III 2025-05-04 21:32:41 +02:00
ElTioRata
37ba82b8b7 GameDB: HPO Native w/TO for Resident Evil Dead Aim
Fixes water lines on sewer levels.
2025-05-04 21:31:10 +02:00
chaoticgd
2d604145f1 Docs: Remove advertising gunk from GPL license file 2025-05-04 14:55:45 +02:00
chaoticgd
d60a6df313 Docs: Improve formatting of third party licenses 2025-05-04 14:55:45 +02:00
chaoticgd
236d9e3028 Docs: Add missing third party licenses 2025-05-04 14:55:45 +02:00
chaoticgd
175327e711 Docs: Update LGPL remnant 2025-05-04 14:55:45 +02:00
lightningterror
6342f99504 GS/HW: Fix copy range for shuffles.
We should be using the sizes based on source instead of target
when clamping depth range.
2025-05-04 09:07:45 +02:00
PCSX2 Bot
6164ae9f60 [ci skip] Qt: Update Base Translation. 2025-05-03 20:08:13 -04:00
JordanTheToaster
d2a5b70b2e GS/HW: Remove Haunting Ground CRC 2025-05-03 15:07:38 +02:00
TheLastRar
b2be5dcb59 FSUI: Remove unimplemented function 2025-05-03 15:00:31 +02:00
TheLastRar
b67c03cc75 FSUI: Fix CenterImage() fill when using ImRect for fit 2025-05-03 15:00:31 +02:00
TheLastRar
d613701780 CMake: Support PlutoVG 1.0.0
We still use PlutoVG 0.0.13 as that is the latest PlutoSVG can build with
2025-05-03 15:00:31 +02:00
TheLastRar
4b62562fce Deps: Build PlutoVG as shared on Linux
Was already built as shared on other platforms
2025-05-03 15:00:31 +02:00
KamFretoZ
6ffaca45da Qt: Fix crashing per-game achievement sound effect settings 2025-05-03 08:16:29 -04:00
refractionpcsx2
56fe0b32e6 GS/HW: Detect double buffers when Z not offset during RT in RT 2025-05-03 03:44:30 +01:00
PCSX2 Bot
f7c0d6af73 [ci skip] Qt: Update Base Translation. 2025-05-01 20:16:27 -04:00
JordanTheToaster
b625e2c47a UI: Remove fractional upscales 2025-05-01 20:24:24 +02:00
refractionpcsx2
97300d59a9 GS/HW: Fixing regressions with readbacks + preloading 2025-05-01 19:28:21 +02:00
PCSX2 Bot
f45840a29f [ci skip] Qt: Update Base Translation. 2025-04-30 20:30:49 -04:00
dependabot[bot]
bfff6ed406 Bump softprops/action-gh-release in the ci-deps group
Bumps the ci-deps group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `softprops/action-gh-release` from 2.2.1 to 2.2.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](c95fe14893...da05d55257)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-30 22:55:01 +02:00
KamFretoZ
ad6f5fd6af Savestate: Add backup slot loading ability 2025-04-30 22:53:26 +02:00
TheLastRar
7bdf349b9d Resources: Resize viewport of flag icons to content
Adds icons resized by KamFretoZ and make the necessary adjustments to Qt and FSUI code.

Co-Authored-By: KamFretoZ <14798312+kamfretoz@users.noreply.github.com>
2025-04-30 22:45:04 +02:00
TheLastRar
9412fbcefb FSUI: Use SVG icons for flags and stars 2025-04-30 22:45:04 +02:00
TheLastRar
c2af0097c5 3rdparty: Always enable ImGui math operators 2025-04-30 22:45:04 +02:00
TheLastRar
9e5b69ee54 Deps: Add Pluto(S)VG 2025-04-30 22:45:04 +02:00
lightningterror
f6e0d1d368 common-linux: Fix -Wformat warnings. 2025-04-30 22:43:23 +02:00
lightningterror
5bb18bee17 GS/GL: Guard/track PopDebugGroup calls.
Fixes GL_STACK_UNDERFLOW and GL_INVALID_VALUE issues which spammed the log.
2025-04-30 22:43:23 +02:00
lightningterror
d0fb219939 Misc: Fix compiler warnings. 2025-04-30 22:43:23 +02:00
refractionpcsx2
e2b04726cf GS/HW: Fix a crash on close and old target mem leak 2025-04-30 22:10:35 +02:00
refractionpcsx2
b293cdc9ba GS/HW: Merge contained targets when expanding target backward. 2025-04-30 22:10:35 +02:00
lightningterror
3f93b3a39d GS/HW: Update y region if the source is expected to be in the same target. 2025-04-29 21:56:53 +02:00
lightningterror
a4de6e45db GS/HW: Fix ResizeTexture not getting the proper new_drect values. 2025-04-29 21:56:53 +02:00
lightningterror
213a89ab72 GS/HW: Also unlink source texture from target before deletion on z draws. 2025-04-29 08:56:13 +02:00
lightningterror
8dcca62d0c GS/HW: Make sure we pass src to PreloadTarget. 2025-04-29 00:29:39 +02:00
PCSX2 Bot
4ed0bcbda8 [ci skip] PAD: Update to latest controller database. 2025-04-28 23:47:02 +02:00
refractionpcsx2
b2587e676d GS/TC: Fix possible divide by zero error 2025-04-27 23:58:17 +01:00
JordanTheToaster
90af9b2f01 GS/HW: Use correct vertex colour on target clear 2025-04-26 23:22:53 +02:00
lightningterror
d915a0b945 GS/Shaders: Try to fix Warning X4000: FxaaPixelShader potentially uninitialized variable. 2025-04-26 21:39:53 +02:00
Mrlinkwii
ac9c5eaae9 issues/Github : remove unused links
[skip-ci]
2025-04-26 21:36:16 +02:00
lightningterror
0891da303c GS/HW: Unlink source texture from old target before deletion.
DT Racer hits this path and causes a crash when RT in RT is disabled, so let's make sure source and target texture isn't linked/shared before deleting the target.
2025-04-26 09:37:36 +02:00
refractionpcsx2
55e9b51faa GS/HW: Only reuse dirty targets that were recently accessed 2025-04-26 09:36:57 +02:00
PCSX2 Bot
55dc0ade47 [ci skip] Qt: Update Base Translation. 2025-04-25 20:24:43 -04:00
Sean
2cf7083718 Debugger: Add breakpoint description label (#12534) 2025-04-25 18:08:09 -04:00
refractionpcsx2
15df532d68 GS: Improve TrianglesAreQuads check to make sure 2 edges match a previous triangle 2025-04-25 14:26:03 +02:00
refractionpcsx2
884d2302a9 GS/HW: Fix up some regressions from RT in RT 2025-04-25 14:26:03 +02:00
KamFretoZ
bacdfd6018 FSUI/BPM: Fix icon 2025-04-25 11:29:59 +02:00
PCSX2 Bot
dc7a3bbbd3 [ci skip] Qt: Update Base Translation. 2025-04-25 11:29:41 +02:00
chaoticgd
ff0d791783 Debugger: Use a consistent context string when translating layout names 2025-04-24 19:45:46 -04:00
chaoticgd
a3d8a0dde0 Debugger: Add dummy actions to the Tools and Windows menus 2025-04-24 19:44:45 -04:00
PCSX2 Bot
a8c908d113 [ci skip] Qt: Update Base Translation. 2025-04-24 02:07:06 +02:00
Filoppi
01849d5305 GS: Allow for widescreen and ultrawide patches to specify their target aspect ratio.
This allows users with monitors of any aspect ratios to use patches made for any other aspect ratio.
For example, if on 32:9 one uses a 21:9 patch, pcsx2 will automatically size the presentation to 21:9 within 32:9.
This also removes some ugly or hardcoded stuff from the code :).
It also opens the door to add a "Custom" user aspect ratio, without the patch needing to specify the aspect ratio, so users could stretch the image to any AR they'd like, but for now there's no need to add that.

(cherry picked from commit 3ae2520aa19efe32d8d0c12b2b174dcd3d3bc745)
2025-04-22 21:36:50 -04:00
PCSX2 Bot
23968d3e2b [ci skip] Qt: Update Base Translation. 2025-04-22 20:02:33 -04:00
lightningterror
7246a64ae5 VMManager: Also add GB for the ram info. 2025-04-22 10:00:11 +02:00
lightningterror
729e050adb common-mac: Add some comments to GetAvailablePhysicalMemory. 2025-04-22 10:00:11 +02:00
lightningterror
003452fbbb common-linux: Try to read cached/buffered memory using MemAvailable.
Add two fallbacks if MemAvailable isn't available:
1. Add manual approximation/Linux-like heuristic fallback.
2. Add sysinfo if manual approximation fails.
2025-04-22 10:00:11 +02:00
lightningterror
419b6bd0a3 CDVD: Adjust precache osd to display decimal value for required ram. 2025-04-22 10:00:11 +02:00
PCSX2 Bot
668c3d9a08 [ci skip] PAD: Update to latest controller database. 2025-04-21 18:51:11 +02:00
Ty
9a6f878051 CI: Use the upstream Flatpak action
https://github.com/flathub-infra/flatpak-github-actions/issues/17
2025-04-21 11:21:10 -04:00
PCSX2 Bot
50fc750154 [ci skip] Qt: Update Base Translation. 2025-04-20 09:37:04 -04:00
Mrlinkwii
9fe8235eda tool : update generate_redump_yaml.py 2025-04-19 17:37:54 +02:00
Mrlinkwii
f7b9c48998 Deps: update redump database 2025-04-19 17:37:54 +02:00
lightningterror
17bf27c018 GS/DX12: Copy/bind rt when tex is fb on slot 0. 2025-04-19 17:05:22 +02:00
lightningterror
80ca5ea5fd GS/HW: Rename GSC_Tekken5 to GSC_NamcoGames.
Multiple games use it.
2025-04-19 16:52:26 +02:00
lightningterror
3afa9ca403 VMManager: Add available ram info in log. 2025-04-19 13:41:41 +02:00
lightningterror
842190e15e CDVD: Adjust ram requirements when precaching on linux/Mac. 2025-04-19 13:41:41 +02:00
PCSX2 Bot
717775d9ab [ci skip] Qt: Update Base Translation. 2025-04-19 05:39:57 +02:00
GregoireLD
a19bb91041 GameDB: Add a new Ico version (#11103) 2025-04-18 13:33:51 -04:00
Filoppi
a545982a28 GS: Fix crash if CAS pipeline failed to compile (it'd crash when the user enables CAS, which is still enough of a good reason to make the whole rendering backend fail to initialize) 2025-04-18 19:11:11 +02:00
Filoppi
2109df04ca GS: Remove duplicate shader creation for RTA correction. The same shader would have been created just above. 2025-04-18 19:11:11 +02:00
Filoppi
f485cf8ebc GS: fix more badly named debug objects 2025-04-18 19:11:11 +02:00
Filoppi
bb48110f95 GS: Fix VK also naming the wrong pipelines 2025-04-18 19:11:11 +02:00
Filoppi
718adda749 GS: Fix DX12 setting the object names for the wrong pipelines (possibly causing random memory writes), also fix some bad naming 2025-04-18 19:11:11 +02:00
Filoppi
a170c7ccb1 GS: Fix DX12 m_color_copy shaders not applying the right RTA_CORRECTION offset (see the VK implementation, which is identical except for this issue) 2025-04-18 19:11:11 +02:00
Filoppi
fec3fe3b6b GS: Add DX11 shaders debug names 2025-04-18 19:11:11 +02:00
Filoppi
00f19c9777 GS: Fix displays that are currently unplugged (disabled) from throwing unnecessary warnings 2025-04-18 19:11:11 +02:00
Filoppi
93aae28593 GS: Polish spacing and comments 2025-04-18 19:11:11 +02:00
Filoppi
8be2b907b3 GS: Add actual HDR and HQ textures and rename the "HDR" textures to colclip (hw) given that's actually what they are (HDR was a very loose term for it) 2025-04-18 19:11:11 +02:00
Filoppi
fcca07765b GS: Clarify HW blends code a bit 2025-04-18 19:11:11 +02:00
EXtremeExploit
559e4e75eb GameDB: Add memcard filters for Mortal Kombat Armageddon Premium 2025-04-18 10:10:16 -04:00
TheLastRar
8ae84614d5 SDLInputSource: Support auto mapping pressure sense buttons
Also provide UI strings and icons
2025-04-18 10:09:48 -04:00
TheLastRar
18a7e8b22c SDLInputSource: Enable support for the Sixaxis driver on Windows 2025-04-18 10:09:48 -04:00
Immersion95
01120f6120 GameDB: Adds Software FMV hack to Soulcalibur 2/3 Games
Fixes https://github.com/PCSX2/pcsx2/issues/2852
2025-04-18 02:44:08 +02:00
TheLastRar
07be6bb5ae DEV9: Ignore UDP socket ICMP errors on recv
These where already ignored on send
2025-04-18 02:39:06 +02:00
TheLastRar
39b4905ef1 DEV9: Fix race condition when handling closed socket connections 2025-04-18 02:39:06 +02:00
TheLastRar
6c49a5aa9d DEV9: Fix race condition in UDP sockets 2025-04-18 02:39:06 +02:00
TheLastRar
aaeff2ea0f DEV9: Deduplicate some UDP sockets code 2025-04-18 02:39:06 +02:00
PCSX2 Bot
cd48e78667 [ci skip] Qt: Update Base Translation. 2025-04-18 02:28:36 +02:00
KamFretoZ
f2ab4e840e Qt: Change Default Theme 2025-04-18 02:28:15 +02:00
dependabot[bot]
9a476f8283 Bump @octokit/request and @octokit/plugin-throttling
Bumps [@octokit/request](https://github.com/octokit/request.js) to 9.2.2 and updates ancestor dependency [@octokit/plugin-throttling](https://github.com/octokit/plugin-throttling.js). These dependencies need to be updated together.


Updates `@octokit/request` from 5.6.2 to 9.2.2
- [Release notes](https://github.com/octokit/request.js/releases)
- [Commits](https://github.com/octokit/request.js/compare/v5.6.2...v9.2.2)

Updates `@octokit/plugin-throttling` from 3.5.2 to 9.6.0
- [Release notes](https://github.com/octokit/plugin-throttling.js/releases)
- [Commits](https://github.com/octokit/plugin-throttling.js/compare/v3.5.2...v9.6.0)

---
updated-dependencies:
- dependency-name: "@octokit/request"
  dependency-version: 9.2.2
  dependency-type: indirect
- dependency-name: "@octokit/plugin-throttling"
  dependency-version: 9.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-17 19:32:38 -04:00
lightningterror
8e24ad724c CDVD: Adjust ram requirements when precaching. 2025-04-17 18:59:14 -04:00
TheLastRar
c70aba2ca5 Common: Allow shared reading of log files 2025-04-17 18:57:36 -04:00
refractionpcsx2
c6a20961b8 GS/HW: Improve quad detection on triangle strips 2025-04-17 18:54:33 -04:00
refractionpcsx2
4741354883 GS/HW: Clamp native scaling texture read size to texture size
Fixes Transformers light rays
2025-04-17 18:54:33 -04:00
refractionpcsx2
a3051f5d58 GS/HW: More RT in RT regression fixes/improvements 2025-04-17 18:54:33 -04:00
refractionpcsx2
730207e75b GS/HW: Do not set a source region when using channel shuffles or tex is rt 2025-04-17 18:54:33 -04:00
refractionpcsx2
27e067889d GS/HW: Try to improve first barrier placement for Metal, Vulkan and OGL 2025-04-17 18:54:33 -04:00
refractionpcsx2
22c9433c1c GS/HW: Split out invalidation in case RT processing invalidates Z, causing a use after free 2025-04-17 18:54:33 -04:00
refractionpcsx2
c6b558cb3d GS/HW: Fix up source region behaviour 2025-04-17 18:54:33 -04:00
refractionpcsx2
a6d5598c08 GS/HW: More RT in RT regression fixes 2025-04-17 18:54:33 -04:00
refractionpcsx2
13ee2abeef GS/HW: Fix some clear behaviour 2025-04-17 18:54:33 -04:00
refractionpcsx2
ca9c841477 GS/HW: Attempt to reduce the load of copies for offset Z 2025-04-17 18:54:33 -04:00
refractionpcsx2
0dbae3c46c GS/HW: Reduce number of targets in pool when doing channels shuffles 2025-04-17 18:54:33 -04:00
refractionpcsx2
045bcbc7da GS/HW: More RT in RT regression fixes and adjustments
Restored the Z clear CRC hack for Battlefield 2, it's probably the least invasive one and the most difficult one to emulate, it was still problematic.
2025-04-17 18:54:33 -04:00
refractionpcsx2
9f98e28b08 GS/HW: Fix Z Tex in RT regions + read back sources for SW if needed 2025-04-17 18:54:33 -04:00
refractionpcsx2
59dfbae9b4 GS/HW: Disable per page split shuffle when RT in RT is enabled 2025-04-17 18:54:33 -04:00
refractionpcsx2
3f0250957b GS/HW: Fix more regressions with RT in RT 2025-04-17 18:54:33 -04:00
refractionpcsx2
73595d93f3 GS/HW: Fix some format conversion scaling problems 2025-04-17 18:54:33 -04:00
refractionpcsx2
19b8755c89 GS/HW: Support RT in RT in SW renderer fallback check 2025-04-17 18:54:33 -04:00
refractionpcsx2
14aad730de GS: Code cleanup at the behest of Const-Man 2025-04-17 18:54:33 -04:00
refractionpcsx2
6c7eec5778 GS/HW: Don't allow Tex in RT if not contained 2025-04-17 18:54:33 -04:00
refractionpcsx2
2c5ce5763a GS/HW: Intercept excessively large clears 2025-04-17 18:54:33 -04:00
refractionpcsx2
b568e1387a GS/HW: Allow offsetting in to a target if full contained. 2025-04-17 18:54:33 -04:00
refractionpcsx2
85bd46e457 GameDB-GS/HW: Remove Battlefield 2 CRC hacks, add Tex Inside RT instead 2025-04-17 18:54:33 -04:00
refractionpcsx2
bd4a77992e GS/HW: Predict valid sizes based on repeated draws and scissor
- this should be okay/limited to certain situations like Battlefield 2. Scissor isn't 100% guaranteed to be right, but it's probably better than nothing.
2025-04-17 18:54:33 -04:00
refractionpcsx2
a8750ce8ad GS/HW: Check all overlapping pages when clearing sources 2025-04-17 18:54:33 -04:00
refractionpcsx2
4e8887c80b GameDB: Adjust fixes for games affected by RT in RT 2025-04-17 18:54:33 -04:00
refractionpcsx2
c38a0cdec9 GS/HW: Don't update TBP on targets + make target src's temporary 2025-04-17 18:54:33 -04:00
refractionpcsx2
6f961edcb1 GS/HW: Remove no longer required CRCs 2025-04-17 18:54:33 -04:00
refractionpcsx2
bdd9f30404 GS: Add CRC hack for Guitar Hero 3 to handle crowds 2025-04-17 18:54:33 -04:00
refractionpcsx2
f94d5faaf2 GS/HW: Further fixes and rewrite of AlignedRectTranslate 2025-04-17 18:54:33 -04:00
refractionpcsx2
c1ffd93f28 GS/HW: Fix up shuffle behaviour and affected areas
- Channel shuffles now check how many pages require drawing before doing the shuffle.
- Split texture shuffles don't create new targets with bad valid areas.
2025-04-17 18:54:33 -04:00
refractionpcsx2
05bf7af859 GS/HW: Further fixes to HW renderer behaviour 2025-04-17 18:54:33 -04:00
refractionpcsx2
eae359a3b8 GS/HW: Don't interfere with Tales/Urban Chaos HLE shuffles 2025-04-17 18:54:33 -04:00
refractionpcsx2
2156906341 GS/HW: Allow 1:1 quads to be optimized for textures. Fixes for shuffles 2025-04-17 18:54:33 -04:00
refractionpcsx2
e7bd669362 GS/HW: Centralize new target resizing calls to fix statistics/tidy up
Also add an override for GSVector4i loadl to take a GSVector2i
2025-04-17 18:54:33 -04:00
refractionpcsx2
17ac5b5e06 GS/HW: Fixes for Tex in RT and shuffle detection 2025-04-17 18:54:33 -04:00
refractionpcsx2
671cc753b5 GS/HW: Sync depth texture information when updating dst_match 2025-04-17 18:54:33 -04:00
refractionpcsx2
fd81b47413 GS/HW: Fix some back to back shuffles and inside source invalidation 2025-04-17 18:54:33 -04:00
refractionpcsx2
710b07a857 GS/HW: Fix offset Z channel shuffle hazard. Adjust Tekken 5 CRC 2025-04-17 18:54:33 -04:00
refractionpcsx2
5b93d2642b GS/HW: More changes some regressions 2025-04-17 18:54:33 -04:00
refractionpcsx2
38d792fd97 GS/HW: More alterations for new RT in RT system 2025-04-17 18:54:33 -04:00
refractionpcsx2
fed266f5ac GS/HW: Fixes to texture is target offsets 2025-04-17 18:54:33 -04:00
refractionpcsx2
a547d10ab9 GS/HW: Further fixes for RT in RT changes in behaviour 2025-04-17 18:54:33 -04:00
refractionpcsx2
4cc6043737 GS/HW: Further RT in RT changes to improve compatibility 2025-04-17 18:54:33 -04:00
refractionpcsx2
0a42313b6f GS/HW: Further fixes to RT in RT - Still a ways to go... 2025-04-17 18:54:33 -04:00
refractionpcsx2
0b53f541d1 GS/HW: Initial work implementing RT in RT support 2025-04-17 18:54:33 -04:00
PCSX2 Bot
ddd17b18d7 [ci skip] Qt: Update Base Translation. 2025-04-16 02:02:30 +02:00
KamFretoZ
915f4cc618 Qt: Update Game type and flag icons 2025-04-16 01:44:59 +02:00
KamFretoZ
d4d9b3e461 Qt: Add SVG compats star icon
Qt: Center compatibility stars icon
2025-04-16 01:44:59 +02:00
KamFretoZ
49f5221170 Qt: Add SVG regional flags 2025-04-16 01:44:59 +02:00
KamFretoZ
96459090a6 Qt: Change game list disc icon to its svg counterpart 2025-04-16 01:44:59 +02:00
JordanTheToaster
ccc8b38b77 GameDB: Switch Rule of Rose to SoftwareFMV 2025-04-16 01:41:23 +02:00
PCSX2 Bot
c6d1c8063b [ci skip] Qt: Update Base Translation. 2025-04-15 02:05:23 +02:00
chaoticgd
0ffb6d6362 Debugger: Rename DebuggerView subclasses 2025-04-14 18:48:36 -04:00
chaoticgd
252aaa500e Debugger: Rename DebuggerWidget to DebuggerView 2025-04-14 18:48:36 -04:00
chaoticgd
d456908e37 Debugger: Don't save UI layouts unnecessarily after loading them 2025-04-14 18:48:36 -04:00
chaoticgd
cd13bfb429 Debugger: Revise file format for UI layouts 2025-04-14 18:48:36 -04:00
lightningterror
ff87bc5889 GS: Use inclusive req factor of 1 for sw renderer.
Workaround until the issue can be properly fixed.
2025-04-14 23:02:43 +02:00
Rares-Alexandru Fodor
42cd80c172 UI: Fix vertical alignment of achievement progress text 2025-04-14 23:02:19 +02:00
TheLastRar
123cd3a092 Qt: Centre region flags in game list 2025-04-14 18:11:48 +02:00
TheLastRar
cbc3c4e6eb Qt: Fix broken icon styling in Win11 theme 2025-04-14 18:11:48 +02:00
PCSX2 Bot
b50e39e5cb [ci skip] PAD: Update to latest controller database. 2025-04-14 18:11:21 +02:00
PCSX2 Bot
bbe5ef451a [ci skip] Qt: Update Base Translation. 2025-04-12 20:54:51 -04:00
chaoticgd
c359c0e747 Debugger: Add setting to change UI refresh interval 2025-04-12 12:26:32 -04:00
TheLastRar
99ecb0b60f SDLInput: Set BPM legacy Nintendo layout when migrating non-Xbox layout binds 2025-04-12 12:25:19 -04:00
TheLastRar
cfc7e45020 FSUI: Add option to use legacy SDL2 Nintendo layout 2025-04-12 12:25:19 -04:00
TheLastRar
0307d064ad MSBuild: Update QtUi includes 2025-04-12 12:24:18 -04:00
TheLastRar
89cd824c70 MSBuild: Improve QtMoc tasks 2025-04-12 12:24:18 -04:00
TheLastRar
1066e8a5e9 MSBuild: Adjust how MSBuild handles Qt ui files 2025-04-12 12:24:18 -04:00
JordanTheToaster
d2c31df106 GS/HW: Mask 16bit colours when blending is disabled 2025-04-12 01:50:37 +02:00
PCSX2 Bot
a56ffee8f7 [ci skip] Qt: Update Base Translation. 2025-04-11 02:10:28 +02:00
JordanTheToaster
7c798126e3 GameDB: Fix broken FMVs in Clock Tower 3 2025-04-10 18:47:28 -04:00
KamFretoZ
a755131488 Qt: Enable Savestate Selector UI by default
This should've been enabled by default but I've missed the part that actually enables it.
2025-04-10 19:00:46 +02:00
KamFretoZ
648ff65a76 Rcheevos: Add customizable sound effects 2025-04-10 19:00:46 +02:00
Sean
854d1c0a1a Debugger: Add column titles to Disassembly view.
Added new column title row to the "Disassembly" view in the debugger. Title row is non-selectable (single/double/right clicking on row do nothing) and branch lines do not get drawn on the title row. Format of title row was based on similar, existing title row on the VU0f tab in the "Registers" view.
2025-04-10 18:59:49 +02:00
KamFretoZ
4f561aa9e9 Qt/Cheats: Add tooltip to cheat descriptions 2025-04-08 12:26:29 +02:00
PCSX2 Bot
8c1c4df10d [ci skip] PAD: Update to latest controller database. 2025-04-08 12:25:48 +02:00
PCSX2 Bot
a9e963e84b [ci skip] Qt: Update Base Translation. 2025-04-06 20:06:38 -04:00
JordanTheToaster
4a509610fe GameListWidget: Enable mouse tracking 2025-04-06 22:07:23 +02:00
JordanTheToaster
7de5066c87 VMManager: Add warning for debug device 2025-04-06 19:07:53 +02:00
JordanTheToaster
24b1be1dd2 OSD: Append debug device so Kam doesn't forget 2025-04-06 19:07:53 +02:00
JordanTheToaster
ee00213961 PerformanceMetrics: Revert increased update rate
It seems our OSD does not like updating at 0.25 per tick so let's just go back for now.
2025-04-06 19:07:53 +02:00
JordanTheToaster
b51b32c758 UI: Move Skip Presenting Duplicate Frames to Emulation Tab 2025-04-06 19:07:53 +02:00
JordanTheToaster
d16e669538 GameListWidget: Bodge broken icon styling in native theme
Still a bodge but this will fix the styling being missing on every other line on the type column.
2025-04-06 19:05:43 +02:00
JordanTheToaster
50d258fae9 Deps: Update Windows and Linux to Qt 6.9.0 2025-04-06 19:05:43 +02:00
chaoticgd
494cceff73 Deps: Update KDDockWidgets to 2.2.3 2025-04-05 20:50:54 +02:00
PCSX2 Bot
9885e61962 [ci skip] Qt: Update Base Translation. 2025-04-05 20:48:45 +02:00
chaoticgd
4b88a290c4 Qt: Destroy settings save timer before quitting 2025-04-05 00:48:54 +02:00
chaoticgd
ee8335e5f1 Debugger: Prevent blinking animation when stepping 2025-04-05 00:47:56 +02:00
JimScript
fcde7fdb80 GameDB: R&C Size Matters HPO Native with Texture Offset 2025-04-04 10:57:32 -04:00
JimScript
3d42da3e97 GameDB: R&C Size Matters HPO Native with Texture Offset 2025-04-04 10:57:32 -04:00
Berylskid
c81a37b740 GameDB: HPO update for Armored Core games 2025-04-04 02:31:08 +02:00
ElTioRata
4fa005ade0 GameDB: resident evil 4 - HPO Native w/ Texture Offset
Added 'Align to Native w/ Texture Offset'
2025-04-04 02:29:53 +02:00
PCSX2 Bot
bf656e892f [ci skip] Qt: Update Base Translation. 2025-04-04 02:29:37 +02:00
chaoticgd
abf074eaf4 Debugger: Fix some theming issues 2025-04-03 16:13:50 +02:00
chaoticgd
47657b51ab Debugger: Extract custom menu bar as its own class 2025-04-03 16:13:50 +02:00
PCSX2 Bot
76f8ffeb90 [ci skip] Qt: Update Base Translation. 2025-04-03 02:12:13 +02:00
TellowKrinkle
e68ae91b59 MacOS: Mark our help menu as the macOS help menu
This gives it a nice search box for searching other menus
2025-04-02 18:48:34 -04:00
JordanTheToaster
9222c21b4a Deps: Move Mac Qt download link to archive 2025-04-02 16:11:22 -04:00
chaoticgd
c837d9c91c Qt: Fix custom scan range settings and make sure to save symbol sources 2025-04-02 20:34:17 +02:00
JordanTheToaster
cdf7bef150 Deps: Update SDL to 3.2.10 2025-04-02 20:32:56 +02:00
PCSX2 Bot
eb52da9702 [ci skip] PAD: Update to latest controller database. 2025-04-02 20:31:11 +02:00
chaoticgd
8a1f2a151d Qt: Add GammaRay build scripts 2025-03-29 09:43:11 -04:00
lightningterror
1b4ced3e55 GS/HW: Don't use coverage when doing Af or Ad blend. 2025-03-27 21:27:06 +01:00
refractionpcsx2
29cd068dbd GS/HW: Fix typo on Tekken 5 CRC 2025-03-27 20:13:21 +00:00
TellowKrinkle
6681614f1a Core:Rec: Adjust bounds check asserts to not erroneously trip 2025-03-26 22:57:21 -04:00
PCSX2 Bot
1030db87d4 [ci skip] Qt: Update Base Translation. 2025-03-27 01:03:25 +01:00
JordanTheToaster
356ab30e89 3rdparty: Update CPUInfo to commit 5e3d2445e6a84d9599bee2bf78edbb4d80865e1d 2025-03-26 16:37:49 -04:00
KamFretoZ
0f09b8df77 BPM: GPU CLUT to FSUI 2025-03-26 10:54:55 -04:00
PCSX2 Bot
23c495b939 [ci skip] Qt: Update Base Translation. 2025-03-25 18:14:23 +01:00
PCSX2 Bot
2ac0420903 [ci skip] PAD: Update to latest controller database. 2025-03-25 18:14:06 +01:00
TellowKrinkle
aae070f826 GS:MTL: Avoid WC memory on Ryzen hackintoshes 2025-03-25 11:38:24 -04:00
chaoticgd
6ad825d1e0 Debugger: Fix Visual Studio filters 2025-03-24 20:00:35 -05:00
TellowKrinkle
7910506b3c GS:HW: Avoid using blend + fbfetch for AFAIL RGB_ONLY 2025-03-22 15:47:37 -05:00
chaoticgd
5393d724c5 Debugger: Fix crash during breakpoint deletion 2025-03-22 13:53:48 -04:00
JordanTheToaster
c8b1e4c4e6 3rdparty: Update ImGui to v1.91.9b 2025-03-22 12:13:20 -04:00
Ziemas
d373cb602d IOP Debug: allow reading ROM 2025-03-22 11:42:26 -04:00
lightningterror
58f195fc04 GS/HW: Adjust AA1 draw behavior.
Make sure we use coverage alpha on aa1 draw when there's no blending.

Make sure we set coverage alpha to 128 in vertex trace alpha min max.

Some const and cast cleanup.
2025-03-20 20:44:31 +01:00
refractionpcsx2
f6675808fc GS/Runner: Set the screenshot compression low to stop slow dump times 2025-03-20 14:19:47 +00:00
PCSX2 Bot
aa64712354 [ci skip] Qt: Update Base Translation. 2025-03-20 11:14:07 +01:00
chaoticgd
f6e2185c9c Debugger: Don't jump to PC if the breakpoint code paused the core 2025-03-18 22:04:41 -04:00
JordanTheToaster
08edc8dfab Deps: Update Mac to Qt 6.7.3 2025-03-18 19:43:20 -04:00
chaoticgd
ec0760c03e Deps: Add an extra include path for KDDockWidgets 2025-03-18 11:50:12 -04:00
PCSX2 Bot
b53dfed032 [ci skip] PAD: Update to latest controller database. 2025-03-17 12:02:04 -04:00
refractionpcsx2
96599f26a5 GS/HW: Fix width prediction on texture shuffles 2025-03-17 15:44:46 +00:00
JordanTheToaster
c049a7ac76 Docs: Update thirdpartylicenses 2025-03-16 17:30:45 -04:00
JordanTheToaster
34dabc77c1 Deps: Swap to libjpeg-turbo 3.1.0 2025-03-16 17:30:45 -04:00
JordanTheToaster
b4deb6a4e2 VMManager: Actually enable file logging by default for real this time 2025-03-16 16:22:42 -04:00
Ty
dd91c0aac2 CI: Pin some third-party actions to a full length commit SHA 2025-03-16 14:50:27 -04:00
TheLastRar
fd983946f5 Qt: Fix display of LED colours on Windows native themes 2025-03-16 12:12:40 -04:00
JordanTheToaster
fb18fdf5b7 VMManager: Enable file logging by default 2025-03-16 11:59:09 -04:00
refractionpcsx2
bc7670aa3b GameDB: Add IBit hack to Killzone and Shellshock - Nam '67 2025-03-15 15:11:46 +00:00
refractionpcsx2
fe76a4575c VU: Expand IBit hack to work for immediates on several instructions 2025-03-15 15:11:46 +00:00
PCSX2 Bot
6addc7cf5f [ci skip] Qt: Update Base Translation. 2025-03-14 20:05:38 -04:00
JordanTheToaster
eb8b6f4fb5 3rdparty: Fix Apple Silicon detection with cpuinfo 2025-03-14 15:06:52 -04:00
Mrlinkwii
e2a60b7280 add KDDockWidgets to Third-Party Licenses 2025-03-14 19:35:34 +01:00
Dakota Smith
fe2d0cb514 Revert "Debugger: Set default breakpoint size to 4"
This reverts commit 92b9390c51.
2025-03-14 08:46:03 -04:00
TellowKrinkle
3362ca25be GHActions:MacOS: Don't use cmake --parallel without specifying job count
That ends up allowing infinite jobs on the makefile backend for some reason
2025-03-14 08:43:16 -04:00
PCSX2 Bot
c919c2a6fd [ci skip] Qt: Update Base Translation. 2025-03-14 00:08:58 -05:00
Silent
5a70075169 GameDB: Add memcard filters for Midnight Club 3 - DUB Edition Remix
Save data from Midnight Club 3 - DUB Edition (non-Remix)
can be imported into Remix.
2025-03-13 10:58:14 +01:00
TheLastRar
42c576cf99 FSUI: More formatting 2025-03-13 10:56:09 +01:00
PCSX2 Bot
1fd26c919b [ci skip] Qt: Update Base Translation. 2025-03-12 20:40:15 -04:00
TheLastRar
c957b558e0 FSUI: Automatic "Swap OK/Cancel" will now swap with switch controllers 2025-03-12 17:22:32 -04:00
JordanTheToaster
ec047c5972 GS: Change GetValidSize warning to DevCon 2025-03-12 17:21:52 -04:00
JordanTheToaster
08388d12d1 Config: Default to higher compression 2025-03-12 17:21:52 -04:00
lightningterror
850aeaf05e Misc: More warning fixes. 2025-03-12 17:20:56 -04:00
chaoticgd
6195f4b40e Debugger: Fix breakpoints and saved addresses lists 2025-03-12 17:20:35 -04:00
chaoticgd
92baf77509 Debugger: Add custom drop indicators and some user interface settings 2025-03-12 17:20:35 -04:00
chaoticgd
ab1cdb4c9d Debugger: Make various improvements to the UI 2025-03-12 17:20:35 -04:00
chaoticgd
4f4ff00ecf Debugger: Add System toolbar with shutdown and reset actions 2025-03-12 17:20:35 -04:00
chaoticgd
6fe97b42c3 Debugger: Allow having multiple dock widgets of the same type 2025-03-12 17:20:35 -04:00
chaoticgd
c9ac4960bc Debugger: Hook up all the debugger widgets again
New event system, context menus, and more.
2025-03-12 17:20:35 -04:00
chaoticgd
e4d7d22e78 Debugger: Hook up breakpoints and stepping again 2025-03-12 17:20:35 -04:00
chaoticgd
eb83cb70ea Debugger: Save and restore the state of the toolbars for each layout 2025-03-12 17:20:35 -04:00
chaoticgd
59210dffa9 Debugger: Add support for multiple UI layouts 2025-03-12 17:20:35 -04:00
chaoticgd
c76cca874b Debugger: Redesign UI based on KDDockWidgets 2025-03-12 17:20:35 -04:00
chaoticgd
d989ce5b44 Deps: Add KDDockWidgets 2025-03-12 17:20:35 -04:00
PCSX2 Bot
fbc95f2c86 [ci skip] PAD: Update to latest controller database. 2025-03-10 21:52:10 +01:00
TheLastRar
9fb8dacadb Input: Fix incorrect string conversion of motor binds 2025-03-09 17:42:31 +01:00
TheLastRar
d332aee542 Qt: Fix vibration binding window 2025-03-09 17:42:31 +01:00
refractionpcsx2
f2c97fc2c3 GS/HW: Tweak offsets for textures using ATN WTO 2025-03-09 16:41:36 +00:00
Ty
5ab84aaa29 CI: Flatten symbols for upload-artifact 2025-03-07 12:47:07 -05:00
JordanTheToaster
9842b11815 Deps: Update to SDL3 3.2.8 2025-03-07 09:58:04 -05:00
Ty
083fb5a1e6 CI: Generate Breakpad symbols for Linux / OSX Windows debugging ease 2025-03-06 17:38:46 -05:00
lightningterror
98cdd3446b GS/HW: Properly check PABE with source alpha for blends that check for PABE. 2025-03-06 19:18:29 +01:00
lightningterror
9bcbf43695 GS/HW: Check if pabe sw is actually enabled for ate second pass.
No need to check for PABE if it's not enabled on sw blend.
In fact on ICO flag is enabled even if ABE is disabled which is pointless.
2025-03-06 19:18:29 +01:00
TheLastRar
e3c988aa8b FileSystem: Improve handling of relative paths in RealPath() 2025-03-06 13:08:32 -05:00
TheLastRar
06be543d32 FileSystem: Don't pass file access mode into GetWin32Path() 2025-03-06 13:08:32 -05:00
Ty
1fd22dcc1c Windows: Make PCSX2 long path aware 2025-03-04 09:14:25 -05:00
refractionpcsx2
e3afdde981 GSDumpRunner: Fix compilation 2025-03-04 13:28:42 +00:00
lightningterror
698df49e5e Qt: Fix -Wsign-compare warnings. 2025-03-04 13:29:13 +01:00
TheLastRar
ff5c90ec5e SDLInputSource: Correct joystick types 2025-03-04 05:07:56 +01:00
TheLastRar
1e075d23b2 Input: Fix warnings 2025-03-04 05:07:56 +01:00
PCSX2 Bot
2b172903b9 [ci skip] Qt: Update Base Translation. 2025-03-04 01:04:44 +01:00
TheLastRar
4654a3ef6c FSUI: Formatting 2025-03-04 00:34:14 +01:00
Ty
9996061f74 SIO: Bump savestate warning from 1 hour to 2 hours 2025-03-03 12:19:09 -05:00
Ty
247a4c40d1 SIO: Remove a debugging include I somehow missed 2025-03-03 12:19:09 -05:00
PCSX2 Bot
1ffbdd9c08 [ci skip] PAD: Update to latest controller database. 2025-03-03 17:30:19 +01:00
TheLastRar
f67c0cbd2e Input: Fix migration of input profiles 2025-03-03 13:38:55 +01:00
PCSX2 Bot
ff7cc0867b [ci skip] Qt: Update Base Translation. 2025-03-03 01:36:07 +01:00
TheLastRar
ac1a6d3348 Deps: Update to SDL3 (#12311)
Co-authored-by: TheTechnician27 <TheTechnician27@users.noreply.github.com>
2025-03-02 18:04:19 -05:00
TellowKrinkle
582bba6c91 microVU: Accurate CLIP 2025-03-02 18:19:52 +00:00
TellowKrinkle
aaf156478e Interpreter: Accurate CLIP 2025-03-02 18:19:52 +00:00
TellowKrinkle
0539c177ab x86emitter: Add pblend 2025-03-02 18:19:52 +00:00
TellowKrinkle
fb1323b72f MicroVU: Declare constants inline 2025-03-02 18:19:52 +00:00
TellowKrinkle
dc557dd0e5 Interpreter: Merge broadcast min/max into one implementation 2025-03-02 18:19:08 +00:00
TellowKrinkle
2d0cfc9c2c Interpreter: Merge MAC ops into a few template functions 2025-03-02 18:19:08 +00:00
TellowKrinkle
625a25cd50 Interpreter: Merge broadcast ops into one implementation each 2025-03-02 18:19:08 +00:00
TellowKrinkle
b8a29d1cd8 Interpreter: Accurate FTOI
Plus some ITOF cleanup
2025-03-02 18:17:36 +00:00
TellowKrinkle
0fabdf9a01 Interpreter: Accurate ABS 2025-03-02 18:17:36 +00:00
refractionpcsx2
9c3ae795c8 COP2/Int: Propagate CLIP_FLAG writes to the VU0.clipflag variable for use in COP2
This value was being updated then COP2 running VCLIP would have the wrong original clip flag value to work from.
2025-03-02 18:17:05 +00:00
refractionpcsx2
de26226fa1 Core: Delete constant regs when flushing to interpreter 2025-03-02 18:17:05 +00:00
KamFretoZ
121920c074 FSUI: Add Themes 2025-03-02 11:48:29 -05:00
TellowKrinkle
05e19470b2 FileSystem: Don't leak on directory scan cancel
Fixes: 7587581d1f
2025-03-02 09:41:51 -05:00
TheLastRar
b6680e4aca FSUI: Formatting 2025-03-02 09:36:07 -05:00
TheLastRar
f9d70af841 FSUI: Auto detect when to use circle as confirm 2025-03-02 09:36:07 -05:00
TellowKrinkle
7587581d1f GameList: Allow recursive scans to be cancelled 2025-03-02 04:20:01 +01:00
PCSX2 Bot
8f19976c10 [ci skip] Qt: Update Base Translation. 2025-03-02 01:43:09 +01:00
GovanifY
8567d68433 VMManager: initialize PINE with config-provided slot
Sten broke it during the port to Qt...
2025-03-02 00:01:18 +01:00
Glebux
6542301566 Input/PAD: Make macro chords work 2025-03-01 14:38:00 -05:00
refractionpcsx2
a359f77cf6 GameDB/Link: Fix validation limit for Half Pixel Offset to allow new option 2025-03-01 02:01:46 +00:00
PCSX2 Bot
4c9a81f3d8 [ci skip] Qt: Update Base Translation. 2025-02-28 19:54:36 -05:00
refractionpcsx2
9234b493a3 Testing further tweaks to bring it closer to SW 2025-02-28 21:59:19 +00:00
refractionpcsx2
f84425b67c GS/HW: Add new HPO - Align to Native With Texture Offset 2025-02-28 21:59:19 +00:00
PCSX2 Bot
8a0c1874dd [ci skip] Qt: Update Base Translation. 2025-02-27 01:05:14 +01:00
Light
fa23628ae2 Qt: Allow recording on game boot 2025-02-26 17:17:39 -05:00
Loy2up
8a594e673d Debugger: Fix 8 byte searches (#12362) 2025-02-26 14:41:49 -05:00
Loy2up
92b9390c51 Debugger: Set default breakpoint size to 4 2025-02-25 19:07:19 -05:00
PCSX2 Bot
c5c5b2a7b9 [ci skip] Qt: Update Base Translation. 2025-02-26 01:06:43 +01:00
refractionpcsx2
32a9d0e48b GameDB: Also add Tekken 5 CRC to Taiko No Tatsujin 9 2025-02-25 18:22:38 +01:00
refractionpcsx2
80a961bb25 GameDB: Add Tekken 5 CRC (Yes really) To Tales of the Abyss 2025-02-25 18:22:38 +01:00
TheLastRar
d4e227286e FSUI: Correct description of the "Swap OK/Cancel" option 2025-02-25 10:00:18 -05:00
github-actions[bot]
ba705c8c24 Qt: Update Base Translation (#12354)
Co-authored-by: PCSX2 Bot <PCSX2Bot@users.noreply.github.com>
2025-02-24 19:11:57 -05:00
dependabot[bot]
b6ae4b173e CI: Update dependencies in /.github/workflows/scripts/releases/generate-release-notes (#12315)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 17:54:41 -05:00
TJnotJT
23a28be346 GS/UI: Rename dumping variables and UI labels to be more consistent/clear. 2025-02-24 17:53:01 -05:00
TJnotJT
a0e24dd36f UI: Add debug UI options for new dumping options. 2025-02-24 17:53:01 -05:00
TheLastRar
a2cde5e17b FSUI: Add a config option to swap OK/Cancel within BPM 2025-02-24 17:45:46 -05:00
JordanTheToaster
ecc46e9294 Deps: Update ZSTD to 1.5.7 2025-02-24 17:44:22 -05:00
dreamsyntax
20b1190d47 Achievements: Fix leaderboard timers persisting
Removes setting the leaderboard timer to active on receiving an update
event. This fixes having multiple timers stuck on the screen.
2025-02-24 14:05:03 -05:00
Silent
29b736bcf7 GameDB: Add TOCA Race Driver 3 memcard filters 2025-02-24 12:04:05 -05:00
Silent
a48bc76ca6 GameDB: Add NFS Undercover memcard filters
Checks from NFS Carbon (incl. a bugged check for MW BE)
are in the code, but unused.
2025-02-24 12:04:05 -05:00
Silent
305c01cdfa GameDB: Add NFS ProStreet memcard filters 2025-02-24 12:04:05 -05:00
Silent
88bbdf4696 GameDB: Add NFS Carbon memcard filters 2025-02-24 12:04:05 -05:00
Silent
afc11279a9 GameDB: Improve NFS Most Wanted memcard filters 2025-02-24 12:04:05 -05:00
Silent
a3fb2a84d5 GameDB: SCUS-21494 doesn't exist 2025-02-24 12:04:05 -05:00
Ty
4db23e6677 Debugger Assembler: BC1(t|f) 24 bit immediates to 16 bit immediates 2025-02-24 11:39:30 -05:00
PCSX2 Bot
5dd36a7969 [ci skip] PAD: Update to latest controller database. 2025-02-24 17:02:04 +01:00
RedPanda4552
35a3d0027e Memcard: Apply filtering when checking all possible memcard options
Prevents log being flooded with warnings when large folder memcards exceed 8 MB size
2025-02-24 16:08:00 +01:00
refractionpcsx2
02789ebd86 GS/HW: Increase Merge Sprite paving sensitivity to avoid mismerges 2025-02-23 03:33:39 +00:00
JordanTheToaster
dfd1846b93 GameDB: Various fixes 2025-02-23 01:12:43 +00:00
refractionpcsx2
872205abc6 GS/HW: Maintain scale on subsequent downscale draws 2025-02-23 01:12:07 +00:00
PCSX2 Bot
c52cebd20a [ci skip] Qt: Update Base Translation. 2025-02-22 01:04:56 +01:00
GovanifY
f449b54f87 CI: enable wayland by default 2025-02-21 12:28:28 +01:00
GovanifY
ffcb6e2f6f QT/MainWindow: disable native window rendering in wayland
This is a workaround for QTBUG-133919
2025-02-21 12:28:28 +01:00
PCSX2 Bot
5daa1aa115 [ci skip] Qt: Update Base Translation. 2025-02-21 01:09:05 +01:00
GovanifY
1dc009f752 pcsx2/SIO: correctly detect whether format status of folder mcd 2025-02-20 16:00:40 +01:00
GovanifY
009b4ff5e7 QT/Settings: ensure that a memory card is formatted before conversion 2025-02-20 16:00:40 +01:00
PCSX2 Bot
f1a947af92 [ci skip] Qt: Update Base Translation. 2025-02-19 21:00:23 -05:00
Ty Lamontagne
97c098b1ff QT: Adjust mouse grab help text 2025-02-19 11:18:17 -05:00
Ty
e252cb6643 HostSys: Implement platform Specific mouse lock osx/windows/x11 2025-02-19 11:18:17 -05:00
Gonzalosilvalde
75c0236e1e Qt: Add mouse grab/lock feature when PCSX2 is in focus 2025-02-19 11:18:17 -05:00
KamFretoZ
9c4a98bc25 Qt: Add AMOLED Theme 2025-02-19 10:34:44 -05:00
GovanifY
9cba11cde5 appimage: revert #11667 , switch back to upstream appimagetool 2025-02-19 01:44:18 +01:00
GovanifY
fac5512b04 flatpak: misc additions to the metainfo 2025-02-19 01:44:18 +01:00
GovanifY
ed9bf05971 bin: update icons to be centered 2025-02-18 20:44:43 +01:00
GovanifY
19d0f3bdc5 flatpak: add branding colors 2025-02-18 20:44:43 +01:00
GovanifY
2abe53de43 flatpak: remove wild caps in summary 2025-02-18 20:44:43 +01:00
GovanifY
37a25750d7 flatpak: update default screenshots
This fixes a few issues in our flathub review report
2025-02-18 20:44:43 +01:00
lightningterror
d3e288447f GS/HW: Cleanup gl and vk shaders.
gl: Rename fetch_rt to sample_from_rt to match vk shaders, remove old atst call.

vk: Make sure shuffle values have correct unsigned type.
2025-02-17 21:27:34 +01:00
Ziemas
4a44d2668c SDL Audio: Set app name hint 2025-02-16 16:41:51 -05:00
Ty
752b1420a3 CI: Increase flatpak cron job timeout to 3 hours instead of 1
[ci skip]
2025-02-16 16:17:11 -05:00
PCSX2 Bot
71705fc91f [ci skip] Qt: Update Base Translation. 2025-02-16 22:12:45 +01:00
Ty
645efc7520 CI: Skip macos signing on forks 2025-02-16 12:03:14 -05:00
Ty
b6ee0e5219 CI: Bump our ccache size from 100M to 500M 2025-02-16 12:03:14 -05:00
Ty
7acf32debc CI: Sign and notarize our macos binaries 2025-02-16 12:03:14 -05:00
Ty
13397f68a3 CI: Update the node version for announce-release try #2 2025-02-16 11:39:54 -05:00
Ty
79250722d6 CI: Update the node version for announce-release 2025-02-16 11:30:47 -05:00
Ty
04b8748a8f CI: Update the announce-release script to use node-fetch (#12310) 2025-02-15 15:14:28 -05:00
dependabot[bot]
2dab8053ea CI: Bump deps in announce-release (#12308)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-15 11:03:07 -05:00
refractionpcsx2
f8bab2e465 Build/VS: Fix change in latest VS 2022 update with std::chrono
For more information see: https://learn.microsoft.com/en-us/cpp/overview/what-s-new-for-visual-cpp-in-visual-studio?view=msvc-170#:~:text=Moved%20system_clock%2C%20high_resolution_clock%2C%20and%20chrono_literals%20from%20a%20commonly%20included%20internal%20header%20to%20%3Cchrono%3E.%20If%20you%20see%20compiler%20errors%20that%20types%20like%20system_clock%20or%20user%2Ddefined%20literals%20like%201729ms%20aren%27t%20recognized%2C%20include%20%3Cchrono%3E.
2025-02-14 02:40:24 +00:00
TJnotJT
46221a8500 Tools: Fix typos in GS dump runner help. 2025-02-12 17:40:49 -05:00
TJnotJT
8b0e61af8c Tools: Remove debug preprocessor check around dumping of HW renderer frames. 2025-02-12 17:40:49 -05:00
TJnotJT
2b0a78811a Tools: Add additional options for dumping in GS runner. Other formatting fixes. 2025-02-12 17:40:49 -05:00
TheTechnician27
5798cd7176 Qt: End memcard conversion progress at 100% instead of 99% 2025-02-12 17:40:17 -05:00
JordanTheToaster
5c25637381 GameDB: Knights of the Temple 2 fixes 2025-02-12 17:39:56 -05:00
TheLastRar
8316228771 iR5900: Reset manual protection counters 2025-02-12 12:12:05 -05:00
JordanTheToaster
695250155e GameDB: Even more fixes 2025-02-12 12:09:05 -05:00
PCSX2 Bot
545e606c11 [ci skip] PAD: Update to latest controller database. 2025-02-10 17:26:03 +01:00
refractionpcsx2
52771fdb17 GS/HW: Add CRC fixes for DT Carnage/Racer/Axel Impact 2025-02-10 15:06:29 +00:00
JordanTheToaster
de631a1052 PerformanceMetrics: Increase update rate
Increases update rate of OSD stats from 0.5 per poll to 0.25 seconds per poll.
2025-02-09 12:29:54 -05:00
JordanTheToaster
605398db67 GameDB: Various fixes 2025-02-09 12:29:54 -05:00
TheLastRar
407c989860 Vif: Fixes to non-volatile SSE backup and restore logic 2025-02-09 12:28:04 -05:00
lightningterror
9b4b112a97 GS/HW: Adjust max valid tex size.
Account for index 0.
2025-02-08 23:56:42 +01:00
PCSX2 Bot
865b75bcbb [ci skip] Qt: Update Base Translation. 2025-02-07 19:04:10 -05:00
Ty
795b0813cc Debugger: Only validate memory search value when needed 2025-02-07 13:40:13 -05:00
Ty
3e1f2b8b9d Debugger: Support 'unknown initial value' search types 2025-02-07 13:40:13 -05:00
Ty
1f0d6f0ac7 VMManager: Avoid use-after-move conditions 2025-02-05 10:25:24 -05:00
JordanTheToaster
4ab4f4a67c GameDB: Various fixes 2025-02-04 14:58:40 -05:00
Mrlinkwii
5dbdd5e5e4 CI : fix artifact name on linux builds 2025-02-04 14:49:36 -05:00
JordanTheToaster
f03cddf674 Deps: Update to Qt 6.8.2 on Windows and Linux 2025-02-04 12:22:17 +01:00
PCSX2 Bot
726e908a49 [ci skip] Qt: Update Base Translation. 2025-02-03 19:08:22 -05:00
Jordan
043cd673b8 3rdparty: Update ImGui to v1.91.8 (#12258) 2025-02-03 17:22:32 -05:00
KamFretoZ
f84173e5cc Qt: Add Portable Mode launch argument (#12230) 2025-02-03 17:20:32 -05:00
Jordan
bef7ae7f6c Deps: Update SDL to 2.30.12 (#12263) 2025-02-03 16:54:24 -05:00
TheTechnician27
33aed95a6c Controllers: Make restore defaults restore controller LED (#12264) 2025-02-03 16:53:55 -05:00
Ty
282317c46e Debugger: Add opcodes and fixes to the assembler (#12267) 2025-02-03 16:52:27 -05:00
refractionpcsx2
2d6a42ac06 GS/HW: Reduce number of copies for HDR 2025-02-03 16:48:47 -05:00
PCSX2 Bot
cd98f72f10 [ci skip] PAD: Update to latest controller database. 2025-02-03 20:21:41 +01:00
TheLastRar
29a98f317e Vif: Don't reserve regs for unused columns
We can reuse those for other purposes
2025-02-02 18:02:24 -05:00
TheLastRar
6334082e6f Vif: Don't use non-volatile register in simple unpack
The Vif normally reserves Xmm3-Xmm6 for the columns and row.
However, code emitted for simple unpacks never used them.
Instead, lets use Xmm3 to avoid clobbering a non-volatile register.
2025-02-02 18:02:24 -05:00
TheLastRar
bd4a6a10f9 Vif: Backup and restore non-volatile SSE registers 2025-02-02 18:02:24 -05:00
lightningterror
ea4d988082 GS/HW: Check for null when source is either target or depth. 2025-02-01 22:53:21 +01:00
PCSX2 Bot
bf8693a7e8 [ci skip] Qt: Update Base Translation. 2025-01-29 19:07:07 -05:00
TheTechnician27
32a67c48e0 Qt: Add Wiki and Documentation to 'Help' menu 2025-01-29 10:10:44 -05:00
PCSX2 Bot
e93f81ca7a [ci skip] Qt: Update Base Translation. 2025-01-28 21:35:04 +01:00
PCSX2 Bot
8f107f5345 [ci skip] PAD: Update to latest controller database. 2025-01-27 17:01:51 +01:00
Ziemas
741046079c DebugInterface: isValidAddres on physical
Mask off the segment bits
2025-01-25 09:56:35 -05:00
PCSX2 Bot
df7646fd34 [ci skip] Qt: Update Base Translation. 2025-01-22 19:34:24 -05:00
TheTechnician27
d350408161 Settings: Allow user to manually set RTC per-game 2025-01-22 15:54:17 +01:00
JordanTheToaster
bde55a6fe2 GameDB: Various fixes 2025-01-21 17:30:00 -05:00
JimScript
83c1bed868 GameDB: Add Nicktoons Cross-Save Feature
re-added current GameDB
2025-01-21 11:57:25 -05:00
JimScript
6845f026bc GameDB: Add Nicktoons Cross-Save Feature
Revised commit name
2025-01-21 11:57:25 -05:00
PCSX2 Bot
f2c796bcc5 [ci skip] Qt: Update Base Translation. 2025-01-20 19:10:40 -05:00
chaoticgd
a930daf575 Debugger: Wait for the entry point to run before scanning from memory 2025-01-20 15:18:33 -05:00
TheTechnician27
36d8e5f295 ImGui: Avoid frame count display race condition for input recording and display correct value 2025-01-20 15:17:06 -05:00
Ty
71100679a3 R5900: Implement ARM NEON intrinsics for the EE cache 2025-01-20 15:14:25 -05:00
nassau-tk
e3b61b5b1f Fix Raksuho Pachi-slot series glitch 2025-01-20 15:13:07 -05:00
PCSX2 Bot
42a5e7422c [ci skip] PAD: Update to latest controller database. 2025-01-20 15:12:20 -05:00
Mrlinkwii
24782950e4 Docs: update Gamedb documentation
[ci skip]
2025-01-20 15:12:07 -05:00
TheTechnician27
e5639102cb Sounds: Use freely licensed orchestra hit for achievement unlock 2025-01-20 15:11:47 -05:00
lightningterror
b74d05603d GS/HW: Limit GetValidSize height and width.
Max texture size limit is 2048.
This should never happen but if it does clamp it
2025-01-20 05:14:50 +01:00
TheTechnician27
23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
TheLastRar
53ae93751c Deps: Fix incorrect hashes in Windows Arm64 script 2025-01-19 11:51:44 -05:00
TheLastRar
ec8736107c 3rdparty/vixl: Define VIXL_CODE_BUFFER_* in cmake 2025-01-19 11:51:44 -05:00
PCSX2 Bot
9e21ee1bc4 [ci skip] Qt: Update Base Translation. 2025-01-19 09:06:41 +01:00
TheLastRar
31497c2b86 3rdparty: Sync vixl to commit e6076e92c416422ea1fbde815e8e327f68658ac1 2025-01-18 15:17:47 -05:00
TheLastRar
0600832ddb 3rdparty: Update ImGui to v1.91.7 2025-01-18 15:17:33 -05:00
Ty
4a57bd7fd4 VMManager / vuJIT: Fix save state loading and saving on ARM64 2025-01-17 18:00:07 -05:00
shockdude
fbe0c8b9cc USB: Fix DJ Hero Turntable automatic mapping & turntable multiplier 2025-01-17 10:44:52 -05:00
Ziemas
2e3501366f iR3000A/iR5900: Partial revert of 8c98f5d928 ("Remove mid block jumping") 2025-01-17 10:42:48 -05:00
Ziemas
ef7169dbbf host: fix gcc build 2025-01-17 10:42:13 -05:00
TheLastRar
de9d08075e Misc: Don't use deprecated fmt/core.h header 2025-01-17 04:35:29 +01:00
TheLastRar
c58f6f2f70 3rdparty: Update fmt to v11.1.2 2025-01-17 04:35:29 +01:00
TheLastRar
56aa5d9657 SmallString: Prep for fmt update 2025-01-17 04:35:29 +01:00
Penguino
754057b496 GameDB: Add Ougon no Kaze VU1 clamping, JoJo romanization consistency
- Added VU1 Clamping (Extra + Preserve Sign) to Ougon no Kaze (SLPM-65140, SLPM-66853, SLPM-61030) to fix the shading of the enemy's Stand in Chapter 11-2
- Changed "Jojo" romanization to "JoJo" (SLPM-66853, SLPS-25686)
- Changed "Kimyouna" to "Kimyou na" in Ougon no Kaze [Best Price] (SLPM-66853)
2025-01-17 04:31:31 +01:00
lightningterror
513c44f07f DumpRunner: Fix compare when frames are missing. 2025-01-17 04:29:37 +01:00
nassau-tk
0090655899 GameDB: Fix Japanese Game Titles. (#12158) 2025-01-15 22:40:52 +01:00
JordanTheToaster
7103e9be1e 3rdparty: Sync cpuinfo to commit 8a1772a0c5c447df2d18edf33ec4603a8c9c04a6 2025-01-15 22:17:59 +01:00
JordanTheToaster
b04906c3e9 3rdparty: Update promptfont with new icons 2025-01-15 22:17:59 +01:00
JordanTheToaster
fc5fe8b48c Deps: Update webp to 1.5.0 2025-01-15 22:17:59 +01:00
JordanTheToaster
e32e91af5c Deps: Update libpng to 1.6.45 2025-01-15 22:17:59 +01:00
JordanTheToaster
aa5b026d4a SDLInputSource: Halve default LED brightness 2025-01-15 22:16:39 +01:00
PCSX2 Bot
9568f3305b [ci skip] PAD: Update to latest controller database. 2025-01-13 17:03:58 +01:00
TheLastRar
f33064a1e2 x86emitter: Backup and restore non-volatile SSE registers
XMM6-XMM15 are non-volatile on Windows
2025-01-13 10:12:57 -05:00
lightningterror
6c9a2e96e1 iR3000A/iR5900: Fix dev/debug build compile.
Remove JITCompileInBlock leftovers.
2025-01-13 03:22:44 +01:00
JordanTheToaster
8c98f5d928 iR5900: Remove mid block jumping 2025-01-12 17:40:36 -05:00
refractionpcsx2
19f0cfcf06 GS/HW: Fix misdetection of draw as clear with fog effect 2025-01-12 23:18:38 +01:00
refractionpcsx2
4f42d95d3c GS/HW: If HW Move is outside of target, make a new target instead 2025-01-12 23:18:38 +01:00
refractionpcsx2
68823c524f GS/HW: Backport target expansion change from RT in RT PR 2025-01-12 23:18:38 +01:00
refractionpcsx2
05917796a5 GS/HW: Backported fixes from RT in RT PR 2025-01-12 23:18:38 +01:00
refractionpcsx2
d64da07b7d DumpRunner: Fix "missing" messages to not break the image cycler 2025-01-12 23:18:38 +01:00
PCSX2 Bot
27074a809c [ci skip] Qt: Update Base Translation. 2025-01-12 01:34:23 +01:00
Silent
33b366180e Qt/Patches, Cheats: Reload lists if serial changes 2025-01-11 09:04:51 -05:00
Silent
d8e310e7bf Qt/Patches: Use the game list serial when populating patches for the ELF
This makes the Game Properties window match the behaviour of the VM
when booting into a game.

Fixes #11533
2025-01-11 09:04:51 -05:00
Silent
534ddd80ae Patch: When serial is empty, don't match files on empty serial
Fixes a bug where _crc.pnach files matched the regex if serial
was not set. Also grey out "All CRCs" when serial is not set,
as the option is then meaningless.
2025-01-11 09:04:51 -05:00
chaoticgd
d34f2ec142 Debugger: Add disassembler toggle to go to the PC address on pause 2025-01-11 09:03:24 -05:00
TheTechnician27
7381a02dae SIO: Fix save state OSD warning formatting 2025-01-11 09:02:45 -05:00
RedPanda4552
333c7ef61b Memcard: Track file size globally at open
Prevents FSeek64 hits on every retrieval of memcard attributes
2025-01-09 15:47:56 +01:00
RedPanda4552
77d5a04aa4 Memcard: Remove support for legacy PSX card types with headers
Supporting legacy PSX cards with headers required constant size checks, thrashing IOP performance.
2025-01-09 15:47:56 +01:00
TheLastRar
d3effdb176 CI/Windows: Use LLVM 19 with MSBuild and CMake
Now using the Chocolatey install of LLVM
2025-01-09 15:46:34 +01:00
JordanTheToaster
d7e1350b95 CI/Windows: Use Windows Server 2025 2025-01-09 15:46:34 +01:00
PCSX2 Bot
14ac653e45 [ci skip] Qt: Update Base Translation. 2025-01-09 15:45:02 +01:00
spixi
a5e4274cd2 common: Add support for MATE Desktop. (#12174)
This extends the screensaver inhibition function to MATE Desktop,
2025-01-09 15:07:09 +01:00
Ty Lamontagne
16b1095a7b EE Cache: Shrink tag size by 4 bytes 2025-01-08 18:34:30 -05:00
Silent
3b5b3ffa91 Patch: Re-run PPT_ONCE_ON_LOAD patches when enabling them as the game is running 2025-01-08 18:30:51 -05:00
Silent
7ebcca36d2 Patch: Actually apply type 2 patches on the entry point
Type 2 patches were supposed to be "Type 0 + Type 1",
but in reality they only executed on vblank, making them equivalent
to Type 1.
2025-01-08 18:30:51 -05:00
PCSX2 Bot
501c543d1b [ci skip] Qt: Update Base Translation. 2025-01-08 19:46:56 +01:00
lightningterror
4dafea65f2 GS/HW: Adjust need_aem_color and req_color conditions.
Improves LookupSource to not use dirty data when it shouldn't.
2025-01-06 18:09:34 +01:00
PCSX2 Bot
e7cdd89577 [ci skip] PAD: Update to latest controller database. 2025-01-06 17:01:53 +01:00
lightningterror
1a508439b3 GameDB: Rename Dynasty Warriors 3 and 4.
SLES-51441: Dynasty Warriors 3 - Extreme Legends -> Dynasty Warriors 3 - Xtreme Legends

SLUS-20812: Dynasty Warriors 4 - Extreme Edition -> Dynasty Warriors 4 - Xtreme Legends
2025-01-06 15:22:07 +01:00
JordanTheToaster
3548d103f4 3rdparty: Update vkmemoryallocator to v3.2.0 2025-01-06 13:55:39 +01:00
JordanTheToaster
b1d4101490 Deps: Update SDL to 2.30.11 2025-01-06 13:53:18 +01:00
Florin9doi
a714582c1c Memcard: Support for MemCardPro2/.mc2 files. (#12157) 2025-01-06 13:31:04 +01:00
chaoticgd
0e7da0f1a8 Debugger: Fix AST node ownership confusion bug 2025-01-06 13:28:21 +01:00
TheTechnician27
4f7c8a77f6 Tools: Fix typo in compression tool 2025-01-04 17:17:39 -05:00
Ty Lamontagne
1842fe6db8 EE Cache: Make the SIMD path x86 only to support ARM interpreters 2025-01-03 14:17:24 -05:00
Mrlinkwii
1feb31498d GameDB: fix some names 2025-01-02 21:19:35 +01:00
nassau-tk
f3632c44c8 GameDB: Fix&Add few Japanese Game Titles 2024-12-31 21:14:13 -06:00
PCSX2 Bot
32a6e62212 [ci skip] Qt: Update Base Translation. 2025-01-01 01:27:00 +01:00
Jordan
575ec07553 3rdparty: Update xxHash to v0.8.3 (#12137) 2024-12-31 18:14:47 -05:00
lightningterror
18308b6525 GS/GL: Properly name logs with GL prefix. 2024-12-31 20:11:25 +01:00
lightningterror
d52f29dcd7 GS/D3D12: Properly name logs with D3D12 prefix. 2024-12-31 20:11:25 +01:00
lightningterror
288d8047ae GS/VK: Properly name logs with VK prefix. 2024-12-31 20:11:25 +01:00
lightningterror
26b232292c GS/D3D11: Properly name logs with D3D11 prefix. 2024-12-31 20:11:25 +01:00
Tyler Wilding
1fff69b0aa translations: Syncing Crowdin translations (#12141)
* New translations pcsx2-qt_en.ts (Romanian)
[ci skip]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* New translations pcsx2-qt_en.ts (Spanish, Latin America)
[ci skip]
2024-12-30 19:19:40 -05:00
PCSX2 Bot
4d347305b5 [ci skip] PAD: Update to latest controller database. 2024-12-30 17:03:52 +01:00
PCSX2 Bot
2fd6f8e4ac [ci skip] Qt: Update Base Translation. 2024-12-29 19:02:05 -05:00
Silent
97f316eca7 Qt/Patches: Gracefully migrate old per-game widescreen/no-interlace toggles to Patches
This old upgrade path telling users that the setting has been deprecated
can now be changed to perform the upgrade seamlessly for the user,
because the behaviour of the old per-game setting is identical to
the new behaviour of the Patches tab.
2024-12-29 14:03:56 -05:00
Silent
f7ba355697 Qt/Patches: Make WS/NI patches tri-state in the Patches screen, so disabling them per-game is possible
This solves a long-standing issue where globally enabled
widescreen/no-interlace patches visually appeared as disabled
on the patches list, but they were in fact enabled and could NOT be
disabled per-game.
2024-12-29 14:03:56 -05:00
Silent
c334040a96 Partially revert "Qt/Patches: Get rid of the global WS/NI toggle"
This reverts commit cc9f7e723a.
2024-12-29 14:03:56 -05:00
TheTechnician27
b01359e06f Tools: Port refraction's bulk compression script to Python 2024-12-28 12:09:19 -05:00
PCSX2 Bot
905f9431a5 [ci skip] Qt: Update Base Translation. 2024-12-28 11:30:16 -05:00
KamFretoZ
424951e1bb Logging: Adjust the formatting to be more consistent 2024-12-28 11:25:26 -05:00
KamFretoZ
2167d9e4f5 Settings/Log: Print advanced settings warning on the log
Warns the user through the log if they have advanced options enabled.
2024-12-28 11:25:26 -05:00
rtavarez98
82a38a7124 changed indentation from tab to space 2024-12-28 11:22:50 -05:00
Rain
eb6a52c55c replaced recursive_directory_iterator w/ FindFiles() 2024-12-28 11:22:50 -05:00
Rain
234b8f6abf Added rename input profile function 2024-12-28 11:22:50 -05:00
lightningterror
843566eb49 Qt: Properly disable all dumping options if draw dumping is disabled.
Also move around sone options.
2024-12-28 17:04:33 +01:00
nassau-tk
d63733830f GameDB: Disable MTVU for some games 2024-12-27 23:43:51 -06:00
nassau-tk
3ebd496c37 GameDB: Fix titles for Japanese games 2024-12-27 23:43:51 -06:00
Mrlinkwii
f0f2b013fc Redump: update database 2024-12-27 14:30:23 -05:00
Ty Lamontagne
9a75509614 EE Cache: Fix up TLB related register fetching 2024-12-27 14:18:32 -05:00
Ty Lamontagne
c513a29bcf EE Cache: Freeze cached entries in sstates
[SAVEVERSION+]
2024-12-27 14:18:32 -05:00
Ty Lamontagne
5d39c884b5 R5900: Improve the EE cache performance with SIMD 2024-12-27 14:18:32 -05:00
TheLastRar
6a0f811812 Build: Always set EnhancedInstructionSet for AVX2 configs
Replaces the march arguments for clang-cl
2024-12-24 22:05:50 -05:00
TheLastRar
f509fb6950 CI/Appimage: Suppress error when no tags are present 2024-12-24 12:00:56 -05:00
Ziemas
33a475a456 DebugTools: Fix GCC build, missing include 2024-12-24 13:47:49 +01:00
JordanTheToaster
d2fb90a700 GameDB: Various fixes 2024-12-23 19:40:29 -05:00
PCSX2 Bot
a34467dccd [ci skip] PAD: Update to latest controller database. 2024-12-23 17:58:45 +01:00
Hallkezz
c6d0f5e3cd GameDB: Change recommended blending level 2 to 4 for Twisted Metal: Head-On [Extra Twisted Edition]. (#12107)
Fixes menu text brightness in Twisted Metal: Head-On [Extra Twisted Edition].
2024-12-22 13:03:40 +01:00
PCSX2 Bot
34c9590cf1 [ci skip] Qt: Update Base Translation. 2024-12-18 19:06:27 -05:00
Ty Lamontagne
a2c7542e48 Savestates: Warn on savestate load and saves without mcd activity
[SAVEVERSION+]
2024-12-18 18:01:30 -05:00
TheLastRar
72a9f18456 3rdparty: Sync libchdr to commit cb077337d53392454e7100a0fd07139ca678e527 2024-12-18 17:58:44 -05:00
TheLastRar
7f59757eea 3rdparty/libchdr: Purge almost all remaining patches
Leaving only the chd_read_header_* functions, of which exists an equivalent in later libchdr versions
2024-12-18 17:58:44 -05:00
TheLastRar
3b89020082 3rdparty/libchdr: Purge now unused patches 2024-12-18 16:23:49 -05:00
TheLastRar
a7b07eb53f ChdReader: Use core_file to implement precaching 2024-12-18 16:23:49 -05:00
TheLastRar
58d13dac34 FileSystem: Add ReadFileWithPartialProgress for multiple files 2024-12-18 16:23:49 -05:00
Ty Lamontagne
5a8921dd22 IOPBios: Defer to iopMemSafeReadBytes when HLEing writes 2024-12-18 16:15:07 -05:00
Ty Lamontagne
f964dfaa5e IOPBios: Defer to iopMemSafeWriteBytes when HLEing reads 2024-12-18 16:15:07 -05:00
PCSX2 Bot
17274eb397 [ci skip] Qt: Update Base Translation. 2024-12-17 20:54:52 -05:00
TheLastRar
2f0b00a7a1 ChdFileReader: Migrate libchdr patch into PCSX2
Added function didn't need to be in libchdr
2024-12-17 13:35:10 -05:00
Mrlinkwii
260380abec CI: disable builds on controller database update 2024-12-17 19:22:03 +01:00
KamFretoZ
57fc87061d Cheats: Update notes on how PNACH 2.0 works
Co-Authored-By: Mrlinkwii <Mrlinkwii@users.noreply.github.com>
2024-12-17 11:27:45 -05:00
KamFretoZ
cc9f7e723a Qt/Patches: Get rid of the global WS/NI toggle 2024-12-17 11:27:45 -05:00
PCSX2 Bot
6a41e05694 PAD: Update to latest controller database. 2024-12-16 11:06:52 -05:00
TheLastRar
c8e1dc5328 ChdFileReader: Use core_file instead of modifing chd_open_file 2024-12-16 09:39:46 -05:00
lightningterror
c2ee5a0234 GS/HW: Get the proper context for the next draw if it's a split texture shuffle.
Draw might switch the context so make sure we get the correct one.
2024-12-16 08:37:39 +01:00
nassau-tk
3cafd2dc69 GameDB: Japanese game updates 2024-12-15 01:33:40 -06:00
JordanTheToaster
4b8890c438 3rdparty: Sync vkmemoryallocator to commit 5a53a198945ba8260fbc58fadb788745ce6aa263 2024-12-14 13:41:32 -05:00
JordanTheToaster
19882dc160 3rdparty: Sync d3d12memalloc to commit da380f69bd4547cd776c525ae225bb9d13df94e2 2024-12-14 13:41:32 -05:00
chaoticgd
0c21023bb2 Path: Prevent Path::RealPath from returning '.' and '..' components 2024-12-14 13:41:01 -05:00
chaoticgd
68e6ede47e Path: Add tests for Path::RealPath 2024-12-14 13:41:01 -05:00
chaoticgd
1ed3001358 FileSystem: Add CreateSymLink function 2024-12-14 13:41:01 -05:00
chaoticgd
b8ff171127 FileSystem: Improve directory deletion test slightly 2024-12-14 13:41:01 -05:00
lightningterror
7d16a915ed GS/HW: Adjust how we handle dithering on blend mix.
Allow dither adjust regardless of alpha. usually it is clamed to 1 anyway so we can expand it if alpha max is higher than 128.

Expand dither adjust to work in rev subtract conditions.
2024-12-13 08:27:00 +01:00
lightningterror
ecc24ce2e9 GS/TC: Use proper alpha min max for palettes.
If it's an old source made from target make sure it isn't a palette, alphas need to be used from the palette then.
2024-12-13 08:27:00 +01:00
TheLastRar
65748351c7 ChdFileReader: Correct extension check 2024-12-12 08:39:28 -05:00
Ty Lamontagne
a60489b6fd FileSystem: Add a case-insensitive match for nvm and mec file loading. 2024-12-12 08:37:16 -05:00
TheLastRar
e8dbcc31aa SaveState: Fix comparison warning 2024-12-10 21:26:14 +01:00
PCSX2 Bot
5dbaf194c5 PAD: Update to latest controller database. 2024-12-09 12:14:31 -05:00
JordanTheToaster
affdb78a65 GameDB: Change LSW 2 fixes 2024-12-09 12:14:24 -05:00
Ty Lamontagne
313ddb7879 EE Cache: Writeback dirty cache entries when exiting the interpreter. 2024-12-08 17:49:33 -05:00
JordanTheToaster
046b416f61 Deps: Update SDL to 2.30.10 2024-12-08 11:06:01 -05:00
JordanTheToaster
2cb311dd24 3rdparty: Update googletest to v1.15.2 2024-12-08 11:04:38 -05:00
JordanTheToaster
ba36d4b0c8 GameDB: Fix incorrect field order in Silent Hill 3 FMVs 2024-12-08 10:16:12 -05:00
TheLastRar
5de1c60d50 DEV9: Apply const within in PacketReader 2024-12-07 09:22:26 +01:00
TheLastRar
a8a170ebe6 DEV9: Apply const to basic payload types
Propagate const into PacketReader classes as needed
Provide non-const editor version for pcap
2024-12-07 09:22:26 +01:00
PCSX2 Bot
d7937943b0 [ci skip] Qt: Update Base Translation. 2024-12-06 19:14:30 -05:00
JordanTheToaster
3f1df0ea92 3rdparty: Update WIL to v1.0.240803.1 2024-12-06 16:59:34 -05:00
JordanTheToaster
caaa3519ad 3rdparty: Update Vulkan-Headers to v1.4.303 2024-12-06 16:59:34 -05:00
JordanTheToaster
58ab271fc1 Deps: Update to libzip 1.11.2 2024-12-06 16:59:34 -05:00
JordanTheToaster
981fedfdd1 3rdparty/rcheevos: Bump to v11.6.0 2024-12-06 16:59:34 -05:00
JordanTheToaster
ac968f9a6a OSD: Fix status view regression 2024-12-06 16:59:15 -05:00
JordanTheToaster
ac15b77f89 Deps: Update to Qt 6.8.1 on Windows and Linux 2024-12-06 16:59:15 -05:00
chaoticgd
6e4dc1e8ab FileSystem: Don't follow symlinks when recursively deleting directories 2024-12-05 11:52:40 -05:00
chaoticgd
46d17fcb20 FileSystem: Add a test for deleting directories with symlinks 2024-12-05 11:52:40 -05:00
TheLastRar
f91f39afcd DEV9: Fix race-condition while handling closed connection 2024-12-05 11:32:24 -05:00
TheLastRar
f317ba327c DEV9: Correct alignment calculation in Sockets 2024-12-05 11:32:24 -05:00
TheLastRar
00f4cd5252 DEV9: Prevent out of bounds reads in ICMP fix 2024-12-05 11:32:24 -05:00
TheLastRar
0a44e20c34 DEV9: Correct function definitions 2024-12-05 11:32:24 -05:00
TheLastRar
abeb1ca49d DEV9: Skip over invalid gateways 2024-12-05 11:32:24 -05:00
PCSX2 Bot
ee3abe745c [ci skip] Qt: Update Base Translation. 2024-12-03 19:03:20 -05:00
KamFretoZ
a024c25019 Achievements: Fix progression overlay stacking 2024-12-03 17:39:17 +01:00
KamFretoZ
5bf3166832 Qt: Fix Verbose Status Formatting 2024-12-03 17:39:17 +01:00
KamFretoZ
7ef293744a Qt: Move video capture option from Tools to System 2024-12-03 17:39:17 +01:00
TheLastRar
07df874603 DEV9: Avoid iterating over modified vector in UDP_FixedPort 2024-12-03 11:10:31 -05:00
TheLastRar
687c587d19 DEV9: Always bind UDP ports 2024-12-03 11:10:31 -05:00
PCSX2 Bot
671255c684 PAD: Update to latest controller database. 2024-12-02 23:27:24 +01:00
PCSX2 Bot
c31f324853 [ci skip] Qt: Update Base Translation. 2024-11-29 01:30:06 +01:00
lightningterror
5b7122bd30 GS/TC: Remove no longer needed asserts in PreloadTarget.
Asserts are no longer needed as we check for width offset and adjust width accordingly using the offset.
2024-11-28 23:59:52 +01:00
TheLastRar
4a04100207 [SAVEVERSION+] HostFS: Always write savestate tag 2024-11-28 15:47:52 -05:00
TheLastRar
93652a3115 SaveState: Bounds check FreezeMem loads 2024-11-28 15:47:52 -05:00
chaoticgd
4ad1355af3 Debugger: Make sure the colours of functions are consistent across runs 2024-11-28 12:59:24 -05:00
chaoticgd
2501d87840 Console: Fix newline logging regression 2024-11-28 12:53:42 -05:00
Ty Lamontagne
4eae1b7127 Deps: Fix zlib patch hash 2024-11-27 15:13:57 -05:00
TellowKrinkle
a71ea9917a Vulkan: Re-add shaderc status strings to error messages 2024-11-27 14:57:16 -05:00
KamFretoZ
500e2c43b1 Shaderc: Make non-semantic debug optional
Don't you hate it when you come up with more ideas just minutes AFTER the PR has been merged?
2024-11-27 14:57:16 -05:00
KamFretoZ
e6a4cee86c CI: Ensure dependency cache key reflects all state 2024-11-27 14:57:16 -05:00
Dreadmoth
5a94f6819d GameDB: Champions of Norrath & Champions: Return to Arms (PAL) (#11976)
Add Half Pixel Offset Special (Texture) and Round Sprite Half to Champions of Norrath.
Add Show Overscan to Champions of Norrath and Champions: Return to Arms.
2024-11-27 17:39:40 +01:00
chaoticgd
132e3e507d 3rdparty/ccc: Fix some bounds checks and other error handling logic 2024-11-27 17:37:36 +01:00
chaoticgd
ffa06fbb09 3rdparty/ccc: Make CCC_ASSERT macro call abort instead of exit 2024-11-27 17:37:36 +01:00
TheLastRar
028e6cd8a8 CDVD: Fix DevCon log typo 2024-11-26 19:09:07 -05:00
chaoticgd
719063e996 Console: Limit buffer size in ConsoleLogFromVM::Write 2024-11-26 22:44:00 +01:00
PCSX2 Bot
5d40f36fa8 [ci skip] Qt: Update Base Translation. 2024-11-26 19:33:00 +01:00
PCSX2 Bot
31ffcfc920 PAD: Update to latest controller database. 2024-11-25 17:06:11 +01:00
Ty Lamontagne
c9642b70f6 CDVD: Only take ADR and track index/num from host IOCTL SUBQ
Fixes the OSDSYS CD player minute:second counter
2024-11-25 10:02:23 -05:00
Ty Lamontagne
849fa57bf6 CDVD: Adjust register logging 2024-11-25 10:02:23 -05:00
Ty Lamontagne
2c95ef76f1 CDVD: Minor cleanup and fix off-by-one TOC filling issue 2024-11-25 10:02:23 -05:00
Ty Lamontagne
4d9cb885b2 CDVD: Use disc track indexes for our track array. 2024-11-25 10:02:23 -05:00
Ty Lamontagne
e375f98f7a CDVD: Fix OSDSYS Audio CD regression.
There is still an existing issue with the tracks.
2024-11-25 10:02:23 -05:00
lightningterror
1b80f3aea2 Vif: Cleanup code a bit.
Const, casts, nullptr.
2024-11-25 14:02:59 +01:00
Jordan
b0496645f1 GameDB: Various fixes (#12030)
Fixes texture flickering in mission screens on PTO IV Pacific Theater of Operations and corrupted textures banding lighting in levels and bloom misalignment in MOH European Assault.
2024-11-24 19:39:05 +01:00
lightningterror
235cb13647 Vif: Replace some asserts with logs.
The conditions need hardware testing.
Use logs instead so the games don't crash and are still playable.
2024-11-23 13:13:19 +01:00
lightningterror
504dd9f513 Vif: Rename/remove new prefix from files. 2024-11-23 13:13:19 +01:00
Ty Lamontagne
e3fedf1676 QT: Use SetStatusText instead of passing a formatted string as a fmt
This caused crashes when file names had percent signs in them because we passed the file name as the format to SetFormattedStatusText. I opted to continue to use fmt for consistency.
2024-11-22 19:28:55 -05:00
lightningterror
f113a51783 DEV9: Code cleanup.
Casts, constants, unused functions, switch cases.
2024-11-23 00:21:41 +01:00
chaoticgd
f69d5835b8 PINE: Fix stack buffer overflow for long XDG_RUNTIME_DIR paths 2024-11-22 14:10:32 -05:00
PCSX2 Bot
8e8277c0c9 [ci skip] Qt: Update Base Translation. 2024-11-21 01:42:41 +01:00
secondsabre
c6c4eaf31c GameDB: Atelier Iris (SLUS-21113) fixes (#12021) 2024-11-20 15:33:34 -05:00
KamFretoZ
6324722b65 Qt: Add Volume indicator to verbose status 2024-11-20 15:56:15 +01:00
KamFretoZ
efd8c9ec69 OSD: Move VU stats above SW threads. 2024-11-20 15:56:15 +01:00
TellowKrinkle
9858aa1aa5 CMake: Try to put /usr/local/include last 2024-11-18 02:22:30 -06:00
PCSX2 Bot
256a946f96 [ci skip] Qt: Update Base Translation. 2024-11-17 14:43:32 +01:00
chaoticgd
a507964f33 Debugger: Generate a name map for label symbols 2024-11-16 11:50:19 -05:00
chaoticgd
7584a6bb29 Debugger: Allow symbols starting with an underscore in expressions 2024-11-16 11:50:19 -05:00
chaoticgd
ce6103be30 Debugger: Improve function scanner performance for unmapped addresses 2024-11-16 11:50:19 -05:00
chaoticgd
9da4459ab3 Debugger: Run the function scanner on the main symbol database 2024-11-16 11:50:19 -05:00
chaoticgd
3b9b9a84cd Debugger: Use expressions for the function scanner address range 2024-11-16 11:50:19 -05:00
chaoticgd
cce0ae4369 Debugger: Allow loading symbols conditionally and with a base address 2024-11-16 11:50:19 -05:00
chaoticgd
efb43ac7f9 Debugger: Make the expression parser thread safe 2024-11-16 11:50:19 -05:00
lightningterror
8132a8a7f8 USB: Cleanup eyetoy code a bit.
Types, casts, consts.
2024-11-15 15:58:23 +01:00
PCSX2 Bot
9c753cb692 [ci skip] Qt: Update Base Translation. 2024-11-15 14:26:08 +01:00
Berylskid
514e6675c4 GameDB: Fix Enemies Stuck in Armored Core Nine Breaker 2024-11-14 11:22:00 -05:00
Chromaryu
18454fd5d0 GameDB: Add TexInRT on SLPM-62482 2024-11-14 11:20:03 -05:00
chaoticgd
eeb919325e Misc: Minimise the amount of work done when svnrev.h is updated 2024-11-12 09:14:39 -05:00
Julien Reichardt
959be142ed Deps: Update Flatpak dependencies 2024-11-12 08:36:52 -05:00
PCSX2 Bot
42be91d48d PAD: Update to latest controller database. 2024-11-11 14:20:57 -05:00
Bobby Smith
908f916656 GameDB: NBA 2K6 fix hangs on PAL version 2024-11-11 11:52:44 -05:00
Ty Lamontagne
5441c7ed59 Debugger: Use native separators when using external symbol files 2024-11-06 17:06:37 -05:00
chaoticgd
bea471a0e3 Debugger: Fix loading symbols from ELF files other than the boot ELF 2024-11-06 16:58:07 -05:00
chaoticgd
4dafee17e0 Debugger: Refactor nocash symbol importer 2024-11-06 14:23:22 -05:00
PCSX2 Bot
af10be9036 [ci skip] Qt: Update Base Translation. 2024-11-05 19:06:39 -05:00
KamFretoZ
1a4e3ab581 OSD: Fix Pause indicator not showing up 2024-11-05 10:38:49 -05:00
lightningterror
d9e9cf8967 workflows: Fix commit name for daily translations.
Also keep [ci skip] at the start of the commit name as some workflows may require it at the start.
2024-11-05 14:38:58 +01:00
PCSX2 Bot
041b0cb561 PAD: Update to latest controller database. 2024-11-04 17:37:11 +01:00
JordanTheToaster
4ad5dde780 3rdparty: Sync cpuinfo to commit 8df44962d437a0477f07ba6b8843d0b6a48646a4 2024-11-04 12:41:54 +01:00
JordanTheToaster
0bc043a0bb 3rdparty: Update LZMA/7zipSDK to 24.08 2024-11-04 12:41:54 +01:00
JordanTheToaster
c936b7db29 Deps: Update SDL to 2.30.9 2024-11-04 12:41:54 +01:00
JordanTheToaster
2793c49694 Deps: Update Freetype to 2.13.3
a
2024-11-04 12:41:54 +01:00
JordanTheToaster
c578859122 3rdparty: Update xbyak to 7.21 2024-11-04 12:41:54 +01:00
JordanTheToaster
43e6f06a9e Deps: Update libpng to 1.6.44 2024-11-04 12:41:54 +01:00
JordanTheToaster
cf8e9f773e Deps: Update Harfbuzz to 10.0.1 2024-11-04 12:41:54 +01:00
PCSX2 Bot
ed3bdc61f4 Qt: Update Base Translation 2024-11-04 12:40:42 +01:00
TheLastRar
e57f7d92c3 FSUI: Don't move IMGUI cursor unnecessarily in DrawGameGrid() 2024-11-04 12:40:31 +01:00
Gd7
b95eb5cd74 GameDB: Final Fantasy X Optimal FPU config. (#11958)
Fixes the vast majority of FFX's FPU glitches as well as fixing a major cutscene bug without breaking anything more than what the current config already breaks.

EE clamping fixes reverse controls and characters and enemies facing the wrong way during battles, everything else is affected by EE rounding and EE division rounding.

VU0 clamping affects nothing.
2024-11-04 12:40:16 +01:00
KamFretoZ
b865bbb0d3 CI: Add ci skip to base translation update workflow 2024-11-04 12:39:04 +01:00
KamFretoZ
ca6e1c9a46 Qt: Cleanup Unused InputRec Menu 2024-11-04 12:39:04 +01:00
KamFretoZ
ea8a2deae6 Qt: Icon Tweaks 2024-11-04 12:39:04 +01:00
KamFretoZ
c67237672c Qt/Savestate: Add option to disable savestate selector UI 2024-11-04 12:39:04 +01:00
Ty Lamontagne
2d5faa627f CI: Default to flatpak beta branch 2024-10-31 09:22:11 -04:00
Tyler Wilding
1562ba4ca0 translations: Syncing Crowdin translations (#11970) 2024-10-31 09:21:06 -04:00
Ty Lamontagne
a5d94ac454 Patches: Fix a regression that broke gamedb dynpatches 2024-10-30 17:07:07 -04:00
Ty Lamontagne
943fbd8719 Dis5900asm: Fix an out of bounds access on invalid pmfhl formats 2024-10-30 09:15:17 -04:00
Ty Lamontagne
eea1d57e7e PAD: Fix negon and jogcon BPM crash 2024-10-29 18:52:44 -04:00
PCSX2 Bot
74645aa1b7 PAD: Update to latest controller database. 2024-10-28 17:56:47 +01:00
PCSX2 Bot
dfd23d9a25 Qt: Update Base Translation 2024-10-27 20:07:36 -04:00
KamFretoZ
27cf16a09c CI: Fix Translation Workflow Scripts Order of Operation
[ci skip]
2024-10-27 10:20:02 -04:00
PCSX2 Bot
0dee9e3ff1 Qt: Update Base Translation 2024-10-26 21:06:14 -04:00
KamFretoZ
9b47dc0ee3 OSD: Fix Input Overlay Clipping 2024-10-26 11:20:49 -04:00
KamFretoZ
c7b9ee92b7 Qt: Properly Grey Out Checkboxes When Perf OSD is Disabled 2024-10-26 11:20:49 -04:00
KamFretoZ
ac32e6ca92 FSUI: Fix and Tweak BPM Buttons and Legends 2024-10-26 11:20:49 -04:00
TheLastRar
0c204c3ebb Qt: Hackfix settings icon stretching on Windows themes 2024-10-24 12:23:36 -04:00
PCSX2 Bot
016b871734 Qt: Update Base Translation 2024-10-23 20:04:03 -04:00
lightningterror
22413b8e7f GS/OGL: Only paste all available extensions in dev/debug build. 2024-10-23 10:11:06 -04:00
lightningterror
1b50057764 GS/Qt: Adjust how we handle Default adapter.
Try to resolve it again since it annoys me.

Treat is as empty.

Also do NOT translate Default adapter,
it messes with the ini config.
2024-10-23 10:11:06 -04:00
lightningterror
9e15058634 GS/D3D12: Disable DX12 if feature level is not detected.
Intel Haswell doesn't actually support DX12 even tho the device is created which results in a crash,
to get around this check if device can be created using feature level 12 (skylake+).
2024-10-23 10:11:06 -04:00
lightningterror
2a81a7af9e GS: Check feature level 12 as a requirement when selecting auto renderer on intel.
Just to be on the safe side when selecting OpenGL.
2024-10-23 10:11:06 -04:00
chaoticgd
6d3d5ebdc5 Qt: Fix symbol sources list in per-game settings dialog 2024-10-23 09:58:59 -04:00
chaoticgd
7d63a9e51c Debugger: Avoid resetting symbol trees while single stepping 2024-10-23 09:58:02 -04:00
JordanTheToaster
56a2b3b5ad VMManager: Add renderer selection warning 2024-10-23 09:55:36 -04:00
badfontkeming
f46f788d80 USB: Fix FFB quality and dropouts for most wheels, make workaround optional
The original workaround for FFB issues simply restarted the constant force
each time it was updated. Turns out that a lot of wheels don't behave
perfectly during this. A better fix was found, which is to set the effect
duration to infinite. However, some wheels are so bugged that they don't even
respect THAT, so the workaround needs to stick around in some capacity.
2024-10-23 08:40:47 -04:00
TheLastRar
a044b7cf6e DEV9: Set/Clear SEEK bit in all relevent commands (#11931)
* DEV9: Set SEEK on all successful seeks

* DEV9: Complete HDD_Flush immediately when write queue is empty

Also set SEEK when write queue isn't empty

* DEV9: Lock reported value of SEEK when errored
2024-10-23 08:36:16 -04:00
Rares-Alexandru Fodor
8afd29e1a2 Qt: Add search bar for cheats 2024-10-23 08:34:47 -04:00
Rares-Alexandru Fodor
d89b051e6d Qt: Replace QTreeWidget with QTreeView for cheat list 2024-10-23 08:34:47 -04:00
Ty Lamontagne
47cf69d2b3 TraceLogging: Fix SIF trace logging 2024-10-23 08:30:37 -04:00
PCSX2 Bot
35c3c912e7 PAD: Update to latest controller database. 2024-10-21 12:02:59 -04:00
Ziemas
67c5f0229b EE: vtlb handler for writes to IOP mem 2024-10-21 11:14:29 -04:00
github-actions[bot]
5dcc79555d Qt: Update Base Translation (#11932)
Co-authored-by: PCSX2 Bot <PCSX2Bot@users.noreply.github.com>
2024-10-20 20:04:11 -04:00
TheLastRar
82f741e1dc DEV9: Add ATA commands used by PS2 Linux (#11925) 2024-10-19 20:05:34 -04:00
Ty Lamontagne
ab21d22514 Misc: wire up and refactor trace logging 2024-10-19 20:04:02 -04:00
PCSX2 Bot
0a599e7337 Qt: Update Base Translation 2024-10-18 20:26:49 -04:00
chaoticgd
f77bf1ec6b Debugger: Be smarter about deciding when functions should be hashed 2024-10-18 13:57:05 -04:00
chaoticgd
ed4fbb4f5a Debugger: Hash functions scanned in by the MIPS analyst 2024-10-18 13:57:05 -04:00
chaoticgd
f963291970 Debugger: Cache hash match results on symbol tree nodes 2024-10-18 13:57:05 -04:00
chaoticgd
2c3abe33d5 Debugger: Add settings to control the analysis passes 2024-10-18 13:57:05 -04:00
chaoticgd
0fd7e1d7c2 Debugger: Split out SymbolImporter into its own class 2024-10-18 13:57:05 -04:00
TheLastRar
1e23e7efc4 DEV9: Add note regarding IF_CTRL bit 3 2024-10-17 16:10:38 -04:00
TheLastRar
46d5d24fcd DEV9: Correct SPD_XFR_DMAEN define 2024-10-17 16:10:38 -04:00
TheLastRar
3276c0db9c DEV9: Correct implementation of SPD_R_DBUF_STAT reset 2024-10-17 16:10:38 -04:00
TheLastRar
1bdd53a6c5 DEV9: Don't fake the FIFO 2024-10-17 16:10:38 -04:00
TheLastRar
1f2d9ab4e5 IOP: Seperate completing DMA8 to a seperate function 2024-10-17 16:10:38 -04:00
TheLastRar
0806ca442a DEV9: Use ReceivedPayload more in TCP_Session
Instead of shuffling a unique_ptr around
Fixes handling of connection failure in ConnectTCPComplete()
2024-10-15 08:51:09 -04:00
TheLastRar
e3a666bfe4 DEV9: Move adapter detection hack 2024-10-15 08:37:21 -04:00
TheLastRar
6b2dc7a68c DEV9: Move call to network backend reset
SMAP_R_EMAC3_TxMODE1_L is unrelated to resetting the adapter
2024-10-15 08:37:21 -04:00
PCSX2 Bot
18c492d9da Qt: Update Base Translation 2024-10-15 12:28:13 +02:00
TheLastRar
6065caaf19 DEV9: Allow writes to ATA_R_CONTROL while busy 2024-10-15 12:22:03 +02:00
TheLastRar
bb4c456f35 DEV9: Disable interrupts on reset 2024-10-15 12:22:03 +02:00
TheLastRar
078a10dcdb DEV9: Implement ATA pending interrupts 2024-10-15 12:22:03 +02:00
TheLastRar
a8a0c5c0bf DEV9: Rewrite suppression of diagnostics IRQ during reset 2024-10-15 12:22:03 +02:00
TheLastRar
1a95bd3088 DEV9: Support 8bit reads/writes for most ATA regs 2024-10-15 12:22:03 +02:00
PCSX2 Bot
cf157fd2d7 PAD: Update to latest controller database. 2024-10-14 18:12:02 +02:00
Ziemas
35ada362d4 IOP/EE: Add SBUS interrupts
Lets the CPUs trigger an interrupt on the other.
2024-10-14 09:15:42 -04:00
KamFretoZ
444b110411 GSDevice11: Don't try to get the adapter name twice 2024-10-14 14:42:01 +02:00
KamFretoZ
1b82fac70e OSD: Clarify Min/Avg/Max label to Frametime counter 2024-10-14 14:42:01 +02:00
badfontkeming
dafca1e264 USB: Work around FFB dropouts with modern wheels
Certain modern direct-drive wheels such as the Moza R5, R9, etc. implement
timeouts for FFB constant forces, and expect the forces to be re-run
rather than updated in order to refresh these timeouts.
2024-10-13 17:58:52 -04:00
lightningterror
69de95df8b GS: Default to OpenGL on intel GPUs that support it.
Feature level 12 requirement.
2024-10-13 23:15:22 +02:00
JordanTheToaster
ca9f64a08b GameDB: Various fixes 2024-10-13 11:03:22 -04:00
PCSX2 Bot
3b3e35beb7 Qt: Update Base Translation 2024-10-13 00:05:55 +02:00
TheLastRar
c087fc430b DEV9: Allow 8bit reads/writes to all SPEED regs 2024-10-11 19:13:06 -04:00
TheLastRar
d1a4733939 DEV9: Replace incorrect SPD_R_20 behaviour 2024-10-11 19:13:06 -04:00
Bobby Smith
5845109b75 Qt: Call 'map_text_to_keycode()' only when Shift modifier is being used 2024-10-10 18:35:36 -04:00
Ty Lamontagne
7dd2ebdf49 Translations: hotfix a translation mistake causing fmt to crash 2024-10-09 19:24:08 -04:00
TheLastRar
3e78322ea4 DEV9: Rework tx_process based on HW tests 2024-10-09 10:37:54 -04:00
Chromaryu
8d6633fcf9 OSD: Update OSD Text on SW mode so no overlap keyword appears (#11881) 2024-10-09 08:25:30 -04:00
Ty Lamontagne
1c1f67c091 IOP HLE: Only track handles to valid files.
Bonus check for file validity when saving states.
2024-10-08 18:01:11 -04:00
PCSX2 Bot
324b1464e4 Qt: Update Base Translation 2024-10-08 22:13:02 +02:00
JordanTheToaster
1e9a248a0c Deps: Update to Qt 6.8.0 on Windows and Linux 2024-10-08 16:00:37 -04:00
TheLastRar
4319094b02 QT: Clear m_status_verbose_widget text on VM stop 2024-10-08 15:44:59 -04:00
chaoticgd
60abebb3a5 Debugger: Fix crash in symbol tree menu code 2024-10-08 09:47:41 -04:00
PCSX2 Bot
62f20a4809 PAD: Update to latest controller database. 2024-10-07 18:06:16 +02:00
Ty Lamontagne
924326460c Debugger: Destroy and re-create the debugger on theme change 2024-10-07 11:24:09 -04:00
pips3
bba85dc08f HostFS: Retain File Handles in Save States
[SAVEVERSION+]
Save file handle information in save states, and reopen handles when states are loaded.
2024-10-07 09:56:31 -04:00
KamFretoZ
68678ac4ec CI: Add other translations related scripts script to the daily workflow
[ci skip]
2024-10-06 09:31:31 -04:00
PCSX2 Bot
7f9f383324 Qt: Update Base Translation 2024-10-05 20:06:55 -04:00
wxvu
1239c94fba GameDB: Add hwfixes to Armored Core 3 and Sandlot titles. (#11873)
Adds Merge Sprite to Armored Core 3 and adds HPO Native + Autoflush to all Sandlot titles.
2024-10-06 00:38:34 +02:00
KamFretoZ
2ab24bbf28 Qt: Move savestate related options to its new home 2024-10-05 11:04:39 -04:00
KamFretoZ
a304959933 OSD/Savestate: Add close menu hint to the selector
Don't you hate it when you come up with more ideas just minutes AFTER the PR has been merged?
2024-10-05 11:04:39 -04:00
lightningterror
5f0bc729d7 GS/TC: Clamp TW/TH to 11 in source flush.
Clamp TW/TH to 11, as GS memory loops around 2048, anything higher than 12 causes a crash when texture mapping isn't supported like in Direct3D11.
2024-10-03 17:25:23 +02:00
JordanTheToaster
e2421bf3c6 Deps: Update to SDL 2.30.8 2024-10-02 12:53:27 -04:00
JordanTheToaster
9b4b21887f 3rdparty: Update Vulkan-Headers to v1.3.296 2024-10-02 09:52:13 -04:00
PCSX2 Bot
cc9eaef477 Qt: Update Base Translation 2024-10-01 20:18:11 -04:00
KamFretoZ
c1eecb3512 Savestate: Make selector dismissible by opening pause menu 2024-10-01 19:05:51 -04:00
KamFretoZ
58a26dbca4 Qt: Update Glyph Ranges 2024-10-01 19:05:51 -04:00
KamFretoZ
d06700276f Tools: Add shebang to generate fs translation script 2024-10-01 19:05:51 -04:00
KamFretoZ
ab5b622d70 Qt: Fix VPS Counter 2024-10-01 19:05:51 -04:00
KamFretoZ
60e21e2530 SaveState: Add configurable compression type and level 2024-10-01 19:05:51 -04:00
Ty Lamontagne
a694c1bd26 Debugger: Use safe VTLB functions for memory reading and writing 2024-09-29 10:23:00 -04:00
Ty Lamontagne
84d16802a3 iop/hostfs: don't replace back slashes with forward slashes on Windows 2024-09-29 10:20:31 -04:00
JordanTheToaster
02fda478ea Deps: Update to libzip 1.11.1 2024-09-29 10:17:43 -04:00
chaoticgd
31dcda05b7 DebugTools: Scan for functions from the ELF instead of from memory 2024-09-28 12:17:55 -04:00
PCSX2 Bot
5479ab1b8a Qt: Update Base Translation 2024-09-26 20:24:43 -04:00
Ty Lamontagne
cc9c0f9b12 Patches: Implement dynamic patching support in pnaches 2024-09-26 17:15:31 -04:00
Tyler Wilding
aa5a94df5a translations: Syncing Crowdin translations (#11849) 2024-09-26 16:42:42 -04:00
PCSX2 Bot
d9b7f413ff Qt: Update Base Translation 2024-09-26 02:47:57 +02:00
crashGG
6c3cf12df6 GS: Add a 10:7 pixel ration option 2024-09-25 11:46:09 -04:00
lightningterror
13e0546f56 GS/HW: Make sure it's not a channel shuffle when the alpha of a target is used as source.
The alpha of a target used a source is meaningless to us,
since it's not really an indexed texture.
2024-09-23 23:57:09 +02:00
PCSX2 Bot
c01dc20284 Qt: Update Base Translation 2024-09-23 23:56:16 +02:00
PCSX2 Bot
3faf22256e PAD: Update to latest controller database. 2024-09-23 18:01:50 +02:00
Matthew
ac4d827a9c Qt: Add a permission error dialog when converting memorycards in a R/O directory 2024-09-22 14:15:22 -04:00
weirdbeardgame
95201409e3 CDVD: 0 index into tracks array 2024-09-21 10:49:26 -04:00
weirdbeardgame
89cd474278 CDVD: Added cdvdTrack, cdvdTrackIndex
used IOCtl SubQ reads to get proper control register
Added Checks for Control fields.
2024-09-21 10:49:26 -04:00
Joe Wagner
fc715d58f0 Qt: Fix keyboard SHIFT for non-alpha characters 2024-09-20 03:01:33 +02:00
Stuart Kenny
217e1c8fae GS: Update lottes crt shader. 2024-09-19 17:51:29 +02:00
lightningterror
5486eed151 GS/HW: Merge blend ad a mask separate conditions in to one.
Duplicate code.
2024-09-19 00:19:05 +02:00
Ty Lamontagne
d1721360ff DebugInterface: Fix formatting 2024-09-18 16:57:20 -04:00
Ty Lamontagne
0a0f99dd1b DebugInterface: Try to show the kernel memory mappings, again 2024-09-18 12:50:48 -04:00
PCSX2 Bot
eb5ea6f64e Qt: Update Base Translation 2024-09-18 17:38:09 +02:00
lightningterror
1d449e9675 FullscreenUI: Remove unused function.
CopyGlobalControllerSettingsToGame.
2024-09-17 23:19:00 +02:00
Ty Lamontagne
c82671fce4 microVU: fix block clearing regression 2024-09-16 16:46:23 -04:00
oltolm
4c267c4206 microvu: fix ASAN container-overflow in mVUsetupRange 2024-09-16 13:48:00 -04:00
PCSX2 Bot
158e67cf6d Qt: Update Base Translation 2024-09-16 18:41:23 +02:00
Pyra Drake
1afff1a064 GameDB: Pro Race Driver fixes
Pro Race Driver fixes for upscaling lines.
2024-09-16 18:41:05 +02:00
JordanTheToaster
904874d959 OSD: Improve main window stat spacing 2024-09-16 18:40:20 +02:00
PCSX2 Bot
d33168d31f PAD: Update to latest controller database. 2024-09-16 18:39:49 +02:00
Ty
2b7c4ae438 gh: update the feature request template labels
We are trying out a new feature request labelling system.
2024-09-15 14:40:05 -04:00
lightningterror
6483565d47 GS/HW: Fix/cleanup pabe optimization condition.
We should check only if As max is 128, also make sure we are checking the original Alpha C value as it could have been modified for an optimization.
2024-09-15 20:39:41 +02:00
JordanTheToaster
11704f7f0c GameDB: Various fixes 2024-09-15 14:38:38 -04:00
chaoticgd
8d3f4fac23 Debugger: Prevent flicker when resetting symbol tree node children 2024-09-15 08:57:12 -04:00
chaoticgd
93b18412f5 Debugger: Make check box widgets in the symbol tree more responsive 2024-09-15 08:57:12 -04:00
JordanTheToaster
d9c5f22d1e OSD: Rename various fields 2024-09-15 08:41:12 -04:00
KamFretoZ
d12ef2b17c OSD: Add GPU Info (#11808)
* OSD: Add GPU Info

* Qt: More Translatable Strings
2024-09-15 08:24:05 -04:00
lightningterror
e8e0b97f6d GS/HW: Reduce sw/hdr colclip in more cases.
When doing `Cs*Alpha + Cd*(1 - Alpha)` or `Cd*Alpha + Cs*(1 - Alpha)` with an alpha of 128 or lower
we don't really need to hdr or sw colclip blend it because colour range of the result will be
between 0-1 (0-255) without it overflowing.

Also update previous optimizations to include Ad cases when RTA is already scaled.
2024-09-15 01:09:28 +02:00
PCSX2 Bot
f50083e47a Qt: Update Base Translation 2024-09-14 18:07:20 +02:00
Farran666
461ee350c2 GameDB: Add Skip MPEG Hack to Never7 2024-09-13 16:45:43 -04:00
TheLastRar
0cf4b76876 Common: Fix Recursive CreateDirectoryPath() on Windows 2024-09-12 15:45:45 -04:00
KamFretoZ
4e1979427d Qt: Make Settings List Word Wrapped 2024-09-12 15:42:00 -04:00
KamFretoZ
110426ac9f DiscordRPC: Further improve icon url call 2024-09-12 15:42:00 -04:00
OctopusButtons
4565a62634 UI: Update mipmapping help description
Added mipmapping description similar to the help/hover text of other items. Wording is my own phrasing.
2024-09-12 15:36:19 -04:00
JordanTheToaster
f75da73fca 3rdparty/ffmpeg: Bump headers to version 7.0.2 2024-09-12 11:19:05 -04:00
Ziemas
5c83edb7b2 ExpressionParser: Add missing include in header 2024-09-11 09:09:38 -04:00
Ty Lamontagne
bb1162f6cc Achievements: Reset client state on system reset 2024-09-10 16:58:58 -04:00
Martino Fontana
a4d2332f9c Config: Set {ntsc,pal}FrameRate bounds to 10-300 Hz 2024-09-10 11:58:42 -04:00
Nenderus
4963ea9b11 CMake: Install translations in PACKAGE MODE 2024-09-09 20:11:21 -04:00
PCSX2 Bot
11caae46c1 Qt: Update Base Translation 2024-09-09 20:10:18 -04:00
dependabot[bot]
bfaad9f9bf Bump peter-evans/create-pull-request from 6 to 7 in the ci-deps group
Bumps the ci-deps group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


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

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 20:03:17 -04:00
RedPanda4552
0792ceb21a Config: Prevent pad settings lingering in game properties blocking profiles 2024-09-09 15:06:28 -04:00
smasimar@gmail.com
2886f825aa Added "SaveStateAndSelectNextSlot" hotkey for alternative save slot cycling functionality. 2024-09-09 14:58:15 -04:00
smasimar@gmail.com
22c9b70ca3 Flipped the order of "SaveStateAndSelectNextSlot" to "SelectNextSlotAndSaveState" 2024-09-09 14:58:15 -04:00
PCSX2 Bot
6dbbebeafb PAD: Update to latest controller database. 2024-09-09 18:28:55 +02:00
KamFretoZ
f54eeca1fd FSUI: Move Texture Preloading to Advanced 2024-09-08 14:37:28 -04:00
PCSX2 Bot
7d6f74083b Qt: Update Base Translation 2024-09-06 18:59:17 +02:00
KamFretoZ
28e4b10fda Translation: Remove excess double quote (#11777)
* Translation: Remove excess double quote on the train controller

* Qt: Add Train Controller Icon

* Qt: Expand controller input list

* FSUI: Base Translation Update

* Qt: Update Base Translations
2024-09-03 12:09:54 -04:00
JordanTheToaster
b8405ef7a6 Deps: Update to SDL 2.30.7 2024-09-03 10:26:12 +02:00
PCSX2 Bot
d178bb3904 Qt: Update Base Translation 2024-09-03 10:24:50 +02:00
KamFretoZ
1ea512655a FileSystem: Fix handling of symlinks
Revert of c8a3e5a9ec
2024-09-02 16:18:01 -04:00
chaoticgd
90463a4a6c Debugger: Bring back the expression parser 2024-09-02 16:16:05 -04:00
PCSX2 Bot
f340b5ebd0 Qt: Update Base Translation 2024-09-01 19:07:18 +02:00
Joe Stringer
ab2d18ebf0 USB: Add passthrough support to DenshaCon
Enable an option to use native Densha De Go! controllers and pass the axis inputs from the controller directly through to the game.
2024-08-31 20:47:29 +02:00
Joe Stringer
8d3bb1ad80 Settings: Add DenshaCon bindings UI 2024-08-31 20:47:29 +02:00
Joe Stringer
ed3405b5a9 USB: Add support for Ryojouhen DenshaCon
Add support for TCPP20014 controllers, datasheets courtesy of Marc Riera. Tested with a One Handle MasCon for Nintendo Switch as the controller device.

Link: https://marcriera.github.io/ddgo-controller-docs/controllers/usb/tcpp20014/
2024-08-31 20:47:29 +02:00
Joe Stringer
904d6b9c78 USB: Add support for Shinkansen DenshaCon
Add support for TCPP20011 controllers, datasheets courtesy of Marc Riera. Tested with a One Handle MasCon for Nintendo Switch as the controller device.

Link: https://marcriera.github.io/ddgo-controller-docs/controllers/usb/tcpp20011
2024-08-31 20:47:29 +02:00
Joe Stringer
edcd1d0f9f USB: Add support for Type 2 DenshaCon
Add support for TCPP20009 controllers, datasheets courtesy of Marc Riera. Tested with a One Handle MasCon for Nintendo Switch as the controller device.

Link: https://marcriera.github.io/ddgo-controller-docs/controllers/usb/tcpp20009/
2024-08-31 20:47:29 +02:00
Ty Lamontagne
a8ce6a9f0e UI: Enable "System" and toolbar savestate options in OSDSYS
Saving state in OSDSYS was supported and worked fine with hotkeys, the UI just didn't reflect that.
2024-08-29 11:40:20 -04:00
chaoticgd
42e4a47bfc DebugTools: Fix some compiler warnings 2024-08-28 23:29:35 +02:00
Jordan
e423fd10c6 Misc: Minor text and settings changes (#11751)
* VMManager: Update CPU detection text

* Settings: Move texture preload to advanced

* Settings: Move spin during readback to advanced

* Translations: Add extra comment to mailbox presentation

Update GraphicsSettingsWidget.ui
2024-08-28 16:08:49 -04:00
PCSX2 Bot
f73a9e89f6 Qt: Update Base Translation 2024-08-28 01:02:56 +02:00
chaoticgd
48de49b85d DebugTools: Fix iterator invalidation bug in IopBios.cpp 2024-08-27 18:13:25 -04:00
lightningterror
da1ee3a3b9 GS/HW: Add afix to alphas log. 2024-08-27 19:35:19 +02:00
chaoticgd
79dbc272b8 Debugger: Add symbol tree widgets for functions and variables
This adds three new tabs in the debugger: The Globals tab, the Locals
tab and the Parameters tab. In addition, it rewrites the Functions tab.

All four of these tabs use the new symbol tree widgets and the
associated model. This allows the user the inspect complex data
structures in memory with full type information.

Lastly, new dialogs have been added for creating symbols.
2024-08-27 12:48:40 -04:00
chaoticgd
c83cca1d87 Debugger: Add GNU demangler
This code is taken from GCC 13.2.0 with a number of modifications
applied. See the included readme for more information.
2024-08-27 12:48:40 -04:00
chaoticgd
44b50bee26 Debugger: Replace SymbolMap class with new SymbolGuardian class
This new class uses the CCC library I added in the last commit and
parses the symbol tables on a worker thread.
2024-08-27 12:48:40 -04:00
chaoticgd
87b03fdc28 3rdparty: Add CCC v2.1
This is the symbol table parser that I'm replacing the existing ELF
symbol table parser with. It supports STABS symbols in .mdebug sections
as well as ELF symbols and SNDLL symbols.

It includes its own symbol database, and an AST which facilitates
debugging tools that let the user inspect complex data structures with
full type information.

More information is provided in the included readme.
2024-08-27 12:48:40 -04:00
chaoticgd
b43e05a8fc Debugger: Remove the Avast demangler
This library doesn't support the demangling scheme used by GCC 2.x
compilers and hence doesn't work in lots of cases.
2024-08-27 12:48:40 -04:00
lightningterror
67d7744f7f GS/HW: Further expand blend multipass.
For formulas:
Cs*Alpha + Cd*(1 - Alpha).
Cd*Alpha + Cs*(1 - Alpha).
Where Alpha is higher than 1 and is either As or Af.
2024-08-27 13:38:44 +02:00
RedPanda4552
27fb7dc26e Big Picture: Remove ability to make per-game controls
Replace with profile selector instead
2024-08-26 19:36:25 -04:00
PCSX2 Bot
04168a0359 PAD: Update to latest controller database. 2024-08-26 18:42:50 +02:00
deanff
1131db784f Qt: Set focus to Game Library for improved keyboard navigation (#11719)
Improved keyboard navigation. Users can navigate the Library and play/exit games with just the arrow keys and Enter/Esc.
2024-08-24 18:00:34 +02:00
Florin9doi
517fba3686 USB: Fix CaptureEye corruption on dark images 2024-08-24 17:28:17 +02:00
KamFretoZ
64e17fce3f Qt: Fix a couple of instances of inconsistent sorting
Backport from 7927ec647f
2024-08-24 17:27:39 +02:00
KamFretoZ
518728ca36 Qt: Center type icon in game list
Backport from: 93836636a1
2024-08-24 17:27:39 +02:00
KamFretoZ
d1a7430f80 Qt: Fix incorrect sort indicator on loading
Backport from: a56ebf24b2
2024-08-24 17:27:39 +02:00
KamFretoZ
973c522756 Qt: Ensure fullscreen UI is stopped on exiting
Backport from: 533022bb7d
2024-08-24 17:27:39 +02:00
KamFretoZ
5536342f9d ImGuiManager: Fix stutter when multiple OSD messages lapse
fe55446c25
2024-08-24 17:27:39 +02:00
KamFretoZ
d9ddab1a33 ImGuiFullscreen: Fix incorrect notification width
Backport from: e455a5e371
2024-08-24 17:27:39 +02:00
KamFretoZ
c915aac1fa FileSystem: Correctly use lstat() on Linux
Backport from: 81295c8a7d
2024-08-24 17:27:39 +02:00
KamFretoZ
a3c2a4db5f GSTextureVK: Fix download inside render pass
Backport from: 5f8082734e
2024-08-24 17:27:39 +02:00
KamFretoZ
aebebf5115 Qt: Work around theme switching bug
backport from: b2577ef8bd
2024-08-24 17:27:39 +02:00
KamFretoZ
9a50218400 Image: Fix crash loading corrupted/invalid JPEG files
Backport from: afea18f65e
2024-08-24 17:27:39 +02:00
TellowKrinkle
fd5a652270 Vk: Don't try to transition present source during present 2024-08-23 20:59:26 -05:00
Farran666
c647a30aa9 GameDB: Add multiple fixes 2024-08-23 15:22:51 +02:00
lightningterror
40d5c78573 GS/HW: Implement PABE(Per pixel alpha blending) on accumulation blend and add optimizations.
PABE accumulation blend:
Idea is to achieve final output Cs when As < 1, we do this with manipulating Cd using the src1 output.
This can't be done with reverse subtraction as we want Cd to be 0 when As < 1.
Blend mix is excluded as no games were found, otherwise it can be added.

PABE Disable blending:
We can disable blending here as an optimization since alpha max is 128
which if alpha is 1 in the formula Cs*Alpha + Cd*(1 - Alpha) will give us a result of Cs.
2024-08-22 21:39:19 +02:00
xperia64
fe2a9fc2cd GameDB: Correct two Phoenix Games title names 2024-08-22 11:34:51 -04:00
squidbus
83f9add68b Config: Allow specifying portable directory relative path in portable.txt 2024-08-21 12:32:10 -04:00
KamFretoZ
ffe8d16df4 DiscordRPC: Add game icon support. 2024-08-21 12:28:56 -04:00
PCSX2 Bot
31b5672870 Qt: Update Base Translation 2024-08-20 10:11:20 +02:00
Florin9doi
777fc444ae USB: Rename singstar to usb_mic 2024-08-20 10:09:21 +02:00
Florin9doi
cd5c961dc4 USB: Konami ON-SAY microphone emulation 2024-08-20 10:09:21 +02:00
Florin9doi
c2ea8c4eab USB: Audio support for EyeToy 2024-08-20 10:09:21 +02:00
Florin9doi
d6507a945b USB: Merge Singstar and Logitech mics in a single device with 2 subtypes 2024-08-20 10:09:21 +02:00
PCSX2 Bot
f1abee5d0b Qt: Update Base Translation 2024-08-19 09:15:02 +02:00
Jordan
e4dccc237c Misc: Minor cleanup. (#11717)
Changes video max bitrate to 200,000kbps default audio from 160kbps to 192kbps and adds a missing name I forgot to add previously.
2024-08-19 09:14:27 +02:00
KamFretoZ
92d8c740d4 Qt: Fix a couple of theme switching glitches
Backport from: 6f9e8efee5
2024-08-19 08:54:35 +02:00
KamFretoZ
b6eddade00 Qt: Slightly increase game list title size 2024-08-19 08:54:35 +02:00
KamFretoZ
04fdd09d1e ImGuiFullscreen: Display checkmark on right of choice dialog
Backport from: f5815f3183
2024-08-19 08:54:35 +02:00
KamFretoZ
69574aecc6 ImGuiFullscreen: Fix choice popup selected drawing over border
Backport from 05f9f33ec6
2024-08-19 08:54:35 +02:00
KamFretoZ
c72d98d4cd FullscreenUI: Fix popup close resetting window scroll
Backport from 13a37418e6
2024-08-19 08:54:35 +02:00
Florin9doi
4f405adea9 USB: Store unique disk images for MSD and PictureParadise 2024-08-18 19:29:09 +02:00
Florin9doi
5217ec375d USB: Fix Konami Capture Eye assert 2024-08-18 19:27:48 +02:00
JordanTheToaster
10b264b9ec 3rdparty/imgui: Disable the nav menu
Courtesy to Fobes for figuring this out because I was not getting anywhere.
2024-08-16 11:27:24 -04:00
JordanTheToaster
dc741e95bd 3rdparty/imgui: General cleanup
Clean up and replacing obsolete functions.
2024-08-16 11:27:24 -04:00
PCSX2 Bot
a1ca0a9a02 Qt: Update Base Translation 2024-08-15 19:14:14 +02:00
lightningterror
c076c50b68 GS/DX11: Fix feedback write 1 null pointer crash.
We were using the wrong texture as the source, should be dTex when copying.
2024-08-15 10:26:27 +02:00
lightningterror
c688db8f08 GS/HW: Rename blend second pass to blend multi pass.
Easier if I want to add more passes.
2024-08-14 12:35:52 +02:00
PCSX2 Bot
469053de9b Qt: Update Base Translation 2024-08-13 19:42:38 +02:00
squidbus
185b85f86a Config: Use directory containing bundle as AppRoot on macOS. 2024-08-12 22:50:49 -04:00
PCSX2 Bot
11096a520e PAD: Update to latest controller database. 2024-08-12 19:01:26 -04:00
Florin9doi
07fd035aa2 USB: Set actual_length value for Get HID descriptor 2024-08-12 19:01:08 -04:00
seta-san
6bedcd768f Qt: Update Trilinear Filtering Description 2024-08-12 19:00:28 -04:00
weirdbeardgame
0c949db506 CMake: Added PACKAGE_MODE option
Set paths, add check in SetResourcesDir
2024-08-12 11:33:02 -04:00
PCSX2 Bot
4c5253c0f5 Qt: Update Base Translation 2024-08-11 07:46:00 +02:00
Mrlinkwii
325133e54c GameDB: add missing serial 2024-08-11 00:50:33 +02:00
JordanTheToaster
4113ac574d GameDB: ATV Offroad Fury 2 Fixes
Adds bilinear upscale nearest to fix garbage textures.
2024-08-11 00:47:48 +02:00
JordanTheToaster
2d6c687913 GSTextureCache: Extend Bilinear Upscale to dirty depth 2024-08-11 00:47:48 +02:00
lightningterror
f9fbecc783 GS: Match data types in shaders to be the same when doing bitwise operations. 2024-08-11 00:35:42 +02:00
seta-san
c5ceba35b6 Qt: Update Texture Filtering Description
Qt: Update Texture Filtering Description
2024-08-10 18:25:44 -04:00
oltolm
c7a53703b1 iR5900: fix heap-buffer-overflow in recompileNextInstruction 2024-08-10 17:47:39 -04:00
JordanTheToaster
2151ffcb6a GameDB: Various fixes 2024-08-10 22:21:46 +02:00
TheLastRar
e25cb92041 Build: Copy resources when building for ARM64 with MSBuild 2024-08-10 14:12:28 -04:00
TheLastRar
c3ed4faec1 gitignore: Fix ignore of bin-arm64
Reverts 2d4313cc5b and provides a correct ignore entry
2024-08-10 14:12:28 -04:00
TheLastRar
01de02677f Build: Set Page/Cache line sizes on Windows ARM 2024-08-10 14:12:28 -04:00
TheLastRar
6c44e985b1 Core: Replace 'Mac' with 'system' in page size error message 2024-08-10 14:12:28 -04:00
JordanTheToaster
31026e420d 3rdparty/imgui: Update to v1.91.0 2024-08-10 14:07:22 -04:00
Mrlinkwii
f2523bdf9f GameDB : fix Test Drive Unlimited CRC for patch 2024-08-09 15:03:27 -04:00
JordanTheToaster
5c4d814b63 GameDB: Snow White and the 7 clever boys fixes 2024-08-09 12:17:46 +02:00
KamFretoZ
752f479483 CI/Appimage: Drop gcc13 workaround
Backport from aac7a9992c

since it has been fixed upstream for some time
2024-08-08 15:19:53 -04:00
KamFretoZ
3a53144bdb CI/Appimage: Use fuse3 compatible appimagetool
Backport from: https://github.com/stenzek/duckstation/pull/3251

Co-Authored-By: Samuel <36420837+samueru-sama@users.noreply.github.com>
2024-08-08 15:19:53 -04:00
lightningterror
b0940094f0 workflows: Update sdl controller db script.
Remove reviewers.
Add proper branch name.
Add branch deletion if there is no open pr(either closed or merged).
2024-08-07 17:50:05 +02:00
PCSX2 Bot
92904994ef Qt: Update Base Translation 2024-08-07 10:10:38 -04:00
Ty Lamontagne
112d02eaf5 Debugger: Track remaining buffer size for snprintf to prevent fortify fail 2024-08-06 17:03:11 -04:00
JordanTheToaster
deb8e5bf18 3rdparty/rcheevos: Bump to v11.5.0 2024-08-06 18:52:43 +02:00
KamFretoZ
fe3eab5815 Code: Formatting 2024-08-06 18:51:00 +02:00
KamFretoZ
72034da6ac OSD: Add InputRec/VideoCapture OSD Toggle 2024-08-06 18:51:00 +02:00
KamFretoZ
2106c353d9 OSD: Icon Tweaks 2024-08-06 18:51:00 +02:00
KamFretoZ
27b681bb4c OSD: More Translatable Strings 2024-08-06 18:51:00 +02:00
KamFretoZ
ad3e66f903 FSUI: Base Translation Update 2024-08-06 18:51:00 +02:00
lightningterror
3f7190e884 GS/TC: Adjust how we handle merging targets in PreloadTarget.
If the two targets are misaligned, it's likely a relocation, so we can just kill the old target.
Kill targets that are overlapping new targets, but ignore the copy if the old target is dirty  because we favour GS memory.
Also check for width offset and adjust width accordingly using the offset.
2024-08-06 18:50:25 +02:00
JordanTheToaster
e2fd09df88 GameDB: SMT Nocturne Fixes 2024-08-06 18:49:27 +02:00
JordanTheToaster
ebc3923b35 3rdparty/soundtouch: Bump to v2.3.3 2024-08-06 18:48:03 +02:00
Pyra Drake
30e7de7555 Add memcardFilter for SLES-51953 and SLES-52022
Enables use of the Football Fusion cross-play feature in FIFA 2004 and Total Club Manager 2004 with FolderMCs.
2024-08-06 18:47:28 +02:00
Florin9doi
15dfc0496e USB: Remove unused HID data 2024-08-05 18:24:37 +02:00
Florin9doi
3a55653c3e USB: Merge generic HID Keyboard and Konami Beatmania 2024-08-05 18:24:37 +02:00
JordanTheToaster
1df2fdff3e Deps: Update to SDL 2.30.6 2024-08-05 18:22:12 +02:00
JordanTheToaster
dd16ff5021 GS/Vulkan: Restore VK_EXT_attachment_feedback_loop_layout 2024-08-05 18:21:40 +02:00
PCSX2 Bot
2633bc4d59 PAD: Update to latest controller database. 2024-08-05 18:21:19 +02:00
PCSX2 Bot
e7a8c2b037 Qt: Update Base Translation 2024-08-05 16:36:35 +02:00
TheLastRar
e292c0986f Build: Add ENABLE_GSRUNNER option to build GSRunner via CMake 2024-08-04 20:15:46 -04:00
TheLastRar
2320330b6a GSRunner: Correct CMake typo 2024-08-04 20:15:46 -04:00
Florin9doi
8cd12852ce USB: Sony MSAC-US1/PictureParadise emulation 2024-08-02 11:57:02 -04:00
Florin9doi
51019dc456 USB: Add new SCSI commands used by Zip100 2024-08-02 11:57:02 -04:00
Florin9doi
5a35afadd7 USB: Convert the generic Mass Storage Device to Zip100 2024-08-02 11:57:02 -04:00
JordanTheToaster
63e516ebfe OSD: Add hardware info statistics 2024-08-01 16:23:17 -04:00
RedDevilus
7086060724 Qt: Add Override word to FMV Aspect Ratio
To all sources, like big picture (fullscreenui), translation files, and general Qt GUI
2024-08-01 16:14:41 -04:00
RedDevilus
93e4bd8215 Translations: Fix typo + frame-time
Can smooth our frame time fluctuations is technically grammatically correct but a wrong statement, it's smoothing out the frame-times
2024-08-01 16:14:41 -04:00
RedDevilus
85fc04598b Qt: FMV Aspect Ratio
In future would add the Virtual in front of the controller name, but we should change the struct so if you change to other type like Guitar, Pop n Music, or in future new pad devices to not say controllers.

Also added that FMV Aspect Ratio will inherent the value of the regular Aspect Ratio if you put the same value for Aspect Ratio and FMV Aspect ratio it would have the same effect if you left FMV Aspect Ratio on the 'Off (Default)'
2024-08-01 16:14:41 -04:00
Florin9doi
36d4f2602f Pad: Add Jogcon and Negcon images from @kamfretoz / MBee 2024-08-01 14:30:04 -04:00
Florin9doi
129be9dfe4 Pad: Jogcon and Negcon emulation 2024-08-01 14:30:04 -04:00
TheTechnician27
ed9b82097d Docs: Update FAQ 2024-08-01 12:05:28 -04:00
TheTechnician27
2fea312187 GameDB: Fix game names 2024-08-01 11:54:24 -04:00
TheTechnician27
c6b8df0588 OSD: Allow independent left- and right-align for OSD 2024-07-31 14:07:55 -04:00
Ty Lamontagne
40cd0d898f ci: temporarily override release version check
[ci skip]
2024-07-31 13:19:08 -04:00
KamFretoZ
d6e57f3867 Qt: Add new icon for gametrak and realplay 2024-07-31 12:42:58 -04:00
KamFretoZ
c3a5b13301 FSUI: Update Base Translation 2024-07-31 12:42:58 -04:00
KamFretoZ
1c7b1d7ff9 Translation: Make game type string translatable
Addresses `Game Properties -> Details -> Type -> Type names are untranslatable.`
2024-07-31 12:42:58 -04:00
KamFretoZ
a1ac86934e Translation: Make "Version" string translatable
Addresses `About Window -> The "Version: " string is untranslatable`
2024-07-31 12:42:58 -04:00
Ty Lamontagne
b0026ff59f ci: use fromJson to propely compare flatpack and pcsx2 release versions 2024-07-31 12:20:45 -04:00
Ty Lamontagne
a5a8a1a06b ci: Possibly fix flatpack release vs pcsx2 release version compare 2024-07-31 10:57:14 -04:00
GovanifY
132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
Ty Lamontagne
e045d4a0ff GameDB: Fix the Test Drive Unlimited COP2 patch 2024-07-30 15:35:21 -04:00
JordanTheToaster
a41be51385 GameDB: Various fixes 2024-07-30 12:40:43 -04:00
Ty Lamontagne
acb0829d81 USB: Implement trance vibrator and buzz savestate freezing 2024-07-30 11:26:45 -04:00
TheTechnician27
02e0d2acde Qt: Use serials by default for cover filenames with downloader 2024-07-29 18:46:43 -04:00
Colin Kinloch
6b6993cc24 CI: Move appdata generation into flatpak manifest
Also update ffmpeg to 23.08
2024-07-29 18:40:09 -04:00
PCSX2 Bot
3af50632d1 PAD: Update to latest controller database. 2024-07-29 22:42:19 +02:00
Ty Lamontagne
cd7cb18274 GameDB: Add another COP2 patch for Test Drive Unlimited 2024-07-29 15:44:51 -04:00
Ty Lamontagne
7a99ed3c8e GameDB: Add COP2 patch for Test Drive Unlimited 2024-07-29 11:08:33 -04:00
Tyler Wilding
7d0eaf9a05 translations: Syncing Crowdin translations (#11640) 2024-07-29 11:07:17 -04:00
Florin9doi
0b59b930a3 USB: Move Buzz device to dedicated files and create custom UI 2024-07-28 14:01:00 -04:00
PCSX2 Bot
5dc015c0a3 Qt: Update Base Translation 2024-07-27 20:24:35 -04:00
Florin9doi
edd39dfe08 USB: ASCII Trance Vib emulation 2024-07-27 14:25:29 -04:00
KamFretoZ
f5320e201e FSUI: Update Base Translation 2024-07-27 13:05:56 -04:00
KamFretoZ
37569d1526 DiscordRPC: More translatable strings. 2024-07-27 13:05:56 -04:00
KamFretoZ
1efeab4078 OSD: Move hardcore notification from toast to OSD 2024-07-27 13:05:56 -04:00
Florin9doi
2bff3579e5 USB: Gametrak/RealPlay emulation 2024-07-27 12:01:31 -04:00
TheTechnician27
2fa85c56c2 GameList: Make compat strings translatable 2024-07-26 19:30:02 -04:00
TheLastRar
ded55635c1 input-rec: Directly use recorded values for pressure sensitive buttons 2024-07-26 08:57:14 +02:00
PCSX2 Bot
c9b8874eb6 Qt: Update Base Translation 2024-07-25 20:17:06 -04:00
KamFretoZ
9172a1a6f8 Qt: Add prompt to missing ffmpeg warning 2024-07-25 09:26:58 -04:00
KamFretoZ
b2ac7afbcb Qt: Add Video Capture button to toolbar 2024-07-25 09:26:58 -04:00
TheTechnician27
dcfd663c19 Qt: Simplify compat line in GameSummaryWidget 2024-07-24 13:14:05 -04:00
TheLastRar
225f057a5c gitignore: Ignore bin* 2024-07-23 18:56:17 -04:00
TheLastRar
0017e33023 Deps: Remove hardcoded version for zstd 2024-07-23 18:56:17 -04:00
TheLastRar
76ced16f9e Deps: Update Windows ARM64 dependencies 2024-07-23 18:56:17 -04:00
TheLastRar
245937eb85 3rdparty/cpuinfo: Fix ARM64 project 2024-07-23 18:56:17 -04:00
TheTechnician27
3a72328d55 Qt: Add per-game link to PCSX2 Wiki pages on right-click 2024-07-23 18:51:44 -04:00
PCSX2 Bot
06bc0300c0 Qt: Update Base Translation 2024-07-22 22:17:10 +02:00
PCSX2 Bot
98dcf40967 PAD: Update to latest controller database. 2024-07-22 21:39:29 +02:00
Ty Lamontagne
6b61ffbb63 GS Capture: Allow selecting the pixel format based on the current codec 2024-07-22 10:56:30 -04:00
Ty Lamontagne
dd7eef723a GS Capture: Set ffmpeg channel layout 2024-07-22 10:56:30 -04:00
TellowKrinkle
328275cd45 GS:Capture: VAAPI support 2024-07-21 14:31:22 -04:00
PCSX2 Bot
a4f1431bcc Qt: Update Base Translation 2024-07-20 23:10:29 +02:00
lightningterror
473df8dad4 Debugger: Cleanup warnings and casts.
MemoryViewWidget.cpp
BreakpointModel.cpp
2024-07-20 23:09:51 +02:00
lightningterror
042959958e GS/HW: Use enum for blend_hw shader bit everywhere.
Leftover places I forgot to replace.
2024-07-20 15:20:07 +02:00
KamFretoZ
cd4de28b9e OSD: Add PCSX2 Version toggle 2024-07-19 12:46:35 -04:00
TheTechnician27
24a87c3fee Qt: Disable Single Frame GS Dump tool when not playing a game 2024-07-19 09:14:43 -04:00
GovanifY
17567b960f qt/MainWindow: for disable hide window if render to main is enabled
This fixes a crash on wayland (and possibly others)
2024-07-19 07:49:50 -04:00
JordanTheToaster
7a3d22ecdf GameDB: TC SOLA fixes 2024-07-18 19:55:28 -04:00
Ty Lamontagne
7e5016fdab linux/cmake: Allow libbacktrace to be disabled 2024-07-18 16:46:24 -04:00
PCSX2 Bot
47606400fa Qt: Update Base Translation 2024-07-18 19:11:09 +02:00
TheLastRar
d6076a6107 DEV9: Use const in ICMP session 2024-07-18 19:10:40 +02:00
TheLastRar
95c57462cc DEV9: FreeBSD/Mac Fixes for ICMP session 2024-07-18 19:10:40 +02:00
TheLastRar
48a1ec3531 DEV9: Use std::unique_ptr for tracking active pings 2024-07-18 19:10:40 +02:00
TheLastRar
9da3bccca2 DEV9: Use vector for ICMP temp buffer 2024-07-18 19:10:40 +02:00
TheLastRar
a1a92920b2 DEV9: Fix handling of ICMP timeout 2024-07-18 19:10:40 +02:00
TheLastRar
b6b775e44e DEV9: Fix IP_PayloadPtr::WriteBytes() 2024-07-18 19:10:40 +02:00
TheLastRar
5ea46ac076 DEV9: Use non-blocking sockets for ICMP Sessions on Unix 2024-07-18 19:10:40 +02:00
TheLastRar
ab008bf5d0 DEV9: Correct ICMP log messages 2024-07-18 19:10:40 +02:00
TheLastRar
54782cbf70 DEV9: Amend ICMP_Session comments 2024-07-18 19:10:40 +02:00
TheLastRar
3c7cff99f4 DEV9: Eliminate c-style casts from ICMP_Session 2024-07-18 19:10:40 +02:00
TheLastRar
f326e8775f DEV9: Correct spelling in ICMP session 2024-07-18 19:10:40 +02:00
AKuHAK
a2a711b1b3 Bios: add support for Rom2 up to 4Mb 2024-07-18 11:50:57 -04:00
PCSX2 Bot
dfb857b68f Qt: Update Base Translation 2024-07-17 22:20:21 +02:00
TheLastRar
ad64d88e7b Common: Fix FreeBSD build 2024-07-17 22:15:09 +02:00
TheTechnician27
cbd207d3f4 Qt: Add Emerald theme and fix palette var names 2024-07-17 21:56:46 +02:00
gooosedev
4bf8b23204 Debugger: change how the nullbyte (0x00) are displayed in the memoryview widget. 2024-07-17 21:55:04 +02:00
Ty Lamontagne
951780b43d Debugger: Implement little endian memory view support 2024-07-17 21:55:04 +02:00
TheTechnician27
84fe413635 GameDB: Ensure NativeScaling doesn't nag users at native res 2024-07-17 15:01:07 -04:00
Mrlinkwii
17aaa31362 github: mention to verify games if making an issue
[ci skip]
2024-07-17 14:58:37 -04:00
TheTechnician27
f943bdad98 Covers: Use serial for cover image names when selected individually 2024-07-17 14:58:04 -04:00
JordanTheToaster
09b2b6f949 GameDB: Fix up ATV ORF 3 fixes 2024-07-17 20:57:56 +02:00
L1Q
c46902c0f5 ReadMe: Fix BIOS dump link. (#11552) 2024-07-17 20:57:07 +02:00
PCSX2 Bot
c0dce9f64b PAD: Update to latest controller database. 2024-07-17 20:55:31 +02:00
Silent
cd3e11bff7 InputManager: Release settings lock before shutting down the input source 2024-07-13 07:29:26 -04:00
refractionpcsx2
2f46e5a840 UI: Fix updater to ignore installer version 2024-07-13 04:19:16 +01:00
refractionpcsx2
4e3d28f03f UI: Update glyphs 2024-07-13 01:20:19 +01:00
Tyler Wilding
27b4b42e29 translations: Syncing Crowdin translations (#11541) 2024-07-12 23:58:52 +01:00
JordanTheToaster
8d1533938c GameDB: Various fixes 2024-07-12 18:47:48 -04:00
TheTechnician27
6092918f20 Debugger: Fix Open Debugger option to not toggle 2024-07-12 23:25:30 +01:00
KamFretoZ
2e0039ee88 Qt: Update Base Translation 2024-07-11 17:19:43 +01:00
KamFretoZ
55a97293c1 Qt: Clarify Pressure Modifier String 2024-07-11 17:19:43 +01:00
PCSX2 Bot
9b0655b9d9 Qt: Update Base Translation 2024-07-11 11:23:41 -04:00
Ty Lamontagne
de020978e4 Debugger: Use std::string for bp conditions. Implement memory bp conditions 2024-07-11 11:21:39 -04:00
lightningterror
75defbeded GS/HW: Adjust point sampler behavior.
VK/GL/Metal: Get rid of it completely as it doesn't seem needed anymore.
DX: Only enable it with combination with GPU Palette Conversion enabled as that's when the issue occurs.

Test: See if Metal breaks with no point sampler.

2
2024-07-09 19:20:38 +02:00
Ty Lamontagne
294bb4d4f2 UI: Update Glyph Ranges 2024-07-09 18:44:56 +02:00
Ty Lamontagne
81c35d1c49 Qt: Update Base Translation 2024-07-09 18:44:56 +02:00
Mrlinkwii
d057b0fa79 UI: fix broken link in setup 2024-07-09 18:44:56 +02:00
PCSX2 Bot
c68222d9ac Qt: Update Base Translation 2024-07-09 16:00:55 +02:00
refractionpcsx2
d68f1aa73a GameDB: Add native scaling to Scaler 2024-07-09 15:21:57 +02:00
refractionpcsx2
e2a126722f GS/HW: Improve scale detection and allow non-bilinear downscales 2024-07-09 15:21:57 +02:00
lightningterror
fdcb0efe0a GS/HW: Make sure both bitwise values are unsigned for ps_convert_float32_float24 depth. 2024-07-09 15:19:45 +02:00
lightningterror
51fcd7b886 GS/HW: Check for full cover in more situations when we disable blending.
More hits on RTA Scaling/Descaling.
2024-07-09 15:19:45 +02:00
JordanTheToaster
7420956136 GameDB: Various fixes 2024-07-08 13:43:35 +02:00
lightningterror
a2aae7fb45 GS/Metal: Add FLOAT32_TO_FLOAT24 case to DepthStencil texture format for shader convert. 2024-07-08 11:52:24 +02:00
lightningterror
93abd2f2e5 GS: Fix Wsign-compare warning. 2024-07-08 11:52:24 +02:00
nishinji
c127d23d75 GameDB: Some fixes for NTSC-J titles. (#11508)
Enclose the strings by quotation marks.
Remove (some) symbols from name-sort that are not read aloud.
2024-07-08 01:22:59 +02:00
lightningterror
404824e69e GS: Fix half pixel offset normal upscaling above 8x. 2024-07-08 00:58:07 +02:00
Ty Lamontagne
06c9c60717 Debugger Expressions: Add FPU registers to breakpoint conditionals. 2024-07-08 00:57:08 +02:00
PCSX2 Bot
28f7860af0 Qt: Update Base Translation 2024-07-08 00:49:48 +02:00
TheTechnician27
05a7a5bdad Bring ControllerBindingWidget .cpp and .h files in line with others/.ui file 2024-07-07 16:22:00 +01:00
JordanTheToaster
9781d29768 GameDB: Various fixes 2024-07-07 17:19:39 +02:00
Ty Lamontagne
8543e87b19 GS: Clear draw queue when using the null renderer 2024-07-07 16:17:59 +01:00
JordanTheToaster
b2062c93d9 Deps: Update to SDL 2.30.5
*jazz hands*
2024-07-07 17:05:46 +02:00
TheLastRar
30b6641025 USB: Fix period key not working 2024-07-06 23:28:12 +02:00
Pyra Drake
a52f823500 GameDB: Add eeClampMode fix to SLPM-66644 (#11505)
Add eeClampMode fix to SLPM-66644 (J-League Pro Soccer Club o Tsukurou 5)
2024-07-05 23:27:43 +01:00
TheTechnician27
10a7fe07a2 UI: Add text to upscaling multipliers and remove two fractional 2024-07-05 21:09:28 +01:00
Dreadmoth
defb50aac2 GameDB: Destroy All Humans! 2 PAL Title
Title includes exclamation mark.
"Make War, Not Love!" is a tagline, not part of the title. Removed.
2024-07-03 13:01:21 +01:00
KamFretoZ
84e36463b4 Qt: Update Base Translation 2024-07-03 09:38:35 +01:00
KamFretoZ
48d88c5fea Qt: Make more precache strings translatable 2024-07-03 09:38:35 +01:00
Ty Lamontagne
dbfd506c8a Clang Format: cache.cpp and vtlb.cpp 2024-07-02 17:45:33 +01:00
Ty Lamontagne
d47cdfba2d EE Cache: Invalid physical address caching and line locking
Hopefully the final fix required for the find my own way demo to work.
2024-07-02 17:45:33 +01:00
Ty Lamontagne
a0b42f069f EE Cache: Fix PageMask reg usage when checking TLB entry cache mode 2024-07-02 17:45:33 +01:00
refractionpcsx2
c7e516b743 UI: Fix per game internal resolution dropdown 2024-07-02 15:50:49 +01:00
Stenzek
315d30fe4c GS: Uncap upscale multiplier subject to GPU limits 2024-07-02 21:51:33 +10:00
Stenzek
46e30467de Config: Don't copy global WS/NI to game settings 2024-07-02 15:28:03 +10:00
Stenzek
e7139ab801 Qt: Fix use-after-free in settings reopen() 2024-07-02 15:28:03 +10:00
lightningterror
3f952c88a4 DEV9: Fix function parameter should be passed by const reference warnings.
Codacy.
2024-07-01 15:41:39 +02:00
lightningterror
bed31d3903 GS/HW: Get rid of GetAFAIL duplicates. 2024-07-01 15:41:39 +02:00
Connor McLaughlin
5ff35927a7 GS: Remove unused enum 2024-06-30 23:03:28 +10:00
refractionpcsx2
f6ce7b9ede GS/HW: Fix downscales on target regions 2024-06-29 21:16:48 +01:00
refractionpcsx2
7ab494ca31 GS: Clean up usage of PrimitiveCoversWithoutGaps 2024-06-29 21:16:48 +01:00
refractionpcsx2
b5258a83c8 GS: Remove std::optional from gaps variable. 2024-06-29 15:04:24 +01:00
refractionpcsx2
2ce9dd4689 GS/HW: Improve texture coverage detection 2024-06-29 15:04:24 +01:00
refractionpcsx2
bb67ed3ded GS/HW: Optimize area of downscale algorithm to reduce processing 2024-06-29 15:04:24 +01:00
JordanTheToaster
a483aca361 Deps: Avoid -1 return in rc_runtime_progress_size() 2024-06-29 16:04:24 +10:00
JordanTheToaster
44038adaf8 Deps: Set RC_NO_THREADS
We protect the state ourselves, **and** Win32 mutexes are horribly slow.
2024-06-29 16:04:24 +10:00
Stenzek
d3bcfe0f5c GS/HW: Prefer already-RTA-target over SW blend for no-overlap
Saves barriers in Ace Combat and Metal Gear Solid games.
2024-06-29 11:14:34 +10:00
Stenzek
6600d09966 GS/HW: Prefer SW blend over HDR for colclip without overlap 2024-06-29 11:14:34 +10:00
Dreadmoth
3cfd4a7958 GameDB: Shadow of Rome revert to HPO Special
Revert Half Pixel Offset to Special (Texture) to avoid shadow glitches introduced by Align To Native
2024-06-28 20:11:40 +01:00
Stenzek
51917c4461 GS/DX11: Fix downsample uniform unpack
Fixes #11482.
2024-06-29 01:15:25 +10:00
refractionpcsx2
56f32ff332 GameDB: Add fixes to Harry Potter Quidditch World Cup 2024-06-28 04:15:12 +01:00
refractionpcsx2
a7047b605e GS/HW: Allow conversion from 32bit to 24bit depth 2024-06-28 04:15:12 +01:00
refractionpcsx2
faa54f6c14 GS/HW: Always update preloaded dirty areas 2024-06-27 23:41:17 +01:00
refractionpcsx2
b38d008a96 GS/HW: Ignore any preload outside of the valid area 2024-06-27 23:41:17 +01:00
Berylskid
cd300c21d9 GameDB: Revert an wrong game title 2024-06-27 11:13:23 +01:00
Stenzek
5b45913a6a GS/HW: Use box filtering for source downsampling 2024-06-27 10:49:46 +10:00
refractionpcsx2
1627bd6cc7 GS/HW: Fix upscale draw detection check 2024-06-26 16:02:40 +01:00
Stenzek
7f0ab1442e GS/HW: Clear instead of invalidating upscaled targets
This'll require a little more VRAM bandwidth, but it's better than
sampling random garbage because HPO pushes the coordinates down.
2024-06-26 21:22:36 +10:00
JordanTheToaster
71cb2daea8 GameDB: GOW 2 revert to HPO Special 2024-06-25 13:48:00 +01:00
Tyler Wilding
63619ef40f translations: Syncing Crowdin translations (#11462)
* New translations 
[ci skip]
2024-06-25 11:26:49 +01:00
TheLastRar
baec86e39b DEV9: Return sender IP alongside payload
Also return payload in a unique_ptr,
2024-06-25 11:05:19 +01:00
TheLastRar
fbac331528 DEV9: Use std::move in SimpleQueue 2024-06-25 11:05:19 +01:00
Ty Lamontagne
a00cb49035 COP0 TLB: Fix mapping ScratchpadRam Entries
Unsure why that was there. It would vtlbVMapBuffer if the mapping was for SPR (correct) but then continue and map on top of that as if it were a normal mapping.
2024-06-25 11:04:41 +01:00
JordanTheToaster
ba73a4cf3f GameDB: RE Outbreak disable FBMask patch 2024-06-25 11:03:00 +01:00
JordanTheToaster
f8ab3843f7 GameDB: Various fixes 2024-06-25 11:02:26 +01:00
Stenzek
107c117a4e VMManager: Don't use achievements when playing GS dumps 2024-06-25 19:12:23 +10:00
Stenzek
c44500ba0f Achievements: Fix async HC mode disable running on wrong thread 2024-06-25 19:12:23 +10:00
Stenzek
d53b2ae104 ImGuiManager: Avoid invalid scale update on surfaceless 2024-06-25 19:12:23 +10:00
Stenzek
f909282973 Achievements: Eliminate intermediate malloc on state save 2024-06-25 19:12:23 +10:00
Stenzek
46931072c7 3rdparty/rcheevos: Hash functions are not needed 2024-06-25 19:12:23 +10:00
Stenzek
9225fa9efd 3rdparty/rcheevos: Bump to d54cf8f 2024-06-25 19:12:23 +10:00
PCSX2 Bot
46f37f3b45 PAD: Update to latest controller database. 2024-06-25 04:03:08 +02:00
refractionpcsx2
8e891b0c5a GS/HW: Add missing blend optimization check 2024-06-24 19:12:22 +01:00
refractionpcsx2
fc4bdfd025 GS: Avoid pointlessly trying to map more pages in memory than the GS has 2024-06-24 18:15:29 +01:00
refractionpcsx2
7e53cb8e99 GS/HW: Optimize blends in some zero scenarios 2024-06-24 18:15:29 +01:00
Stenzek
3040474f99 Qt: Fix duplicate log window when theme switching 2024-06-24 13:17:53 +10:00
Stenzek
02ef8098c9 Qt: Work around theme swap bug with Classic Windows 2024-06-24 13:17:53 +10:00
Stenzek
4924d8c984 GS/Vulkan: Release swap chain images on acquire fail 2024-06-24 10:16:04 +10:00
Stenzek
57d225437e GS/HW: Ensure mipmaps aren't generated on hash cache textures 2024-06-24 10:15:48 +10:00
Stenzek
f6a7dc52e2 GS/HW: Better eliminate redundant clamps with mipmapped draws
TW/TH won't match when mipmap minimization eliminates the base level.
Use the TEX0 register from the context instead.
2024-06-24 10:15:48 +10:00
Stenzek
ec8d5d1b71 GS/HW: Allow use of trilinear with shader sampling 2024-06-24 10:15:48 +10:00
refractionpcsx2
f47b2d02cb GS/HW: Improve scale preservation check 2024-06-23 23:35:48 +01:00
Immersion95
32721f9f8f GameDB: Street Fighter EX3 - Fix the post processing at high resolution
When upscaled, the post processing is misaligned and there's a weird ghosting effect. The new "Natively downscale targets" hack solves it.
2024-06-23 18:06:50 +01:00
JordanTheToaster
27e2138d6c Deps: Update to Qt 6.7.2 2024-06-23 14:17:54 +10:00
JordanTheToaster
512ab67efc Deps: Update to SDL 2.30.4 2024-06-23 11:14:11 +10:00
refractionpcsx2
9d66c8b1a1 GS/HW: Correct rect checks in textureminmax
Was supposed to be in my PR but forgot to push it.
2024-06-23 02:10:43 +01:00
refractionpcsx2
a132a6f979 GS: Make sure min/max for texture is at least 1 pixel 2024-06-23 00:34:43 +01:00
refractionpcsx2
6fc631eaba GS/HW: Fix up Burnout CRC so NS properly detects downscale. 2024-06-23 00:07:23 +01:00
refractionpcsx2
915ed85f5d GS/HW: Reduce misdetections for downscaling 2024-06-23 00:07:23 +01:00
refractionpcsx2
2c9ddf3b38 GS/HW: Restrict maximum direct copy size 2024-06-23 00:07:23 +01:00
Sestain
1d4d75fda0 GameDB: Fix shadows alignment on Crash Twinsanity 2024-06-22 22:01:56 +01:00
refractionpcsx2
dda6e37bd0 GS/HW: When detecting target overlap, offset copy from base 2024-06-22 21:41:13 +01:00
refractionpcsx2
a4ffc6c457 GS/HW: Fix line width factor when upscaling. 2024-06-22 21:40:49 +01:00
dependabot[bot]
5e9b31d243 ci: bump ws dependency in announce workflow
Bumps [ws](https://github.com/websockets/ws) from 8.2.3 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.2.3...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 19:21:52 -04:00
PCSX2 Bot
97bb270a2b Qt: Update Base Translation 2024-06-18 20:39:45 +10:00
refractionpcsx2
2bbb167541 GameDB: Add round sprite half to Valkyrie Profile 2 2024-06-18 06:08:35 +01:00
refractionpcsx2
74ea27817d GS/HW: Keep real rect before draw to avoid bad valid rect update 2024-06-18 06:08:35 +01:00
refractionpcsx2
779b175567 GS/HW: Don't scale up downscaled targets when copying directly 2024-06-17 22:25:33 +01:00
refractionpcsx2
e252bcf425 GS/HW: Add new Opaque check + use components for scaling discard check 2024-06-17 22:25:33 +01:00
refractionpcsx2
bdc3585b60 GS/HW: Improve detection of upscaling and downscaling 2024-06-17 22:25:33 +01:00
refractionpcsx2
ce7ee345c7 GS/HW: Avoid downscaling as much as possible to increase quality 2024-06-17 22:25:33 +01:00
refractionpcsx2
2fc6357ac4 GS/HW: Correct some scaling behaviour 2024-06-17 22:25:33 +01:00
refractionpcsx2
1d46ec2059 UI: Add new UI upscaling fix for Native Scaling 2024-06-17 22:25:33 +01:00
refractionpcsx2
839a6daa63 GS: Split out sprite gap check for downscale gap checking 2024-06-17 22:25:33 +01:00
refractionpcsx2
ae57878b27 GS/HW: Add detection for upscales 2024-06-17 22:25:33 +01:00
refractionpcsx2
eb5f90027d GS/HW: Don't downscale if draw is the same or larger than final output 2024-06-17 22:25:33 +01:00
refractionpcsx2
c077d9e2e1 GS/HW: First pass having downscaled post processing 2024-06-17 22:25:33 +01:00
refractionpcsx2
55e0464cd3 GS/HW: Allow offset channel shuffles on sources. 2024-06-17 22:24:46 +01:00
PCSX2 Bot
e843e17403 PAD: Update to latest controller database. 2024-06-17 20:00:59 +02:00
KamFretoZ
6195c1a3ac Resources: Compress the PNGs 2024-06-17 16:09:31 +02:00
KamFretoZ
a507d55467 FSUI: Icon Tweaks 2024-06-17 16:09:31 +02:00
KamFretoZ
807050db0d FSUI: Add new Game List icon 2024-06-17 16:09:31 +02:00
void
d626028203 UI: fix invert settings being incorrectly set in big picture mode 2024-06-17 12:33:01 +10:00
lightningterror
f565da6c58 GameDB: Make sure hw renderer is running for hw renderer OSD messages. 2024-06-16 21:25:26 +02:00
lightningterror
8f72c4f4a6 VMManager: Make sure hw renderer is running for hw renderer OSD messages. 2024-06-16 21:25:26 +02:00
refractionpcsx2
9c45567d8d GS/HW: Additional texture shuffle dimension check 2024-06-16 11:52:19 +01:00
Stenzek
ab2874749e CI/AppImage: Explicitly remove libwayland-* 2024-06-16 16:05:25 +10:00
Stenzek
8766d0b676 VMManager: Refactor Affinity Control to Thread Pinning
Instead of having control over specific threads, thread pinning puts the
EE/VU/GS threads on the most performant cores, then the software threads
on the remaining cores, but only if they're in the same cluster.

This way we don't end up pinning across clusters with different
performance characteristics, which would harm instead of help software
renderer performance.

Also unpins on shutdown, that way we don't keep CPU cores awake.
2024-06-16 14:18:49 +10:00
refractionpcsx2
b1f051df40 GS/HW: Fix up Tekken 5 CRC to get rid of boxes when upscaling 2024-06-15 22:30:37 +01:00
Connor McLaughlin
707d61f54d CDVD: Remove leftover debug log
Didn't mean to commit this.
2024-06-16 00:06:55 +10:00
lightningterror
4e3431585f CDVD: Fix -Wsign-compare warnings. 2024-06-15 13:39:05 +02:00
Connor McLaughlin
6fcd5d0aff GzippedFileReader: Don't write OOB in last chunk
zlib_indexed can write the full span to the block, despite the length being shorter. This code can die in a fire.

Closes #11398.
2024-06-15 17:42:56 +10:00
refractionpcsx2
9c57ac34e3 GS/HW: Include block offsets on invalidation by page 2024-06-15 08:15:33 +01:00
refractionpcsx2
e6714db7b3 GS/HW: Don't kill old targets unless completely dirty or targets overlap 2024-06-15 08:15:33 +01:00
Connor McLaughlin
21df138833 MSBuild: RecStubs.cpp should be excluded 2024-06-15 15:18:38 +10:00
Stenzek
36f9715637 CDVD: Actually fix NVRAM open mode 2024-06-15 12:44:46 +10:00
refractionpcsx2
a0d32d493c CDVD: Correct NVM file saving to be in write mode 2024-06-14 21:32:23 +01:00
JordanTheToaster
f3776fa886 UI: Rename Wild Arms hack 2024-06-14 21:01:13 +01:00
refractionpcsx2
de7d934a05 UI: Increase draw dumping start/count limit 2024-06-14 20:51:58 +01:00
refractionpcsx2
8917c5dbc9 GS: Correct depth trace for sprites + optimize HW depth selection 2024-06-14 20:51:58 +01:00
TheLastRar
6aa57b7e87 DEV9: Handle adapters that provide FCS in capture 2024-06-14 21:41:21 +02:00
TheLastRar
6a37353565 DEV9: Always require MAC address with pcap
We should be able to get the MAC address on all supported platforms
2024-06-14 21:41:21 +02:00
TheLastRar
bf50bad287 DEV9: More strictly enforce MTU in pcap 2024-06-14 21:41:21 +02:00
lightningterror
7aea867a66 GS/HW: Use enum for blend_hw shader bit.
Better readability.
2024-06-14 21:40:31 +02:00
lightningterror
abec2738b9 GS/HW: Extend blend second pass to more blend formulas v2.
Cd*(1 + Alpha).
Alpha = As, Ad or Af.
For As or Af case when alpha > 128.
For Ad case when there is no RTA correction.
2024-06-14 21:40:31 +02:00
Stenzek
480bd2da4b DarwinMisc: Use template sysctlbyname 2024-06-14 20:45:44 +10:00
KamFretoZ
774f68936d Qt: Cleanup Internal label names 2024-06-14 17:28:51 +10:00
KamFretoZ
99a30733c1 Qt: Hide Video Recording Directory option per-game 2024-06-14 17:28:51 +10:00
KamFretoZ
62c5309b23 Qt: Hide texture directory option per-game 2024-06-14 17:28:51 +10:00
Stenzek
8a18403fea arm64: Add stubs for EE/VU/IOP recs 2024-06-14 17:06:45 +10:00
Stenzek
fe9399612d arm64: Add VIF dynarec 2024-06-14 17:06:45 +10:00
Stenzek
0a4c037898 GS: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek
71036c95a4 Core: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek
7d098674f2 IPU: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek
4e0e8cef54 Common: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek
6ee99d8b81 Build: Add ARM64 configurations 2024-06-14 17:06:45 +10:00
Stenzek
22d929d171 VTLB: Fix unmapping all pages with 16K host 2024-06-14 17:06:45 +10:00
Stenzek
122f1ec767 TextureDecompress: Re-add non-SSE code paths 2024-06-14 17:06:45 +10:00
Stenzek
04d7d1a1db 3rdparty/winpixeventruntime: Fix build with ARM64 clang-cl 2024-06-14 17:06:45 +10:00
Stenzek
3c69d5cf70 3rdparty/cubeb: Fix build for ARM64 2024-06-14 17:06:45 +10:00
Stenzek
e03e8b602c 3rdparty/cpuinfo: Fix build for ARM64 2024-06-14 17:06:45 +10:00
Stenzek
cc7b58eef0 3rdparty/lzma: Fix ARM64 build with clang-cl 2024-06-14 17:06:45 +10:00
Stenzek
a703076720 3rdparty/soundtouch: Enable NEON on ARM64 2024-06-14 17:06:45 +10:00
Stenzek
21897414ac CI: Add required files for Windows ARM64 build 2024-06-14 17:06:45 +10:00
Stenzek
1a286b0bec CI: Add script for building universal Mac dependencies 2024-06-14 17:06:45 +10:00
Stenzek
94fc34dd62 GS: Tidy up shifts in GSVector4i 2024-06-14 11:54:17 +10:00
Stenzek
4731c6d290 GS: Fix a couple of non-immediate constant shifts 2024-06-14 11:54:17 +10:00
Stenzek
153b492a79 GS: Remove unordered runion()
We're working with rectangles everywhere.
2024-06-14 11:54:17 +10:00
Stenzek
ccb23868e5 GSRunner: Enable the crash dump writer 2024-06-14 11:54:17 +10:00
Stenzek
affbcfe135 GS/SW: Zero out texture cache buffers
This _shouldn't_ be necessary, but apparently our texture min/max is wrong
somewhere, and we end up sampling from "random" malloc memory, which breaks
GS dump runs.
2024-06-14 11:54:17 +10:00
Ty Lamontagne
bdeb0fcb76 Debugger: Disable pseudo ops 2024-06-13 09:56:58 +01:00
Connor McLaughlin
08e824831b Achievements: Fix incorrect data source for mastery points 2024-06-12 14:44:54 +10:00
PCSX2 Bot
d2f101c7d7 Qt: Update Base Translation 2024-06-12 13:24:14 +10:00
JordanTheToaster
0717b1f7c0 FullscreenUI: Fix incorrect padding calculation in pause menu
Fixes scrollbars appearing in menu.
2024-06-12 11:37:17 +10:00
Stenzek
7ad27e6e9d CDVD: Add precaching option 2024-06-11 11:31:28 +10:00
Stenzek
e1596c7911 FileSystem: Add ReadFileWithProgress() 2024-06-11 11:31:28 +10:00
Stenzek
8a3513f2ba 3rdparty/libchdr: Allow cancelling precache 2024-06-11 11:31:28 +10:00
Stenzek
d43171454b CI: Disable repository submodule cloning
No longer needed.
2024-06-11 11:30:45 +10:00
Stenzek
e5917fa47a GS/Vulkan: Disable unused-function warning for vk_mem_alloc 2024-06-11 11:30:45 +10:00
Stenzek
5ee751326a 3rdparty/fmt: Work around RTTI being disabled 2024-06-11 11:30:45 +10:00
Stenzek
226a02a770 MemoryCardFolder: Fix rapidyaml deprecation warnings 2024-06-11 11:30:45 +10:00
Stenzek
8cc7e60138 3rdparty: Move WIL v1.0.240122.1 in-tree
Renamed to winwil, because otherwise you won't be able to easily git
pull these changes.
2024-06-11 11:30:45 +10:00
Stenzek
5c59288b39 3rdparty: Move rapidyaml v0.6.0 in-tree
Also c4core v0.2.0, fast-float v6.1.1.
2024-06-11 11:30:45 +10:00
Stenzek
d6c4a9a4d5 3rdparty: Move Vulkan-Headers v1.3.287 in-tree 2024-06-11 11:30:45 +10:00
Stenzek
08975bd9f1 3rdparty: Move googletest v1.14.0 in-tree 2024-06-11 11:30:45 +10:00
Stenzek
cf475d961a 3rdparty: Move fmt v10.2.1 in-tree 2024-06-11 11:30:45 +10:00
Stenzek
cb0f0b65cc DEV9: Add missing RedtapeWindows.h include 2024-06-11 11:30:45 +10:00
PCSX2 Bot
28734a65dc PAD: Update to latest controller database. 2024-06-10 18:14:24 +02:00
Stenzek
cc7313bf32 Qt: Use 64-bit comparison for VC runtime check
Backport 484c1dccd4
2024-06-10 16:48:35 +10:00
JordanTheToaster
b011e91abd 3rdparty: Update CPUInfo to latest
Allows building on FreeBSD.
2024-06-10 12:51:57 +10:00
Stenzek
e2a4d8f1e6 CDVD: Force initialized flag on NVRAM reads
Jak 1 crashes on boot if it's not set.
2024-06-10 12:51:18 +10:00
Stenzek
b55ec3ae58 CDVD: Tidy up NVRAM read helpers
Get rid of the janky offsetof.
2024-06-10 12:51:18 +10:00
Stenzek
6220148be7 CDVD: Cache mechacon version 2024-06-10 12:51:18 +10:00
Stenzek
919da4d97a CDVD: Read NVRAM on startup, cache, and save on shutdown 2024-06-10 12:51:18 +10:00
refractionpcsx2
ac38a350a0 Updater: Add VC Runtime check 2024-06-09 17:44:42 +01:00
Stenzek
4f5562ad3f GS: Swap to cpuinfo for checking CPU features 2024-06-09 22:18:59 +10:00
Stenzek
37df1adff6 Qt: Add very-early VC++ runtime version check
Backport of a2e6a48d2e
2024-06-09 21:47:32 +10:00
TheLastRar
7878dee32d input-rec: Display message when we fail to create/open file 2024-06-09 21:03:23 +10:00
TheLastRar
a95288946c input-rec: Use toNativeSeparators() when opening recording
In the recording viewer
2024-06-09 21:03:23 +10:00
TellowKrinkle
58ae9fd355 GS:MTL: Fix handling of tex is depth fb 2024-06-08 18:23:35 -05:00
refractionpcsx2
d34f359621 GS/HW: Correct TEXA behaviour on shuffles 2024-06-08 19:26:35 +01:00
icup321
986a9773e6 GameDB: Some NTSC-K fixes
Adds some missing patches for NTSC-K games that were overlooked.
2024-06-07 20:03:41 +01:00
JordanTheToaster
7d530228e3 3rdparty: Update xbyak to 7.06
Might fix a crash on older AMD CPUs apparently.
2024-06-07 16:09:10 +01:00
Stenzek
1ec4c248fb CI/Windows: Disable Qt's PCRE2 JIT
Backport of daed75de20
2024-06-07 16:14:34 +10:00
Connor McLaughlin
91fbf1b22e CI/Windows: Uninstall system LLVM package
Instead of upgrading it, we haven't tested clang-18 with PCSX2 yet.
2024-06-07 15:56:53 +10:00
refractionpcsx2
5e858fa1bc GS/HW: Take render target end block for channel shuffles if bigger 2024-06-06 22:59:12 +01:00
refractionpcsx2
f771b0f29c CI: Tempfix windows clang builds 2024-06-06 21:31:13 +01:00
refractionpcsx2
3c15f6e42f GameDB: Add Texture inside RT to Mobile Suit Gundam - One Year War 2024-06-04 22:07:06 +01:00
refractionpcsx2
0522da2299 GS: Don't be inclusive of textures edges in all cases 2024-06-04 22:07:06 +01:00
TheLastRar
877c3ee90d input-rec: Use toNativeSeparators() when opening recording 2024-06-04 11:19:41 +10:00
PCSX2 Bot
9e1acc5744 PAD: Update to latest controller database. 2024-06-03 20:03:55 +02:00
Blackbird88
bc9edb5387 GameDB: Tokyo Xtreme Racer Drift/Kaido Racer - Upscaling fixes 2024-06-02 19:50:42 +01:00
TellowKrinkle
8625e30dc6 GS:MTL: Add Intel HD 4000 to the list of GPUs to use PixelFormatView on
No clue why, but apparently this helps them a lot, at least on OCLP Big Sur
2024-06-01 19:08:45 -05:00
JordanTheToaster
af8fdae75e GameDB: Various bodges 2024-06-01 20:04:11 +01:00
refractionpcsx2
7de06e340b GS/HW: Improve some tex in rt handling 2024-06-01 20:03:50 +01:00
refractionpcsx2
4c8e42d801 GS/HW: Improve handling of channel shuffles on new targets 2024-06-01 02:32:02 +01:00
refractionpcsx2
834f12dd55 GS/HW: Update the target width to match source in channel shuffle
Also kill an annoying assert
2024-06-01 02:32:02 +01:00
refractionpcsx2
6d67156707 GS/HW: Favour newer draw on source overlap + improve target overwrite 2024-06-01 02:32:02 +01:00
refractionpcsx2
4faa5f2095 GS/HW: Compensate for edges in complex clamps to reduce upscale garbage 2024-06-01 02:31:20 +01:00
Connor McLaughlin
69c2c53ca7 CI/AppImage: QtNetwork is no longer needed 2024-05-31 13:39:51 +10:00
Stenzek
d48f527d6d Common: Tidy up signal handlers
Move MacOS into its own file.
Fix assertion failure crash dumping.
2024-05-31 13:39:36 +10:00
TheLastRar
f2e4a5e780 GS: Remove MSVC macro hack 2024-05-30 19:01:23 +01:00
PCSX2 Bot
c44659d3ab Qt: Update Base Translation 2024-05-30 11:28:02 +01:00
TheLastRar
ee9866b568 DEV9: Prefer C++ string comparison in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
f58ee161c7 DEV9: Use const in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
0856f3b223 DEV9: Shuffle code in Linux GetAdapter
Giving same flow as Windows code
2024-05-30 11:25:02 +01:00
TheLastRar
3acf898680 DEV9: Use helper method to get the sockaddr address family
This attempts to avoid undefined behaviour with our current assumptions about the socket api
2024-05-30 11:25:02 +01:00
TheLastRar
38f02de318 DEV9: Eliminate c-style casts in AdapterUtils 2024-05-30 11:25:02 +01:00
TheLastRar
a6ddbdb879 DEV9: Use correct buffer type in Win32 GetAdapter
Returned data is not sequenced IP_ADAPTER_ADDRESSES entries
We will use implicit object creation avoid UB
2024-05-30 11:25:02 +01:00
TheLastRar
3aff833b5c DEV9: Unify GetAdapter code 2024-05-30 11:25:02 +01:00
TheLastRar
344cf6fffb DEV9: Add general notes regarding sockaddr casting 2024-05-30 11:25:02 +01:00
refractionpcsx2
8f1b804f98 GS/CRC: Improve Street Fighter 3 EX CRC to remove shimmer
(and some potential input lag)
2024-05-30 11:20:38 +01:00
JordanTheToaster
226cf2d21d 3rdparty: Update to VK memory allocator 3.1 2024-05-30 20:19:29 +10:00
Stenzek
ecbe239c0b Common: Use Mach VM routines for memory mapping
MacOS does not support an equivalent of MAP_FIXED_NOREPLACE via mmap(),
which means that our usage for allocating PCSX2's memory map is not
thread-safe.
2024-05-30 13:39:07 +10:00
Stenzek
18665b81c4 3rdparty/vixl: Import @ 8eca2b7 2024-05-30 13:38:51 +10:00
TellowKrinkle
525a7c48e9 GS:MTL: Fix inverted UseMipmapFiltering check 2024-05-29 19:13:47 -05:00
TellowKrinkle
521038984a CMake:macOS: Sign with --deep
Fixes complaints about MoltenVK not getting signed
2024-05-29 19:28:34 +10:00
Stenzek
94bd7c96b9 GS/HW: Use valid rect over size in CopyRGBFromDepthToColor()
Avoids a copy.
2024-05-28 12:44:27 +10:00
Stenzek
e863da9490 GS/HW: Fix unscaled rect in CopyRGBFromDepthToColor()
Fixes fade transitions when upscaling in GT3.
2024-05-28 12:44:27 +10:00
Stenzek
c94282ce5f GS/Vulkan: Purge threaded presentation 2024-05-27 21:10:59 +10:00
Stenzek
d94f1dd9a3 GS: Add option to disable mailbox presentation
For those who like terrible frame pacing.
2024-05-27 21:10:59 +10:00
Stenzek
5dc1167fa8 GS/DX11: Don't spin on CPU when GPU results aren't available
Backport of 547587af11
2024-05-27 21:10:59 +10:00
Stenzek
9187e7eb34 InputManager: Fix exit menu button forwarding to game
Backport of a7f2ad37de
2024-05-27 00:18:53 +10:00
refractionpcsx2
2d127039e1 UI: Fix dithering description + make it so 4 lines of description fits 2024-05-25 15:16:42 +01:00
Stenzek
3928014e5c GS/Vulkan: Work around validation layer semaphore error 2024-05-25 14:06:50 +10:00
Stenzek
c7a21a60cf GS: Improve vsync mode selection
All games use mailbox/triple buffering. Except when you enable sync to
host refresh, in which case FIFO/double buffering is used.

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

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

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

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

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

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

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

Some changes based on tests from PS2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Update mirror-screenshots-url

* Shush git complaining about "dubious" ownership

* Update date format to iso8601

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  #define DEFAULT_UPDATER_CHANNEL "stable"

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

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

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

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

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

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

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

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

* Bump actions/download-artifact from 3 to 4

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

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

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

* github: group github actions updates going forward

* ci: update to labeler@v5

* ci: properly differentiate between windows build artifacts on PRs

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

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

---------

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

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

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

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

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

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

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

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

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

* Misc: Cleanup regex string & add explicit imports

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

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

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

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

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

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

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

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

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

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

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

* Debugger: Code cleanup + feedback changes

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

GSTextureCAche:
Fixes Wunused-lambda-capture warning.

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

* format and fixed typo

* fix typo in extension (duplicated .cso)

* format

* proper casting

* use regular casting; added lz4 to gitmodules

* use C++ style casting

* fix casts

* add lz4 submodule

* added windows build configuration

* add lz4 to cmake

* undo

* undo

* add lz4 to SearchForStuff

* undo

* add own lz4 source code

* cleanup

* fix

* add nwe sources to windows build

* cleanup

* don't use precompile headers on lz4

* stupid compiler

* add const. better logging.

* cast to std::string

* 3rdparty: Add lz4

* use 3rdparty lz4

* cleanup references to lz4.cpp

* format code

* add missing header

* use fmt::format

* don't call inflateReset on ZSO

* use LZ4_decompress_safe

* fix syntax

* fix call to LZ4_decompress_safe

* use LZ4_decompress_safe_partial to ignore padded data

* cleanup

* refactor

---------

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

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

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

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

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

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

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

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

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

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

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

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

* MemoryCardFolder: move timegm macro to source file

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Minimum for building is 6.5.3, because there's no 6.6 flatpak runtime yet.
2023-10-14 12:26:44 +10:00
JordanTheToaster
ac0138a7e1 GameDB: Taito memory fixes
Fixes for vertical and horizontal lines in game.
2023-10-14 02:42:10 +01:00
Ty Lamontagne
6e5fbe8991 Debugger: Fix an issue where the debugger is always on top of the main window
Add an optional "always on top" toolbar button as well
2023-10-13 13:53:12 +01:00
JordanTheToaster
56ec842c00 GameDB: Black Hawk Down fixes
Fixes for misaligned bloom and likely depth issues.
2023-10-12 14:03:44 +01:00
PCSX2 Bot
c3420a0a6e Qt: Update Base Translation 2023-10-12 13:07:35 +10:00
Ty Lamontagne
8d13877002 Debugger: Demangle symbols in the disassembly view as well 2023-10-12 12:46:12 +10:00
Ty Lamontagne
065f7d6cc7 Debugger: Don't elide func names as much when func start is selected 2023-10-12 12:46:12 +10:00
Ty Lamontagne
03a7c745c9 Debugger: Implement function/instruction nop restore 2023-10-12 12:46:12 +10:00
Ty Lamontagne
4269f16bcd Debugger: Implement stubbing (noping) functions 2023-10-12 12:46:12 +10:00
Ty Lamontagne
55c9cb45ac Debugger: Fix the popup position of context menus for lists
Use viewport(), otherwise it does not account for the table view header for some reason.
2023-10-12 12:46:12 +10:00
Ty Lamontagne
4f825641ce Debugger: Copy as CSV. Breakpoint import from CSV 2023-10-12 12:46:12 +10:00
Ty Lamontagne
ade2b4baea Debugger Thread List: Sorting 2023-10-12 12:46:12 +10:00
Ty Lamontagne
1e1091b365 Updater: Fetch best asset size for download size notification 2023-10-12 12:45:48 +10:00
RedPanda4552
93e1a7047c DInput: Add option to ignore inversion flag 2023-10-12 12:45:05 +10:00
Stenzek
99554f5622 GS/HW: Allow bilinear from colour backed Z formats
Fixes the haze effect in GTA: San Andreas from being extra blurry.
Improves shadows in Everybody's Golf and Tennis.
2023-10-12 11:56:57 +10:00
Stenzek
b09240702e GS/HW: Fix off-by-one in region clamp
Fixes text in ZIPANG, decals in Enthusia Professional Racing, edge of
screen in Dynasty Warriors, and others.
2023-10-12 11:56:57 +10:00
Stenzek
fbf7f91e4f GameDB: Add Tex in RT to Tokimeki Memorial 3 2023-10-12 11:56:57 +10:00
Stenzek
9a0d655788 GS/HW: Toss targets when BW changes instead of incorrectly converting
But be careful with it, we don't want to falsely do this for shuffles.
2023-10-12 11:56:57 +10:00
refractionpcsx2
aa77d156a9 CDVD: Fix seek times, improve read flow 2023-10-11 16:06:56 +01:00
lightningterror
493e95d9d6 CDVD: Fix Wunused-variable warnings. 2023-10-11 19:49:05 +10:00
Stenzek
4aaf6ba69e Common: Fix unused function warning 2023-10-11 19:15:58 +10:00
refractionpcsx2
88f8ef0244 Build: Fix up various warnings, increase variable readability 2023-10-10 20:39:54 +01:00
Stenzek
312a583092 CMake: Remove -segprot flag on MacOS
We no longer need to change page protection.
2023-10-10 18:01:30 +10:00
Stenzek
c8e0390aaf MSBuild: Fix libpng warning 2023-10-10 18:01:30 +10:00
Stenzek
8e2af39c06 x86/R5900: EE rec doesn't need a stack frame 2023-10-10 18:01:30 +10:00
Stenzek
606cbb3883 System: Simplify memory allocation 2023-10-10 18:01:30 +10:00
Stenzek
377746f155 x86: Move dispatchers to recompiler code space 2023-10-10 18:01:30 +10:00
refractionpcsx2
5f11ba0445 CDVD: Better simulate RPM changes going in to CLV
- Fix bugs with rotational latency
[SAVEVERSION+]
2023-10-10 08:17:19 +01:00
JordanTheToaster
be7d4c3c93 GameDB: Misc fixes
Re adds partial texture preloading to Battlefield Modern Combat 2 as it still seems to make the hash cache explode CPU Sprite to Dark Cloud 2 to fix lines in geometry and disabling MVU Flag Hack for tales of rebirth to fix graphical corruption
2023-10-09 13:21:28 +01:00
tokuna2020
ec53e8949a GameDB: Update memcard filters and names (#10076) 2023-10-07 12:05:54 +01:00
tokuna2020
f04cc7aa08 GameDB: Update memcard filters on some Japanese games (#10077) 2023-10-07 12:05:09 +01:00
Ty Lamontagne
b994d0ad70 Debugger: Run the tables keybind handler before the widgets
This fixes the issue of 'G' executing the go-to box instead of putting it into the text view
2023-10-07 14:12:18 +10:00
kamfretoz
68b2fee9be Qt: Update base translation 2023-10-07 14:11:30 +10:00
kamfretoz
82b9c9781c Qt: Small tweaks to Cobalt Sky theme 2023-10-07 14:11:30 +10:00
kamfretoz
6d15eac2c6 Qt/WinUpdater: Remove "Update Complete" dialog 2023-10-07 14:11:30 +10:00
kamfretoz
faa740a8dd Qt/Updater: Add download size estimation to the Updater
Co-Authored-By: Mrlinkwii <Mrlinkwii@users.noreply.github.com>
2023-10-07 14:11:30 +10:00
JordanTheToaster
872faf2abe GameDB: MVP NCAA Baseball fixes
Fixes for broken rendering on replay window and likely other things.
2023-10-05 00:49:23 +01:00
PCSX2 Bot
bc85d6518b Qt: Update Base Translation 2023-10-04 07:02:32 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou
15e7a94640 Readme: Fix Codacy Badge link 2023-10-03 22:13:01 +01:00
PCSX2 Bot
810295aafa PAD: Update to latest controller database. 2023-10-03 19:35:37 +02:00
PCSX2 Bot
ffd45d58fe Qt: Update Base Translation 2023-10-03 14:45:31 +10:00
2736 changed files with 1176064 additions and 503234 deletions

View File

@@ -1,54 +0,0 @@
# So you want to contribute to PCSX2? Great
As a first step, please review these links as they'll help you understand how the development of PCSX2 works.
* [Just Starting Out](#just-starting-out)
* [Issue Reporting](#issue-reporting)
* [Pull Request Guidelines](#pull-request-guidelines)
* [General Documentation And Coding Strategies](#general-documentation-and-coding-strategies)
* [Tasks](#tasks)
## Just Starting Out
* 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
* [How to write a useful issue](https://github.com/PCSX2/pcsx2/wiki/How-to-create-useful-and-valid-issues)
## Pull Request Guidelines
The following is a list of *general* style recommendations that will make reviewing and merging easier:
* Commit Messages
* Please try to prefix your commit message, indicating what area of the project was modified.
* For example `gs: message...`.
* Looking at the project's commit history will help with keeping prefixes consistent overtime, *there is no strictly enforced list*.
* Try to keep messages brief and informative
* Remove unnecessary commits and squash commits together when appropriate.
* If you are not familiar with rebasing with git, check out the following resources:
* CLI - https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history
* GUI (SourceTree) - https://www.atlassian.com/blog/sourcetree/interactive-rebase-sourcetree
* Code Styling and Formatting
* [Consult the style guide](https://github.com/tadanokojin/pcsx2/blob/coding-guide/pcsx2/Docs/Coding_Guidelines.md)
* Run `clang-format` using the configuration file in the root of the repository
* Visual Studio Setup - https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/
* IMPORTANT - if you are running `clang-format` on unrelated changes (ie. formatting an entire file), please do so in a separate commit.
* If you cannot scope your `clang-format` to just your changes and do not want to format unrelated code. Try your best to stick with the existing formatting already established in the file in question.
## General Documentation And Coding Strategies
* [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
* [Issues](https://github.com/PCSX2/pcsx2/issues)

View File

@@ -18,6 +18,8 @@ body:
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 [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
@@ -27,6 +29,9 @@ body:
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
- We do **not** accept issues pertaining to Linux builds other than the official AppImage and Flatpak.
- Please contact your packager for support. We have no control over other builds, nor can we investigate any issues, and historically they have been known to be broken.
- This includes pre-configured "distributions" such as EmuDeck, the "AUR", etc.
- type: textarea
id: desc
@@ -65,11 +70,10 @@ body:
- Windows 11
- Windows 10 (64bit)
- Linux (64bit) - Specify distro below
- macOS 14 (Sonoma)
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input

View File

@@ -18,6 +18,10 @@ body:
Please make an effort to make sure your issue isn't already reported.
Please make sure your game is verified using the built-in game verifier.
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 [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
@@ -27,6 +31,9 @@ body:
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
- We do **not** accept issues pertaining to Linux builds other than the official AppImage and Flatpak.
- Please contact your packager for support. We have no control over other builds, nor can we investigate any issues, and historically they have been known to be broken.
- This includes pre-configured "distributions" such as EmuDeck, the "AUR", etc.
- type: textarea
id: desc
@@ -59,9 +66,9 @@ body:
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).
Please read our troubleshooting pages and our issue reporting guide.
- [Troubleshooting page](https://pcsx2.net/docs/category/troubleshooting).
- [Issue reporting guide](https://pcsx2.net/docs/troubleshooting/identify).
We are **not** accepting issues related to the **libretro** core. The libretro core is being maintained separately at this time
- type: input
@@ -80,11 +87,10 @@ body:
- Windows 11
- Windows 10 (64bit)
- Linux (64bit) - Specify distro below
- macOS 14 (Sonoma)
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input
@@ -122,9 +128,9 @@ body:
description: |
Any non-default core settings. If you don't want to list them out, please provide screenshots of your configuration window.
Please note that the safe preset works for most games. MTVU can have some compatibility issues so please disable it before making a report.
Please note that defaults tend to work best.
If you need to modify the settings manually because a game requires you to do so to work, please state that explicitly.
If you need to modify the settings manually to fix an issue , please state that explicitly.
validations:
required: false
- type: textarea

View File

@@ -2,10 +2,19 @@
name: Feature request
description: Suggest a new feature or improve an existing one
title: "[Feature Request]: "
labels: ["Enhancement / Feature Request"]
labels: ["Enhancement / Feature Request", "FR: Awaiting Consideration"]
# assignees:
# - octocat
body:
- type: markdown
attributes:
value: |
## Important: Read First
Please make an effort to make sure your issue isn't already reported.
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
- type: textarea
id: desc
attributes:

View File

@@ -6,3 +6,6 @@
### Suggested Testing Steps
<!-- If applicable, including examples you've already tested with / recommendations for how to test further is very helpful! -->
### Did you use AI to help find, test, or implement this issue or feature?
<!-- Answer yes or no. If you answer yes, please provide a brief explanation how. -->

View File

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

234
.github/labeler.yml vendored
View File

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

View File

@@ -10,6 +10,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
name: "Check if release is needed"
runs-on: ubuntu-latest
timeout-minutes: 180
outputs:
PCSX2_RELEASE: ${{ steps.getinfo.outputs.PCSX2_RELEASE }}
FLATHUB_RELEASE: ${{ steps.getinfo.outputs.FLATHUB_RELEASE }}
@@ -23,20 +24,27 @@ jobs:
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}'"
PCSX2_RELEASE=$(echo $PCSX2_RELEASE | sed 's/[^0-9]*//g')
FLATHUB_RELEASE=$(echo $FLATHUB_RELEASE | sed 's/[^0-9]*//g')
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
# outputs are automatically compared as strings. This doesn't work in our favour
# Use fromJson() to convert them to proper integers...
# see: https://github.com/github/docs/pull/25870
# and: https://github.com/orgs/community/discussions/57480
#if: fromJson(needs.check.outputs.FLATHUB_RELEASE) < fromJson(needs.check.outputs.PCSX2_RELEASE)
name: "Build and publish Flatpak"
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Qt"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
publish: true
branch: stable
fetchTags: true
stableBuild: false
secrets: inherit

View File

@@ -17,10 +17,10 @@ jobs:
run: ./.github/workflows/scripts/common/update_base_translation.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79
with:
title: "Qt: Update Base Translation"
commit-message: "Qt: Update Base Translation"
commit-message: "[ci skip] 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."

View File

@@ -19,11 +19,12 @@ jobs:
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79
with:
title: "PAD: Update to latest controller database"
commit-message: "PAD: Update to latest controller database."
commit-message: "[ci skip] PAD: Update to latest controller database."
committer: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
author: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
body: "Weekly automatic update of SDL Controller DB"
reviewers: lightningterror
body: "Weekly automatic update of SDL Controller DB."
branch: update-controller-db
delete-branch: true

View File

@@ -20,12 +20,24 @@ jobs:
- name: Checkout Repository
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

@@ -6,6 +6,9 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
@@ -20,10 +23,6 @@ on:
cmakeflags:
required: true
type: string
branch:
required: false
type: string
default: "stable"
publish:
required: false
type: boolean
@@ -36,18 +35,30 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.7
options: --privileged
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
# Work around container ownership issue
- name: Set Safe Directory
shell: bash
run: git config --global --add safe.directory "*"
# Hackity hack. When running the workflow on a schedule, we don't have the tag,
# it doesn't fetch tags, therefore we don't get a version. So grab them manually.
@@ -56,66 +67,97 @@ jobs:
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
BUILD_SYSTEM: flatpak
ARCH: ${{ inputs.platform }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
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"
wget "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate AppStream XML
- name: Validate manifest
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
flatpak-builder-lint manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.2
- name: Build Flatpak (beta)
if: ${{ inputs.stableBuild == false || inputs.stableBuild == 'false' }}
uses: flatpak/flatpak-github-actions/flatpak-builder@10a3c29f0162516f0f68006be14c92f34bd4fa6c
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
upload-artifact: false
manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
arch: x86_64
build-bundle: true
verbose: true
mirror-screenshots-url: https://dl.flathub.org/repo/screenshots
branch: ${{ inputs.branch }}
mirror-screenshots-url: https://dl.flathub.org/media
branch: beta
cache: true
restore-cache: true
cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json', '.github/workflows/scripts/common/*.patch') }}
- name: Build Flatpak (stable)
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
uses: flatpak/flatpak-github-actions/flatpak-builder@10a3c29f0162516f0f68006be14c92f34bd4fa6c
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
upload-artifact: false
manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
arch: x86_64
build-bundle: true
verbose: true
mirror-screenshots-url: https://dl.flathub.org/media
branch: stable
cache: true
restore-cache: true
cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json') }}
#- name: Validate build
# run: |
# flatpak-builder-lint repo repo
- name: Commit screenshots to OSTree
run: |
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
- name: Push to Flathub beta
if: inputs.publish == true && inputs.branch == 'beta'
uses: flatpak/flatpak-github-actions/flat-manager@v6.2
- name: Push to Flathub (beta)
if: ${{ inputs.publish == true && (inputs.stableBuild == false || inputs.stableBuild == 'false') }}
uses: flatpak/flatpak-github-actions/flat-manager@10a3c29f0162516f0f68006be14c92f34bd4fa6c
with:
flat-manager-url: https://hub.flathub.org/
repository: beta
token: ${{ secrets.FLATHUB_BETA_TOKEN }}
build-log-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Push to Flathub stable
if: inputs.publish == true && inputs.branch == 'stable'
uses: flatpak/flatpak-github-actions/flat-manager@v6.2
- name: Push to Flathub (stable)
if: ${{ inputs.publish == true && (inputs.stableBuild == true || inputs.stableBuild == 'true') }}
uses: flatpak/flatpak-github-actions/flat-manager@10a3c29f0162516f0f68006be14c92f34bd4fa6c
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
token: ${{ secrets.FLATHUB_TOKEN }}
build-log-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# NOTE - this is done after on purpose so the flatpak file is wherever it needs to be for the previous pushes
- name: Prepare artifacts folder
# NOTE - 'flatpak-builder' dumps the artifact out into the current directory
run: |
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "./${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak" "$GITHUB_WORKSPACE"/ci-artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -15,6 +15,7 @@ jobs:
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "AppImage Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage"
compiler: clang
cmakeflags: ""
buildAppImage: true
@@ -25,6 +26,7 @@ jobs:
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Flatpak Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
publish: false

View File

@@ -6,6 +6,9 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
@@ -36,37 +39,47 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
timeout-minutes: 90
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
CCACHE_MAXSIZE: 500M
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
ARCH: ${{ inputs.platform }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -79,27 +92,36 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache
- name: Install Packages
env:
COMPILER: ${{ inputs.compiler }}
run: .github/workflows/scripts/linux/install-packages-qt.sh
run: |
tools/retry.sh wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo tools/retry.sh apt-add-repository -n 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo tools/retry.sh apt-get update
sudo tools/retry.sh apt-get -y install \
build-essential ccache clang-17 cmake curl extra-cmake-modules git libasound2-dev libaio-dev libavcodec-dev libavformat-dev libavutil-dev \
libcurl4-openssl-dev libdbus-1-dev libdecor-0-dev libegl-dev libevdev-dev libfontconfig-dev libfreetype-dev libfuse2 libgtk-3-dev libgudev-1.0-dev \
libharfbuzz-dev libinput-dev libopengl-dev libpcap-dev libpipewire-0.3-dev libpulse-dev libssl-dev libswresample-dev libswscale-dev libudev-dev \
libwayland-dev libx11-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-icccm4-dev \
libxcb-image0-dev libxcb-keysyms1-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev \
libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev libxcb-xinput-dev libxcb-xkb-dev libxext-dev libxkbcommon-x11-dev libxrandr-dev \
lld-17 llvm-17 ninja-build patchelf pkg-config zlib1g-dev
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} 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', '.github/workflows/scripts/common/*.patch') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .github/workflows/scripts/linux/build-dependencies-qt.sh
run: .github/workflows/scripts/linux/build-dependencies-qt.sh "$HOME/deps"
- name: Download patches
run: |
@@ -108,16 +130,33 @@ jobs:
- name: Generate CMake
env:
COMPILER: ${{ inputs.compiler }}
ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
CLANG_PATH: /usr/bin/clang-16
CLANGXX_PATH: /usr/bin/clang++-16
run: |
DEPS_PREFIX="$HOME/deps" .github/workflows/scripts/linux/generate-cmake-qt.sh
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_C_COMPILER=clang-17 \
-DCMAKE_CXX_COMPILER=clang++-17 \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_SETCAP=OFF \
-DDISABLE_ADVANCE_SIMD=TRUE \
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
$ADDITIONAL_CMAKE_ARGS
- name: Build PCSX2
working-directory: build
run: ../.github/workflows/scripts/linux/compile.sh
run: |
# Prepare the Cache
ccache -p
ccache -z
# Build
ninja
# Save the Cache
ccache -s
- name: Run Tests
working-directory: ./build
@@ -134,7 +173,7 @@ jobs:
- name: Upload artifact
if: inputs.buildAppImage == true
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -6,10 +6,13 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
default: macos-13
default: macos-14
patchesUrl:
required: false
type: string
@@ -18,40 +21,55 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
sign_and_notarize:
required: false
type: boolean
default: false
jobs:
build_macos:
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: 90
timeout-minutes: 120
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
CCACHE_MAXSIZE: 500M
# Only way to use a secret in an if statement
SIGN_KEY: ${{ secrets.APPLE_SIGN_P12_B64 }}
steps:
- name: Checkout Repository
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: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Use Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: macos
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -60,28 +78,25 @@ jobs:
- name: Install Packages
env:
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 nasm; then
if ! brew install ccache nasm; then
brew update
brew install molten-vk ccache nasm
brew install ccache nasm
fi
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/deps
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh', '.github/workflows/scripts/common/*.patch') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .github/workflows/scripts/macos/build-dependencies.sh
run: |
.github/workflows/scripts/macos/build-dependencies.sh "$HOME/deps"
- name: Download patches
run: |
@@ -94,7 +109,7 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: Cache ccache cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ inputs.os }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
@@ -104,11 +119,9 @@ jobs:
run: |
cmake -DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_OPENGL=OFF \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DDISABLE_ADVANCE_SIMD=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DUSE_SYSTEM_LIBS=OFF \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_LINKED_FFMPEG=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -137,20 +150,51 @@ jobs:
- name: Prepare Build Artifacts
run: |
cp /usr/local/lib/libMoltenVK.dylib build/pcsx2*/PCSX2.app/Contents/Frameworks/
mv build/pcsx2*/PCSX2.app PCSX2.app
- name: Pull the Signing Keys and Notarization Credentials
if: ${{ inputs.sign_and_notarize == true && env.SIGN_KEY }}
run: |
echo "${{ secrets.APPLE_SIGN_P12_B64 }}" | base64 -d > cert.p12
echo "${{ secrets.APPLE_APPSTORECONNECT_CFG }}" | base64 -d > key.json
- name: Sign the Application
if: ${{ inputs.sign_and_notarize == true && env.SIGN_KEY }}
uses: indygreg/apple-code-sign-action@44d0985b7f4363198e80b6fea63ac3e9dd3e9957
with:
input_path: 'PCSX2.app'
p12_file: cert.p12
p12_password: "${{ secrets.APPLE_SIGN_P12_PASS }}"
sign_args: |
--for-notarization
--code-signature-flags=runtime
--entitlements-xml-file=pcsx2/Resources/PCSX2.entitlements
notarize: true
# max_wait_seconds is only present on my fork located at F0bes/apple-code-sign-action@demo4
# If we are timing out we should switch to the newest upstream (if I get it upstreamed)
# or use my fork.
# max_wait_seconds: '2000'
staple: true
# Generated using rcodesign
# Despite what the docs say, I found that this file is required and I had 0 luck
# passing the issuer id, key, etc through arguments.
app_store_connect_api_key_json_file: 'key.json'
- name: Zip Build Artifacts
run: |
TAG="$(git tag --points-at HEAD)"
if [ -z "$TAG" ]; then
APPNAME="${{ steps.artifact-metadata.outputs.artifact-name }}"
else
APPNAME="PCSX2-$TAG"
fi
mv build/pcsx2*/PCSX2.app "$APPNAME.app"
mv PCSX2.app "$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.xz" ci-artifacts/macOS.tar.xz
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: "*.tar.xz"

View File

@@ -15,4 +15,6 @@ jobs:
uses: ./.github/workflows/macos_build.yml
with:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
sign_and_notarize: true # If we find that notarization takes a long time we should disable that on PR builds
secrets: inherit

View File

@@ -10,16 +10,19 @@ 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
workflow_dispatch:
inputs:
is_prelease:
description: 'Should be a pre-release?'
required: true
default: 'true'
type: choice
options:
- 'true'
- 'false'
tag_value:
description: 'Create a new release from latest master with the given tag, if this is left blank it will bump the patch version. You dont need to include the "v" prefix'
required: false
permissions:
contents: write
@@ -37,11 +40,13 @@ jobs:
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b
with:
github_token: ${{ github.token }}
tag_prefix: v
default_bump: patch
# if set, it will overwrite the bump settings
custom_tag: ${{ github.event.inputs.tag_value == '' && null || github.event.inputs.tag_value }}
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
# with PRs -- not commits (determine how much we care).
@@ -62,9 +67,18 @@ jobs:
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
- name: Create a GitHub Release (Manual)
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
if: steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch'
with:
body_path: ./release-notes.md
draft: true
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prelease == 'true' }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub Release (Push)
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
if: steps.tag_version.outputs.new_tag && github.event_name != 'workflow_dispatch'
with:
body_path: ./release-notes.md
draft: true
@@ -81,10 +95,12 @@ jobs:
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "AppImage Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage"
compiler: clang
cmakeflags: ""
buildAppImage: true
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
build_linux_flatpak:
@@ -95,11 +111,12 @@ jobs:
uses: ./.github/workflows/linux_build_flatpak.yml
with:
jobName: "Flatpak Build"
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
branch: "stable"
publish: false
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
# Windows
@@ -111,10 +128,12 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "Windows Build"
artifactPrefixName: "PCSX2-windows-Qt-x64"
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit
# MacOS
@@ -126,7 +145,10 @@ jobs:
uses: ./.github/workflows/macos_build.yml
with:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
sign_and_notarize: true
secrets: inherit
# Upload the Artifacts
@@ -146,7 +168,7 @@ jobs:
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download all Artifacts
with:
path: ./ci-artifacts/
@@ -159,9 +181,6 @@ jobs:
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 }}
@@ -184,9 +203,9 @@ jobs:
echo "TAG_VAL=${TAG_VAL}"
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
- name: Announce Release
env:

View File

@@ -0,0 +1,13 @@
diff --git a/src/core/indicators/ClassicDropIndicatorOverlay.h b/src/core/indicators/ClassicDropIndicatorOverlay.h
index 2dfb9718a..9b01f002e 100644
--- a/src/core/indicators/ClassicDropIndicatorOverlay.h
+++ b/src/core/indicators/ClassicDropIndicatorOverlay.h
@@ -11,7 +11,7 @@
#pragma once
-#include "core/DropIndicatorOverlay.h"
+#include <kddockwidgets/core/DropIndicatorOverlay.h>
namespace KDDockWidgets {

View File

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

View File

@@ -0,0 +1,270 @@
diff --git a/CHANGES b/CHANGES
index 5d3dd16..587b612 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,7 @@ v2024.1
- Update dependencies
- Propagate test/install options to Glslang
-v2024.0
+v2024.0 2024-03-09
- Update dependencies
- Utilities:
- Use Python3 explicitly in utility scripts
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffcb54b..7c1a6d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,6 +117,9 @@ if(MSVC)
endif()
endif(MSVC)
+if(NOT WIN32)
+ add_definitions("-fvisibility=hidden")
+endif()
# Configure subdirectories.
# We depend on these for later projects, so they should come first.
@@ -124,7 +127,6 @@ add_subdirectory(third_party)
add_subdirectory(libshaderc_util)
add_subdirectory(libshaderc)
-add_subdirectory(glslc)
if(${SHADERC_ENABLE_EXAMPLES})
add_subdirectory(examples)
endif()
@@ -158,5 +160,3 @@ function(define_pkg_config_file NAME LIBS)
endfunction()
define_pkg_config_file(shaderc -lshaderc_shared)
-define_pkg_config_file(shaderc_static "-lshaderc ${EXTRA_STATIC_PKGCONFIG_LIBS} -lshaderc_util")
-define_pkg_config_file(shaderc_combined -lshaderc_combined)
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
index df9a88d..b15e5d7 100644
--- a/libshaderc/CMakeLists.txt
+++ b/libshaderc/CMakeLists.txt
@@ -24,13 +24,6 @@ set(SHADERC_SOURCES
src/shaderc_private.h
)
-add_library(shaderc STATIC ${SHADERC_SOURCES})
-shaderc_default_compile_options(shaderc)
-target_include_directories(shaderc
- PUBLIC include
- PRIVATE ${glslang_SOURCE_DIR}
- ${SPIRV-Headers_SOURCE_DIR}/include)
-
add_library(shaderc_shared SHARED ${SHADERC_SOURCES})
shaderc_default_compile_options(shaderc_shared)
target_include_directories(shaderc_shared
@@ -54,7 +47,7 @@ if(SHADERC_ENABLE_INSTALL)
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/shaderc)
- install(TARGETS shaderc shaderc_shared
+ install(TARGETS shaderc_shared
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -69,20 +62,8 @@ set(SHADERC_LIBS
SPIRV-Tools
)
-target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS})
target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS})
-shaderc_add_tests(
- TEST_PREFIX shaderc
- LINK_LIBS shaderc
- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR}
- ${spirv-tools_SOURCE_DIR}/include
- ${SPIRV-Headers_SOURCE_DIR}/include
- TEST_NAMES
- shaderc
- shaderc_cpp
- shaderc_private)
-
shaderc_add_tests(
TEST_PREFIX shaderc_shared
LINK_LIBS shaderc_shared SPIRV-Tools
@@ -94,22 +75,6 @@ shaderc_add_tests(
shaderc_cpp
shaderc_private)
-shaderc_combine_static_lib(shaderc_combined shaderc)
-
-if(SHADERC_ENABLE_INSTALL)
- install(TARGETS shaderc_combined DESTINATION ${CMAKE_INSTALL_LIBDIR})
-endif(SHADERC_ENABLE_INSTALL)
-
-shaderc_add_tests(
- TEST_PREFIX shaderc_combined
- LINK_LIBS shaderc_combined ${CMAKE_THREAD_LIBS_INIT}
- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR}
- ${spirv-tools_SOURCE_DIR}/include
- ${SPIRV-Headers_SOURCE_DIR}/include
- TEST_NAMES
- shaderc
- shaderc_cpp)
-
if(${SHADERC_ENABLE_TESTS})
add_executable(shaderc_c_smoke_test ./src/shaderc_c_smoke_test.c)
shaderc_default_c_compile_options(shaderc_c_smoke_test)
diff --git a/libshaderc/include/shaderc/shaderc.h b/libshaderc/include/shaderc/shaderc.h
index 3a3e97d..65d5b77 100644
--- a/libshaderc/include/shaderc/shaderc.h
+++ b/libshaderc/include/shaderc/shaderc.h
@@ -15,6 +15,8 @@
#ifndef SHADERC_SHADERC_H_
#define SHADERC_SHADERC_H_
+#define SHADERC_PCSX2_CUSTOM 1
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -317,7 +317,7 @@ SHADERC_EXPORT void shaderc_compile_options_set_source_language(
// Sets the compiler mode to generate debug information in the output.
SHADERC_EXPORT void shaderc_compile_options_set_generate_debug_info(
- shaderc_compile_options_t options);
+ shaderc_compile_options_t options, bool enabled, bool enable_non_semantic);
// Sets the compiler optimization level to the given level. Only the last one
// takes effect if multiple calls of this function exist.
diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp
index 3817af8..5592b49 100644
--- a/libshaderc/include/shaderc/shaderc.hpp
+++ b/libshaderc/include/shaderc/shaderc.hpp
@@ -168,8 +168,9 @@ class CompileOptions {
}
// Sets the compiler mode to generate debug information in the output.
- void SetGenerateDebugInfo() {
- shaderc_compile_options_set_generate_debug_info(options_);
+ void SetGenerateDebugInfo(bool enabled, bool non_semantic_debug_info) {
+ shaderc_compile_options_set_generate_debug_info(options_, enabled,
+ non_sematic_debug_info);
}
// Sets the compiler optimization level to the given level. Only the last one
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
index 63f1bbc..c1a9b12 100644
--- a/libshaderc/src/shaderc.cc
+++ b/libshaderc/src/shaderc.cc
@@ -418,8 +418,12 @@ void shaderc_compile_options_set_source_language(
}
void shaderc_compile_options_set_generate_debug_info(
- shaderc_compile_options_t options) {
- options->compiler.SetGenerateDebugInfo();
+ shaderc_compile_options_t options, bool enabled, bool enable_non_semantic) {
+ if (enabled) {
+ options->compiler.SetGenerateDebugInfo();
+ if (enable_non_semantic)
+ options->compiler.SetEmitNonSemanticDebugInfo();
+ }
}
void shaderc_compile_options_set_optimization_level(
diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h
index d9d02b9..b076ec8 100644
--- a/libshaderc_util/include/libshaderc_util/compiler.h
+++ b/libshaderc_util/include/libshaderc_util/compiler.h
@@ -195,6 +195,7 @@ class Compiler {
warnings_as_errors_(false),
suppress_warnings_(false),
generate_debug_info_(false),
+ emit_non_semantic_debug_info_(false),
enabled_opt_passes_(),
target_env_(TargetEnv::Vulkan),
target_env_version_(TargetEnvVersion::Default),
@@ -220,6 +221,10 @@ class Compiler {
// such as identifier names and line numbers.
void SetGenerateDebugInfo();
+ // Requests that the compiler emit non-semantic debug information.
+ // Requires VK_KHR_shader_non_semantic_info.
+ void SetEmitNonSemanticDebugInfo();
+
// Sets the optimization level to the given level. Only the last one takes
// effect if multiple calls of this method exist.
void SetOptimizationLevel(OptimizationLevel level);
@@ -486,6 +491,10 @@ class Compiler {
// output.
bool generate_debug_info_;
+ // When true and generate_debug_info_ is also set, generate non-semantic debug
+ // information.
+ bool emit_non_semantic_debug_info_;
+
// Optimization passes to be applied.
std::vector<PassId> enabled_opt_passes_;
diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
index e5f5d10..1f9e6a5 100644
--- a/libshaderc_util/src/compiler.cc
+++ b/libshaderc_util/src/compiler.cc
@@ -341,6 +341,11 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile(
options.generateDebugInfo = generate_debug_info_;
options.disableOptimizer = true;
options.optimizeSize = false;
+ options.emitNonSemanticShaderDebugInfo =
+ generate_debug_info_ && emit_non_semantic_debug_info_;
+ options.emitNonSemanticShaderDebugSource =
+ generate_debug_info_ && emit_non_semantic_debug_info_;
+
// Note the call to GlslangToSpv also populates compilation_output_data.
glslang::GlslangToSpv(*program.getIntermediate(used_shader_stage), spirv,
&options);
@@ -438,6 +443,10 @@ void Compiler::SetGenerateDebugInfo() {
}
}
+void Compiler::SetEmitNonSemanticDebugInfo() {
+ emit_non_semantic_debug_info_ = true;
+}
+
void Compiler::SetOptimizationLevel(Compiler::OptimizationLevel level) {
// Clear previous settings first.
enabled_opt_passes_.clear();
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index d44f62a..83966b6 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -20,9 +20,9 @@ set(SHADERC_TINT_DIR "${SHADERC_THIRD_PARTY_ROOT_DIR}/tint" CACHE STRING
set(SHADERC_ABSL_DIR "${SHADERC_THIRD_PARTY_ROOT_DIR}/abseil_cpp" CACHE STRING
"Location of re2 source")
-set( SKIP_GLSLANG_INSTALL ${SHADERC_SKIP_INSTALL} )
-set( SKIP_SPIRV_TOOLS_INSTALL ${SHADERC_SKIP_INSTALL} )
-set( SKIP_GOOGLETEST_INSTALL ${SHADERC_SKIP_INSTALL} )
+set( SKIP_GLSLANG_INSTALL ON )
+set( SKIP_SPIRV_TOOLS_INSTALL ON )
+set( SKIP_GOOGLETEST_INSTALL ON )
# Configure third party projects.
if(${SHADERC_ENABLE_TESTS})
@@ -64,7 +64,10 @@ if (NOT TARGET SPIRV-Tools)
add_subdirectory(${SHADERC_RE2_DIR} re2)
add_subdirectory(${SHADERC_EFFCEE_DIR} effcee)
endif()
- add_subdirectory(${SHADERC_SPIRV_TOOLS_DIR} spirv-tools)
+ set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "Skip building SPIRV-Tools executables")
+ set(SPIRV_TOOLS_BUILD_STATIC OFF CACHE BOOL "Skip building two SPIRV-Tools libs")
+ set(SPIRV_TOOLS_LIBRARY_TYPE STATIC CACHE STRING "Build static SPIRV-Tools libs")
+ add_subdirectory(${SHADERC_SPIRV_TOOLS_DIR} spirv-tools EXCLUDE_FROM_ALL)
if (NOT "${SPIRV_SKIP_TESTS}")
if (MSVC)
if (${MSVC_VERSION} LESS 1920)
@@ -87,8 +90,8 @@ if (NOT TARGET glslang)
# Glslang tests are off by default. Turn them on if testing Shaderc.
set(GLSLANG_TESTS ON)
endif()
- set(GLSLANG_ENABLE_INSTALL $<NOT:${SKIP_GLSLANG_INSTALL}>)
- add_subdirectory(${SHADERC_GLSLANG_DIR} glslang)
+ set(GLSLANG_ENABLE_INSTALL OFF)
+ add_subdirectory(${SHADERC_GLSLANG_DIR} glslang EXCLUDE_FROM_ALL)
endif()
if (NOT TARGET glslang)
message(FATAL_ERROR "glslang was not found - required for compilation")

View File

@@ -1,12 +1,14 @@
#!/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
"$SCRIPTDIR/../../../../tools/retry.sh" sudo apt-get -y install qt6-l10n-tools python3
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_en_translation.sh"
"$SCRIPTDIR/../../../../tools/generate_fullscreen_ui_translation_strings.py"
"$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_glyph_ranges.py"
"$SCRIPTDIR/../../../../tools/generate_update_fa_glyph_ranges.py"
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_base_translation.sh"

View File

@@ -26,7 +26,6 @@
# For more information, please refer to <http://unlicense.org/>
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
if [ "$#" -ne 4 ]; then
echo "Syntax: $0 <path to pcsx2 directory> <path to build directory> <deps prefix> <output name>"
@@ -42,6 +41,10 @@ BINARY=pcsx2-qt
APPDIRNAME=PCSX2.AppDir
STRIP=strip
declare -a MANUAL_LIBS=(
"libshaderc_shared.so.1"
)
declare -a MANUAL_QT_LIBS=(
"libQt6WaylandEglClientHwIntegration.so.6"
)
@@ -52,6 +55,12 @@ declare -a MANUAL_QT_PLUGINS=(
"wayland-shell-integration"
)
declare -a REMOVE_LIBS=(
'libwayland-client.so*'
'libwayland-cursor.so*'
'libwayland-egl.so*'
)
set -e
LINUXDEPLOY=./linuxdeploy-x86_64.AppImage
@@ -60,24 +69,41 @@ 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
"$PCSX2DIR/tools/retry.sh" wget -O "$LINUXDEPLOY" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x "$LINUXDEPLOY"
fi
if [ ! -f "$LINUXDEPLOY_PLUGIN_QT" ]; then
retry_command wget -O "$LINUXDEPLOY_PLUGIN_QT" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
"$PCSX2DIR/tools/retry.sh" wget -O "$LINUXDEPLOY_PLUGIN_QT" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x "$LINUXDEPLOY_PLUGIN_QT"
fi
if [ ! -f "$APPIMAGETOOL" ]; then
retry_command wget -O "$APPIMAGETOOL" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
"$PCSX2DIR/tools/retry.sh" wget -O "$APPIMAGETOOL" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x "$APPIMAGETOOL"
fi
OUTDIR=$(realpath "./$APPDIRNAME")
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
rm -fr "$OUTDIR"
echo "Locating extra libraries..."
EXTRA_LIBS_ARGS=""
for lib in "${MANUAL_LIBS[@]}"; do
srcpath=$(find "$DEPSDIR" -name "$lib")
if [ ! -f "$srcpath" ]; then
echo "Missinge extra library $lib. Exiting."
exit 1
fi
echo "Found $lib at $srcpath."
if [ "$EXTRA_LIBS_ARGS" == "" ]; then
EXTRA_LIBS_ARGS="--library=$srcpath"
else
EXTRA_LIBS_ARGS="$EXTRA_LIBS_ARGS,$srcpath"
fi
done
# 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
@@ -99,11 +125,12 @@ cp "$PCSX2DIR/.github/workflows/scripts/linux/pcsx2-qt.desktop" "net.pcsx2.PCSX2
cp "$PCSX2DIR/bin/resources/icons/AppIconLarge.png" "PCSX2.png"
echo "Running linuxdeploy to create AppDir..."
EXTRA_QT_PLUGINS="core;gui;network;svg;waylandclient;widgets;xcbqpa" \
EXTRA_QT_PLUGINS="core;gui;svg;waylandclient;widgets;xcbqpa" \
EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
DEPLOY_PLATFORM_THEMES="1" \
QMAKE="$DEPSDIR/bin/qmake" \
NO_STRIP="1" \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" $EXTRA_LIBS_ARGS \
--desktop-file="net.pcsx2.PCSX2.desktop" --icon-file="PCSX2.png"
echo "Copying resources into AppDir..."
@@ -137,6 +164,16 @@ for GROUP in "${MANUAL_QT_PLUGINS[@]}"; do
done
done
# Why do we have to manually remove these libs? Because the linuxdeploy Qt plugin
# copies them, not the "main" linuxdeploy binary, and plugins don't inherit the
# include list...
for lib in "${REMOVE_LIBS[@]}"; do
for libpath in $(find "$OUTDIR/usr/lib" -name "$lib"); do
echo " Removing problematic library ${libpath}."
rm -f "$libpath"
done
done
# Restore unstripped deps (for cache).
rm -fr "$DEPSDIR"
mv "$DEPSDIR.bak" "$DEPSDIR"
@@ -151,6 +188,15 @@ mkdir -p "$OUTDIR/usr/share/metainfo"
"$SCRIPTDIR/generate-metainfo.sh" "$OUTDIR/usr/share/metainfo/net.pcsx2.PCSX2.appdata.xml"
echo "Generating AppImage..."
GIT_VERSION=$(git tag --points-at HEAD)
if [[ "${GIT_VERSION}" == "" ]]; then
# In the odd event that we run this script before the release gets tagged.
GIT_VERSION=$(git describe --tags || true)
if [[ "${GIT_VERSION}" == "" ]]; then
GIT_VERSION=$(git rev-parse HEAD)
fi
fi
rm -f "$NAME.AppImage"
$APPIMAGETOOL -v "$OUTDIR" "$NAME.AppImage"

View File

@@ -2,52 +2,148 @@
set -e
INSTALLDIR="$HOME/deps"
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.28.2
QT=6.5.2
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBJPEGTURBO=3.1.0
LIBPNG=1.6.48
LIBWEBP=1.5.0
SDL=SDL3-3.2.14
QT=6.9.0
LZ4=1.10.0
ZSTD=1.5.7
KDDOCKWIDGETS=2.2.3
PLUTOVG=0.0.13
PLUTOSVG=0.0.6
SHADERC=2024.1
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e $SDL.tar.gz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
3db4c729b4d80a9d8fda8dd77128406353baff4755ca619177eda4cddae71269 qtbase-everywhere-src-$QT.tar.xz
aae0c08924c6a5e47f9d57e031673d611ffff7aab2bee2e1cc460471ecac6743 qtimageformats-everywhere-src-$QT.tar.xz
48b4cc1093af2e0ab3bea30f60651bddd877a2335d16e7207879a2e9e81963a3 qtsvg-everywhere-src-$QT.tar.xz
551ffb22751d8fd4d88e9ebd55b9131f4ca55341ee497fdbbba4da8d10d94341 qttools-everywhere-src-$QT.tar.xz
337c45637e757e754c2f0ea65c20de3e6e53a841dda1253db15baa622515beeb qttranslations-everywhere-src-$QT.tar.xz
3020be86fb7fd0abb8509906ca6583cadcaee168159abceaeb5b3e9d42563c9a qtwayland-everywhere-src-$QT.tar.xz
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
b7e7dc05011b88c69170fe18935487b2559276955e49113f8c1b6b72c9b79c1f $SDL.tar.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c qtbase-everywhere-src-$QT.tar.xz
2047c6242a57bf97cf40079fa9f91752c137cd9ae84760faa9a2e5e8a440606f qtimageformats-everywhere-src-$QT.tar.xz
ec359d930c95935ea48af58b100c2f5d0d275968ec8ca1e0e76629b7159215fc qtsvg-everywhere-src-$QT.tar.xz
fa645589cc3f939022401a926825972a44277dead8ec8607d9f2662e6529c9a4 qttools-everywhere-src-$QT.tar.xz
1d5581ef5fc7c7bc556f2403017983683993bbebfcdf977ef8f180f604668c3f qttranslations-everywhere-src-$QT.tar.xz
503416fcb04db503bd130e6a49c45e3e546f091e83406f774a0c703130c91805 qtwayland-everywhere-src-$QT.tar.xz
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
f49d62709d6bf1808ddc9b8f71e22a755484f75c7bbb0fb368f7fb2ffc7cf645 plutovg-$PLUTOVG.tar.gz
01f8aee511bd587a602a166642a96522cc9522efd1e38c2d00e4fbc0aa22d7a0 plutosvg-$PLUTOSVG.tar.gz
EOF
curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz"
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz" \
-o "KDDockWidgets-$KDDOCKWIDGETS.tar.gz" "https://github.com/KDAB/KDDockWidgets/archive/v$KDDOCKWIDGETS.tar.gz" \
-o "plutovg-$PLUTOVG.tar.gz" "https://github.com/sammycage/plutovg/archive/v$PLUTOVG.tar.gz" \
-o "plutosvg-$PLUTOSVG.tar.gz" "https://github.com/sammycage/plutosvg/archive/v$PLUTOSVG.tar.gz"
shasum -a 256 --check SHASUMS
echo "Building SDL..."
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --disable-dbus --without-x --disable-video-opengl --disable-video-opengles --disable-video-vulkan --disable-wayland-shared --disable-ime --disable-oss --disable-alsa --disable-jack --disable-esd --disable-pipewire --disable-pulseaudio --disable-arts --disable-nas --disable-sndio --disable-fusionsound --disable-diskaudio
make "-j$NPROCS"
echo "Building libbacktrace..."
rm -fr "libbacktrace-$LIBBACKTRACE"
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$INSTALLDIR"
make
make install
cd ..
echo "Building libbacktrace..."
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$HOME/deps"
make
make install
echo "Building libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building libjpegturbo..."
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
cd "libjpeg-turbo-$LIBJPEGTURBO"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building LZ4..."
rm -fr "lz4-$LZ4"
tar xf "lz4-$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir -G Ninja build/cmake
cmake --build build-dir --parallel
ninja -C build-dir install
cd ..
echo "Building Zstandard..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
# Couple notes:
@@ -56,104 +152,117 @@ cd ..
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
# OpenGL is needed to render window decorations in Wayland, apparently.
echo "Building Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
mkdir build
cd build
../configure -prefix "$INSTALLDIR" -release -no-dbus -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -- -DFEATURE_dbus=OFF -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_system_webp=ON
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building Qt Wayland..."
rm -fr "qtwayland-everywhere-src-$QT"
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
cd "qtwayland-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# From Mac build-dependencies.sh:
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
--- src/linguist/CMakeLists.txt
+++ src/linguist/CMakeLists.txt
@@ -14,7 +14,7 @@
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
+if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND TARGET Qt::PrintSupport AND NOT no-png)
add_subdirectory(linguist)
endif()
EOF
# Also force disable clang scanning, it gets very confused.
patch -u configure.cmake <<EOF
--- configure.cmake
+++ configure.cmake
@@ -14,12 +14,12 @@
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
# In any case explicitly request a minimum version of 8.x for now, otherwise
# building with CMake will fail at compilation time.
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
# special case end
-if(TARGET WrapLibClang::WrapLibClang)
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
-endif()
+#if(TARGET WrapLibClang::WrapLibClang)
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
+#endif()
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
cmake --build . --parallel
cmake --install .
ninja install
cd ../../
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building PlutoVG..."
rm -fr "plutovg-$PLUTOVG"
tar xf "plutovg-$PLUTOVG.tar.gz"
cd "plutovg-$PLUTOVG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building PlutoSVG..."
rm -fr "plutosvg-$PLUTOSVG"
tar xf "plutosvg-$PLUTOSVG.tar.gz"
cd "plutosvg-$PLUTOSVG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=OFF -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -r deps-build

View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -e
if [ "$#" -ne 2 ]; then
echo "Syntax: $0 <deps directory> <output directory>"
exit 1
fi
DEPSDIR=$(realpath "$1")
INSTALLDIR=$(realpath "$2")
if [ ! -d "$DEPSDIR/include/QtCore" ]; then
echo "Error: The build-dependencies-qt.sh script must be run on the deps directory first."
exit 1
fi
GAMMARAY=master
mkdir -p gammaray-build
cd gammaray-build
echo "Downloading..."
curl -L -o "GammaRay-$GAMMARAY.tar.gz" https://github.com/KDAB/GammaRay/archive/$GAMMARAY.tar.gz
rm -fr "GammaRay-$GAMMARAY"
echo "Extracting..."
tar xf "GammaRay-$GAMMARAY.tar.gz"
cd "GammaRay-$GAMMARAY"
mkdir build
cd build
echo "Configuring..."
cmake -DCMAKE_PREFIX_PATH="$DEPSDIR" -G Ninja -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DGAMMARAY_BUILD_DOCS=false ..
echo "Building..."
cmake --build . --parallel
echo "Installing..."
cmake --build . --target install
cd ../..
echo "Cleaning up..."
cd ..
rm -r gammaray-build

View File

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

View File

@@ -8,8 +8,8 @@
{
"type": "git",
"url": "https://github.com/the-tcpdump-group/libpcap.git",
"tag": "libpcap-1.10.4",
"commit": "104271ba4a14de6743e43bcf87536786d8fddea4"
"tag": "libpcap-1.10.5",
"commit": "bbcbc9174df3298a854daee2b3e666a4b6e5383a"
}
],
"cleanup": [

View File

@@ -1,24 +0,0 @@
{
"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

@@ -1,45 +0,0 @@
{
"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.2.tar.gz",
"sha256": "64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig",
"/share/aclocal"
]
}

View File

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

View File

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

View File

@@ -0,0 +1,32 @@
{
"name": "kddockwidgets",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DKDDockWidgets_QT6=true",
"-DKDDockWidgets_EXAMPLES=false",
"-DKDDockWidgets_FRONTENDS=qtwidgets"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/KDAB/KDDockWidgets.git",
"tag": "v2.2.3",
"commit": "28d16d0431d7cdc9f36cb619d22621146fdfab44",
"disable-submodules": true
},
{
"type": "patch",
"path": "../../../common/kddockwidgets-dodgy-include.patch"
}
],
"cleanup": [
"/share/doc/KDDockWidgets-qt6",
"/mkspecs/modules/qt_KDDockWidgets.pri",
"/lib/cmake",
"/include"
]
}

View File

@@ -0,0 +1,27 @@
{
"name": "plutovg",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DPLUTOVG_BUILD_EXAMPLES=OFF"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/sammycage/plutovg.git",
"tag": "v0.0.13"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig"
]
}

View File

@@ -0,0 +1,28 @@
{
"name": "plutosvg",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DPLUTOSVG_BUILD_EXAMPLES=OFF",
"-DPLUTOSVG_ENABLE_FREETYPE=ON"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/sammycage/plutosvg.git",
"tag": "v0.0.6"
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig"
]
}

View File

@@ -1,15 +1,15 @@
{
"app-id": "net.pcsx2.PCSX2",
"runtime": "org.kde.Platform",
"runtime-version": "6.5",
"runtime-version": "6.8",
"sdk": "org.kde.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.llvm16"
"org.freedesktop.Sdk.Extension.llvm18"
],
"add-extensions": {
"org.freedesktop.Platform.ffmpeg-full": {
"directory": "lib/ffmpeg",
"version": "22.08",
"version": "24.08",
"add-ld-path": ".",
"autodownload": true
}
@@ -19,30 +19,42 @@
"--device=all",
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=fallback-x11",
"--socket=pulseaudio",
"--filesystem=host:ro",
"--talk-name=org.freedesktop.ScreenSaver"
],
"modules": [
"modules/10-libpcap.json",
"modules/11-libaio.json",
"modules/20-sdl2.json",
"modules/20-sdl3.json",
"modules/21-libbacktrace.json",
"modules/22-shaderc.json",
"modules/23-kddockwidgets.json",
"modules/24-plutovg.json",
"modules/25-plutosvg.json",
{
"name": "pcsx2",
"buildsystem": "simple",
"buildsystem": "cmake-ninja",
"builddir": true,
"no-make-install": true,
"build-options": {
"strip": false,
"no-debuginfo": true,
"env": {
"DEPS_PREFIX": "/app",
"COMPILER": "clang",
"CLANG_PATH": "/usr/lib/sdk/llvm16/bin/clang",
"CLANGXX_PATH": "/usr/lib/sdk/llvm16/bin/clang++",
"ADDITIONAL_CMAKE_ARGS": "-DUSE_LINKED_FFMPEG=ON"
}
"cflags": "",
"cflags-override": true,
"cxxflags": "",
"cxxflags-override": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
"-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm18/bin/clang",
"-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm18/bin/clang++",
"-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DUSE_LINKED_FFMPEG=ON",
"-DDISABLE_ADVANCE_SIMD=TRUE"
]
},
"sources": [
{
@@ -50,17 +62,15 @@
"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"
"cp -a bin \"${FLATPAK_DEST}\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/bin/resources/icons/AppIconLarge.png\" \"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/net.pcsx2.PCSX2.png\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/.github/workflows/scripts/linux/pcsx2-qt.desktop\" \"${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop\"",
"desktop-file-edit --set-key=Icon --set-value=net.pcsx2.PCSX2 \"${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop\"",
"${FLATPAK_BUILDER_BUILDDIR}/.github/workflows/scripts/linux/generate-metainfo.sh \"${FLATPAK_BUILDER_BUILDDIR}/net.pcsx2.PCSX2.metainfo.xml\"",
"cat \"${FLATPAK_BUILDER_BUILDDIR}/net.pcsx2.PCSX2.metainfo.xml\"",
"install -Dm644 \"${FLATPAK_BUILDER_BUILDDIR}/net.pcsx2.PCSX2.metainfo.xml\" \"${FLATPAK_DEST}/share/metainfo/net.pcsx2.PCSX2.metainfo.xml\"",
"mkdir -p \"${FLATPAK_DEST}/lib/ffmpeg\""
]
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

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

View File

@@ -1,50 +0,0 @@
#!/usr/bin/env bash
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 > "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=clang-toolchain.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
# DISABLE_ADVANCE_SIMD is needed otherwise we end up doing -march=native.
# shellcheck disable=SC2086
cmake \
-B build \
-G Ninja \
$ADDITIONAL_CMAKE_ARGS \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DQT_BUILD=ON \
-DCUBEB_API=ON \
-DX11_API=ON \
-DWAYLAND_API=ON \
-DENABLE_SETCAP=OFF \
-DCMAKE_PREFIX_PATH="${DEPS_PREFIX}" \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_SYSTEM_ZSTD=OFF \
-DDISABLE_ADVANCE_SIMD=TRUE

View File

@@ -8,7 +8,7 @@ if [[ $# -lt 1 ]]; then
fi
OUTFILE=$1
GIT_DATE=$(git log -1 --pretty=%cd --date=short)
GIT_DATE=$(git log -1 --pretty=%cd --date=iso8601)
GIT_VERSION=$(git tag --points-at HEAD)
GIT_HASH=$(git rev-parse HEAD)

View File

@@ -1,55 +0,0 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
ARCH=x86_64
KDE_BRANCH=6.5
BRANCH=22.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.llvm16/${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 "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

@@ -1,83 +0,0 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
# Packages - Build and Qt
declare -a BUILD_PACKAGES=(
"build-essential"
"g++"
"git"
"cmake"
"ccache"
"ninja-build"
"patchelf"
"libfuse2"
"libglib2.0-dev"
"libfontconfig1-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"libpng-dev"
"libfreetype-dev"
"libinput-dev"
"libxcb-*-dev"
"libxkbcommon-dev"
"libxkbcommon-x11-dev"
"libxrender-dev"
"libwayland-dev"
"libgl1-mesa-dev"
"libegl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libssl-dev"
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"extra-cmake-modules"
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
"libcurl4-openssl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libudev-dev"
"libx11-xcb-dev"
"libavcodec-dev"
"libavformat-dev"
"libavutil-dev"
"libswresample-dev"
"libswscale-dev"
"pkg-config"
"zlib1g-dev"
)
if [ "${COMPILER}" = "clang" ]; then
BUILD_PACKAGES+=("llvm-16" "lld-16" "clang-16")
# 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-16 main'
fi
retry_command sudo apt-get -qq update && break
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
retry_command sudo apt-get -y install "${PCSX2_PACKAGES[@]}"

View File

@@ -1,33 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Uses the AppStream standard https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html -->
<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>
<project_license>GPL-3.0+</project_license>
<name>PCSX2</name>
<developer_name>PCSX2</developer_name>
<summary>PlayStation 2 Emulator</summary>
<developer id="net.pcsx2">
<name>PCSX2 Team</name>
</developer>
<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>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="vcs-browser">https://github.com/PCSX2/pcsx2</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="help">https://pcsx2.net/discord</url>
<url type="contribute">https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md</url>
<url type="translate">https://crowdin.com/project/pcsx2-emulator</url>
<url type="vcs-browser">https://github.com/PCSX2/pcsx2</url>
<url type="contact">https://mastodon.social/@PCSX2</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png</image>
<image>
https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png
</image>
<caption>
The main PCSX2 Qt interface
</caption>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png</image>
<image>
https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png
</image>
<caption>
PCSX2 running a game
</caption>
</screenshot>
</screenshots>
<categories>
<category>Game</category>
<category>Emulator</category>
</categories>
<branding>
<color type="primary" scheme_preference="light">#3584e4</color>
<color type="primary" scheme_preference="dark">#241f31</color>
</branding>
<supports>
<control>keyboard</control>
<control>pointing</control>
<internet>offline-only</internet>
</supports>
<recommends>
<control>gamepad</control>
<memory>8192</memory>
</recommends>
<requires>
<display_length compare="ge">768</display_length>
</requires>
<content_rating type="oars-1.1"/>
<update_contact>stenzek_AT_gmail.com</update_contact>
<update_contact>pcsx2_AT_pcsx2.net</update_contact>
<releases>
<release version="@GIT_VERSION@" date="@GIT_DATE@" />
</releases>

View File

@@ -0,0 +1,402 @@
#!/bin/bash
set -e
merge_binaries() {
X86DIR=$1
ARMDIR=$2
echo "Merging ARM64 binaries from $ARMDIR into fat binaries at $X86DIR..."
IFS="
"
pushd "$X86DIR"
for X86BIN in $(find . -type f \( -name '*.dylib' -o -name '*.a' -o -perm +111 \)); do
if file "$X86DIR/$X86BIN" | grep "Mach-O.*x86_64" >/dev/null; then
ARMBIN="${ARMDIR}/${X86BIN}"
echo "Merge $ARMBIN to $X86BIN..."
lipo -create "$X86BIN" "$ARMBIN" -o "$X86BIN"
fi
done
popd
}
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
# The bundled ffmpeg has a lot of things disabled to reduce code size.
# Users may want to use system ffmpeg for additional features
: ${BUILD_FFMPEG:=1}
export MACOSX_DEPLOYMENT_TARGET=11.0
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
FREETYPE=2.13.3
HARFBUZZ=11.2.0
SDL=SDL3-3.2.14
ZSTD=1.5.7
LZ4=1.10.0
LIBPNG=1.6.48
LIBJPEGTURBO=3.1.0
LIBWEBP=1.5.0
FFMPEG=6.0
MOLTENVK=1.2.9
QT=6.7.3
KDDOCKWIDGETS=2.2.3
PLUTOVG=0.0.13
PLUTOSVG=0.0.6
SHADERC=2024.1
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
mkdir -p deps-build
cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
CMAKE_COMMON=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_SHARED_LINKER_FLAGS="-dead_strip -dead_strip_dylibs"
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
)
CMAKE_ARCH_X64=-DCMAKE_OSX_ARCHITECTURES="x86_64"
CMAKE_ARCH_ARM64=-DCMAKE_OSX_ARCHITECTURES="arm64"
CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cat > SHASUMS <<EOF
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
b7e7dc05011b88c69170fe18935487b2559276955e49113f8c1b6b72c9b79c1f $SDL.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 qtbase-everywhere-src-$QT.tar.xz
9fd58144081654c3373768dd96ead294023830927b14fe3d3c1ef641fb324753 qtimageformats-everywhere-src-$QT.tar.xz
40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b qtsvg-everywhere-src-$QT.tar.xz
f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f qttools-everywhere-src-$QT.tar.xz
dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8 qttranslations-everywhere-src-$QT.tar.xz
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
f49d62709d6bf1808ddc9b8f71e22a755484f75c7bbb0fb368f7fb2ffc7cf645 plutovg-$PLUTOVG.tar.gz
01f8aee511bd587a602a166642a96522cc9522efd1e38c2d00e4fbc0aa22d7a0 plutosvg-$PLUTOSVG.tar.gz
EOF
curl -C - -L \
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz" \
-o "KDDockWidgets-$KDDOCKWIDGETS.tar.gz" "https://github.com/KDAB/KDDockWidgets/archive/v$KDDOCKWIDGETS.tar.gz" \
-o "plutovg-$PLUTOVG.tar.gz" "https://github.com/sammycage/plutovg/archive/v$PLUTOVG.tar.gz" \
-o "plutosvg-$PLUTOSVG.tar.gz" "https://github.com/sammycage/plutosvg/archive/v$PLUTOSVG.tar.gz"
shasum -a 256 --check SHASUMS
echo "Installing SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
cmake -B build "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
if [ "$BUILD_FFMPEG" -ne 0 ]; then
echo "Installing FFmpeg..."
rm -fr "ffmpeg-$FFMPEG"
tar xf "ffmpeg-$FFMPEG.tar.xz"
cd "ffmpeg-$FFMPEG"
mkdir build
cd build
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
../configure --prefix="$INSTALLDIR" \
--enable-cross-compile --arch=x86_64 --cc='clang -arch x86_64' --cxx='clang++ -arch x86_64' --disable-x86asm \
--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"
cd ..
mkdir build-arm64
cd build-arm64
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
../configure --prefix="$INSTALLDIR" \
--enable-cross-compile --arch=arm64 --cc='clang -arch arm64' --cxx='clang++ -arch arm64' --disable-x86asm \
--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"
cd ..
merge_binaries $(realpath build) $(realpath build-arm64)
cd build
make install
cd ../..
fi
echo "Installing Zstd..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir-arm64 build/cmake
make -C build-dir-arm64 "-j$NPROCS"
merge_binaries $(realpath build-dir) $(realpath build-dir-arm64)
make -C build-dir install
cd ..
echo "Installing LZ4..."
rm -fr "lz4-$LZ4"
tar xf "lz4-$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir-arm64 build/cmake
make -C build-dir-arm64 "-j$NPROCS"
merge_binaries $(realpath build-dir) $(realpath build-dir-arm64)
make -C build-dir install
cd ..
echo "Installing libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -DPNG_ARM_NEON=on -B build-arm64
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Installing libjpegturbo..."
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
cd "libjpeg-turbo-$LIBJPEGTURBO"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build-arm64
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Installing WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -B build \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -B build-arm64 \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Building FreeType without HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build
cmake --build build --parallel
cmake --install build
cd ..
echo "Building HarfBuzz..."
rm -fr "harfbuzz-$HARFBUZZ"
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
cd "harfbuzz-$HARFBUZZ"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build
cmake --build build --parallel
cmake --install build
cd ..
echo "Building FreeType with HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build
cmake --build build --parallel
cmake --install build
cd ..
# MoltenVK already builds universal binaries, nothing special to do here.
echo "Installing MoltenVK..."
rm -fr "MoltenVK-${MOLTENVK}"
tar xf "v$MOLTENVK.tar.gz"
cd "MoltenVK-${MOLTENVK}"
./fetchDependencies --macos
make macos
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd ..
echo "Installing Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it.
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
--- shared.cpp
+++ shared.cpp
@@ -1119,14 +1119,8 @@
addPlugins(QStringLiteral("networkinformation"));
}
- // All image formats (svg if QtSvg is used)
- const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
- addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
- if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
- return false;
- return true;
- });
-
+ // All image formats
+ addPlugins(QStringLiteral("imageformats"));
addPlugins(QStringLiteral("iconengines"));
// Platforminputcontext plugins if QtGui is in use
EOF
cmake -B build "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make "-j$NPROCS"
make install
cd ../..
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
make "-j$NPROCS"
make install
cd ../..
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build
cmake --build build --parallel
cmake --install build
cd ..
echo "Building PlutoVG..."
rm -fr "plutovg-$PLUTOVG"
tar xf "plutovg-$PLUTOVG.tar.gz"
cd "plutovg-$PLUTOVG"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building PlutoSVG..."
rm -fr "plutosvg-$PLUTOSVG"
tar xf "plutosvg-$PLUTOSVG.tar.gz"
cd "plutosvg-$PLUTOSVG"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -rf deps-build

View File

@@ -2,238 +2,363 @@
set -e
export MACOSX_DEPLOYMENT_TARGET=10.14
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
# The bundled ffmpeg has a lot of things disabled to reduce code size.
# Users may want to use system ffmpeg for additional features
: ${BUILD_FFMPEG:=1}
export MACOSX_DEPLOYMENT_TARGET=11.0
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.28.2
PNG=1.6.37
JPG=9e
FFMPEG=6.0
QT=6.4.3 # Currently stuck on Qt 6.4 due to 6.5 requiring macOS 11.0.
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
mkdir deps-build
FREETYPE=2.13.3
HARFBUZZ=11.2.0
SDL=SDL3-3.2.14
ZSTD=1.5.7
LZ4=1.10.0
LIBPNG=1.6.48
LIBJPEGTURBO=3.1.0
LIBWEBP=1.5.0
FFMPEG=6.0
MOLTENVK=1.2.9
QT=6.7.3
KDDOCKWIDGETS=2.2.3
PLUTOVG=0.0.13
PLUTOSVG=0.0.6
SHADERC=2024.1
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
mkdir -p deps-build
cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
CMAKE_COMMON=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_SHARED_LINKER_FLAGS="-dead_strip -dead_strip_dylibs"
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
-DCMAKE_OSX_ARCHITECTURES="x86_64"
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
)
cat > SHASUMS <<EOF
64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e $SDL.tar.gz
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
b7e7dc05011b88c69170fe18935487b2559276955e49113f8c1b6b72c9b79c1f $SDL.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
5087c9e5b0165e7bc3c1a4ab176b35d0cd8f52636aea903fa377bdba00891a60 qtbase-everywhere-src-$QT.tar.xz
0aff58062e74b84617c5da8325d8cdad5368d8f4d2a11ceafcd58329fe99b798 qtimageformats-everywhere-src-$QT.tar.xz
88315f886cf81898705e487cedba6e6160724359d23c518c92c333c098879a4a qtsvg-everywhere-src-$QT.tar.xz
867df829cd5cd3ae8efe62e825503123542764b13c96953511e567df70c5a091 qttools-everywhere-src-$QT.tar.xz
79e56b7800d49649a8a8010818538c367a829e0b7a09d5f60bd3aecf5abe972c qttranslations-everywhere-src-$QT.tar.xz
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 qtbase-everywhere-src-$QT.tar.xz
9fd58144081654c3373768dd96ead294023830927b14fe3d3c1ef641fb324753 qtimageformats-everywhere-src-$QT.tar.xz
40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b qtsvg-everywhere-src-$QT.tar.xz
f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f qttools-everywhere-src-$QT.tar.xz
dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8 qttranslations-everywhere-src-$QT.tar.xz
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
f49d62709d6bf1808ddc9b8f71e22a755484f75c7bbb0fb368f7fb2ffc7cf645 plutovg-$PLUTOVG.tar.gz
01f8aee511bd587a602a166642a96522cc9522efd1e38c2d00e4fbc0aa22d7a0 plutosvg-$PLUTOSVG.tar.gz
EOF
curl -L \
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
-O "https://www.ijg.org/files/jpegsrc.v$JPG.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz" \
-o "KDDockWidgets-$KDDOCKWIDGETS.tar.gz" "https://github.com/KDAB/KDDockWidgets/archive/v$KDDOCKWIDGETS.tar.gz" \
-o "plutovg-$PLUTOVG.tar.gz" "https://github.com/sammycage/plutovg/archive/v$PLUTOVG.tar.gz" \
-o "plutosvg-$PLUTOSVG.tar.gz" "https://github.com/sammycage/plutosvg/archive/v$PLUTOSVG.tar.gz"
shasum -a 256 --check SHASUMS
echo "Installing SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
# 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
cmake -B build "${CMAKE_COMMON[@]}" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
if [ "$BUILD_FFMPEG" -ne 0 ]; then
echo "Installing FFmpeg..."
rm -fr "ffmpeg-$FFMPEG"
tar xf "ffmpeg-$FFMPEG.tar.xz"
cd "ffmpeg-$FFMPEG"
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
./configure --prefix="$INSTALLDIR" \
--enable-cross-compile --arch=x86_64 --cc='clang -arch x86_64' --cxx='clang++ -arch x86_64' \
--disable-all --disable-autodetect --disable-static --enable-shared \
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
--enable-audiotoolbox --enable-videotoolbox \
--enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \
--enable-muxer=avi,matroska,mov,mp3,mp4,wav \
--enable-protocol=file
make "-j$NPROCS"
make install
cd ..
fi
echo "Installing Zstd..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
make -C build-dir install
cd ..
echo "Installing LZ4..."
rm -fr "lz4-$LZ4"
tar xf "lz4-$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
make -C build-dir install
cd ..
echo "Installing libpng..."
tar xf "libpng-$PNG.tar.xz"
cd "libpng-$PNG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
make "-j$NPROCS"
make install
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing libjpeg..."
tar xf "jpegsrc.v$JPG.tar.gz"
cd "jpeg-$JPG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
make "-j$NPROCS"
make install
echo "Installing libjpegturbo..."
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
cd "libjpeg-turbo-$LIBJPEGTURBO"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
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
echo "Installing WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake "${CMAKE_COMMON[@]}" -B build \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building FreeType without HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building HarfBuzz..."
rm -fr "harfbuzz-$HARFBUZZ"
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
cd "harfbuzz-$HARFBUZZ"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building FreeType with HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
# MoltenVK already builds universal binaries, nothing special to do here.
echo "Installing MoltenVK..."
rm -fr "MoltenVK-${MOLTENVK}"
tar xf "v$MOLTENVK.tar.gz"
cd "MoltenVK-${MOLTENVK}"
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd ..
echo "Installing Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
# Qt's panel:shouldEnableURL: implementation does a whole bunch of things that activate macOS's sandbox permissions dialog
# Since this is called on every file being displayed in the open/save panel, that spams users with permissions dialogs
# Simple solution: Hopefully no one needs any filters that aren't simple file extension filters, remove all other handling
patch -u src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm <<EOF
--- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -133,7 +133,5 @@
NSURL *url = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];
- bool selectable = (m_options->acceptMode() == QFileDialogOptions::AcceptSave)
- || [self panel:m_panel shouldEnableURL:url];
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it.
# https://github.com/qt/qtbase/commit/7b018629c3c3ab23665bf1da00c43c1546042035
# The QProcess default wait time of 30s may be too short in e.g. CI environments where processes may be blocked
# for a longer time waiting for CPU or IO.
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
--- shared.cpp
+++ shared.cpp
@@ -152,7 +152,7 @@
LogDebug() << " inspecting" << binaryPath;
QProcess otool;
otool.start("otool", QStringList() << "-L" << binaryPath);
- otool.waitForFinished();
+ otool.waitForFinished(-1);
m_panel.directoryURL = [NSURL fileURLWithPath:m_currentDirectory];
- m_panel.nameFieldStringValue = selectable ? info.fileName().toNSString() : @"";
+ m_panel.nameFieldStringValue = info.fileName().toNSString();
if (otool.exitStatus() != QProcess::NormalExit || otool.exitCode() != 0) {
LogError() << otool.readAllStandardError();
@@ -1122,14 +1122,8 @@
addPlugins(QStringLiteral("networkinformation"));
}
@@ -203,61 +201,2 @@
return hidden;
-}
- // All image formats (svg if QtSvg is used)
- const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
- addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
- if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
- return false;
- return true;
- });
-
-- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url
-{
- Q_UNUSED(sender);
-
- NSString *filename = url.path;
- if (!filename.length)
- return NO;
-
- // Always accept directories regardless of their names (unless it is a bundle):
- NSFileManager *fm = NSFileManager.defaultManager;
- NSDictionary *fileAttrs = [fm attributesOfItemAtPath:filename error:nil];
- if (!fileAttrs)
- return NO; // Error accessing the file means 'no'.
- NSString *fileType = fileAttrs.fileType;
- bool isDir = [fileType isEqualToString:NSFileTypeDirectory];
- if (isDir) {
- if (!m_panel.treatsFilePackagesAsDirectories) {
- if ([NSWorkspace.sharedWorkspace isFilePackageAtPath:filename] == NO)
- return YES;
- }
- }
-
- // Treat symbolic links and aliases to directories like directories
- QFileInfo fileInfo(QString::fromNSString(filename));
- if (fileInfo.isSymLink() && QFileInfo(fileInfo.symLinkTarget()).isDir())
- return YES;
-
- QString qtFileName = fileInfo.fileName();
- // No filter means accept everything
- bool nameMatches = m_selectedNameFilter->isEmpty();
- // Check if the current file name filter accepts the file:
- for (int i = 0; !nameMatches && i < m_selectedNameFilter->size(); ++i) {
- if (QDir::match(m_selectedNameFilter->at(i), qtFileName))
- nameMatches = true;
- }
- if (!nameMatches)
- return NO;
-
- QDir::Filters filter = m_options->filter();
- if ((!(filter & (QDir::Dirs | QDir::AllDirs)) && isDir)
- || (!(filter & QDir::Files) && [fileType isEqualToString:NSFileTypeRegular])
- || ((filter & QDir::NoSymLinks) && [fileType isEqualToString:NSFileTypeSymbolicLink]))
- return NO;
-
- bool filterPermissions = ((filter & QDir::PermissionMask)
- && (filter & QDir::PermissionMask) != QDir::PermissionMask);
- if (filterPermissions) {
- if ((!(filter & QDir::Readable) && [fm isReadableFileAtPath:filename])
- || (!(filter & QDir::Writable) && [fm isWritableFileAtPath:filename])
- || (!(filter & QDir::Executable) && [fm isExecutableFileAtPath:filename]))
- return NO;
- }
- if (!(filter & QDir::Hidden)
- && (qtFileName.startsWith(u'.') || [self isHiddenFileAtURL:url]))
- return NO;
-
- return YES;
}
@@ -406,5 +345,2 @@
{
- if (m_options->acceptMode() != QFileDialogOptions::AcceptSave)
- return nil; // panel:shouldEnableURL: does the file filtering for NSOpenPanel
-
QStringList fileTypes;
+ // All image formats
+ addPlugins(QStringLiteral("imageformats"));
addPlugins(QStringLiteral("iconengines"));
// Platforminputcontext plugins if QtGui is in use
EOF
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
cmake -B build "${CMAKE_COMMON[@]}" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
--- src/linguist/CMakeLists.txt
+++ src/linguist/CMakeLists.txt
@@ -14,7 +14,7 @@
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
+if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND TARGET Qt::PrintSupport AND NOT no-png)
add_subdirectory(linguist)
endif()
EOF
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make "-j$NPROCS"
make install
cd ../..
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
make "-j$NPROCS"
make install
cd ../..
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake "${CMAKE_COMMON[@]}" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building PlutoVG..."
rm -fr "plutovg-$PLUTOVG"
tar xf "plutovg-$PLUTOVG.tar.gz"
cd "plutovg-$PLUTOVG"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building PlutoSVG..."
rm -fr "plutosvg-$PLUTOSVG"
tar xf "plutosvg-$PLUTOSVG.tar.gz"
cd "plutosvg-$PLUTOSVG"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -r deps-build
rm -rf deps-build

View File

@@ -66,7 +66,7 @@ const embed = new MessageEmbed()
.setDescription("To download the latest or previous builds, [visit the official downloads page](https://pcsx2.net/downloads/).")
.addFields(
{ name: 'Version', value: releaseInfo.tag_name, inline: true },
{ name: 'Installation Steps', value: '[See Here](https://github.com/PCSX2/pcsx2/wiki/Nightly-Build-Usage-Guide)', inline: true },
{ name: 'Installation Steps', value: '[See Here](https://pcsx2.net/docs/category/setup)', inline: true },
{ name: 'Included Changes', value: releaseInfo.body, inline: false }
);
console.log(embed);

View File

@@ -10,8 +10,8 @@
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"@octokit/plugin-throttling": "^9.4.0",
"@octokit/rest": "^21.1.1",
"discord.js": "^13.2.0"
}
},
@@ -61,45 +61,102 @@
}
},
"node_modules/@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"dependencies": {
"@octokit/types": "^6.0.3"
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==",
"license": "MIT",
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
"license": "MIT",
"dependencies": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/core/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"version": "10.1.3",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/endpoint/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz",
"integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==",
"license": "MIT",
"dependencies": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
"@octokit/request": "^9.2.2",
"@octokit/types": "^13.8.0",
"universal-user-agent": "^7.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/openapi-types": {
@@ -108,28 +165,75 @@
"integrity": "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "2.16.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz",
"integrity": "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==",
"version": "11.4.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz",
"integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.33.0"
"@octokit/types": "^13.7.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"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==",
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz",
"integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==",
"license": "MIT",
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=3"
"@octokit/core": ">=6"
}
},
"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",
"integrity": "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==",
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.33.0",
"deprecation": "^2.3.1"
"@octokit/types": "^13.8.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/plugin-retry": {
@@ -142,49 +246,107 @@
}
},
"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==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.4.0.tgz",
"integrity": "sha512-IOlXxXhZA4Z3m0EEYtrrACkuHiArHLZ3CvqWwOez/pURNqRuwfoFlTPbN5Muf28pzFuztxPyiUiNwz8KctdZaQ==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.0.1",
"@octokit/types": "^13.7.0",
"bottleneck": "^2.15.3"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "^3.5.0"
"@octokit/core": "^6.1.3"
}
},
"node_modules/@octokit/plugin-throttling/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/plugin-throttling/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
"license": "MIT",
"dependencies": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
"@octokit/endpoint": "^10.1.3",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"fast-content-type-parse": "^2.0.0",
"universal-user-agent": "^7.0.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
"@octokit/types": "^13.6.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/request/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"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==",
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.1.tgz",
"integrity": "sha512-sTQV7va0IUVZcntzy1q3QqPm/r8rWtDCqpRAmb8eXXnKkjoQEtFe3Nt5GTVsHft+R6jJoHeSiVLcgcvhtue/rg==",
"license": "MIT",
"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"
"@octokit/core": "^6.1.4",
"@octokit/plugin-paginate-rest": "^11.4.2",
"@octokit/plugin-request-log": "^5.3.1",
"@octokit/plugin-rest-endpoint-methods": "^13.3.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/types": {
@@ -234,9 +396,10 @@
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==",
"license": "Apache-2.0"
},
"node_modules/bottleneck": {
"version": "2.19.5",
@@ -270,11 +433,6 @@
"node": ">=0.4.0"
}
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/discord-api-types": {
"version": "0.23.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.23.1.tgz",
@@ -316,6 +474,22 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fast-content-type-parse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
],
"license": "MIT"
},
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
@@ -324,14 +498,6 @@
"node": ">=8"
}
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
@@ -375,14 +541,6 @@
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
@@ -429,9 +587,10 @@
}
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==",
"license": "ISC"
},
"node_modules/vali-date": {
"version": "1.0.0",
@@ -455,21 +614,16 @@
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
@@ -517,45 +671,86 @@
}
},
"@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"requires": {
"@octokit/types": "^6.0.3"
}
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw=="
},
"@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
"requires": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"version": "10.1.3",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
"requires": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.2"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz",
"integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==",
"requires": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
"@octokit/request": "^9.2.2",
"@octokit/types": "^13.8.0",
"universal-user-agent": "^7.0.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/openapi-types": {
@@ -564,26 +759,55 @@
"integrity": "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.16.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz",
"integrity": "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==",
"version": "11.4.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz",
"integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==",
"requires": {
"@octokit/types": "^6.33.0"
"@octokit/types": "^13.7.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@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==",
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz",
"integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==",
"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",
"integrity": "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==",
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
"requires": {
"@octokit/types": "^6.33.0",
"deprecation": "^2.3.1"
"@octokit/types": "^13.8.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/plugin-retry": {
@@ -596,46 +820,88 @@
}
},
"@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==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.4.0.tgz",
"integrity": "sha512-IOlXxXhZA4Z3m0EEYtrrACkuHiArHLZ3CvqWwOez/pURNqRuwfoFlTPbN5Muf28pzFuztxPyiUiNwz8KctdZaQ==",
"requires": {
"@octokit/types": "^6.0.1",
"@octokit/types": "^13.7.0",
"bottleneck": "^2.15.3"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
"@octokit/endpoint": "^10.1.3",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"fast-content-type-parse": "^2.0.0",
"universal-user-agent": "^7.0.2"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
"requires": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
"@octokit/types": "^13.6.2"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
}
}
},
"@octokit/rest": {
"version": "18.12.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.1.tgz",
"integrity": "sha512-sTQV7va0IUVZcntzy1q3QqPm/r8rWtDCqpRAmb8eXXnKkjoQEtFe3Nt5GTVsHft+R6jJoHeSiVLcgcvhtue/rg==",
"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/core": "^6.1.4",
"@octokit/plugin-paginate-rest": "^11.4.2",
"@octokit/plugin-request-log": "^5.3.1",
"@octokit/plugin-rest-endpoint-methods": "^13.3.0"
}
},
"@octokit/types": {
@@ -675,9 +941,9 @@
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="
},
"bottleneck": {
"version": "2.19.5",
@@ -702,11 +968,6 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"discord-api-types": {
"version": "0.23.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.23.1.tgz",
@@ -735,16 +996,16 @@
"is-obj": "^2.0.0"
}
},
"fast-content-type-parse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="
},
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
@@ -771,14 +1032,6 @@
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
@@ -813,9 +1066,9 @@
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA=="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
},
"vali-date": {
"version": "1.0.0",
@@ -836,15 +1089,10 @@
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
"requires": {}
}
}

View File

@@ -11,8 +11,8 @@
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"@octokit/plugin-throttling": "^9.4.0",
"@octokit/rest": "^21.1.1",
"discord.js": "^13.2.0"
}
}

View File

@@ -1,202 +1,332 @@
{
"name": "generate-release-notes",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 3,
"requires": true,
"dependencies": {
"@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"requires": {
"@octokit/types": "^6.0.3"
"packages": {
"": {
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^9.6.0",
"@octokit/rest": "^21.1.1"
}
},
"@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"requires": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
"node_modules/@octokit/auth-token": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==",
"license": "MIT",
"engines": {
"node": ">= 18"
}
},
"@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"requires": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
"node_modules/@octokit/core": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
"license": "MIT",
"dependencies": {
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
},
"engines": {
"node": ">= 18"
}
},
"@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"requires": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
"node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/core/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"@octokit/openapi-types": {
"node_modules/@octokit/endpoint": {
"version": "10.1.3",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/endpoint/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"node_modules/@octokit/graphql": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz",
"integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==",
"license": "MIT",
"dependencies": {
"@octokit/request": "^9.2.2",
"@octokit/types": "^13.8.0",
"universal-user-agent": "^7.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"node_modules/@octokit/openapi-types": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.1.0.tgz",
"integrity": "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.16.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz",
"integrity": "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==",
"requires": {
"@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=="
},
"@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",
"integrity": "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==",
"requires": {
"@octokit/types": "^6.33.0",
"deprecation": "^2.3.1"
}
},
"@octokit/plugin-retry": {
"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==",
"requires": {
"dependencies": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"@octokit/plugin-throttling": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.5.2.tgz",
"integrity": "sha512-Eu7kfJxU8vmHqWGNszWpg+GVp2tnAfax3XQV5CkYPEE69C+KvInJXW9WajgSeW+cxYe0UVdouzCtcreGNuJo7A==",
"requires": {
"@octokit/types": "^6.0.1",
"node_modules/@octokit/plugin-throttling": {
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.6.0.tgz",
"integrity": "sha512-zn7m1N3vpJDaVzLqjCRdJ0cRzNiekHEWPi8Ww9xyPNrDt5PStHvVE0eR8wy4RSU8Eg7YO8MHyvn6sv25EGVhhg==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.7.0",
"bottleneck": "^2.15.3"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "^6.1.3"
}
},
"@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
"node_modules/@octokit/plugin-throttling/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/plugin-throttling/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"requires": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
"node_modules/@octokit/request": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
"license": "MIT",
"dependencies": {
"@octokit/endpoint": "^10.1.3",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"fast-content-type-parse": "^2.0.0",
"universal-user-agent": "^7.0.2"
},
"engines": {
"node": ">= 18"
}
},
"@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"
"node_modules/@octokit/request-error": {
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.6.2"
},
"engines": {
"node": ">= 18"
}
},
"@octokit/types": {
"node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
"license": "MIT"
},
"node_modules/@octokit/request/node_modules/@octokit/types": {
"version": "13.10.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^24.2.0"
}
},
"node_modules/@octokit/rest": {
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.1.tgz",
"integrity": "sha512-sTQV7va0IUVZcntzy1q3QqPm/r8rWtDCqpRAmb8eXXnKkjoQEtFe3Nt5GTVsHft+R6jJoHeSiVLcgcvhtue/rg==",
"license": "MIT",
"dependencies": {
"@octokit/core": "^6.1.4",
"@octokit/plugin-paginate-rest": "^11.4.2",
"@octokit/plugin-request-log": "^5.3.1",
"@octokit/plugin-rest-endpoint-methods": "^13.3.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": {
"version": "11.4.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz",
"integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.7.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz",
"integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==",
"license": "MIT",
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.8.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": ">=6"
}
},
"node_modules/@octokit/rest/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/types": {
"version": "6.33.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
"integrity": "sha512-0zffZ048M0UhthyPXQHLz4038Ak46nMWZXkzlXvXB/M/L1jYPBceq4iZj4qjKVrvveaJrrgKdJ9+3yUuITfcCw==",
"requires": {
"dependencies": {
"@octokit/openapi-types": "^11.1.0"
}
},
"before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
"node_modules/before-after-hook": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==",
"license": "Apache-2.0"
},
"bottleneck": {
"node_modules/bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
"node_modules/fast-content-type-parse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
],
"license": "MIT"
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
"node_modules/universal-user-agent": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==",
"license": "ISC"
}
}
}

View File

@@ -11,7 +11,7 @@
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0"
"@octokit/plugin-throttling": "^9.6.0",
"@octokit/rest": "^21.1.1"
}
}

View File

@@ -0,0 +1,336 @@
@echo off
setlocal enabledelayedexpansion
echo Setting environment...
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
) else (
echo Visual Studio 2022 not found.
goto error
)
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
set PATCH="C:\Program Files\Git\usr\bin\patch.exe"
if defined DEBUG (
echo DEBUG=%DEBUG%
) else (
set DEBUG=1
)
pushd %~dp0
set "SCRIPTDIR=%CD%"
cd ..\..\..\..
mkdir deps-build
cd deps-build || goto error
set "BUILDDIR=%CD%"
cd ..
mkdir deps-arm64
cd deps-arm64 || goto error
set "INSTALLDIR=%CD%"
cd ..
cd deps || goto error
set "X64INSTALLDIR=%CD%"
cd ..
popd
echo SCRIPTDIR=%SCRIPTDIR%
echo BUILDDIR=%BUILDDIR%
echo INSTALLDIR=%INSTALLDIR%
cd "%BUILDDIR%"
set FREETYPE=2.13.3
set HARFBUZZ=11.2.0
set LIBJPEGTURBO=3.1.0
set LIBPNG=1648
set SDL=SDL3-3.2.14
set QT=6.9.0
set QTMINOR=6.9
set LZ4=1.10.0
set WEBP=1.5.0
set ZLIB=1.3.1
set ZLIBSHORT=131
set ZSTD=1.5.7
set KDDOCKWIDGETS=2.2.3
set PLUTOVG=0.0.13
set PLUTOSVG=0.0.6
set SHADERC=2024.1
set SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
set SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
set SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1648.zip 2e5f080360f77376eb2bfa9e2ed773b9c7728159aba47b638ad53ca839379040 || goto error
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || goto error
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 46a17d3ea71fe2580a7f43ca7da286c5b9106dd761e2fd5533bb113e5d86b633 || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 513df15a6365a40f6230ec9463ad8c71b824e181d4b661dac9707e103b24ae0c || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" d428fd17a0d3f92c48a30f1d23806bf20352fbce2e80e5bbee27fa80576480ee || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 54bf06afeb67035f1c6afcd00beec755c0d776626b4cce9ab56992a55215ba69 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 5f8a94a161bd2e71a82f478dc19f4ec77ac95a50709f5a68d5951001ed6bb856 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 5885ce1a114615cc5fa69e459f069d3fe2bcb1320fd9cc162821f3920ef44735 || goto error
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags/v%LZ4%.zip" 3224b4c80f351f194984526ef396f6079bd6332dd9825c72ac0d7a37b3cdc565 || goto error
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" e313baaa7c934503ef601c909661a84e5b795dfa12f0354721cac7a9c27be47e || goto error
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 24826a70d0b168a66eb16ec9d7eeeba0d4ca9d4babc1199889d374918008426e || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 6c9f42ed6bf42750f5369b089909abfdcf0101488b4a1f41116d5159d00af8e7 || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 03ad8a6fa987af4653d0cfe6bdaed41bcf617f1366a151fb1574da75950cd3e8 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" fa59a54334feaba5702b9c25724c3f4746123865769b36dd5a28d9ef5e9d39ab || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" bf385994c20293485b378c27dfdbd77a31b949deabccd9218a977f173eda9f6f || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
) else (
echo Building release libraries...
)
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG"
set ARM64TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE="%SCRIPTDIR%\cmake-toolchain-windows-arm64.cmake"
echo Building Zlib...
rmdir /S /Q "zlib-%ZLIB%"
%SEVENZIP% x "zlib%ZLIBSHORT%.zip" || goto error
cd "zlib-%ZLIB%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZLIB_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libpng...
rmdir /S /Q "lpng%LIBPNG%"
%SEVENZIP% x "lpng%LIBPNG%.zip" || goto error
cd "lpng%LIBPNG%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libjpegturbo...
rmdir /S /Q "libjpeg-turbo-%LIBJPEGTURBO%"
tar -xf "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" || goto error
cd "libjpeg-turbo-%LIBJPEGTURBO%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building LZ4...
rmdir /S /Q "lz4"
%SEVENZIP% x "lz4-%LZ4%.zip" || goto error
rename "lz4-%LZ4%" "lz4" || goto error
cd "lz4" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -DCMAKE_C_FLAGS="/wd4711 /wd5045" -B build-dir -G Ninja build/cmake || goto error
cmake --build build-dir --parallel || goto error
ninja -C build-dir install || goto error
cd ..
echo Building FreeType without HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building HarfBuzz...
rmdir /S /Q "harfbuzz-%HARFBUZZ%"
%SEVENZIP% x "-x^!harfbuzz-%HARFBUZZ%\README" "harfbuzz-%HARFBUZZ%.zip" || goto error
cd "harfbuzz-%HARFBUZZ%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building FreeType with HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building Zstandard...
rmdir /S /Q "zstd-%ZSTD%"
%SEVENZIP% x "-x^!zstd-%ZSTD%\tests\cli-tests\bin" "zstd-%ZSTD%.zip" || goto error
cd "zstd-%ZSTD%"
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building WebP...
rmdir /S /Q "libwebp-%WEBP%"
tar -xf "libwebp-%WEBP%.tar.gz" || goto error
cd "libwebp-%WEBP%" || goto error
cmake -B build %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building SDL...
rmdir /S /Q "%SDL%"
%SEVENZIP% x "%SDL%.zip" || goto error
cd "%SDL%" || goto error
cmake -B build %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release %FORCEPDB% -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
copy build\SDL3.pdb "%INSTALLDIR%\bin" || goto error
cd .. || goto error
if %DEBUG%==1 (
set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config"
) else (
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
)
echo Building Qt base...
rmdir /S /Q "qtbase-everywhere-src-%QT%"
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
cd "qtbase-everywhere-src-%QT%" || goto error
cmake -B build %ARM64TOOLCHAIN% -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DQT_HOST_PATH="%X64INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building Qt SVG...
rmdir /S /Q "qtsvg-everywhere-src-%QT%"
%SEVENZIP% x "qtsvg-everywhere-src-%QT%.zip" || goto error
cd "qtsvg-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building Qt Image Formats...
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
%SEVENZIP% x "qtimageformats-everywhere-src-%QT%.zip" || goto error
cd "qtimageformats-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DFEATURE_system_webp=ON || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
echo Building Qt Tools...
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
%SEVENZIP% x "qttools-everywhere-src-%QT%.zip" || goto error
cd "qttools-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=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" .. -- %FORCEPDB% || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
if %DEBUG%==1 (
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
rem kddockwidgets slightly changes the name of the dll depending on if CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES is used
rem The dll name being kddockwidgets-qt62.dll or kddockwidgets-qt62.dll respectively
rem Always use CMAKE_CONFIGURATION_TYPES to give consistant naming
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=Release -G "Ninja Multi-Config"
)
echo "Building KDDockWidgets..."
rmdir /S /Q "KDDockWidgets-%KDDOCKWIDGETS%"
%SEVENZIP% x "KDDockWidgets-%KDDOCKWIDGETS%.zip" || goto error
cd "KDDockWidgets-%KDDOCKWIDGETS%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\kddockwidgets-dodgy-include.patch" || goto error
cmake -B build %ARM64TOOLCHAIN% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets %KDDOCKWIDGETSBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo "Building PlutoVG..."
rmdir /S /Q "plutovg-%PLUTOVG%"
%SEVENZIP% x "plutovg-%PLUTOVG%.zip" || goto error
cd "plutovg-%PLUTOVG%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo "Building PlutoSVG..."
rmdir /S /Q "plutosvg-%PLUTOSVG%"
%SEVENZIP% x "plutosvg-%PLUTOSVG%.zip" || goto error
cd "plutosvg-%PLUTOSVG%" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building shaderc...
rmdir /S /Q "shaderc-%SHADERC%"
%SEVENZIP% x "shaderc-%SHADERC%.zip" || goto error
cd "shaderc-%SHADERC%" || goto error
cd third_party || goto error
%SEVENZIP% x "..\..\shaderc-glslang-%SHADERC_GLSLANG%.zip" || goto error
rename "glslang-%SHADERC_GLSLANG%" "glslang" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" || goto error
rename "SPIRV-Headers-%SHADERC_SPIRVHEADERS%" "spirv-headers" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" || goto error
rename "SPIRV-Tools-%SHADERC_SPIRVTOOLS%" "spirv-tools" || goto error
cd .. || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\shaderc-changes.patch" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -DSHADERC_ENABLE_SHARED_CRT=ON -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Cleaning up...
cd ..
rd /S /Q deps-build
echo Exiting with success.
exit 0
:error
echo Failed with error #%errorlevel%.
pause
exit %errorlevel%
:downloadfile
if not exist "%~1" (
echo Downloading %~1 from %~2...
curl -L -o "%~1" "%~2" || goto error
)
rem based on https://gist.github.com/gsscoder/e22daefaff9b5d8ac16afb070f1a7971
set idx=0
for /f %%F in ('certutil -hashfile "%~1" SHA256') do (
set "out!idx!=%%F"
set /a idx += 1
)
set filechecksum=%out1%
if /i %~3==%filechecksum% (
echo Validated %~1.
exit /B 0
) else (
echo Expected %~3 got %filechecksum%.
exit /B 1
)

View File

@@ -12,6 +12,7 @@ if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Bu
)
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
set PATCH="C:\Program Files\Git\usr\bin\patch.exe"
if defined DEBUG (
echo DEBUG=%DEBUG%
@@ -35,20 +36,53 @@ echo SCRIPTDIR=%SCRIPTDIR%
echo BUILDDIR=%BUILDDIR%
echo INSTALLDIR=%INSTALLDIR%
set "PATH=%PATH%;%INSTALLDIR%\bin"
cd "%BUILDDIR%"
set QT=6.5.2
set QTMINOR=6.5
set SDL=SDL2-2.28.2
set FREETYPE=2.13.3
set HARFBUZZ=11.2.0
set LIBJPEGTURBO=3.1.0
set LIBPNG=1648
set SDL=SDL3-3.2.14
set QT=6.9.0
set QTMINOR=6.9
set LZ4=1.10.0
set WEBP=1.5.0
set ZLIB=1.3.1
set ZLIBSHORT=131
set ZSTD=1.5.7
set KDDOCKWIDGETS=2.2.3
set PLUTOVG=0.0.13
set PLUTOSVG=0.0.6
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 22383a6b242bac072f949d2b3854cf04c6856cae7a87eaa78c60dd733b71e41e || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" f770a087e350d688441880d08ad2791465e5e3b9a0f8fc2cfbeb5dd305a11d50 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 9757899b00eea4e6b65f81f922c0215c70969661567398d91da6639a50a788e7 || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 0546a6aa19f5e0188d1ba4a0e0a1423d22b7dc55ce8a614cc4aa65bfac506f74 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 3148f4f263bf9930d89107eb44bc452481a5f8c6178459e26ecbf3c8dca3b5c7 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 8b99046b54c40106d4e310be63b41331b717cfd8b42da4b4fc1c9169604be7fc || goto error
set SHADERC=2024.1
set SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
set SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
set SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
call :downloadfile "4b119f48f5cb5e1499f91a0791150231c47430d4.diff" "https://github.com/qt/qtbase/commit/4b119f48f5cb5e1499f91a0791150231c47430d4.diff" d86bd2bd4ee2aff5f5e97da027aa926178dca250d163427eb21503bb357730a5 || goto error
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1648.zip 2e5f080360f77376eb2bfa9e2ed773b9c7728159aba47b638ad53ca839379040 || goto error
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || goto error
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 46a17d3ea71fe2580a7f43ca7da286c5b9106dd761e2fd5533bb113e5d86b633 || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 513df15a6365a40f6230ec9463ad8c71b824e181d4b661dac9707e103b24ae0c || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" d428fd17a0d3f92c48a30f1d23806bf20352fbce2e80e5bbee27fa80576480ee || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 54bf06afeb67035f1c6afcd00beec755c0d776626b4cce9ab56992a55215ba69 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 5f8a94a161bd2e71a82f478dc19f4ec77ac95a50709f5a68d5951001ed6bb856 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 5885ce1a114615cc5fa69e459f069d3fe2bcb1320fd9cc162821f3920ef44735 || goto error
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags/v%LZ4%.zip" 3224b4c80f351f194984526ef396f6079bd6332dd9825c72ac0d7a37b3cdc565 || goto error
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" e313baaa7c934503ef601c909661a84e5b795dfa12f0354721cac7a9c27be47e || goto error
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 24826a70d0b168a66eb16ec9d7eeeba0d4ca9d4babc1199889d374918008426e || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 6c9f42ed6bf42750f5369b089909abfdcf0101488b4a1f41116d5159d00af8e7 || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 03ad8a6fa987af4653d0cfe6bdaed41bcf617f1366a151fb1574da75950cd3e8 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" fa59a54334feaba5702b9c25724c3f4746123865769b36dd5a28d9ef5e9d39ab || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" bf385994c20293485b378c27dfdbd77a31b949deabccd9218a977f173eda9f6f || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
@@ -56,18 +90,98 @@ if %DEBUG%==1 (
echo Building release libraries...
)
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG"
echo Building Zlib...
rmdir /S /Q "zlib-%ZLIB%"
%SEVENZIP% x "zlib%ZLIBSHORT%.zip" || goto error
cd "zlib-%ZLIB%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZLIB_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libpng...
rmdir /S /Q "lpng%LIBPNG%"
%SEVENZIP% x "lpng%LIBPNG%.zip" || goto error
cd "lpng%LIBPNG%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building libjpegturbo...
rmdir /S /Q "libjpeg-turbo-%LIBJPEGTURBO%"
tar -xf "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" || goto error
cd "libjpeg-turbo-%LIBJPEGTURBO%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building LZ4...
rmdir /S /Q "lz4"
%SEVENZIP% x "lz4-%LZ4%.zip" || goto error
rename "lz4-%LZ4%" "lz4" || goto error
cd "lz4" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -DCMAKE_C_FLAGS="/wd4711 /wd5045" -B build-dir -G Ninja build/cmake || goto error
cmake --build build-dir --parallel || goto error
ninja -C build-dir install || goto error
cd ..
echo Building FreeType without HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building HarfBuzz...
rmdir /S /Q "harfbuzz-%HARFBUZZ%"
%SEVENZIP% x "-x^!harfbuzz-%HARFBUZZ%\README" "harfbuzz-%HARFBUZZ%.zip" || goto error
cd "harfbuzz-%HARFBUZZ%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building FreeType with HarfBuzz...
rmdir /S /Q "freetype-%FREETYPE%"
tar -xf "freetype-%FREETYPE%.tar.gz" || goto error
cd "freetype-%FREETYPE%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=TRUE -DFT_REQUIRE_PNG=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building Zstandard...
rmdir /S /Q "zstd-%ZSTD%"
%SEVENZIP% x "-x^!zstd-%ZSTD%\tests\cli-tests\bin" "zstd-%ZSTD%.zip" || goto error
cd "zstd-%ZSTD%"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building WebP...
rmdir /S /Q "libwebp-%WEBP%"
tar -xf "libwebp-%WEBP%.tar.gz" || goto error
cd "libwebp-%WEBP%" || goto error
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building SDL...
rmdir /S /Q "%SDL%"
%SEVENZIP% x "%SDL%.zip" || goto error
cd "%SDL%" || goto error
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 -B build -DCMAKE_BUILD_TYPE=Release %FORCEPDB% -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
copy build\SDL3.pdb "%INSTALLDIR%\bin" || goto error
cd .. || goto error
if %DEBUG%==1 (
@@ -80,8 +194,14 @@ 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
"C:\Program Files\Git\usr\bin\patch" -p1 < ../4b119f48f5cb5e1499f91a0791150231c47430d4.diff || 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
rem Disable the PCRE2 JIT, it doesn't properly verify AVX2 support.
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-disable-pcre2-jit.patch" || goto error
rem Hackfix settings icon stretching
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-fix-icon-stretch.patch" || goto error
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
@@ -92,7 +212,7 @@ rmdir /S /Q "qtsvg-everywhere-src-%QT%"
cd "qtsvg-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
@@ -103,7 +223,7 @@ rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
cd "qtimageformats-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DFEATURE_system_webp=ON || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
@@ -114,7 +234,7 @@ rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
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
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
@@ -125,11 +245,66 @@ rmdir /S /Q "qttranslations-everywhere-src-%QT%"
cd "qttranslations-everywhere-src-%QT%" || goto error
mkdir build || goto error
cd build || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- %FORCEPDB% || goto error
cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
if %DEBUG%==1 (
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
rem kddockwidgets slightly changes the name of the dll depending on if CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES is used
rem The dll name being kddockwidgets-qt62.dll or kddockwidgets-qt62.dll respectively
rem Always use CMAKE_CONFIGURATION_TYPES to give consistant naming
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=Release -G "Ninja Multi-Config"
)
echo "Building KDDockWidgets..."
rmdir /S /Q "KDDockWidgets-%KDDOCKWIDGETS%"
%SEVENZIP% x "KDDockWidgets-%KDDOCKWIDGETS%.zip" || goto error
cd "KDDockWidgets-%KDDOCKWIDGETS%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\kddockwidgets-dodgy-include.patch" || goto error
cmake -B build -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets %KDDOCKWIDGETSBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo "Building PlutoVG..."
rmdir /S /Q "plutovg-%PLUTOVG%"
%SEVENZIP% x "plutovg-%PLUTOVG%.zip" || goto error
cd "plutovg-%PLUTOVG%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo "Building PlutoSVG..."
rmdir /S /Q "plutosvg-%PLUTOSVG%"
%SEVENZIP% x "plutosvg-%PLUTOSVG%.zip" || goto error
cd "plutosvg-%PLUTOSVG%" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Building shaderc...
rmdir /S /Q "shaderc-%SHADERC%"
%SEVENZIP% x "shaderc-%SHADERC%.zip" || goto error
cd "shaderc-%SHADERC%" || goto error
cd third_party || goto error
%SEVENZIP% x "..\..\shaderc-glslang-%SHADERC_GLSLANG%.zip" || goto error
rename "glslang-%SHADERC_GLSLANG%" "glslang" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" || goto error
rename "SPIRV-Headers-%SHADERC_SPIRVHEADERS%" "spirv-headers" || goto error
%SEVENZIP% x "..\..\shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" || goto error
rename "SPIRV-Tools-%SHADERC_SPIRVTOOLS%" "spirv-tools" || goto error
cd .. || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\shaderc-changes.patch" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -DSHADERC_ENABLE_SHARED_CRT=ON -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Cleaning up...
cd ..
rd /S /Q deps-build

View File

@@ -0,0 +1,68 @@
@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
)
pushd %~dp0
cd ..\..\..\..
cd deps || goto error
set "DEPSDIR=%CD%"
cd ..
mkdir gammaray
cd gammaray || goto error
set "INSTALLDIR=%CD%"
cd ..
mkdir gammaray-build
cd gammaray-build || goto error
set "BUILDDIR=%CD%"
echo DEPSDIR=%DEPSDIR%
echo BUILDDIR=%BUILDDIR%
echo INSTALLDIR=%INSTALLDIR%
set GAMMARAY="master"
echo Downloading...
curl -L -o "GammaRay-%GAMMARAY%.tar.gz" "https://github.com/KDAB/GammaRay/archive/%GAMMARAY%.tar.gz" || goto error
rmdir /s /q "GammaRay-%GAMMARAY%"
echo Extracting...
tar -xf "GammaRay-%GAMMARAY%.tar.gz" || goto error
echo Configuring...
cmake "GammaRay-%GAMMARAY%" -B build -DCMAKE_PREFIX_PATH="%DEPSDIR%" -G Ninja -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DGAMMARAY_BUILD_DOCS=false || goto error
echo Building...
cmake --build build --parallel || goto error
echo Installing...
cmake --build build --target install || goto errorlevel
echo Copying DLLs...
xcopy /y "%DEPSDIR%\bin\*.dll" "%INSTALLDIR%\bin\"
xcopy /y /e /s "%DEPSDIR%\plugins" "%INSTALLDIR%\bin\"
echo Cleaning up...
cd ..
rd /s /q gammaray-build
echo Exiting with success.
popd
pause
exit 0
:error
echo Failed with error #%errorlevel%.
popd
pause
exit %errorlevel%

View File

@@ -0,0 +1,4 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 10)
set(CMAKE_SYSTEM_PROCESSOR arm64)

View File

@@ -0,0 +1,35 @@
--- qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-03-19 08:46:43.000000000 -0700
+++ qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-06-06 21:52:20.539619500 -0700
@@ -41,6 +41,7 @@
src/pcre2_xclass.c
DEFINES
HAVE_CONFIG_H
+ PCRE2_DISABLE_JIT
PUBLIC_DEFINES
PCRE2_CODE_UNIT_WIDTH=16
PUBLIC_INCLUDE_DIRECTORIES
@@ -52,23 +53,8 @@
## Scopes:
#####################################################################
-qt_internal_extend_target(BundledPcre2 CONDITION QNX OR UIKIT
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm") AND WIN32
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm64") AND WIN32
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
if (APPLE)
- target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64 -DPCRE2_DISABLE_JIT")
+ target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64")
endif()
qt_internal_extend_target(BundledPcre2 CONDITION WIN32

View File

@@ -0,0 +1,13 @@
diff --git a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp
index 208420d7e8..26ef6f31ef 100644
--- a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp
+++ b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp
@@ -4232,8 +4232,6 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption
case SE_ItemViewItemDecoration:
rect = QWindowsStyle::subElementRect(element, option, widget);
- if (qstyleoption_cast<const QStyleOptionViewItem *>(option))
- rect.adjust(-2, 0, 2, 0);
break;
case SE_ItemViewItemFocusRect:

View File

@@ -8,18 +8,18 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: xTVaser/first-interaction@v1.2.4
- uses: xTVaser/first-interaction@d62d6eb3c1215eae9f9d6dbfabf12d6725834cb3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
debug-mode: false
pr-message: |-
## Thank you for submitting a contribution to PCSX2
As this is your first pull request, [please be aware of the contributing guidelines](https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md).
As this is your first pull request, [please be aware of the contributing guidelines](https://pcsx2.net/docs/contributing/).
Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. [You can find more information about this change here.](https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/)

View File

@@ -13,7 +13,7 @@ jobs:
lint_vs_proj_files:
name: Lint VS Project Files
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
runs-on: windows-2019
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v4
@@ -27,6 +27,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "MSVC SSE4"
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-msvc"
configuration: Release
simd: "SSE4"
secrets: inherit
@@ -38,6 +39,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "MSVC AVX2"
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-msvc"
configuration: Release AVX2
secrets: inherit
@@ -47,6 +49,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "CMake MSVC"
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-msvc"
configuration: CMake
buildSystem: cmake
secrets: inherit
@@ -58,6 +61,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "Clang SSE4"
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-clang"
configuration: Release Clang
simd: "SSE4"
secrets: inherit
@@ -69,6 +73,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "Clang AVX2"
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-clang"
configuration: Release Clang AVX2
secrets: inherit
@@ -78,6 +83,7 @@ jobs:
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: "CMake Clang"
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-clang"
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang

View File

@@ -6,10 +6,13 @@ on:
jobName:
required: true
type: string
artifactPrefixName:
required: true
type: string
os:
required: false
type: string
default: windows-2022
default: windows-2025
platform:
required: false
type: string
@@ -37,6 +40,10 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false
jobs:
build_windows_qt:
@@ -50,22 +57,46 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure MSBuild Clang Version
if: inputs.configuration != 'CMake'
shell: pwsh
run: |
[string[]] $clang_cl = &clang-cl.exe --version
$version = [Regex]::Match($clang_cl[0], "(\d+\.\d+\.\d+)")
$path = $clang_cl[3].TrimStart("InstalledDir: ").TrimEnd("\bin")
$output = @"
<Project>
<PropertyGroup>
<LLVMInstallDir>$path</LLVMInstallDir>
<LLVMToolsVersion>$version</LLVMToolsVersion>
</PropertyGroup>
</Project>
"@
Write-Host $output
$output | Out-File Directory.build.props
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: windows
BUILD_SYSTEM: ${{ inputs.buildSystem }}
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
PREFIX: ${{ inputs.artifactPrefixName }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -74,7 +105,7 @@ jobs:
- name: Setup msbuild
if: inputs.configuration != 'CMake'
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v2
- name: Download patches
shell: cmd
@@ -84,10 +115,10 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat') }}
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat', '.github/workflows/scripts/common/*.patch') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -119,10 +150,11 @@ jobs:
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%PATH%;%GITHUB_WORKSPACE%\bin
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: |
@@ -135,8 +167,27 @@ jobs:
!./bin/**/*.pdb
!./bin/**/*.lib
- name: Install the Breakpad Symbol Generator
uses: baptiste0928/cargo-install@91c5da15570085bcde6f4d7aed98cb82d6769fd3
with:
crate: dump_syms
- name: Generate Breakpad Symbols # Also flatten pdbs to a 'symbols' directory for upload-artifact
shell: pwsh
run: |
mkdir -Force symbols
Get-ChildItem -Path ./bin -Recurse -File | Where-Object {
($_.Extension -eq ".exe" -or $_.Extension -eq ".pdb") -and ($_.Name -notmatch "updater")
} | ForEach-Object {
& dump_syms $_.FullName >> symbols/pcsx2-qt.bpsym
}
Get-ChildItem -Path ./bin -Recurse -Filter "*.pdb" | ForEach-Object {
Copy-Item $_.FullName -Destination symbols/
}
- name: Upload artifact - with symbols
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
path: ./bin/**/*.pdb
path: |
./symbols

31
.gitignore vendored
View File

@@ -56,6 +56,14 @@ oprofile_data/
/UpgradeLog*.htm
/.vscode*
# Jetbrains Rider
/.idea*
# KDevelop 4 Workspace Configuration Files
*.kdev4
/.kdev4*
# Resources and docs in /bin are tracked
/bin/**/*.dll
/bin/**/*.dmp
/bin/**/*.exp
@@ -67,11 +75,13 @@ oprofile_data/
/bin/bios
/bin/cache
/bin/cheats
/bin/patches
/bin/covers
/bin/dumps
/bin/gamesettings
/bin/help
/bin/inis
/bin/inis/debuggersettings
/bin/logs
/bin/memcards
/bin/plugins
@@ -80,7 +90,27 @@ oprofile_data/
/bin/textures
/bin/translations
/bin/inputprofiles
/bin/videos
/bin/portable.ini
/bin/portable.txt
# Resources and docs copied from /bin
/bin-arm64
# Manually added by user.
/bin/resources/patches.zip
# Resources that are runtime downloaded.
/bin/resources/fonts/NotoSansJP-Regular.ttf
/bin/resources/fonts/NotoSansKR-Regular.ttf
/bin/resources/fonts/NotoSansSC-Regular.ttf
/bin/resources/fonts/NotoSansTC-Regular.ttf
/deps-build
/deps
/deps-arm64
/gammaray-build
/gammaray
/ipch
!/3rdparty/libjpeg/change.log
@@ -91,3 +121,4 @@ oprofile_data/
CMakeSettings.json
/ci-artifacts/
/out/
/.cache/

32
.gitmodules vendored
View File

@@ -1,32 +0,0 @@
[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/wil"]
path = 3rdparty/wil
url = https://github.com/microsoft/wil.git
branch = master
[submodule "3rdparty/rapidyaml/rapidyaml"]
path = 3rdparty/rapidyaml/rapidyaml
url = https://github.com/biojppm/rapidyaml.git
branch = master
[submodule "3rdparty/glslang/glslang"]
path = 3rdparty/glslang/glslang
url = https://github.com/KhronosGroup/glslang.git
[submodule "3rdparty/vulkan-headers"]
path = 3rdparty/vulkan-headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "3rdparty/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

View File

@@ -16,6 +16,23 @@
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp20</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ConformanceMode>true</ConformanceMode>
<!-- MSVC automatically adds __AVX__ and __AVX2__ appropriately -->
<PreprocessorDefinitions>_M_X86;__SSE4_1__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="!$(Configuration.Contains(AVX2)) Or $(Configuration.Contains(Clang))">NotSet</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="$(Configuration.Contains(AVX2)) And !$(Configuration.Contains(Clang))">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<AdditionalOptions Condition="'$(Platform)'=='x64' And $(Configuration.Contains(Clang)) And !$(Configuration.Contains(AVX2))"> -march=nehalem %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Platform)'=='x64' And $(Configuration.Contains(Clang)) And $(Configuration.Contains(AVX2))"> -march=haswell %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Platform)'=='ARM64' And $(Configuration.Contains(Clang))"> -march=armv8.4-a %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="!$(Configuration.Contains(Clang))">%(AdditionalOptions) /Zc:externConstexpr /Zc:__cplusplus /Zo /utf-8</AdditionalOptions>
<!-- Force ThinLTO for Release builds, MSVC doesn't seem to do it otherwise. -->
<!-- Also due to include order, needs to be set here, rather than in CodeGen_Release.props -->
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(Release))"> -flto=thin %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
</Project>

41
3rdparty/ccc/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 3.14)
project(ccc)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_library(ccc STATIC
src/ccc/ast.cpp
src/ccc/ast.h
src/ccc/elf.cpp
src/ccc/elf.h
src/ccc/elf_symtab.cpp
src/ccc/elf_symtab.h
src/ccc/importer_flags.cpp
src/ccc/importer_flags.h
src/ccc/mdebug_analysis.cpp
src/ccc/mdebug_analysis.h
src/ccc/mdebug_importer.cpp
src/ccc/mdebug_importer.h
src/ccc/mdebug_section.cpp
src/ccc/mdebug_section.h
src/ccc/mdebug_symbols.cpp
src/ccc/mdebug_symbols.h
src/ccc/sndll.cpp
src/ccc/sndll.h
src/ccc/stabs.cpp
src/ccc/stabs.h
src/ccc/stabs_to_ast.cpp
src/ccc/stabs_to_ast.h
src/ccc/symbol_database.cpp
src/ccc/symbol_database.h
src/ccc/symbol_file.cpp
src/ccc/symbol_file.h
src/ccc/symbol_table.cpp
src/ccc/symbol_table.h
src/ccc/util.cpp
src/ccc/util.h
)
target_include_directories(ccc PUBLIC src)

37
3rdparty/ccc/README.md vendored Normal file
View File

@@ -0,0 +1,37 @@
# Chaos Compiler Collection
This code was originally developed in the following repository and was copied
into PCSX2 by the author:
- [https://github.com/chaoticgd/ccc](https://github.com/chaoticgd/ccc)
It includes additional resources that are not present in the PCSX2 repository.
## Documentation
### DWARF (.debug) Section
- [DWARF Debugging Information Format](https://dwarfstd.org/doc/dwarf_1_1_0.pdf)
### MIPS Debug (.mdebug) Section
- [Third Eye Software and the MIPS symbol table (Peter Rowell)](http://datahedron.com/mips.html)
- [MIPS Mdebug Debugging Information (David Anderson, 1996)](https://www.prevanders.net/Mdebug.ps)
- MIPS Assembly Language Programmer's Guide, Symbol Table Chapter (Silicon Graphics, 1992)
- Tru64 UNIX Object File and Symbol Table Format Specification, Symbol Table Chapter
- `mdebugread.c` from gdb (reading)
- `ecoff.c` from gas (writing)
- `include/coff/sym.h` from binutils (headers)
### MIPS EABI
- [MIPS EABI](https://sourceware.org/legacy-ml/binutils/2003-06/msg00436.html)
### STABS
- [The "stabs" representation of debugging information (Julia Menapace, Jim Kingdon, and David MacKenzie, 1992-???)](https://sourceware.org/gdb/onlinedocs/stabs.html)
- `stabs.c` from binutils (reading)
- `stabsread.c` from gdb (reading)
- `dbxread.c` from gdb (reading)
- `dbxout.c` from gcc (writing)
- `stab.def` from gcc (symbol codes)

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{D6973076-9317-4EF2-A0B8-B7A18AC0713E}</ProjectGuid>
<ProjectGuid>{2589F8CE-EA77-4B73-911E-64074569795B}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
@@ -18,6 +18,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\common\vsprops\CodeGen_Devel.props" />
@@ -28,39 +29,47 @@
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ClInclude Include="src\ccc\ast.h" />
<ClInclude Include="src\ccc\elf.h" />
<ClInclude Include="src\ccc\elf_symtab.h" />
<ClInclude Include="src\ccc\importer_flags.h" />
<ClInclude Include="src\ccc\mdebug_analysis.h" />
<ClInclude Include="src\ccc\mdebug_importer.h" />
<ClInclude Include="src\ccc\mdebug_section.h" />
<ClInclude Include="src\ccc\mdebug_symbols.h" />
<ClInclude Include="src\ccc\sndll.h" />
<ClInclude Include="src\ccc\stabs.h" />
<ClInclude Include="src\ccc\stabs_to_ast.h" />
<ClInclude Include="src\ccc\symbol_database.h" />
<ClInclude Include="src\ccc\symbol_file.h" />
<ClInclude Include="src\ccc\symbol_table.h" />
<ClInclude Include="src\ccc\util.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\ccc\ast.cpp" />
<ClCompile Include="src\ccc\elf.cpp" />
<ClCompile Include="src\ccc\elf_symtab.cpp" />
<ClCompile Include="src\ccc\importer_flags.cpp" />
<ClCompile Include="src\ccc\mdebug_analysis.cpp" />
<ClCompile Include="src\ccc\mdebug_importer.cpp" />
<ClCompile Include="src\ccc\mdebug_section.cpp" />
<ClCompile Include="src\ccc\mdebug_symbols.cpp" />
<ClCompile Include="src\ccc\sndll.cpp" />
<ClCompile Include="src\ccc\stabs.cpp" />
<ClCompile Include="src\ccc\stabs_to_ast.cpp" />
<ClCompile Include="src\ccc\symbol_database.cpp" />
<ClCompile Include="src\ccc\symbol_file.cpp" />
<ClCompile Include="src\ccc\symbol_table.cpp" />
<ClCompile Include="src\ccc\util.cpp" />
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<IntrinsicFunctions>true</IntrinsicFunctions>
<CompileAs>CompileAsC</CompileAs>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">PNG_INTEL_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="intel\filter_sse2_intrinsics.c" />
<ClCompile Include="intel\intel_init.c" />
<ClCompile Include="png.c" />
<ClCompile Include="pngerror.c" />
<ClCompile Include="pngget.c" />
<ClCompile Include="pngmem.c" />
<ClCompile Include="pngpread.c" />
<ClCompile Include="pngread.c" />
<ClCompile Include="pngrio.c" />
<ClCompile Include="pngrtran.c" />
<ClCompile Include="pngrutil.c" />
<ClCompile Include="pngset.c" />
<ClCompile Include="pngtrans.c" />
<ClCompile Include="pngwio.c" />
<ClCompile Include="pngwrite.c" />
<ClCompile Include="pngwtran.c" />
<ClCompile Include="pngwutil.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\zlib\zlib.vcxproj">
<Project>{2f6c0388-20cb-4242-9f6c-a6ebb6a83f47}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
</Project>

111
3rdparty/ccc/ccc.vcxproj.filters vendored Normal file
View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ccc\ast.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\elf_symtab.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\importer_flags.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\mdebug_analysis.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\mdebug_importer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\mdebug_section.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\mdebug_symbols.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\sndll.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\stabs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\stabs_to_ast.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\symbol_database.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\symbol_file.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\symbol_table.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ccc\util.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\ccc\ast.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\elf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\elf_symtab.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\importer_flags.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\mdebug_analysis.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\mdebug_importer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\mdebug_section.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\mdebug_symbols.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\sndll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\stabs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\stabs_to_ast.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\symbol_database.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\symbol_file.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\symbol_table.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ccc\util.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

562
3rdparty/ccc/src/ccc/ast.cpp vendored Normal file
View File

@@ -0,0 +1,562 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "ast.h"
#include "importer_flags.h"
#include "symbol_database.h"
namespace ccc::ast {
static bool compare_nodes_and_merge(
CompareResult& dest, const Node& node_lhs, const Node& node_rhs, const SymbolDatabase* database);
static bool try_to_match_wobbly_typedefs(
const Node& node_lhs, const Node& node_rhs, const SymbolDatabase& database);
void Node::set_access_specifier(AccessSpecifier specifier, u32 importer_flags)
{
if((importer_flags & NO_ACCESS_SPECIFIERS) == 0) {
access_specifier = specifier;
}
}
std::pair<Node*, DataType*> Node::physical_type(SymbolDatabase& database, s32 max_depth)
{
Node* type = this;
DataType* symbol = nullptr;
for(s32 i = 0; i < max_depth && type->descriptor == TYPE_NAME; i++) {
DataType* data_type = database.data_types.symbol_from_handle(type->as<TypeName>().data_type_handle);
if (!data_type || !data_type->type()) {
break;
}
type = data_type->type();
symbol = data_type;
}
return std::pair(type, symbol);
}
std::pair<const Node*, const DataType*> Node::physical_type(const SymbolDatabase& database, s32 max_depth) const
{
return const_cast<Node*>(this)->physical_type(const_cast<SymbolDatabase&>(database), max_depth);
}
const char* member_function_modifier_to_string(MemberFunctionModifier modifier)
{
switch(modifier) {
case MemberFunctionModifier::NONE: return "none";
case MemberFunctionModifier::STATIC: return "static";
case MemberFunctionModifier::VIRTUAL: return "virtual";
}
return "";
}
bool StructOrUnion::flatten_fields(
std::vector<FlatField>& output,
const DataType* symbol,
const SymbolDatabase& database,
bool skip_statics,
s32 base_offset,
s32 max_fields,
s32 max_depth) const
{
if(max_depth == 0) {
return false;
}
for(const std::unique_ptr<Node>& type_name : base_classes) {
if(type_name->descriptor != TYPE_NAME) {
continue;
}
s32 new_base_offset = base_offset + type_name->offset_bytes;
DataTypeHandle handle = type_name->as<TypeName>().data_type_handle;
const DataType* base_class_symbol = database.data_types.symbol_from_handle(handle);
if(!base_class_symbol || !base_class_symbol->type() || base_class_symbol->type()->descriptor != STRUCT_OR_UNION) {
continue;
}
const StructOrUnion& base_class = base_class_symbol->type()->as<StructOrUnion>();
if(!base_class.flatten_fields(output, base_class_symbol, database, skip_statics, new_base_offset, max_fields, max_depth - 1)) {
return false;
}
}
for(const std::unique_ptr<Node>& field : fields) {
if(skip_statics && field->storage_class == STORAGE_CLASS_STATIC) {
continue;
}
if((s32) output.size() >= max_fields) {
return false;
}
FlatField& flat = output.emplace_back();
flat.node = field.get();
flat.symbol = symbol;
flat.base_offset = base_offset;
}
return true;
}
const char* type_name_source_to_string(TypeNameSource source)
{
switch(source) {
case TypeNameSource::REFERENCE: return "reference";
case TypeNameSource::CROSS_REFERENCE: return "cross_reference";
case TypeNameSource::UNNAMED_THIS: return "this";
}
return "";
}
const char* forward_declared_type_to_string(ForwardDeclaredType type)
{
switch(type) {
case ForwardDeclaredType::STRUCT: return "struct";
case ForwardDeclaredType::UNION: return "union";
case ForwardDeclaredType::ENUM: return "enum";
}
return "";
}
DataTypeHandle TypeName::data_type_handle_unless_forward_declared() const
{
if(!is_forward_declared) {
return data_type_handle;
} else {
return DataTypeHandle();
}
}
CompareResult compare_nodes(
const Node& node_lhs, const Node& node_rhs, const SymbolDatabase* database, bool check_intrusive_fields)
{
CompareResult result = CompareResultType::MATCHES_NO_SWAP;
if(node_lhs.descriptor != node_rhs.descriptor) {
return CompareFailReason::DESCRIPTOR;
}
if(check_intrusive_fields) {
if(node_lhs.storage_class != node_rhs.storage_class) {
// In some cases we can determine that a type was typedef'd for C
// translation units, but not for C++ translation units, so we need
// to add a special case for that here.
if(node_lhs.storage_class == STORAGE_CLASS_TYPEDEF && node_rhs.storage_class == STORAGE_CLASS_NONE) {
result = CompareResultType::MATCHES_FAVOUR_LHS;
} else if(node_lhs.storage_class == STORAGE_CLASS_NONE && node_rhs.storage_class == STORAGE_CLASS_TYPEDEF) {
result = CompareResultType::MATCHES_FAVOUR_RHS;
} else {
return CompareFailReason::STORAGE_CLASS;
}
}
// Vtable pointers and constructors can sometimes contain type numbers
// that are different between translation units, so we don't want to
// compare them.
bool is_vtable_pointer = node_lhs.is_vtable_pointer && node_rhs.is_vtable_pointer;
bool is_numbered_constructor = node_lhs.name.starts_with("$_") && node_rhs.name.starts_with("$_");
if(node_lhs.name != node_rhs.name && !is_vtable_pointer && !is_numbered_constructor) {
return CompareFailReason::NAME;
}
if(node_lhs.offset_bytes != node_rhs.offset_bytes) {
return CompareFailReason::RELATIVE_OFFSET_BYTES;
}
if(node_lhs.size_bits != node_rhs.size_bits) {
return CompareFailReason::SIZE_BITS;
}
if(node_lhs.is_const != node_rhs.is_const) {
return CompareFailReason::CONSTNESS;
}
}
switch(node_lhs.descriptor) {
case ARRAY: {
const auto [lhs, rhs] = Node::as<Array>(node_lhs, node_rhs);
if(compare_nodes_and_merge(result, *lhs.element_type.get(), *rhs.element_type.get(), database)) {
return result;
}
if(lhs.element_count != rhs.element_count) {
return CompareFailReason::ARRAY_ELEMENT_COUNT;
}
break;
}
case BITFIELD: {
const auto [lhs, rhs] = Node::as<BitField>(node_lhs, node_rhs);
if(lhs.bitfield_offset_bits != rhs.bitfield_offset_bits) {
return CompareFailReason::BITFIELD_OFFSET_BITS;
}
if(compare_nodes_and_merge(result, *lhs.underlying_type.get(), *rhs.underlying_type.get(), database)) {
return result;
}
break;
}
case BUILTIN: {
const auto [lhs, rhs] = Node::as<BuiltIn>(node_lhs, node_rhs);
if(lhs.bclass != rhs.bclass) {
return CompareFailReason::BUILTIN_CLASS;
}
break;
}
case ENUM: {
const auto [lhs, rhs] = Node::as<Enum>(node_lhs, node_rhs);
if(lhs.constants != rhs.constants) {
return CompareFailReason::ENUM_CONSTANTS;
}
break;
}
case ERROR_NODE: {
break;
}
case FUNCTION: {
const auto [lhs, rhs] = Node::as<Function>(node_lhs, node_rhs);
if(lhs.return_type.has_value() != rhs.return_type.has_value()) {
return CompareFailReason::FUNCTION_RETURN_TYPE_HAS_VALUE;
}
if(lhs.return_type.has_value()) {
if(compare_nodes_and_merge(result, *lhs.return_type->get(), *rhs.return_type->get(), database)) {
return result;
}
}
if(lhs.parameters.has_value() && rhs.parameters.has_value()) {
if(lhs.parameters->size() != rhs.parameters->size()) {
return CompareFailReason::FUNCTION_PARAMAETER_COUNT;
}
for(size_t i = 0; i < lhs.parameters->size(); i++) {
if(compare_nodes_and_merge(result, *(*lhs.parameters)[i].get(), *(*rhs.parameters)[i].get(), database)) {
return result;
}
}
} else if(lhs.parameters.has_value() != rhs.parameters.has_value()) {
return CompareFailReason::FUNCTION_PARAMETERS_HAS_VALUE;
}
if(lhs.modifier != rhs.modifier) {
return CompareFailReason::FUNCTION_MODIFIER;
}
break;
}
case POINTER_OR_REFERENCE: {
const auto [lhs, rhs] = Node::as<PointerOrReference>(node_lhs, node_rhs);
if(lhs.is_pointer != rhs.is_pointer) {
return CompareFailReason::DESCRIPTOR;
}
if(compare_nodes_and_merge(result, *lhs.value_type.get(), *rhs.value_type.get(), database)) {
return result;
}
break;
}
case POINTER_TO_DATA_MEMBER: {
const auto [lhs, rhs] = Node::as<PointerToDataMember>(node_lhs, node_rhs);
if(compare_nodes_and_merge(result, *lhs.class_type.get(), *rhs.class_type.get(), database)) {
return result;
}
if(compare_nodes_and_merge(result, *lhs.member_type.get(), *rhs.member_type.get(), database)) {
return result;
}
break;
}
case STRUCT_OR_UNION: {
const auto [lhs, rhs] = Node::as<StructOrUnion>(node_lhs, node_rhs);
if(lhs.is_struct != rhs.is_struct) {
return CompareFailReason::DESCRIPTOR;
}
if(lhs.base_classes.size() != rhs.base_classes.size()) {
return CompareFailReason::BASE_CLASS_COUNT;
}
for(size_t i = 0; i < lhs.base_classes.size(); i++) {
if(compare_nodes_and_merge(result, *lhs.base_classes[i].get(), *rhs.base_classes[i].get(), database)) {
return result;
}
}
if(lhs.fields.size() != rhs.fields.size()) {
return CompareFailReason::FIELDS_SIZE;
}
for(size_t i = 0; i < lhs.fields.size(); i++) {
if(compare_nodes_and_merge(result, *lhs.fields[i].get(), *rhs.fields[i].get(), database)) {
return result;
}
}
if(lhs.member_functions.size() != rhs.member_functions.size()) {
return CompareFailReason::MEMBER_FUNCTION_COUNT;
}
for(size_t i = 0; i < lhs.member_functions.size(); i++) {
if(compare_nodes_and_merge(result, *lhs.member_functions[i].get(), *rhs.member_functions[i].get(), database)) {
return result;
}
}
break;
}
case TYPE_NAME: {
const auto [lhs, rhs] = Node::as<TypeName>(node_lhs, node_rhs);
// Don't check the source so that REFERENCE and CROSS_REFERENCE are
// treated as the same.
if(lhs.data_type_handle != rhs.data_type_handle) {
return CompareFailReason::TYPE_NAME;
}
const TypeName::UnresolvedStabs* lhs_unresolved_stabs = lhs.unresolved_stabs.get();
const TypeName::UnresolvedStabs* rhs_unresolved_stabs = rhs.unresolved_stabs.get();
if(lhs_unresolved_stabs && rhs_unresolved_stabs) {
if(lhs_unresolved_stabs->type_name != rhs_unresolved_stabs->type_name) {
return CompareFailReason::TYPE_NAME;
}
} else if(lhs_unresolved_stabs || rhs_unresolved_stabs) {
return CompareFailReason::TYPE_NAME;
}
break;
}
}
return result;
}
static bool compare_nodes_and_merge(
CompareResult& dest, const Node& node_lhs, const Node& node_rhs, const SymbolDatabase* database)
{
CompareResult result = compare_nodes(node_lhs, node_rhs, database, true);
if(database) {
if(result.type == CompareResultType::DIFFERS && try_to_match_wobbly_typedefs(node_lhs, node_rhs, *database)) {
result.type = CompareResultType::MATCHES_FAVOUR_LHS;
} else if(result.type == CompareResultType::DIFFERS && try_to_match_wobbly_typedefs(node_rhs, node_lhs, *database)) {
result.type = CompareResultType::MATCHES_FAVOUR_RHS;
}
}
if(dest.type != result.type) {
if(dest.type == CompareResultType::DIFFERS || result.type == CompareResultType::DIFFERS) {
// If any of the inner types differ, the outer type does too.
dest.type = CompareResultType::DIFFERS;
} else if(dest.type == CompareResultType::MATCHES_CONFUSED || result.type == CompareResultType::MATCHES_CONFUSED) {
// Propagate confusion.
dest.type = CompareResultType::MATCHES_CONFUSED;
} else if(dest.type == CompareResultType::MATCHES_FAVOUR_LHS && result.type == CompareResultType::MATCHES_FAVOUR_RHS) {
// One of the results favours the LHS node and the other favours the
// RHS node so we are confused.
dest.type = CompareResultType::MATCHES_CONFUSED;
} else if(dest.type == CompareResultType::MATCHES_FAVOUR_RHS && result.type == CompareResultType::MATCHES_FAVOUR_LHS) {
// One of the results favours the LHS node and the other favours the
// RHS node so we are confused.
dest.type = CompareResultType::MATCHES_CONFUSED;
} else if(dest.type == CompareResultType::MATCHES_FAVOUR_LHS || result.type == CompareResultType::MATCHES_FAVOUR_LHS) {
// One of the results favours the LHS node and the other is neutral
// so go with the LHS node.
dest.type = CompareResultType::MATCHES_FAVOUR_LHS;
} else if(dest.type == CompareResultType::MATCHES_FAVOUR_RHS || result.type == CompareResultType::MATCHES_FAVOUR_RHS) {
// One of the results favours the RHS node and the other is neutral
// so go with the RHS node.
dest.type = CompareResultType::MATCHES_FAVOUR_RHS;
}
}
if(dest.fail_reason == CompareFailReason::NONE) {
dest.fail_reason = result.fail_reason;
}
return dest.type == CompareResultType::DIFFERS;
}
static bool try_to_match_wobbly_typedefs(
const Node& type_name_node, const Node& raw_node, const SymbolDatabase& database)
{
// Detect if one side has a typedef when the other just has the plain type.
// This was previously a common reason why type deduplication would fail.
if(type_name_node.descriptor != TYPE_NAME) {
return false;
}
const TypeName& type_name = type_name_node.as<TypeName>();
if(const TypeName::UnresolvedStabs* unresolved_stabs = type_name.unresolved_stabs.get()) {
if(unresolved_stabs->referenced_file_handle == (u32) -1 || !unresolved_stabs->stabs_type_number.valid()) {
return false;
}
const SourceFile* source_file =
database.source_files.symbol_from_handle(unresolved_stabs->referenced_file_handle);
CCC_ASSERT(source_file);
auto handle = source_file->stabs_type_number_to_handle.find(unresolved_stabs->stabs_type_number);
if(handle != source_file->stabs_type_number_to_handle.end()) {
const DataType* referenced_type = database.data_types.symbol_from_handle(handle->second);
CCC_ASSERT(referenced_type && referenced_type->type());
// Don't compare 'intrusive' fields e.g. the offset.
CompareResult new_result = compare_nodes(*referenced_type->type(), raw_node, &database, false);
if(new_result.type != CompareResultType::DIFFERS) {
return true;
}
}
}
return false;
}
const char* compare_fail_reason_to_string(CompareFailReason reason)
{
switch(reason) {
case CompareFailReason::NONE: return "error";
case CompareFailReason::DESCRIPTOR: return "descriptor";
case CompareFailReason::STORAGE_CLASS: return "storage class";
case CompareFailReason::NAME: return "name";
case CompareFailReason::RELATIVE_OFFSET_BYTES: return "relative offset";
case CompareFailReason::ABSOLUTE_OFFSET_BYTES: return "absolute offset";
case CompareFailReason::BITFIELD_OFFSET_BITS: return "bitfield offset";
case CompareFailReason::SIZE_BITS: return "size";
case CompareFailReason::CONSTNESS: return "constness";
case CompareFailReason::ARRAY_ELEMENT_COUNT: return "array element count";
case CompareFailReason::BUILTIN_CLASS: return "builtin class";
case CompareFailReason::FUNCTION_RETURN_TYPE_HAS_VALUE: return "function return type has value";
case CompareFailReason::FUNCTION_PARAMAETER_COUNT: return "function paramaeter count";
case CompareFailReason::FUNCTION_PARAMETERS_HAS_VALUE: return "function parameter";
case CompareFailReason::FUNCTION_MODIFIER: return "function modifier";
case CompareFailReason::ENUM_CONSTANTS: return "enum constant";
case CompareFailReason::BASE_CLASS_COUNT: return "base class count";
case CompareFailReason::FIELDS_SIZE: return "fields size";
case CompareFailReason::MEMBER_FUNCTION_COUNT: return "member function count";
case CompareFailReason::VTABLE_GLOBAL: return "vtable global";
case CompareFailReason::TYPE_NAME: return "type name";
case CompareFailReason::VARIABLE_CLASS: return "variable class";
case CompareFailReason::VARIABLE_TYPE: return "variable type";
case CompareFailReason::VARIABLE_STORAGE: return "variable storage";
case CompareFailReason::VARIABLE_BLOCK: return "variable block";
}
return "";
}
const char* node_type_to_string(const Node& node)
{
switch(node.descriptor) {
case ARRAY: return "array";
case BITFIELD: return "bitfield";
case BUILTIN: return "builtin";
case ENUM: return "enum";
case ERROR_NODE: return "error";
case FUNCTION: return "function";
case POINTER_OR_REFERENCE: {
const PointerOrReference& pointer_or_reference = node.as<PointerOrReference>();
if(pointer_or_reference.is_pointer) {
return "pointer";
} else {
return "reference";
}
}
case POINTER_TO_DATA_MEMBER: return "pointer_to_data_member";
case STRUCT_OR_UNION: {
const StructOrUnion& struct_or_union = node.as<StructOrUnion>();
if(struct_or_union.is_struct) {
return "struct";
} else {
return "union";
}
}
case TYPE_NAME: return "type_name";
}
return "";
}
const char* storage_class_to_string(StorageClass storage_class)
{
switch(storage_class) {
case STORAGE_CLASS_NONE: return "none";
case STORAGE_CLASS_TYPEDEF: return "typedef";
case STORAGE_CLASS_EXTERN: return "extern";
case STORAGE_CLASS_STATIC: return "static";
case STORAGE_CLASS_AUTO: return "auto";
case STORAGE_CLASS_REGISTER: return "register";
}
return "";
}
const char* access_specifier_to_string(AccessSpecifier specifier)
{
switch(specifier) {
case AS_PUBLIC: return "public";
case AS_PROTECTED: return "protected";
case AS_PRIVATE: return "private";
}
return "";
}
const char* builtin_class_to_string(BuiltInClass bclass)
{
switch(bclass) {
case BuiltInClass::VOID_TYPE: return "void";
case BuiltInClass::UNSIGNED_8: return "8-bit unsigned integer";
case BuiltInClass::SIGNED_8: return "8-bit signed integer";
case BuiltInClass::UNQUALIFIED_8: return "8-bit integer";
case BuiltInClass::BOOL_8: return "8-bit boolean";
case BuiltInClass::UNSIGNED_16: return "16-bit unsigned integer";
case BuiltInClass::SIGNED_16: return "16-bit signed integer";
case BuiltInClass::UNSIGNED_32: return "32-bit unsigned integer";
case BuiltInClass::SIGNED_32: return "32-bit signed integer";
case BuiltInClass::FLOAT_32: return "32-bit floating point";
case BuiltInClass::UNSIGNED_64: return "64-bit unsigned integer";
case BuiltInClass::SIGNED_64: return "64-bit signed integer";
case BuiltInClass::FLOAT_64: return "64-bit floating point";
case BuiltInClass::UNSIGNED_128: return "128-bit unsigned integer";
case BuiltInClass::SIGNED_128: return "128-bit signed integer";
case BuiltInClass::UNQUALIFIED_128: return "128-bit integer";
case BuiltInClass::FLOAT_128: return "128-bit floating point";
}
return "";
}
s32 builtin_class_size(BuiltInClass bclass)
{
switch(bclass) {
case BuiltInClass::VOID_TYPE: return 0;
case BuiltInClass::UNSIGNED_8: return 1;
case BuiltInClass::SIGNED_8: return 1;
case BuiltInClass::UNQUALIFIED_8: return 1;
case BuiltInClass::BOOL_8: return 1;
case BuiltInClass::UNSIGNED_16: return 2;
case BuiltInClass::SIGNED_16: return 2;
case BuiltInClass::UNSIGNED_32: return 4;
case BuiltInClass::SIGNED_32: return 4;
case BuiltInClass::FLOAT_32: return 4;
case BuiltInClass::UNSIGNED_64: return 8;
case BuiltInClass::SIGNED_64: return 8;
case BuiltInClass::FLOAT_64: return 8;
case BuiltInClass::UNSIGNED_128: return 16;
case BuiltInClass::SIGNED_128: return 16;
case BuiltInClass::UNQUALIFIED_128: return 16;
case BuiltInClass::FLOAT_128: return 16;
}
return 0;
}
}

377
3rdparty/ccc/src/ccc/ast.h vendored Normal file
View File

@@ -0,0 +1,377 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "symbol_database.h"
namespace ccc::ast {
enum NodeDescriptor : u8 {
ARRAY,
BITFIELD,
BUILTIN,
ENUM,
ERROR_NODE,
FUNCTION,
POINTER_OR_REFERENCE,
POINTER_TO_DATA_MEMBER,
STRUCT_OR_UNION,
TYPE_NAME
};
enum AccessSpecifier {
AS_PUBLIC = 0,
AS_PROTECTED = 1,
AS_PRIVATE = 2
};
// To add a new type of node:
// 1. Add it to the NodeDescriptor enum.
// 2. Create a struct for it.
// 3. Add support for it in for_each_node.
// 4. Add support for it in compute_size_bytes_recursive.
// 5. Add support for it in compare_nodes.
// 6. Add support for it in node_type_to_string.
// 7. Add support for it in CppPrinter::ast_node.
// 8. Add support for it in write_json.
// 9. Add support for it in refine_node.
struct Node {
const NodeDescriptor descriptor;
u8 is_const : 1 = false;
u8 is_volatile : 1 = false;
u8 is_virtual_base_class : 1 = false;
u8 is_vtable_pointer : 1 = false;
u8 is_constructor_or_destructor : 1 = false;
u8 is_special_member_function : 1 = false;
u8 is_operator_member_function : 1 = false;
u8 cannot_compute_size : 1 = false;
u8 storage_class : 4 = STORAGE_CLASS_NONE;
u8 access_specifier : 2 = AS_PUBLIC;
s32 size_bytes = -1;
// If the name isn't populated for a given node, the name from the last
// ancestor to have one should be used i.e. when processing the tree you
// should pass the name down.
std::string name;
s32 offset_bytes = -1; // Offset relative to start of last inline struct/union.
s32 size_bits = -1; // Size stored in the .mdebug symbol table, may not be set.
Node(NodeDescriptor d) : descriptor(d) {}
Node(const Node& rhs) = default;
virtual ~Node() {}
template <typename SubType>
SubType& as() {
CCC_ASSERT(descriptor == SubType::DESCRIPTOR);
return *static_cast<SubType*>(this);
}
template <typename SubType>
const SubType& as() const {
CCC_ASSERT(descriptor == SubType::DESCRIPTOR);
return *static_cast<const SubType*>(this);
}
template <typename SubType>
static std::pair<const SubType&, const SubType&> as(const Node& lhs, const Node& rhs) {
CCC_ASSERT(lhs.descriptor == SubType::DESCRIPTOR && rhs.descriptor == SubType::DESCRIPTOR);
return std::pair<const SubType&, const SubType&>(static_cast<const SubType&>(lhs), static_cast<const SubType&>(rhs));
}
void set_access_specifier(AccessSpecifier specifier, u32 importer_flags);
// If this node is a type name, repeatedly resolve it to the type it's
// referencing, otherwise return (this, nullptr).
std::pair<Node*, DataType*> physical_type(SymbolDatabase& database, s32 max_depth = 100);
std::pair<const Node*, const DataType*> physical_type(const SymbolDatabase& database, s32 max_depth = 100) const;
};
struct Array : Node {
std::unique_ptr<Node> element_type;
s32 element_count = -1;
Array() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = ARRAY;
};
struct BitField : Node {
s32 bitfield_offset_bits = -1; // Offset relative to the last byte (not the position of the underlying type!).
std::unique_ptr<Node> underlying_type;
BitField() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = BITFIELD;
};
enum class BuiltInClass {
VOID_TYPE,
UNSIGNED_8, SIGNED_8, UNQUALIFIED_8, BOOL_8,
UNSIGNED_16, SIGNED_16,
UNSIGNED_32, SIGNED_32, FLOAT_32,
UNSIGNED_64, SIGNED_64, FLOAT_64,
UNSIGNED_128, SIGNED_128, UNQUALIFIED_128, FLOAT_128
};
struct BuiltIn : Node {
BuiltInClass bclass = BuiltInClass::VOID_TYPE;
BuiltIn() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = BUILTIN;
};
struct Enum : Node {
std::vector<std::pair<s32, std::string>> constants;
Enum() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = ENUM;
};
struct Error : Node {
std::string message;
Error() : Node(ERROR_NODE) {}
static const constexpr NodeDescriptor DESCRIPTOR = ERROR_NODE;
};
enum class MemberFunctionModifier {
NONE,
STATIC,
VIRTUAL
};
const char* member_function_modifier_to_string(MemberFunctionModifier modifier);
struct Function : Node {
std::optional<std::unique_ptr<Node>> return_type;
std::optional<std::vector<std::unique_ptr<Node>>> parameters;
MemberFunctionModifier modifier = MemberFunctionModifier::NONE;
s32 vtable_index = -1;
FunctionHandle definition_handle; // Filled in by fill_in_pointers_to_member_function_definitions.
Function() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = FUNCTION;
};
struct PointerOrReference : Node {
bool is_pointer = true;
std::unique_ptr<Node> value_type;
PointerOrReference() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = POINTER_OR_REFERENCE;
};
struct PointerToDataMember : Node {
std::unique_ptr<Node> class_type;
std::unique_ptr<Node> member_type;
PointerToDataMember() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = POINTER_TO_DATA_MEMBER;
};
struct StructOrUnion : Node {
bool is_struct = true;
std::vector<std::unique_ptr<Node>> base_classes;
std::vector<std::unique_ptr<Node>> fields;
std::vector<std::unique_ptr<Node>> member_functions;
StructOrUnion() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = STRUCT_OR_UNION;
struct FlatField {
// The field itself.
const Node* node;
// The symbol that owns the node.
const DataType* symbol;
// Offset of the innermost enclosing base class in the object.
s32 base_offset = 0;
};
// Generate a flat list of all the fields in this class as well as all the
// base classes recursively, but only until the max_fields or max_depth
// limits are reached. Return true if all the fields were enumerated.
bool flatten_fields(
std::vector<FlatField>& output,
const DataType* symbol,
const SymbolDatabase& database,
bool skip_statics,
s32 base_offset = 0,
s32 max_fields = 100000,
s32 max_depth = 100) const;
};
enum class TypeNameSource : u8 {
REFERENCE, // A STABS type reference.
CROSS_REFERENCE, // A STABS cross reference.
UNNAMED_THIS // A this parameter (or return type) referencing an unnamed type.
};
const char* type_name_source_to_string(TypeNameSource source);
enum class ForwardDeclaredType {
STRUCT,
UNION,
ENUM // Should be illegal but STABS supports cross references to enums so it's here.
};
const char* forward_declared_type_to_string(ForwardDeclaredType type);
struct TypeName : Node {
DataTypeHandle data_type_handle;
TypeNameSource source = TypeNameSource::REFERENCE;
bool is_forward_declared = false;
DataTypeHandle data_type_handle_unless_forward_declared() const;
struct UnresolvedStabs {
std::string type_name;
SourceFileHandle referenced_file_handle;
StabsTypeNumber stabs_type_number;
std::optional<ForwardDeclaredType> type;
};
std::unique_ptr<UnresolvedStabs> unresolved_stabs;
TypeName() : Node(DESCRIPTOR) {}
static const constexpr NodeDescriptor DESCRIPTOR = TYPE_NAME;
};
enum class CompareResultType {
MATCHES_NO_SWAP, // Both lhs and rhs are identical.
MATCHES_CONFUSED, // Both lhs and rhs are almost identical, and we don't which is better.
MATCHES_FAVOUR_LHS, // Both lhs and rhs are almost identical, but lhs is better.
MATCHES_FAVOUR_RHS, // Both lhs and rhs are almost identical, but rhs is better.
DIFFERS, // The two nodes differ substantially.
};
enum class CompareFailReason {
NONE,
DESCRIPTOR,
STORAGE_CLASS,
NAME,
RELATIVE_OFFSET_BYTES,
ABSOLUTE_OFFSET_BYTES,
BITFIELD_OFFSET_BITS,
SIZE_BITS,
CONSTNESS,
ARRAY_ELEMENT_COUNT,
BUILTIN_CLASS,
FUNCTION_RETURN_TYPE_HAS_VALUE,
FUNCTION_PARAMAETER_COUNT,
FUNCTION_PARAMETERS_HAS_VALUE,
FUNCTION_MODIFIER,
ENUM_CONSTANTS,
BASE_CLASS_COUNT,
FIELDS_SIZE,
MEMBER_FUNCTION_COUNT,
VTABLE_GLOBAL,
TYPE_NAME,
VARIABLE_CLASS,
VARIABLE_TYPE,
VARIABLE_STORAGE,
VARIABLE_BLOCK
};
struct CompareResult {
CompareResult(CompareResultType type) : type(type), fail_reason(CompareFailReason::NONE) {}
CompareResult(CompareFailReason reason) : type(CompareResultType::DIFFERS), fail_reason(reason) {}
CompareResultType type;
CompareFailReason fail_reason;
};
// Compare two AST nodes and their children recursively. This will only check
// fields that will be equal for two versions of the same type from different
// translation units.
CompareResult compare_nodes(const Node& lhs, const Node& rhs, const SymbolDatabase* database, bool check_intrusive_fields);
const char* compare_fail_reason_to_string(CompareFailReason reason);
const char* node_type_to_string(const Node& node);
const char* storage_class_to_string(StorageClass storage_class);
const char* access_specifier_to_string(AccessSpecifier specifier);
const char* builtin_class_to_string(BuiltInClass bclass);
s32 builtin_class_size(BuiltInClass bclass);
enum TraversalOrder {
PREORDER_TRAVERSAL,
POSTORDER_TRAVERSAL
};
enum ExplorationMode {
EXPLORE_CHILDREN,
DONT_EXPLORE_CHILDREN
};
template <typename ThisNode, typename Callback>
void for_each_node(ThisNode& node, TraversalOrder order, Callback callback)
{
if(order == PREORDER_TRAVERSAL && callback(node) == DONT_EXPLORE_CHILDREN) {
return;
}
switch(node.descriptor) {
case ARRAY: {
auto& array = node.template as<Array>();
for_each_node(*array.element_type.get(), order, callback);
break;
}
case BITFIELD: {
auto& bitfield = node.template as<BitField>();
for_each_node(*bitfield.underlying_type.get(), order, callback);
break;
}
case BUILTIN: {
break;
}
case ENUM: {
break;
}
case ERROR_NODE: {
break;
}
case FUNCTION: {
auto& func = node.template as<Function>();
if(func.return_type.has_value()) {
for_each_node(*func.return_type->get(), order, callback);
}
if(func.parameters.has_value()) {
for(auto& child : *func.parameters) {
for_each_node(*child.get(), order, callback);
}
}
break;
}
case POINTER_OR_REFERENCE: {
auto& pointer_or_reference = node.template as<PointerOrReference>();
for_each_node(*pointer_or_reference.value_type.get(), order, callback);
break;
}
case POINTER_TO_DATA_MEMBER: {
auto& pointer = node.template as<PointerToDataMember>();
for_each_node(*pointer.class_type.get(), order, callback);
for_each_node(*pointer.member_type.get(), order, callback);
break;
}
case STRUCT_OR_UNION: {
auto& struct_or_union = node.template as<StructOrUnion>();
for(auto& child : struct_or_union.base_classes) {
for_each_node(*child.get(), order, callback);
}
for(auto& child : struct_or_union.fields) {
for_each_node(*child.get(), order, callback);
}
for(auto& child : struct_or_union.member_functions) {
for_each_node(*child.get(), order, callback);
}
break;
}
case TYPE_NAME: {
break;
}
}
if(order == POSTORDER_TRAVERSAL) {
callback(node);
}
}
}

128
3rdparty/ccc/src/ccc/elf.cpp vendored Normal file
View File

@@ -0,0 +1,128 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "elf.h"
namespace ccc {
Result<ElfFile> ElfFile::parse(std::vector<u8> image)
{
ElfFile elf;
elf.image = std::move(image);
const ElfIdentHeader* ident = get_unaligned<ElfIdentHeader>(elf.image, 0);
CCC_CHECK(ident, "ELF ident header out of range.");
CCC_CHECK(ident->magic == CCC_FOURCC("\x7f\x45\x4c\x46"), "Not an ELF file.");
CCC_CHECK(ident->e_class == ElfIdentClass::B32, "Wrong ELF class (not 32 bit).");
const ElfFileHeader* header = get_unaligned<ElfFileHeader>(elf.image, sizeof(ElfIdentHeader));
CCC_CHECK(header, "ELF file header out of range.");
elf.file_header = *header;
const ElfSectionHeader* shstr_section_header =
get_unaligned<ElfSectionHeader>(elf.image, header->shoff + header->shstrndx * sizeof(ElfSectionHeader));
CCC_CHECK(shstr_section_header, "ELF section name header out of range.");
for(u32 i = 0; i < header->shnum; i++) {
u64 header_offset = header->shoff + i * sizeof(ElfSectionHeader);
const ElfSectionHeader* section_header = get_unaligned<ElfSectionHeader>(elf.image, header_offset);
CCC_CHECK(section_header, "ELF section header out of range.");
std::optional<std::string_view> name = get_string(elf.image, shstr_section_header->offset + section_header->name);
CCC_CHECK(name.has_value(), "ELF section name out of range.");
ElfSection& section = elf.sections.emplace_back();
section.name = *name;
section.header = *section_header;
}
for(u32 i = 0; i < header->phnum; i++) {
u64 header_offset = header->phoff + i * sizeof(ElfProgramHeader);
const ElfProgramHeader* program_header = get_unaligned<ElfProgramHeader>(elf.image, header_offset);
CCC_CHECK(program_header, "ELF program header out of range.");
elf.segments.emplace_back(*program_header);
}
return elf;
}
Result<void> ElfFile::create_section_symbols(
SymbolDatabase& database, const SymbolGroup& group) const
{
for(const ElfSection& section : sections) {
Address address = Address::non_zero(section.header.addr);
Result<Section*> symbol = database.sections.create_symbol(
section.name, address, group.source, group.module_symbol);
CCC_RETURN_IF_ERROR(symbol);
(*symbol)->set_size(section.header.size);
}
return Result<void>();
}
const ElfSection* ElfFile::lookup_section(const char* name) const
{
for(const ElfSection& section : sections) {
if(section.name == name) {
return &section;
}
}
return nullptr;
}
std::optional<u32> ElfFile::file_offset_to_virtual_address(u32 file_offset) const
{
for(const ElfProgramHeader& segment : segments) {
if(file_offset >= segment.offset && file_offset < segment.offset + segment.filesz) {
return segment.vaddr + file_offset - segment.offset;
}
}
return std::nullopt;
}
const ElfProgramHeader* ElfFile::entry_point_segment() const
{
const ccc::ElfProgramHeader* entry_segment = nullptr;
for(const ccc::ElfProgramHeader& segment : segments) {
if(file_header.entry >= segment.vaddr && file_header.entry < segment.vaddr + segment.filesz) {
entry_segment = &segment;
}
}
return entry_segment;
}
std::optional<std::span<const u8>> ElfFile::get_virtual(u32 address, u32 size) const
{
u32 end_address = address + size;
if(end_address >= address) {
for(const ElfProgramHeader& segment : segments) {
if(address >= segment.vaddr && end_address <= segment.vaddr + segment.filesz) {
size_t begin_offset = segment.offset + (address - segment.vaddr);
size_t end_offset = begin_offset + size;
if(begin_offset <= image.size() && end_offset <= image.size()) {
return std::span<const u8>(image.data() + begin_offset, image.data() + end_offset);
}
}
}
}
return std::nullopt;
}
bool ElfFile::copy_virtual(u8* dest, u32 address, u32 size) const
{
std::optional<std::span<const u8>> block = get_virtual(address, size);
if(!block.has_value()) {
return false;
}
memcpy(dest, block->data(), size);
return true;
}
}

160
3rdparty/ccc/src/ccc/elf.h vendored Normal file
View File

@@ -0,0 +1,160 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "symbol_database.h"
namespace ccc {
enum class ElfIdentClass : u8 {
B32 = 0x1,
B64 = 0x2
};
CCC_PACKED_STRUCT(ElfIdentHeader,
/* 0x0 */ u32 magic; // 7f 45 4c 46
/* 0x4 */ ElfIdentClass e_class;
/* 0x5 */ u8 endianess;
/* 0x6 */ u8 version;
/* 0x7 */ u8 os_abi;
/* 0x8 */ u8 abi_version;
/* 0x9 */ u8 pad[7];
)
enum class ElfFileType : u16 {
NONE = 0x00,
REL = 0x01,
EXEC = 0x02,
DYN = 0x03,
CORE = 0x04,
LOOS = 0xfe00,
HIOS = 0xfeff,
LOPROC = 0xff00,
HIPROC = 0xffff
};
enum class ElfMachine : u16 {
MIPS = 0x08
};
CCC_PACKED_STRUCT(ElfFileHeader,
/* 0x10 */ ElfFileType type;
/* 0x12 */ ElfMachine machine;
/* 0x14 */ u32 version;
/* 0x18 */ u32 entry;
/* 0x1c */ u32 phoff;
/* 0x20 */ u32 shoff;
/* 0x24 */ u32 flags;
/* 0x28 */ u16 ehsize;
/* 0x2a */ u16 phentsize;
/* 0x2c */ u16 phnum;
/* 0x2e */ u16 shentsize;
/* 0x30 */ u16 shnum;
/* 0x32 */ u16 shstrndx;
)
enum class ElfSectionType : u32 {
NULL_SECTION = 0x0,
PROGBITS = 0x1,
SYMTAB = 0x2,
STRTAB = 0x3,
RELA = 0x4,
HASH = 0x5,
DYNAMIC = 0x6,
NOTE = 0x7,
NOBITS = 0x8,
REL = 0x9,
SHLIB = 0xa,
DYNSYM = 0xb,
INIT_ARRAY = 0xe,
FINI_ARRAY = 0xf,
PREINIT_ARRAY = 0x10,
GROUP = 0x11,
SYMTAB_SHNDX = 0x12,
NUM = 0x13,
LOOS = 0x60000000,
MIPS_DEBUG = 0x70000005
};
CCC_PACKED_STRUCT(ElfSectionHeader,
/* 0x00 */ u32 name;
/* 0x04 */ ElfSectionType type;
/* 0x08 */ u32 flags;
/* 0x0c */ u32 addr;
/* 0x10 */ u32 offset;
/* 0x14 */ u32 size;
/* 0x18 */ u32 link;
/* 0x1c */ u32 info;
/* 0x20 */ u32 addralign;
/* 0x24 */ u32 entsize;
)
struct ElfSection {
std::string name;
ElfSectionHeader header;
};
CCC_PACKED_STRUCT(ElfProgramHeader,
/* 0x00 */ u32 type;
/* 0x04 */ u32 offset;
/* 0x08 */ u32 vaddr;
/* 0x0c */ u32 paddr;
/* 0x10 */ u32 filesz;
/* 0x14 */ u32 memsz;
/* 0x18 */ u32 flags;
/* 0x1c */ u32 align;
)
struct ElfFile {
ElfFileHeader file_header;
std::vector<u8> image;
std::vector<ElfSection> sections;
std::vector<ElfProgramHeader> segments;
// Parse the ELF file header, section headers and program headers.
static Result<ElfFile> parse(std::vector<u8> image);
// Create a section object for each section header in the ELF file.
Result<void> create_section_symbols(SymbolDatabase& database, const SymbolGroup& group) const;
const ElfSection* lookup_section(const char* name) const;
std::optional<u32> file_offset_to_virtual_address(u32 file_offset) const;
// Find the program header for the segment that contains the entry point.
const ElfProgramHeader* entry_point_segment() const;
// Retrieve a block of data in an ELF file given its address and size.
std::optional<std::span<const u8>> get_virtual(u32 address, u32 size) const;
// Copy a block of data in an ELF file to the destination buffer given its
// address and size.
bool copy_virtual(u8* dest, u32 address, u32 size) const;
// Retrieve an object of type T from an ELF file given its address.
template <typename T>
std::optional<T> get_object_virtual(u32 address) const
{
std::optional<std::span<const u8>> result = get_virtual(address, sizeof(T));
if(!result.has_value()) {
return std::nullopt;
}
return *(T*) result->data();
}
// Retrieve an array of objects of type T from an ELF file given its
// address and element count.
template <typename T>
std::optional<std::span<const T>> get_array_virtual(u32 address, u32 element_count) const
{
std::optional<std::span<const u8>> result = get_virtual(address, element_count * sizeof(T));
if(!result.has_value()) {
return std::nullopt;
}
return std::span<const T>((T*) result->data(), (T*) (result->data() + result->size()));
}
};
}

214
3rdparty/ccc/src/ccc/elf_symtab.cpp vendored Normal file
View File

@@ -0,0 +1,214 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "elf_symtab.h"
#include "importer_flags.h"
namespace ccc::elf {
enum class SymbolBind : u8 {
LOCAL = 0,
GLOBAL = 1,
WEAK = 2,
NUM = 3,
GNU_UNIQUE = 10
};
enum class SymbolType : u8 {
NOTYPE = 0,
OBJECT = 1,
FUNC = 2,
SECTION = 3,
FILE = 4,
COMMON = 5,
TLS = 6,
NUM = 7,
GNU_IFUNC = 10
};
enum class SymbolVisibility {
DEFAULT = 0,
INTERNAL = 1,
HIDDEN = 2,
PROTECTED = 3
};
CCC_PACKED_STRUCT(Symbol,
/* 0x0 */ u32 name;
/* 0x4 */ u32 value;
/* 0x8 */ u32 size;
/* 0xc */ u8 info;
/* 0xd */ u8 other;
/* 0xe */ u16 shndx;
SymbolType type() const { return (SymbolType) (info & 0xf); }
SymbolBind bind() const { return (SymbolBind) (info >> 4); }
SymbolVisibility visibility() const { return (SymbolVisibility) (other & 0x3); }
)
static const char* symbol_bind_to_string(SymbolBind bind);
static const char* symbol_type_to_string(SymbolType type);
static const char* symbol_visibility_to_string(SymbolVisibility visibility);
Result<void> import_symbols(
SymbolDatabase& database,
const SymbolGroup& group,
std::span<const u8> symtab,
std::span<const u8> strtab,
u32 importer_flags,
DemanglerFunctions demangler)
{
for(u32 i = 0; i < symtab.size() / sizeof(Symbol); i++) {
const Symbol* symbol = get_unaligned<Symbol>(symtab, i * sizeof(Symbol));
CCC_ASSERT(symbol);
Address address;
if(symbol->value != 0) {
address = symbol->value;
}
if(!address.valid() || symbol->visibility() != SymbolVisibility::DEFAULT) {
continue;
}
if(!(importer_flags & DONT_DEDUPLICATE_SYMBOLS)) {
if(database.functions.first_handle_from_starting_address(address).valid()) {
continue;
}
if(database.global_variables.first_handle_from_starting_address(address).valid()) {
continue;
}
if(database.local_variables.first_handle_from_starting_address(address).valid()) {
continue;
}
}
std::optional<std::string_view> string_view = get_string(strtab, symbol->name);
CCC_CHECK(string_view.has_value(), "Symbol string out of range.");
std::string string(*string_view);
switch(symbol->type()) {
case SymbolType::NOTYPE: {
Result<Label*> label = database.labels.create_symbol(
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(label);
// These symbols get emitted at the same addresses as functions
// and aren't extremely useful, so we want to mark them to
// prevent them from possibly being used as function names.
(*label)->is_junk =
(*label)->name() == "__gnu_compiled_c" ||
(*label)->name() == "__gnu_compiled_cplusplus" ||
(*label)->name() == "gcc2_compiled.";
break;
}
case SymbolType::OBJECT: {
if(symbol->size != 0) {
Result<GlobalVariable*> global_variable = database.global_variables.create_symbol(
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(global_variable);
if(*global_variable) {
(*global_variable)->set_size(symbol->size);
}
} else {
Result<Label*> label = database.labels.create_symbol(
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(label);
}
break;
}
case SymbolType::FUNC: {
Result<Function*> function = database.functions.create_symbol(
std::move(string), group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(function);
if(*function) {
(*function)->set_size(symbol->size);
}
break;
}
case SymbolType::FILE: {
Result<SourceFile*> source_file = database.source_files.create_symbol(
std::move(string), group.source, group.module_symbol);
CCC_RETURN_IF_ERROR(source_file);
break;
}
default: {}
}
}
return Result<void>();
}
Result<void> print_symbol_table(FILE* out, std::span<const u8> symtab, std::span<const u8> strtab)
{
fprintf(out, "ELF SYMBOLS:\n");
fprintf(out, " Num: Value Size Type Bind Vis Ndx Name\n");
for(u32 i = 0; i < symtab.size() / sizeof(Symbol); i++) {
const Symbol* symbol = get_unaligned<Symbol>(symtab, i * sizeof(Symbol));
CCC_ASSERT(symbol);
const char* type = symbol_type_to_string(symbol->type());
const char* bind = symbol_bind_to_string(symbol->bind());
const char* visibility = symbol_visibility_to_string(symbol->visibility());
std::optional<std::string_view> string = get_string(strtab, symbol->name);
CCC_CHECK(string.has_value(), "Symbol string out of range.");
fprintf(out, "%6u: %08x %5u %-7s %-7s %-7s %3u %s\n",
i, symbol->value, symbol->size, type, bind, visibility, symbol->shndx, string->data());
}
return Result<void>();
}
static const char* symbol_bind_to_string(SymbolBind bind)
{
switch(bind) {
case SymbolBind::LOCAL: return "LOCAL";
case SymbolBind::GLOBAL: return "GLOBAL";
case SymbolBind::WEAK: return "WEAK";
case SymbolBind::NUM: return "NUM";
case SymbolBind::GNU_UNIQUE: return "GNU_UNIQUE";
}
return "ERROR";
}
static const char* symbol_type_to_string(SymbolType type)
{
switch(type) {
case SymbolType::NOTYPE: return "NOTYPE";
case SymbolType::OBJECT: return "OBJECT";
case SymbolType::FUNC: return "FUNC";
case SymbolType::SECTION: return "SECTION";
case SymbolType::FILE: return "FILE";
case SymbolType::COMMON: return "COMMON";
case SymbolType::TLS: return "TLS";
case SymbolType::NUM: return "NUM";
case SymbolType::GNU_IFUNC: return "GNU_IFUNC";
}
return "ERROR";
}
static const char* symbol_visibility_to_string(SymbolVisibility visibility)
{
switch(visibility) {
case SymbolVisibility::DEFAULT: return "DEFAULT";
case SymbolVisibility::INTERNAL: return "INTERNAL";
case SymbolVisibility::HIDDEN: return "HIDDEN";
case SymbolVisibility::PROTECTED: return "PROTECTED";
}
return "ERROR";
}
}

20
3rdparty/ccc/src/ccc/elf_symtab.h vendored Normal file
View File

@@ -0,0 +1,20 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "symbol_database.h"
namespace ccc::elf {
Result<void> import_symbols(
SymbolDatabase& database,
const SymbolGroup& group,
std::span<const u8> symtab,
std::span<const u8> strtab,
u32 importer_flags,
DemanglerFunctions demangler);
Result<void> print_symbol_table(FILE* out, std::span<const u8> symtab, std::span<const u8> strtab);
}

95
3rdparty/ccc/src/ccc/importer_flags.cpp vendored Normal file
View File

@@ -0,0 +1,95 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "importer_flags.h"
namespace ccc {
const std::vector<ImporterFlagInfo> IMPORTER_FLAGS = {
{DEMANGLE_PARAMETERS, "--demangle-parameters", {
"Include parameters in demangled function names."
}},
{DEMANGLE_RETURN_TYPE, "--demangle-return-type", {
"Include return types at the end of demangled",
"function names if they're available."
}},
{DONT_DEDUPLICATE_SYMBOLS, "--dont-deduplicate-symbols", {
"Do not deduplicate matching symbols from",
"different symbol tables. This options has no",
"effect on data types."
}},
{DONT_DEDUPLICATE_TYPES, "--dont-deduplicate-types", {
"Do not deduplicate data types from different",
"translation units."
}},
{DONT_DEMANGLE_NAMES, "--dont-demangle-names", {
"Do not demangle function names, global variable",
"names, or overloaded operator names."
}},
{INCLUDE_GENERATED_MEMBER_FUNCTIONS, "--include-generated-functions", {
"Output member functions that were likely",
"automatically generated by the compiler."
}},
{NO_ACCESS_SPECIFIERS, "--no-access-specifiers", {
"Do not print access specifiers."
}},
{NO_MEMBER_FUNCTIONS, "--no-member-functions", {
"Do not print member functions."
}},
{NO_OPTIMIZED_OUT_FUNCTIONS, "--no-optimized-out-functions", {
"Discard functions that were optimized out."
}},
{STRICT_PARSING, "--strict", {
"Make more types of errors fatal."
}},
{TYPEDEF_ALL_ENUMS, "--typedef-all-enums", {
"Force all emitted C++ enums to be defined using",
"a typedef. With STABS, it is not always possible",
"to determine if an enum was like this in the",
"original source code, so this option should be",
"useful for reverse engineering C projects."
}},
{TYPEDEF_ALL_STRUCTS, "--typedef-all-structs", {
"Force all emitted C++ structure types to be",
"defined using a typedef."
}},
{TYPEDEF_ALL_UNIONS, "--typedef-all-unions", {
"Force all emitted C++ union types to be defined",
"using a typedef."
}},
{UNIQUE_FUNCTIONS, "--unique-functions", {
" If multiple identical .mdebug function symbols",
"are present, find the one that seems to have",
"actually been included in the linked binary, and",
"remove the addresses from all the rest. Using",
"this importer flag in combination with",
"--no-optimized-out-functions will remove these",
"duplicate function symbols entirely."
}}
};
u32 parse_importer_flag(const char* argument)
{
for(const ImporterFlagInfo& flag : IMPORTER_FLAGS) {
if(strcmp(flag.argument, argument) == 0) {
return flag.flag;
}
}
return NO_IMPORTER_FLAGS;
}
void print_importer_flags_help(FILE* out)
{
for(const ImporterFlagInfo& flag : IMPORTER_FLAGS) {
fprintf(out, "\n");
fprintf(out, " %-29s ", flag.argument);
for(size_t i = 0; i < flag.help_text.size(); i++) {
if(i > 0) {
fprintf(out, " ");
}
fprintf(out, "%s\n", flag.help_text[i]);
}
}
}
}

39
3rdparty/ccc/src/ccc/importer_flags.h vendored Normal file
View File

@@ -0,0 +1,39 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "util.h"
namespace ccc {
enum ImporterFlags {
NO_IMPORTER_FLAGS = 0,
DEMANGLE_PARAMETERS = (1 << 0),
DEMANGLE_RETURN_TYPE = (1 << 1),
DONT_DEDUPLICATE_SYMBOLS = (1 << 2),
DONT_DEDUPLICATE_TYPES = (1 << 3),
DONT_DEMANGLE_NAMES = (1 << 4),
INCLUDE_GENERATED_MEMBER_FUNCTIONS = (1 << 5),
NO_ACCESS_SPECIFIERS = (1 << 6),
NO_MEMBER_FUNCTIONS = (1 << 7),
NO_OPTIMIZED_OUT_FUNCTIONS = (1 << 8),
STRICT_PARSING = (1 << 9),
TYPEDEF_ALL_ENUMS = (1 << 10),
TYPEDEF_ALL_STRUCTS = (1 << 11),
TYPEDEF_ALL_UNIONS = (1 << 12),
UNIQUE_FUNCTIONS = (1 << 13)
};
struct ImporterFlagInfo {
ImporterFlags flag;
const char* argument;
std::vector<const char*> help_text;
};
extern const std::vector<ImporterFlagInfo> IMPORTER_FLAGS;
u32 parse_importer_flag(const char* argument);
void print_importer_flags_help(FILE* out);
}

349
3rdparty/ccc/src/ccc/mdebug_analysis.cpp vendored Normal file
View File

@@ -0,0 +1,349 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "mdebug_analysis.h"
#include "stabs_to_ast.h"
namespace ccc::mdebug {
Result<void> LocalSymbolTableAnalyser::stab_magic(const char* magic)
{
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::source_file(const char* path, Address text_address)
{
if(m_next_relative_path.empty()) {
m_next_relative_path = m_source_file.command_line_path;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::data_type(const ParsedSymbol& symbol)
{
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(
*symbol.name_colon_type.type.get(), nullptr, m_stabs_to_ast_state, 0, false, false);
CCC_RETURN_IF_ERROR(node);
if(symbol.is_typedef && (*node)->descriptor == ast::STRUCT_OR_UNION) {
ast::StructOrUnion& struct_or_union = (*node)->as<ast::StructOrUnion>();
const std::string& name = symbol.name_colon_type.name;
StabsTypeNumber type_number = symbol.name_colon_type.type->type_number;
fix_recursively_emitted_structures(struct_or_union, name, type_number, m_stabs_to_ast_state.file_handle);
}
bool is_struct = (*node)->descriptor == ast::STRUCT_OR_UNION && (*node)->as<ast::StructOrUnion>().is_struct;
bool force_typedef =
((m_context.importer_flags & TYPEDEF_ALL_ENUMS) && (*node)->descriptor == ast::ENUM) ||
((m_context.importer_flags & TYPEDEF_ALL_STRUCTS) && (*node)->descriptor == ast::STRUCT_OR_UNION && is_struct) ||
((m_context.importer_flags & TYPEDEF_ALL_UNIONS) && (*node)->descriptor == ast::STRUCT_OR_UNION && !is_struct);
(*node)->name = (symbol.name_colon_type.name == " ") ? "" : symbol.name_colon_type.name;
if(symbol.is_typedef || force_typedef) {
(*node)->storage_class = STORAGE_CLASS_TYPEDEF;
}
const char* name = (*node)->name.c_str();
StabsTypeNumber number = symbol.name_colon_type.type->type_number;
if(m_context.importer_flags & DONT_DEDUPLICATE_TYPES) {
Result<DataType*> data_type = m_database.data_types.create_symbol(
name, m_context.group.source, m_context.group.module_symbol);
CCC_RETURN_IF_ERROR(data_type);
m_source_file.stabs_type_number_to_handle[number] = (*data_type)->handle();
(*data_type)->set_type(std::move(*node));
(*data_type)->files = {m_source_file.handle()};
} else {
Result<ccc::DataType*> type = m_database.create_data_type_if_unique(
std::move(*node), number, name, m_source_file, m_context.group);
CCC_RETURN_IF_ERROR(type);
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::global_variable(
const char* mangled_name, Address address, const StabsType& type, bool is_static, GlobalStorageLocation location)
{
Result<GlobalVariable*> global = m_database.global_variables.create_symbol(
mangled_name, m_context.group.source, m_context.group.module_symbol, address, m_context.importer_flags, m_context.demangler);
CCC_RETURN_IF_ERROR(global);
CCC_ASSERT(*global);
m_global_variables.emplace_back((*global)->handle());
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(type, nullptr, m_stabs_to_ast_state, 0, true, false);
CCC_RETURN_IF_ERROR(node);
if(is_static) {
(*global)->storage_class = STORAGE_CLASS_STATIC;
}
(*global)->set_type(std::move(*node));
(*global)->storage.location = location;
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::sub_source_file(const char* path, Address text_address)
{
if(m_current_function && m_state == IN_FUNCTION_BEGINNING) {
Function::SubSourceFile& sub = m_current_function->sub_source_files.emplace_back();
sub.address = text_address;
sub.relative_path = path;
} else {
m_next_relative_path = path;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::procedure(
const char* mangled_name, Address address, const ProcedureDescriptor* procedure_descriptor, bool is_static)
{
if(!m_current_function || strcmp(mangled_name, m_current_function->mangled_name().c_str()) != 0) {
Result<void> result = create_function(mangled_name, address);
CCC_RETURN_IF_ERROR(result);
}
if(is_static) {
m_current_function->storage_class = STORAGE_CLASS_STATIC;
}
if(procedure_descriptor) {
m_current_function->stack_frame_size = procedure_descriptor->frame_size;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::label(const char* label, Address address, s32 line_number)
{
if(address.valid() && m_current_function && label[0] == '$') {
Function::LineNumberPair& pair = m_current_function->line_numbers.emplace_back();
pair.address = address;
pair.line_number = line_number;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::text_end(const char* name, s32 function_size)
{
if(m_state == IN_FUNCTION_BEGINNING) {
CCC_CHECK(m_current_function, "END TEXT symbol outside of function.");
m_current_function->set_size(function_size);
m_state = IN_FUNCTION_END;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::function(const char* mangled_name, const StabsType& return_type, Address address)
{
if(!m_current_function || strcmp(mangled_name, m_current_function->mangled_name().c_str()) != 0) {
Result<void> result = create_function(mangled_name, address);
CCC_RETURN_IF_ERROR(result);
} else {
// For MTV Music Maker 2, the addresses for static functions stored in
// the PROC symbols are relative to the translation unit, while the
// addresses stored in the FUN symbol are absolute. This is the only
// game I've found that seems to have this problem, but since in all
// other cases it seems all these addresses are all absolute, I may as
// well add in a hack here to deal with it.
bool no_module_base_address = m_context.group.module_symbol && m_context.group.module_symbol->address().get_or_zero() == 0;
bool new_address_greater = address.valid() && address > m_current_function->address();
if(no_module_base_address && new_address_greater) {
m_database.functions.move_symbol(m_current_function->handle(), address);
}
}
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(return_type, nullptr, m_stabs_to_ast_state, 0, true, true);
CCC_RETURN_IF_ERROR(node);
m_current_function->set_type(std::move(*node));
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::function_end()
{
if(m_current_function) {
m_current_function->set_parameter_variables(std::move(m_current_parameter_variables), m_database);
m_current_function->set_local_variables(std::move(m_current_local_variables), m_database);
}
m_current_function = nullptr;
m_current_parameter_variables = std::vector<ParameterVariableHandle>();
m_current_local_variables = std::vector<LocalVariableHandle>();
m_blocks.clear();
m_pending_local_variables.clear();
m_state = NOT_IN_FUNCTION;
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::parameter(
const char* name, const StabsType& type, bool is_stack, s32 value, bool is_by_reference)
{
CCC_CHECK(m_current_function, "Parameter symbol before first func/proc symbol.");
Result<ParameterVariable*> parameter_variable = m_database.parameter_variables.create_symbol(
name, m_context.group.source, m_context.group.module_symbol);
CCC_RETURN_IF_ERROR(parameter_variable);
m_current_parameter_variables.emplace_back((*parameter_variable)->handle());
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(type, nullptr, m_stabs_to_ast_state, 0, true, true);
CCC_RETURN_IF_ERROR(node);
(*parameter_variable)->set_type(std::move(*node));
if(is_stack) {
StackStorage& stack_storage = (*parameter_variable)->storage.emplace<StackStorage>();
stack_storage.stack_pointer_offset = value;
} else {
RegisterStorage& register_storage = (*parameter_variable)->storage.emplace<RegisterStorage>();
register_storage.dbx_register_number = value;
register_storage.is_by_reference = is_by_reference;
}
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::local_variable(
const char* name, const StabsType& type, u32 value, StabsSymbolDescriptor desc, SymbolClass sclass)
{
if(!m_current_function) {
return Result<void>();
}
Address address = (desc == StabsSymbolDescriptor::STATIC_LOCAL_VARIABLE) ? value : Address();
Result<LocalVariable*> local_variable = m_database.local_variables.create_symbol(
name, address, m_context.group.source, m_context.group.module_symbol);
CCC_RETURN_IF_ERROR(local_variable);
m_current_local_variables.emplace_back((*local_variable)->handle());
m_pending_local_variables.emplace_back((*local_variable)->handle());
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(type, nullptr, m_stabs_to_ast_state, 0, true, false);
CCC_RETURN_IF_ERROR(node);
if(desc == StabsSymbolDescriptor::STATIC_LOCAL_VARIABLE) {
GlobalStorage& global_storage = (*local_variable)->storage.emplace<GlobalStorage>();
std::optional<GlobalStorageLocation> location_opt =
symbol_class_to_global_variable_location(sclass);
CCC_CHECK(location_opt.has_value(),
"Invalid static local variable location %s.",
symbol_class(sclass));
global_storage.location = *location_opt;
(*node)->storage_class = STORAGE_CLASS_STATIC;
} else if(desc == StabsSymbolDescriptor::REGISTER_VARIABLE) {
RegisterStorage& register_storage = (*local_variable)->storage.emplace<RegisterStorage>();
register_storage.dbx_register_number = (s32) value;
} else if(desc == StabsSymbolDescriptor::LOCAL_VARIABLE) {
StackStorage& stack_storage = (*local_variable)->storage.emplace<StackStorage>();
stack_storage.stack_pointer_offset = (s32) value;
} else {
return CCC_FAILURE("LocalSymbolTableAnalyser::local_variable() called with bad symbol descriptor.");
}
(*local_variable)->set_type(std::move(*node));
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::lbrac(s32 begin_offset)
{
for(LocalVariableHandle local_variable_handle : m_pending_local_variables) {
if(LocalVariable* local_variable = m_database.local_variables.symbol_from_handle(local_variable_handle)) {
local_variable->live_range.low = m_source_file.address().value + begin_offset;
}
}
m_blocks.emplace_back(std::move(m_pending_local_variables));
m_pending_local_variables = {};
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::rbrac(s32 end_offset)
{
CCC_CHECK(!m_blocks.empty(), "RBRAC symbol without a matching LBRAC symbol.");
std::vector<LocalVariableHandle>& variables = m_blocks.back();
for(LocalVariableHandle local_variable_handle : variables) {
if(LocalVariable* local_variable = m_database.local_variables.symbol_from_handle(local_variable_handle)) {
local_variable->live_range.high = m_source_file.address().value + end_offset;
}
}
m_blocks.pop_back();
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::finish()
{
CCC_CHECK(m_state != IN_FUNCTION_BEGINNING,
"Unexpected end of symbol table for '%s'.", m_source_file.name().c_str());
if(m_current_function) {
Result<void> result = function_end();
CCC_RETURN_IF_ERROR(result);
}
m_source_file.set_functions(std::move(m_functions), m_database);
m_source_file.set_global_variables(std::move(m_global_variables), m_database);
return Result<void>();
}
Result<void> LocalSymbolTableAnalyser::create_function(const char* mangled_name, Address address)
{
if(m_current_function) {
Result<void> result = function_end();
CCC_RETURN_IF_ERROR(result);
}
Result<Function*> function = m_database.functions.create_symbol(
mangled_name, m_context.group.source, m_context.group.module_symbol, address, m_context.importer_flags, m_context.demangler);
CCC_RETURN_IF_ERROR(function);
CCC_ASSERT(*function);
m_current_function = *function;
m_functions.emplace_back(m_current_function->handle());
m_state = IN_FUNCTION_BEGINNING;
if(!m_next_relative_path.empty() && m_current_function->relative_path != m_source_file.command_line_path) {
m_current_function->relative_path = m_next_relative_path;
}
return Result<void>();
}
std::optional<GlobalStorageLocation> symbol_class_to_global_variable_location(SymbolClass symbol_class)
{
std::optional<GlobalStorageLocation> location;
switch(symbol_class) {
case SymbolClass::NIL: location = GlobalStorageLocation::NIL; break;
case SymbolClass::DATA: location = GlobalStorageLocation::DATA; break;
case SymbolClass::BSS: location = GlobalStorageLocation::BSS; break;
case SymbolClass::ABS: location = GlobalStorageLocation::ABS; break;
case SymbolClass::SDATA: location = GlobalStorageLocation::SDATA; break;
case SymbolClass::SBSS: location = GlobalStorageLocation::SBSS; break;
case SymbolClass::RDATA: location = GlobalStorageLocation::RDATA; break;
case SymbolClass::COMMON: location = GlobalStorageLocation::COMMON; break;
case SymbolClass::SCOMMON: location = GlobalStorageLocation::SCOMMON; break;
case SymbolClass::SUNDEFINED: location = GlobalStorageLocation::SUNDEFINED; break;
default: {}
}
return location;
}
}

99
3rdparty/ccc/src/ccc/mdebug_analysis.h vendored Normal file
View File

@@ -0,0 +1,99 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "importer_flags.h"
#include "mdebug_section.h"
#include "mdebug_symbols.h"
#include "stabs.h"
#include "stabs_to_ast.h"
#include "symbol_database.h"
namespace ccc::mdebug {
struct AnalysisContext {
const mdebug::SymbolTableReader* reader = nullptr;
const std::map<u32, const mdebug::Symbol*>* external_functions = nullptr;
const std::map<std::string, const mdebug::Symbol*>* external_globals = nullptr;
SymbolGroup group;
u32 importer_flags = NO_IMPORTER_FLAGS;
DemanglerFunctions demangler;
};
class LocalSymbolTableAnalyser {
public:
LocalSymbolTableAnalyser(SymbolDatabase& database, const StabsToAstState& stabs_to_ast_state, const AnalysisContext& context, SourceFile& source_file)
: m_database(database)
, m_context(context)
, m_stabs_to_ast_state(stabs_to_ast_state)
, m_source_file(source_file) {}
// Functions for processing individual symbols.
//
// In most cases these symbols will appear in the following order:
// PROC TEXT
// ... line numbers ... ($LM<N>)
// END TEXT
// LABEL TEXT FUN
// ... parameters ...
// ... blocks ... (... local variables ... LBRAC ... subblocks ... RBRAC)
// NIL NIL FUN
//
// For some compiler versions the symbols can appear in this order:
// LABEL TEXT FUN
// ... parameters ...
// first line number ($LM1)
// PROC TEXT
// ... line numbers ... ($LM<N>)
// END TEXT
// ... blocks ... (... local variables ... LBRAC ... subblocks ... RBRAC)
Result<void> stab_magic(const char* magic);
Result<void> source_file(const char* path, Address text_address);
Result<void> data_type(const ParsedSymbol& symbol);
Result<void> global_variable(
const char* mangled_name, Address address, const StabsType& type, bool is_static, GlobalStorageLocation location);
Result<void> sub_source_file(const char* name, Address text_address);
Result<void> procedure(
const char* mangled_name, Address address, const ProcedureDescriptor* procedure_descriptor, bool is_static);
Result<void> label(const char* label, Address address, s32 line_number);
Result<void> text_end(const char* name, s32 function_size);
Result<void> function(const char* mangled_name, const StabsType& return_type, Address address);
Result<void> function_end();
Result<void> parameter(
const char* name, const StabsType& type, bool is_stack, s32 value, bool is_by_reference);
Result<void> local_variable(
const char* name, const StabsType& type, u32 value, StabsSymbolDescriptor desc, SymbolClass sclass);
Result<void> lbrac(s32 begin_offset);
Result<void> rbrac(s32 end_offset);
Result<void> finish();
Result<void> create_function(const char* mangled_name, Address address);
protected:
enum AnalysisState {
NOT_IN_FUNCTION,
IN_FUNCTION_BEGINNING,
IN_FUNCTION_END
};
SymbolDatabase& m_database;
const AnalysisContext& m_context;
const StabsToAstState& m_stabs_to_ast_state;
AnalysisState m_state = NOT_IN_FUNCTION;
SourceFile& m_source_file;
std::vector<FunctionHandle> m_functions;
std::vector<GlobalVariableHandle> m_global_variables;
Function* m_current_function = nullptr;
std::vector<ParameterVariableHandle> m_current_parameter_variables;
std::vector<LocalVariableHandle> m_current_local_variables;
std::vector<std::vector<LocalVariableHandle>> m_blocks;
std::vector<LocalVariableHandle> m_pending_local_variables;
std::string m_next_relative_path;
};
std::optional<GlobalStorageLocation> symbol_class_to_global_variable_location(SymbolClass symbol_class);
};

668
3rdparty/ccc/src/ccc/mdebug_importer.cpp vendored Normal file
View File

@@ -0,0 +1,668 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "mdebug_importer.h"
namespace ccc::mdebug {
static Result<void> resolve_type_names(
SymbolDatabase& database, const SymbolGroup& group, u32 importer_flags);
static Result<void> resolve_type_name(
ast::TypeName& type_name,
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags);
static void compute_size_bytes(ast::Node& node, SymbolDatabase& database);
static void detect_duplicate_functions(SymbolDatabase& database, const SymbolGroup& group);
static void detect_fake_functions(SymbolDatabase& database, const std::map<u32, const mdebug::Symbol*>& external_functions, const SymbolGroup& group);
static void destroy_optimized_out_functions(
SymbolDatabase& database, const SymbolGroup& group);
Result<void> import_symbol_table(
SymbolDatabase& database,
std::span<const u8> elf,
s32 section_offset,
const SymbolGroup& group,
u32 importer_flags,
const DemanglerFunctions& demangler,
const std::atomic_bool* interrupt)
{
SymbolTableReader reader;
Result<void> reader_result = reader.init(elf, section_offset);
CCC_RETURN_IF_ERROR(reader_result);
Result<std::vector<mdebug::Symbol>> external_symbols = reader.parse_external_symbols();
CCC_RETURN_IF_ERROR(external_symbols);
// The addresses of the global variables aren't present in the local symbol
// table, so here we extract them from the external table. In addition, for
// some games we need to cross reference the function symbols in the local
// symbol table with the entries in the external symbol table.
std::map<u32, const mdebug::Symbol*> external_functions;
std::map<std::string, const mdebug::Symbol*> external_globals;
for(const mdebug::Symbol& external : *external_symbols) {
if(external.symbol_type == mdebug::SymbolType::PROC) {
external_functions[external.value] = &external;
}
if(external.symbol_type == mdebug::SymbolType::GLOBAL
&& (external.symbol_class != mdebug::SymbolClass::UNDEFINED)) {
external_globals[external.string] = &external;
}
}
// Bundle together some unchanging state to pass to import_files.
AnalysisContext context;
context.reader = &reader;
context.external_functions = &external_functions;
context.external_globals = &external_globals;
context.group = group;
context.importer_flags = importer_flags;
context.demangler = demangler;
Result<void> result = import_files(database, context, interrupt);
CCC_RETURN_IF_ERROR(result);
return Result<void>();
}
Result<void> import_files(SymbolDatabase& database, const AnalysisContext& context, const std::atomic_bool* interrupt)
{
Result<s32> file_count = context.reader->file_count();
CCC_RETURN_IF_ERROR(file_count);
for(s32 i = 0; i < *file_count; i++) {
if(interrupt && *interrupt) {
return CCC_FAILURE("Operation interrupted by user.");
}
Result<mdebug::File> file = context.reader->parse_file(i);
CCC_RETURN_IF_ERROR(file);
Result<void> result = import_file(database, *file, context);
CCC_RETURN_IF_ERROR(result);
}
// The files field may be modified by further analysis passes, so we
// need to save this information here.
for(DataType& data_type : database.data_types) {
if(context.group.is_in_group(data_type) && data_type.files.size() == 1) {
data_type.only_defined_in_single_translation_unit = true;
}
}
// Lookup data types and store data type handles in type names.
Result<void> type_name_result = resolve_type_names(database, context.group, context.importer_flags);
CCC_RETURN_IF_ERROR(type_name_result);
// Compute the size in bytes of all the AST nodes.
database.for_each_symbol([&](ccc::Symbol& symbol) {
if(context.group.is_in_group(symbol) && symbol.type()) {
compute_size_bytes(*symbol.type(), database);
}
});
// Propagate the size information to the global variable symbols.
for(GlobalVariable& global_variable : database.global_variables) {
if(global_variable.type() && global_variable.type()->size_bytes > -1) {
global_variable.set_size((u32) global_variable.type()->size_bytes);
}
}
// Propagate the size information to the static local variable symbols.
for(LocalVariable& local_variable : database.local_variables) {
bool is_static_local = std::holds_alternative<GlobalStorage>(local_variable.storage);
if(is_static_local && local_variable.type() && local_variable.type()->size_bytes > -1) {
local_variable.set_size((u32) local_variable.type()->size_bytes);
}
}
// Some games (e.g. Jet X2O) have multiple function symbols across different
// translation units with the same name and address.
if(context.importer_flags & UNIQUE_FUNCTIONS) {
detect_duplicate_functions(database, context.group);
}
// If multiple functions appear at the same address, discard the addresses
// of all of them except the real one.
if(context.external_functions) {
detect_fake_functions(database, *context.external_functions, context.group);
}
// Remove functions with no address. If there are any such functions, this
// will invalidate all pointers to symbols.
if(context.importer_flags & NO_OPTIMIZED_OUT_FUNCTIONS) {
destroy_optimized_out_functions(database, context.group);
}
return Result<void>();
}
Result<void> import_file(SymbolDatabase& database, const mdebug::File& input, const AnalysisContext& context)
{
// Parse the stab strings into a data structure that's vaguely
// one-to-one with the text-based representation.
u32 importer_flags_for_this_file = context.importer_flags;
Result<std::vector<ParsedSymbol>> symbols = parse_symbols(input.symbols, importer_flags_for_this_file);
CCC_RETURN_IF_ERROR(symbols);
// In stabs, types can be referenced by their number from other stabs,
// so here we build a map of type numbers to the parsed types.
std::map<StabsTypeNumber, const StabsType*> stabs_types;
for(const ParsedSymbol& symbol : *symbols) {
if(symbol.type == ParsedSymbolType::NAME_COLON_TYPE) {
symbol.name_colon_type.type->enumerate_numbered_types(stabs_types);
}
}
Result<SourceFile*> source_file = database.source_files.create_symbol(
input.full_path, input.address, context.group.source, context.group.module_symbol);
CCC_RETURN_IF_ERROR(source_file);
(*source_file)->working_dir = input.working_dir;
(*source_file)->command_line_path = input.command_line_path;
// Sometimes the INFO symbols contain information about what toolchain
// version was used for building the executable.
for(const mdebug::Symbol& symbol : input.symbols) {
if(symbol.symbol_class == mdebug::SymbolClass::INFO && strcmp(symbol.string, "@stabs") != 0) {
(*source_file)->toolchain_version_info.emplace(symbol.string);
}
}
StabsToAstState stabs_to_ast_state;
stabs_to_ast_state.file_handle = (*source_file)->handle().value;
stabs_to_ast_state.stabs_types = &stabs_types;
stabs_to_ast_state.importer_flags = importer_flags_for_this_file;
stabs_to_ast_state.demangler = context.demangler;
// Convert the parsed stabs symbols to a more standard C AST.
LocalSymbolTableAnalyser analyser(database, stabs_to_ast_state, context, **source_file);
for(const ParsedSymbol& symbol : *symbols) {
if(symbol.duplicate) {
continue;
}
switch(symbol.type) {
case ParsedSymbolType::NAME_COLON_TYPE: {
switch(symbol.name_colon_type.descriptor) {
case StabsSymbolDescriptor::LOCAL_FUNCTION:
case StabsSymbolDescriptor::GLOBAL_FUNCTION: {
const char* name = symbol.name_colon_type.name.c_str();
const StabsType& type = *symbol.name_colon_type.type.get();
Result<void> result = analyser.function(name, type, symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
break;
}
case StabsSymbolDescriptor::REFERENCE_PARAMETER_A:
case StabsSymbolDescriptor::REGISTER_PARAMETER:
case StabsSymbolDescriptor::VALUE_PARAMETER:
case StabsSymbolDescriptor::REFERENCE_PARAMETER_V: {
const char* name = symbol.name_colon_type.name.c_str();
const StabsType& type = *symbol.name_colon_type.type.get();
bool is_stack_variable = symbol.name_colon_type.descriptor == StabsSymbolDescriptor::VALUE_PARAMETER;
bool is_by_reference = symbol.name_colon_type.descriptor == StabsSymbolDescriptor::REFERENCE_PARAMETER_A
|| symbol.name_colon_type.descriptor == StabsSymbolDescriptor::REFERENCE_PARAMETER_V;
Result<void> result = analyser.parameter(name, type, is_stack_variable, symbol.raw->value, is_by_reference);
CCC_RETURN_IF_ERROR(result);
break;
}
case StabsSymbolDescriptor::REGISTER_VARIABLE:
case StabsSymbolDescriptor::LOCAL_VARIABLE:
case StabsSymbolDescriptor::STATIC_LOCAL_VARIABLE: {
const char* name = symbol.name_colon_type.name.c_str();
const StabsType& type = *symbol.name_colon_type.type.get();
Result<void> result = analyser.local_variable(
name, type, symbol.raw->value, symbol.name_colon_type.descriptor, symbol.raw->symbol_class);
CCC_RETURN_IF_ERROR(result);
break;
}
case StabsSymbolDescriptor::GLOBAL_VARIABLE:
case StabsSymbolDescriptor::STATIC_GLOBAL_VARIABLE: {
const char* name = symbol.name_colon_type.name.c_str();
u32 address = -1;
std::optional<GlobalStorageLocation> location =
symbol_class_to_global_variable_location(symbol.raw->symbol_class);
if(symbol.name_colon_type.descriptor == StabsSymbolDescriptor::GLOBAL_VARIABLE) {
// The address for non-static global variables is
// only stored in the external symbol table (and
// the ELF symbol table), so we pull that
// information in here.
if(context.external_globals) {
auto global_symbol = context.external_globals->find(symbol.name_colon_type.name);
if(global_symbol != context.external_globals->end()) {
address = (u32) global_symbol->second->value;
location = symbol_class_to_global_variable_location(global_symbol->second->symbol_class);
}
}
} else {
// And for static global variables it's just stored
// in the local symbol table.
address = (u32) symbol.raw->value;
}
CCC_CHECK(location.has_value(), "Invalid global variable location.")
const StabsType& type = *symbol.name_colon_type.type.get();
bool is_static = symbol.name_colon_type.descriptor == StabsSymbolDescriptor::STATIC_GLOBAL_VARIABLE;
Result<void> result = analyser.global_variable(name, address, type, is_static, *location);
CCC_RETURN_IF_ERROR(result);
break;
}
case StabsSymbolDescriptor::TYPE_NAME:
case StabsSymbolDescriptor::ENUM_STRUCT_OR_TYPE_TAG: {
Result<void> result = analyser.data_type(symbol);
CCC_RETURN_IF_ERROR(result);
break;
}
}
break;
}
case ParsedSymbolType::SOURCE_FILE: {
Result<void> result = analyser.source_file(symbol.raw->string, symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
break;
}
case ParsedSymbolType::SUB_SOURCE_FILE: {
Result<void> result = analyser.sub_source_file(symbol.raw->string, symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
break;
}
case ParsedSymbolType::LBRAC: {
Result<void> result = analyser.lbrac(symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
break;
}
case ParsedSymbolType::RBRAC: {
Result<void> result = analyser.rbrac(symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
break;
}
case ParsedSymbolType::FUNCTION_END: {
Result<void> result = analyser.function_end();
CCC_RETURN_IF_ERROR(result);
break;
}
case ParsedSymbolType::NON_STABS: {
if(symbol.raw->symbol_class == mdebug::SymbolClass::TEXT) {
if(symbol.raw->symbol_type == mdebug::SymbolType::PROC) {
Result<void> result = analyser.procedure(symbol.raw->string, symbol.raw->value, symbol.raw->procedure_descriptor, false);
CCC_RETURN_IF_ERROR(result);
} else if(symbol.raw->symbol_type == mdebug::SymbolType::STATICPROC) {
Result<void> result = analyser.procedure(symbol.raw->string, symbol.raw->value, symbol.raw->procedure_descriptor, true);
CCC_RETURN_IF_ERROR(result);
} else if(symbol.raw->symbol_type == mdebug::SymbolType::LABEL) {
Result<void> result = analyser.label(symbol.raw->string, symbol.raw->value, symbol.raw->index);
CCC_RETURN_IF_ERROR(result);
} else if(symbol.raw->symbol_type == mdebug::SymbolType::END) {
Result<void> result = analyser.text_end(symbol.raw->string, symbol.raw->value);
CCC_RETURN_IF_ERROR(result);
}
}
break;
}
}
}
Result<void> result = analyser.finish();
CCC_RETURN_IF_ERROR(result);
return Result<void>();
}
static Result<void> resolve_type_names(
SymbolDatabase& database, const SymbolGroup& group, u32 importer_flags)
{
Result<void> result;
database.for_each_symbol([&](ccc::Symbol& symbol) {
if(group.is_in_group(symbol) && symbol.type()) {
ast::for_each_node(*symbol.type(), ast::PREORDER_TRAVERSAL, [&](ast::Node& node) {
if(node.descriptor == ast::TYPE_NAME) {
Result<void> type_name_result = resolve_type_name(node.as<ast::TypeName>(), database, group, importer_flags);
if(!type_name_result.success()) {
result = std::move(type_name_result);
}
}
return ast::EXPLORE_CHILDREN;
});
}
});
return result;
}
static Result<void> resolve_type_name(
ast::TypeName& type_name,
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags)
{
ast::TypeName::UnresolvedStabs* unresolved_stabs = type_name.unresolved_stabs.get();
if(!unresolved_stabs) {
return Result<void>();
}
// Lookup the type by its STABS type number. This path ensures that the
// correct type is found even if multiple types have the same name.
if(unresolved_stabs->referenced_file_handle != (u32) -1 && unresolved_stabs->stabs_type_number.valid()) {
const SourceFile* source_file = database.source_files.symbol_from_handle(unresolved_stabs->referenced_file_handle);
CCC_ASSERT(source_file);
auto handle = source_file->stabs_type_number_to_handle.find(unresolved_stabs->stabs_type_number);
if(handle != source_file->stabs_type_number_to_handle.end()) {
type_name.data_type_handle = handle->second.value;
type_name.is_forward_declared = false;
type_name.unresolved_stabs.reset();
return Result<void>();
}
}
// Looking up the type by its STABS type number failed, so look for it by
// its name instead. This happens when a type is forward declared but not
// defined in a given translation unit.
if(!unresolved_stabs->type_name.empty()) {
for(auto& name_handle : database.data_types.handles_from_name(unresolved_stabs->type_name)) {
DataType* data_type = database.data_types.symbol_from_handle(name_handle.second);
if(data_type && group.is_in_group(*data_type)) {
type_name.data_type_handle = name_handle.second.value;
type_name.is_forward_declared = true;
type_name.unresolved_stabs.reset();
return Result<void>();
}
}
}
// If this branch is taken it means the type name was probably from an
// automatically generated member function of a nested struct trying to
// reference the struct (for the this parameter). We shouldn't create a
// forward declared type in this case.
if(type_name.source == ast::TypeNameSource::UNNAMED_THIS) {
return Result<void>();
}
// Type lookup failed. This happens when a type is forward declared in a
// translation unit with symbols but is not defined in one. We haven't
// already created a forward declared type, so we create one now.
std::unique_ptr<ast::Node> forward_declared_node;
if(unresolved_stabs->type.has_value()) {
switch(*unresolved_stabs->type) {
case ast::ForwardDeclaredType::STRUCT: {
std::unique_ptr<ast::StructOrUnion> node = std::make_unique<ast::StructOrUnion>();
node->is_struct = true;
forward_declared_node = std::move(node);
break;
}
case ast::ForwardDeclaredType::UNION: {
std::unique_ptr<ast::StructOrUnion> node = std::make_unique<ast::StructOrUnion>();
node->is_struct = false;
forward_declared_node = std::move(node);
break;
}
case ast::ForwardDeclaredType::ENUM: {
std::unique_ptr<ast::Enum> node = std::make_unique<ast::Enum>();
forward_declared_node = std::move(node);
break;
}
}
}
if(forward_declared_node) {
Result<DataType*> forward_declared_type = database.data_types.create_symbol(
unresolved_stabs->type_name, group.source, group.module_symbol);
CCC_RETURN_IF_ERROR(forward_declared_type);
(*forward_declared_type)->set_type(std::move(forward_declared_node));
(*forward_declared_type)->not_defined_in_any_translation_unit = true;
type_name.data_type_handle = (*forward_declared_type)->handle().value;
type_name.is_forward_declared = true;
type_name.unresolved_stabs.reset();
return Result<void>();
}
const char* error_message = "Unresolved %s type name '%s' with STABS type number (%d,%d).";
if(importer_flags & STRICT_PARSING) {
return CCC_FAILURE(error_message,
ast::type_name_source_to_string(type_name.source),
type_name.unresolved_stabs->type_name.c_str(),
type_name.unresolved_stabs->stabs_type_number.file,
type_name.unresolved_stabs->stabs_type_number.type);
} else {
CCC_WARN(error_message,
ast::type_name_source_to_string(type_name.source),
type_name.unresolved_stabs->type_name.c_str(),
type_name.unresolved_stabs->stabs_type_number.file,
type_name.unresolved_stabs->stabs_type_number.type);
}
return Result<void>();
}
static void compute_size_bytes(ast::Node& node, SymbolDatabase& database)
{
for_each_node(node, ast::POSTORDER_TRAVERSAL, [&](ast::Node& node) {
// Skip nodes that have already been processed.
if(node.size_bytes > -1 || node.cannot_compute_size) {
return ast::EXPLORE_CHILDREN;
}
// Can't compute size recursively.
node.cannot_compute_size = true;
switch(node.descriptor) {
case ast::ARRAY: {
ast::Array& array = node.as<ast::Array>();
if(array.element_type->size_bytes > -1) {
array.size_bytes = array.element_type->size_bytes * array.element_count;
}
break;
}
case ast::BITFIELD: {
break;
}
case ast::BUILTIN: {
ast::BuiltIn& built_in = node.as<ast::BuiltIn>();
built_in.size_bytes = builtin_class_size(built_in.bclass);
break;
}
case ast::FUNCTION: {
break;
}
case ast::ENUM: {
node.size_bytes = 4;
break;
}
case ast::ERROR_NODE: {
break;
}
case ast::STRUCT_OR_UNION: {
node.size_bytes = node.size_bits / 8;
break;
}
case ast::POINTER_OR_REFERENCE: {
node.size_bytes = 4;
break;
}
case ast::POINTER_TO_DATA_MEMBER: {
break;
}
case ast::TYPE_NAME: {
ast::TypeName& type_name = node.as<ast::TypeName>();
DataType* resolved_type = database.data_types.symbol_from_handle(type_name.data_type_handle_unless_forward_declared());
if(resolved_type) {
ast::Node* resolved_node = resolved_type->type();
CCC_ASSERT(resolved_node);
if(resolved_node->size_bytes < 0 && !resolved_node->cannot_compute_size) {
compute_size_bytes(*resolved_node, database);
}
type_name.size_bytes = resolved_node->size_bytes;
}
break;
}
}
if(node.size_bytes > -1) {
node.cannot_compute_size = false;
}
return ast::EXPLORE_CHILDREN;
});
}
static void detect_duplicate_functions(SymbolDatabase& database, const SymbolGroup& group)
{
std::vector<FunctionHandle> duplicate_functions;
for(Function& test_function : database.functions) {
if(!test_function.address().valid() && !group.is_in_group(test_function)) {
continue;
}
// Find cases where there are two or more functions at the same address.
auto functions_with_same_address = database.functions.handles_from_starting_address(test_function.address());
if(functions_with_same_address.begin() == functions_with_same_address.end()) {
continue;
}
if(++functions_with_same_address.begin() == functions_with_same_address.end()) {
continue;
}
// Try to figure out the address of the translation unit which the
// version of the function that actually ended up in the linked binary
// comes from. We can't just check which source file the symbol comes
// from because it may be present in multiple.
u32 source_file_address = UINT32_MAX;
for(SourceFile& source_file : database.source_files) {
if(source_file.address() < test_function.address()) {
source_file_address = std::min(source_file.address().value, source_file_address);
}
}
if(source_file_address == UINT32_MAX) {
continue;
}
// Remove the addresses from all the matching symbols from other
// translation units.
FunctionHandle best_handle;
u32 best_offset = UINT32_MAX;
for(const auto& [address, handle] : functions_with_same_address) {
ccc::Function* function = database.functions.symbol_from_handle(handle);
if(!function || !group.is_in_group(*function) || function->mangled_name() != test_function.mangled_name()) {
continue;
}
if(address - source_file_address < best_offset) {
if(best_handle.valid()) {
duplicate_functions.emplace_back(best_handle);
}
best_handle = function->handle();
best_offset = address - source_file_address;
} else {
duplicate_functions.emplace_back(function->handle());
}
}
for(FunctionHandle duplicate_function : duplicate_functions) {
database.functions.move_symbol(duplicate_function, Address());
}
duplicate_functions.clear();
}
}
static void detect_fake_functions(SymbolDatabase& database, const std::map<u32, const mdebug::Symbol*>& external_functions, const SymbolGroup& group)
{
// Find cases where multiple fake function symbols were emitted for a given
// address and cross-reference with the external symbol table to try and
// find which one is the real one.
s32 fake_function_count = 0;
for(Function& function : database.functions) {
if(!function.address().valid() || !group.is_in_group(function)) {
continue;
}
// Find cases where there are two or more functions at the same address.
auto functions_with_same_address = database.functions.handles_from_starting_address(function.address());
if(functions_with_same_address.begin() == functions_with_same_address.end()) {
continue;
}
if(++functions_with_same_address.begin() == functions_with_same_address.end()) {
continue;
}
auto external_function = external_functions.find(function.address().value);
if(external_function == external_functions.end() || strcmp(function.mangled_name().c_str(), external_function->second->string) != 0) {
database.functions.move_symbol(function.handle(), Address());
if(fake_function_count < 10) {
CCC_WARN("Discarding address of function symbol '%s' as it is probably incorrect.", function.mangled_name().c_str());
} else if(fake_function_count == 10) {
CCC_WARN("Discarding more addresses of function symbols.");
}
fake_function_count++;
}
}
}
static void destroy_optimized_out_functions(
SymbolDatabase& database, const SymbolGroup& group)
{
bool marked = false;
for(Function& function : database.functions) {
if(group.is_in_group(function) && !function.address().valid()) {
function.mark_for_destruction();
marked = true;
}
}
if(marked) {
// This will invalidate all pointers to symbols in the database.
database.destroy_marked_symbols();
}
}
void fill_in_pointers_to_member_function_definitions(SymbolDatabase& database)
{
// Fill in pointers from member function declaration to corresponding definitions.
for(Function& function : database.functions) {
const std::string& qualified_name = function.name();
std::string::size_type name_separator_pos = qualified_name.find_last_of("::");
if(name_separator_pos == std::string::npos || name_separator_pos < 2) {
continue;
}
std::string function_name = qualified_name.substr(name_separator_pos + 1);
// This won't work for some template types.
std::string::size_type type_separator_pos = qualified_name.find_last_of("::", name_separator_pos - 2);
std::string type_name;
if(type_separator_pos != std::string::npos) {
type_name = qualified_name.substr(type_separator_pos + 1, name_separator_pos - type_separator_pos - 2);
} else {
type_name = qualified_name.substr(0, name_separator_pos - 1);
}
for(const auto& name_handle : database.data_types.handles_from_name(type_name)) {
DataType* data_type = database.data_types.symbol_from_handle(name_handle.second);
if(!data_type || !data_type->type() || data_type->type()->descriptor != ast::STRUCT_OR_UNION) {
continue;
}
ast::StructOrUnion& struct_or_union = data_type->type()->as<ast::StructOrUnion>();
for(std::unique_ptr<ast::Node>& declaration : struct_or_union.member_functions) {
if(declaration->name == function_name) {
declaration->as<ast::Function>().definition_handle = function.handle().value;
function.is_member_function_ish = true;
break;
}
}
if(function.is_member_function_ish) {
break;
}
}
}
}
}

31
3rdparty/ccc/src/ccc/mdebug_importer.h vendored Normal file
View File

@@ -0,0 +1,31 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include <atomic>
#include "mdebug_analysis.h"
#include "mdebug_section.h"
#include "symbol_database.h"
namespace ccc::mdebug {
// Perform all the main analysis passes on the mdebug symbol table and convert
// it to a set of C++ ASTs.
Result<void> import_symbol_table(
SymbolDatabase& database,
std::span<const u8> elf,
s32 section_offset,
const SymbolGroup& group,
u32 importer_flags,
const DemanglerFunctions& demangler,
const std::atomic_bool* interrupt);
Result<void> import_files(SymbolDatabase& database, const AnalysisContext& context, const std::atomic_bool* interrupt);
Result<void> import_file(SymbolDatabase& database, const mdebug::File& input, const AnalysisContext& context);
// Try to add pointers from member function declarations to their definitions
// using a heuristic.
void fill_in_pointers_to_member_function_definitions(SymbolDatabase& database);
}

474
3rdparty/ccc/src/ccc/mdebug_section.cpp vendored Normal file
View File

@@ -0,0 +1,474 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "mdebug_section.h"
namespace ccc::mdebug {
// MIPS debug symbol table headers.
// See include/coff/sym.h from GNU binutils for more information.
CCC_PACKED_STRUCT(SymbolicHeader,
/* 0x00 */ s16 magic;
/* 0x02 */ s16 version_stamp;
/* 0x04 */ s32 line_number_count;
/* 0x08 */ s32 line_numbers_size_bytes;
/* 0x0c */ s32 line_numbers_offset;
/* 0x10 */ s32 dense_numbers_count;
/* 0x14 */ s32 dense_numbers_offset;
/* 0x18 */ s32 procedure_descriptor_count;
/* 0x1c */ s32 procedure_descriptors_offset;
/* 0x20 */ s32 local_symbol_count;
/* 0x24 */ s32 local_symbols_offset;
/* 0x28 */ s32 optimization_symbols_count;
/* 0x2c */ s32 optimization_symbols_offset;
/* 0x30 */ s32 auxiliary_symbol_count;
/* 0x34 */ s32 auxiliary_symbols_offset;
/* 0x38 */ s32 local_strings_size_bytes;
/* 0x3c */ s32 local_strings_offset;
/* 0x40 */ s32 external_strings_size_bytes;
/* 0x44 */ s32 external_strings_offset;
/* 0x48 */ s32 file_descriptor_count;
/* 0x4c */ s32 file_descriptors_offset;
/* 0x50 */ s32 relative_file_descriptor_count;
/* 0x54 */ s32 relative_file_descriptors_offset;
/* 0x58 */ s32 external_symbols_count;
/* 0x5c */ s32 external_symbols_offset;
)
CCC_PACKED_STRUCT(FileDescriptor,
/* 0x00 */ u32 address;
/* 0x04 */ s32 file_path_string_offset;
/* 0x08 */ s32 strings_offset;
/* 0x0c */ s32 cb_ss;
/* 0x10 */ s32 isym_base;
/* 0x14 */ s32 symbol_count;
/* 0x18 */ s32 line_number_entry_index_base;
/* 0x1c */ s32 cline;
/* 0x20 */ s32 optimization_entry_index_base;
/* 0x24 */ s32 copt;
/* 0x28 */ u16 ipd_first;
/* 0x2a */ u16 procedure_descriptor_count;
/* 0x2c */ s32 iaux_base;
/* 0x30 */ s32 caux;
/* 0x34 */ s32 rfd_base;
/* 0x38 */ s32 crfd;
/* 0x3c */ u32 lang : 5;
/* 0x3c */ u32 f_merge : 1;
/* 0x3c */ u32 f_readin : 1;
/* 0x3c */ u32 f_big_endian : 1;
/* 0x3c */ u32 reserved_1 : 22;
/* 0x40 */ s32 line_number_offset;
/* 0x44 */ s32 cb_line;
)
static_assert(sizeof(FileDescriptor) == 0x48);
CCC_PACKED_STRUCT(SymbolHeader,
/* 0x0 */ u32 iss;
/* 0x4 */ u32 value;
/* 0x8 */ u32 st : 6;
/* 0x8 */ u32 sc : 5;
/* 0x8 */ u32 reserved : 1;
/* 0x8 */ u32 index : 20;
)
static_assert(sizeof(SymbolHeader) == 0xc);
CCC_PACKED_STRUCT(ExternalSymbolHeader,
/* 0x0 */ u16 flags;
/* 0x2 */ s16 ifd;
/* 0x4 */ SymbolHeader symbol;
)
static_assert(sizeof(ExternalSymbolHeader) == 0x10);
static void print_symbol(FILE* out, const Symbol& symbol);
static void print_procedure_descriptor(FILE* out, const ProcedureDescriptor& procedure_descriptor);
static Result<s32> get_corruption_fixing_fudge_offset(s32 section_offset, const SymbolicHeader& hdrr);
static Result<Symbol> get_symbol(const SymbolHeader& header, std::span<const u8> elf, s32 strings_offset);
Result<void> SymbolTableReader::init(std::span<const u8> elf, s32 section_offset)
{
m_elf = elf;
m_section_offset = section_offset;
m_hdrr = get_unaligned<SymbolicHeader>(m_elf, m_section_offset);
CCC_CHECK(m_hdrr != nullptr, "MIPS debug section header out of bounds.");
CCC_CHECK(m_hdrr->magic == 0x7009, "Invalid symbolic header.");
Result<s32> fudge_offset = get_corruption_fixing_fudge_offset(m_section_offset, *m_hdrr);
CCC_RETURN_IF_ERROR(fudge_offset);
m_fudge_offset = *fudge_offset;
m_ready = true;
return Result<void>();
}
s32 SymbolTableReader::file_count() const
{
CCC_ASSERT(m_ready);
return m_hdrr->file_descriptor_count;
}
Result<File> SymbolTableReader::parse_file(s32 index) const
{
CCC_ASSERT(m_ready);
File file;
u64 fd_offset = m_hdrr->file_descriptors_offset + index * sizeof(FileDescriptor);
const FileDescriptor* fd_header = get_unaligned<FileDescriptor>(m_elf, fd_offset + m_fudge_offset);
CCC_CHECK(fd_header != nullptr, "MIPS debug file descriptor out of bounds.");
CCC_CHECK(fd_header->f_big_endian == 0, "Not little endian or bad file descriptor table.");
file.address = fd_header->address;
s32 rel_raw_path_offset = fd_header->strings_offset + fd_header->file_path_string_offset;
s32 raw_path_offset = m_hdrr->local_strings_offset + rel_raw_path_offset + m_fudge_offset;
std::optional<std::string_view> command_line_path = get_string(m_elf, raw_path_offset);
if(command_line_path.has_value()) {
file.command_line_path = *command_line_path;
}
// Parse local symbols.
for(s64 j = 0; j < fd_header->symbol_count; j++) {
u64 rel_symbol_offset = (fd_header->isym_base + j) * sizeof(SymbolHeader);
u64 symbol_offset = m_hdrr->local_symbols_offset + rel_symbol_offset + m_fudge_offset;
const SymbolHeader* symbol_header = get_unaligned<SymbolHeader>(m_elf, symbol_offset);
CCC_CHECK(symbol_header != nullptr, "Symbol header out of bounds.");
s32 strings_offset = m_hdrr->local_strings_offset + fd_header->strings_offset + m_fudge_offset;
Result<Symbol> sym = get_symbol(*symbol_header, m_elf, strings_offset);
CCC_RETURN_IF_ERROR(sym);
bool string_offset_equal = (s32) symbol_header->iss == fd_header->file_path_string_offset;
if(file.working_dir.empty() && string_offset_equal && sym->is_stabs() && sym->code() == N_SO && file.symbols.size() > 2) {
const Symbol& working_dir = file.symbols.back();
if(working_dir.is_stabs() && working_dir.code() == N_SO) {
file.working_dir = working_dir.string;
}
}
file.symbols.emplace_back(std::move(*sym));
}
// Parse procedure descriptors.
for(s64 i = 0; i < fd_header->procedure_descriptor_count; i++) {
u64 rel_procedure_offset = (fd_header->ipd_first + i) * sizeof(ProcedureDescriptor);
u64 procedure_offset = m_hdrr->procedure_descriptors_offset + rel_procedure_offset + m_fudge_offset;
const ProcedureDescriptor* procedure_descriptor = get_unaligned<ProcedureDescriptor>(m_elf, procedure_offset);
CCC_CHECK(procedure_descriptor != nullptr, "Procedure descriptor out of bounds.");
CCC_CHECK(procedure_descriptor->symbol_index < file.symbols.size(), "Symbol index out of bounds.");
file.symbols[procedure_descriptor->symbol_index].procedure_descriptor = procedure_descriptor;
}
file.full_path = merge_paths(file.working_dir, file.command_line_path);
return file;
}
Result<std::vector<Symbol>> SymbolTableReader::parse_external_symbols() const
{
CCC_ASSERT(m_ready);
std::vector<Symbol> external_symbols;
for(s64 i = 0; i < m_hdrr->external_symbols_count; i++) {
u64 sym_offset = m_hdrr->external_symbols_offset + i * sizeof(ExternalSymbolHeader);
const ExternalSymbolHeader* external_header = get_unaligned<ExternalSymbolHeader>(m_elf, sym_offset + m_fudge_offset);
CCC_CHECK(external_header != nullptr, "External header out of bounds.");
Result<Symbol> sym = get_symbol(external_header->symbol, m_elf, m_hdrr->external_strings_offset + m_fudge_offset);
CCC_RETURN_IF_ERROR(sym);
external_symbols.emplace_back(std::move(*sym));
}
return external_symbols;
}
void SymbolTableReader::print_header(FILE* dest) const
{
CCC_ASSERT(m_ready);
fprintf(dest, "Symbolic Header, magic = %hx, vstamp = %hx:\n",
(u16) m_hdrr->magic,
(u16) m_hdrr->version_stamp);
fprintf(dest, "\n");
fprintf(dest, " Offset Size (Bytes) Count\n");
fprintf(dest, " ------ ------------ -----\n");
fprintf(dest, " Line Numbers 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->line_numbers_offset,
(u32) m_hdrr->line_numbers_size_bytes,
m_hdrr->line_number_count);
fprintf(dest, " Dense Numbers 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->dense_numbers_offset,
(u32) m_hdrr->dense_numbers_count * 8,
m_hdrr->dense_numbers_count);
fprintf(dest, " Procedure Descriptors 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->procedure_descriptors_offset,
(u32) m_hdrr->procedure_descriptor_count * (u32) sizeof(ProcedureDescriptor),
m_hdrr->procedure_descriptor_count);
fprintf(dest, " Local Symbols 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->local_symbols_offset,
(u32) m_hdrr->local_symbol_count * (u32) sizeof(SymbolHeader),
m_hdrr->local_symbol_count);
fprintf(dest, " Optimization Symbols 0x%-8x " "- " "%-8d\n",
(u32) m_hdrr->optimization_symbols_offset,
m_hdrr->optimization_symbols_count);
fprintf(dest, " Auxiliary Symbols 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->auxiliary_symbols_offset,
(u32) m_hdrr->auxiliary_symbol_count * 4,
m_hdrr->auxiliary_symbol_count);
fprintf(dest, " Local Strings 0x%-8x " "0x%-8x " "-\n",
(u32) m_hdrr->local_strings_offset,
(u32) m_hdrr->local_strings_size_bytes);
fprintf(dest, " External Strings 0x%-8x " "0x%-8x " "-\n",
(u32) m_hdrr->external_strings_offset,
(u32) m_hdrr->external_strings_size_bytes);
fprintf(dest, " File Descriptors 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->file_descriptors_offset,
(u32) m_hdrr->file_descriptor_count * (u32) sizeof(FileDescriptor),
m_hdrr->file_descriptor_count);
fprintf(dest, " Relative File Descriptors 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->relative_file_descriptors_offset,
(u32) m_hdrr->relative_file_descriptor_count * 4,
m_hdrr->relative_file_descriptor_count);
fprintf(dest, " External Symbols 0x%-8x " "0x%-8x " "%-8d\n",
(u32) m_hdrr->external_symbols_offset,
(u32) m_hdrr->external_symbols_count * 16,
m_hdrr->external_symbols_count);
}
Result<void> SymbolTableReader::print_symbols(FILE* out, bool print_locals, bool print_procedure_descriptors, bool print_externals) const
{
if(print_locals || print_procedure_descriptors) {
s32 count = file_count();
for(s32 i = 0; i < count; i++) {
Result<File> file = parse_file(i);
CCC_RETURN_IF_ERROR(file);
fprintf(out, "FILE %s:\n", file->command_line_path.c_str());
for(const Symbol& symbol : file->symbols) {
if(print_locals || symbol.procedure_descriptor) {
print_symbol(out, symbol);
}
if(print_procedure_descriptors && symbol.procedure_descriptor) {
print_procedure_descriptor(out, *symbol.procedure_descriptor);
}
}
}
}
if(print_externals) {
fprintf(out, "EXTERNAL SYMBOLS:\n");
Result<std::vector<Symbol>> external_symbols = parse_external_symbols();
CCC_RETURN_IF_ERROR(external_symbols);
for(const Symbol& symbol : *external_symbols) {
print_symbol(out, symbol);
}
}
return Result<void>();
}
static void print_symbol(FILE* out, const Symbol& symbol)
{
fprintf(out, " %8x ", symbol.value);
const char* symbol_type_str = symbol_type(symbol.symbol_type);
if(symbol_type_str) {
fprintf(out, "%-11s ", symbol_type_str);
} else {
fprintf(out, "ST(%7u) ", (u32) symbol.symbol_type);
}
const char* symbol_class_str = symbol_class(symbol.symbol_class);
if(symbol_class_str) {
fprintf(out, "%-4s ", symbol_class_str);
} else if ((u32) symbol.symbol_class == 0) {
fprintf(out, " ");
} else {
fprintf(out, "SC(%4u) ", (u32) symbol.symbol_class);
}
if(symbol.is_stabs()) {
fprintf(out, "%-8s ", stabs_code_to_string(symbol.code()));
} else {
fprintf(out, "SI(%4u) ", symbol.index);
}
fprintf(out, "%s\n", symbol.string);
}
static void print_procedure_descriptor(FILE* out, const ProcedureDescriptor& procedure_descriptor)
{
fprintf(out, " Address 0x%08x\n", procedure_descriptor.address);
fprintf(out, " Symbol Index %d\n", procedure_descriptor.symbol_index);
fprintf(out, " Line Number Entry Index %d\n", procedure_descriptor.line_number_entry_index);
fprintf(out, " Saved Register Mask 0x%08x\n", procedure_descriptor.saved_register_mask);
fprintf(out, " Saved Register Offset %d\n", procedure_descriptor.saved_register_offset);
fprintf(out, " Optimization Entry Index %d\n", procedure_descriptor.optimization_entry_index);
fprintf(out, " Saved Float Register Mask 0x%08x\n", procedure_descriptor.saved_float_register_mask);
fprintf(out, " Saved Float Register Offset %d\n", procedure_descriptor.saved_float_register_offset);
fprintf(out, " Frame Size %d\n", procedure_descriptor.frame_size);
fprintf(out, " Frame Pointer Register %hd\n", procedure_descriptor.frame_pointer_register);
fprintf(out, " Return PC Register %hd\n", procedure_descriptor.return_pc_register);
fprintf(out, " Line Number Low %d\n", procedure_descriptor.line_number_low);
fprintf(out, " Line Number High %d\n", procedure_descriptor.line_number_high);
fprintf(out, " Line Number Offset %d\n", procedure_descriptor.line_number_offset);
}
static Result<s32> get_corruption_fixing_fudge_offset(s32 section_offset, const SymbolicHeader& hdrr)
{
// GCC will always put the first part of the symbol table right after the
// header, so if the header says it's somewhere else we know the section has
// probably been moved without updating its contents.
s32 right_after_header = INT32_MAX;
if(hdrr.line_numbers_offset > 0) right_after_header = std::min(hdrr.line_numbers_offset, right_after_header);
if(hdrr.dense_numbers_offset > 0) right_after_header = std::min(hdrr.dense_numbers_offset, right_after_header);
if(hdrr.procedure_descriptors_offset > 0) right_after_header = std::min(hdrr.procedure_descriptors_offset, right_after_header);
if(hdrr.local_symbols_offset > 0) right_after_header = std::min(hdrr.local_symbols_offset, right_after_header);
if(hdrr.optimization_symbols_offset > 0) right_after_header = std::min(hdrr.optimization_symbols_offset, right_after_header);
if(hdrr.auxiliary_symbols_offset > 0) right_after_header = std::min(hdrr.auxiliary_symbols_offset, right_after_header);
if(hdrr.local_strings_offset > 0) right_after_header = std::min(hdrr.local_strings_offset, right_after_header);
if(hdrr.external_strings_offset > 0) right_after_header = std::min(hdrr.external_strings_offset, right_after_header);
if(hdrr.file_descriptors_offset > 0) right_after_header = std::min(hdrr.file_descriptors_offset, right_after_header);
if(hdrr.relative_file_descriptors_offset > 0) right_after_header = std::min(hdrr.relative_file_descriptors_offset, right_after_header);
if(hdrr.external_symbols_offset > 0) right_after_header = std::min(hdrr.external_symbols_offset, right_after_header);
CCC_CHECK(right_after_header >= 0 && right_after_header < INT32_MAX, "Invalid symbolic header.");
// Figure out how much we need to adjust all the file offsets by.
s32 fudge_offset = section_offset - (right_after_header - sizeof(SymbolicHeader));
if(fudge_offset != 0) {
CCC_WARN("The .mdebug section was moved without updating its contents. Adjusting file offsets by %d bytes.", fudge_offset);
}
return fudge_offset;
}
static Result<Symbol> get_symbol(const SymbolHeader& header, std::span<const u8> elf, s32 strings_offset)
{
Symbol symbol;
std::optional<std::string_view> string = get_string(elf, strings_offset + header.iss);
CCC_CHECK(string.has_value(), "Symbol has invalid string.");
symbol.string = string->data();
symbol.value = header.value;
symbol.symbol_type = (SymbolType) header.st;
symbol.symbol_class = (SymbolClass) header.sc;
symbol.index = header.index;
if(symbol.is_stabs()) {
CCC_CHECK(stabs_code_to_string(symbol.code()) != nullptr, "Bad stabs symbol code '%x'.", symbol.code());
}
return symbol;
}
const char* symbol_type(SymbolType type)
{
switch(type) {
case SymbolType::NIL: return "NIL";
case SymbolType::GLOBAL: return "GLOBAL";
case SymbolType::STATIC: return "STATIC";
case SymbolType::PARAM: return "PARAM";
case SymbolType::LOCAL: return "LOCAL";
case SymbolType::LABEL: return "LABEL";
case SymbolType::PROC: return "PROC";
case SymbolType::BLOCK: return "BLOCK";
case SymbolType::END: return "END";
case SymbolType::MEMBER: return "MEMBER";
case SymbolType::TYPEDEF: return "TYPEDEF";
case SymbolType::FILE_SYMBOL: return "FILE";
case SymbolType::STATICPROC: return "STATICPROC";
case SymbolType::CONSTANT: return "CONSTANT";
}
return nullptr;
}
const char* symbol_class(SymbolClass symbol_class)
{
switch(symbol_class) {
case SymbolClass::NIL: return "NIL";
case SymbolClass::TEXT: return "TEXT";
case SymbolClass::DATA: return "DATA";
case SymbolClass::BSS: return "BSS";
case SymbolClass::REGISTER: return "REGISTER";
case SymbolClass::ABS: return "ABS";
case SymbolClass::UNDEFINED: return "UNDEFINED";
case SymbolClass::LOCAL: return "LOCAL";
case SymbolClass::BITS: return "BITS";
case SymbolClass::DBX: return "DBX";
case SymbolClass::REG_IMAGE: return "REG_IMAGE";
case SymbolClass::INFO: return "INFO";
case SymbolClass::USER_STRUCT: return "USER_STRUCT";
case SymbolClass::SDATA: return "SDATA";
case SymbolClass::SBSS: return "SBSS";
case SymbolClass::RDATA: return "RDATA";
case SymbolClass::VAR: return "VAR";
case SymbolClass::COMMON: return "COMMON";
case SymbolClass::SCOMMON: return "SCOMMON";
case SymbolClass::VAR_REGISTER: return "VAR_REGISTER";
case SymbolClass::VARIANT: return "VARIANT";
case SymbolClass::SUNDEFINED: return "SUNDEFINED";
case SymbolClass::INIT: return "INIT";
case SymbolClass::BASED_VAR: return "BASED_VAR";
case SymbolClass::XDATA: return "XDATA";
case SymbolClass::PDATA: return "PDATA";
case SymbolClass::FINI: return "FINI";
case SymbolClass::NONGP: return "NONGP";
}
return nullptr;
}
const char* stabs_code_to_string(StabsCode code)
{
switch(code) {
case STAB: return "STAB";
case N_GSYM: return "GSYM";
case N_FNAME: return "FNAME";
case N_FUN: return "FUN";
case N_STSYM: return "STSYM";
case N_LCSYM: return "LCSYM";
case N_MAIN: return "MAIN";
case N_PC: return "PC";
case N_NSYMS: return "NSYMS";
case N_NOMAP: return "NOMAP";
case N_OBJ: return "OBJ";
case N_OPT: return "OPT";
case N_RSYM: return "RSYM";
case N_M2C: return "M2C";
case N_SLINE: return "SLINE";
case N_DSLINE: return "DSLINE";
case N_BSLINE: return "BSLINE";
case N_EFD: return "EFD";
case N_EHDECL: return "EHDECL";
case N_CATCH: return "CATCH";
case N_SSYM: return "SSYM";
case N_SO: return "SO";
case N_LSYM: return "LSYM";
case N_BINCL: return "BINCL";
case N_SOL: return "SOL";
case N_PSYM: return "PSYM";
case N_EINCL: return "EINCL";
case N_ENTRY: return "ENTRY";
case N_LBRAC: return "LBRAC";
case N_EXCL: return "EXCL";
case N_SCOPE: return "SCOPE";
case N_RBRAC: return "RBRAC";
case N_BCOMM: return "BCOMM";
case N_ECOMM: return "ECOMM";
case N_ECOML: return "ECOML";
case N_NBTEXT: return "NBTEXT";
case N_NBDATA: return "NBDATA";
case N_NBBSS: return "NBBSS";
case N_NBSTS: return "NBSTS";
case N_NBLCS: return "NBLCS";
case N_LENG: return "LENG";
}
return nullptr;
}
}

176
3rdparty/ccc/src/ccc/mdebug_section.h vendored Normal file
View File

@@ -0,0 +1,176 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "util.h"
namespace ccc::mdebug {
struct SymbolicHeader;
enum class SymbolType : u32 {
NIL = 0,
GLOBAL = 1,
STATIC = 2,
PARAM = 3,
LOCAL = 4,
LABEL = 5,
PROC = 6,
BLOCK = 7,
END = 8,
MEMBER = 9,
TYPEDEF = 10,
FILE_SYMBOL = 11,
STATICPROC = 14,
CONSTANT = 15
};
enum class SymbolClass : u32 {
NIL = 0,
TEXT = 1,
DATA = 2,
BSS = 3,
REGISTER = 4,
ABS = 5,
UNDEFINED = 6,
LOCAL = 7,
BITS = 8,
DBX = 9,
REG_IMAGE = 10,
INFO = 11,
USER_STRUCT = 12,
SDATA = 13,
SBSS = 14,
RDATA = 15,
VAR = 16,
COMMON = 17,
SCOMMON = 18,
VAR_REGISTER = 19,
VARIANT = 20,
SUNDEFINED = 21,
INIT = 22,
BASED_VAR = 23,
XDATA = 24,
PDATA = 25,
FINI = 26,
NONGP = 27
};
// See stab.def from gcc for documentation on what all these are.
enum StabsCode {
STAB = 0x00,
N_GSYM = 0x20,
N_FNAME = 0x22,
N_FUN = 0x24,
N_STSYM = 0x26,
N_LCSYM = 0x28,
N_MAIN = 0x2a,
N_PC = 0x30,
N_NSYMS = 0x32,
N_NOMAP = 0x34,
N_OBJ = 0x38,
N_OPT = 0x3c,
N_RSYM = 0x40,
N_M2C = 0x42,
N_SLINE = 0x44,
N_DSLINE = 0x46,
N_BSLINE = 0x48,
N_EFD = 0x4a,
N_EHDECL = 0x50,
N_CATCH = 0x54,
N_SSYM = 0x60,
N_SO = 0x64,
N_LSYM = 0x80,
N_BINCL = 0x82,
N_SOL = 0x84,
N_PSYM = 0xa0,
N_EINCL = 0xa2,
N_ENTRY = 0xa4,
N_LBRAC = 0xc0,
N_EXCL = 0xc2,
N_SCOPE = 0xc4,
N_RBRAC = 0xe0,
N_BCOMM = 0xe2,
N_ECOMM = 0xe4,
N_ECOML = 0xe8,
N_NBTEXT = 0xf0,
N_NBDATA = 0xf2,
N_NBBSS = 0xf4,
N_NBSTS = 0xf6,
N_NBLCS = 0xf8,
N_LENG = 0xfe
};
CCC_PACKED_STRUCT(ProcedureDescriptor,
/* 0x00 */ u32 address;
/* 0x04 */ u32 symbol_index;
/* 0x08 */ s32 line_number_entry_index;
/* 0x0c */ s32 saved_register_mask;
/* 0x10 */ s32 saved_register_offset;
/* 0x14 */ s32 optimization_entry_index;
/* 0x18 */ s32 saved_float_register_mask;
/* 0x1c */ s32 saved_float_register_offset;
/* 0x20 */ s32 frame_size;
/* 0x24 */ s16 frame_pointer_register;
/* 0x26 */ s16 return_pc_register;
/* 0x28 */ s32 line_number_low;
/* 0x2c */ s32 line_number_high;
/* 0x30 */ u32 line_number_offset;
)
static_assert(sizeof(ProcedureDescriptor) == 0x34);
struct Symbol {
u32 value;
SymbolType symbol_type;
SymbolClass symbol_class;
u32 index;
const char* string;
const ProcedureDescriptor* procedure_descriptor = nullptr;
bool is_stabs() const {
return (index & 0xfff00) == 0x8f300;
}
StabsCode code() const {
return (StabsCode) (index - 0x8f300);
}
};
struct File {
std::vector<Symbol> symbols;
u32 address = 0;
std::string working_dir; // The working directory of gcc.
std::string command_line_path; // The source file path passed on the command line to gcc.
std::string full_path; // The full combined path.
};
class SymbolTableReader {
public:
Result<void> init(std::span<const u8> elf, s32 section_offset);
s32 file_count() const;
Result<File> parse_file(s32 index) const;
Result<std::vector<Symbol>> parse_external_symbols() const;
void print_header(FILE* out) const;
Result<void> print_symbols(FILE* out, bool print_locals, bool print_procedure_descriptors, bool print_externals) const;
protected:
bool m_ready = false;
std::span<const u8> m_elf;
s32 m_section_offset;
// If the .mdebug section was moved without updating its contents all the
// absolute file offsets stored within will be incorrect by a fixed amount.
s32 m_fudge_offset;
const SymbolicHeader* m_hdrr;
};
const char* symbol_type(SymbolType type);
const char* symbol_class(SymbolClass symbol_class);
const char* stabs_code_to_string(StabsCode code);
}

220
3rdparty/ccc/src/ccc/mdebug_symbols.cpp vendored Normal file
View File

@@ -0,0 +1,220 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "mdebug_symbols.h"
#include "importer_flags.h"
namespace ccc::mdebug {
static void mark_duplicate_symbols(std::vector<ParsedSymbol>& symbols);
Result<std::vector<ParsedSymbol>> parse_symbols(const std::vector<mdebug::Symbol>& input, u32& importer_flags)
{
std::vector<ParsedSymbol> output;
std::string prefix;
for(const mdebug::Symbol& symbol : input) {
if(symbol.is_stabs()) {
switch(symbol.code()) {
case mdebug::N_GSYM: // Global variable
case mdebug::N_FUN: // Function
case mdebug::N_STSYM: // Data section static global variable
case mdebug::N_LCSYM: // BSS section static global variable
case mdebug::N_RSYM: // Register variable
case mdebug::N_LSYM: // Automatic variable or type definition
case mdebug::N_PSYM: { // Parameter variable
// Some STABS symbols are split between multiple strings.
if(symbol.string[0] != '\0') {
if(symbol.string[strlen(symbol.string) - 1] == '\\') {
prefix += std::string(symbol.string, symbol.string + strlen(symbol.string) - 1);
} else {
std::string merged_string;
const char* string;
if(!prefix.empty()) {
merged_string = prefix + symbol.string;
string = merged_string.c_str();
prefix.clear();
} else {
string = symbol.string;
}
const char* input = string;
Result<StabsSymbol> parse_result = parse_stabs_symbol(input);
if(parse_result.success()) {
if(*input != '\0') {
if(importer_flags & STRICT_PARSING) {
return CCC_FAILURE("Unknown data '%s' at the end of the '%s' stab.", input, parse_result->name.c_str());
} else {
CCC_WARN("Unknown data '%s' at the end of the '%s' stab.", input, parse_result->name.c_str());
}
}
ParsedSymbol& parsed = output.emplace_back();
parsed.type = ParsedSymbolType::NAME_COLON_TYPE;
parsed.raw = &symbol;
parsed.name_colon_type = std::move(*parse_result);
} else if(parse_result.error().message == STAB_TRUNCATED_ERROR_MESSAGE) {
// Symbol truncated due to a GCC bug. Report a
// warning and try to tolerate further faults
// caused as a result of this.
CCC_WARN("%s Symbol string: %s", STAB_TRUNCATED_ERROR_MESSAGE, string);
importer_flags &= ~STRICT_PARSING;
} else {
return CCC_FAILURE("%s Symbol string: %s",
parse_result.error().message.c_str(), string);
}
}
} else {
CCC_CHECK(prefix.empty(), "Invalid STABS continuation.");
if(symbol.code() == mdebug::N_FUN) {
ParsedSymbol& func_end = output.emplace_back();
func_end.type = ParsedSymbolType::FUNCTION_END;
func_end.raw = &symbol;
}
}
break;
}
case mdebug::N_SOL: { // Sub-source file
ParsedSymbol& sub = output.emplace_back();
sub.type = ParsedSymbolType::SUB_SOURCE_FILE;
sub.raw = &symbol;
break;
}
case mdebug::N_LBRAC: { // Begin block
ParsedSymbol& begin_block = output.emplace_back();
begin_block.type = ParsedSymbolType::LBRAC;
begin_block.raw = &symbol;
break;
}
case mdebug::N_RBRAC: { // End block
ParsedSymbol& end_block = output.emplace_back();
end_block.type = ParsedSymbolType::RBRAC;
end_block.raw = &symbol;
break;
}
case mdebug::N_SO: { // Source filename
ParsedSymbol& so_symbol = output.emplace_back();
so_symbol.type = ParsedSymbolType::SOURCE_FILE;
so_symbol.raw = &symbol;
break;
}
case mdebug::STAB:
case mdebug::N_OPT:
case mdebug::N_BINCL:
case mdebug::N_EINCL: {
break;
}
case mdebug::N_FNAME:
case mdebug::N_MAIN:
case mdebug::N_PC:
case mdebug::N_NSYMS:
case mdebug::N_NOMAP:
case mdebug::N_OBJ:
case mdebug::N_M2C:
case mdebug::N_SLINE:
case mdebug::N_DSLINE:
case mdebug::N_BSLINE:
case mdebug::N_EFD:
case mdebug::N_EHDECL:
case mdebug::N_CATCH:
case mdebug::N_SSYM:
case mdebug::N_ENTRY:
case mdebug::N_EXCL:
case mdebug::N_SCOPE:
case mdebug::N_BCOMM:
case mdebug::N_ECOMM:
case mdebug::N_ECOML:
case mdebug::N_NBTEXT:
case mdebug::N_NBDATA:
case mdebug::N_NBBSS:
case mdebug::N_NBSTS:
case mdebug::N_NBLCS:
case mdebug::N_LENG: {
CCC_WARN("Unhandled N_%s symbol: %s", mdebug::stabs_code_to_string(symbol.code()), symbol.string);
break;
}
}
} else {
ParsedSymbol& non_stabs_symbol = output.emplace_back();
non_stabs_symbol.type = ParsedSymbolType::NON_STABS;
non_stabs_symbol.raw = &symbol;
}
}
mark_duplicate_symbols(output);
return output;
}
static void mark_duplicate_symbols(std::vector<ParsedSymbol>& symbols)
{
std::map<StabsTypeNumber, size_t> stabs_type_number_to_symbol;
for(size_t i = 0; i < symbols.size(); i++) {
ParsedSymbol& symbol = symbols[i];
if(symbol.type == ParsedSymbolType::NAME_COLON_TYPE) {
StabsType& type = *symbol.name_colon_type.type;
if(type.type_number.valid() && type.descriptor.has_value()) {
stabs_type_number_to_symbol.emplace(type.type_number, i);
}
}
}
for(ParsedSymbol& symbol : symbols) {
symbol.is_typedef =
symbol.type == ParsedSymbolType::NAME_COLON_TYPE &&
symbol.name_colon_type.descriptor == StabsSymbolDescriptor::TYPE_NAME &&
symbol.name_colon_type.type->descriptor != StabsTypeDescriptor::ENUM;
}
for(size_t i = 0; i < symbols.size(); i++) {
ParsedSymbol& symbol = symbols[i];
if(symbol.type != ParsedSymbolType::NAME_COLON_TYPE) {
continue;
}
bool is_type =
symbol.name_colon_type.descriptor == StabsSymbolDescriptor::TYPE_NAME ||
symbol.name_colon_type.descriptor == StabsSymbolDescriptor::ENUM_STRUCT_OR_TYPE_TAG;
if(!is_type) {
continue;
}
StabsType& type = *symbol.name_colon_type.type;
if(!type.descriptor.has_value()) {
auto referenced_index = stabs_type_number_to_symbol.find(type.type_number);
if(referenced_index != stabs_type_number_to_symbol.end()) {
ParsedSymbol& referenced = symbols[referenced_index->second];
if(referenced.name_colon_type.name == symbol.name_colon_type.name) {
// symbol: "Struct:T(1,1)=s1;"
// referenced: "Struct:t(1,1)"
symbol.duplicate = true;
}
}
}
if(type.descriptor.has_value() && type.descriptor == StabsTypeDescriptor::TYPE_REFERENCE) {
auto referenced_index = stabs_type_number_to_symbol.find(type.as<StabsTypeReferenceType>().type->type_number);
if(referenced_index != stabs_type_number_to_symbol.end() && referenced_index->second != i) {
ParsedSymbol& referenced = symbols[referenced_index->second];
if(referenced.name_colon_type.name == " ") {
// referenced: " :T(1,1)=e;"
// symbol: "ErraticEnum:t(1,2)=(1,1)"
referenced.name_colon_type.name = symbol.name_colon_type.name;
referenced.is_typedef = true;
symbol.duplicate = true;
}
if(referenced.name_colon_type.name == symbol.name_colon_type.name) {
// referenced: "NamedTypedefedStruct:T(1,1)=s1;"
// symbol: "NamedTypedefedStruct:t(1,2)=(1,1)"
referenced.is_typedef = true;
symbol.duplicate = true;
}
}
}
}
}
}

32
3rdparty/ccc/src/ccc/mdebug_symbols.h vendored Normal file
View File

@@ -0,0 +1,32 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "util.h"
#include "stabs.h"
#include "mdebug_section.h"
namespace ccc::mdebug {
enum class ParsedSymbolType {
NAME_COLON_TYPE,
SOURCE_FILE,
SUB_SOURCE_FILE,
LBRAC,
RBRAC,
FUNCTION_END,
NON_STABS
};
struct ParsedSymbol {
ParsedSymbolType type;
const mdebug::Symbol* raw;
StabsSymbol name_colon_type;
bool duplicate = false;
bool is_typedef = false;
};
Result<std::vector<ParsedSymbol>> parse_symbols(const std::vector<mdebug::Symbol>& input, u32& importer_flags);
}

193
3rdparty/ccc/src/ccc/sndll.cpp vendored Normal file
View File

@@ -0,0 +1,193 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "sndll.h"
#include "importer_flags.h"
namespace ccc {
CCC_PACKED_STRUCT(SNDLLHeaderCommon,
/* 0x00 */ u32 magic;
/* 0x04 */ u32 relocations;
/* 0x08 */ u32 relocation_count;
/* 0x0c */ u32 symbols;
/* 0x10 */ u32 symbol_count;
/* 0x14 */ u32 elf_path;
/* 0x18 */ u32 load_func;
/* 0x1c */ u32 unload_func;
/* 0x20 */ u32 unknown_20;
/* 0x24 */ u32 unknown_24;
/* 0x28 */ u32 unknown_28;
/* 0x2c */ u32 file_size;
/* 0x30 */ u32 unknown_30;
)
CCC_PACKED_STRUCT(SNDLLHeaderV1,
/* 0x00 */ SNDLLHeaderCommon common;
)
CCC_PACKED_STRUCT(SNDLLHeaderV2,
/* 0x00 */ SNDLLHeaderCommon common;
/* 0x34 */ u32 unknown_34;
/* 0x38 */ u32 unknown_38;
)
CCC_PACKED_STRUCT(SNDLLRelocation,
/* 0x0 */ u32 unknown_0;
/* 0x4 */ u32 unknown_4;
/* 0x8 */ u32 unknown_8;
)
CCC_PACKED_STRUCT(SNDLLSymbolHeader,
/* 0x0 */ u32 string;
/* 0x4 */ u32 value;
/* 0x8 */ u8 unknown_8;
/* 0x9 */ u8 unknown_9;
/* 0xa */ SNDLLSymbolType type;
/* 0xb */ u8 processed;
)
static Result<SNDLLFile> parse_sndll_common(
std::span<const u8> image, Address address, SNDLLType type, const SNDLLHeaderCommon& common, SNDLLVersion version);
static const char* sndll_symbol_type_to_string(SNDLLSymbolType type);
Result<SNDLLFile> parse_sndll_file(std::span<const u8> image, Address address, SNDLLType type)
{
std::optional<u32> magic = copy_unaligned<u32>(image, 0);
CCC_CHECK(magic.has_value(), "Failed to read SNDLL header.");
CCC_CHECK((*magic & 0xffffff) == CCC_FOURCC("SNR\00"), "Not a SNDLL %s.", address.valid() ? "section" : "file");
char version = *magic >> 24;
switch(version) {
case '1': {
const SNDLLHeaderV1* header = get_unaligned<SNDLLHeaderV1>(image, 0);
CCC_CHECK(header, "File too small to contain SNDLL V1 header.");
return parse_sndll_common(image, address, type, header->common, SNDLL_V1);
}
case '2': {
const SNDLLHeaderV2* header = get_unaligned<SNDLLHeaderV2>(image, 0);
CCC_CHECK(header, "File too small to contain SNDLL V2 header.");
return parse_sndll_common(image, address, type, header->common, SNDLL_V2);
}
}
return CCC_FAILURE("Unknown SNDLL version '%c'.", version);
}
static Result<SNDLLFile> parse_sndll_common(
std::span<const u8> image, Address address, SNDLLType type, const SNDLLHeaderCommon& common, SNDLLVersion version)
{
SNDLLFile sndll;
sndll.address = address;
sndll.type = type;
sndll.version = version;
if(common.elf_path) {
std::optional<std::string_view> elf_path = get_string(image, common.elf_path);
CCC_CHECK(elf_path.has_value(), "SNDLL header has invalid ELF path field.");
sndll.elf_path = *elf_path;
}
CCC_CHECK(common.symbol_count < (32 * 1024 * 1024) / sizeof(SNDLLSymbol), "SNDLL symbol count is too high.");
sndll.symbols.reserve(common.symbol_count);
for(u32 i = 0; i < common.symbol_count; i++) {
u32 symbol_offset = common.symbols - address.get_or_zero() + i * sizeof(SNDLLSymbolHeader);
const SNDLLSymbolHeader* symbol_header = get_unaligned<SNDLLSymbolHeader>(image, symbol_offset);
CCC_CHECK(symbol_header, "SNDLL symbol out of range.");
std::optional<std::string_view> string;
if(symbol_header->string) {
string = get_string(image, symbol_header->string - address.get_or_zero());
}
SNDLLSymbol& symbol = sndll.symbols.emplace_back();
symbol.type = symbol_header->type;
symbol.value = symbol_header->value;
if(string.has_value()) {
symbol.string = *string;
}
}
return sndll;
}
Result<void> import_sndll_symbols(
SymbolDatabase& database,
const SNDLLFile& sndll,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler)
{
for(const SNDLLSymbol& symbol : sndll.symbols) {
if(symbol.value == 0 || symbol.string.empty()) {
continue;
}
u32 address = symbol.value;
if(symbol.type != SNDLL_ABSOLUTE && sndll.type == SNDLLType::DYNAMIC_LIBRARY) {
address += sndll.address.get_or_zero();
}
if(!(importer_flags & DONT_DEDUPLICATE_SYMBOLS)) {
if(database.functions.first_handle_from_starting_address(address).valid()) {
continue;
}
if(database.global_variables.first_handle_from_starting_address(address).valid()) {
continue;
}
if(database.local_variables.first_handle_from_starting_address(address).valid()) {
continue;
}
}
const Section* section = database.sections.symbol_overlapping_address(address);
if(section) {
if(section->contains_code()) {
Result<Function*> function = database.functions.create_symbol(
symbol.string, group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(function);
continue;
} else if(section->contains_data()) {
Result<GlobalVariable*> global_variable = database.global_variables.create_symbol(
symbol.string, group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(global_variable);
continue;
}
}
Result<Label*> label = database.labels.create_symbol(
symbol.string, group.source, group.module_symbol, address, importer_flags, demangler);
CCC_RETURN_IF_ERROR(label);
}
return Result<void>();
}
void print_sndll_symbols(FILE* out, const SNDLLFile& sndll)
{
fprintf(out, "SNDLL SYMBOLS:\n");
for(const SNDLLSymbol& symbol : sndll.symbols) {
const char* type = sndll_symbol_type_to_string(symbol.type);
const char* string = !symbol.string.empty() ? symbol.string.c_str() : "(no string)";
fprintf(out, "%8s %08x %s\n", type, symbol.value, string);
}
}
static const char* sndll_symbol_type_to_string(SNDLLSymbolType type)
{
switch(type) {
case SNDLL_NIL: return "NIL";
case SNDLL_EXTERNAL: return "EXTERNAL";
case SNDLL_RELATIVE: return "RELATIVE";
case SNDLL_WEAK: return "WEAK";
case SNDLL_ABSOLUTE: return "ABSOLUTE";
}
return "invalid";
}
}

55
3rdparty/ccc/src/ccc/sndll.h vendored Normal file
View File

@@ -0,0 +1,55 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "symbol_database.h"
namespace ccc {
enum class SNDLLType {
SNDATA_SECTION,
DYNAMIC_LIBRARY
};
enum SNDLLVersion {
SNDLL_V1,
SNDLL_V2
};
enum SNDLLSymbolType : u8 {
SNDLL_NIL = 0, // I think this is just so that the first real symbol has an index of 1.
SNDLL_EXTERNAL = 1, // Symbol with an empty value, to be filled in from another module.
SNDLL_RELATIVE = 2, // Global symbol, value is relative to the start of the SNDLL file.
SNDLL_WEAK = 3, // Weak symbol, value is relative to the start of the SNDLL file.
SNDLL_ABSOLUTE = 4 // Global symbol, value is an absolute address.
};
struct SNDLLSymbol {
SNDLLSymbolType type = SNDLL_NIL;
u32 value = 0;
std::string string;
};
struct SNDLLFile {
Address address;
SNDLLType type;
SNDLLVersion version;
std::string elf_path;
std::vector<SNDLLSymbol> symbols;
};
// If a valid address is passed, the pointers in the header will be treated as
// addresses, otherwise they will be treated as file offsets.
Result<SNDLLFile> parse_sndll_file(std::span<const u8> image, Address address, SNDLLType type);
Result<void> import_sndll_symbols(
SymbolDatabase& database,
const SNDLLFile& sndll,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler);
void print_sndll_symbols(FILE* out, const SNDLLFile& sndll);
}

835
3rdparty/ccc/src/ccc/stabs.cpp vendored Normal file
View File

@@ -0,0 +1,835 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "stabs.h"
namespace ccc {
#define STABS_DEBUG(...) //__VA_ARGS__
#define STABS_DEBUG_PRINTF(...) STABS_DEBUG(printf(__VA_ARGS__);)
static bool validate_symbol_descriptor(StabsSymbolDescriptor descriptor);
static Result<std::unique_ptr<StabsType>> parse_stabs_type(const char*& input);
static Result<std::vector<StabsStructOrUnionType::Field>> parse_field_list(const char*& input);
static Result<std::vector<StabsStructOrUnionType::MemberFunctionSet>> parse_member_functions(const char*& input);
static Result<StabsStructOrUnionType::Visibility> parse_visibility_character(const char*& input);
STABS_DEBUG(static void print_field(const StabsStructOrUnionType::Field& field);)
const char* STAB_TRUNCATED_ERROR_MESSAGE =
"STABS symbol truncated. This was probably caused by a GCC bug. "
"Other symbols from the same translation unit may also be invalid.";
Result<StabsSymbol> parse_stabs_symbol(const char*& input)
{
STABS_DEBUG_PRINTF("PARSING %s\n", input);
StabsSymbol symbol;
Result<std::string> name = parse_dodgy_stabs_identifier(input, ':');
CCC_RETURN_IF_ERROR(name);
symbol.name = *name;
CCC_EXPECT_CHAR(input, ':', "identifier");
CCC_CHECK(*input != '\0', "Unexpected end of input.");
if((*input >= '0' && *input <= '9') || *input == '(') {
symbol.descriptor = StabsSymbolDescriptor::LOCAL_VARIABLE;
} else {
char symbol_descriptor = *(input++);
CCC_CHECK(symbol_descriptor != '\0', "Failed to parse symbol descriptor.");
symbol.descriptor = (StabsSymbolDescriptor) symbol_descriptor;
}
CCC_CHECK(validate_symbol_descriptor(symbol.descriptor),
"Invalid symbol descriptor '%c'.",
(char) symbol.descriptor);
CCC_CHECK(*input != '\0', "Unexpected end of input.");
if(*input == 't') {
input++;
}
auto type = parse_top_level_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
// Handle nested functions.
bool is_function =
symbol.descriptor == StabsSymbolDescriptor::LOCAL_FUNCTION ||
symbol.descriptor == StabsSymbolDescriptor::GLOBAL_FUNCTION;
if(is_function && input[0] == ',') {
input++;
while(*input != ',' && *input != '\0') input++; // enclosing function
CCC_EXPECT_CHAR(input, ',', "nested function suffix");
while(*input != ',' && *input != '\0') input++; // function
}
symbol.type = std::move(*type);
// Make sure that variable names aren't used as type names e.g. the STABS
// symbol "somevar:P123=*456" may be referenced by the type number 123, but
// the type name is not "somevar".
bool is_type = symbol.descriptor == StabsSymbolDescriptor::TYPE_NAME
|| symbol.descriptor == StabsSymbolDescriptor::ENUM_STRUCT_OR_TYPE_TAG;
if(is_type) {
symbol.type->name = symbol.name;
}
symbol.type->is_typedef = symbol.descriptor == StabsSymbolDescriptor::TYPE_NAME;
symbol.type->is_root = true;
return symbol;
}
static bool validate_symbol_descriptor(StabsSymbolDescriptor descriptor)
{
bool valid;
switch(descriptor) {
case StabsSymbolDescriptor::LOCAL_VARIABLE:
case StabsSymbolDescriptor::REFERENCE_PARAMETER_A:
case StabsSymbolDescriptor::LOCAL_FUNCTION:
case StabsSymbolDescriptor::GLOBAL_FUNCTION:
case StabsSymbolDescriptor::GLOBAL_VARIABLE:
case StabsSymbolDescriptor::REGISTER_PARAMETER:
case StabsSymbolDescriptor::VALUE_PARAMETER:
case StabsSymbolDescriptor::REGISTER_VARIABLE:
case StabsSymbolDescriptor::STATIC_GLOBAL_VARIABLE:
case StabsSymbolDescriptor::TYPE_NAME:
case StabsSymbolDescriptor::ENUM_STRUCT_OR_TYPE_TAG:
case StabsSymbolDescriptor::STATIC_LOCAL_VARIABLE:
case StabsSymbolDescriptor::REFERENCE_PARAMETER_V:
valid = true;
break;
default:
valid = false;
break;
}
return valid;
}
Result<std::unique_ptr<StabsType>> parse_top_level_stabs_type(const char*& input)
{
Result<std::unique_ptr<StabsType>> type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
// Handle first base class suffixes.
if((*type)->descriptor == StabsTypeDescriptor::STRUCT && input[0] == '~' && input[1] == '%') {
input += 2;
Result<std::unique_ptr<StabsType>> first_base_class = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(first_base_class);
(*type)->as<StabsStructType>().first_base_class = std::move(*first_base_class);
CCC_EXPECT_CHAR(input, ';', "first base class suffix");
}
// Handle extra live range information.
if(input[0] == ';' && input[1] == 'l') {
input += 2;
CCC_EXPECT_CHAR(input, '(', "live range suffix");
CCC_EXPECT_CHAR(input, '#', "live range suffix");
std::optional<s32> start = parse_number_s32(input);
CCC_CHECK(start.has_value(), "Failed to parse live range suffix.");
CCC_EXPECT_CHAR(input, ',', "live range suffix");
CCC_EXPECT_CHAR(input, '#', "live range suffix");
std::optional<s32> end = parse_number_s32(input);
CCC_CHECK(end.has_value(), "Failed to parse live range suffix.");
CCC_EXPECT_CHAR(input, ')', "live range suffix");
}
return type;
}
static Result<std::unique_ptr<StabsType>> parse_stabs_type(const char*& input)
{
StabsTypeNumber type_number;
CCC_CHECK(*input != '\0', "Unexpected end of input.");
if(*input == '(') {
// This file has type numbers made up of two pieces: an include file
// index and a type number.
input++;
std::optional<s32> file_index = parse_number_s32(input);
CCC_CHECK(file_index.has_value(), "Failed to parse type number (file index).");
CCC_EXPECT_CHAR(input, ',', "type number");
std::optional<s32> type_index = parse_number_s32(input);
CCC_CHECK(type_index.has_value(), "Failed to parse type number (type index).");
CCC_EXPECT_CHAR(input, ')', "type number");
type_number.file = *file_index;
type_number.type = *type_index;
if(*input != '=') {
return std::make_unique<StabsType>(type_number);
}
input++;
} else if(*input >= '0' && *input <= '9') {
// This file has type numbers which are just a single number. This is
// the more common case for games.
std::optional<s32> type_index = parse_number_s32(input);
CCC_CHECK(type_index.has_value(), "Failed to parse type number.");
type_number.type = *type_index;
if(*input != '=') {
return std::make_unique<StabsType>(type_number);
}
input++;
}
CCC_CHECK(*input != '\0', "Unexpected end of input.");
StabsTypeDescriptor descriptor;
if((*input >= '0' && *input <= '9') || *input == '(') {
descriptor = StabsTypeDescriptor::TYPE_REFERENCE;
} else {
char descriptor_char = *(input++);
CCC_CHECK(descriptor_char != '\0', "Failed to parse type descriptor.");
descriptor = (StabsTypeDescriptor) descriptor_char;
}
std::unique_ptr<StabsType> out_type;
switch(descriptor) {
case StabsTypeDescriptor::TYPE_REFERENCE: { // 0..9
auto type_reference = std::make_unique<StabsTypeReferenceType>(type_number);
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
type_reference->type = std::move(*type);
out_type = std::move(type_reference);
break;
}
case StabsTypeDescriptor::ARRAY: { // a
auto array = std::make_unique<StabsArrayType>(type_number);
auto index_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(index_type);
array->index_type = std::move(*index_type);
auto element_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(element_type);
array->element_type = std::move(*element_type);
out_type = std::move(array);
break;
}
case StabsTypeDescriptor::ENUM: { // e
auto enum_type = std::make_unique<StabsEnumType>(type_number);
STABS_DEBUG_PRINTF("enum {\n");
while(*input != ';') {
std::optional<std::string> name = parse_stabs_identifier(input, ':');
CCC_CHECK(name.has_value(), "Failed to parse enum field name.");
CCC_EXPECT_CHAR(input, ':', "enum");
std::optional<s32> value = parse_number_s32(input);
CCC_CHECK(value.has_value(), "Failed to parse enum value.");
enum_type->fields.emplace_back(*value, std::move(*name));
CCC_EXPECT_CHAR(input, ',', "enum");
}
input++;
STABS_DEBUG_PRINTF("}\n");
out_type = std::move(enum_type);
break;
}
case StabsTypeDescriptor::FUNCTION: { // f
auto function = std::make_unique<StabsFunctionType>(type_number);
auto return_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(return_type);
function->return_type = std::move(*return_type);
out_type = std::move(function);
break;
}
case StabsTypeDescriptor::VOLATILE_QUALIFIER: { // B
auto volatile_qualifier = std::make_unique<StabsVolatileQualifierType>(type_number);
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
volatile_qualifier->type = std::move(*type);
out_type = std::move(volatile_qualifier);
break;
}
case StabsTypeDescriptor::CONST_QUALIFIER: { // k
auto const_qualifier = std::make_unique<StabsConstQualifierType>(type_number);
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
const_qualifier->type = std::move(*type);
out_type = std::move(const_qualifier);
break;
}
case StabsTypeDescriptor::RANGE: { // r
auto range = std::make_unique<StabsRangeType>(type_number);
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
range->type = std::move(*type);
CCC_EXPECT_CHAR(input, ';', "range type descriptor");
std::optional<std::string> low = parse_stabs_identifier(input, ';');
CCC_CHECK(low.has_value(), "Failed to parse low part of range.");
CCC_EXPECT_CHAR(input, ';', "low range value");
std::optional<std::string> high = parse_stabs_identifier(input, ';');
CCC_CHECK(high.has_value(), "Failed to parse high part of range.");
CCC_EXPECT_CHAR(input, ';', "high range value");
range->low = std::move(*low);
range->high = std::move(*high);
out_type = std::move(range);
break;
}
case StabsTypeDescriptor::STRUCT: { // s
auto struct_type = std::make_unique<StabsStructType>(type_number);
STABS_DEBUG_PRINTF("struct {\n");
std::optional<s64> struct_size = parse_number_s64(input);
CCC_CHECK(struct_size.has_value(), "Failed to parse struct size.");
struct_type->size = *struct_size;
if(*input == '!') {
input++;
std::optional<s32> base_class_count = parse_number_s32(input);
CCC_CHECK(base_class_count.has_value(), "Failed to parse base class count.");
CCC_EXPECT_CHAR(input, ',', "base class section");
for(s64 i = 0; i < *base_class_count; i++) {
StabsStructOrUnionType::BaseClass base_class;
char is_virtual = *(input++);
switch(is_virtual) {
case '0': base_class.is_virtual = false; break;
case '1': base_class.is_virtual = true; break;
default: return CCC_FAILURE("Failed to parse base class (virtual character).");
}
Result<StabsStructOrUnionType::Visibility> visibility = parse_visibility_character(input);
CCC_RETURN_IF_ERROR(visibility);
base_class.visibility = *visibility;
std::optional<s32> offset = parse_number_s32(input);
CCC_CHECK(offset.has_value(), "Failed to parse base class offset.");
base_class.offset = (s32) *offset;
CCC_EXPECT_CHAR(input, ',', "base class section");
auto base_class_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(base_class_type);
base_class.type = std::move(*base_class_type);
CCC_EXPECT_CHAR(input, ';', "base class section");
struct_type->base_classes.emplace_back(std::move(base_class));
}
}
auto fields = parse_field_list(input);
CCC_RETURN_IF_ERROR(fields);
struct_type->fields = std::move(*fields);
auto member_functions = parse_member_functions(input);
CCC_RETURN_IF_ERROR(member_functions);
struct_type->member_functions = std::move(*member_functions);
STABS_DEBUG_PRINTF("}\n");
out_type = std::move(struct_type);
break;
}
case StabsTypeDescriptor::UNION: { // u
auto union_type = std::make_unique<StabsUnionType>(type_number);
STABS_DEBUG_PRINTF("union {\n");
std::optional<s64> union_size = parse_number_s64(input);
CCC_CHECK(union_size.has_value(), "Failed to parse struct size.");
union_type->size = *union_size;
auto fields = parse_field_list(input);
CCC_RETURN_IF_ERROR(fields);
union_type->fields = std::move(*fields);
auto member_functions = parse_member_functions(input);
CCC_RETURN_IF_ERROR(member_functions);
union_type->member_functions = std::move(*member_functions);
STABS_DEBUG_PRINTF("}\n");
out_type = std::move(union_type);
break;
}
case StabsTypeDescriptor::CROSS_REFERENCE: { // x
auto cross_reference = std::make_unique<StabsCrossReferenceType>(type_number);
char cross_reference_type = *(input++);
CCC_CHECK(cross_reference_type != '\0', "Failed to parse cross reference type.");
switch(cross_reference_type) {
case 'e': cross_reference->type = ast::ForwardDeclaredType::ENUM; break;
case 's': cross_reference->type = ast::ForwardDeclaredType::STRUCT; break;
case 'u': cross_reference->type = ast::ForwardDeclaredType::UNION; break;
default:
return CCC_FAILURE("Invalid cross reference type '%c'.", cross_reference->type);
}
Result<std::string> identifier = parse_dodgy_stabs_identifier(input, ':');
CCC_RETURN_IF_ERROR(identifier);
cross_reference->identifier = std::move(*identifier);
cross_reference->name = cross_reference->identifier;
CCC_EXPECT_CHAR(input, ':', "cross reference");
out_type = std::move(cross_reference);
break;
}
case StabsTypeDescriptor::FLOATING_POINT_BUILTIN: { // R
auto fp_builtin = std::make_unique<StabsFloatingPointBuiltInType>(type_number);
std::optional<s32> fpclass = parse_number_s32(input);
CCC_CHECK(fpclass.has_value(), "Failed to parse floating point built-in class.");
fp_builtin->fpclass = *fpclass;
CCC_EXPECT_CHAR(input, ';', "floating point builtin");
std::optional<s32> bytes = parse_number_s32(input);
CCC_CHECK(bytes.has_value(), "Failed to parse floating point built-in.");
fp_builtin->bytes = *bytes;
CCC_EXPECT_CHAR(input, ';', "floating point builtin");
std::optional<s32> value = parse_number_s32(input);
CCC_CHECK(value.has_value(), "Failed to parse floating point built-in.");
CCC_EXPECT_CHAR(input, ';', "floating point builtin");
out_type = std::move(fp_builtin);
break;
}
case StabsTypeDescriptor::METHOD: { // #
auto method = std::make_unique<StabsMethodType>(type_number);
if(*input == '#') {
input++;
auto return_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(return_type);
method->return_type = std::move(*return_type);
if(*input == ';') {
input++;
}
} else {
auto class_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(class_type);
method->class_type = std::move(*class_type);
CCC_EXPECT_CHAR(input, ',', "method");
auto return_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(return_type);
method->return_type = std::move(*return_type);
while(*input != '\0') {
if(*input == ';') {
input++;
break;
}
CCC_EXPECT_CHAR(input, ',', "method");
auto parameter_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(parameter_type);
method->parameter_types.emplace_back(std::move(*parameter_type));
}
}
out_type = std::move(method);
break;
}
case StabsTypeDescriptor::REFERENCE: { // &
auto reference = std::make_unique<StabsReferenceType>(type_number);
auto value_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(value_type);
reference->value_type = std::move(*value_type);
out_type = std::move(reference);
break;
}
case StabsTypeDescriptor::POINTER: { // *
auto pointer = std::make_unique<StabsPointerType>(type_number);
auto value_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(value_type);
pointer->value_type = std::move(*value_type);
out_type = std::move(pointer);
break;
}
case StabsTypeDescriptor::TYPE_ATTRIBUTE: { // @
if((*input >= '0' && *input <= '9') || *input == '(') {
auto member_pointer = std::make_unique<StabsPointerToDataMemberType>(type_number);
auto class_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(class_type);
member_pointer->class_type = std::move(*class_type);
CCC_EXPECT_CHAR(input, ',', "pointer to non-static data member");
auto member_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(member_type);
member_pointer->member_type = std::move(*member_type);
out_type = std::move(member_pointer);
} else {
auto type_attribute = std::make_unique<StabsSizeTypeAttributeType>(type_number);
CCC_CHECK(*input == 's', "Weird value following '@' type descriptor.");
input++;
std::optional<s64> size_bits = parse_number_s64(input);
CCC_CHECK(size_bits.has_value(), "Failed to parse type attribute.")
type_attribute->size_bits = *size_bits;
CCC_EXPECT_CHAR(input, ';', "type attribute");
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
type_attribute->type = std::move(*type);
out_type = std::move(type_attribute);
}
break;
}
case StabsTypeDescriptor::BUILTIN: { // -
auto built_in = std::make_unique<StabsBuiltInType>(type_number);
std::optional<s64> type_id = parse_number_s64(input);
CCC_CHECK(type_id.has_value(), "Failed to parse built-in.");
built_in->type_id = *type_id;
CCC_EXPECT_CHAR(input, ';', "builtin");
out_type = std::move(built_in);
break;
}
default: {
return CCC_FAILURE(
"Invalid type descriptor '%c' (%02x).",
(u32) descriptor, (u32) descriptor);
}
}
return out_type;
}
static Result<std::vector<StabsStructOrUnionType::Field>> parse_field_list(const char*& input)
{
std::vector<StabsStructOrUnionType::Field> fields;
while(*input != '\0') {
if(*input == ';') {
input++;
break;
}
const char* before_field = input;
StabsStructOrUnionType::Field field;
Result<std::string> name = parse_dodgy_stabs_identifier(input, ':');
CCC_RETURN_IF_ERROR(name);
field.name = std::move(*name);
CCC_EXPECT_CHAR(input, ':', "identifier");
if(*input == '/') {
input++;
Result<StabsStructOrUnionType::Visibility> visibility = parse_visibility_character(input);
CCC_RETURN_IF_ERROR(visibility);
field.visibility = *visibility;
}
if(*input == ':') {
input = before_field;
break;
}
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
field.type = std::move(*type);
if(field.name.size() >= 1 && field.name[0] == '$') {
// Virtual function table pointers and virtual base class pointers.
CCC_EXPECT_CHAR(input, ',', "field type");
std::optional<s32> offset_bits = parse_number_s32(input);
CCC_CHECK(offset_bits.has_value(), "Failed to parse field offset.");
field.offset_bits = *offset_bits;
CCC_EXPECT_CHAR(input, ';', "field offset");
} else if(*input == ':') {
// Static fields.
input++;
field.is_static = true;
std::optional<std::string> type_name = parse_stabs_identifier(input, ';');
CCC_CHECK(type_name.has_value(), "Failed to parse static field type name.");
field.type_name = std::move(*type_name);
CCC_EXPECT_CHAR(input, ';', "identifier");
} else if(*input == ',') {
// Normal fields.
input++;
std::optional<s32> offset_bits = parse_number_s32(input);
CCC_CHECK(offset_bits.has_value(), "Failed to parse field offset.");
field.offset_bits = *offset_bits;
CCC_EXPECT_CHAR(input, ',', "field offset");
std::optional<s32> size_bits = parse_number_s32(input);
CCC_CHECK(size_bits.has_value(), "Failed to parse field size.");
field.size_bits = *size_bits;
CCC_EXPECT_CHAR(input, ';', "field size");
} else {
return CCC_FAILURE("Expected ':' or ',', got '%c' (%hhx).", *input, *input);
}
STABS_DEBUG(print_field(field);)
fields.emplace_back(std::move(field));
}
return fields;
}
static Result<std::vector<StabsStructOrUnionType::MemberFunctionSet>> parse_member_functions(const char*& input)
{
// Check for if the next character is from an enclosing field list. If this
// is the case, the next character will be ',' for normal fields and ':' for
// static fields (see above).
if(*input == ',' || *input == ':') {
return std::vector<StabsStructOrUnionType::MemberFunctionSet>();
}
std::vector<StabsStructOrUnionType::MemberFunctionSet> member_functions;
while(*input != '\0') {
if(*input == ';') {
input++;
break;
}
StabsStructOrUnionType::MemberFunctionSet member_function_set;
std::optional<std::string> name = parse_stabs_identifier(input, ':');
CCC_CHECK(name.has_value(), "Failed to parse member function name.");
member_function_set.name = std::move(*name);
CCC_EXPECT_CHAR(input, ':', "member function");
CCC_EXPECT_CHAR(input, ':', "member function");
while(*input != '\0') {
if(*input == ';') {
input++;
break;
}
StabsStructOrUnionType::MemberFunction function;
auto type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(type);
function.type = std::move(*type);
CCC_EXPECT_CHAR(input, ':', "member function");
std::optional<std::string> identifier = parse_stabs_identifier(input, ';');
CCC_CHECK(identifier.has_value(), "Invalid member function identifier.");
CCC_EXPECT_CHAR(input, ';', "member function");
Result<StabsStructOrUnionType::Visibility> visibility = parse_visibility_character(input);
CCC_RETURN_IF_ERROR(visibility);
function.visibility = *visibility;
char modifiers = *(input++);
CCC_CHECK(modifiers != '\0', "Failed to parse member function modifiers.");
switch(modifiers) {
case 'A':
function.is_const = false;
function.is_volatile = false;
break;
case 'B':
function.is_const = true;
function.is_volatile = false;
break;
case 'C':
function.is_const = false;
function.is_volatile = true;
break;
case 'D':
function.is_const = true;
function.is_volatile = true;
break;
case '?':
case '.':
break;
default:
return CCC_FAILURE("Invalid member function modifiers.");
}
char flag = *(input++);
CCC_CHECK(flag != '\0', "Failed to parse member function type.");
switch(flag) {
case '.': { // normal member function
function.modifier = ast::MemberFunctionModifier::NONE;
break;
}
case '?': { // static member function
function.modifier = ast::MemberFunctionModifier::STATIC;
break;
}
case '*': { // virtual member function
std::optional<s32> vtable_index = parse_number_s32(input);
CCC_CHECK(vtable_index.has_value(), "Failed to parse vtable index.");
function.vtable_index = *vtable_index;
CCC_EXPECT_CHAR(input, ';', "virtual member function");
auto virtual_type = parse_stabs_type(input);
CCC_RETURN_IF_ERROR(virtual_type);
function.virtual_type = std::move(*virtual_type);
CCC_EXPECT_CHAR(input, ';', "virtual member function");
function.modifier = ast::MemberFunctionModifier::VIRTUAL;
break;
}
default:
return CCC_FAILURE("Invalid member function type.");
}
member_function_set.overloads.emplace_back(std::move(function));
}
STABS_DEBUG_PRINTF("member func: %s\n", member_function_set.name.c_str());
member_functions.emplace_back(std::move(member_function_set));
}
return member_functions;
}
static Result<StabsStructOrUnionType::Visibility> parse_visibility_character(const char*& input)
{
char visibility = *(input++);
switch(visibility) {
case '0': return StabsStructOrUnionType::Visibility::PRIVATE;
case '1': return StabsStructOrUnionType::Visibility::PROTECTED;
case '2': return StabsStructOrUnionType::Visibility::PUBLIC;
case '9': return StabsStructOrUnionType::Visibility::PUBLIC_OPTIMIZED_OUT;
default: break;
}
return CCC_FAILURE("Failed to parse visibility character.");
}
std::optional<s32> parse_number_s32(const char*& input)
{
char* end;
s64 value = strtoll(input, &end, 10);
if(end == input) {
return std::nullopt;
}
input = end;
return (s32) value;
}
std::optional<s64> parse_number_s64(const char*& input)
{
char* end;
s64 value = strtoll(input, &end, 10);
if(end == input) {
return std::nullopt;
}
input = end;
return value;
}
std::optional<std::string> parse_stabs_identifier(const char*& input, char terminator)
{
const char* begin = input;
for(; *input != '\0'; input++) {
if(*input == terminator) {
return std::string(begin, input);
}
}
return std::nullopt;
}
// The complexity here is because the input may contain an unescaped namespace
// separator '::' even if the field terminator is supposed to be a colon, as
// well as the raw contents of character literals. See test/ccc/stabs_tests.cpp
// for some examples.
Result<std::string> parse_dodgy_stabs_identifier(const char*& input, char terminator)
{
const char* begin = input;
s32 template_depth = 0;
for(; *input != '\0'; input++) {
// Skip past character literals.
if(*input == '\'') {
input++;
if(*input == '\'') {
input++; // Handle character literals containing a single quote.
}
while(*input != '\'' && *input != '\0') {
input++;
}
if(*input == '\0') {
break;
}
input++;
}
// Keep track of the template depth so we know when to expect the
// terminator character.
if(*input == '<') {
template_depth++;
}
if(*input == '>') {
template_depth--;
}
if(*input == terminator && template_depth == 0) {
return std::string(begin, input);
}
}
return CCC_FAILURE(STAB_TRUNCATED_ERROR_MESSAGE);
}
STABS_DEBUG(
static void print_field(const StabsStructOrUnionType::Field& field)
{
printf("\t%04x %04x %04x %04x %s\n", field.offset_bits / 8, field.size_bits / 8, field.offset_bits, field.size_bits, field.name.c_str());
}
)
const char* stabs_field_visibility_to_string(StabsStructOrUnionType::Visibility visibility)
{
switch(visibility) {
case StabsStructOrUnionType::Visibility::PRIVATE: return "private";
case StabsStructOrUnionType::Visibility::PROTECTED: return "protected";
case StabsStructOrUnionType::Visibility::PUBLIC: return "public";
case StabsStructOrUnionType::Visibility::PUBLIC_OPTIMIZED_OUT: return "public_optimizedout";
default: return "none";
}
return "";
}
}

379
3rdparty/ccc/src/ccc/stabs.h vendored Normal file
View File

@@ -0,0 +1,379 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "ast.h"
#include "util.h"
namespace ccc {
enum class StabsSymbolDescriptor : u8 {
LOCAL_VARIABLE = '_',
REFERENCE_PARAMETER_A = 'a',
LOCAL_FUNCTION = 'f',
GLOBAL_FUNCTION = 'F',
GLOBAL_VARIABLE = 'G',
REGISTER_PARAMETER = 'P',
VALUE_PARAMETER = 'p',
REGISTER_VARIABLE = 'r',
STATIC_GLOBAL_VARIABLE = 'S',
TYPE_NAME = 't',
ENUM_STRUCT_OR_TYPE_TAG = 'T',
STATIC_LOCAL_VARIABLE = 'V',
REFERENCE_PARAMETER_V = 'v'
};
struct StabsType;
struct StabsSymbol {
StabsSymbolDescriptor descriptor;
std::string name;
std::unique_ptr<StabsType> type;
};
Result<StabsSymbol> parse_stabs_symbol(const char*& input);
enum class StabsTypeDescriptor : u8 {
TYPE_REFERENCE = 0xef, // '0'..'9','('
ARRAY = 'a',
ENUM = 'e',
FUNCTION = 'f',
CONST_QUALIFIER = 'k',
RANGE = 'r',
STRUCT = 's',
UNION = 'u',
CROSS_REFERENCE = 'x',
VOLATILE_QUALIFIER = 'B',
FLOATING_POINT_BUILTIN = 'R',
METHOD = '#',
REFERENCE = '&',
POINTER = '*',
TYPE_ATTRIBUTE = '@',
POINTER_TO_DATA_MEMBER = 0xee, // also '@'
BUILTIN = '-'
};
struct StabsBaseClass;
struct StabsField;
struct StabsMemberFunctionSet;
// e.g. for "123=*456" 123 would be the type_number, the type descriptor would
// be of type POINTER and StabsPointerType::value_type would point to a type
// with type_number = 456.
struct StabsType {
StabsTypeNumber type_number;
// The name field is only populated for root types and cross references.
std::optional<std::string> name;
bool is_typedef = false;
bool is_root = false;
std::optional<StabsTypeDescriptor> descriptor;
StabsType(StabsTypeNumber n) : type_number(n) {}
StabsType(StabsTypeDescriptor d) : descriptor(d) {}
StabsType(StabsTypeNumber n, StabsTypeDescriptor d) : type_number(n), descriptor(d) {}
virtual ~StabsType() {}
template <typename SubType>
SubType& as()
{
CCC_ASSERT(descriptor == SubType::DESCRIPTOR);
return *static_cast<SubType*>(this);
}
template <typename SubType>
const SubType& as() const
{
CCC_ASSERT(descriptor == SubType::DESCRIPTOR);
return *static_cast<const SubType*>(this);
}
virtual void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const
{
if(type_number.valid() && descriptor.has_value()) {
output.emplace(type_number, this);
}
}
};
struct StabsTypeReferenceType : StabsType {
std::unique_ptr<StabsType> type;
StabsTypeReferenceType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::TYPE_REFERENCE;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
type->enumerate_numbered_types(output);
}
};
struct StabsArrayType : StabsType {
std::unique_ptr<StabsType> index_type;
std::unique_ptr<StabsType> element_type;
StabsArrayType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::ARRAY;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
index_type->enumerate_numbered_types(output);
element_type->enumerate_numbered_types(output);
}
};
struct StabsEnumType : StabsType {
std::vector<std::pair<s32, std::string>> fields;
StabsEnumType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::ENUM;
};
struct StabsFunctionType : StabsType {
std::unique_ptr<StabsType> return_type;
StabsFunctionType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::FUNCTION;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
return_type->enumerate_numbered_types(output);
}
};
struct StabsVolatileQualifierType : StabsType {
std::unique_ptr<StabsType> type;
StabsVolatileQualifierType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::VOLATILE_QUALIFIER;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
type->enumerate_numbered_types(output);
}
};
struct StabsConstQualifierType : StabsType {
std::unique_ptr<StabsType> type;
StabsConstQualifierType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::CONST_QUALIFIER;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
type->enumerate_numbered_types(output);
}
};
struct StabsRangeType : StabsType {
std::unique_ptr<StabsType> type;
std::string low;
std::string high; // Some compilers wrote out a wrapped around value here for zero (or variable?) length arrays.
StabsRangeType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::RANGE;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
type->enumerate_numbered_types(output);
}
};
struct StabsStructOrUnionType : StabsType {
enum class Visibility : u8 {
NONE,
PRIVATE,
PROTECTED,
PUBLIC,
PUBLIC_OPTIMIZED_OUT
};
struct BaseClass {
bool is_virtual;
Visibility visibility;
s32 offset = -1;
std::unique_ptr<StabsType> type;
};
struct Field {
std::string name;
Visibility visibility = Visibility::NONE;
std::unique_ptr<StabsType> type;
bool is_static = false;
s32 offset_bits = 0;
s32 size_bits = 0;
std::string type_name;
};
struct MemberFunction {
std::unique_ptr<StabsType> type;
std::unique_ptr<StabsType> virtual_type;
Visibility visibility;
bool is_const = false;
bool is_volatile = false;
ast::MemberFunctionModifier modifier = ast::MemberFunctionModifier::NONE;
s32 vtable_index = -1;
};
struct MemberFunctionSet {
std::string name;
std::vector<MemberFunction> overloads;
};
s64 size = -1;
std::vector<BaseClass> base_classes;
std::vector<Field> fields;
std::vector<MemberFunctionSet> member_functions;
std::unique_ptr<StabsType> first_base_class;
StabsStructOrUnionType(StabsTypeNumber n, StabsTypeDescriptor d) : StabsType(n, d) {}
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
for(const BaseClass& base_class : base_classes) {
base_class.type->enumerate_numbered_types(output);
}
for(const Field& field : fields) {
field.type->enumerate_numbered_types(output);
}
for(const MemberFunctionSet& member_function_set : member_functions) {
for(const MemberFunction& member_function : member_function_set.overloads) {
member_function.type->enumerate_numbered_types(output);
if(member_function.virtual_type.get()) {
member_function.virtual_type->enumerate_numbered_types(output);
}
}
}
if(first_base_class.get()) {
first_base_class->enumerate_numbered_types(output);
}
}
};
struct StabsStructType : StabsStructOrUnionType {
StabsStructType(StabsTypeNumber n) : StabsStructOrUnionType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::STRUCT;
};
struct StabsUnionType : StabsStructOrUnionType {
StabsUnionType(StabsTypeNumber n) : StabsStructOrUnionType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::UNION;
};
struct StabsCrossReferenceType : StabsType {
ast::ForwardDeclaredType type;
std::string identifier;
StabsCrossReferenceType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::CROSS_REFERENCE;
};
struct StabsFloatingPointBuiltInType : StabsType {
s32 fpclass = -1;
s32 bytes = -1;
StabsFloatingPointBuiltInType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::FLOATING_POINT_BUILTIN;
};
struct StabsMethodType : StabsType {
std::unique_ptr<StabsType> return_type;
std::optional<std::unique_ptr<StabsType>> class_type;
std::vector<std::unique_ptr<StabsType>> parameter_types;
StabsMethodType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::METHOD;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
return_type->enumerate_numbered_types(output);
if(class_type.has_value()) {
(*class_type)->enumerate_numbered_types(output);
}
for(const std::unique_ptr<StabsType>& parameter_type : parameter_types) {
parameter_type->enumerate_numbered_types(output);
}
}
};
struct StabsReferenceType : StabsType {
std::unique_ptr<StabsType> value_type;
StabsReferenceType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::REFERENCE;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
value_type->enumerate_numbered_types(output);
}
};
struct StabsPointerType : StabsType {
std::unique_ptr<StabsType> value_type;
StabsPointerType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::POINTER;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
value_type->enumerate_numbered_types(output);
}
};
struct StabsSizeTypeAttributeType : StabsType {
s64 size_bits = -1;
std::unique_ptr<StabsType> type;
StabsSizeTypeAttributeType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::TYPE_ATTRIBUTE;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
type->enumerate_numbered_types(output);
}
};
struct StabsPointerToDataMemberType : StabsType {
std::unique_ptr<StabsType> class_type;
std::unique_ptr<StabsType> member_type;
StabsPointerToDataMemberType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::POINTER_TO_DATA_MEMBER;
void enumerate_numbered_types(std::map<StabsTypeNumber, const StabsType*>& output) const override
{
StabsType::enumerate_numbered_types(output);
class_type->enumerate_numbered_types(output);
member_type->enumerate_numbered_types(output);
}
};
struct StabsBuiltInType : StabsType {
s64 type_id = -1;
StabsBuiltInType(StabsTypeNumber n) : StabsType(n, DESCRIPTOR) {}
static const constexpr StabsTypeDescriptor DESCRIPTOR = StabsTypeDescriptor::BUILTIN;
};
extern const char* STAB_TRUNCATED_ERROR_MESSAGE;
Result<std::unique_ptr<StabsType>> parse_top_level_stabs_type(const char*& input);
std::optional<s32> parse_number_s32(const char*& input);
std::optional<s64> parse_number_s64(const char*& input);
std::optional<std::string> parse_stabs_identifier(const char*& input, char terminator);
Result<std::string> parse_dodgy_stabs_identifier(const char*& input, char terminator);
const char* stabs_field_visibility_to_string(StabsStructOrUnionType::Visibility visibility);
}

834
3rdparty/ccc/src/ccc/stabs_to_ast.cpp vendored Normal file
View File

@@ -0,0 +1,834 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "stabs_to_ast.h"
#include "importer_flags.h"
#define AST_DEBUG(...) //__VA_ARGS__
#define AST_DEBUG_PRINTF(...) AST_DEBUG(printf(__VA_ARGS__);)
namespace ccc {
struct MemberFunctionInfo {
std::string name;
bool is_constructor_or_destructor = false;
bool is_special_member_function = false;
bool is_operator_member_function = false;
};
static bool is_void_like(const StabsType& type);
static Result<ast::BuiltInClass> classify_range(const StabsRangeType& type);
static Result<std::unique_ptr<ast::Node>> field_to_ast(
const StabsStructOrUnionType::Field& field,
const StabsType& enclosing_struct,
const StabsToAstState& state,
s32 depth);
static Result<bool> detect_bitfield(const StabsStructOrUnionType::Field& field, const StabsToAstState& state);
static Result<std::vector<std::unique_ptr<ast::Node>>> member_functions_to_ast(
const StabsStructOrUnionType& type, const StabsToAstState& state, s32 depth);
static MemberFunctionInfo check_member_function(
const std::string& mangled_name,
std::string_view type_name_no_template_args,
const DemanglerFunctions& demangler,
u32 importer_flags);
Result<std::unique_ptr<ast::Node>> stabs_type_to_ast(
const StabsType& type,
const StabsType* enclosing_struct,
const StabsToAstState& state,
s32 depth,
bool substitute_type_name,
bool force_substitute)
{
AST_DEBUG_PRINTF("%-*stype desc=%hhx '%c' num=(%d,%d) name=%s\n",
depth * 4, "",
type.descriptor.has_value() ? (u8) *type.descriptor : 'X',
(type.descriptor.has_value() && isprint((u8) *type.descriptor)) ? (u8) *type.descriptor : '!',
type.type_number.file, type.type_number.type,
type.name.has_value() ? type.name->c_str() : "");
if(depth > 200) {
const char* error_message = "Call depth greater than 200 in stabs_type_to_ast, probably infinite recursion.";
if(state.importer_flags & STRICT_PARSING) {
return CCC_FAILURE(error_message);
} else {
CCC_WARN(error_message);
auto error = std::make_unique<ast::Error>();
error->message = error_message;
return std::unique_ptr<ast::Node>(std::move(error));
}
}
// This makes sure that types are replaced with their type name in cases
// where that would be more appropriate.
if(type.name.has_value()) {
bool try_substitute = depth > 0 && (type.is_root
|| type.descriptor == StabsTypeDescriptor::RANGE
|| type.descriptor == StabsTypeDescriptor::BUILTIN);
// GCC emits anonymous enums with a name of " " since apparently some
// debuggers can't handle zero-length names.
bool is_name_empty = type.name == "" || type.name == " ";
// Cross references will be handled below.
bool is_cross_reference = type.descriptor == StabsTypeDescriptor::CROSS_REFERENCE;
bool is_void = is_void_like(type);
if((substitute_type_name || try_substitute) && !is_name_empty && !is_cross_reference && !is_void) {
auto type_name = std::make_unique<ast::TypeName>();
type_name->source = ast::TypeNameSource::REFERENCE;
type_name->unresolved_stabs = std::make_unique<ast::TypeName::UnresolvedStabs>();
type_name->unresolved_stabs->type_name = *type.name;
type_name->unresolved_stabs->referenced_file_handle = state.file_handle;
type_name->unresolved_stabs->stabs_type_number = type.type_number;
return std::unique_ptr<ast::Node>(std::move(type_name));
}
}
// This prevents infinite recursion when an automatically generated member
// function references an unnamed type.
bool can_compare_type_numbers = type.type_number.valid() && enclosing_struct && enclosing_struct->type_number.valid();
if(force_substitute && can_compare_type_numbers && type.type_number == enclosing_struct->type_number) {
// It's probably a this parameter (or return type) for an unnamed type.
auto type_name = std::make_unique<ast::TypeName>();
type_name->source = ast::TypeNameSource::UNNAMED_THIS;
type_name->unresolved_stabs = std::make_unique<ast::TypeName::UnresolvedStabs>();
type_name->unresolved_stabs->type_name = enclosing_struct->name.has_value() ? *enclosing_struct->name : "";
type_name->unresolved_stabs->referenced_file_handle = state.file_handle;
type_name->unresolved_stabs->stabs_type_number = type.type_number;
return std::unique_ptr<ast::Node>(std::move(type_name));
}
if(!type.descriptor.has_value()) {
// The definition of the type has been defined previously, so we have to
// look it up by its type number.
CCC_CHECK(type.type_number.valid(), "Cannot lookup type (type is anonymous).");
auto stabs_type = state.stabs_types->find(type.type_number);
if(stabs_type == state.stabs_types->end()) {
std::string error_message = "Failed to lookup STABS type by its type number ("
+ std::to_string(type.type_number.file) + "," + std::to_string(type.type_number.type) + ").";
if(state.importer_flags & STRICT_PARSING) {
return CCC_FAILURE("%s", error_message.c_str());
} else {
CCC_WARN("%s", error_message.c_str());
std::unique_ptr<ast::Error> error = std::make_unique<ast::Error>();
error->message = std::move(error_message);
return std::unique_ptr<ast::Node>(std::move(error));
}
}
return stabs_type_to_ast(
*stabs_type->second,
enclosing_struct,
state,
depth + 1,
substitute_type_name,
force_substitute);
}
std::unique_ptr<ast::Node> result;
switch(*type.descriptor) {
case StabsTypeDescriptor::TYPE_REFERENCE: {
const auto& stabs_type_ref = type.as<StabsTypeReferenceType>();
if(!type.type_number.valid() || !stabs_type_ref.type->type_number.valid() || stabs_type_ref.type->type_number != type.type_number) {
auto node = stabs_type_to_ast(
*stabs_type_ref.type,
enclosing_struct,
state,
depth + 1,
substitute_type_name,
force_substitute);
CCC_RETURN_IF_ERROR(node);
result = std::move(*node);
} else {
// I still don't know why in STABS void is a reference to
// itself, maybe because I'm not a philosopher.
auto builtin = std::make_unique<ast::BuiltIn>();
builtin->bclass = ast::BuiltInClass::VOID_TYPE;
result = std::move(builtin);
}
break;
}
case StabsTypeDescriptor::ARRAY: {
auto array = std::make_unique<ast::Array>();
const auto& stabs_array = type.as<StabsArrayType>();
auto element_node = stabs_type_to_ast(
*stabs_array.element_type,
enclosing_struct,
state,
depth + 1,
true,
force_substitute);
CCC_RETURN_IF_ERROR(element_node);
array->element_type = std::move(*element_node);
const StabsRangeType& index = stabs_array.index_type->as<StabsRangeType>();
char* end = nullptr;
const char* low = index.low.c_str();
s64 low_value = strtoll(low, &end, 10);
CCC_CHECK(end != low, "Failed to parse low part of range as integer.");
CCC_CHECK(low_value == 0, "Invalid index type for array.");
const char* high = index.high.c_str();
s64 high_value = strtoll(high, &end, 10);
CCC_CHECK(end != high, "Failed to parse low part of range as integer.");
if(high_value == 4294967295) {
// Some compilers wrote out a wrapped around value here.
array->element_count = 0;
} else {
array->element_count = (s32) high_value + 1;
}
result = std::move(array);
break;
}
case StabsTypeDescriptor::ENUM: {
auto inline_enum = std::make_unique<ast::Enum>();
const auto& stabs_enum = type.as<StabsEnumType>();
inline_enum->constants = stabs_enum.fields;
result = std::move(inline_enum);
break;
}
case StabsTypeDescriptor::FUNCTION: {
auto function = std::make_unique<ast::Function>();
auto node = stabs_type_to_ast(
*type.as<StabsFunctionType>().return_type,
enclosing_struct,
state,
depth + 1,
true,
force_substitute);
CCC_RETURN_IF_ERROR(node);
function->return_type = std::move(*node);
result = std::move(function);
break;
}
case StabsTypeDescriptor::VOLATILE_QUALIFIER: {
const auto& volatile_qualifier = type.as<StabsVolatileQualifierType>();
auto node = stabs_type_to_ast(
*volatile_qualifier.type.get(),
enclosing_struct,
state,
depth + 1,
substitute_type_name,
force_substitute);
CCC_RETURN_IF_ERROR(node);
result = std::move(*node);
result->is_volatile = true;
break;
}
case StabsTypeDescriptor::CONST_QUALIFIER: {
const auto& const_qualifier = type.as<StabsConstQualifierType>();
auto node = stabs_type_to_ast(
*const_qualifier.type.get(),
enclosing_struct,
state,
depth + 1,
substitute_type_name,
force_substitute);
result = std::move(*node);
result->is_const = true;
break;
}
case StabsTypeDescriptor::RANGE: {
auto builtin = std::make_unique<ast::BuiltIn>();
Result<ast::BuiltInClass> bclass = classify_range(type.as<StabsRangeType>());
CCC_RETURN_IF_ERROR(bclass);
builtin->bclass = *bclass;
result = std::move(builtin);
break;
}
case StabsTypeDescriptor::STRUCT:
case StabsTypeDescriptor::UNION: {
const StabsStructOrUnionType* stabs_struct_or_union;
if(type.descriptor == StabsTypeDescriptor::STRUCT) {
stabs_struct_or_union = &type.as<StabsStructType>();
} else {
stabs_struct_or_union = &type.as<StabsUnionType>();
}
auto struct_or_union = std::make_unique<ast::StructOrUnion>();
struct_or_union->is_struct = type.descriptor == StabsTypeDescriptor::STRUCT;
struct_or_union->size_bits = (s32) stabs_struct_or_union->size * 8;
for(const StabsStructOrUnionType::BaseClass& stabs_base_class : stabs_struct_or_union->base_classes) {
auto base_class = stabs_type_to_ast(
*stabs_base_class.type,
&type,
state,
depth + 1,
true,
force_substitute);
CCC_RETURN_IF_ERROR(base_class);
(*base_class)->offset_bytes = stabs_base_class.offset;
(*base_class)->set_access_specifier(stabs_field_visibility_to_access_specifier(stabs_base_class.visibility), state.importer_flags);
if(stabs_base_class.is_virtual) {
(*base_class)->is_virtual_base_class = true;
}
struct_or_union->base_classes.emplace_back(std::move(*base_class));
}
AST_DEBUG_PRINTF("%-*s beginfields\n", depth * 4, "");
for(const StabsStructOrUnionType::Field& field : stabs_struct_or_union->fields) {
auto node = field_to_ast(field, type, state, depth);
CCC_RETURN_IF_ERROR(node);
struct_or_union->fields.emplace_back(std::move(*node));
}
AST_DEBUG_PRINTF("%-*s endfields\n", depth * 4, "");
AST_DEBUG_PRINTF("%-*s beginmemberfuncs\n", depth * 4, "");
Result<std::vector<std::unique_ptr<ast::Node>>> member_functions =
member_functions_to_ast(*stabs_struct_or_union, state, depth);
CCC_RETURN_IF_ERROR(member_functions);
struct_or_union->member_functions = std::move(*member_functions);
AST_DEBUG_PRINTF("%-*s endmemberfuncs\n", depth * 4, "");
result = std::move(struct_or_union);
break;
}
case StabsTypeDescriptor::CROSS_REFERENCE: {
const auto& cross_reference = type.as<StabsCrossReferenceType>();
auto type_name = std::make_unique<ast::TypeName>();
type_name->source = ast::TypeNameSource::CROSS_REFERENCE;
type_name->unresolved_stabs = std::make_unique<ast::TypeName::UnresolvedStabs>();
type_name->unresolved_stabs->type_name = cross_reference.identifier;
type_name->unresolved_stabs->type = cross_reference.type;
result = std::move(type_name);
break;
}
case ccc::StabsTypeDescriptor::FLOATING_POINT_BUILTIN: {
const auto& fp_builtin = type.as<StabsFloatingPointBuiltInType>();
auto builtin = std::make_unique<ast::BuiltIn>();
switch(fp_builtin.bytes) {
case 1: builtin->bclass = ast::BuiltInClass::UNSIGNED_8; break;
case 2: builtin->bclass = ast::BuiltInClass::UNSIGNED_16; break;
case 4: builtin->bclass = ast::BuiltInClass::UNSIGNED_32; break;
case 8: builtin->bclass = ast::BuiltInClass::UNSIGNED_64; break;
case 16: builtin->bclass = ast::BuiltInClass::UNSIGNED_128; break;
default: builtin->bclass = ast::BuiltInClass::UNSIGNED_8; break;
}
result = std::move(builtin);
break;
}
case StabsTypeDescriptor::METHOD: {
const auto& stabs_method = type.as<StabsMethodType>();
auto function = std::make_unique<ast::Function>();
auto return_node = stabs_type_to_ast(
*stabs_method.return_type.get(),
enclosing_struct,
state,
depth + 1,
true,
true);
CCC_RETURN_IF_ERROR(return_node);
function->return_type = std::move(*return_node);
function->parameters.emplace();
for(const std::unique_ptr<StabsType>& parameter_type : stabs_method.parameter_types) {
auto parameter_node = stabs_type_to_ast(
*parameter_type,
enclosing_struct,
state,
depth + 1,
true,
true);
CCC_RETURN_IF_ERROR(parameter_node);
function->parameters->emplace_back(std::move(*parameter_node));
}
result = std::move(function);
break;
}
case StabsTypeDescriptor::POINTER: {
auto pointer = std::make_unique<ast::PointerOrReference>();
pointer->is_pointer = true;
auto value_node = stabs_type_to_ast(
*type.as<StabsPointerType>().value_type,
enclosing_struct,
state,
depth + 1,
true,
force_substitute);
CCC_RETURN_IF_ERROR(value_node);
pointer->value_type = std::move(*value_node);
result = std::move(pointer);
break;
}
case StabsTypeDescriptor::REFERENCE: {
auto reference = std::make_unique<ast::PointerOrReference>();
reference->is_pointer = false;
auto value_node = stabs_type_to_ast(
*type.as<StabsReferenceType>().value_type,
enclosing_struct,
state,
depth + 1,
true,
force_substitute);
CCC_RETURN_IF_ERROR(value_node);
reference->value_type = std::move(*value_node);
result = std::move(reference);
break;
}
case StabsTypeDescriptor::TYPE_ATTRIBUTE: {
const auto& stabs_type_attribute = type.as<StabsSizeTypeAttributeType>();
auto node = stabs_type_to_ast(
*stabs_type_attribute.type,
enclosing_struct,
state,
depth + 1,
substitute_type_name,
force_substitute);
CCC_RETURN_IF_ERROR(node);
result = std::move(*node);
result->size_bits = (s32) stabs_type_attribute.size_bits;
break;
}
case StabsTypeDescriptor::POINTER_TO_DATA_MEMBER: {
const auto& stabs_member_pointer = type.as<StabsPointerToDataMemberType>();
auto member_pointer = std::make_unique<ast::PointerToDataMember>();
auto class_node = stabs_type_to_ast(
*stabs_member_pointer.class_type.get(),
enclosing_struct,
state,
depth + 1,
true,
true);
CCC_RETURN_IF_ERROR(class_node);
member_pointer->class_type = std::move(*class_node);
auto member_node = stabs_type_to_ast(
*stabs_member_pointer.member_type.get(),
enclosing_struct,
state,
depth + 1,
true,
true);
CCC_RETURN_IF_ERROR(member_node);
member_pointer->member_type = std::move(*member_node);
result = std::move(member_pointer);
break;
}
case StabsTypeDescriptor::BUILTIN: {
CCC_CHECK(type.as<StabsBuiltInType>().type_id == 16,
"Unknown built-in type!");
auto builtin = std::make_unique<ast::BuiltIn>();
builtin->bclass = ast::BuiltInClass::BOOL_8;
result = std::move(builtin);
break;
}
}
CCC_CHECK(result, "Result of stabs_type_to_ast call is nullptr.");
return result;
}
static bool is_void_like(const StabsType& type)
{
// Unfortunately, a common case seems to be that various types (most
// commonly __builtin_va_list) are indistinguishable from void or void*, so
// we have to output them as a void built-in.
if(type.descriptor.has_value()) {
switch(*type.descriptor) {
case StabsTypeDescriptor::POINTER: {
return is_void_like(*type.as<StabsPointerType>().value_type.get());
}
case StabsTypeDescriptor::TYPE_REFERENCE: {
return type.as<StabsTypeReferenceType>().type->type_number == type.type_number;
}
default: {
break;
}
}
}
return false;
}
static Result<ast::BuiltInClass> classify_range(const StabsRangeType& type)
{
const char* low = type.low.c_str();
const char* high = type.high.c_str();
// Handle some special cases and values that are too large to easily store
// in a 64-bit integer.
static const struct { const char* low; const char* high; ast::BuiltInClass classification; } strings[] = {
{"4", "0", ast::BuiltInClass::FLOAT_32},
{"000000000000000000000000", "001777777777777777777777", ast::BuiltInClass::UNSIGNED_64},
{"00000000000000000000000000000000000000000000", "00000000000000000000001777777777777777777777", ast::BuiltInClass::UNSIGNED_64},
{"0000000000000", "01777777777777777777777", ast::BuiltInClass::UNSIGNED_64}, // IOP
{"0", "18446744073709551615", ast::BuiltInClass::UNSIGNED_64},
{"001000000000000000000000", "000777777777777777777777", ast::BuiltInClass::SIGNED_64},
{"00000000000000000000001000000000000000000000", "00000000000000000000000777777777777777777777", ast::BuiltInClass::SIGNED_64},
{"01000000000000000000000", "0777777777777777777777", ast::BuiltInClass::SIGNED_64}, // IOP
{"-9223372036854775808", "9223372036854775807", ast::BuiltInClass::SIGNED_64},
{"8", "0", ast::BuiltInClass::FLOAT_64},
{"00000000000000000000000000000000000000000000", "03777777777777777777777777777777777777777777", ast::BuiltInClass::UNSIGNED_128},
{"02000000000000000000000000000000000000000000", "01777777777777777777777777777777777777777777", ast::BuiltInClass::SIGNED_128},
{"000000000000000000000000", "0377777777777777777777777777777777", ast::BuiltInClass::UNQUALIFIED_128},
{"16", "0", ast::BuiltInClass::FLOAT_128},
{"0", "-1", ast::BuiltInClass::UNQUALIFIED_128} // Old homebrew toolchain
};
for(const auto& range : strings) {
if(strcmp(range.low, low) == 0 && strcmp(range.high, high) == 0) {
return range.classification;
}
}
// For smaller values we actually parse the bounds as integers.
char* end = nullptr;
s64 low_value = strtoll(type.low.c_str(), &end, low[0] == '0' ? 8 : 10);
CCC_CHECK(end != low, "Failed to parse low part of range as integer.");
s64 high_value = strtoll(type.high.c_str(), &end, high[0] == '0' ? 8 : 10);
CCC_CHECK(end != high, "Failed to parse high part of range as integer.");
static const struct { s64 low; s64 high; ast::BuiltInClass classification; } integers[] = {
{0, 255, ast::BuiltInClass::UNSIGNED_8},
{-128, 127, ast::BuiltInClass::SIGNED_8},
{0, 127, ast::BuiltInClass::UNQUALIFIED_8},
{0, 65535, ast::BuiltInClass::UNSIGNED_16},
{-32768, 32767, ast::BuiltInClass::SIGNED_16},
{0, 4294967295, ast::BuiltInClass::UNSIGNED_32},
{-2147483648, 2147483647, ast::BuiltInClass::SIGNED_32},
};
for(const auto& range : integers) {
if((range.low == low_value || range.low == -low_value) && range.high == high_value) {
return range.classification;
}
}
return CCC_FAILURE("Failed to classify range.");
}
static Result<std::unique_ptr<ast::Node>> field_to_ast(
const StabsStructOrUnionType::Field& field,
const StabsType& enclosing_struct,
const StabsToAstState& state,
s32 depth)
{
AST_DEBUG_PRINTF("%-*s field %s\n", depth * 4, "", field.name.c_str());
Result<bool> is_bitfield = detect_bitfield(field, state);
CCC_RETURN_IF_ERROR(is_bitfield);
if(*is_bitfield) {
// Process bitfields.
auto bitfield_node = stabs_type_to_ast(
*field.type,
&enclosing_struct,
state,
depth + 1,
true,
false);
CCC_RETURN_IF_ERROR(bitfield_node);
std::unique_ptr<ast::BitField> bitfield = std::make_unique<ast::BitField>();
bitfield->name = (field.name == " ") ? "" : field.name;
bitfield->offset_bytes = field.offset_bits / 8;
bitfield->size_bits = field.size_bits;
bitfield->underlying_type = std::move(*bitfield_node);
bitfield->bitfield_offset_bits = field.offset_bits % 8;
bitfield->set_access_specifier(stabs_field_visibility_to_access_specifier(field.visibility), state.importer_flags);
return std::unique_ptr<ast::Node>(std::move(bitfield));
} else {
// Process a normal field.
Result<std::unique_ptr<ast::Node>> node = stabs_type_to_ast(
*field.type,
&enclosing_struct,
state,
depth + 1,
true,
false);
CCC_RETURN_IF_ERROR(node);
(*node)->name = field.name;
(*node)->offset_bytes = field.offset_bits / 8;
(*node)->size_bits = field.size_bits;
(*node)->set_access_specifier(stabs_field_visibility_to_access_specifier(field.visibility), state.importer_flags);
if(field.name.starts_with("$vf") || field.name.starts_with("_vptr$") || field.name.starts_with("_vptr.")) {
(*node)->is_vtable_pointer = true;
}
if(field.is_static) {
(*node)->storage_class = STORAGE_CLASS_STATIC;
}
return node;
}
}
static Result<bool> detect_bitfield(const StabsStructOrUnionType::Field& field, const StabsToAstState& state)
{
// Static fields can't be bitfields.
if(field.is_static) {
return false;
}
// Resolve type references.
const StabsType* type = field.type.get();
for(s32 i = 0; i < 50; i++) {
if(!type->descriptor.has_value()) {
if(!type->type_number.valid()) {
return false;
}
auto next_type = state.stabs_types->find(type->type_number);
if(next_type == state.stabs_types->end() || next_type->second == type) {
return false;
}
type = next_type->second;
} else if(type->descriptor == StabsTypeDescriptor::TYPE_REFERENCE) {
type = type->as<StabsTypeReferenceType>().type.get();
} else if(type->descriptor == StabsTypeDescriptor::CONST_QUALIFIER) {
type = type->as<StabsConstQualifierType>().type.get();
} else if(type->descriptor == StabsTypeDescriptor::VOLATILE_QUALIFIER) {
type = type->as<StabsVolatileQualifierType>().type.get();
} else {
break;
}
// Prevent an infinite loop if there's a cycle (fatal frame).
if(i == 49) {
return false;
}
}
// Determine the size of the underlying type.
s32 underlying_type_size_bits = 0;
switch(*type->descriptor) {
case ccc::StabsTypeDescriptor::RANGE: {
Result<ast::BuiltInClass> bclass = classify_range(type->as<StabsRangeType>());
CCC_RETURN_IF_ERROR(bclass);
underlying_type_size_bits = builtin_class_size(*bclass) * 8;
break;
}
case ccc::StabsTypeDescriptor::CROSS_REFERENCE: {
if(type->as<StabsCrossReferenceType>().type == ast::ForwardDeclaredType::ENUM) {
underlying_type_size_bits = 32;
} else {
return false;
}
break;
}
case ccc::StabsTypeDescriptor::TYPE_ATTRIBUTE: {
underlying_type_size_bits = (s32) type->as<StabsSizeTypeAttributeType>().size_bits;
break;
}
case ccc::StabsTypeDescriptor::BUILTIN: {
underlying_type_size_bits = 8; // bool
break;
}
default: {
return false;
}
}
if(underlying_type_size_bits == 0) {
return false;
}
return field.size_bits != underlying_type_size_bits;
}
static Result<std::vector<std::unique_ptr<ast::Node>>> member_functions_to_ast(
const StabsStructOrUnionType& type, const StabsToAstState& state, s32 depth)
{
if(state.importer_flags & NO_MEMBER_FUNCTIONS) {
return std::vector<std::unique_ptr<ast::Node>>();
}
std::string_view type_name_no_template_args;
if(type.name.has_value()) {
type_name_no_template_args =
std::string_view(*type.name).substr(0, type.name->find("<"));
}
std::vector<std::unique_ptr<ast::Node>> member_functions;
bool only_special_functions = true;
for(const StabsStructOrUnionType::MemberFunctionSet& function_set : type.member_functions) {
MemberFunctionInfo info = check_member_function(
function_set.name, type_name_no_template_args, state.demangler, state.importer_flags);
if(!info.is_special_member_function) {
only_special_functions = false;
}
for(const StabsStructOrUnionType::MemberFunction& stabs_func : function_set.overloads) {
auto node = stabs_type_to_ast(
*stabs_func.type,
&type,
state,
depth + 1,
true,
true);
CCC_RETURN_IF_ERROR(node);
(*node)->is_constructor_or_destructor = info.is_constructor_or_destructor;
(*node)->is_special_member_function = info.is_special_member_function;
(*node)->is_operator_member_function = info.is_operator_member_function;
(*node)->name = info.name;
(*node)->set_access_specifier(stabs_field_visibility_to_access_specifier(stabs_func.visibility), state.importer_flags);
if((*node)->descriptor == ast::FUNCTION) {
ast::Function& function = (*node)->as<ast::Function>();
function.modifier = stabs_func.modifier;
function.vtable_index = stabs_func.vtable_index;
}
member_functions.emplace_back(std::move(*node));
}
}
if(only_special_functions && (state.importer_flags & INCLUDE_GENERATED_MEMBER_FUNCTIONS) == 0) {
return std::vector<std::unique_ptr<ast::Node>>();
}
return member_functions;
}
static MemberFunctionInfo check_member_function(
const std::string& mangled_name,
std::string_view type_name_no_template_args,
const DemanglerFunctions& demangler,
u32 importer_flags)
{
MemberFunctionInfo info;
// Some compiler versions output gcc opnames for overloaded operators
// instead of their proper names.
if((importer_flags & DONT_DEMANGLE_NAMES) == 0 && demangler.cplus_demangle_opname) {
char* demangled_name = demangler.cplus_demangle_opname(mangled_name.c_str(), 0);
if(demangled_name) {
info.name = demangled_name;
free(reinterpret_cast<void*>(demangled_name));
}
}
if(info.name.empty()) {
info.name = mangled_name;
}
bool is_constructor =
info.name == "__ct" || // Takes a parameter to decide whether or not to construct virtual base classes.
info.name == "__comp_ctor" || // Constructs virtual base classes.
info.name == "__base_ctor"; // Does not construct virtual base classes.
if(!is_constructor && !type_name_no_template_args.empty()) {
is_constructor |= info.name == type_name_no_template_args; // Named constructor.
}
bool is_destructor =
info.name == "__dt" || // Takes parameters to decide whether or not to construct virtual base classes and/or delete the object.
info.name == "__comp_dtor" || // Destructs virtual base classes.
info.name == "__base_dtor" || // Does not construct virtual base classes.
info.name == "__deleting_dtor"; // Destructs virtual base clases then deletes the entire object.
if(!is_destructor && !info.name.empty()) {
is_destructor |= info.name[0] == '~' && std::string_view(info.name).substr(1) == type_name_no_template_args; // Named destructor.
}
info.is_constructor_or_destructor = is_constructor || is_destructor || info.name.starts_with("$_");
info.is_special_member_function = info.is_constructor_or_destructor || info.name == "operator=";
return info;
}
void fix_recursively_emitted_structures(
ast::StructOrUnion& outer_struct, const std::string& name, StabsTypeNumber type_number, SourceFileHandle file_handle)
{
// This is a rather peculiar case. For some compiler versions, when a struct
// or a union defined using a typedef is being emitted and it needs to
// reference itself from a member function parameter, it will emit its
// entire definition again in the middle of the first definition, although
// thankfully it won't recurse more than once.
//
// The game Sega Soccer Slam is affected by this. See the PeculiarParameter
// test case in mdebug_importer_tests.cpp for a bare bones example.
for(std::unique_ptr<ast::Node>& node : outer_struct.member_functions) {
if(node->descriptor != ast::FUNCTION) {
continue;
}
ast::Function& function = node->as<ast::Function>();
if(!function.parameters.has_value()) {
continue;
}
for(std::unique_ptr<ast::Node>& parameter : *function.parameters) {
if(parameter->descriptor != ast::POINTER_OR_REFERENCE) {
continue;
}
ast::PointerOrReference& pointer_or_reference = parameter->as<ast::PointerOrReference>();
if(pointer_or_reference.value_type->descriptor != ast::STRUCT_OR_UNION) {
continue;
}
ast::StructOrUnion& inner_struct = pointer_or_reference.value_type->as<ast::StructOrUnion>();
// Since C++ doesn't allow struct definitions in function parameter
// lists normally, and most of the time the member function
// parameters aren't even filled in by GCC, this is a really rare
// case, so here we only bother to do some very basic checks to
// verify that the inner struct is similar to the outer struct.
if(inner_struct.base_classes.size() != outer_struct.base_classes.size()) {
continue;
}
if(inner_struct.fields.size() != outer_struct.fields.size()) {
continue;
}
if(inner_struct.member_functions.size() != outer_struct.member_functions.size()) {
continue;
}
auto type_name = std::make_unique<ast::TypeName>();
type_name->source = ast::TypeNameSource::REFERENCE;
type_name->unresolved_stabs = std::make_unique<ast::TypeName::UnresolvedStabs>();
type_name->unresolved_stabs->type_name = name;
type_name->unresolved_stabs->referenced_file_handle = file_handle;
type_name->unresolved_stabs->stabs_type_number = type_number;
pointer_or_reference.value_type = std::move(type_name);
}
}
}
ast::AccessSpecifier stabs_field_visibility_to_access_specifier(StabsStructOrUnionType::Visibility visibility)
{
ast::AccessSpecifier access_specifier = ast::AS_PUBLIC;
switch(visibility) {
case StabsStructOrUnionType::Visibility::NONE: access_specifier = ast::AS_PUBLIC; break;
case StabsStructOrUnionType::Visibility::PUBLIC: access_specifier = ast::AS_PUBLIC; break;
case StabsStructOrUnionType::Visibility::PROTECTED: access_specifier = ast::AS_PROTECTED; break;
case StabsStructOrUnionType::Visibility::PRIVATE: access_specifier = ast::AS_PRIVATE; break;
case StabsStructOrUnionType::Visibility::PUBLIC_OPTIMIZED_OUT: access_specifier = ast::AS_PUBLIC; break;
}
return access_specifier;
}
}

29
3rdparty/ccc/src/ccc/stabs_to_ast.h vendored Normal file
View File

@@ -0,0 +1,29 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "ast.h"
#include "stabs.h"
namespace ccc {
struct StabsToAstState {
u32 file_handle;
std::map<StabsTypeNumber, const StabsType*>* stabs_types;
u32 importer_flags;
DemanglerFunctions demangler;
};
Result<std::unique_ptr<ast::Node>> stabs_type_to_ast(
const StabsType& type,
const StabsType* enclosing_struct,
const StabsToAstState& state,
s32 depth,
bool substitute_type_name,
bool force_substitute);
void fix_recursively_emitted_structures(
ast::StructOrUnion& outer_struct, const std::string& name, StabsTypeNumber type_number, SourceFileHandle file_handle);
ast::AccessSpecifier stabs_field_visibility_to_access_specifier(StabsStructOrUnionType::Visibility visibility);
}

1204
3rdparty/ccc/src/ccc/symbol_database.cpp vendored Normal file

File diff suppressed because it is too large Load Diff

721
3rdparty/ccc/src/ccc/symbol_database.h vendored Normal file
View File

@@ -0,0 +1,721 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include <map>
#include <atomic>
#include <variant>
#include "util.h"
namespace ccc {
// An X macro for all the symbol types.
#define CCC_FOR_EACH_SYMBOL_TYPE_DO_X \
CCC_X(DataType, data_types) \
CCC_X(Function, functions) \
CCC_X(GlobalVariable, global_variables) \
CCC_X(Label, labels) \
CCC_X(LocalVariable, local_variables) \
CCC_X(Module, modules) \
CCC_X(ParameterVariable, parameter_variables) \
CCC_X(Section, sections) \
CCC_X(SourceFile, source_files) \
CCC_X(SymbolSource, symbol_sources)
// An enum for all the symbol types.
enum SymbolDescriptor {
DATA_TYPE = 1 << 0,
FUNCTION = 1 << 1,
GLOBAL_VARIABLE = 1 << 2,
LABEL = 1 << 3,
LOCAL_VARIABLE = 1 << 4,
MODULE = 1 << 5,
PARAMETER_VARIABLE = 1 << 6,
SECTION = 1 << 7,
SOURCE_FILE = 1 << 8,
SYMBOL_SOURCE = 1 << 9
};
enum {
ALL_SYMBOL_TYPES = 0xffff
};
// Forward declare all the different types of symbol objects.
#define CCC_X(SymbolType, symbol_list) class SymbolType;
CCC_FOR_EACH_SYMBOL_TYPE_DO_X
#undef CCC_X
class SymbolDatabase;
// Strongly typed handles for all of the symbol objects. These are here to solve
// the problem of dangling references to symbols.
template <typename SymbolType>
struct SymbolHandle {
u32 value = (u32) -1;
SymbolHandle() {}
SymbolHandle(u32 v) : value(v) {}
SymbolHandle(const SymbolType* symbol)
: value(symbol ? symbol->handle().value : (u32) -1) {}
// Check if this symbol handle has been initialised. Note that this doesn't
// determine whether or not the symbol it points to has been deleted!
bool valid() const { return value != (u32) -1; }
friend auto operator<=>(const SymbolHandle& lhs, const SymbolHandle& rhs) = default;
};
#define CCC_X(SymbolType, symbol_list) using SymbolType##Handle = SymbolHandle<SymbolType>;
CCC_FOR_EACH_SYMBOL_TYPE_DO_X
#undef CCC_X
enum SymbolFlag {
NO_SYMBOL_FLAGS = 0,
WITH_ADDRESS_MAP = 1 << 0,
WITH_NAME_MAP = 1 << 1,
NAME_NEEDS_DEMANGLING = 1 << 2
};
// A container class for symbols of a given type that maintains maps of their
// names and addresses depending on the value of SymbolType::FLAGS.
template <typename SymbolType>
class SymbolList {
public:
// Lookup symbols from their handles using binary search.
SymbolType* symbol_from_handle(SymbolHandle<SymbolType> handle);
const SymbolType* symbol_from_handle(SymbolHandle<SymbolType> handle) const;
// Lookup multiple symbols from their handles using binary search.
std::vector<SymbolType*> symbols_from_handles(const std::vector<SymbolHandle<SymbolType>>& handles);
std::vector<const SymbolType*> symbols_from_handles(const std::vector<SymbolHandle<SymbolType>>& handles) const;
std::vector<SymbolType*> optional_symbols_from_handles(const std::optional<std::vector<SymbolHandle<SymbolType>>>& handles);
std::vector<const SymbolType*> optional_symbols_from_handles(const std::optional<std::vector<SymbolHandle<SymbolType>>>& handles) const;
using Iterator = typename std::vector<SymbolType>::iterator;
using ConstIterator = typename std::vector<SymbolType>::const_iterator;
// For iterating over all the symbols.
Iterator begin();
ConstIterator begin() const;
Iterator end();
ConstIterator end() const;
using AddressToHandleMap = std::multimap<u32, SymbolHandle<SymbolType>>;
using NameToHandleMap = std::multimap<std::string, SymbolHandle<SymbolType>>;
template <typename Iterator>
class Iterators {
public:
Iterators(Iterator b, Iterator e)
: m_begin(b), m_end(e) {}
Iterator begin() const { return m_begin; }
Iterator end() const { return m_end; }
protected:
Iterator m_begin;
Iterator m_end;
};
using AddressToHandleMapIterators = Iterators<typename AddressToHandleMap::const_iterator>;
using NameToHandleMapIterators = Iterators<typename NameToHandleMap::const_iterator>;
// Lookup symbols by their address.
AddressToHandleMapIterators handles_from_starting_address(Address address) const;
AddressToHandleMapIterators handles_from_address_range(AddressRange range) const;
SymbolHandle<SymbolType> first_handle_from_starting_address(Address address) const;
SymbolHandle<SymbolType> first_handle_after_address(Address address) const;
// Lookup symbols by their name.
NameToHandleMapIterators handles_from_name(const std::string& name) const;
SymbolHandle<SymbolType> first_handle_from_name(const std::string& name) const;
// Find a symbol with an address range that contains the provided address.
// For example, to find which function an instruction belongs to.
SymbolType* symbol_overlapping_address(Address address);
const SymbolType* symbol_overlapping_address(Address address) const;
// Convert handles to underlying array indices.
s32 index_from_handle(SymbolHandle<SymbolType> handle) const;
// Index into the underlying array.
SymbolType& symbol_from_index(s32 index);
const SymbolType& symbol_from_index(s32 index) const;
// Determine if any symbols are being stored.
bool empty() const;
// Retrieve the number of symbols stored.
s32 size() const;
// Create a new symbol. If it's a SymbolSource symbol, source can be left
// empty, otherwise it has to be valid.
Result<SymbolType*> create_symbol(
std::string name, Address address, SymbolSourceHandle source, const Module* module_symbol = nullptr);
// Create a new symbol. Similar to above, but for symbols without addresses.
Result<SymbolType*> create_symbol(
std::string name, SymbolSourceHandle source, const Module* module_symbol = nullptr);
// Create a new symbol. Similar to above, but unless DONT_DEMANGLE_NAMES is
// set, the name of the symbol will be demangled.
Result<SymbolType*> create_symbol(
std::string name,
SymbolSourceHandle source,
const Module* module_symbol,
Address address,
u32 importer_flags,
DemanglerFunctions demangler);
// Update the address of a symbol without changing its handle.
bool move_symbol(SymbolHandle<SymbolType> handle, Address new_address);
// Update the name of a symbol without changing its handle.
bool rename_symbol(SymbolHandle<SymbolType> handle, std::string new_name);
// Move all the symbols from the passed list into this list.
void merge_from(SymbolList<SymbolType>& list);
// Mark a symbol for destruction. If the correct symbol database pointer is
// passed, all descendants will also be marked. For example, marking a
// function will also mark its parameters and local variables.
bool mark_symbol_for_destruction(SymbolHandle<SymbolType> handle, SymbolDatabase* database);
// Mark all the symbols from a given symbol source for destruction. For
// example you can use this to free a symbol table without destroying
// user-defined symbols. The behaviour for marking descendants is the same
// as destroy_symbol.
void mark_symbols_from_source_for_destruction(SymbolSourceHandle source, SymbolDatabase* database);
// Mark all the symbols from a given module for destruction. The behaviour
// for marking descendants is the same as destroy_symbol.
void mark_symbols_from_module_for_destruction(ModuleHandle module_handle, SymbolDatabase* database);
// Destroy all symbols that have previously been marked for destruction.
// This invalidates all pointers to symbols in this list.
void destroy_marked_symbols();
// Destroy all symbols, but don't reset m_next_handle so we don't have to
// worry about dangling handles.
void clear();
protected:
// Do a binary search for a handle, and return either its index, or the
// index where it could be inserted.
size_t binary_search(SymbolHandle<SymbolType> handle) const;
// Keep the address map in sync with the symbol list.
void link_address_map(SymbolType& symbol);
void unlink_address_map(SymbolType& symbol);
// Keep the name map in sync with the symbol list.
void link_name_map(SymbolType& symbol);
void unlink_name_map(SymbolType& symbol);
std::vector<SymbolType> m_symbols;
AddressToHandleMap m_address_to_handle;
NameToHandleMap m_name_to_handle;
// We share this between symbol lists of the same type so that we can merge
// them without having to rewrite all the handles.
static std::atomic<u32> m_next_handle;
};
// Base class for all the symbols.
class Symbol {
template <typename SymbolType>
friend class SymbolList;
public:
const std::string& name() const { return m_name; }
u32 raw_handle() const { return m_handle; }
SymbolSourceHandle source() const { return m_source; }
ModuleHandle module_handle() const { return m_module; }
Address address() const { return m_address; }
u32 size() const { return m_size; }
void set_size(u32 size) { m_size = size; }
AddressRange address_range() const { return AddressRange(m_address, m_address.get_or_zero() + m_size); }
ast::Node* type() { return m_type.get(); }
const ast::Node* type() const { return m_type.get(); }
void set_type(std::unique_ptr<ast::Node> type);
u32 generation() const { return m_generation; }
// This MUST be called after any AST nodes have been created/deleted/moved.
// For the set_type function this is done for you.
void invalidate_node_handles() { m_generation++; }
// Mark a single symbol for destruction, not including its descendants.
void mark_for_destruction() { m_marked_for_destruction = true; }
bool is_marked_for_destruction() { return m_marked_for_destruction; }
protected:
void on_create() {}
void on_destroy(SymbolDatabase* database) {}
u32 m_handle = (u32) -1;
SymbolSourceHandle m_source;
Address m_address;
u32 m_size = 0;
std::string m_name;
std::unique_ptr<ast::Node> m_type;
u32 m_generation : 31 = 0;
u32 m_marked_for_destruction : 1 = false;
ModuleHandle m_module;
};
// Variable storage types. This is different to whether the variable is a
// global, local or parameter. For example local variables can have global
// storage (static locals).
enum GlobalStorageLocation {
NIL,
DATA,
BSS,
ABS,
SDATA,
SBSS,
RDATA,
COMMON,
SCOMMON,
SUNDEFINED
};
const char* global_storage_location_to_string(GlobalStorageLocation location);
struct GlobalStorage {
GlobalStorageLocation location = GlobalStorageLocation::NIL;
GlobalStorage() {}
friend auto operator<=>(const GlobalStorage& lhs, const GlobalStorage& rhs) = default;
};
struct RegisterStorage {
s32 dbx_register_number = -1;
bool is_by_reference;
RegisterStorage() {}
friend auto operator<=>(const RegisterStorage& lhs, const RegisterStorage& rhs) = default;
};
struct StackStorage {
s32 stack_pointer_offset = -1;
StackStorage() {}
friend auto operator<=>(const StackStorage& lhs, const StackStorage& rhs) = default;
};
// The hashing algorithm for functions. If you change this algorithm make sure
// to bump the version number for the JSON format so we can know if a hash was
// generated using the new algorithm or not.
class FunctionHash {
public:
void update(u32 instruction)
{
// Separate out the opcode so that the hash remains the same regardless
// of if relocations are applied or not.
u32 opcode = instruction >> 26;
m_hash = m_hash * 31 + opcode;
}
u32 get() const
{
return m_hash;
}
protected:
u32 m_hash = 0;
};
// All the different types of symbol objects.
// A C/C++ data type.
class DataType : public Symbol {
friend SourceFile;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = DATA_TYPE;
static constexpr const char* NAME = "Data Type";
static constexpr const u32 FLAGS = WITH_NAME_MAP;
DataTypeHandle handle() const { return m_handle; }
std::vector<SourceFileHandle> files; // List of files for which a given top-level type is present.
const char* compare_fail_reason = nullptr;
bool not_defined_in_any_translation_unit : 1 = false;
bool only_defined_in_single_translation_unit : 1 = false;
};
// A function. The type stored is the return type.
class Function : public Symbol {
friend SourceFile;
friend SymbolList<Function>;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = FUNCTION;
static constexpr const char* NAME = "Function";
static constexpr const u32 FLAGS = WITH_ADDRESS_MAP | WITH_NAME_MAP | NAME_NEEDS_DEMANGLING;
FunctionHandle handle() const { return m_handle; }
SourceFileHandle source_file() const { return m_source_file; }
const std::optional<std::vector<ParameterVariableHandle>>& parameter_variables() const;
void set_parameter_variables(std::optional<std::vector<ParameterVariableHandle>> parameter_variables, SymbolDatabase& database);
const std::optional<std::vector<LocalVariableHandle>>& local_variables() const;
void set_local_variables(std::optional<std::vector<LocalVariableHandle>> local_variables, SymbolDatabase& database);
const std::string& mangled_name() const;
void set_mangled_name(std::string mangled);
// A hash of all the opcodes in the function, read from file.
u32 original_hash() const;
void set_original_hash(u32 hash);
// A hash of all the opcodes in the function, read from memory.
u32 current_hash() const;
void set_current_hash(FunctionHash hash);
struct LineNumberPair {
Address address;
s32 line_number;
};
struct SubSourceFile {
Address address;
std::string relative_path;
};
std::string relative_path;
StorageClass storage_class;
s32 stack_frame_size = -1;
std::vector<LineNumberPair> line_numbers;
std::vector<SubSourceFile> sub_source_files;
bool is_member_function_ish = false; // Filled in by fill_in_pointers_to_member_function_definitions.
bool is_no_return = false;
protected:
void on_destroy(SymbolDatabase* database);
SourceFileHandle m_source_file;
std::optional<std::vector<ParameterVariableHandle>> m_parameter_variables;
std::optional<std::vector<LocalVariableHandle>> m_local_variables;
std::string m_mangled_name;
u32 m_original_hash = 0;
u32 m_current_hash = 0;
};
// A global variable.
class GlobalVariable : public Symbol {
friend SourceFile;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = GLOBAL_VARIABLE;
static constexpr const char* NAME = "Global Variable";
static constexpr u32 FLAGS = WITH_ADDRESS_MAP | WITH_NAME_MAP | NAME_NEEDS_DEMANGLING;
GlobalVariableHandle handle() const { return m_handle; }
SourceFileHandle source_file() const { return m_source_file; };
const std::string& mangled_name() const;
void set_mangled_name(std::string mangled);
GlobalStorage storage;
StorageClass storage_class;
protected:
SourceFileHandle m_source_file;
std::string m_mangled_name;
};
// A label. This could be a label defined in assembly, C/C++, or just a symbol
// that we can't automatically determine the type of (e.g. SNDLL symbols).
class Label : public Symbol {
public:
static constexpr const SymbolDescriptor DESCRIPTOR = LABEL;
static constexpr const char* NAME = "Label";
static constexpr u32 FLAGS = WITH_ADDRESS_MAP | WITH_NAME_MAP;
LabelHandle handle() const { return m_handle; }
// Indicates that this label should not be used as a function name.
bool is_junk = false;
};
// A local variable. This includes static local variables which have global
// storage.
class LocalVariable : public Symbol {
friend Function;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = LOCAL_VARIABLE;
static constexpr const char* NAME = "Local Variable";
static constexpr u32 FLAGS = WITH_ADDRESS_MAP;
LocalVariableHandle handle() const { return m_handle; }
FunctionHandle function() const { return m_function; };
std::variant<GlobalStorage, RegisterStorage, StackStorage> storage;
AddressRange live_range;
protected:
FunctionHandle m_function;
};
// A program module e.g. an ELF file or an SNDLL file. Every symbol has a module
// field indicating what module the symbol belongs to. This can be used to
// delete all the symbols associated with a given module. Additionally, when a
// valid module pointer is passed to SymbolList<>::create_symbol, the address of
// the symbol will be added to the address of the new symbol.
class Module : public Symbol {
friend SymbolList<Module>;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = MODULE;
static constexpr const char* NAME = "Module";
static constexpr u32 FLAGS = WITH_NAME_MAP;
ModuleHandle handle() const { return m_handle; }
// These are used for IRX modules.
bool is_irx = false;
s32 version_major = -1;
s32 version_minor = -1;
protected:
void on_create();
};
// A parameter variable.
class ParameterVariable : public Symbol {
friend Function;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = PARAMETER_VARIABLE;
static constexpr const char* NAME = "Parameter Variable";
static constexpr u32 FLAGS = NO_SYMBOL_FLAGS;
ParameterVariableHandle handle() const { return m_handle; }
FunctionHandle function() const { return m_function; };
std::variant<RegisterStorage, StackStorage> storage;
protected:
FunctionHandle m_function;
};
// An ELF section. These are created from the ELF section headers.
class Section : public Symbol {
public:
static constexpr const SymbolDescriptor DESCRIPTOR = SECTION;
static constexpr const char* NAME = "Section";
static constexpr u32 FLAGS = WITH_ADDRESS_MAP | WITH_NAME_MAP;
SectionHandle handle() const { return m_handle; }
// Check if the section name is ".text".
bool contains_code() const;
// Check for known data section names.
bool contains_data() const;
};
// A source file (.c or .cpp file). One of these will be created for every
// translation unit in the program (but only if debugging symbols are present).
class SourceFile : public Symbol {
friend SymbolList<SourceFile>;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = SOURCE_FILE;
static constexpr const char* NAME = "Source File";
static constexpr u32 FLAGS = WITH_ADDRESS_MAP | WITH_NAME_MAP;
SourceFileHandle handle() const { return m_handle; }
const std::string& full_path() const { return name(); }
const std::vector<FunctionHandle>& functions() const;
void set_functions(std::vector<FunctionHandle> functions, SymbolDatabase& database);
const std::vector<GlobalVariableHandle>& global_variables() const;
void set_global_variables(std::vector<GlobalVariableHandle> global_variables, SymbolDatabase& database);
// Check whether at least half of the functions associated with the source
// file match their original hash (meaning they haven't been overwritten).
bool functions_match() const;
void check_functions_match(const SymbolDatabase& database);
std::string working_dir;
std::string command_line_path;
std::map<StabsTypeNumber, DataTypeHandle> stabs_type_number_to_handle;
std::set<std::string> toolchain_version_info;
protected:
void on_destroy(SymbolDatabase* database);
std::vector<FunctionHandle> m_functions;
std::vector<GlobalVariableHandle> m_global_variables;
bool m_functions_match = true;
};
// A symbol source. Every symbol has a symbol source field indicating how the
// symbol was created. For example, the symbol table importers will each create
// one of these (if it doesn't already exist).
class SymbolSource : public Symbol {
friend SymbolList<SymbolSource>;
public:
static constexpr const SymbolDescriptor DESCRIPTOR = SYMBOL_SOURCE;
static constexpr const char* NAME = "Symbol Source";
static constexpr u32 FLAGS = WITH_NAME_MAP;
SymbolSourceHandle handle() const { return m_handle; }
protected:
void on_create();
};
// Bundles together all the information needed to identify if a symbol came from
// a specific symbol table import operation. For example, this is used to make
// sure that we don't reference symbols from another symbol table during the
// import process.
struct SymbolGroup {
SymbolSourceHandle source;
Module* module_symbol = nullptr;
bool is_in_group(const Symbol& symbol) const;
};
// The symbol database itself. This owns all the symbols.
class SymbolDatabase {
public:
SymbolList<DataType> data_types;
SymbolList<Function> functions;
SymbolList<GlobalVariable> global_variables;
SymbolList<Label> labels;
SymbolList<LocalVariable> local_variables;
SymbolList<Module> modules;
SymbolList<ParameterVariable> parameter_variables;
SymbolList<Section> sections;
SymbolList<SourceFile> source_files;
SymbolList<SymbolSource> symbol_sources;
// Sum up the symbol counts for each symbol list.
s32 symbol_count() const;
// Find a symbol of any of the specified types given an address. Symbols of
// the types specified higher up in the CCC_FOR_EACH_SYMBOL_TYPE_DO_X macro
// are checked for first.
const Symbol* symbol_starting_at_address(
Address address, u32 descriptors = ALL_SYMBOL_TYPES, SymbolDescriptor* descriptor_out = nullptr) const;
const Symbol* symbol_after_address(
Address address, u32 descriptors = ALL_SYMBOL_TYPES, SymbolDescriptor* descriptor_out = nullptr) const;
const Symbol* symbol_overlapping_address(
Address address, u32 descriptors = ALL_SYMBOL_TYPES, SymbolDescriptor* descriptor_out = nullptr) const;
// Find a symbol of any of the specified types given its name. Symbols of
// the types specified higher up in the CCC_FOR_EACH_SYMBOL_TYPE_DO_X macro
// are checked for first.
const Symbol* symbol_with_name(
const std::string& name, u32 descriptors = ALL_SYMBOL_TYPES, SymbolDescriptor* descriptor_out = nullptr) const;
// Finds a symbol source object with the given name or creates one if it
// doesn't already exist.
Result<SymbolSourceHandle> get_symbol_source(const std::string& name);
// Deduplicate matching data types with the same name. May replace the
// existing data type with the new one if the new one is better.
Result<DataType*> create_data_type_if_unique(
std::unique_ptr<ast::Node> node,
StabsTypeNumber number,
const char* name,
SourceFile& source_file,
const SymbolGroup& group);
// Move all the symbols in the passed database into this database.
void merge_from(SymbolDatabase& database);
// Destroy all the symbols from a given symbol source. For example you can
// use this to free a symbol table without destroying user-defined symbols.
void destroy_symbols_from_source(SymbolSourceHandle source, bool destroy_descendants);
// Destroy all the symbols from a given module.
void destroy_symbols_from_module(ModuleHandle module_handle, bool destroy_descendants);
// Destroy all the symbols that have previously been marked for destruction.
// This invalidates all pointers to symbols in this database.
void destroy_marked_symbols();
// Destroy all the symbols in the symbol database.
void clear();
template <typename Callback>
void for_each_symbol(Callback callback) {
// Use indices here to avoid iterator invalidation.
#define CCC_X(SymbolType, symbol_list) \
for(s32 i = 0; i < symbol_list.size(); i++) { \
callback(symbol_list.symbol_from_index(i)); \
}
CCC_FOR_EACH_SYMBOL_TYPE_DO_X
#undef CCC_X
}
};
// A handle to a symbol of any type.
class MultiSymbolHandle {
public:
// Create an empty multi symbol handle.
MultiSymbolHandle();
// Create a multi symbol handle of the specified type.
template <typename SymbolType>
MultiSymbolHandle(const SymbolType& symbol);
MultiSymbolHandle(SymbolDescriptor descriptor, u32 handle);
bool valid() const;
SymbolDescriptor descriptor() const;
u32 handle() const;
Symbol* lookup_symbol(SymbolDatabase& database);
const Symbol* lookup_symbol(const SymbolDatabase& database) const;
bool is_flag_set(SymbolFlag flag) const;
bool move_symbol(Address new_address, SymbolDatabase& database) const;
bool rename_symbol(std::string new_name, SymbolDatabase& database) const;
bool destroy_symbol(SymbolDatabase& database, bool destroy_descendants) const;
friend auto operator<=>(const MultiSymbolHandle& lhs, const MultiSymbolHandle& rhs) = default;
protected:
SymbolDescriptor m_descriptor = DATA_TYPE;
u32 m_handle = (u32) -1;
};
// A handle to an AST node.
class NodeHandle {
friend SymbolDatabase;
public:
// Create an empty node handle.
NodeHandle();
// Create a node handle that will always allow accesses to its node. You
// should only use this if you know the lifetime of the handle is a subset
// of the lifetime of the node.
NodeHandle(const ast::Node* node);
// Create a node handle pointing to an AST node from a given symbol that
// will prevent accesses to the node if the symbol is deleted.
template <typename SymbolType>
NodeHandle(const SymbolType& symbol, const ast::Node* node);
NodeHandle(SymbolDescriptor descriptor, const Symbol& symbol, const ast::Node* node);
bool valid() const;
const MultiSymbolHandle& symbol() const;
const ast::Node* lookup_node(const SymbolDatabase& database) const;
NodeHandle handle_for_child(const ast::Node* child_node) const;
friend auto operator<=>(const NodeHandle& lhs, const NodeHandle& rhs) = default;
protected:
MultiSymbolHandle m_symbol;
const ast::Node* m_node = nullptr;
u32 m_generation = 0;
};
}

114
3rdparty/ccc/src/ccc/symbol_file.cpp vendored Normal file
View File

@@ -0,0 +1,114 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "symbol_file.h"
namespace ccc {
Result<std::unique_ptr<SymbolFile>> parse_symbol_file(std::vector<u8> image, std::string file_name)
{
const std::optional<u32> magic = copy_unaligned<u32>(image, 0);
CCC_CHECK(magic.has_value(), "File too small.");
std::unique_ptr<SymbolFile> symbol_file;
switch(*magic) {
case CCC_FOURCC("\x7f""ELF"): {
Result<ElfFile> elf = ElfFile::parse(std::move(image));
CCC_RETURN_IF_ERROR(elf);
symbol_file = std::make_unique<ElfSymbolFile>(std::move(*elf), std::move(file_name));
break;
}
case CCC_FOURCC("SNR1"):
case CCC_FOURCC("SNR2"): {
Result<SNDLLFile> sndll = parse_sndll_file(image, Address(), SNDLLType::DYNAMIC_LIBRARY);
CCC_RETURN_IF_ERROR(sndll);
symbol_file = std::make_unique<SNDLLSymbolFile>(std::make_shared<SNDLLFile>(std::move(*sndll)));
break;
}
default: {
return CCC_FAILURE("Unknown file type.");
}
}
return symbol_file;
}
ElfSymbolFile::ElfSymbolFile(ElfFile elf, std::string elf_name)
: m_elf(std::move(elf)), m_name(std::move(elf_name)) {}
std::string ElfSymbolFile::name() const
{
return m_name;
}
Result<std::vector<std::unique_ptr<SymbolTable>>> ElfSymbolFile::get_all_symbol_tables() const
{
std::vector<std::unique_ptr<SymbolTable>> symbol_tables;
symbol_tables.emplace_back(std::make_unique<ElfSectionHeadersSymbolTable>(m_elf));
for(size_t i = 0; i < SYMBOL_TABLE_FORMATS.size(); i++) {
const SymbolTableFormatInfo& info = SYMBOL_TABLE_FORMATS[i];
const ElfSection* section = m_elf.lookup_section(info.section_name);
if(section) {
Result<std::unique_ptr<SymbolTable>> symbol_table = create_elf_symbol_table(*section, m_elf, info.format);
CCC_RETURN_IF_ERROR(symbol_table);
if(*symbol_table) {
symbol_tables.emplace_back(std::move(*symbol_table));
}
}
}
return symbol_tables;
}
Result<std::vector<std::unique_ptr<SymbolTable>>> ElfSymbolFile::get_symbol_tables_from_sections(
const std::vector<SymbolTableLocation>& sections) const
{
std::vector<std::unique_ptr<SymbolTable>> symbol_tables;
for(const SymbolTableLocation& location : sections) {
const ElfSection* section = m_elf.lookup_section(location.section_name.c_str());
CCC_CHECK(section, "No '%s' section.", location.section_name.c_str());
Result<std::unique_ptr<SymbolTable>> symbol_table = create_elf_symbol_table(*section, m_elf, location.format);
CCC_RETURN_IF_ERROR(symbol_table);
if(*symbol_table) {
symbol_tables.emplace_back(std::move(*symbol_table));
}
}
return symbol_tables;
}
const ElfFile& ElfSymbolFile::elf() const
{
return m_elf;
}
SNDLLSymbolFile::SNDLLSymbolFile(std::shared_ptr<SNDLLFile> sndll)
: m_sndll(std::move(sndll)) {}
std::string SNDLLSymbolFile::name() const
{
return m_sndll->elf_path;
}
Result<std::vector<std::unique_ptr<SymbolTable>>> SNDLLSymbolFile::get_all_symbol_tables() const
{
std::vector<std::unique_ptr<SymbolTable>> symbol_tables;
symbol_tables.emplace_back(std::make_unique<SNDLLSymbolTable>(m_sndll));
return symbol_tables;
}
Result<std::vector<std::unique_ptr<SymbolTable>>> SNDLLSymbolFile::get_symbol_tables_from_sections(
const std::vector<SymbolTableLocation>& sections) const
{
return CCC_FAILURE("An SNDLL file is not composed of sections.");
}
}

62
3rdparty/ccc/src/ccc/symbol_file.h vendored Normal file
View File

@@ -0,0 +1,62 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include "elf.h"
#include "sndll.h"
#include "symbol_table.h"
namespace ccc {
struct SymbolTableLocation {
std::string section_name;
SymbolTableFormat format;
};
class SymbolFile {
public:
virtual ~SymbolFile() {}
virtual std::string name() const = 0;
virtual Result<std::vector<std::unique_ptr<SymbolTable>>> get_all_symbol_tables() const = 0;
virtual Result<std::vector<std::unique_ptr<SymbolTable>>> get_symbol_tables_from_sections(
const std::vector<SymbolTableLocation>& sections) const = 0;
};
// Determine the type of the input file and parse it.
Result<std::unique_ptr<SymbolFile>> parse_symbol_file(std::vector<u8> image, std::string file_name);
class ElfSymbolFile : public SymbolFile {
public:
ElfSymbolFile(ElfFile elf, std::string elf_name);
std::string name() const override;
Result<std::vector<std::unique_ptr<SymbolTable>>> get_all_symbol_tables() const override;
Result<std::vector<std::unique_ptr<SymbolTable>>> get_symbol_tables_from_sections(
const std::vector<SymbolTableLocation>& sections) const override;
const ElfFile& elf() const;
protected:
ElfFile m_elf;
std::string m_name;
};
class SNDLLSymbolFile : public SymbolFile {
public:
SNDLLSymbolFile(std::shared_ptr<SNDLLFile> sndll);
std::string name() const override;
Result<std::vector<std::unique_ptr<SymbolTable>>> get_all_symbol_tables() const override;
Result<std::vector<std::unique_ptr<SymbolTable>>> get_symbol_tables_from_sections(
const std::vector<SymbolTableLocation>& sections) const override;
protected:
std::shared_ptr<SNDLLFile> m_sndll;
};
}

285
3rdparty/ccc/src/ccc/symbol_table.cpp vendored Normal file
View File

@@ -0,0 +1,285 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "symbol_table.h"
#include "elf.h"
#include "elf_symtab.h"
#include "mdebug_importer.h"
#include "mdebug_section.h"
#include "sndll.h"
namespace ccc {
const std::vector<SymbolTableFormatInfo> SYMBOL_TABLE_FORMATS = {
{MDEBUG, "mdebug", ".mdebug"}, // The infamous Third Eye symbol table.
{SYMTAB, "symtab", ".symtab"}, // The standard ELF symbol table.
{SNDLL, "sndll", ".sndata"} // The SNDLL symbol table.
};
const SymbolTableFormatInfo* symbol_table_format_from_enum(SymbolTableFormat format)
{
for(size_t i = 0; i < SYMBOL_TABLE_FORMATS.size(); i++) {
if(SYMBOL_TABLE_FORMATS[i].format == format) {
return &SYMBOL_TABLE_FORMATS[i];
}
}
return nullptr;
}
const SymbolTableFormatInfo* symbol_table_format_from_name(const char* format_name)
{
for(size_t i = 0; i < SYMBOL_TABLE_FORMATS.size(); i++) {
if(strcmp(SYMBOL_TABLE_FORMATS[i].format_name, format_name) == 0) {
return &SYMBOL_TABLE_FORMATS[i];
}
}
return nullptr;
}
const SymbolTableFormatInfo* symbol_table_format_from_section(const char* section_name)
{
for(size_t i = 0; i < SYMBOL_TABLE_FORMATS.size(); i++) {
if(strcmp(SYMBOL_TABLE_FORMATS[i].section_name, section_name) == 0) {
return &SYMBOL_TABLE_FORMATS[i];
}
}
return nullptr;
}
// *****************************************************************************
Result<std::unique_ptr<SymbolTable>> create_elf_symbol_table(
const ElfSection& section, const ElfFile& elf, SymbolTableFormat format)
{
std::unique_ptr<SymbolTable> symbol_table;
switch(format) {
case MDEBUG: {
symbol_table = std::make_unique<MdebugSymbolTable>(elf.image, (s32) section.header.offset);
break;
}
case SYMTAB: {
CCC_CHECK(section.header.offset + section.header.size <= elf.image.size(),
"Section '%s' out of range.", section.name.c_str());
std::span<const u8> data = std::span(elf.image).subspan(section.header.offset, section.header.size);
CCC_CHECK(section.header.link != 0, "Section '%s' has no linked string table.", section.name.c_str());
CCC_CHECK(section.header.link < elf.sections.size(),
"Section '%s' has out of range link field.", section.name.c_str());
const ElfSection& linked_section = elf.sections[section.header.link];
CCC_CHECK(linked_section.header.offset + linked_section.header.size <= elf.image.size(),
"Linked section '%s' out of range.", linked_section.name.c_str());
std::span<const u8> linked_data = std::span(elf.image).subspan(
linked_section.header.offset, linked_section.header.size);
symbol_table = std::make_unique<SymtabSymbolTable>(data, linked_data);
break;
}
case SNDLL: {
CCC_CHECK(section.header.offset + section.header.size <= elf.image.size(),
"Section '%s' out of range.", section.name.c_str());
std::span<const u8> data = std::span(elf.image).subspan(section.header.offset, section.header.size);
if(data.size() >= 4 && data[0] != '\0') {
Result<SNDLLFile> file = parse_sndll_file(data, Address::non_zero(section.header.addr), SNDLLType::SNDATA_SECTION);
CCC_RETURN_IF_ERROR(file);
symbol_table = std::make_unique<SNDLLSymbolTable>(std::make_shared<SNDLLFile>(std::move(*file)));
} else {
CCC_WARN("Invalid SNDLL section.");
}
break;
}
}
return symbol_table;
}
Result<ModuleHandle> import_symbol_tables(
SymbolDatabase& database,
const std::vector<std::unique_ptr<SymbolTable>>& symbol_tables,
std::string module_name,
Address base_address,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt)
{
Result<SymbolSourceHandle> module_source = database.get_symbol_source("Symbol Table Importer");
CCC_RETURN_IF_ERROR(module_source);
Result<Module*> module_symbol = database.modules.create_symbol(
std::move(module_name), base_address, *module_source, nullptr);
CCC_RETURN_IF_ERROR(module_symbol);
ModuleHandle module_handle = (*module_symbol)->handle();
for(const std::unique_ptr<SymbolTable>& symbol_table : symbol_tables) {
// Find a symbol source object with the right name, or create one if one
// doesn't already exist.
Result<SymbolSourceHandle> source = database.get_symbol_source(symbol_table->name());
if(!source.success()) {
database.destroy_symbols_from_module(module_handle, false);
return source;
}
// Import the symbol table.
SymbolGroup group;
group.source = *source;
group.module_symbol = database.modules.symbol_from_handle(module_handle);
Result<void> result = symbol_table->import(
database, group, importer_flags, demangler, interrupt);
if(!result.success()) {
database.destroy_symbols_from_module(module_handle, false);
return result;
}
}
return module_handle;
}
// *****************************************************************************
MdebugSymbolTable::MdebugSymbolTable(std::span<const u8> image, s32 section_offset)
: m_image(image), m_section_offset(section_offset) {}
const char* MdebugSymbolTable::name() const
{
return "MIPS Debug Symbol Table";
}
Result<void> MdebugSymbolTable::import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const
{
return mdebug::import_symbol_table(
database, m_image, m_section_offset, group, importer_flags, demangler, interrupt);
}
Result<void> MdebugSymbolTable::print_headers(FILE* out) const
{
mdebug::SymbolTableReader reader;
Result<void> reader_result = reader.init(m_image, m_section_offset);
CCC_RETURN_IF_ERROR(reader_result);
reader.print_header(out);
return Result<void>();
}
Result<void> MdebugSymbolTable::print_symbols(FILE* out, u32 flags) const
{
mdebug::SymbolTableReader reader;
Result<void> reader_result = reader.init(m_image, m_section_offset);
CCC_RETURN_IF_ERROR(reader_result);
Result<void> print_result = reader.print_symbols(
out, flags & PRINT_LOCALS, flags & PRINT_PROCEDURE_DESCRIPTORS, flags & PRINT_EXTERNALS);
CCC_RETURN_IF_ERROR(print_result);
return Result<void>();
}
// *****************************************************************************
SymtabSymbolTable::SymtabSymbolTable(std::span<const u8> symtab, std::span<const u8> strtab)
: m_symtab(symtab), m_strtab(strtab) {}
const char* SymtabSymbolTable::name() const
{
return "ELF Symbol Table";
}
Result<void> SymtabSymbolTable::import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const
{
return elf::import_symbols(database, group, m_symtab, m_strtab, importer_flags, demangler);
}
Result<void> SymtabSymbolTable::print_headers(FILE* out) const
{
return Result<void>();
}
Result<void> SymtabSymbolTable::print_symbols(FILE* out, u32 flags) const
{
Result<void> symbtab_result = elf::print_symbol_table(out, m_symtab, m_strtab);
CCC_RETURN_IF_ERROR(symbtab_result);
return Result<void>();
}
// *****************************************************************************
SNDLLSymbolTable::SNDLLSymbolTable(std::shared_ptr<SNDLLFile> sndll)
: m_sndll(std::move(sndll)) {}
const char* SNDLLSymbolTable::name() const
{
return "SNDLL Symbol Table";
}
Result<void> SNDLLSymbolTable::import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const
{
return import_sndll_symbols(database, *m_sndll, group, importer_flags, demangler);
}
Result<void> SNDLLSymbolTable::print_headers(FILE* out) const
{
return Result<void>();
}
Result<void> SNDLLSymbolTable::print_symbols(FILE* out, u32 flags) const
{
print_sndll_symbols(out, *m_sndll);
return Result<void>();
}
// *****************************************************************************
ElfSectionHeadersSymbolTable::ElfSectionHeadersSymbolTable(const ElfFile& elf)
: m_elf(elf) {}
const char* ElfSectionHeadersSymbolTable::name() const
{
return "ELF Section Headers";
}
Result<void> ElfSectionHeadersSymbolTable::import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const
{
return m_elf.create_section_symbols(database, group);
}
Result<void> ElfSectionHeadersSymbolTable::print_headers(FILE* out) const
{
return Result<void>();
}
Result<void> ElfSectionHeadersSymbolTable::print_symbols(FILE* out, u32 flags) const
{
return Result<void>();
}
}

164
3rdparty/ccc/src/ccc/symbol_table.h vendored Normal file
View File

@@ -0,0 +1,164 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include <atomic>
#include "symbol_database.h"
namespace ccc {
// Determine which symbol tables are present in a given file.
enum SymbolTableFormat {
MDEBUG = 0, // The infamous Third Eye symbol table
SYMTAB = 1, // Standard ELF symbol table
SNDLL = 2 // SNDLL section
};
struct SymbolTableFormatInfo {
SymbolTableFormat format;
const char* format_name;
const char* section_name;
};
// All the supported symbol table formats, sorted from best to worst.
extern const std::vector<SymbolTableFormatInfo> SYMBOL_TABLE_FORMATS;
const SymbolTableFormatInfo* symbol_table_format_from_enum(SymbolTableFormat format);
const SymbolTableFormatInfo* symbol_table_format_from_name(const char* format_name);
const SymbolTableFormatInfo* symbol_table_format_from_section(const char* section_name);
enum SymbolPrintFlags {
PRINT_LOCALS = 1 << 0,
PRINT_PROCEDURE_DESCRIPTORS = 1 << 1,
PRINT_EXTERNALS = 1 << 2
};
class SymbolTable {
public:
virtual ~SymbolTable() {}
virtual const char* name() const = 0;
// Imports this symbol table into the passed database.
virtual Result<void> import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const = 0;
// Print out all the field in the header structure if one exists.
virtual Result<void> print_headers(FILE* out) const = 0;
// Print out all the symbols in the symbol table. For .mdebug symbol tables
// the symbols are split between those that are local to a specific
// translation unit and those that are external, which is what the
// print_locals and print_externals parameters control.
virtual Result<void> print_symbols(FILE* out, u32 flags) const = 0;
};
struct ElfSection;
struct ElfFile;
// Create a symbol table from an ELF section. The return value may be null.
Result<std::unique_ptr<SymbolTable>> create_elf_symbol_table(
const ElfSection& section, const ElfFile& elf, SymbolTableFormat format);
// Utility function to call import_symbol_table on all the passed symbol tables
// and to generate a module handle.
Result<ModuleHandle> import_symbol_tables(
SymbolDatabase& database,
const std::vector<std::unique_ptr<SymbolTable>>& symbol_tables,
std::string module_name,
Address base_address,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt);
class MdebugSymbolTable : public SymbolTable {
public:
MdebugSymbolTable(std::span<const u8> image, s32 section_offset);
const char* name() const override;
Result<void> import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const override;
Result<void> print_headers(FILE* out) const override;
Result<void> print_symbols(FILE* out, u32 flags) const override;
protected:
std::span<const u8> m_image;
s32 m_section_offset;
};
class SymtabSymbolTable : public SymbolTable {
public:
SymtabSymbolTable(std::span<const u8> symtab, std::span<const u8> strtab);
const char* name() const override;
Result<void> import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const override;
Result<void> print_headers(FILE* out) const override;
Result<void> print_symbols(FILE* out, u32 flags) const override;
protected:
std::span<const u8> m_symtab;
std::span<const u8> m_strtab;
};
struct SNDLLFile;
class SNDLLSymbolTable : public SymbolTable {
public:
SNDLLSymbolTable(std::shared_ptr<SNDLLFile> sndll);
const char* name() const override;
Result<void> import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const override;
Result<void> print_headers(FILE* out) const override;
Result<void> print_symbols(FILE* out, u32 flags) const override;
protected:
std::shared_ptr<SNDLLFile> m_sndll;
};
class ElfSectionHeadersSymbolTable : public SymbolTable {
public:
ElfSectionHeadersSymbolTable(const ElfFile& elf);
const char* name() const override;
Result<void> import(
SymbolDatabase& database,
const SymbolGroup& group,
u32 importer_flags,
DemanglerFunctions demangler,
const std::atomic_bool* interrupt) const override;
Result<void> print_headers(FILE* out) const override;
Result<void> print_symbols(FILE* out, u32 flags) const override;
protected:
const ElfFile& m_elf;
};
}

176
3rdparty/ccc/src/ccc/util.cpp vendored Normal file
View File

@@ -0,0 +1,176 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#include "util.h"
namespace ccc {
static CustomErrorCallback custom_error_callback = nullptr;
Error format_error(const char* source_file, int source_line, const char* format, ...)
{
va_list args;
va_start(args, format);
char message[4096];
if(vsnprintf(message, sizeof(message), format, args) < 0) {
strncpy(message, "Failed to generate error message.", sizeof(message));
}
Error error;
error.message = message;
error.source_file = source_file;
error.source_line = source_line;
va_end(args);
return error;
}
void report_error(const Error& error)
{
if(custom_error_callback) {
custom_error_callback(error, ERROR_LEVEL_ERROR);
} else {
fprintf(stderr, "[%s:%d] " CCC_ANSI_COLOUR_RED "error:" CCC_ANSI_COLOUR_OFF " %s\n",
error.source_file, error.source_line, error.message.c_str());
}
}
void report_warning(const Error& warning)
{
if(custom_error_callback) {
custom_error_callback(warning, ERROR_LEVEL_WARNING);
} else {
fprintf(stderr, "[%s:%d] " CCC_ANSI_COLOUR_MAGENTA "warning:" CCC_ANSI_COLOUR_OFF " %s\n",
warning.source_file, warning.source_line, warning.message.c_str());
}
}
void set_custom_error_callback(CustomErrorCallback callback)
{
custom_error_callback = callback;
}
std::optional<std::string_view> get_string(std::span<const u8> bytes, u64 offset)
{
for(u64 i = offset; i < bytes.size(); i++) {
if(bytes[i] == '\0') {
return std::string_view(
reinterpret_cast<const char*>(&bytes[offset]),
reinterpret_cast<const char*>(&bytes[i]));
}
}
return std::nullopt;
}
std::string merge_paths(const std::string& base, const std::string& path)
{
// Try to figure out if we're dealing with a Windows path of a UNIX path.
bool is_windows_path = false;
if(base.empty()) {
is_windows_path = guess_is_windows_path(path.c_str());
} else {
is_windows_path = guess_is_windows_path(base.c_str());
}
// Actually merge the paths. If path is the entire path, we don't need to
// append base onto the front, so check for that now.
bool is_absolute_unix = (path.size() >= 1) && (path[0] == '/' || path[0] == '\\');
bool is_absolute_windows = (path.size() >= 3) && path[1] == ':' && (path[2] == '/' || path[2] == '\\');
if(base.empty() || is_absolute_unix || is_absolute_windows) {
return normalise_path(path.c_str(), is_windows_path);
}
return normalise_path((base + "/" + path).c_str(), is_windows_path);
}
std::string normalise_path(const char* input, bool use_backslashes_as_path_separators)
{
bool is_absolute = false;
std::optional<char> drive_letter;
std::vector<std::string> parts;
// Parse the beginning of the path.
if(*input == '/' || *input == '\\') { // UNIX path, drive relative Windows path or UNC Windows path.
is_absolute = true;
} else if(isalpha(*input) && input[1] == ':' && (input[2] == '/' || input[2] == '\\')) { // Absolute Windows path.
is_absolute = true;
drive_letter = toupper(*input);
input += 2;
} else {
parts.emplace_back();
}
// Parse the rest of the path.
while(*input != 0) {
if(*input == '/' || *input == '\\') {
while(*input == '/' || *input == '\\') input++;
parts.emplace_back();
} else {
parts.back() += *(input++);
}
}
// Remove "." and ".." parts.
for(s32 i = 0; i < (s32) parts.size(); i++) {
if(parts[i] == ".") {
parts.erase(parts.begin() + i);
i--;
} else if(parts[i] == ".." && i > 0 && parts[i - 1] != "..") {
parts.erase(parts.begin() + i);
parts.erase(parts.begin() + i - 1);
i -= 2;
}
}
// Output the path in a normal form.
std::string output;
if(is_absolute) {
if(drive_letter.has_value()) {
output += *drive_letter;
output += ":";
}
output += use_backslashes_as_path_separators ? '\\' : '/';
}
for(size_t i = 0; i < parts.size(); i++) {
output += parts[i];
if(i != parts.size() - 1) {
output += use_backslashes_as_path_separators ? '\\' : '/';
}
}
return output;
}
bool guess_is_windows_path(const char* path)
{
for(const char* ptr = path; *ptr != 0; ptr++) {
if(*ptr == '\\') {
return true;
} else if(*ptr == '/') {
return false;
}
}
return false;
}
std::string extract_file_name(const std::string& path)
{
std::string::size_type forward_pos = path.find_last_of('/');
std::string::size_type backward_pos = path.find_last_of('\\');
std::string::size_type pos;
if(forward_pos == std::string::npos) {
pos = backward_pos;
} else if(backward_pos == std::string::npos) {
pos = forward_pos;
} else {
pos = std::max(forward_pos, backward_pos);
}
if(pos + 1 != path.size() && pos != std::string::npos) {
return path.substr(pos + 1);
} else {
return path;
}
}
}

341
3rdparty/ccc/src/ccc/util.h vendored Normal file
View File

@@ -0,0 +1,341 @@
// This file is part of the Chaos Compiler Collection.
// SPDX-License-Identifier: MIT
#pragma once
#include <set>
#include <span>
#include <cstdio>
#include <vector>
#include <memory>
#include <string>
#include <cstdint>
#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <optional>
namespace ccc {
using u8 = unsigned char;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using s8 = signed char;
using s16 = int16_t;
using s32 = int32_t;
using s64 = int64_t;
#ifdef _WIN32
#define CCC_ANSI_COLOUR_OFF ""
#define CCC_ANSI_COLOUR_RED ""
#define CCC_ANSI_COLOUR_MAGENTA ""
#define CCC_ANSI_COLOUR_GRAY ""
#else
#define CCC_ANSI_COLOUR_OFF "\033[0m"
#define CCC_ANSI_COLOUR_RED "\033[31m"
#define CCC_ANSI_COLOUR_MAGENTA "\033[35m"
#define CCC_ANSI_COLOUR_GRAY "\033[90m"
#endif
struct Error {
std::string message;
const char* source_file;
s32 source_line;
};
enum ErrorLevel {
ERROR_LEVEL_ERROR,
ERROR_LEVEL_WARNING
};
typedef void (*CustomErrorCallback)(const Error& error, ErrorLevel level);
Error format_error(const char* source_file, int source_line, const char* format, ...);
void report_error(const Error& error);
void report_warning(const Error& warning);
void set_custom_error_callback(CustomErrorCallback callback);
#define CCC_FATAL(...) \
{ \
ccc::Error error = ccc::format_error(__FILE__, __LINE__, __VA_ARGS__); \
ccc::report_error(error); \
exit(1); \
}
#define CCC_CHECK_FATAL(condition, ...) \
if(!(condition)) { \
ccc::Error error = ccc::format_error(__FILE__, __LINE__, __VA_ARGS__); \
ccc::report_error(error); \
exit(1); \
}
#define CCC_ABORT_IF_FALSE(condition, ...) \
if(!(condition)) { \
ccc::Error error = ccc::format_error(__FILE__, __LINE__, __VA_ARGS__); \
ccc::report_error(error); \
abort(); \
}
#define CCC_ASSERT(condition) \
CCC_ABORT_IF_FALSE(condition, #condition)
// The main error handling construct in CCC. This class is used to bundle
// together a return value and a pointer to error information, so that errors
// can be propagated up the stack.
template <typename Value>
class [[nodiscard]] Result {
template <typename OtherValue>
friend class Result;
protected:
Value m_value;
std::unique_ptr<Error> m_error;
Result() {}
public:
Result(Value value) : m_value(std::move(value)), m_error(nullptr) {}
// Used to propagate errors up the call stack.
template <typename OtherValue>
Result(Result<OtherValue>&& rhs)
{
CCC_ASSERT(rhs.m_error != nullptr);
m_error = std::move(rhs.m_error);
}
static Result<Value> failure(Error error)
{
Result<Value> result;
result.m_error = std::make_unique<Error>(std::move(error));
return result;
}
bool success() const
{
return m_error == nullptr;
}
const Error& error() const
{
CCC_ASSERT(m_error != nullptr);
return *m_error;
}
Value& operator*()
{
CCC_ASSERT(m_error == nullptr);
return m_value;
}
const Value& operator*() const
{
CCC_ASSERT(m_error == nullptr);
return m_value;
}
Value* operator->()
{
CCC_ASSERT(m_error == nullptr);
return &m_value;
}
const Value* operator->() const
{
CCC_ASSERT(m_error == nullptr);
return &m_value;
}
};
template <>
class [[nodiscard]] Result<void> : public Result<int> {
public:
Result() : Result<int>(0) {}
// Used to propagate errors up the call stack.
template <typename OtherValue>
Result(Result<OtherValue>&& rhs)
{
CCC_ASSERT(rhs.m_error != nullptr);
m_error = std::move(rhs.m_error);
}
};
#define CCC_FAILURE(...) ccc::Result<int>::failure(ccc::format_error(__FILE__, __LINE__, __VA_ARGS__))
#define CCC_CHECK(condition, ...) \
if(!(condition)) { \
return CCC_FAILURE(__VA_ARGS__); \
}
#define CCC_EXPECT_CHAR(input, c, context) \
CCC_CHECK(*(input++) == c, \
"Expected '%c' in %s, got '%c' (%02hhx)", \
c, context, *(input - 1), *(input - 1))
#define CCC_RETURN_IF_ERROR(result) \
if(!(result).success()) { \
return (result); \
}
#define CCC_EXIT_IF_ERROR(result) \
if(!(result).success()) { \
ccc::report_error((result).error()); \
exit(1); \
}
#define CCC_GTEST_FAIL_IF_ERROR(result) \
if(!(result).success()) { \
FAIL() << (result).error().message; \
}
template <typename... Args>
void warn_impl(const char* source_file, int source_line, const char* format, Args... args)
{
Error warning = format_error(source_file, source_line, format, args...);
report_warning(warning);
}
#define CCC_WARN(...) \
ccc::warn_impl(__FILE__, __LINE__, __VA_ARGS__)
#ifdef _MSC_VER
#define CCC_PACKED_STRUCT(name, ...) \
__pragma(pack(push, 1)) struct name { __VA_ARGS__ } __pragma(pack(pop));
#else
#define CCC_PACKED_STRUCT(name, ...) \
struct __attribute__((__packed__)) name { __VA_ARGS__ };
#endif
template <typename T>
const T* get_aligned(std::span<const u8> bytes, u64 offset)
{
if(offset > bytes.size() || bytes.size() - offset < sizeof(T) || offset % alignof(T) != 0) {
return nullptr;
}
return reinterpret_cast<const T*>(&bytes[offset]);
}
template <typename T>
const T* get_unaligned(std::span<const u8> bytes, u64 offset)
{
if(offset > bytes.size() || bytes.size() - offset < sizeof(T)) {
return nullptr;
}
return reinterpret_cast<const T*>(&bytes[offset]);
}
template <typename T>
std::optional<T> copy_unaligned(std::span<const u8> bytes, u64 offset)
{
if(offset > bytes.size() || bytes.size() - offset < sizeof(T)) {
return std::nullopt;
}
T value;
memcpy(&value, &bytes[offset], sizeof(T));
return value;
}
std::optional<std::string_view> get_string(std::span<const u8> bytes, u64 offset);
#define CCC_BEGIN_END(x) (x).begin(), (x).end()
#define CCC_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define CCC_FOURCC(string) ((string)[0] | (string)[1] << 8 | (string)[2] << 16 | (string)[3] << 24)
struct Address {
u32 value = (u32) -1;
Address() {}
Address(u32 v) : value(v) {}
bool valid() const
{
return value != (u32) -1;
}
u32 get_or_zero() const
{
if(valid()) {
return value;
} else {
return 0;
}
}
Address add_base_address(Address base_address) const
{
if(valid()) {
return base_address.get_or_zero() + value;
} else {
return Address();
}
}
static Address non_zero(u32 address)
{
Address result;
if(address != 0) {
result = address;
}
return result;
}
friend auto operator<=>(const Address& lhs, const Address& rhs) = default;
};
struct AddressRange {
Address low;
Address high;
AddressRange() {}
AddressRange(Address address) : low(address), high(address) {}
AddressRange(Address l, Address h) : low(l), high(h) {}
friend auto operator<=>(const AddressRange& lhs, const AddressRange& rhs) = default;
};
// These functions are to be used only for source file paths present in the
// symbol table, since we want them to be handled consistently across different
// platforms, which with std::filesystem::path doesn't seem to be possible.
std::string merge_paths(const std::string& base, const std::string& path);
std::string normalise_path(const char* input, bool use_backslashes_as_path_separators);
bool guess_is_windows_path(const char* path);
std::string extract_file_name(const std::string& path);
namespace ast { struct Node; }
// These are used to reference STABS types from other types within a single
// translation unit. For most games these will just be a single number, the type
// number. In some cases, for example with the homebrew SDK, type numbers are a
// pair of two numbers surrounded by round brackets e.g. (1,23) where the first
// number is the index of the include file to use (includes are listed for each
// translation unit separately), and the second number is the type number.
struct StabsTypeNumber {
s32 file = -1;
s32 type = -1;
friend auto operator<=>(const StabsTypeNumber& lhs, const StabsTypeNumber& rhs) = default;
bool valid() const { return type > -1; }
};
enum StorageClass {
STORAGE_CLASS_NONE = 0,
STORAGE_CLASS_TYPEDEF = 1,
STORAGE_CLASS_EXTERN = 2,
STORAGE_CLASS_STATIC = 3,
STORAGE_CLASS_AUTO = 4,
STORAGE_CLASS_REGISTER = 5
};
// Function pointers for the GNU demangler functions, so we can build CCC as a
// library without linking against the demangler.
struct DemanglerFunctions {
char* (*cplus_demangle)(const char *mangled, int options) = nullptr;
char* (*cplus_demangle_opname)(const char *opname, int options) = nullptr;
};
}

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,32 @@ 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(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND CPUINFO_TARGET_PROCESSOR STREQUAL "amd64")
SET(CPUINFO_TARGET_PROCESSOR "AMD64")
ENDIF()
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 +95,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|FreeBSD)$")
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 +117,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 +177,18 @@ 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)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
LIST(APPEND CPUINFO_SRCS src/x86/freebsd/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 +208,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,11 +237,13 @@ 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)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
LIST(APPEND CPUINFO_SRCS src/freebsd/topology.c)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
SET(CMAKE_THREAD_PREFER_PTHREAD TRUE)
SET(THREADS_PREFER_PTHREAD_FLAG TRUE)
FIND_PACKAGE(Threads REQUIRED)
@@ -166,34 +263,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)
@@ -202,22 +308,618 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
TARGET_LINK_LIBRARIES(cpuinfo_internals PUBLIC ${CMAKE_THREAD_LIBS_INIT})
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _GNU_SOURCE=1)
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _GNU_SOURCE=1)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
TARGET_LINK_LIBRARIES(cpuinfo PUBLIC ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(cpuinfo_internals PUBLIC ${CMAKE_THREAD_LIBS_INIT})
ENDIF()
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@)

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