Commit Graph

1541 Commits

Author SHA1 Message Date
Stenzek ad0190d6ed Build: Require C++20 2023-07-20 21:23:31 +10:00
Stenzek 296dcccd81 Misc: Fix a bunch of issues preventing C++20 compilation 2023-07-20 21:23:31 +10:00
Silent c82f800794 FileSystem: Use _filelengthi64 to get the file size on Windows 2023-07-19 13:45:46 +10:00
Silent 240586875c FileSystem: Make FILE* unique pointers use a functor deleter 2023-07-18 17:24:34 +01:00
charlesthobe 85d2ca626f Common: Linux: fix potentially unsafe screensaver inhibitor 2023-07-17 20:11:32 +10:00
Stenzek 8524fbbaf9 GS/HW: Decompress replacement textures to get alpha min/max 2023-07-11 13:30:47 +01:00
Stenzek db1e1bcc1f CDVD: Rewrite ISO parser 2023-07-09 21:52:02 +10:00
Stenzek a9a1af7307 FileSystem: Add IsValidFileName()
And associated tests.
2023-07-06 12:30:35 +10:00
Stenzek 3c408de5c9 Build: Disable exceptions in the compiler 2023-06-30 21:37:44 +10:00
Stenzek adca796d94 Common: Remove SafeArray
And replace with std::vector.
2023-06-30 21:37:44 +10:00
Stenzek 732aa96656 Common: Remove AlignedBuffer
And replace its one use site (texture dumping).
2023-06-30 21:37:44 +10:00
Stenzek 6beaec8ba1 Common: Remove Exceptions
The satisfaction is immeasurable.
2023-06-30 21:37:44 +10:00
Stenzek ab4592b8e9 Common: Add Error class 2023-06-30 21:37:44 +10:00
Stenzek 55e73bb4b9 MTGS: Convert to namespace 2023-06-25 12:54:14 +10:00
TellowKrinkle 8d27c32418 Updater:Mac: Delay launch of new application until the old one exits
Prevents duplicate dock icons
2023-06-24 22:28:56 +01:00
Stenzek 7c9c8e197c Common: Replace MemsetFast routines with C memset
And associated cleanup.

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

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

Ends up a couple of percent faster in FMV decoding.
2023-06-22 19:11:57 +10:00
Stenzek adcfca4db3 Qt: Localization support 2023-06-20 22:46:00 +10:00
Stenzek 03242a2953 Common: Move MemcpyFast routines to General.h
And add a trivially-copyable check, so nobody accidentially uses them
with non-POD types.
2023-06-16 18:26:28 +10:00
Stenzek 9613b43d50 Common: Purge SingleCoreAffinity
No longer used, never worked on Linux.
2023-06-16 18:26:28 +10:00
Stenzek 8a8e6c5d20 Common: Purge CPU frequency measurement
It's not accurate, and we can query the registry for the TSC frequency
for thread timers.

