Commit Graph

5597 Commits

Author SHA1 Message Date
53398ca5d8 Remove GLSL option from video options 2012-12-24 12:22:02 -06:00
9209253e0d Initial removal of Nvidia CG. Still some more cleanup to go 2012-12-24 11:09:52 -06:00
cf8f936abb fix efb2ram decoder 2012-12-19 23:43:05 +01:00
85ac76e8e2 fix gcc compilation 2012-12-19 23:42:22 +01:00
57426ee726 Forced commit 2012-10-13 13:00:04 -05:00
3f0d7312fa A couple missed lines on the rebase. 2012-10-13 12:43:00 -05:00
10666a9b87 More 'stuff' 2012-10-09 23:56:00 -05:00
eb7a0c485a More "stuff" for SS, also a small fix in the program shader cache cache setup." 2012-10-09 23:56:00 -05:00
71f6b1eec6 Change 'stuff' 2012-10-09 23:56:00 -05:00
03b09bed5d Get the program binary type correctly or else ATI makes massive (~400MB) shader caches. Also, don't need the line in the PixelShaderGen. 2012-10-09 23:56:00 -05:00
2e15440896 Add support for Dual source blending to older ATI cards that don't support 420pack but do support GL_ARB_blend_func_extended. This is more proper as well anyways. 2012-10-09 23:56:00 -05:00
e88d35d1c1 Had a few vec4 and float4(0) calls floating around. 2012-10-09 23:55:59 -05:00
31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -05:00
4a4833e617 default to GLSL instead of Cg 2012-10-09 23:43:22 -05:00
9996f27120 Give OSX users more of a chance of supporting Single pass DSB in the future. 2012-10-09 23:42:41 -05:00
d012c75005 Implement Program shaders cache. Seems to reduce a small amount of stuttering when F-Zero starts. Did it because I can :| 2012-10-09 23:42:41 -05:00
c76593f6a2 Looky, OSX found an issue for me. 2012-10-09 23:42:40 -05:00
7aad45658e Add a GUI option to use GLSL shaders. Also fix a small typo. 2012-10-09 23:42:39 -05:00
7f12daa014 Looks like we make use of fmod, make a GLSL function for it! 2012-10-09 23:41:49 -05:00
3bcec51334 More coding style fixes because I suck at sed 2012-10-09 23:41:48 -05:00
3c6d0fc710 8 spaces indentation -> tabs 2012-10-09 23:41:48 -05:00
5b06bbf87d Use UBOs in every shader. I had missed a few. Only cache Uniform locations if we aren't using UBOs. 2012-10-09 23:41:06 -05:00
5bcbf92f43 Make sure to support everything even if GPU doesn't. 2012-10-09 23:41:06 -05:00
d4a80ca3ec yay, UBOs work 100% now. 2012-10-09 23:41:05 -05:00
1f75ee49bf UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now. 2012-10-09 23:41:05 -05:00
b105d70339 Firin ma lazer 2012-10-09 23:41:05 -05:00
c82b92bfc2 Fix one error. 2012-10-09 23:41:05 -05:00
2fbca145cb Remove bSupportsGLSLLocation since it won't work how I expect it. 2012-10-09 23:41:05 -05:00
4a84c6f742 Add in UBOs, doesn't work yet. Still debugging here. 2012-10-09 23:41:05 -05:00
76e5766a1b Put Vertex Uniforms in to the correct places to get ready for UBOs. 2012-10-09 23:41:04 -05:00
d897491f94 Few compiler errors that got exposed once I got Dual Source Blending working. Seems it isn't working quite 100% either. Good chance I missed something anyway. 2012-10-09 23:41:04 -05:00
d83ead5914 Support Dual Source Blending in OGL plugin with GLSL. 2012-10-09 23:39:16 -05:00
eff019442f Playing through SSBM story made me find this. 2012-10-09 23:37:52 -05:00
b24990ca28 Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now. 2012-10-09 23:37:52 -05:00
cf68cc0c61 Add support for GL_ARB_shading_language_420pack so we don't have to binding sampler locations. Also add support for GL_ARB_separate_shader_objects which doesn't currently work for some reason....investigating. 2012-10-09 23:37:52 -05:00
8058f2f32f Missed one 2012-10-09 23:33:02 -05:00
9064b76deb Shader Compile fixes. Played SMS for two shines. 2012-10-09 23:33:02 -05:00
7cec31dbf3 Almost there. 2012-10-09 23:33:02 -05:00
8123b137aa This is the terrible bit that can't be removed until we use UBOs in the GLSL shaders. 2012-10-09 23:31:31 -05:00
0fc755c4df More stuff 2012-10-09 23:31:31 -05:00
66a5334158 moe 2012-10-09 23:30:48 -05:00
3943840d5c Now CG plays nice with this new stuff. 2012-10-09 23:27:59 -05:00
a357c77257 Add in GLSL setting again.
PS and VS making. Untested and won't work for now.

