Commit Graph

220 Commits

Author SHA1 Message Date
Henrik Rydgård
e48cb916dd Buildfix 2020-07-18 20:43:47 +02:00
Henrik Rydgård
697c3b8b36 Cleanup log output on swapchain/surface recreation. 2020-07-18 20:35:39 +02:00
Henrik Rydgård
cd1d73436d Vulkan: Recreate the swapchain if we get too many "out of date" frames.
Should help an issue on my Linux laptop with Intel GPU.
2020-06-22 00:45:05 +02:00
Henrik Rydgård
fbc4fa5bca Move the responsibility to register the debugutils callback to the VulkanContext. We only use one anyway. 2020-06-21 23:04:51 +02:00
Henrik Rydgård
6532c345c8 Simplify the validation interface code, bugfixes 2020-06-21 23:04:51 +02:00
Henrik Rydgård
1793b65ec1 Vulkan: Remove support for the old VK_EXT_debug_report extension 2020-06-21 23:04:51 +02:00
Unknown W. Brackets
dddaa57392 Windows: Fix GL reinit on backend switch. 2020-05-09 12:20:42 -07:00
Unknown W. Brackets
051a84e9bd GPU: Restart when changing inflight frames setting.
We need to keep the push and pull in step, so changing at runtime is
messy.
2020-03-02 19:21:15 -08:00
Unknown W. Brackets
bc90faebf7 D3D9: Allow vsync change at runtime. 2020-02-29 22:48:58 -08:00
Unknown W. Brackets
6f86b6fdbe D3D11: Respect vsync setting.
Fixes #12493.
2020-02-29 22:48:58 -08:00
Unknown W. Brackets
2a3fd05651 Vulkan: Present using FIFO for vsync.
This allows the setting to be changed at runtime in Vulkan too.

Should help #10105.
2020-02-29 22:48:59 -08:00
Unknown W. Brackets
5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård
4f7c23fe79 DarkStalkers: Fix display on OpenGL ES. 2019-10-27 20:54:36 +01:00
Henrik Rydgård
7610220b30 Vulkan: Prepare for adding a second init path for VulkanContext.
Will eventually be used for libretro.
2019-09-01 22:21:19 +02:00
Henrik Rydgård
aff429ee09 For the non-vulkan backends, zero display rotation settings just to be sure. 2019-06-24 10:30:32 +02:00
Henrik Rydgård
33c53eebe9 D3D11 init: Release pFactory at the appropriate place. 2019-05-16 00:37:06 +02:00
Henrik Rydgård
6117e37a14 D3D11: Also properly check for the no-adapters case. 2019-05-15 22:58:45 +02:00
Henrik Rydgård
0320b4961b Add a missing error check to the D3D11 device creation. May help #12039? 2019-05-15 22:55:24 +02:00
driver1998
21d2008676 Use D3DCompiler_47.dll for D3D9 context. 2019-05-12 11:17:10 +08:00
driver1998
7b7dede420 Fix D3D11 context on Windows ARM Debug
debug layers are not available on ARM32/ARM64 (D3D*SDKLayers.dll not available), so disable it.
2019-05-05 01:19:16 +08:00
Henrik Rydgård
8adb0dfd61 Vulkan validation: INFO level has gotten too spammy, turn it off. 2019-03-24 11:56:51 +01:00
Unknown W. Brackets
f2206158b2 UI: Update more browser links to https://. 2019-03-03 21:39:21 -08:00
Henrik Rydgård
0cd3ac06d0 Avoid trying to create a FileLoader for empty filenames
Assorted cleanup
2019-02-25 21:35:51 +01:00
Henrik Rydgård
d91f706206 Log why the config is being saved (we seem to do it a bit much at times) 2019-02-23 11:55:44 +01:00
Henrik Rydgard
478b0b4278 Further improve VK extension loading. Switch to VK_EXT_debug_utils (but fallback to VK_EXT_debug_report if only that is available). 2019-02-05 21:31:38 +01:00
Henrik Rydgard
8e1a5ef3d6 Minor refactor of physical device property/feature detection, to allow for more extension use. 2019-02-05 18:07:17 +01:00
Henrik Rydgard
f339a0c15b VK: Minor cleanup, turn off unfinished and probably wrong use of dedicated allocation feature 2019-01-31 14:09:21 +01:00
Unknown W. Brackets
adeca2c3ba GLES: Move some vendor bug checks to Draw. 2018-12-23 20:27:22 -08:00
Henrik Rydgård
429a1fce01 Assert even in release mode if preset shaders fail to compile. This is just to help track down a Play crash. 2018-11-21 18:14:26 +01:00
Unknown W. Brackets
dc54ed6855 GLES: Add disabled code to run GLES on desktop.
Helps when testing certain extensions, etc.
2018-10-28 14:29:44 -07:00
Unknown W. Brackets
7ee4d2d5a1 UI: Ask for restart when changing graphics device.
Only for D3D11 and Vulkan.