Also replaces InitCPUTicks() with a global constructor.
2023-06-16 18:26:28 +10:00
Stenzek bca20c9e27 Common: Call dwmapi directly 2023-06-15 20:46:56 +10:00
Stenzek 1de3e0986e Build: Remove unused pthreads.props 2023-06-15 20:46:56 +10:00
TellowKrinkle a2c6e050d7 VMManager: MacOS CPU count detection 2023-05-27 04:57:50 +01:00
Stenzek 680affd1fe Common: Add ByteSwap.h
Provides a C++23-like std::byteswap implementation.
2023-05-25 16:47:36 +01:00
Stenzek 884086ba76 StringUtil: Fix incorrect value of endptr
And add associated unit tests.
2023-05-24 12:24:47 +01:00
Stenzek 0f05967190 CommonHost: Purge and move functions to appropriate locations 2023-05-16 12:58:19 +01:00
Stenzek ad0e469f87 Misc: Clang warning fixes 2023-05-16 12:58:19 +01:00
Stenzek 512d24cea6 Misc: More build system cleanups
Set UTF-8 source file format globally.
Set permissive/compliance mode globally.
Get rid of include of base 3rdparty directory, be explicit.
Get rid of duplicated properties.
Get rid of leftover plugin property files.
2023-05-16 12:58:19 +01:00
Stenzek c57d8980a1 GS: Move Vulkan helpers from common to GS 2023-05-06 03:40:00 +01:00
Stenzek 0ed418834a GS: Move OpenGL helpers from common to GS 2023-05-06 03:40:00 +01:00
Stenzek 083969a3d2 GS: Move DirectX helpers from common to GS 2023-05-06 03:40:00 +01:00
Ty Lamontagne 6740fff179 Profiling: Fix missing cast breaking VTune builds on Linux
Also remove now-pointless SW-JIT VTune code.
2023-05-06 03:15:46 +01:00
CharlesThobe 7aff4ee4cb Misc: Minor cleanup 2023-05-04 14:39:14 +01:00
Stenzek 6736ef1d44 GS/Vulkan: Add exclusive fullscreen control option 2023-05-02 19:55:43 +01:00
CharlesThobe 9de152b8ee Linux: implement DBus screensaver inhibitor 2023-04-30 19:18:53 +01:00
Stenzek a5ed24ca88 Perf: Support instruction-level profiling with jitdump on Linux 2023-04-29 16:22:37 +01:00
Stenzek b3697579c0 GS/Vulkan: Simplify GPU selection
Hopefully stops a crash on broken drivers.
2023-04-29 16:20:01 +01:00
Stenzek befbf57191 GS: Refactor exclusive fullscreen yet again
Also acquire render window as late as possible.
Limits the duration that the main window isn't displaying anything.
2023-04-26 16:00:39 +01:00
Stenzek b3a88d6ea7 Qt: Migrate to 6.5.0 on Windows 2023-04-25 21:53:30 +01:00
Stenzek d646bbf5c1 GS/Vulkan: Prioritize VK_EXT_rasterization_order_attachment_access
.. over the ARM version. But continue to support both.
2023-04-15 20:09:48 +01:00
Stenzek 20ab5ed0fa GS/Vulkan: Don't assume opaque composite alpha is supported 2023-04-15 20:09:48 +01:00
Stenzek 8590e390a2 GS/Vulkan: Don't enable geometryShader 2023-04-15 20:09:48 +01:00
Stenzek 7f7dd60587 GS/HW: VS expand instead of GS for DX/GL/Vulkan 2023-04-13 11:12:11 +01:00
Stenzek 5bc9d625e7 GL/StreamBuffer: Align CPU side fallback buffers 2023-04-13 11:12:11 +01:00
arcum42 60047e8029 common: Remove some unneeded includes. 2023-04-08 20:26:39 +01:00
arcum42 e37fff1213 common: Remove SafeList and SafeAllignedArray as unused. 2023-04-08 20:26:39 +01:00
Stenzek f2229a0007 GS/OGL: Don't leak shader objects when compiling 2023-04-07 17:18:21 +01:00
Stenzek 398cf43782 GS: Combine HostDisplay with GSDevice
GS/DX11: Don't throw bad_alloc on surface creation fail

GS: Link device and host display construction/destruction

FullscreenUI: Replace HostDisplayTexture with GSTexture

GS: Purge HostDisplayTexture

GS: Move everything in HostDisplay to GSDevice

GS: Move ImGui rendering to GSDevice

