Commit Graph

364 Commits

Author SHA1 Message Date
twinaphex 3d893b7602 Add extra parameter to unload_texture 2020-07-27 10:15:28 +02:00
twinaphex dc94356505 Cleanup context driver video output functions 2020-07-27 09:38:20 +02:00
twinaphex 8dc7524e43 Get rid of video_context_driver_translate_aspect wrapper function 2020-07-27 08:15:35 +02:00
twinaphex 4e5037d7e1 Revert "Get rid of these context driver higher level functions"
This reverts commit 27b09229b3.
2020-07-26 23:11:24 +02:00
twinaphex 27b09229b3 Get rid of these context driver higher level functions 2020-07-26 11:58:38 +02:00
twinaphex cb138183ad (Vulkan) Implement video resolution callback functions 2020-07-25 11:35:42 +02:00
twinaphex 6b466c6013 Cleanups 2020-07-09 07:46:40 +02:00
twinaphex f6c4890063 Get rid of cb_set_resize 2020-07-09 05:36:29 +02:00
twinaphex 276e86a403 (Vulkan) Turn some of these functions into macros 2020-07-03 17:48:46 +02:00
twinaphex 25f682249f (Vulkan) Turn vulkan_image_layout_transition into macro 2020-07-03 08:45:53 +02:00
twinaphex 87b9c2a367 Add HAVE_REWIND switch 2020-07-01 21:04:05 +02:00
twinaphex 120afe5d21 (Vulkan) return early/error out if no context driver is found 2020-06-30 01:33:19 +02:00
twinaphex 1b3826b348 (Vulkan) Avoid some unnecessary memsets 2020-06-29 00:02:45 +02:00
twinaphex bc73a815b7 Prevent memsets for vk->tracker 2020-06-28 19:18:48 +02:00
twinaphex c1f90e4c9a (Vulkan) Cleanups 2020-06-28 01:09:33 +02:00
Themaister cd4f22c275 Vulkan: Add path which uses WSI acquire semaphores.
Fence wait path has some issues on certain platforms. For now, gate this
on whether the GPU is integrated or not.
2020-06-09 00:24:29 +02:00
Themaister 15df55d011 Vulkan: Refactor swapchain index and frame index.
Do not tie these concepts together, it will not work for upcoming
refactor of swapchain logic.
2020-06-09 00:24:29 +02:00
twinaphex 2660182d52 Get rid of gfx_widgets_ready call inside
gfx_widgets_frame
2020-06-08 05:45:15 +02:00
twinaphex 9ace693ec0 Refactor menu_driver_frame 2020-05-19 16:20:43 +02:00
twinaphex c88ffa56ff (Vulkan) Fix crash 2020-04-25 17:44:13 +02:00
jdgleaver 0e3026d41f (Vulkan) Fix display of statistics text 2020-04-23 17:48:15 +01:00
twinaphex 19c68fad43 Take out cb_update_window_title and cb_get_metrics 2020-03-28 05:36:31 +01:00
jdgleaver 086c68bca7 Enable widget persistence across drivers_init()/driver_uninit() events 2020-03-11 11:47:13 +00:00
twinaphex f4c5036c3c Get rid of video_frame_info dep for fonts 2020-03-10 03:24:59 +01:00
twinaphex 68678987c4 (Vulkan) Cleanups 2020-03-09 15:48:15 +01:00
twinaphex e20151a048 Get rid of video_info struct for swap_buffers too 2020-03-06 22:29:51 +01:00
twinaphex 68664fdf1d update_title - we don't need video_info 2020-03-06 22:11:44 +01:00
twinaphex 4aae293e3d Remove is_shutdown from check_window 2020-03-06 20:29:31 +01:00
twinaphex da60c1bb96 Header cleanups 2020-03-05 14:06:04 +01:00
twinaphex 3a94c52426 (gfx drivers) Start reducing settings pointer usage 2020-02-18 14:51:40 +01:00
twinaphex 7c7d0f596a HAVE_MENU_WIDGETS now decoupled from HAVE_MENU 2020-02-17 21:28:42 +01:00
twinaphex b00bf17153 Move menu_widgets to gfx/ and call it gfx_widgets 2020-02-17 01:54:07 +01:00
twinaphex b229f267e4 Rename menu_widgets to gfx_widgets 2020-02-17 01:43:40 +01:00
twinaphex ec302bc4fc video_set_nonblock_state - remove settings dependency 2020-02-16 22:26:07 +01:00
twinaphex 47af95469a (font_driver.c) Remove configuration.h dependency 2020-02-16 21:59:03 +01:00
twinaphex e47b7526bc (gfx) Cleanups 2020-02-13 23:24:51 +01:00
twinaphex f0e889b552 Change prototype of video_driver_set_size 2020-01-31 15:06:50 +01:00
twinaphex ef27a660a7 (shader vulkan) Cleanups - moving C code out of the C++ file 2020-01-22 10:11:42 +01:00
twinaphex f92a507a9b Change function signature of font_driver_render_msg 2020-01-04 16:24:14 +01:00
twinaphex 6c97a7514c (Vulkan) turn superfluous functions in vulkan_common.c into macros
to avoid unnecessary function overhead
2020-01-03 20:20:59 +01:00
twinaphex ed8e440b0d Revert "Move update_window_title to main thread - this should resolve some"
This reverts commit 442608981d.
2019-11-19 22:48:35 +01:00
twinaphex 442608981d Move update_window_title to main thread - this should resolve some
concurrency issues on OSX as well
2019-11-19 22:13:51 +01:00
Rinnegatamante 26b0bc771d Add vulkan context logging. 2019-10-13 17:47:08 +02:00
twinaphex d406fee72e Remove video_context_driver_suppress_screensaver 2019-08-28 22:52:41 +02:00
twinaphex c50cc7b010 Remove video_context_driver_show_mouse 2019-08-28 21:36:58 +02:00
twinaphex 88720b540e Get rid of video_context_driver_swap_interval 2019-08-28 21:12:51 +02:00
twinaphex 6c671faed6 Start preparing for menu_widgets_ready to be moved to retroarch.c 2019-08-15 14:20:51 +02:00
twinaphex d43b26348b (Vulkan) Don't use video_driver_get_size 2019-08-13 12:28:16 +02:00
twinaphex a45c9b6eb4 Duplicate aspect ratio code that was being ran twice 2019-08-12 12:52:40 +02:00
twinaphex 65b4c2595e Update set keyboard mapping code for input driver 2019-07-27 02:21:24 +02:00
LazyBumHorse c20c67bd3a proper shader compatibility checks
- move shader flags from the video drivers to the context drivers
 - rework config_load_shader_preset() from configuration.c into retroarch_load_shader_preset() in retroarch.c with proper compatibility check
 - implicitly call retroarch_load_shader_preset() in retroarch_get_shader_preset() once per core/content life cycle
 - use video_shader_is_supported() instead of video_driver_test_all_flags() where appropriate
 - remove GFX_CTX_FLAGS_NONE because it is meaningless