Also, makes Vulkan follow D3D11 in not changing the setting if the device
is not found on startup.
2018-09-30 00:53:21 -07:00
Unknown W. Brackets
f906fbed35 Core: Track graphics startup failures and cycle.
If the graphics driver segfaults, or some plugin segfaults, let's try a
different one next time.  This gives better hope of starting up next time.
2018-09-01 19:59:13 -07:00
Unknown W. Brackets
b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Henrik Rydgård
238521a297 Rename device choice config options as requested. 2018-06-06 10:24:16 +02:00
Henrik Rydgård
8ee3cd52e8 D3D11: Allow the user to select rendering device. 2018-06-06 10:20:12 +02:00
Henrik Rydgård
b037efdb55 If there are multiple Vulkan devices, show a setting to allow the user to choose. 2018-06-06 10:20:12 +02:00
Henrik Rydgård
3f7602227c Windows: If neither OpenGL nor D3D9 is available, offer an escape route into D3D11.
This does happen on some fresh Win10 installations.

We really should do something much nicer and more automatic, but that's for later.
2018-05-03 22:19:07 +02:00
Henrik Rydgård
513ea72d5d OpenGL debug log: Filter out some buffer mapping info from the NV driver 2018-04-05 12:29:09 +02:00
Henrik Rydgård
01d81ffa72 OpenGL: Fix texture wrapping of render targets. 2018-03-28 11:23:41 +02:00
aliaspider
54d9406713 fix mingw and msvc cmake builds. 2018-03-23 03:18:13 +01:00
Henrik Rydgård
2a438d6e03 Fix VSync on Windows. Should fix #10711 2018-03-12 20:07:31 +01:00
Henrik Rydgård
5f8118b82b Separate T3DCreate* into its own header to avoid including Windows.h etc in some cases. 2018-02-25 10:27:59 +01:00
Unknown W. Brackets
2bec3bf3ac Windows: Trigger StopThread() on shutdown.
Otherwise, we end up hanging in the loop waiting for emuThreadState to
become STOPPED.  It actually has, but ThreadFrame() will block until a new
frame is queued... while will never happen, because the emuthread has
stopped.
2018-02-10 16:55:44 -08:00
Henrik Rydgård
8ee426ff74 Get rid of an unused codepath (gl rendering is now always threaded) 2018-02-08 00:23:48 +01:00
Henrik Rydgård
ae19c48138 Cleanup the Windows thread stuff to work like the other platforms. Not quite perfect yet. 2018-02-07 16:00:29 +01:00
Unknown W. Brackets
bdf7fdc7a3 GLES: Actually stop the thread on shutdown.
Fixes shutdown.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
fdca06d208 More work on shutdown, still hanging though. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
e5d571c25a gl-render-manager: Now threaded mode seems to work fine (and fast!). Shutdown doesn't, though, and there are stability issues. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
af6431986d OpenGL: Now run GL on a secondary thread. Sync issues remain. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
422b05e51f Truncate the '\n' from GL debug strings before logging them. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
542f9f9ef1 Assorted cleanup 2018-01-27 15:10:17 +01:00
Henrik Rydgård
42f2312030 Remove the old CPU threading remains, start redesigning interfaces. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
bd6818198a More GLRenderManager 2018-01-27 15:10:17 +01:00
Unknown W. Brackets
766b40aad8 GPU: Reset GPUBackend on graphics init.
This way, when using a port that doesn't support Vulkan, it doesn't just
silently use upside down GL, etc.
2017-12-26 16:02:55 -08:00
Unknown W. Brackets
d6da758ed3 GPU: Remove duplicate BACKEND constants. 2017-12-26 15:55:24 -08:00
Henrik Rydgård
2250ef799c Avoid including platform-specific headers in VulkanContext.h 2017-12-18 12:54:25 +01:00
Henrik Rydgård
6f0b382d9e Move vulkan debug callback out from WindowsVulkanContext into a file that can be shared with other platforms later. 2017-12-13 19:29:42 +01:00
Henrik Rydgård
99b34c7b45 Use glslang to translate GLSL 1.x postshaders to GLSL 3.0 or later to appease strict GL Core drivers. Should fix #10362
Fixed small bugs, now tested and working on mac.

Add spirv-cross to cmake build
2017-12-08 10:25:42 +01:00
Unknown W. Brackets
c30e4a9382 Windows: Request a core profile by default.
Also, update to OpenGL 4.6.
2017-12-03 07:00:56 -08:00
Henrik Rydgård
b6911d2764 Add a hidden debug option [Graphics]GfxDebugSplitSubmit to try to narrow down some Vulkan issues, see #10163. Also improve some asserts. 2017-11-22 10:47:04 +01:00
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
506c4eef17 Win32: Improvements to vulkan init error handling 2017-11-16 21:55:06 +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
05930ea32e MotoGP: Compat hack to disable framebuffer readbacks.
This is the only known game to copy its framebufer to RAM before display on every frame and we already have a
hack so we can display the high resolution framebuffer, but we still did the readback for no good reason.