GS: Get rid of reset/store API state
2023-04-06 08:48:07 +01:00
Stenzek fcbc027abc GS: Unify D3D device creation paths
Also makes Vulkan the device for Intel Arc GPUs.
2023-04-01 14:15:18 +01:00
Stenzek 65d78eff57 GS/HW: Sample depth buffer instead copying when safe
OpenGL and Vulkan only.
2023-03-30 21:55:50 +01:00
Stenzek de55596926 GS/Vulkan: Include source code in shader debug info 2023-03-30 21:55:50 +01:00
Stenzek 5805142fd7 CrashHandler: Print backtrace on Linux 2023-03-20 15:46:32 +00:00
refractionpcsx2 4555667554 GS: Rename bad_shader files to pcsx2_bad_shader for linux clarity 2023-03-12 00:07:52 +00:00
Stenzek b484f7aef0 Context/Vulkan: Handle VK_INCOMPLETE return from vkEnumeratePhysicalDevices() 2023-03-01 20:37:18 +00:00
Ganael Laplanche c5330cf166
Common: FreeBSD fixes. (#8163)
* Fix SIGSEGV handler on FreeBSD

* Fix config dir location on FreeBSD
2023-02-16 09:30:18 +01:00
Stenzek c7352d9e10 GS: Attempt to recreate device if GPU crashes 2023-02-11 15:33:55 +00:00
TheTechnician27 06db8eec48 Context.cpp: fix minor typo 2023-02-11 06:46:44 +00:00
Stenzek 5b5edc506d Misc: Warning fixes 2023-02-10 11:20:37 +00:00
Stenzek d6099dd263 GS/Vulkan: Use Bresenham line rasterization when supported 2023-02-09 13:42:05 +00:00
lightningterror 8e6c18d3f4 emitter: Ignore Wmissing-braces warnings on clang. 2023-01-30 20:32:33 +01:00
Stenzek d12fa690c0 R5900: Remove exceptions 2023-01-26 11:11:36 +00:00
Stenzek 94226e83ba Common: Purge EventSource 2023-01-26 11:11:36 +00:00
Stenzek 4cf041f6cb Common: Move VirtualMemory related functionality to core
Also rewrites page fault handling to not use EventSource junk.
2023-01-26 11:11:36 +00:00
lightningterror d9f4bc70fb common-ogl: Fix Shader compiled with warnings log spam on gl.
Observed on intel igpu.
2023-01-23 14:48:40 +01:00
Connor McLaughlin 0bca1aab74 Misc: Latest round of warning cleanups 2023-01-12 11:04:29 +01:00
Connor McLaughlin 95fa15f902 Vulkan: Use pool of semaphores instead of per-image
Some drivers apparently don't iterate images in the order you expect.
2023-01-12 11:03:21 +01:00
JordanTheToaster 4d418d1bb5 Emitter: Remove old unused code
Irrelevant and outdated code that is no longer needed.
2023-01-10 16:18:26 +01:00
Stenzek 3fa3bc1719 Vulkan/Context: Acquire swap chain image after presenting 2023-01-06 14:57:57 +00:00
Stenzek 93bd95f4bd Vulkan/Context: Pass swap chain through to submission
Simplifies things a bit.
2023-01-06 14:57:57 +00:00
Stenzek 7d572ff794 Vulkan/SwapChain: Use a separate semaphore for each image 2023-01-06 14:57:57 +00:00
arcum42 2db6bf399e common: Remove pxUSE_SECURE_MALLOC. 2023-01-05 14:58:54 -08:00
Stenzek ac3e7fbf44 MSBuild: Support building with clang-cl 2023-01-03 12:16:50 +00:00
lightningterror 48b9d2f53e common-ogl: Fix Program linked with warnings log spam on gl.
Mostly observed on amd driver.
2023-01-01 12:03:02 +01:00
Stenzek 00d768a6bf x86/microVU: Add VI caching 2022-12-29 10:01:25 +00:00
Stenzek 8a34c4b2e2 Common: Remove mt_queue.h
More stuff from wx.
2022-12-28 11:02:53 +00:00
Stenzek b1dcd53212 Qt: Merge old wxResources.rc (icon) into PCSX2.rc 2022-12-28 11:02:53 +00:00
Stenzek de7bbd6c37 Common: Add WAVWriter
To replace WAVFile with a questionable license history.
2022-12-28 11:02:53 +00:00
Stenzek 5999a1a62e D3D12/Texture: Fix crash when upload buffer exhausts 2022-12-28 10:58:37 +00:00
Stenzek dff6d1843a Misc: Remove more wxWidgets references 2022-12-25 14:47:05 +01:00
Stenzek 07b7420ba5 vsprops: Remove a wx reference 2022-12-25 14:47:05 +01:00
Stenzek 43afeb205f Common: Get rid of pxTrap()
wx rubbish, no longer needed
2022-12-25 14:47:05 +01:00
Stenzek ca92d4ea3d Common: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Ziemas af789a4f8d Add missing <cassert> include 2022-12-24 16:35:43 +00:00
Connor McLaughlin 509be0b3f8 MemorySettingsInterface: Add {Set,Get}KeyValueList 2022-12-23 07:24:32 +01:00
Connor McLaughlin 899eef18ec Common: Add DynamicLibrary 2022-12-22 04:27:30 +00:00
TellowKrinkle e2c3a8b1e1 SettingsInterface: Add Key+Value setting support 2022-12-18 08:27:07 +00:00
TellowKrinkle 8925da94e1 Updater: MacOS support 2022-12-18 07:56:03 +00:00
Connor McLaughlin 4ebb5a87b2 SDLInputSource: Support joysticks as well as controllers 2022-12-18 03:47:00 +00:00
Connor McLaughlin ebeb88d425 Common: Add HeapArray 2022-12-18 03:47:00 +00:00
Connor McLaughlin 6a548440ea D3D12/Context: Don't assert-fail when D3D12 is unavailable 2022-12-16 11:11:36 +00:00
Connor McLaughlin eba2273cd1 GS/OpenGL: Cleanups and GLES support 2022-12-16 11:11:15 +00:00
Connor McLaughlin aea6a9f534 Common: Add Threading::SleepUntil() 2022-12-08 09:36:41 +00:00
TellowKrinkle e0a0e0b00c microVU: Choose AVX2/SSE at runtime 2022-12-03 00:52:10 -06:00
TellowKrinkle be6598e224 Threading: DarwinSemaphore.cpp things no longer need to be cancellation points 2022-12-03 02:44:25 +01:00
TellowKrinkle faf750a544 GS: Use semaphores with a fast userspace path 2022-12-03 02:44:25 +01:00
Connor McLaughlin 89c0d95a94 Common: Slim down RedtapeWindows and correct case 2022-11-27 03:45:54 +00:00
xantares 2c88cd7ac0 CMake: Lowercase Winmm for case-sensitive fs
Fix build on mingw from linux
2022-11-26 19:05:58 +00:00
xantares 0440079a24 FileSystem: Use _stat64 routines 2022-11-26 19:05:49 +00:00
xantares 5fbf21c1bd RedtapeWindows: Lowercase includes for linux fs 2022-11-26 19:03:15 +00:00
Connor McLaughlin ebeba2ba17 GS/Vulkan: Enable samplerAnisotropy before using 2022-11-26 16:17:20 +00:00
Connor McLaughlin daebb5753a GS/HW: Fix various issues with texture replacements
- Replacement textures now show in HC usage to give a clearer picture
   of VRAM usage.
 - Fixed crashes when loading compressed and mipmapped DDS textures.
 - Fixed compressed mipmapped textures in Direct3D 12.
 - Fixed GPU crashes in D3D11/D3D12/Vulkan when compressed textures went
   down the last 1x1 mipmap level.
2022-11-26 16:17:20 +00:00
AKuHAK 2ab27ef42a formatter: apply editorconig into various files 2022-11-25 22:41:00 +00:00
TellowKrinkle ee451fe345 Common: Fix slow emulator startup on M1s 2022-11-25 20:20:24 +00:00
Connor McLaughlin f7c79fe3cc GS: Implement FidelityFX CAS 2022-11-23 11:45:37 +00:00
Connor McLaughlin 5363a90c6b D3D12: Add compute shader support 2022-11-23 11:45:37 +00:00
Connor McLaughlin d132ddefef GL: Add support for compute shaders 2022-11-23 11:45:37 +00:00
TellowKrinkle 46db4077b8 Common:Vulkan: Add storage descriptors to pool
Needed for CAS
2022-11-23 11:45:37 +00:00
Connor McLaughlin 344d27ea5a Vulkan: Add ComputeShaderPipelineBuilder 2022-11-23 11:45:37 +00:00
lightningterror dda0b6c296 common: Drop windows 8.1 and server 2012 r2 support.
We already require windows 10 (build 1809) with the recent recompiler changes.
2022-11-20 22:28:43 +01:00
Connor McLaughlin 129fddf07c Qt: Switch to 6.4.0 on Windows 2022-11-20 17:25:55 +00:00
lightningterror 5c104f8e1d common linux: Fix Wunused-variable warning. 2022-11-19 19:28:52 +01:00
Connor McLaughlin 1ccddb92d4 EE Rec/IOP Rec: Rewrite large portions
- Add fastmem
 - Add delay slot swapping
 - Add COP2 sync elision
 - Add block analysis and use analysis
 - Add GPR register caching and renaming
2022-11-19 04:59:10 +00:00
Connor McLaughlin 56501e0811 x86emitter: Fix up emitting of xmm -> ptr64 operands 2022-11-19 04:59:10 +00:00
Connor McLaughlin 3d6a550f23 x86Emitter: Add 8-bit variants for spl..r15b
Also fixes PINSR/PEXTR.
2022-11-19 04:59:10 +00:00
Connor McLaughlin 76b03a8a88 VSProps: Use MultiToolTask mode
Much better parallelism, due to our source files being spread out across
multiple folders.

pcsx2core build time on a Ryzen 3900X with 12C/24T:

Before: Time Elapsed 00:00:26.74
After: Time Elapsed 00:01:03.21
2022-11-19 04:58:23 +00:00
Ty Lamontagne 4975f7f098 Profiling: Fix QT builds where USE_VTUNE is true 2022-11-09 19:00:11 +00:00
Ganael Laplanche aa59547af7 build: Fix build on FreeBSD
- ftruncate64() does not exist on FreeBSD
- add missing environ(7) declaration
2022-10-28 13:25:49 +02:00
Ganael Laplanche 67f1cd4e15 Fix shm_open(3) call on FreeBSD
On FreeBSD, shm_open(3) requires name to start with a '/', else EINVAL
is returned.

See: https://www.freebsd.org/cgi/man.cgi?shm_open
2022-10-28 13:25:49 +02:00
TellowKrinkle ac1f31f2cd GS:HW: Add option to spin CPU during readbacks 2022-10-24 14:33:17 +01:00
TellowKrinkle 89dd7f19ef Misc: Improve pause speed measurements
Avoids issues with cores being clocked down during the measurement
2022-10-24 14:33:17 +01:00
TellowKrinkle 923b0817ce GS:Vk: Add option to spin GPU during readbacks 2022-10-24 14:33:17 +01:00
TellowKrinkle 4c9981f3c8 Common:Vk: Move command buffer completion processing to separate function 2022-10-24 14:33:17 +01:00
TellowKrinkle 0ef469f3b5 Common:Vk: Load VK_EXT_calibrated_timestamps 2022-10-24 14:33:17 +01:00
TellowKrinkle ea35619a78 Common: Add class for spinning GPUs 2022-10-24 14:33:17 +01:00
Connor McLaughlin 61de98d651 Vulkan: Support running surfaceless 2022-10-22 23:19:54 +01:00
Connor McLaughlin bf2575c3c9 GL/ContextWGL: Fix running surfaceless 2022-10-22 23:19:54 +01:00
Connor McLaughlin 5647ca7f08 Qt: Add play time tracking based on serials 2022-10-22 11:08:23 +01:00
Connor McLaughlin e7c4894833 Common: Add MemorySettingsInterface 2022-10-20 19:43:29 +01:00
Silent 633eb45011 vs: Enable Function Level Linking solution-wide and AVX2 for Common project
Shrinks the AVX2 Qt binary by ~2.3MB.
2022-10-20 12:10:17 +01:00
TellowKrinkle 1ac081ef4c Common: Make GL::Context::Create use gsl::span 2022-10-16 19:24:45 -05:00
TellowKrinkle a2c3050c51 Common: Formatting 2022-10-16 19:24:45 -05:00
Connor McLaughlin 48926a7ec4 x86/iR5900: Fix quadword stores on Linux
Linux counts vector and GPR registers separately for which register
they get passed in when calling functions.

Windows uses the argument position.
2022-10-16 14:41:33 +02:00
Connor McLaughlin d446e40741 System: Remove/move out a bunch more leftover stuff from wx
The exceptions are particularly nasty, because there's nothing which
catches them.
2022-10-14 22:24:42 +01:00
Connor McLaughlin 00bcb4cf02 System: Revamp memory allocation
Guest memory is now mapped into a shared memory/file mapping, for use
with fastmem.

64-bit and 128-bit arguments are passed by register/value instead of by
reference/address.

LDL/LDR/SDL/SDR now use 64-bit GPRs instead of SSE.
2022-10-14 22:24:42 +01:00
Connor McLaughlin 92ad6f3baf x86emitter: Fix missing W REX bit for movq reg, xmm 2022-10-14 22:24:42 +01:00
Connor McLaughlin 375c0a02bb x86emitter: Add some AVX/AVX2 instructions and YMM registers 2022-10-14 20:54:39 +01:00
Connor McLaughlin c379c833e4 Linux: Implement screensaver inhibit for X11 2022-10-03 11:55:31 +01:00
Connor McLaughlin f63e1b3760 Qt: Implement screensaver inhibit 2022-10-03 11:55:31 +01:00
Connor McLaughlin 0419de4baf Qt: Add RetroAchievements implementation 2022-10-01 00:00:02 +01:00
Connor McLaughlin 9c64193434 HTTPDownloader: Pass content type by reference 2022-10-01 00:00:02 +01:00
Connor McLaughlin af646e4496 Common: Add StringUtil::ToChars() wrapper 2022-09-25 14:49:48 +02:00
Connor McLaughlin f17a77c18e Common: Add HTTPDownloader implementation 2022-09-17 17:51:14 +01:00
Connor McLaughlin 2b04f0b585 Path: Make sanitize routine follow OS rules 2022-09-17 17:51:14 +01:00
Connor McLaughlin 22ed71cef4 StringUtil: Add UTF-8 encode and decode 2022-09-17 17:51:14 +01:00
Connor McLaughlin e0cb165927 LRUCache: Fix Evict() removing too many items 2022-09-09 21:21:14 +01:00
Connor McLaughlin 22e9aea827 Config: Fix frame rate being parsed ever-so-slightly off
Also converts from double to float, we don't need additional precision
for storing these values.
2022-09-09 21:21:14 +01:00
TellowKrinkle 0500824e57 GS:Vk: Change primitive_id enable to match the new meaning
A bit messy, due to the fact that its support piggybacks on support of other features, instead of having a dedicated feature flag
2022-09-06 21:07:56 +02:00
Connor McLaughlin 9cce6945e6 Common: Add Image and Easing classes 2022-08-29 13:39:09 +01:00
Connor McLaughlin d466184a02 MTGS: Support 'running idle', i.e. redisplaying the current frame 2022-08-29 13:39:09 +01:00
Connor McLaughlin 9655d28a23 Common: Remove unused code 2022-08-27 13:52:12 +01:00