Commit Graph

2919 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
BinBashBanana ed1810de86
Emscripten improvements (#17422) 2025-01-29 05:29:16 +01:00
LibretroAdmin b211adaaca Function argument name standardization 2025-01-17 19:55:32 +01:00
zoltanvb 65b9b1cd25
Fix compile failure (#17366) 2025-01-07 17:42:25 +01:00
LibretroAdmin 6be18bfee9 Standardize naming of local len variables 2024-12-30 14:27:24 +01:00
LibretroAdmin 1e656261b0 Local len variables need to have '_' prefix 2024-12-30 14:03:58 +01:00
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 2a0984b6e4.
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 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 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