This eliminates the readback.
2017-11-10 16:32:56 +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
Unknown W. Brackets
ebe9dcafde Vulkan: Wait for queue idle in DestroyBackbuffers.
Otherwise it's only done after destroying Draw, so no need to mutex.
2017-11-05 08:44:14 -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
bbfc32f131 Remove disabling of validation warning. It works. 2017-10-31 12:57:27 +01:00
Henrik Rydgård
07dfda0633 Vulkan depal code now passes validation, but produces black. 2017-10-31 12:35:00 +01:00
Henrik Rydgård
d016bfe221 Fix some resource leaks and excessive logging in VulkanRenderManager 2017-10-26 10:57:00 +02:00
Henrik Rydgård
3e2b810c39 Improve synchronization, though there are very weird issues. Possibly need to run the swap chain from the thread that created it? 2017-10-26 10:57:00 +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
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
b9ba525de1 Don't call functions in asserts, they get compiled out in release... 2017-10-20 14:45:00 +02:00
Henrik Rydgård
017d3da067 Allow D3D9 context creation to bail if shader compilation fails (D3D9 runtime not installed).
Fixes an issue where after switching to D3D9 on a PC without the D3D9 runtime, it's impossible to start PPSSPP anymore.
2017-10-20 11:53:07 +02:00
Henrik Rydgård
62972cb891 D3D11: Move to CopyFramebufferToSync where easily possible. 2017-10-11 13:34:31 +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 Rydgard
0c70735bc4 Buffered rendering is starting to work, though still kinda broken. 2017-05-30 09:36:17 +02:00
Henrik Rydgard
273c266b78 Silence a perf warning 2017-05-30 09:36:17 +02:00
Henrik Rydgard
fd4ef48971 Windows debug builds: Only break on Vulkan validation warnings if a debugger is attached. 2017-05-07 18:09:09 +02:00
Henrik Rydgard
42a694368e Vulkan: Remove obsolete warning suppressions. Increase descriptor pool sizes. 2017-05-07 11:14:25 +02:00
Henrik Rydgard
ff6fcc9179 More vulkan fixes 2017-05-07 10:53:04 +02:00
Unknown W. Brackets
0b16899f67 Windows: Init with OpenGL 4.5 if possible.
Also, try more versions if older.
2017-04-29 17:38:18 -07:00
Unknown W. Brackets
ccd9a17235 D3D11: Free swapchain on graphics reset. 2017-04-27 20:04:30 -07: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
Henrik Rydgard
db89bced86 Remove unused code 2017-04-06 09:57:55 +02:00
Henrik Rydgård
c0f6a24a21 Fix issue where we were a little too aggressive when eliminating calls to SetRenderTarget 2017-03-23 10:02:28 +01:00
Unknown W. Brackets
4514af9d6e Windows: Improve core context init.
This clears the error from glewInit(), and ensures we check GL extensions
only after selecting the desired GL profile.

Also, consistently use the core profile flag to select the context.
2017-03-18 13:47:15 -07:00
Henrik Rydgård
f4a0c4504f Fixes to GPU system information. Fixes #9434 2017-03-16 09:48:10 +01:00
Henrik Rydgard
5d5844632a Fix shader issues with D3D11 feature level 9 2017-03-05 22:56:33 +01:00
Henrik Rydgard
042d09a049 Fix #9390, also unbreak D3D11 screenshots 2017-03-05 20:30:39 +01:00
Henrik Rydgard
85717a981c Show feature levels in System Info, allow lower D3D11 feature levels 2017-03-05 11:05:36 +01:00
Henrik Rydgard
7b3f84aae8 More buildfixes for Windows on ARM 2017-03-05 10:52:08 +01:00
Henrik Rydgard
5de190a45f D3D11: Move the responsibility for the swapchain out of the DrawContext so it can be used with differently-managed D3D like with UWP.
Minor cleanups.
2017-02-27 10:10:24 +01:00
Henrik Rydgard
fa80cfa4aa Additional UWP preparations 2017-02-25 09:57:14 +01:00
Henrik Rydgard
acde17e3ce Improvements to D3D11 detection and error handling. 2017-02-23 10:40:55 +01:00
Henrik Rydgard
5a0ee6cc36 Add some plumbing to be able to reach DX11.1 features. 2017-02-18 01:54:28 +01:00
Henrik Rydgard
522ac5c739 Add an escape route to D3D9 in case D3D11 fails to initialize. Cleanups. 2017-02-17 19:53:24 +01:00