Commit Graph

160 Commits

Author SHA1 Message Date
twinaphex
dde7c28730 (menu_shader.c) Cleanups 2019-09-23 04:27:03 +02:00
twinaphex
ab515daa0c Try to get rid of file_path_str 2019-09-18 18:12:57 +02:00
LazyBumHorse
e97a31a46c fix shader loading and saving in content-less cores 2019-08-28 21:15:37 +02:00
LazyBumHorse
886d538c48 implement video_shader_delay setting (in ms), which delays auto-shaders 2019-08-27 16:01:48 +02:00
LazyBumHorse
9b71340959 finish up shader menu changes, add 'remove presets' to Qt 2019-08-24 16:43:52 +02:00
twinaphex
b66c5581db Add Shader Preset Save / Remove 2019-08-24 01:44:50 +02:00
LazyBumHorse
813a5cc370 fix edge case where resetting shader parameter wasn't counted as a modification 2019-08-22 18:08:58 +02:00
LazyBumHorse
a882901e39 save unmodified auto-shaders as a reference instead of a copy, see:
- implement #reference directive for auto-shaders
 - replace usual preset saving and loading functions with video_shader_read_preset() and video_shader_write_preset()
 - apply saved presets automatically for console menus
 - move auto-shader saving logic from menus into menu_shader.c menu_shader_manager_save_auto_preset()
 - refactor menu_shader_manager_save_preset() into menu_shader_manager_save_preset_internal()
2019-08-22 16:57:28 +02:00
twinaphex
db043a7fd7 Less references to internal pointer 2019-08-18 17:04:14 +02:00
twinaphex
b13ee8485f Start passing shader pointer to menu_shader.c functions 2019-08-18 16:59:09 +02:00
twinaphex
9c81253226 (menu_shader.c) Style nits/cleanups 2019-08-18 16:33:36 +02:00
LazyBumHorse
288c673c61 fix not being able to apply shader if none was loaded before 2019-08-18 10:11:01 +02:00
LazyBumHorse
719555bae1 Overhaul shader loading logic, add --set-shader CLI option 2019-08-17 15:20:51 +02:00
jdgleaver
6ead35b37c (Menu) Prevent undefined behaviour when failing to load shaders 2019-08-08 17:02:32 +01:00
LazyBumHorse
f8b92770d4 simplify video_shader_read_conf_preset() calls 2019-07-21 18:15:28 +02:00
LazyBumHorse
2245af23e9 much improved handling of relative shader paths
- save texture paths in relative format as well
 - always write portable relative paths on Windows using '/' instead of '\'
 - remove an ancient piece of code that could sometimes fail loading relative paths
 - fix absolute path handling between different drives for Windows
 - integrate video_shader_resolve_relative() into video_shader_parse_* functions
2019-07-20 18:29:46 +02:00
twinaphex
4ba98f2af5 Remove unused variables 2019-07-18 12:16:28 +02:00
twinaphex
41a2fabb4e Create config_file_new_from_path_to_string 2019-07-18 12:03:50 +02:00
twinaphex
a6d6c21e52 Rename config_file_new_null to config_file_new_alloc 2019-07-17 19:50:32 +02:00
twinaphex
0c31437c24 Create config_file_new_null 2019-07-17 18:27:53 +02:00
twinaphex
22c5cafe6a menu_shader_manager_init - cleanups 2019-07-16 20:29:15 +02:00
twinaphex
85fdd5fbd1 (menu_shader) use config_file_from_string 2019-07-16 19:24:42 +02:00
twinaphex
eee7430ffa Fix CXX_BUILD 2019-06-19 00:10:03 +02:00
LazyBumHorse
c20c67bd3a proper shader compatibility checks
- move shader flags from the video drivers to the context drivers
 - rework config_load_shader_preset() from configuration.c into retroarch_load_shader_preset() in retroarch.c with proper compatibility check
 - implicitly call retroarch_load_shader_preset() in retroarch_get_shader_preset() once per core/content life cycle
 - use video_shader_is_supported() instead of video_driver_test_all_flags() where appropriate
 - remove GFX_CTX_FLAGS_NONE because it is meaningless
2019-06-18 13:46:41 +02:00
LazyBumHorse
692dc9f6a9 refactor shader checks affected by last commit and more:
- gl.c: refactor backend fallback into more general gl2_get_fallback_shader_type
 - d3d9-12, gl_core, gx2_gfx, gl, vulkan: more consistent shader init and `set_shader` behavior
 - configuration.c: remove check_shader_compatibility
 - shader_glsl.c, shader_gl_cg.c: use `video_shader_get_type_from_ext`
 - shader_gl_cg.c: add shader type check with fallback to stock like in shader_glsl.c
 - menu_shader.c: use `enum rarch_shader_type` instead of `unsigned`
 - video_shader_parse.c: add `video_shader_to_str` for easier logging
 - remove `type` from `struct video_shader`, which was always set to CG and wrongly used in lang_process.cpp's `slang_process()` (has no further consequences because the code is unused)
