90 Commits

Author SHA1 Message Date
libretroadmin
c1166ee823 Cleanups 2023-06-01 21:34:34 +02:00
libretroadmin
4f6010bea7 COmbine font raster files and video driver files 2023-05-31 19:03:45 +02:00
libretroadmin
51d238875e Get rid of obsolete HAVE_VIDEO_LAYOUT - obsolete spec, was only
ever implemented for OpenGL2 driver, lots of code debt, best to
instead just keep improving the overlay system instead which is
already available for most video drivers
2023-02-23 21:03:41 +01: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
3e41cbc381 Revert "Add get_metrics to poke interface"
This reverts commit 119689c9405b5e4a321fafc340f6f0294b0338c3.
2020-08-02 23:44:28 +02:00
twinaphex
119689c940 Add get_metrics to poke interface 2020-08-02 19:25:45 +02:00
twinaphex
ad1aa59ce1 Cleanup != NULL comparisons 2020-05-19 21:15:06 +02:00
twinaphex
9ace693ec0 Refactor menu_driver_frame 2020-05-19 16:20:43 +02:00
twinaphex
4e6f26d2e4 (Video drivers) Cleanups 2020-03-09 16:24:20 +01:00
twinaphex
ec302bc4fc video_set_nonblock_state - remove settings dependency 2020-02-16 22:26:07 +01:00
twinaphex
74cd84399f Cleanups - Replace '== NULL' 2020-01-30 16:47:33 +01: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
twinaphex
6aed230930 Reimplement 'Take Screenshot' - if GPU-accelerated viewport screenshots
are not available, resort to raw screenshots instead
2019-05-22 07:08:11 +02:00
Huw Pascoe
2c56011f84 video_layout interface 2019-05-11 09:58:48 +01:00
twinaphex
c3d2b190f2 (dispmanx) Implement get_flags 2019-05-05 13:49:06 +02: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
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
7a00534378 Add poke interface for get_refresh_rate. 2018-04-15 17:56:11 -05:00
twinaphex
08e61230e9 Update video_poke_interface 2018-01-30 22:29:57 +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
twinaphex
683c437941 Updates 2017-11-14 21:34:03 +01:00
twinaphex
d4756f83e5 Stop calling video_driver_context_has_windowed from within video
drivers
2017-05-13 19:11:32 +02:00
twinaphex
f928e57064 Combine video_context_driver.c and video_driver.c 2017-05-09 01:25:59 +02:00
Andrew
858e15b837 Fix performance issue with max_swapchain_images
This fixes a performance problem introduced in my last commit when
max_swapchain_images == 3.

In my last commit I incorrectly stated the 3rd buffer was not being
used, after doing some additional testing I realized I was mistaken,
it can indeed be used due to the used page tracking.

Reverting that portion of my previous commit.
2017-05-05 16:58:17 -07:00
Andrew
01e25bd5c7 Fix max_swapchain_images and do some additional cleanup
When max_swapchain_images was originally added it worked properly,
but was subsequently broken by using the value to specify the number
of buffers allocated.

Due to how the dispmanx driver works, only 2 buffers are ever actually
used, so the 3rd buffer in the "swapchain" ended up doing nothing.

Fix this by restoring it to the original intent, that is, if
max_swapchain_images <= 2 wait for vsync after the flip (reducing
lag), otherwise wait at the last possible moment (increasing lag).

Additionally, fix up some unnecessary void* usage where type safety
could be maintained.
2017-05-04 18:45:59 -07:00
Andrew
a1d094e64e Minor race fix and small cleanup to dispmanx_gfx
It's unlikely it was causing issues, but another race existed in the
dispmanx driver, it incremented the pending page count after sending the
update request.

If a context switch happened between sending the update and incrementing
the page count, the vsync callback would decrement it from 0 and cause
the uint to overflow.

Throw in a minor C89 fix and some whitespace fixups too.
2017-04-29 17:09:07 -07:00
Andrew
301a094ef9 Avoid potential dispmanx_gfx driver lockup
The dispmanx driver had a small race wherein if the vsync completed
between checking for a free page and waiting on the condvar, it would
hang forever waiting for a condition that would never fire.

I'm hoping this is what was causing the triple buffering lockups. In
my testing with it re-enabled and this fix, things are stable (and
much more performant than with triple buffering disabled).
2017-04-28 20:24:36 -07:00
Andrew
253c8cd997 Revert "DISPMANX: Disable triple buffering for now, for stability reasons."
This reverts commit 0b75671c21ec1e891779031b6435ad18debe3e60.
2017-04-28 20:20:43 -07:00
twinaphex
2a13af52fc Revert "video_init function - video_info_t should not be const -"
This reverts commit c8bcbad4a7e06a9425a6984fd09d066c17ec682d.
2017-04-24 12:25:14 +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
vanfanel
0b75671c21 DISPMANX: Disable triple buffering for now, for stability reasons. 2017-02-12 19:27:59 +01:00
twinaphex
93812f58ba We don't need the settings variable here 2017-01-24 14:02:09 +01:00
vanfanel
ae3cdaccb9 DISPMANX: Add missing include and remove redundant one. 2017-01-24 13:58:55 +01:00
The Last Cabra
0e542037d8 Merge branch 'master' into master 2017-01-23 15:16:19 +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
vanfanel
7ae7e2eaee DISPMANX: now waiting for free pages after issuing flip, instead of before, to avoid input lag. 2017-01-20 14:59:14 +01:00
twinaphex
fe84312340 Add some header includes 2017-01-19 17:20:42 +01:00
twinaphex
0d33888a24 (dispmanx_gfx.c) Cleanups 2017-01-19 16:50:09 +01:00
twinaphex
d010a852e4 Call menu_driver_frame once per video_frame call 2017-01-18 22:20:47 +01:00
twinaphex
a6a4808e94 Refactor frame monitor code 2017-01-18 17:41:27 +01:00
vanfanel
5a1e8d55fb DISPMANX: Put guard back in to avoid potential lockups! 2017-01-15 13:47:30 +01:00
vanfanel
869a050a18 DISPMANX: implement pitch alignment for better videocore blitting performance 2017-01-14 23:01:05 +01:00
vanfanel
8640522073 DISPMANX: remove commented line 2017-01-14 15:56:54 +01:00
vanfanel
da640aaa28 DISPMANX: Honor swapchain setting properly 2017-01-14 15:54:20 +01:00
vanfanel
f0c2826994 DISPMANX: Fix refreshrate calculation by updating menu surface asynchronously 2017-01-14 14:38:18 +01:00
Matthew Wolff
f6284721d8 Fix forgotten parameter of video_monitor_get_fps 2017-01-12 23:40:58 -06:00