Commit Graph

1420 Commits

Author SHA1 Message Date
Henrik Rydgård
27a60f5e58 Fix message asserts on Android. Add more of them to check things in Vulkan code. 2017-11-20 12:11:47 +01:00
Henrik Rydgård
96d6f1cae5 Make sure the device supports transfers from swapchain images when taking screenshots. 2017-11-15 13:57:22 +01:00
Henrik Rydgård
10792cc8e7 Windows/Vulkan: implement screenshots. Something is iffy with the red/blue swap though... 2017-11-15 13:18:29 +01:00
Henrik Rydgård
3594623a8d Vulkan: Show the preferred depth-stencil format in the feature list. 2017-11-15 09:08:30 +01:00
Unknown W. Brackets
b1554ef061 Vulkan: Cut down on asserts during init.
In case something is horribly wrong, or our desired settings aren't
compatible, let's try to stumble our way out.

More things can fail, but the goal is to detect failure or at least be
able to render UI settings to swap out of Vulkan.
2017-11-12 21:56:55 -08:00
Henrik Rydgård
4346a54eb7 Vulkan: Speed up and simplify hardware tesselation by using storage buffers. 2017-11-12 13:55:42 +01:00
Henrik Rydgård
ebac0143e0 Vulkan: Use a device allocator for tesselation data textures. Add comment about better solutions. 2017-11-12 10:28:55 +01:00
Henrik Rydgård
8d7bcd9d61 Vulkan hw tess: Assorted minor fixes. Works on Mali now. 2017-11-11 21:51:05 +01:00
Henrik Rydgård
ee768ca949 Logging improvements, avoid resetting the Android text drawer unnecessarily 2017-11-10 13:02:24 +01:00
Henrik Rydgård
0a2b20bf59 More logging and tweaking 2017-11-10 12:09:42 +01:00
Henrik Rydgård
8b42d83123 Vulkan: Remove duplicate depalShaderCache, fix a number of instances where we didn't use the deleter properly.
Plus more logging, of course.
2017-11-09 17:25:37 +01:00
Henrik Rydgård
ec504756e0 Vulkan: Improve init/shutdown logging on Android. Fix a bug where we'd not run InitDeviceObjects on GPU_Vulkan sometimes. 2017-11-09 16:02:05 +01:00
Henrik Rydgård
845b02a6c5 Ooops 2017-11-09 13:35:42 +01:00
Henrik Rydgård
25f32b1d78 Vulkan: Disable dual source blending on Intel GPUs, fixes #10074. 2017-11-09 13:16:06 +01:00
Henrik Rydgård
ba846fdbc5 Show textual names of Vulkan GPU vendors 2017-11-09 12:30:07 +01:00
Henrik Rydgård
c6c90d4cbc Improve Vulkan device selection mechanism to prefer discrete GPUs 2017-11-09 12:21:20 +01:00
Henrik Rydgård
ca3be1877e Vulkan: Apply simple workaround for Mali driver bug (see #10070), and minor cleanup. 2017-11-08 17:03:27 +01:00
Henrik Rydgård
62b24edde1 Fix some minor things found by running Sizer on PPSSPP
Sizer: https://github.com/aras-p/sizer
2017-11-08 16:56:48 +01:00
Henrik Rydgård
70c70b1e76 Vulkan: Some error handling improvement. Might get us a clue for #10065 2017-11-07 00:08:39 +01:00
Unknown W. Brackets
fc32a7b24e Vulkan: Show textures in GE debugger. 2017-11-06 00:29:01 -08:00
Anthony J. Bentley
9fc355eee4 Use W^X on OpenBSD. 2017-11-05 17:06:09 -07:00
Henrik Rydgård
3c591ad9ca
Merge pull request #10052 from unknownbrackets/savestate-oom
Avoid Android OOM crashes on save state
2017-11-05 22:50:19 +01:00
Unknown W. Brackets
349b36f000 SaveState: Correct free on error and uncomp format.
The uncompressed path had diverged, so refactor to avoid this in the
future.  Also, some errors weren't freeing all buffers.
2017-11-05 10:19:09 -08:00
Unknown W. Brackets
66ddf592b4 SaveState: Use malloc to avoid Android OOM crash.
We have exceptions disabled on Android, which is exactly where we need the
OOM check most.
2017-11-05 10:04:22 -08:00
Unknown W. Brackets
8edc6eaf5e Vulkan: Fix segfault on swapchain fail.
This at least allows us to detect that the backend failed to init.

Happens when switching backends with debugger attached (probably driver
bug?)
2017-11-04 20:45:08 -07:00
Henrik Rydgård
0e5b398c9d Minor optimization. 2017-11-01 21:43:08 +01:00
Henrik Rydgård
94b16bf097 DenseHashMap: Speed up clearing. Became more important since I had to disable keeping descriptor sets around between frames. 2017-11-01 10:09:16 +01:00
Henrik Rydgård
96cd368878 Make VulkanTexture "immutable". 2017-11-01 08:49:48 +01:00
Henrik Rydgård
330bdb8be8 Add and update some comments. 2017-11-01 08:42:49 +01:00
Henrik Rydgård
74861d2d73 Vulkan: Make backbuffer transitions part of backbuffer render pass. Optimize depth buffer memory operations. 2017-11-01 08:42:49 +01:00
Henrik Rydgård
3f503ca297 Implement the rest of Vulkan framebuffer depal. Not yet working though. 2017-10-31 12:34:59 +01:00
Henrik Rydgård
c788dc896a Synchronization is HARD. need a rethink, methinks. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
1c5bd0f8dc Move the VulkanRenderManager stuff to thin3d, fits in better there. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
02f76ae4a8 Rendering basics now works. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
833916a906 A multitude of fixes. The UI now works correctly, though of course ingame still broken. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
0a0494ef8e It builds! With some shortcuts, of course. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
417b96a1b0 Use RenderManager for thin3d stuff 2017-10-26 10:56:59 +02:00
Henrik Rydgård
84ed793adf Initial work on render queue manager 2017-10-26 10:56:59 +02:00
Henrik Rydgård
eabaf6ddcd Bit more Vulkan barrier cleanup. 2017-10-21 13:05:52 +02:00
Henrik Rydgård
804aa79376 Various Vulkan image transition fixes and related 2017-10-20 18:09:05 +02:00
Henrik Rydgård
5da165fad6 More work towards passing 1.61 Vulkan validation layers 2017-10-20 17:19:07 +02:00
Henrik Rydgård
d0b9e5ed8f Initial work on passing the latest Vulkan validation checks. 2017-10-20 14:47:36 +02:00
Unknown W. Brackets
dd98e877d4 Windows: Fix over/under write for multibyte chars. 2017-10-14 21:45:07 -07:00
Henrik Rydgård
3757070fe2 Extra safety when switching GPU backends, fix possible Vulkan shutdown issue. Should help #10005 2017-10-09 12:17:54 +02:00
Henrik Rydgård
356b25e3ce Vulkan: If there are no GPUs available, fail properly instead of asserting.
Seen on an obscure x86-64 android device when running 32-bit binaries
2017-10-02 14:09:30 +02:00
Henrik Rydgård
ce21642a61 Merge pull request #9978 from LunaMoo/ctrl_extra
Add more PSP keys(for some homebrew and cwcheats)
2017-09-28 18:51:16 +02:00
LunaMoo
d96232be72 Finish making extra psp keys mappable. 2017-09-23 15:37:10 +02:00
twinaphex
4855b2d6f1 mingw patches 2017-08-31 22:15:05 +02:00
Henrik Rydgård
6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgård
ff3d799871 Remove snprintf compatibility hacks for MSVC versions before 2015 2017-08-31 16:46:54 +02:00
Henrik Rydgård
22e65ba80d Get rid of ugly alignment macros and some other cruft, we now have alignas(16) from C++11 2017-08-31 01:14:51 +02:00
twinaphex
157d04b2a5 Simplify this conditional 2017-08-30 19:47:15 +02:00
twinaphex
db404adb95 More mingw patches 2017-08-29 22:24:20 +02:00
twinaphex
78b6636a2b Remove this too - we will use UNICODE and _UNICODE defines for
mingw build
2017-08-29 18:49:36 +02:00
twinaphex
cc24b158ac Change this to _MSC_VER 2017-08-29 18:46:31 +02:00
twinaphex
4e040986ec Removed MSVC check 2017-08-29 18:45:15 +02:00
twinaphex
418e341b32 Patches to make it possible to compile with mingw, pt. 1 2017-08-29 18:27:46 +02:00
Henrik Rydgård
8d0498303a Fix a PIC compliance bug in the VFPU. Comment other cases properly (for easy searching). 2017-08-29 11:45:12 +02:00
Henrik Rydgård
871fa713ed Fix bug in vulkan init. Add some sanity checks to GL shader cache loading. 2017-08-28 15:22:18 +02:00
Henrik Rydgård
6a0f65764d Minor cleanups 2017-08-28 15:04:28 +02:00
Henrik Rydgård
21d85617c1 Buildfix 2017-08-28 14:37:15 +02:00
Henrik Rydgård
55e9807a53 Separate VulkanContext::CreateDevice into ChooseDevice and CreateDevice to give an opportunity to enable extensions. 2017-08-28 14:12:56 +02:00
Henrik Rydgård
8c1bfb876f Assorted cleanup of Vulkan init code. Show Vulkan extensions in system info. 2017-08-28 13:47:31 +02:00
Henrik Rydgård
e1f991a096 Linux buildfix 2017-08-20 21:51:48 +02:00
Henrik Rydgård
9c3549f0be ... And also for the vertex decoder (DenseHashMap) 2017-08-20 19:18:50 +02:00
Henrik Rydgård
10cebb4195 32-bit buildfix 2017-08-20 15:33:53 +02:00
Henrik Rydgård
6ffb3d6b53 Buildfix 2017-08-20 14:58:10 +02:00
Henrik Rydgård
237cca683b Maintain the hashmap from time to time. Fix a bug in count reset on grow. 2017-08-20 13:34:11 +02:00
Henrik Rydgård
e0e13e191f Replace the most critical unordered_maps and maps with two new maps: FastHashMap and PrehashMap. 2017-08-20 11:30:19 +02:00
Henrik Rydgård
750c124c33 Vulkan: Fix some inefficient command pool usage, might also fix a race condition 2017-08-18 17:09:48 +02:00
Henrik Rydgård
560eaa5390 Vulkan: Add code (disabled) to be able to run with more in-flight frames. Only improves performance marginally and needs more testing. 2017-08-17 17:57:37 +02:00
Henrik Rydgård
d60bb27cd9 Merge pull request #9906 from hrydgard/fastrunloop-optimize
GPU FastRunLoop optimizations
2017-08-17 16:25:15 +02:00
Henrik Rydgård
2c4e5e2303 Fastpath in fastrunloop when diff=0. Remove need for Execute for UV scale/offset. 2017-08-17 15:20:16 +02:00
Henrik Rydgård
5e788ffadf Implement vertex caching for Vulkan. 2017-08-17 11:22:45 +02:00
Henrik Rydgård
bc76c8d541 Cleaner Vulkan shutdown 2017-08-15 17:30:37 +02:00
Jan Beich
e33acdc5e9 Common: fix MAP_32BIT after 9f24203ef8
9f24203ef8 added 0x20000000 as a default fallback address hint which
unconditionally disabled MAP_32BIT. FreeBSD cannot use the hints
because without adjusting RLIMIT_DATA lower addresses are reserved for
brk(2) style heap. So, don't try to use hints with MAP_32BIT.
2017-07-26 15:25:54 +00:00
Henrik Rydgård
033676ca4d Vulkan debug mode: In case of missing validation layers, warn, don't error out. 2017-07-13 23:36:53 +02:00
Henrik Rydgård
f7fea57bb6 More RIP addressing in software skinning.. 2017-07-07 15:12:57 +02:00
Henrik Rydgård
837118d230 More RIP elimination 2017-07-07 15:07:56 +02:00
Henrik Rydgård
567937fa4d x64: Enable non-RIP addressing for FPU registers 2017-07-07 11:33:07 +02:00
Henrik Rydgård
381c4ca4b2 X64: Fix bug in a case in the MOVQ emitter : rex byte should be after the 0x66 prefix 2017-07-07 11:33:07 +02:00
Henrik Rydgård
0645677fea Access FPU temps through CTXREG 2017-07-07 11:33:06 +02:00
Henrik Rydgård
7c3b37c561 More RIP elimination 2017-07-07 11:33:05 +02:00
Henrik Rydgård
d82f90f1b2 More RIP removal 2017-07-07 11:33:05 +02:00
Henrik Rydgård
80b82ecd81 Buildfix attempt 2017-07-07 11:33:02 +02:00
Henrik Rydgård
e6e96c0d89 Fix build with NDK 15. This does force us to make do with 32-bit file sizes... 2017-07-03 16:25:12 +02:00
Henrik Rydgård
7da5dfcdd7 Don't use stat64 unless we need to 2017-07-03 16:14:41 +02:00
Unknown W. Brackets
9dced68812 Core: Buildfix. 2017-06-24 14:19:25 -07:00
Simonas Kazlauskas
55c193ce78 Remove use of C file api in LocalFileLoader
Instead use native system calls.
2017-06-24 21:07:37 +03:00
Simonas Kazlauskas
3f63c29736 Also support atomic windows readAt 2017-06-23 18:40:00 +03:00
Unknown W. Brackets
531c6682b7 Vulkan: Increment engine version.
Since we are kinda majorly different now.
2017-05-31 20:04:11 -07:00
Henrik Rydgård
33d4f8c7ad Vulkan: Fix minor bug when clearing the back buffer (loaded stencil for no reason) 2017-05-31 13:37:47 +02:00
Unknown W. Brackets
cb3db559bd SoftGPU: Jit the linear sampling too.
For now, just reducing overhead.  Could be smarter.
2017-05-30 22:57:46 -07:00
Henrik Rydgård
901b62ae54 Merge pull request #9730 from LunaMoo/HomebrewIdent
Fix a bunch of emu features for Homebrew by better identification.
2017-05-30 14:57:31 +02:00
Henrik Rydgård
996d0e9508 Oops. 2017-05-30 14:54:12 +02:00
LunaMoo
5e0f8141d2 Corrections, some %i->%d around other code as well. 2017-05-30 13:52:29 +02:00
Henrik Rydgård
fede9a05fb Only show the Vulkan setting if Vulkan might be available. 2017-05-30 10:38:17 +02:00
Henrik Rydgård
38b50501c2 Clearing fix, drawpixels fix/hack 2017-05-30 09:36:17 +02:00
Henrik Rydgård
c173da49d3 Fix a number of bugs and stuff affecting Vulkan on Mali 2017-05-30 09:36:17 +02:00
Henrik Rydgard
0c70735bc4 Buffered rendering is starting to work, though still kinda broken. 2017-05-30 09:36:17 +02:00
Henrik Rydgård
a7dd6d6085 Further steps towards Vulkan framebuffer support 2017-05-30 09:36:17 +02:00
Henrik Rydgard
4407445d50 Separate BeginFrame from BeginSurfaceRenderPass 2017-05-30 09:22:40 +02:00
Unknown W. Brackets
c5d1c1cd1c Android: Fix minor typo. 2017-05-27 22:33:47 -07:00
Unknown W. Brackets
9b7f43db04 Add additional button defines.
Not yet functional (overlap with virtkeys.)
2017-05-27 10:25:04 -07:00
Henrik Rydgård
21fe73c8e7 Switch strncpy to truncate_cpy in a bunch of places. 2017-05-26 19:04:08 +02:00
Henrik Rydgård
0ec1e5e3b2 Don't erase and rewrite the dispatcher when the cache is cleared. Fixes #9708 2017-05-26 15:48:03 +02:00
Henrik Rydgård
d9695da3a5 Make extra sure that asserts arrive in the Android log. 2017-05-26 11:59:15 +02:00
Henrik Rydgård
6d58a8d8f6 Move up Software Rendering to Rendering where it belongs. Makes it easier to turn it off if enabled by accident. Also warn if used and it runs slow. 2017-05-18 14:56:10 +02:00
Henrik Rydgard
d4e1fc8d93 More vulkan shutdown fixes 2017-05-07 11:08:09 +02:00
Henrik Rydgard
5974e0ee6d Work towards a clean vulkan shutdown. 2017-05-07 10:40:11 +02:00
Unknown W. Brackets
90f3ae14e0 Windows: Simplify host shutdown.
The whole nativeHost/oldHost thing is unnecessary.

This also fixes gl lost holder mismatches.
2017-04-29 12:04:54 -07:00
LunaMoo
a9d9063680 Handle more mouse buttons(middle, 4, 5) 2017-04-27 13:54:38 +02:00
Unknown W. Brackets
bf02f7d98b Vulkan: Detect swapchain init failure.
This seems to be a driver bug, and occurs on NVIDIA when OpenGL has
previously been inited.  Or we're not cleaning something up properly...
but there's a driver error logged to debug output.
2017-04-15 16:26:26 -07:00
LunaMoo
4a2677e0c6 Revert unintentional change from: 429bf5d8b3 2017-03-23 11:54:54 +01:00
Henrik Rydgård
4bad28046b UWP: Save memory by only committing the ranges we need, instead of doing a giant allocation. 2017-03-23 10:02:29 +01:00
Henrik Rydgård
29ad3180a0 Add hack to make the JIT stable(r) on UWP ARM. Can't make it right without FlushInstructionCache which is not available. Sigh... 2017-03-23 10:02:29 +01:00
Henrik Rydgård
5880f37598 Simplify log initialization a little. Minor logging improvments in native. Don't disable logging in UWPMain 2017-03-23 10:02:29 +01:00
Henrik Rydgard
792dd1557c Improve StorageFileLoader enough to actually kind of work 2017-03-23 10:02:28 +01:00
Henrik Rydgard
ff2b6b3fca Assorted cleanup, UWP memory map fixes. PSPFlower runs in both 32-bit and 64-bit. 2017-03-23 10:02:28 +01:00
Henrik Rydgard
4ced81b1df UWP: Hook up basic touch/mouse input. Start work on loading from a StorageFile. Getting closer to starting to boot a game 2017-03-23 10:02:28 +01:00
Henrik Rydgård
fdfc572b69 Misc logging improvments, minor safety check 2017-03-20 13:07:22 +01:00
Unknown W. Brackets
a1f59deafe Fix some type narrowing warnings and typos. 2017-03-19 07:44:31 -07:00
Henrik Rydgard
961157551a Another buildfix 2017-03-18 11:38:25 +01:00
Henrik Rydgard
7c0761ef15 Buildfix 2017-03-18 11:11:27 +01:00
Henrik Rydgard
4f707a1022 Simplify logging code some more. Cleaner log output on Android. 2017-03-18 10:47:36 +01:00
Henrik Rydgard
a5d77f940a More cleanup 2017-03-17 18:00:24 +01:00
Henrik Rydgard
1ccca2ef33 We don't really support different listeners per log type, so let's get rid of that fiction. 2017-03-17 17:57:32 +01:00
Henrik Rydgård
f8343e9efc Add Gradle build. This time, we don't remove the old build system and we don't switch Travis. 2017-03-15 19:42:17 +01:00
Henrik Rydgård
a4699a37df Update armips with regex workaround 2017-03-15 15:47:30 +01:00
Henrik Rydgård
7e007c3973 Merge pull request #9426 from unknownbrackets/input-state
Remove various legacy parts of the InputState
2017-03-14 09:34:57 +01:00
Unknown W. Brackets
f3c518ac7f Remove unused AxisPos. 2017-03-13 23:08:09 -07:00
LunaMoo
429bf5d8b3 Use $(DefaultPlatformToolset)_xp for easier VS builds with different toolsets. 2017-03-13 21:40:08 +01:00
Henrik Rydgård
eb73a28140 Add new log category FRAMEBUF 2017-03-13 13:55:29 +01:00
Henrik Rydgård
6062262431 Add a comment explaining why a strncpy can't be replaced by truncate_cpy, because it would break savestates. 2017-03-13 13:55:29 +01:00
Henrik Rydgard
b0bd7e3c6f Minor changes for compatibility with VS2017 2017-03-12 17:33:00 +01:00
Henrik Rydgård
e74749f2b2 A function renamed, some logging improvements 2017-03-10 00:11:00 +01:00
Henrik Rydgard
afc27c30eb Quick buildfix (should probably just enable exceptions on Android) 2017-03-07 20:10:18 +01:00
Henrik Rydgård
ed16096365 Don't crash if not enough memory to save a state. Very annoying.
Minor tweaks.
2017-03-07 15:32:34 +01:00
Henrik Rydgård
a895936913 More log cleanup. Fix resize issue: Fixes #9392 2017-03-06 13:50:22 +01:00
Henrik Rydgård
440e72d250 Clean up among the logs. Remove MASTER_LOG. 2017-03-06 13:10:23 +01:00
Henrik Rydgård
cfe2621604 LogManager: Hook up save/load, remove "long names" 2017-03-06 11:44:35 +01:00
Henrik Rydgard
de3e906795 Linux buildfix 2017-03-05 11:25:07 +01:00
Henrik Rydgard
7b3f84aae8 More buildfixes for Windows on ARM 2017-03-05 10:52:08 +01:00
Henrik Rydgard
f2ccd1d648 Assorted Windows-on-ARM fixes 2017-03-05 10:47:41 +01:00
Henrik Rydgard
26a2d42731 Big mutex overhaul - remove our custom ones, make them non-recursive where possible 2017-02-28 11:40:29 +01:00
Henrik Rydgård
54f862cda6 UWP: Fix Timer 2017-02-28 11:40:18 +01:00
Henrik Rydgård
0e83a4c418 Fix savestates. Still don't understand quite how this broke though, it should work. Fixes #9365 2017-02-28 00:09:33 +01:00
Henrik Rydgard
03dab0fdbd More UWP prep 2017-02-25 09:57:22 +01:00
Henrik Rydgard
fa80cfa4aa Additional UWP preparations 2017-02-25 09:57:14 +01:00
Henrik Rydgard
fcbc20f240 Small changes to make Common and Core build under my preliminary UWP setup. 2017-02-24 18:59:41 +01:00