Commit Graph

184 Commits

Author SHA1 Message Date
twinaphex 125a4e3c43 (PS3 Cg) Fixed crash at game start - Cg state was never properly
deinited for PS3 before and we relied on a very dirty hack to set
CgContext to NULL - we can get rid of all that crap now.

PS3 build is now 'fixed' - only thing remaining is that we should
have a mechanism inside the menu to 'reinit' any graphics assets that
were previously set before we lost the state (for instance - RMenu
has one texture image it loads at init_assets time).
2014-05-29 01:36:41 +02:00
Themaister f1db922c26 Add sanity check for Cg/GLSL attrib indices. 2014-05-28 19:30:36 +02:00
Themaister b88c678213 Don't make Cg argv static. 2014-05-26 18:47:49 +02:00
Themaister d304907e7f Set up shader defines for aliases. 2014-05-26 18:47:49 +02:00
Themaister dab36b5870 Support aliased pass names from CGP/GLSLP. 2014-05-26 18:47:49 +02:00
Themaister b0e014adc6 Expose currently selected shader via poke interface. 2014-05-26 18:47:49 +02:00
Themaister 83b37812b8 Set parameter uniforms. 2014-05-26 18:47:48 +02:00
Themaister 4722b6af75 Experiment with shader parameters. 2014-05-26 18:47:48 +02:00
Themaister 25e56d8db0 Kill support for XML shaders.
Long overdue ...
2014-05-25 17:16:45 +02:00
Themaister 59c64f9c5a Fix off-by-one error with PASSPREV.
Fix include bug in cg2glsl.py.
2014-05-16 16:17:02 +02:00
Themaister 7559ca12ef Refactor sRGB FBO handling a bit. 2014-05-11 19:35:54 +02:00
Themaister bc8bb13050 Add mipmapping and sRGB FBO support. 2014-05-11 13:39:04 +02:00
twinaphex b2b5c6daec (Image) Put image functions through abstract interface
(Image) Add image_driver to retroarch.cfg to specify image driver to use
(Menu)  Add Image Driver to Drivers section
2014-05-10 20:26:58 +02:00
TroggleMonkey c15d188ecf Refactored duplicate Cg/GLSL LUT texture loading code into shader_common.c.
Fixed a bug where "Apply Shader Changes" in RGUI saved/set the wrong
texture filter for LUT textures.
Unofficially extended Cg shader spec with an LUT mipmap option:
To mipmap LUT "foo," add 'foo_mipmap = "true"' to your .cgp/.glslp file.
Mipmapping is currently implemented for the OpenGL driver only.
2014-05-08 13:41:04 -04:00
twinaphex 39c1ec4672 Pass data param to more shader functions 2014-03-07 05:51:56 +01:00
twinaphex ea88399281 (XDK D3D) Refactor initing code completely - make it more inline
with PC D3D driver
2014-03-07 05:31:24 +01:00
twinaphex 68a6da85b7 (Cg) Remove useless forward declaration 2014-03-04 17:13:50 +01:00
twinaphex fcf30143b4 (PS3) Change HAVE_RGL to HAVE_GCMGL 2014-02-25 22:01:46 +01:00
twinaphex fd7f4d45cd Move image files to gfx/image/ 2014-02-25 21:24:15 +01:00
twinaphex 0a15a17d44 Update years on all license headers 2014-01-01 01:50:59 +01:00
Themaister 0d3428ad15 Add texture_image_free().
Cleans up deinit code for textures.
2013-12-31 19:16:29 +01:00
Themaister 7aa8b40759 Fixup C89 for loops. 2013-10-22 21:37:56 +02:00
Themaister 551fd27204 Add support for wrapping modes.
Not terribly useful atm due to POT, but at least it's there.
Has some use mostly with LUTs ... NPOT + REPEAT requires extension on
GLES2 at least.
2013-08-16 00:30:54 +02:00
Themaister 6b4924c844 Be more conservative about texture memory usage. 2013-08-11 00:56:53 +02:00
Themaister b292caf92b Experimental support for PassPrev/PASSPREV.
Allows to access passes in a "negative index"
way. Helps stitching together multipass shaders from
other multipass shaders.

