Commit Graph

218 Commits

Author SHA1 Message Date
LibretroAdmin f6006ae6ca Style nits 2025-02-12 10:17:35 +01:00
LibretroAdmin 72efcab3e7 Silence more warnings 2025-02-09 21:11:35 +01:00
LibretroAdmin f9fa557a95 Some refactors to make some video driver functions less dependent
on passing around the settings_t pointer
2025-02-09 18:23:42 +01:00
Antonio Orefice 2a56a827e8
Add Frametime Uniforms (#17155)
* Initial implementation of CoreAspect uniform

* float -> float_t

* Possibly fix wii_u building

* vulkan: use float instead of float_t;

* slangp: Advertise support of CoreAspect uniform
by defining _RARCH_HAS_COREASPECT_UNIFORM early in the shader source, just after "#extension GL_GOOGLE_cpp_style_line_directive : require"

* CoreAspect + glsl fix: use glUniform1f()

* Add CoreAspectRot uniform.
It reports CoreAspect value or 1/CoreAspect when the content is rotated by 90 or 270 deg.

* Fixed stupid typo

* Just use _HAS_COREASPECT_UNIFORMS to check for CoreAspect uniforms support (was _RARCH_HAS_COREASPECT_UNIFORMS)

* Rename CoreAspect, CoreAspectRot, _HAS_COREASPECT_UNIFORMS to OriginalAspect, OriginlAspectRot, _HAS_ORIGINALASPECT_UNIFORMS

* GLCore: void Pass::build_semantic_float needs glUniform1f.
...how on earth did it worked for UBO !?

* d3d10,11,12, wrong function called by overlook.

* Add test shader, will remove that before PR

* Fix metal rotated aspect reporting

* remove test shader

* Fix C89 Build

* Use OriginalAspectRotated instead of OriginalAspectRot

* Add CoreFPS and FrameTimeDelta Uniforms.
_HAS_ORIGINALASPECT_UNIFORMS is (#)defined and can be used to query for them.

* add test shader

* remote test shader

* Wrong paste.

* gx2: use float

* wrong indentation

* resolved merge conflict

* fix indentation

* Fix comment/Formatting

* Change uniform name from CoreFPS to OriginalFPS

* underliyng references: core_fps -> original_fps
2024-11-12 19:50:59 -08:00
Antonio Orefice da5ecaa45a
Add OriginalAspect and OriginalAspectRot uniforms (#17123)
* Initial implementation of CoreAspect uniform

* float -> float_t

* Possibly fix wii_u building

* vulkan: use float instead of float_t;

* slangp: Advertise support of CoreAspect uniform
by defining _RARCH_HAS_COREASPECT_UNIFORM early in the shader source, just after "#extension GL_GOOGLE_cpp_style_line_directive : require"

* CoreAspect + glsl fix: use glUniform1f()

* Add CoreAspectRot uniform.
It reports CoreAspect value or 1/CoreAspect when the content is rotated by 90 or 270 deg.

* Fixed stupid typo

* Just use _HAS_COREASPECT_UNIFORMS to check for CoreAspect uniforms support (was _RARCH_HAS_COREASPECT_UNIFORMS)

* Rename CoreAspect, CoreAspectRot, _HAS_COREASPECT_UNIFORMS to OriginalAspect, OriginlAspectRot, _HAS_ORIGINALASPECT_UNIFORMS

* GLCore: void Pass::build_semantic_float needs glUniform1f.
...how on earth did it worked for UBO !?

* d3d10,11,12, wrong function called by overlook.

* Add test shader, will remove that before PR

* Fix metal rotated aspect reporting

* remove test shader

* Fix C89 Build

* Use OriginalAspectRotated instead of OriginalAspectRot
2024-11-02 04:04:12 -07:00
libretroadmin 14b1af9e1a Revert "Start reducing size of video_shader_pass struct to reduce"
This reverts commit 0ab10f73c2.
2024-09-11 19:17:20 +02:00
libretroadmin 0ab10f73c2 Start reducing size of video_shader_pass struct to reduce
massive size of video_shader struct
2024-09-09 18:28:38 +02:00
libretroadmin 73afe24266 Use C comments instead of C++ comments for C files 2024-07-20 16:16:16 +02:00
MajorPainTheCactus eef34e9461
Added rolling scan line simulation based on the shader subframe feature. This is implemented with a scrolling scissor rect rather than in the shader itself as this is more efficient although may not work for every shader pass - we may need an option to exclude certain passes. The implementation simply divides the screen up by the number of sub frames and then moves the scissor rect down over the screen over the number of sub frames. (#16282) 2024-03-19 08:59:36 -07:00
Ophidon 7b711214a7
Slang Subframe Shaders Feature (#16209)
Adds support for sub-frame shaders to vulkan/glcore/dx10-11-12.

Builds on the concept already present for frame duplication in use for BFI, to present multiple 'sub' frames per real frame to the shaders, so they can run at a higher framerate than the content framerate. Must be enabled via subframe shaders setting under synchronization settings to be active.

Will allow BFI to be implemented inside of the shaders, among any other use for the higher framerate shader authors can devise.

CurrentSubFrame and TotalSubFrames have been available inside the shaders to track what they want to do on an given subframe. TotalSubFrames will always be 1 when the setting is disabled (and when in menu/ff/pause). Framecount will not increment on sub-frames, as it does not for injected bfi frames now. Should not interfere with any existing shaders that do not check for subframes.
2024-02-09 03:12:55 -08:00
Ophidon 72c901a90e
Squashed commit of the following: (#16142)
commit 793d41c303206b43932ddcefd44a45836def55eb
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 23:12:31 2024 -0500

    Build Fix 2

    Move declarations of iterators.

commit c0e959b3d3cd773a66a17cfe034f08eaa53d525a
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 22:57:01 2024 -0500

    Build Fix

    Help string was 14 characters too long for c89.

commit fc5506c7906bf82d6f88b7b0d7e4764d58d90622
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 22:40:45 2024 -0500

    BFI Updates

    Significant BFI updates.

    - Adds BFI to dx10/11/12 in general.

    - Updates existing BFI menu option descriptions to be somewhat more clear in how to use correctly.

    - Adds Variable Strobe length via new 'Dark Frames' bfi sub-choice. Only valid at 180hz and above, as it must work with whole frames.

    - Algorithm to auto select 'decent' Dark Frames choice, for any given selected BFI refresh rate. Will also avoid defaults that can cause Image Retention at any Hz higher than 120. (Impossible to avoid at 120 if you have an affected screen... get an OLED :D ) .

    - Some sanity checking on selecting BFI or the other synchronizations options like Swap Interval > 1, that don't play well with BFI.
2024-01-19 23:11:31 -08:00
sonninnos 2463188fed
(D3D11+12) Improve 'Max Frame Latency' logging (#15911) 2023-11-15 13:18:31 -08:00
libretroadmin bef29c466b Remove unneeded video_driver_set_gpu_device_string/get_gpu_device_string 2023-09-06 03:08:48 +02:00
libretroadmin bc41e0fdf4 video_frame_info - start passing flags 2023-08-16 19:17:23 +02:00
libretroadmin 0a96f9595c Explicit typecasts to bools for flags 2023-08-16 04:18:55 +02:00
GABO1423 0a510d7055
(UWP) Fix d3d12 Driver in Debug Builds (#15567) 2023-08-09 01:37:20 -07:00
sonninnos f1c144ea50
(XMB) Color + background adjustments (#15556)
* (XMB) Color + background adjustments

* (XMB) Improve font selector
2023-08-06 09:17:38 +02:00
libretroadmin 770b9920f5 Cleanups:
* No implicit memsets for texture_image
* Replace some calls with concatenated strlcpys
* Some style nits
2023-07-18 16:46:54 +02:00
libretroadmin 11d5775318 (D3D12) Get rid of some implicit memsets 2023-07-17 23:45:34 +02:00
libretroadmin 62e4779fee (D3D12) Get rid of some implicit memsets 2023-07-17 23:12:40 +02:00
libretroadmin be65a13102 Cut down on update_title code duplication 2023-07-16 08:00:49 +02:00
libretroadmin 5e2bfcbe09 x11_show_mouse and win32_get_video_output_size - get rid of duplicate
code
2023-06-20 11:46:00 +02:00
libretroadmin 631301b3f7 * Cut down on strlcat calls when possible and replace them with clever
usage of strlcpy (when position/offset of previous strlcpy/snprintf call
is known. strlcat implementation in libretro-common makes implicit strlen
call, using strlcpy avoids this
* Reduce a bunch of local char variables by use of said clever usage,
should save up on local stack size usage
2023-06-18 12:06:12 +02:00
libretroadmin d342a4a04a Signedness warning fixes 2023-06-14 23:25:50 +02:00
Grisly Glee 6f0c48b4c4
Clean up gfx driver interface structs (#15379) 2023-06-14 04:42:34 +02:00
libretroadmin 691c09ef09 (Video drivers) Small cleanups/optimizations to render_line - hose
out some variables that are never subject to change
2023-06-03 20:56:19 +02:00
libretroadmin eb509b8d8e get_line_metrics always implemented for font rendering backend, take
out code parts for hypotheticla font rendering backends that don't implement
it
2023-06-03 18:34:47 +02:00
libretroadmin 51a8150e45 Do away with some NULL checks for font rendering backend 2023-06-03 17:21:19 +02:00
libretroadmin c1166ee823 Cleanups 2023-06-01 21:34:34 +02:00
libretroadmin 36cf7f00a8 Cleanups 2023-06-01 19:59:11 +02:00
libretroadmin 0ee2f93ca4 Combine gfx_display files into video drivers 2023-05-31 23:58:06 +02:00
libretroadmin f08958dbc1 Move inline functions to files that actually need them,
move enums at the top of the header files
2023-05-31 21:50:07 +02:00
libretroadmin 7402d6ec94 (D3D11/D3D12) Small cleanups/micro-opts 2023-05-31 20:51:03 +02:00
libretroadmin 4f6010bea7 COmbine font raster files and video driver files 2023-05-31 19:03:45 +02:00
libretroadmin b2582f443f Move macro outside of HAVE_OVERLAY 2023-05-11 17:03:02 +02:00
libretroadmin ced83c41e6 (Font) Less casting 2023-05-07 21:13:44 +02:00
libretroadmin 2304faf7f0 (D3D12) Undo commit a79dc19b6c - allows us to
set RGUI aspect ratio again and internal upscale - going from upscaling
to no upscaling causes a crash though
2023-05-07 05:41:25 +02:00
libretroadmin fe8221a259 (D3D12) Remove unused function 2023-05-06 03:18:11 +02:00
libretroadmin c400fa761c (UI companion driver) Remove unused notify_content_loaded 2023-04-27 03:02:00 +02:00
libretroadmin 08d1b847fd (D3D12) Go through local variables for graphics command list 2023-04-25 14:08:21 +02:00
libretroadmin dcefb6e028 (D3D12) Get rid of the small inline wrapper functions 2023-04-24 18:11:26 +02:00
aliaspider 50b9454f69
d3d12: enable blending when drawing the menu. (#15181) 2023-04-11 06:56:48 +01:00
libretroadmin d48bd7244a Libretro API update - add new context hardware render enums - enables
autodetection of DX12 for PS2 core
2023-04-11 00:54:02 +02:00
aliaspider a79dc19b6c
D3D12: move fence signaling out of d3d12_gfx_sync. (#15179) 2023-04-10 16:37:36 +02:00
aliaspider 0adbd6905f
add D3D12 HW_render support. (#15177) 2023-04-10 01:08:44 +01:00
barbudreadmon 1fb9853a93
(Shaders) pass rotation index to shaders (#15136) 2023-03-26 21:20:27 +01:00
Gabriel Morazán 9b2a4e6c88
(UWP/Xbox) Major Build Overhaul (#15040)
* (UWP) Major Build Overhaul

* (UWP) Add Back Assets

GitHub Desktop is stupid and ignored these files

* (UWP) Fix D3D12 Regression
2023-03-01 14:13:24 +01:00
sonninnos 6622cbb69d
(D3D11/12) Cleanups (#15025) 2023-02-26 13:27:05 +01: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
libretroadmin 6624126885 (MSVC) silence warnings 2023-02-18 17:04:23 +01:00