2019-06-18 13:46:41 +02:00
LazyBumHorse 692dc9f6a9 refactor shader checks affected by last commit and more:
- gl.c: refactor backend fallback into more general gl2_get_fallback_shader_type
 - d3d9-12, gl_core, gx2_gfx, gl, vulkan: more consistent shader init and `set_shader` behavior
 - configuration.c: remove check_shader_compatibility
 - shader_glsl.c, shader_gl_cg.c: use `video_shader_get_type_from_ext`
 - shader_gl_cg.c: add shader type check with fallback to stock like in shader_glsl.c
 - menu_shader.c: use `enum rarch_shader_type` instead of `unsigned`
 - video_shader_parse.c: add `video_shader_to_str` for easier logging
 - remove `type` from `struct video_shader`, which was always set to CG and wrongly used in lang_process.cpp's `slang_process()` (has no further consequences because the code is unused)
2019-06-18 13:44:19 +02:00
LazyBumHorse 42e35c825f refactor some video_shader_parse functions
- video_shader_parse_type()'s fallback only worked for NULL paths and was wrongly used, now returns RARCH_SHADER_NONE like video_shader_get_type_from_ext().
 - video_shader_get_type_from_ext() should not be checking video driver flags, this is instead done by video_shader_is_supported()
 - video_driver_get_all_flags() did not actually 'get' flags, changed to video_driver_test_all_flags()