2019-06-18 13:44:19 +02:00
LazyBumHorse
42e35c825f refactor some video_shader_parse functions
- video_shader_parse_type()'s fallback only worked for NULL paths and was wrongly used, now returns RARCH_SHADER_NONE like video_shader_get_type_from_ext().
 - video_shader_get_type_from_ext() should not be checking video driver flags, this is instead done by video_shader_is_supported()
 - video_driver_get_all_flags() did not actually 'get' flags, changed to video_driver_test_all_flags()

workaround for crash due to glcore not always using at least OpenGL 3.2
2019-06-18 13:12:56 +02:00
LazyBumHorse
6514b80ff2 Revert "allow saving and properly loading 0 pass shader presets"
This reverts commit b54a360ab8.
2019-06-16 23:05:41 +02:00
twinaphex
f60306b232 Rename read_conf_cgp/write_conf_cgp to
read_conf_preset/write_conf_preset
2019-06-15 09:00:35 +02:00
LazyBumHorse
b54a360ab8 allow saving and properly loading 0 pass shader presets 2019-06-09 21:34:00 +02:00
LazyBumHorse
2816730b2f make shader presets use relative paths
Also change fill_pathname_resolve_relative() to apply path_resolve_realpath() as well
2019-06-07 16:11:06 +02:00
twinaphex
662976608a (Shader) Fix regression - when a game was loaded with a core
preset, it would load the preset inside shader slot 1 (menu)
instead of properly setting each pass
2019-04-30 19:26:36 +02:00
twinaphex
bc2bdd5734 config_file_read not needed anymore 2019-04-30 13:37:10 +02:00
twinaphex
8ea1305d75 (menu_shader.c) Cleanups 2019-04-28 05:26:56 +02:00
twinaphex
955a149ce9 Use config_file_read where we can assume we are reading a file 2019-04-22 01:56:24 +02:00
twinaphex
a7abd77141 (menu_shader) Remove some unnecessary functions 2019-04-13 06:40:21 +02:00
hizzlekizzle
255dc9d932
don't alphabetize shader presets
It makes it harder to edit them later.
2019-03-31 08:53:36 -05:00
Brad Parker
5bedd981ec allow shaders when menu is disabled 2019-01-06 23:03:28 -05:00
orbea
849259d8f6 libretro-common: Sort config file conditionally.
This allows optionally sorting configure files and is needed to fix the
order of inputs in the autoconfig profiles which should not be sorted
alphabetically.

Fixes https://github.com/libretro/RetroArch/issues/7873
2019-01-03 15:28:32 -08:00
twinaphex
f94d7e07af Cleanups 2018-10-06 04:20:54 +02:00
Brad Parker
88cecc521a Qt: hopefully parameters are fixed now part 2 2018-08-22 22:51:50 -04:00
twinaphex
e5ec7d0fda (Menu) Cut down on some code duplication 2018-05-14 06:18:57 +02:00
twinaphex
72dc03a1c6 Try to fix Coverity warnings 2018-03-19 06:58:36 +01:00
twinaphex
d991c7d471 Fix warning 2018-03-09 15:44:11 +01:00
Twinaphex
ae6e410de1 Remove unused variables 2018-03-01 22:28:26 +01:00
twinaphex
7da491d009 * menu_shader.c - cleanup
* Nothing uses HAVE_SHADERS define anymore, so get rid of it* Nothing
uses HAVE_SHADERS define anymore, so get rid of it* Nothing uses
HAVE_SHADERS define anymore, so get rid of it* Nothing uses HAVE_SHADERS
define anymore, so get rid of it* Nothing uses HAVE_SHADERS define
anymore, so get rid of it* Nothing uses HAVE_SHADERS define anymore, so
get rid of it* Nothing uses HAVE_SHADERS define anymore, so get rid of
it* Nothing uses HAVE_SHADERS define anymore, so get rid of it
2018-03-01 17:19:19 +01:00
twinaphex
f0f3df3043 Get rid of some menu shader functions 2018-02-27 05:07:34 +01:00
twinaphex
e75992a66f Get rid of HAVE_SHADER_MANAGER 2018-02-25 23:03:39 +01:00
twinaphex
dd91373f35 Remove unused function 2018-02-25 22:08:16 +01:00
twinaphex
8d7911976c Refactor menu_shader.c 2018-02-25 20:42:44 +01:00
twinaphex
74309e6e1c shader code - Get rid of more hashes 2018-02-25 17:20:22 +01:00