Also adds new, cleaner symbols, IN.mvp_matrix, IN.tex_coord, etc.
2013-08-11 00:56:00 +02:00
Themaister 79275b28ff Fallback when initial shader init fails. 2013-06-05 10:44:27 +02:00
Themaister 9406b0a771 More explicit logging of FBO errors. 2013-05-18 16:51:10 +01:00
Themaister 6dd7ea935e Add GL_SHADER_STOCK_BLEND.
Replace stock shader with a special shader which does not apply color.
This is a necessary on Android.
2013-04-20 15:46:50 +02:00
Themaister b2fba94850 Don't load state tracker if not necessary. 2013-04-16 22:30:28 +02:00
Themaister 2b0697205d Set LUT uniforms for vertex shader as well. 2013-04-16 14:27:24 +02:00
Themaister 2c8ddeb109 Add gfx_shader_resolve_relative.
Translates relative paths (from CGP) into absolute paths,
suitable for loading files, and saving cgp some place else.
2013-04-15 23:48:25 +02:00
Themaister a148abf131 Fix build.
Need to include config.h.
2013-04-13 00:01:28 +02:00
twinaphex b7ebfa6945 (GL/PS3) Get rid of gl_cg_reinit - no longer needed anymore 2013-04-12 22:19:37 +02:00
twinaphex a6db35875d (Cg/HLSL) Since everything goes through the shader backend interface now,
we can drop public scope on all the functions and make them static
instead
2013-04-12 21:25:16 +02:00
Themaister 1e9e703375 Add support for CGP/GLSL.
Serves to unify shader support across the board
on platforms which cannot use Cg (EGL, GLES).
Spec is exactly the same as CGP except that extension is
.glslp. Expected extension on individual shaders are .glsl.
2013-04-10 22:38:45 +02:00
Themaister c8fa2483bb Fix rotation when using Apply Shader.
load_preset() duped prg[0] too early, before
prg[0].mvp was set. This caused MVP to not be set correctly,
not allowing rotation to work correctly when using pass-through
last shader.
2013-04-10 20:55:48 +02:00
twinaphex 6aadc5f2c2 (Cg) Remove Cg menu shader 2013-04-10 11:28:44 +02:00
Themaister f88ea04c28 Remove fixed shader index in set_shader. 2013-04-07 13:00:21 +02:00
Themaister 0c0a9b4ddb Fix Win32 build. 2013-04-07 02:02:41 +02:00
twinaphex 142c6335c9 (Cg/PS3) Embed menu shader 2013-04-06 21:05:30 +02:00
Themaister 7a20cfa79c Don't crash if Cg is init with NULL. 2013-04-06 20:50:22 +02:00
twinaphex 9a4ddfd2e0 Forgot a conditional check in shader_cg.c before doing freeing of
menu_cg_program - some other cleanups to do with setting stock
shaders in Cg
2013-04-06 16:29:00 +02:00
Themaister e649db253c Reintroduce CGP refactor.
Fix several issues that caused crashes.
2013-04-06 12:00:10 +02:00
twinaphex eb0feac9e3 (PS3/All) Purge fixed-style shaders again - this time avoiding
breakage on PS3. Maister -you will need to redo shader_parse.c
again though - and this time I need to test it on PS3 to avoid
a regression that happened two pages prior again
2013-04-06 05:46:09 +02:00
twinaphex 0340f2043c Revert "Major refactor to CGP parsing."
This reverts commit 211e17250c.
2013-04-06 04:37:17 +02:00
twinaphex 8396f71004 Revert "Don't dump frame_count_mod unless needed."
This reverts commit eeddfea425.
2013-04-06 04:37:05 +02:00
twinaphex 881e7a299d Revert "Don't compile in debug dump."
This reverts commit a5dfbb8a85.
2013-04-06 04:36:54 +02:00
twinaphex 2484c4e526 Revert "(Cg) Take out second_pass_shader / FBO functionality - everything"
This reverts commit deeaf981f7.
2013-04-06 03:55:17 +02:00
twinaphex 820fcbaa07 Revert "Don't set prg[2] with load_plain()."
This reverts commit a19d1e9776.
2013-04-06 03:53:27 +02:00
Themaister a19d1e9776 Don't set prg[2] with load_plain(). 2013-04-06 00:22:27 +02:00