workaround for crash due to glcore not always using at least OpenGL 3.2
2019-06-18 13:12:56 +02:00
twinaphex f061941456 Integrate record_driver.c into retroarch.c 2019-06-17 16:23:46 +02:00
LazyBumHorse ee3cda8abf added "FrameDirection" slang semantic and implementation for glcore and vulkan 2019-05-24 22:11:12 +02:00
Dwedit 24fa0cd5b5 Move `pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;` to after the other variable declaration (so all variable declarations happen before any other code) 2019-05-17 14:29:23 -05:00
Huw Pascoe 2c56011f84 video_layout interface 2019-05-11 09:58:48 +01:00
Nathan S edb37ccf70 menu widgets: cleanup fix and draw above overlay for gl and vulkan (#8732)
* menu_widgets: cleanup properly all widgets when loading or closing content

* gl: draw menu widgets above overlay

* vulkan: draw menu widgets above overlay

* vulkan: draw OSD above overlay

* menu_widgets: better cleanup
2019-05-11 06:26:40 +02:00
twinaphex a0b2d97ca3 Hide 'Take Screenshot' for video drivers that don't support
taking screenshots yet
2019-05-05 13:46:26 +02:00
jdgleaver 9fff07e589 (Menu Widgets) Fix text alignment issues with Vulkan and D3D video drivers 2019-04-08 13:35:35 +01:00
twinaphex f67bfa24ef Get rid of video_poke_interface set_mvp 2019-03-18 15:19:11 +01:00
twinaphex fe1255094f Get rid of now unused set_coords in video_driver_poke_interface 2019-03-18 05:04:23 +01:00
twinaphex 365053266f Add more flags 2019-03-13 11:04:52 +01:00
Themaister 3b9ad729fb Vulkan: Fix color issues with RGBA8888 swapchains in readback. 2019-02-15 20:30:08 +01:00
twinaphex fb121ac75e (Vulkan) Hook up menu widgets 2019-02-07 00:15:32 +01:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
jdgleaver 11af72286b (Vulkan) Enable RGUI 'Menu Linear Filter' option 2019-01-23 11:55:17 +00:00
M4xw 7d186f7d2c Revert PR #8043 2019-01-20 20:06:57 +01:00
Nano c017271d8a Fix #6747 Black bug 2019-01-19 10:26:06 +01:00
orbea e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -08:00
Twinaphex 01397f008a
Revert "Fix issue #6747 black bug" 2019-01-10 22:52:13 +01:00
Twinaphex e4f9aebbd3
Merge pull request #7973 from daliaetnano/fix-2791-black-bug
Fix issue #6747 black bug
2019-01-10 22:36:40 +01:00
twinaphex b9ff2e4de1 Fix some static code analysis warnings from MSVC 2017 2019-01-10 21:47:15 +01:00
Nano f1ba335cb3 Fix issue #2791 black bug 2019-01-09 22:52:45 +01:00
Themaister 077b108aa1 Vulkan: Fix potential crash when toggling fullscreen.
If we have HW rendering, and we toggle fullscreen while in the menu, we
don't have a ready HW image, so fall back to black dummy texture.
2018-12-12 13:28:46 +01:00
Themaister 124d9b57d6 Vulkan: Fix blue/red flip when using HW rendered cores with history.
Was using frontend format of BGRA8 when core was RGBA8, with blind
vkCmdCopyImage. Fix is to use the same format as core is pushing to
history buffer.
2018-12-06 11:38:30 +01:00
Themaister 66e7c73193 Keep enable state the same after loading new overlay. 2018-10-18 23:37:45 +02:00
Themaister 3f41cd533b Fix RGUI regression on Vulkan. 2018-10-16 23:29:17 +02:00
twinaphex 9e2d688e1d Get rid of video_context_driver_get_context_data 2018-10-15 01:27:18 +02:00
twinaphex 2edd03361c Remove video_context_driver_check_window 2018-10-14 17:49:29 +02:00
twinaphex 448d2d333c Set ctx_driver 2018-10-14 08:22:26 +02:00
twinaphex e661cf3cfd Rewrite video_context_driver_init_first 2018-10-14 08:13:05 +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 4738ef545c Change interval type to signed int 2018-09-12 00:08:13 +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 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
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
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
twinaphex e54cb1b121 Only show black frame insertion for the video drivers/context drivers
that support it
2018-04-23 14:15:21 +02:00
twinaphex c4c8699ee3 Only show max swapchain images if supported by video driver and/or
context driver
2018-04-23 13:34:30 +02:00
Brandon Wright 533f898132 Add get refresh rate context function. Implement for X11 and Wayland. 2018-04-15 17:56:12 -05:00
Brandon Wright 7a00534378 Add poke interface for get_refresh_rate. 2018-04-15 17:56:11 -05:00
twinaphex 97cf6613da (XMB/Shaders) Reimplement menu shader loading for GLSL/Cg/HLSL backends - if
XMB is selected, it will compile the shader pipelines in
advance
2018-04-12 02:20:17 +02:00
aliaspider 88d1c1fdca msvc build fix. 2018-03-25 23:11:31 +01:00
twinaphex 9b8713aebd Fix Coverity defects 2018-03-24 11:59:01 +01:00
twinaphex 4d1b4f905f Start adding OSD statistics - doesn't work yet for SDL2/SDL 2018-03-23 17:43:49 +01:00
aliaspider b948cf46e7 (Vulkan) add missing queue locks when calling vkQueueWaitIdle. 2018-03-15 09:21:23 +01:00
radius c64d5556c1 readd shader to config, let's use a runtime check instead of overwritting the shader preset all the time 2018-02-07 21:25:59 -05:00
twinaphex 8771171f63 (glslang) Compatibility tweaks for MSVC 2010 compatibility 2018-02-04 15:49:53 +01:00
twinaphex f677a7ad7e Add HAVE_OVERLAY to qb system 2018-01-05 16:10:34 +01:00
twinaphex bd16fd49ab Fix ./configure --disable-rgui 2017-12-31 17:53:11 +01:00
twinaphex cf3a010ead Remove some HAVE_MENU ifdefs 2017-12-31 17:42:07 +01:00
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
Themaister 75b84b4f94 Support pending swapchain creation. 2017-12-09 17:28:20 +01:00
Themaister 714684a4d3 Don't wait for WSI fence unless it has been signalled. 2017-12-09 17:28:20 +01:00
twinaphex 683c437941 Updates 2017-11-14 21:34:03 +01:00
twinaphex 9eba2c8e39 Fix CXX_BUILD on Windows 2017-09-28 18:53:09 +02:00
twinaphex 9c32d03c1e (Vulkan/Win32) C89_BUILD fixes 2017-08-12 17:56:30 +02:00
Jean-André Santoni 0b1716650b Use additive blending for the ribbon in GL and Vulkan 2017-05-22 01:29:56 +02:00
twinaphex 3f7a30a4b3 Start hooking up dummy callback functions to video_context_data
so that conditionals aren't necessary
2017-05-18 03:37:02 +02:00
twinaphex 941a5d4f94 Go through function callback for swap_buffers as well 2017-05-18 03:05:07 +02:00
twinaphex 86ee08b7a7 Add video context driver update window title callback
to video_frame_info_t
2017-05-18 02:53:12 +02:00
aliaspider 36137d22e5 Vulkan: use the command buffer provided as parameter in
vulkan_copy_staging_to_dynamic.
2017-05-15 05:35:17 +01:00
twinaphex 17a15273ba Create function out of video_driver_is_focused - no longer
call video_driver_context_focus from video driver
2017-05-13 19:19:49 +02:00
twinaphex d4756f83e5 Stop calling video_driver_context_has_windowed from within video
drivers
2017-05-13 19:11:32 +02:00
twinaphex f6c8aba119 Move video_context_driver_update_window_title to video_driver_frame 2017-05-13 18:58:13 +02:00
twinaphex f928e57064 Combine video_context_driver.c and video_driver.c 2017-05-09 01:25:59 +02:00
twinaphex bac9973354 Cleanups 2017-05-09 00:58:01 +02:00
twinaphex e84adb504f Don't try to call video_driver_is_threaded from outside
gfx/video_driver.c - only exception right now - menu_display.c
2017-04-29 16:52:52 +02:00
twinaphex 91abbdd4f1 video_viewport_get_custom will never be NULL 2017-04-29 16:22:07 +02:00
twinaphex e6ab06a701 Move path variables 2017-04-29 00:39:29 +02:00
twinaphex f0c2d786ae Update arrays struct 2017-04-28 22:59:13 +02:00
twinaphex 05e4ec733e Move uint variables 2017-04-28 21:03:04 +02:00
twinaphex cc095e56fc Start refactoring bool variables 2017-04-28 00:53:20 +02:00
twinaphex 2a13af52fc Revert "video_init function - video_info_t should not be const -"
This reverts commit c8bcbad4a7.
2017-04-24 12:25:14 +02:00
twinaphex e5b38315fe Revert "Add real_width and real_height to video_info struct - let"
This reverts commit 831ea1a507.
2017-04-24 12:25:07 +02:00
twinaphex 831ea1a507 Add real_width and real_height to video_info struct - let
the drivers set this depending on the video width/height they
get back from the video context driver
2017-04-24 12:18:28 +02:00
twinaphex c8bcbad4a7 video_init function - video_info_t should not be const -
try to set video_driver_width/video_driver_height outside
of video driver init function
2017-04-24 12:03:21 +02:00
twinaphex d06c963a19 Get rid of PERF_ENABLE blocks 2017-04-24 11:20:30 +02:00
twinaphex 34852e159a Cut down on amount of times video_driver_build_info is called 2017-04-23 22:20:11 +02:00
twinaphex 0f2a6f3dd2 Don't use performance counters in GL/Vulkan/video thread wrapper
unless PERF_ENABLE is defined
2017-04-23 11:31:11 +02:00
twinaphex 0c5a87b1d7 Create scaler_ctx_scale_direct 2017-04-16 11:03:29 +02:00
twinaphex 257410d058 Turn matrix_4x4_multiply into macro 2017-04-16 07:55:02 +02:00
twinaphex 32cebbbcba Turn more matrix_4x4 functions into macros 2017-04-16 04:00:20 +02:00
twinaphex fbd6d0ebc6 Turn more matrix 4x4 functions into macros 2017-04-16 03:53:07 +02:00
twinaphex 1b27c3dec1 Make some log messages more consistent 2017-03-24 00:28:21 +01:00
hunterk a1124b8ded (Vulkan) add bokeh menu shader for vulkan 2017-02-20 22:59:05 -06:00
twinaphex 0d873b6da1 (Vulkan) Add fancy snow for Vulkan 2017-02-20 21:51:58 +01:00
Hans-Kristian Arntzen 2d88530c98 Vulkan: Simple snow pipeline works.
Some other fixes too.
2017-02-20 20:53:59 +01:00
twinaphex 374fd57270 Remove the few performance counters that depend on runloop_ctl 2017-01-25 18:15:58 +01:00
twinaphex a9164b7124 Try to use performance counter plus functions in most cases 2017-01-25 17:12:43 +01:00
twinaphex 6661c0fb94 Rewrite performance counter stop/start/init into macros 2017-01-25 16:53:06 +01:00
twinaphex a104c73738 Go back to this 2017-01-22 23:19:35 +01:00
twinaphex 8698525f86 Only show the frame when libretro_running is true 2017-01-22 21:42:42 +01:00
twinaphex 2f504b4057 (gfx/drivers) Get rid of remaining runloop.h / runloop_ctl
references inside gfx/drivers
2017-01-22 18:17:48 +01:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex 57f8c637bf Cut down on runloop_ctl calls inside gfx/drivers 2017-01-22 12:38:20 +01:00
twinaphex fe84312340 Add some header includes 2017-01-19 17:20:42 +01:00