Add in program shader cache files.

Readd NativeVertexFormat stuffs.

Add in PS and VS cache things.

SetShaders in places.

Fixed EFB cache index computations in OpenGL renderer.

The previous computation was very likely to go out of array bounds,
which could result in crashes on EFB access.

Also, the cache size was rounded down instead of up. This is a problem
since EFB_HEIGHT (528) is not a multiple of EFB_CACHE_RECT_SIZE (64).
2012-10-09 23:23:37 -05:00
3990002250 Optimize JitCache::InvalidateICache by maintaining a "valid blocks" bitset
Most of the InvalidateICache calls are for a 32 bytes block: this is the
number of bytes invalidated by PowerPC dcb*/icb* instructions. Profiling
shows that a lot of CPU time is spent checking if there are any JIT blocks
covered by these 32 bytes (using std::map::lower_bound).

This patch adds a bitset containing the state of every 32 bytes block in
RAM (JIT cached/not JIT cached). Using that, a 32 bytes InvalidateICache
can check in the bitset if any JIT block might be invalidated. A bitset
check is a lot faster than an std::map::lower_bound operation, improving
performance of JitCache::InvalidateICache by more than 100%.

Some practical numbers:

* Xenoblade Chronicles (PAL)
  56.04FPS -> 59.28FPS (+5.78%)
* The Last Story (PAL)
  30.9FPS -> 32.83FPS (+6.25%)
* Super Mario Galaxy (PAL)
  59.76FPS -> 62.46FPS (+4.52%)

This function still takes more time than it should - more optimization in
this area might be possible (specializing for 32 bytes blocks to avoid
useless memcpy, for example).
2012-10-06 01:49:09 +02:00
8cefcaa94c Implement a simple benchmarking mode which logs FPS to a file
Very useful to compare performance between two builds, check the impact of
a configuration option, etc. FPS log is stored in User/Logs/fps.txt and is
reset each time you launch a game. Only enabled if you check the "Log FPS
to file" option in your graphics settings.

Could be improved a bit: currently logs only every 1s (so you can't really
see small variations), maybe output more infos to the fps.txt like
average/stddev (but Excel/Libreoffice/Google Docs can compute that easily
too).
2012-10-04 05:41:02 +02:00
bb8b5936c0 Revert "Partially revert revision d511b506120c."
This reverts commit 08e06b2293.
2012-09-27 18:15:44 +02:00
8fed3b76c8 If setting videobackend back to null strings, Just set it to the front of the list. Fixes loading game specific INI files that don't load back the "default" video backend which is nothing. 2012-09-25 00:47:37 +00:00
41266129ba Should fix issue 5630. 2012-09-24 17:16:34 -05:00
3229bf824c Should actually load the backend when it changes via game INI 2012-09-23 17:54:23 -05:00
f8f8aea577 Allow the user to set graphics backend from Game INI. Zero GUI option available for setting. 2012-09-23 16:02:11 -05:00