Commit Graph

394 Commits

Author SHA1 Message Date
libretroadmin 6624126885 (MSVC) silence warnings 2023-02-18 17:04:23 +01:00
Hans-Kristian Arntzen 89d2d66e98
[Vulkan] Fix regression with RGB565 and OriginalHistory. (#14968)
Need to let filter chain know that we remapped the format.
Otherwise we end up trying to copy RGBA8888 to RGB565.
2023-02-12 18:10:07 +01:00
Hans-Kristian Arntzen a77ada403e
[Vulkan] Use compute shaders to upload RGB565. (#14953)
A compatible path that is still fast. No reason to bother checking for
compat here really.
2023-02-05 19:23:48 +01:00
warmenhoven 8edbf51323
Fix warnings (#14918) 2023-01-28 17:29:53 +01:00
libretroadmin 7583e3d903 (Vulkan) Some refinements 2023-01-28 16:51:17 +01:00
warmenhoven af2587b62b
Fix rgui on vulkan on platforms that don't have _pack16 VkFormats (#14916) 2023-01-28 16:47:11 +01:00
libretroadmin 1a93bb3844 (Vulkan) Move some code around 2023-01-24 04:40:17 +01:00
warmenhoven 5b4c2c3e12
avoid using _PACK16 pixel formats on platforms without them (#14863) 2023-01-23 21:00:22 +01:00
libretroadmin e10361ed52 Header include cleanups for driver.h 2023-01-09 15:28:15 +01:00
libretroadmin daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
libretroadmin 8a3686df58 Revert "Header cleanups - don't include retroarch.h everywhere"
This reverts commit 0e3b478f8c.
2023-01-08 09:05:46 +01:00
libretroadmin 0e3b478f8c Header cleanups - don't include retroarch.h everywhere 2023-01-08 08:56:57 +01:00
reallibretroadmin 6199baff3a Silence several Vulkan related warnings that showed up in Xcode 2023-01-07 08:05:06 +01:00
Eric Warmenhoven 3c199c794e Updated Vulkan on Metal for OSX via MoltenVK 2023-01-07 07:38:42 +01:00
LibretroAdmin f836328c56
Append Preset (#14737) (#14757)
WIP version of Append and Prepend preset, Includes UI for Standard Retroarch, but not the QT UI companion

Co-authored-by: HyperspaceMadness <remimcgill@hotmail.com>
2022-12-22 21:36:32 +01:00
libretroadmin 91b77cf14a (Vulkan) Cleanups - use int for loop counter variables, don't do
some assignments that are already done directly after
2022-12-04 15:29:48 +01:00
Hans-Kristian Arntzen 498835a1f7
Vulkan: Fix HDR inverse tonemapping. (#14587)
Only skip tonemapper if HDR10 is explicitly enabled by last shader pass.
Otherwise, we are simply just inheriting the bit-depth of the swapchain.
2022-11-04 00:50:19 +01:00
LibretroAdmin 56ad3fa091 (Vk struct) Turn boolean variables into flags 2022-11-02 21:34:00 +01:00
LibretroAdmin 724acc4eb9 (Vulkan) Use flags for vulkan_ctx_data 2022-10-30 23:07:07 +01:00
LibretroAdmin f40d157571
Use flags pt3 (#14491)
* (Vulkan) Use flags for vulkan_emulated_mailbox

* Use flags for vk_texture

* dispgfx_widget - use flags instead of bools

* (Autoconfig) Use flags
2022-10-07 11:08:17 +02:00
Themaister a058c78fd0 Attempt to fix validation errors with HDR swapchain.
Always use final render pass type equal to swapchain format. Use more
direct logic to expose if filter chain emits HDR10 color space or not.
2022-08-31 21:59:25 +02:00
Themaister 3a25b53175 Fix more validation errors. 2022-08-31 21:03:07 +02:00
Themaister f508a6a87f Fix some potential validation errors in HDR code. 2022-08-31 19:57:54 +02:00
Themaister f9eda02a74 Fix leak of HDR UBO buffer. 2022-08-31 19:46:11 +02:00
Themaister d6413f2a43 Automatically mark buffer/images/memory with names. 2022-08-31 19:46:11 +02:00
libretroadmin 9dd1fb895b - Turn rotation arrows static where possible
- Don't call matrix_4x4_rotate_z - inline the code instead
2022-07-04 15:28:54 +02:00
Ophidon 4c934e66d5
Fix BFI Regression 2022-05-29 00:51:28 -04:00
libretroadmin 66a2a12766 (Vulkan) Move functions to proper place where they're used
and turn them static
2022-05-21 01:40:23 +02:00
libretroadmin af89df2b82 (Vulkan) Some C89_BUILD fixes 2022-05-19 15:47:45 +02:00
libretroadmin 493b8fdef8 (Vulkan) Style nits/cleanups 2022-05-19 15:43:51 +02:00
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