Commit Graph

18 Commits

Author SHA1 Message Date
LibretroAdmin a9b0e45013 (glslang_utill.c) One less string copy per iteration 2025-01-17 03:01:59 +01:00
libretroadmin c477956f23 Cleanups/style nits 2024-12-25 22:52:12 +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
Antonio Orefice e1b2e29d51
slang shaders: add support for __has_include like C++17 macro. (#17109)
* slang shaders: add support for __has_include like C++17 macro.
This adds a new #pragma include_if_exist "filename" directive that acts like #include statements,
but does not return error if the file does not exists.

* removed unuseful define
2024-10-21 14:45:44 -07:00
libretroadmin d60d320e76 Simplified parameter parsing to have all shader formats use the same slang method
(when HAVE_SLANG and HAVE_SPIRV_CROSS are defined) - backport of HyperSpaceMadness' PR
2024-09-08 15:25:40 +02:00
Tony 6d5d2e722d
Logging cleanups (#13579) 2022-01-31 18:05:23 +01:00
Mark W. Kidd 2b3dfeb10c standardize include path for config.h 2021-08-18 18:54:40 -04:00
twinaphex 544a17926b Use path_basename_nocompression where we are sure we are not
dealing with a filename with a compressed archive hash
2021-04-11 17:44:41 +02:00
twinaphex 159c03cb34 Bump up version (but don't tag yet) 2021-03-27 02:22:39 +01:00
twinaphex e8a0ea15cd Improve glslang_read_shader_file somewhat 2020-08-26 23:46:16 +02:00
twinaphex 044209bc5a Create string_separate_noalloc 2020-08-26 23:46:16 +02:00
twinaphex f8b8f2a07d (slang) Cut down on code duplication 2020-08-03 18:37:07 +02:00
twinaphex 86d302099e Move build_vec4 to glslang_util.c 2020-08-03 18:34:33 +02:00
twinaphex 808c00db41 (drivers_shader) Move static functions to top of files 2020-06-26 18:54:30 +02:00
twinaphex da60c1bb96 Header cleanups 2020-03-05 14:06:04 +01:00
twinaphex a4564b8939 Move C oriented code from slang_reflection.cpp to glslang_util.c 2020-01-22 19:36:49 +01:00
twinaphex aaeff6c888 Move C code over to glslang_util.c 2019-08-18 18:01:21 +02:00