2911 Commits

Author SHA1 Message Date
libretroadmin
44238e909f Consistent viewport naming conventions 2024-12-24 22:50:51 +01:00
libretroadmin
442b9bc3da Syntax style nits 2024-12-23 05:44:40 +01:00
libretroadmin
b3e5c578b3 Faster shader capabilities queries 2024-12-22 21:58:51 +01:00
libretroadmin
2809421d4e Revert "static variables are initialized to '0' automatically as per C rules"
This reverts commit 2a0984b6e47b5f714ce4a360afeaadafdb634c36.
2024-11-19 03:03:13 +01:00
libretroadmin
2a0984b6e4 static variables are initialized to '0' automatically as per C rules 2024-11-18 15:33:34 +01:00
sonninnos
e09039c77f
Disabled menu buildfixes (#17184)
* Disabled menu buildfixes

* Skip thumbnail features with menu disabled
2024-11-14 13:44:50 -08: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
sonninnos
8ee6561a26
Vulkan: Use separate matrix for menu (#17134) 2024-10-29 12:03:37 -07:00
sonninnos
c847b02206
Integer overscale GPU screenshot crash fixes (#17118) 2024-10-26 06:45:45 -07:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
sonninnos
1cc2210185
Vulkan: Negative viewport position correction (#17063) 2024-09-29 11:12:12 -07:00
Eric Warmenhoven
b557bc9523
Fixing compiler warnings (#17001) 2024-09-14 13:11:20 -07:00
libretroadmin
14b1af9e1a Revert "Start reducing size of video_shader_pass struct to reduce"
This reverts commit 0ab10f73c29f25a7e4763accfdf80ffd61208803.
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
c095b420d1 Move GL3 C code over to C file - put rest in extern "C" codeblock 2024-07-22 01:43:21 +02:00
libretroadmin
afc9cb509a CXX_BUILDFIX buildfixes 2024-07-20 19:42:45 +02:00
libretroadmin
73afe24266 Use C comments instead of C++ comments for C files 2024-07-20 16:16:16 +02:00
libretroadmin
e543aa25ae Silence some warnings 2024-07-20 15:46:26 +02:00
Joseph C. Osborn
6701c0999b fake negative x/y viewport positions under vulkan
Since Vulkan doesn't support negative x or y viewport positions, this
patch concatenates a translation matrix to the projection matrix used in
Vulkan rendering. In this way, if a negative x or y coordinate would
be necessary, we can instead use a 0 coordinate and a
leftwards/upwards translation to achieve the same effect.  This seems
to work alright with overlays, so as far as I can tell this patch
seems sufficient to get the behavior we want?
2024-07-18 08:22:32 -05:00
ScoochAside
73ba25cea1 Fixed the same cropping issue but on the vertical axis 2024-07-13 13:04:02 -05:00
ScoochAside
4203c359a4 Removed unnecessary casts 2024-07-13 13:04:02 -05:00
ScoochAside
520199c10a Use more logical variables.
Added more resource cleanup, which fixes an unintended resizing bug that happened after taking a GPU screenshot.
2024-07-13 13:04:02 -05:00
ScoochAside
6a29b3b717 Fix issue #16776 2024-07-13 13:04:02 -05:00
ScoochAside
6d2393c5f9 Added error logging for unsupported cases 2024-07-08 14:09:30 -05:00
ScoochAside
e08826ee9b Removed unintentional newline 2024-07-08 14:09:30 -05:00
ScoochAside
f63e6a959c Don't do anything if HDR is enabled
The current implementation does not produce the right results if HDR is enabled so let's bail out.
2024-07-08 14:09:30 -05:00
ScoochAside
22057bbb05 Added some pixel format checks
In my limited testing, the texture is always in the R8G8B8A8 format, but, just incase, added a check for it and if it isn't then bail out.
2024-07-08 14:09:30 -05:00
ScoochAside
d6773ced37 Fix issue #6427 2024-07-08 14:09:30 -05:00
libretroadmin
58e2e581ec Silence warnings 2024-06-26 15:19:00 +02:00
libretroadmin
db550e6ffe (D3D8) Fix build 2024-06-26 15:13:37 +02:00
Joseph C. Osborn
00add4bb37 Fix build errors on wiiu, directx 2024-06-25 08:18:39 -05:00
Joseph C. Osborn
2805694378 Refactor viewport handling/aspect ratio scaling.
This mirrors the use of video_viewport_get_scaled_integer for
non-integer scaling at various aspect ratios.  Two variants are
provided, one with implicit device and desired ratios and one with
explicit ratios.

Also added a flag to video_viewport_get_scaled_integer to indicate the
direction of positive y.
2024-06-25 08:18:39 -05:00
libretroadmin
f423b62500 (Wii) Silence warning 2024-06-14 23:24:11 +02:00
zoltanvb
926ba5c843 Force fullscreen in case of KMS display
Change GL2, GL3 and Vulkan drivers to behave as fullscreen if context driver
(such as KMS/DRM or KHR) does not support windowed mode at all.
Take it into account also for refresh rate switch.
2024-06-14 15:44:38 -05:00
Viačasłaŭ Chalikin
1e9db89154 Fix reinitialization of the threaded gl drivers 2024-05-26 21:32:29 +02:00
libretroadmin
3e85a17d7a iFix warnings picked up by -fanalyzer 2024-05-23 23:50:23 +02:00
Carlo Refice
fed2e10d97 Implement HDR readback 2024-05-17 14:10:29 -07:00
Viačasłaŭ Chalikin
9ad2cc2bc6
Fix crash when using threaded video (#16518)
for Mesa 23.2 and later
2024-05-13 07:24:51 -07:00
Carlo Refice
adaa19cbf7
vulkan: Add support for A2R10G10B10 HDR format (#16435) 2024-04-18 07:34:46 -07: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
João Henrique
8e57273593
Fix gl2.c OpenGL ES detection. (#16313)
This fixes a recurrent bug where context initialization fails due to the major/minor being both set as 0, causing an OpenGL ES 1.1 context to be created.
2024-03-03 07:57:47 -08:00
Mats
6de0fd4362
Fix HDR w/ Vulkan driver after reinit (#16270) 2024-02-21 08:39:26 -08: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
Eric Warmenhoven
79e43e2bd4
Fix many warnings (#16180)
Also change iOS/tvOS to use system zlib instead of compiling it in
2024-01-31 09:15:14 -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
Eric Warmenhoven
0c1ee70ca0
iOS: Fix xrgb8888 in gl driver (#16013) 2023-12-18 01:18:03 -08:00
sonninnos
2463188fed
(D3D11+12) Improve 'Max Frame Latency' logging (#15911) 2023-11-15 13:18:31 -08:00
Eric Warmenhoven
7237b6acfc
Enable HDR support in iOS. (#15871)
* Enable HDR support in iOS.

* Enable HDR support in tvOS.
2023-11-06 00:50:14 -08:00
LibretroAdmin
466e82f55d
Update sdl2_gfx.c 2023-10-31 12:01:00 -07:00