Commit Graph

8198 Commits

Author SHA1 Message Date
twinaphex
2c959d8ff1 (Display server) Add get_output 2018-09-17 03:40:17 +02:00
twinaphex
b5c6586b12 Change CRT switch resolution - add options 'Off/15 Khz/31Khz' 2018-09-17 01:30:49 +02:00
radius
16bd85b118 [recording] refactor recording_is_enabled no need to use a pointer for all of this 2018-09-15 21:09:41 -05:00
twinaphex
f21493947d vim - add RetroArch style conventions 2018-09-15 17:43:34 +02:00
twinaphex
2fc08ce394 (switch_nx_gx.c) Some style nits 2018-09-15 17:39:03 +02:00
misson20000
abd86058c6 fix attribution (it's a common mistake) 2018-09-15 03:28:08 -07:00
misson20000
fa76a3cb60 CRLF -> LF 2018-09-15 03:27:05 -07:00
twinaphex
ec5d046f4c Cleanups - get rid of strcmp references 2018-09-15 07:44:21 +02:00
M4xw
64edf5f879 [LIBNX] Fixups and bare minimum to function 2018-09-14 20:38:42 +02:00
twinaphex
7428fef4bc Cleanups 2018-09-12 21:50:11 +02:00
twinaphex
0158bbe4aa Add switch_nx_gfx.c 2018-09-12 21:44:53 +02:00
twinaphex
bf75e6b9d7 video_context_driver_swap_interval - add in safeguard 2018-09-12 07:16:33 +02:00
twinaphex
650c173125 Turn public functions into static functions 2018-09-12 06:39:07 +02:00
twinaphex
3c160a6eb4 Create video_driver_get_all_flags 2018-09-12 06:31:41 +02:00
twinaphex
3f8e3547f4 (GLX) swap_control_tear should now be implemented and working 2018-09-12 04:17:41 +02:00
twinaphex
914df58d2e (WGL) Adaptive Vsync should work now for WGL 2018-09-12 03:59:25 +02:00
twinaphex
98b20d4e5d (GLX/WGL) Start implementing adaptive VSync (swap_control_tear) for GLX/WGL pt. 1 2018-09-12 02:42:24 +02:00
twinaphex
4738ef545c Change interval type to signed int 2018-09-12 00:08:13 +02:00
Twinaphex
90580d2ae1
Merge pull request #7204 from alphanu1/master
Multiple fixes
2018-09-10 21:02:14 +02:00
alphanu1
f576266ace
Update dispserv_x11.c 2018-09-10 19:36:57 +01:00
Themaister
a1989afba9 Vulkan: Fix race condition in threaded mailbox emulation. 2018-09-10 19:35:13 +02:00
alphanu1
4328c075e8
fixes 2018-09-10 18:25:32 +01:00
alphanu1
6c2d11b414
re introduced snprintf 2018-09-10 18:12:44 +01:00
alphanu1
7c05922d36
xrandr spamming fix
also re introduced snprintf
2018-09-10 18:09:42 +01:00
alphanu1
340515a9fa
Update dispserv_x11.c 2018-09-10 18:08:49 +01:00
alphanu1
d8c36e5bb8
xrandr spamming fix 2018-09-10 17:42:33 +01:00
alphanu1
30d7ef898d
Xrandr sapmming fix 2018-09-10 17:39:52 +01:00
alphanu1
adb0542748
Merge pull request #84 from libretro/master
update
2018-09-10 17:35:58 +01:00
alphanu1
1b4439413c
Update dispserv_x11.c 2018-09-09 12:50:28 +01:00
alphanu1
cf4fff8d31
snprintf broke switching 2018-09-09 11:51:37 +01:00
twinaphex
bfdb75a30e Add ifdef 2018-09-09 01:28:09 +02:00
alphanu1
5c6fc6db7e
New Porch Calc, Matched against an oscilloscope 2018-09-08 22:11:31 +01:00
alphanu1
952b46f2c1
Fix for crt interlaced bug 2018-09-08 22:09:30 +01:00
Themaister
d338dac277 Only do mailbox emulation for fullscreen.
Too large impact on performance in Windowed mode.
2018-09-08 16:27:25 +02:00
Themaister
d39f66a738 Emulate mailbox by wrapping acquire in a thread.
Needed on nVidia Windows since they don't support timeout == 0 ...
2018-09-08 15:56:49 +02:00
Themaister
157d1e7e63 Only use mailbox emulation on AMD. 2018-09-08 11:47:58 +02:00
Themaister
66c4f8fd35 Make sure to always clear out swapchain_fence_signalled. 2018-09-08 11:47:58 +02:00
Themaister
9ebac87638 Vulkan: Emulate mailbox on Windows. 2018-09-08 11:47:58 +02:00
Themaister
af534f0fa8 Vulkan maintenance fixes.
- Use VkBuffer instead of linear VkImage for staging uploads.
  Not guaranteed to be supported, and desktop IHVs recommend using
  buffers.

- Fix validation error where swapchain recreation with reuse of the old
  VkSwapchainKHR does not create a fence properly, leading to validation
  error next time that swapchain index is observed.
2018-09-08 11:47:58 +02:00
Stuart Carnie
99f497de85 feat(Metal): Add support for screen shots 2018-09-02 17:55:02 -07:00
Stuart Carnie
9d22aacaa7 refactor: Add vertex buffer struct to ShaderTypes and remove global 2018-09-02 17:53:18 -07:00
Stuart Carnie
8a63ace201 Revert "fix(gfx): Move enum to end to avoid breaking existing configurations"
This reverts commit 93b79fa
2018-09-02 13:03:16 -07:00
Twinaphex
6463f7005b
Merge pull request #7174 from stuartcarnie/sgc-metal
Fix crashes for metal; buffer overflow in xmb; Metal fullscreen issue
2018-09-02 21:55:10 +02:00
Stuart Carnie
eadc3f4a91 fix(Metal): Fix SIGFAULT if any attribute is 0 2018-09-01 16:13:23 -07:00
Themaister
1d7dfc5f47 Fix glslang_format LUT.
Was logging wrong format names.
2018-09-01 22:46:47 +02:00
Stuart Carnie
802697fdec fix(Metal): Use textures for pixel conversion 2018-09-01 11:58:37 -07:00
Stuart Carnie
577d81071e fix(Metal): Cleanup shader logging messages 2018-09-01 11:58:37 -07:00
Stuart Carnie
93b79fac90 fix(gfx): Move enum to end to avoid breaking existing configurations
* `aspect_ratio_index` relies on the ordinal values not changing
2018-09-01 11:58:37 -07:00
twinaphex
d5fa379aa8 Update header 2018-09-01 03:54:47 +02:00
twinaphex
85f093e042 Change these to numbers 2018-08-31 21:25:33 +02:00
twinaphex
a58511ec00 Revert "Compatibility fixes for OSX PPC"
This reverts commit d7899c51aa.
2018-08-31 19:20:10 +02:00
twinaphex
1265d7546c Revert "Start using raw constants for OSX version detection"
This reverts commit ab34a70873.
2018-08-31 19:19:42 +02:00
twinaphex
ab34a70873 Start using raw constants for OSX version detection 2018-08-30 16:35:44 +02:00
neville
d7899c51aa Compatibility fixes for OSX PPC 2018-08-30 16:18:51 +02:00
Twinaphex
ea87bb5a1d
Merge pull request #7122 from orbea/vulkan
Fix segfaults when starting vulkan without a working vulkan driver.
2018-08-27 18:59:00 +02:00
twinaphex
8a5d092e5b (dispserv_x11.c) Make variable bigger to avoid all the warnings and use snprintf 2018-08-27 16:09:12 +02:00
orbea
260ce526c2 Fix segfaults when starting vulkan without a working vulkan driver.
RetroArch will crash in several places when running vulkan in an
environment that does not have working vulkan drivers.

This should guard against those crashes and allow RetroArch to fail
safely in those cases.
2018-08-24 19:36:03 -07:00
orbea
d8ea30881d Default to gl instead of vulkan.
If the video_driver is set incorrectly it will default to vulkan
instead of gl. However its possible to have RetroArch built with
vulkan even with no working vulkan drivers and this will cause a
segfault.

Defaulting to gl again should be a safer default which should crash
for fewer users.

Fixes https://github.com/libretro/RetroArch/issues/5568.
2018-08-24 13:55:09 -07:00
Brad Parker
4d09ddde1c Qt: limit shader preset/pass selection to the appropriate extensions 2018-08-20 20:26:50 -04:00
Brad Parker
e4834250b9 Qt: set shader dialog title to current preset/shader name 2018-08-18 12:39:17 -04:00
twinaphex
90efa02718 Fix more scan-build issues 2018-08-18 16:16:17 +02:00
twinaphex
646e64c28c Fix some clang scan-build warnings/errors 2018-08-18 15:56:44 +02:00
Brad Parker
16459bfa91 Qt: add filter/scale to shader window 2018-08-18 00:33:59 -04:00
twinaphex
ae0d9fd60d (Wayland) Buildfixes 2018-08-17 17:42:14 +02:00
twinaphex
7250181319 Add some __WINRT__ ifdefs 2018-08-17 14:51:27 +02:00
Brad Parker
e2ff7478ca don't return uninitialized data 2018-08-17 07:49:25 -04:00
twinaphex
4a54826d9b Remove unused variable 2018-08-16 21:14:56 +02:00
twinaphex
a1d5b0fd03 Update MSVC 2012 solution 2018-08-16 20:49:31 +02:00
Brad Parker
12539f310d use strl functions 2018-08-16 13:51:44 -04:00
twinaphex
75a388cd67 Use strlcpy instead of strncpy in slang_process.cpp 2018-08-16 10:14:42 +02:00
twinaphex
6266065384 Fix more code when compiling without menu support 2018-08-16 09:59:51 +02:00
twinaphex
921e52e64f Remove old leftover buggy Win32 driver 2018-08-16 00:05:09 +02:00
Twinaphex
eee287074c
Merge pull request #7077 from bparker06/wimp_shader_param
Qt: Initial shader parameters window
2018-08-15 21:36:34 +02:00
Twinaphex
4d96fddf5e
Merge pull request #7061 from wiktorek140/sailfishos-touch
Sailfish OS  device build configuration connected with touch screen support required for device with this OS
2018-08-15 13:30:04 +02:00
Brad Parker
341cf63399 Qt: show shader pass in parameters window, reload shader params when shader is reloaded 2018-08-14 21:38:52 -04:00
Brad Parker
560149857b shaders: track the pass for each parameter 2018-08-14 18:46:32 -04:00
Brad Parker
4a86d29810 shaders: fix memory leak 2018-08-14 18:44:19 -04:00
Brad Parker
6de4384350 glsl: don't clear the shader source 2018-08-14 18:42:23 -04:00
twinaphex
a6941fb4ed Initial work done on VS2017 solution for Android 2018-08-14 16:02:31 +02:00
twinaphex
6a64e27e3d (D3D8) Add HAVE_MENU ifdefs 2018-08-14 11:41:43 +02:00
twinaphex
db9f4697f6 Add HAVE_MENU ifdefs 2018-08-14 11:40:42 +02:00
Wiktor Strzębała
45799ee034 Bring up touch support for wayland subsystem for sailfish os devices
Touch code cleanup
Make variabled static as suggest bparker06
C89 compilation error fix (at least for loops)
More C89 fixes

Signed-off-by: Wiktor Strzębała <wiktorek140@tlen.pl>
2018-08-09 20:49:27 +02:00
Tatsuya79
e48b9011bf Don't adjust audio for VRR. Silence log message about it. 2018-08-09 12:29:40 +02:00
twinaphex
aec7ed40da This crashed Wayland 2018-08-01 01:15:58 +02:00
Sven
c750235414
Merge branch 'master' into cheater 2018-07-26 19:40:20 -04:00
Sven
5f35249216 Implement robust cheat searching interface with rumble features 2018-07-25 19:19:14 -04:00
twinaphex
9c0ed0f2c4 Don't use core profile GLSL shaders for OpenGLES 2018-07-18 10:06:30 +02:00
twinaphex
eb345019c2 Don't implement bind_block/flush_block for drivers that
don't implement it
2018-07-15 20:16:40 +02:00
Stuart Carnie
0291c41afa fix(Metal): Fix blank screen after full screen toggle; window focus 2018-07-14 11:18:21 -07:00
Twinaphex
a68a22081c
Merge pull request #6989 from Dwedit/win32_message_loop_threaded_video_fix
Move win32 message loop, now compatible with threaded video
2018-07-14 06:12:07 +02:00
Dwedit
fa00eda625 Relocation of Win32 Message Loop Fix is now tied to whether threaded video is enabled or not
Menu bar is removed if threaded video is enabled, due to code currently being unsafe when using threaded video.
2018-07-13 22:34:03 -05:00
twinaphex
0df98a53a6 Use video_driver_is_threaded_internal from within gfx/video_driver.c 2018-07-14 05:24:28 +02:00
twinaphex
cc473a25b9 Add video_driver_is_threaded 2018-07-14 05:23:03 +02:00
twinaphex
0d39701145 Get rid of double void argument 2018-07-14 00:54:14 +02:00
twinaphex
600c2c1ca1 Simplify menu_display_font 2018-07-14 00:39:46 +02:00
twinaphex
abc6eb7d8c Revert "Re-revert this - causes issues with toggling fullscreen with threaded"
This reverts commit 52a55695ce.
2018-07-14 00:22:52 +02:00
twinaphex
4758caea74 Commenting this out for now - this causes crashes with
toggling fullscreen in threaded video mode with the GL driver
2018-07-14 00:21:27 +02:00
twinaphex
52a55695ce Re-revert this - causes issues with toggling fullscreen with threaded
video mode and GL driver
2018-07-14 00:10:21 +02:00
twinaphex
38a35e53fd Revert "Move Message loop call to right before video_driver_get_status call"
This reverts commit 838dcc8a5a.
2018-07-14 00:01:25 +02:00
Brad Parker
367689a3f9 add enum for 21:9 aspect 2018-07-13 15:30:48 -04:00
Brad Parker
637ded4ef1 add 21:9 aspect ratio 2018-07-13 15:29:07 -04:00
Stuart Carnie
13a9aca88a fix(Metal): Render search box correctly 2018-07-12 23:15:24 -07:00
Stuart Carnie
167ad3b57d fix(Metal): Various Metal fixes
* OSD message background
* clear glui background
* add Metal to configuration
* added optional config to compile Metal build without OpenGL
* fixed fill_pathname_join_delim; if out_path and dir are same, don't
  strlcpy, as the results are undefined.
2018-07-12 21:33:18 -07:00
Brad Parker
dbfccb25dd sixel: fix context init 2018-07-12 22:59:05 -04:00
Brad Parker
ab27b7c85f initial SIXEL video driver 2018-07-12 16:55:08 -04:00
twinaphex
6b5ade4ac3 Should be no more deprecated warnings with core context GL for menu
shaders
2018-07-12 22:03:37 +02:00
twinaphex
60d7d1c793 Add xmb ribbon simple core shader 2018-07-12 21:34:17 +02:00
twinaphex
140e657d51 (GLSL) Add logging for compiling menu shaders 2018-07-12 21:25:39 +02:00
Brandon Wright
c81aab345c Lock sizes of enum fields at 32 bits. 2018-07-11 16:37:37 -05:00
alphanu1
755a128d95
cast float 2018-07-08 19:15:24 +01:00
alphanu1
045606ce44
Restore refresh fix for windows
The refresh rate is now detect to restore the original desktop resolution.
2018-07-08 18:17:23 +01:00
alphanu1
74eacd5a33
Merge pull request #76 from libretro/master
update
2018-07-08 18:13:05 +01:00
Stuart Carnie
40a1446c95 feat(Metal): Reload shader preset when Metal driver reinitialized 2018-07-07 07:31:43 -07:00
Stuart Carnie
74e1f24e90 feat(Metal): Full screen support
* I believe there is a race condition where the viewport is not set
  correctly on launch
2018-07-06 23:38:34 -07:00
Stuart Carnie
01df2c5e88 fix(Metal): Check for nil drawable 2018-07-06 23:37:15 -07:00
Dwedit
41ce61974d A hack to invalidate the frame_cache_data pointer during the following events:
Load Game, Reset, Init, Unload, Unload Game, Video Driver Destroy, Video Driver Free, Video Driver Init

This prevents an invalid pointer from being read if the first frame starts out paused.
2018-07-06 09:53:31 -05:00
twinaphex
22d6930488 Some MSVC 2010 360 buildfixes 2018-07-06 04:45:52 +02:00
Dwedit
838dcc8a5a Move Message loop call to right before video_driver_get_status call 2018-07-05 20:07:01 -05:00
twinaphex
c3d469dd8e Revert "Moved WIN32 message loop out of win32_check_window, and into just before the call to runloop_iterate"
This reverts commit 7108628369.
2018-07-05 02:42:16 +02:00
Twinaphex
95500f5631
Merge pull request #6948 from stuartcarnie/sgc-metal
feat(Metal): Add support for overlays
2018-07-04 22:52:29 +02:00
Stuart Carnie
a19ea2ed07 feat(Metal): Add support for overlays 2018-07-04 13:12:40 -07:00
Dwedit
7108628369 Moved WIN32 message loop out of win32_check_window, and into just before the call to runloop_iterate 2018-07-04 14:20:38 -05:00
Twinaphex
63a071b85a
Merge pull request #6945 from Themaister/master
Vulkan: WSI stability fixes
2018-07-04 21:04:08 +02:00
Hans-Kristian Arntzen
52cb0fe375 Vulkan: Fix crash when we get two create_swapchain errors in a row. 2018-07-04 20:25:03 +02:00
Hans-Kristian Arntzen
f1d2dac213 Vulkan: Fix various stability issues with WSI.
Added an ifdef to trigger "hardening" which will return spurious errors
for critical WSI things like acquire next image, queue submit and
surface dimension queries.
2018-07-04 19:45:54 +02:00
Stuart Carnie
048aa16599 feat(Metal): Support vsync enable / disable 2018-07-04 09:50:09 -07:00
Stuart Carnie
844e5e15d0 fix(Metal): fix XRGBA rendering; no nil texture; undefined stuff bad 2018-07-04 08:50:46 -07:00
Stuart Carnie
5240efc857 chore(Metal): fix compiler warnings when targeting newer macOS versions 2018-07-04 00:24:04 -07:00
Stuart Carnie
30d2192338 fix(Metal): Fix release build crash for misaligned read 2018-07-04 00:16:14 -07:00
Stuart Carnie
44ca1062b0 formatting 2018-07-03 22:32:12 -07:00
Stuart Carnie
a0900ec433 feat(Metal): full xmb pipeline support
Menu TODOs:

* understand why ribbon does not look the same as GL
* add clear support to `MenuDisplay` for glui
2018-07-03 22:32:12 -07:00
Stuart Carnie
4a101734a1 More cleanup
* use single render command encoder for display for better performance
* Context handles all rendering and presentation
2018-07-03 22:32:12 -07:00
Stuart Carnie
1c5d94aca1 Improve performance; don't care about previous state ofcolor attachment
Color attachment is being completely overwritten.
2018-07-03 22:32:12 -07:00
Stuart Carnie
5e1f991e32 feat(Metal): initial xmb and glui menu support
TODOs

* menu shader pipeline effects
* refactor / optimize graphics rendering
2018-07-03 22:32:12 -07:00
Themaister
f2cae17021 Vulkan: Try to avoid creating swapchains redundantly.
Win32: Only make resize events when needed.
Do not create swapchain unless necessary.
Deal better with Windows WSI workarounds.
2018-07-01 16:21:09 +02:00
Themaister
c4ba8d26a0 Support multiple displays in VK_KHR_display. 2018-07-01 01:21:51 +02:00
twinaphex
8a1c0be83c (Android) Another potential buildfix; define ENABLE_HLSL
(slang_process) Put HLSL/Cg code around ENABLE_HLSL ifdef
(SPIRV-Cross) Make sure macros no longer need to be redefined; make them
unique in both glsl and hlsl files; needed for Griffin builds
2018-06-26 13:18:17 +02:00
twinaphex
d967cbc879 Add another ENABLE_HLSL ifdef 2018-06-25 21:51:23 +02:00
Twinaphex
3bdc7ca352
Merge pull request #6915 from RobLoach/osd-font
freetype: Allow getting OSD Font from Assets Directory
2018-06-24 18:13:18 +02:00
Rob Loach
e4fe33f437
freetype: Add comment about assets:// 2018-06-24 12:02:28 -04:00
Rob Loach
8a96062ed0
freetype: Rename to osd-font.tff 2018-06-24 11:19:40 -04:00
Rob Loach
da6b7987f1
freetype: Get DejaVuSansMono.ttf from the assets directory 2018-06-24 11:00:21 -04:00
Stuart Carnie
367c15f488 feat(Metal): font rendering
* FPS and other OSD messages render correctly
* add autoreleasepool around entire render loop to avoid memory leaks
2018-06-23 23:54:23 -07:00
Stuart Carnie
eacd52f009 fix(Metal): improve shader stability
* use MTKView, which handles layer and scaling changes automatically
  between displays
2018-06-23 13:33:27 -07:00
Stuart Carnie
ee8d82dcfe add additional project files 2018-06-23 13:33:27 -07:00
twinaphex
0d8729daa6 FIx warning 2018-06-21 08:12:02 +02:00
twinaphex
b05026b69f Buildfix 2018-06-21 07:56:40 +02:00
Twinaphex
fd11b205da Silence bunch of warnings 2018-06-21 07:52:01 +02:00
Twinaphex
2bdffff435 Silence more warnings 2018-06-21 07:34:27 +02:00
Twinaphex
467aa30131 Cleanups 2018-06-21 07:26:05 +02:00