Commit Graph

50 Commits

Author SHA1 Message Date
twinaphex
d911dd6efc (video_shader_parse.c) Tons of functions here should have been
made static, tons of log spam put behind DEBUG ifdefs
2021-03-24 18:31:20 +01:00
HyperspaceMadness
0c526b6498 Shaders Load Refactor and Fix Referenced Texture Loading
Partial update to work with shaders directly

More Edits

More changes

more shader fixes

More Fixes Compiling, reference load still wrong

Added Feedback & things are working

Logging Fixes

Log Fix

More Fixes

Added Feedback Logging

Fixes for file pathing in Linux

Fix GLCore and Crash in QT Saving

Code Cleanup

Removed Unused Function filepath.c

Code Cleanup
2020-12-26 21:09:27 -05:00
HyperspaceMadness
35b49f3b82 Shader_Increase_Max_Textures_Line 2020-11-22 09:50:24 -05:00
HyperspaceMadness
5008ac6eb0
Merge branch 'master' into Shader_Save_Load 2020-11-10 17:05:23 -05:00
HyperspaceMadness
a5e57aa74d Increase_Shader_Parameter_Count_to_512 2020-11-06 22:42:15 -05:00
HyperspaceMadness
70bf90c5d8 Shader_Preset_Simple_Save_Cleaned_2020_11_01 2020-11-01 09:18:40 -05:00
twinaphex
09f72c1465 Turn function static 2020-09-04 04:07:29 +02:00
twinaphex
be3345b766 Reorder structs for alignment 2020-08-27 22:17:51 +02:00
HyperspaceMadness
7c6bb925c4 Increased Slang Max Params, Textures & Passes 2020-07-05 13:45:58 -04:00
twinaphex
1f553ac1c4 Get rid of menu_shader_set_modified - instead, add a single
'modified' variable to video_shader struct
2020-03-06 17:05:20 +01:00
twinaphex
1105d1019d Reduce some configuration dependencies 2020-02-12 16:13:28 +01:00
twinaphex
6d0286efbd Turn video_shader_parse_type into macro 2020-01-22 14:30:55 +01: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
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
f0f5c32b51 Remove state tracker - legacy code - we can revisit this later
and integrate it in a way so that it scales across all drivers
2019-07-09 07:39:38 +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
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
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
57e11a10e7 Reimplement video_shader_get_type_from_ext 2019-03-13 20:32:19 +01:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
Brad Parker
e4834250b9 Qt: set shader dialog title to current preset/shader name 2018-08-18 12:39:17 -04:00
Brad Parker
560149857b shaders: track the pass for each parameter 2018-08-14 18:46:32 -04:00
Stuart Carnie
411bcf8bdd feat(apple): Metal support for macOS
* includes rgui
* shader support

This is a work-in-progress and there are some bugs and visual artifacts
still to be fixed.
2018-06-20 21:33:45 -07:00
twinaphex
e75992a66f Get rid of HAVE_SHADER_MANAGER 2018-02-25 23:03:39 +01:00
twinaphex
74309e6e1c shader code - Get rid of more hashes 2018-02-25 17:20:22 +01:00
aliaspider
e225e96025 (D3D11) multi-pass shaders: add support for history frames. 2018-02-03 13:29:00 +01:00
aliaspider
e30c7edd8d (D3D11) multi-pass shaders: add support for feed-back textures. 2018-02-02 19:57:45 +01:00
aliaspider
6fe3a31617 (D3D11) multi-pass shaders: add support for wrap modes and lut
mipmapping.
2018-02-02 17:18:41 +01:00
Brad Parker
f087b150c9 Add quick menu option to watch shader files for changes and recompile automatically (Linux only for now) 2018-01-25 15:50:57 -05:00
aliaspider
f34e180b40 (WIIU) custom shader: add support for input textures and most uniforms. 2018-01-09 16:41:01 +01:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
330d8dc59e Cleanups 2017-09-09 00:02:38 +02:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
Hans-Kristian Arntzen
8b14941a94 Refactor out resolve_current_parameters. 2016-08-01 22:10:14 +02:00
twinaphex
8fc8ff4ed9 Use retro_common_api.h 2016-06-03 05:43:49 +02:00
twinaphex
8cb66dd021 Add way to switch back and forth between shader pipeline 2016-04-24 22:03:39 +02:00
twinaphex
8a90e2777c Rename GL_SHADER_STOCK_BLEND to VIDEO_SHADER_STOCK_BLEND 2016-04-16 01:50:20 +02:00
Hans-Kristian Arntzen
adbf9fed16 Vulkan implementation. 2016-02-16 20:42:02 +01:00
twinaphex
54f46f4ee3 Update headers 2016-01-10 04:41:52 +01:00
Monroe88
e4894ded6d (video_shader_parse.h) Increase max parameters to 128 2015-12-23 19:39:09 -06:00
Twinaphex
e8d266cb9d Revert "Revert "Add support for shader pass feedback."" 2015-08-30 18:37:41 +02:00
Twinaphex
ad1825ca50 Revert "Add support for shader pass feedback." 2015-08-30 18:21:07 +02:00
CautiousAlbino
aee5e74001 Add support for shader pass feedback. 2015-08-30 16:23:55 +02:00
twinaphex
d78437b5a0 Increase GFX_MAX_SHADERS to 24 2015-06-22 21:12:25 +02:00
twinaphex
da88bcdd91 Rename gfx_shader* to video_shader* 2015-01-19 21:24:08 +01:00
twinaphex
b0548e1329 Properly namespace video_shader_parse.c functions 2015-01-19 21:09:39 +01:00
twinaphex
058900ac9f Rename shader_parse.c to video_shader_parse.c 2015-01-12 23:42:50 +01:00