Commit Graph

364 Commits

Author SHA1 Message Date
libretroadmin eaabfefcb0 (Vulkan) Cleanups 2022-05-19 15:28:26 +02:00
libretroadmin 6f156d064e (Vulkan) vulkan_transition_texture - get rid of early return 2022-05-18 16:48:23 +02:00
libretroadmin bfa627737e (D3D/Vulkan) Try to prevent implicit memsets 2022-05-16 21:37:02 +02:00
twinaphex 3873af37c6 (Vulkan) Turn this code into a switch instead of several conditionals 2022-04-02 19:10:56 +02:00
twinaphex 65b8ec4cef (Vulkan) Fix crashes 2022-04-02 19:02:54 +02:00
twinaphex a7569b5712 More CXX_BUILD buildfixes 2022-03-30 15:45:48 +02:00
twinaphex c8d57fe667 (CXX_BUILD) Some CXX_BUILD fixes 2022-03-30 15:13:28 +02:00
MajorPainTheCactus f3bda542d6 Fixed crash when using stock shader and HDR and previous optimisation 2022-03-15 05:44:07 +01:00
MajorPainTheCactus 32b8560858 Removed redundant copy of buffer in HDR mode if the shader has already a HDR format i.e R10G10B10A2 2022-03-15 05:44:07 +01:00
Colin Kinloch 3e3cf904ca
(Vulkan) Double combined image sampler descriptor pool size (#13467) 2022-01-10 09:10:11 +01:00
MajorPainTheCactus ad4f6176ff
Vulkan driver fixes for HDR (#13468)
* Fixed crash on boot with xmb and vulkan driver Fixed wrong blend state affecting the ribbon shader Fixed up C++ style comments with C style

* Fixed compilation issue - I made a last minute change and thought I had compiled it but obviously hadn't! No wonder it worked.
2022-01-10 06:26:02 +01:00
MajorPainTheCactus 1a228a4e78
Added HDR support to Vulkan driver (#13456) 2022-01-08 13:22:34 +01:00
Nikos Chantziaras be650a790c
Add option for showing the overlay behind the menu (#13360)
* Add option for showing the overlay behind the menu

This commit lays the groundwork for this option. Support for this option
in the video drivers themselves is going to be added in later commits.

* gl1: Add overlay behind menu support

* gl2: Add overlay behind menu support

* gl3: Add overlay behind menu support

* vulkan: Add overlay behind menu support

* ctr: Add overlay behind menu support

* d3d9: Add overlay behind menu support

* d3d10: Add overlay behind menu support

* d3d11: Add overlay behind menu support

* d3d12: Add overlay behind menu support

* CHANGES.md: overlay behind menu

Co-authored-by: MrHuu <MrHuu@users.noreply.github.com>
Co-authored-by: Tony <45124675+sonninnos@users.noreply.github.com>
2021-12-26 04:56:44 +01:00
Tony 09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
Hans-Kristian Arntzen ce8a3db4dc
Avoid hard crash when capturing screenshot in emulating mailbox. (#13315)
The emulating mailbox infrastructure is very hacky and needs a rethink
to be able to properly support screenshots. emulating mailbox is pretty
nasty to begin with and should be considered a hack.
2021-12-03 16:19:49 +01:00
twinaphex 0b768d0460 Split up recording code 2021-11-10 02:34:04 +01:00
Francisco Javier Trujillo Mata 3bbfcf7b39 Adding to get_video_output_size 2 parameters for additional info 2021-10-04 23:53:55 +02:00
Autechre 7b9cbc08d7
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917)
* Add HDR support

* Attempt to fix Mingw build and Metal builds

* (D3D12) Fix relative header includes

* Add missing hdr_sm5.hlsl.h

* (d3d12_common.c) Some C89 build fixes

* Fix MSVC build

* - Attempt to fix build on mingw/msys unix with dirty hack
- Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio -
the define was seen as an error and was causing the first pipeline
to error out
- Make sure we manually set handle of backBuffer to NULL

* Moving the release of the texture above the freeing of desc.srv_heap
and desc.rtv_heap solves the hard crashes on teardown/setup in RA -
it was crashing hard in d3d12_release_texture before

* Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now
because of several things that are Windows desktop-specific right now
(GetWindowRect)

* Add dirty GUID hack - should work for both mingw/msys on Windows/Linux
as well as MSVC/Visual Studio (hopefully)

* Change HAVE_D3D12_HDR to HAVE_DXGI_HDR

* Move away from camelcase named variables

* Fix RARCH_ERR logs - they need a newline at the end

* d3d12_check_display_hdr_support - make it return a bool on return
and set d3d12->hdr.support and d3d12->hdr.enable outside of the
function

* (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and
move it to dxgi_common.c instead

* (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and
rename it dxgi_swapchain_color_space

* (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and
rename it dxgi_set_hdr_metadata

* (DXGI) dxgi_check_display_hdr_support - better error handling?

* Fix typo

* Remove video_force_resolution

* (D3D12) Address TODO/FIXME

* (D3D12) Backport
c1b6c0bff2
- Fixed resource transition for present when HDR is off
Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader

* Move d3d12_hdr_uniform_t to dxgi_common.h and
rename it dxgi_hdr_uniform_t

* (D3D11) Add HDR support

* Add TODO/FIXME notes

* Cache hdr_enable in video_frame_info_t

* Update comment
2021-09-03 06:15:25 +02:00
twinaphex bf2e7b93f0 (Vulkan) Fix Vulkan validation layer - fix thanks to flyinghead -
see comments
2021-08-29 20:39:22 +02:00
Autechre a04fe66032
Merge pull request #12380 from stenzek/vulkan-software-fb
(video/vulkan) Avoid caching stale mapped GPU texture as frame data
2021-05-18 18:01:47 +02:00
jdgleaver 484c4ad51e Add API extension for cores to override frontend fast-forward state 2021-05-13 13:16:37 +01:00
Stenzek c9aaf598bb (video/vulkan) Avoid caching stale mapped GPU texture as frame data
At best, this results in junk on screen, at worst we could crash.

It's not a perfect fix, there's still a scenario where this breaks: when
fast forwarding is enabled, and we swap from vsync-off to vsync-on when
pausing/rendering the menu, the swap chain (and textures) gets
recreated, and the frame data is completely lost.

There isn't much we can do about this without more intrusive changes,
such as preserving the textures inbetween swap chain reinits.
2021-05-11 09:49:39 -07:00
twinaphex 32a6bd021c Prevent 'may be used uninitialized' warning 2021-03-22 15:46:34 +01:00
sonninnos 6c3c2bea5f Logging cleanups 2021-02-18 18:35:31 +02:00
twinaphex d55ca599e0 Replace with macros 2020-12-15 07:28:39 +01:00
twinaphex cdca5d0afc Turn vulkan_copy_staging_to_dynamic into macro 2020-12-15 07:20:33 +01:00
twinaphex d70420a12d vulkan_copy_staging_to_dynamic - put sync texture to GPU
outside of the function
2020-12-15 07:01:00 +01:00
twinaphex 6b38a7916a (Vulkan) Simplify code 2020-12-15 06:19:48 +01:00
twinaphex 44b7234756 Move cheat_manager and state_manager to root folder 2020-10-15 05:29:20 +02:00
twinaphex a11a0eae77 (Vulkan) Style nits 2020-10-12 01:36:50 +02:00
twinaphex 5c76ccbe4a Cleanups 2020-10-12 01:26:51 +02:00
Ophidon 05c5bdf587 C89 Compliance
For loop iterators updated for C89 compliance.
2020-09-19 13:28:21 -04:00
Ophidon 2f36c94f3f Variable BFI
BFI support added for 180hz / 240hz / etc. Solves issue with image retention from voltage issues at 120hz BFI. Also disabled BFI while in menu, as if set to an incorrect value for the current refresh rate, could cause severe flickering and difficulty reverting to the correct value.
2020-09-18 11:57:32 -04:00
jdgleaver 55b6d8ba15 Miscellaneous overlay fixes 2020-09-11 17:00:44 +01:00
twinaphex bb58b0d6e3 (GLSLANG) Move more common code out of shader_gl_core and shader_vulkan
and into glslang_util.h
2020-08-16 02:05:38 +02:00
twinaphex 72afa2f932 Cleanups 2020-08-03 16:33:54 +02:00
twinaphex 85e5c783af Backport getting rid of video_context_driver_input_driver 2020-08-03 00:47:58 +02:00
twinaphex deee393dfb Backport video_context_driver_free changes 2020-08-03 00:35:07 +02:00
twinaphex 3e41cbc381 Revert "Add get_metrics to poke interface"
This reverts commit 119689c940.
2020-08-02 23:44:28 +02:00
twinaphex da5806a810 Revert "Cleanups"
This reverts commit a01a2375a1.
2020-08-02 23:43:56 +02:00
twinaphex 2efa8ac80e Revert "Get rid of video_context_driver_input_driver"
This reverts commit 75b1a09184.
2020-08-02 23:43:19 +02:00
twinaphex 75b1a09184 Get rid of video_context_driver_input_driver 2020-08-02 20:37:21 +02:00
twinaphex a01a2375a1 Cleanups 2020-08-02 20:19:42 +02:00
twinaphex 119689c940 Add get_metrics to poke interface 2020-08-02 19:25:45 +02:00
twinaphex 416363e9fd Cleanups 2020-08-02 18:49:31 +02:00
twinaphex 7f1cd52d65 Remove video_driver_context_get_size 2020-07-27 14:33:21 +02:00
twinaphex d6465a1348 Refactor 'focus' function callback 2020-07-27 13:46:55 +02:00
twinaphex 74345f08d6 Refactor video_driver_has_windowed 2020-07-27 13:39:02 +02:00
twinaphex 60f3265017 Cleanups 2020-07-27 13:16:14 +02:00
twinaphex 61b798b789 Get rid of video_context_driver_set_video_mode 2020-07-27 11:08:34 +02:00
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