Commit graph

7801 commits

Author SHA1 Message Date
Shawn Hoffman
5f296d0be7 refactor ProgramShaderCache::PCacheEntry 2011-12-26 02:58:52 -05:00
Shawn Hoffman
16f9d8e06d Checking GLEW_VERSION_4_0 is superfluous since we check GL_ARB_get_program_binary, and it's a runtime variable anyways. 2011-12-26 00:43:47 -05:00
Shawn Hoffman
4bc14c3473 fix formatting uglies introduced in glsl-master branch 2011-12-26 00:15:54 -05:00
Shawn Hoffman
f59063c8e7 default to GLSL instead of Cg 2011-12-25 22:00:24 -05:00
Ryan Houdek
8266a56486 Missed a line here 2011-12-25 12:44:31 -06:00
Ryan Houdek
b607695103 Add in the Windows fix. 2011-12-25 12:21:31 -06:00
Ryan Houdek
8349cc2551 Only use explicit attribute locations when we are supporting GLSL > 1.2 since we need in/out instead of attribute variable types. This was brought to my attention from MESA. MESA supports GL_ARB_explicit_attrib_location, but yets to support GLSL 1.3, so basically useless extension to MESA right now? 2011-12-24 08:58:51 -06:00
Ryan Houdek
aa2032af2c Write all shaders to disk on emulator stop instead of constantly. Also change pair from u64 to u32. 2011-12-24 02:19:30 -06:00
Ryan Houdek
b90fa37c60 If user doesn't compile with glew 1.6, cut out program binaries so everything still compiles. 2011-12-24 00:37:13 -06:00
Ryan Houdek
9bc6b83fd0 If CG isn't available, still compile and fallback on GLSL 2011-12-24 00:24:13 -06:00
Sonicadvance1
7c558df283 Missed a if, don't want people crashing now do we? 2011-12-21 22:33:33 +00:00
Ryan Houdek
8e0172374c Give OSX users more of a chance of supporting Single pass DSB in the future. 2011-12-21 01:29:29 -06:00
Ryan Houdek
a10656b1b2 Implement Program shaders cache. Seems to reduce a small amount of stuttering when F-Zero starts. Did it because I can :| 2011-12-21 00:15:48 -06:00
Ryan Houdek
31a9b6c322 Go back to using glGetString with GL_EXTENSIONS because glew 1.7 is required to check for newer 4.2 extensions that way. 2011-12-20 23:07:42 -06:00
Ryan Houdek
dc134b9bac Move the GLSL extension checks over here so it is nicer. 2011-12-20 21:55:11 -06:00
Ryan Houdek
f6b33cf0be Add a define back so we work without GLEW 1.6, Also I missed a line when I was fixing binding sampler locations last night when I was tired. 2011-12-19 19:10:05 -06:00
Ryan Houdek
9ce17a43ec There we go, actually found the issue. 2011-12-19 00:15:07 -06:00
Ryan Houdek
768a683f04 This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times. 2011-12-18 23:31:00 -06:00
Ryan Houdek
3513dd7115 Looky, OSX found an issue for me. 2011-12-18 21:06:28 -06:00
Ryan Houdek
636d6a915d Remove this silliness 2011-12-18 01:51:15 -06:00
Ryan Houdek
4342efe712 Some shader programs don't come with Vertex shaders attached, don't try to bind a Vertex Uniform block then. 2011-12-17 01:17:11 -06:00
Ryan Houdek
b837ae25fc Set Sampler values at program make time instead of every frame. Fix an issue when The user had UBO support but not Binding support. 2011-12-17 01:06:55 -06:00
Ryan Houdek
73c3f198f4 Only delete this buffer if we support it. 2011-12-16 23:37:22 -06:00
Ryan Houdek
fe6fb55389 Add a GUI option to use GLSL shaders. Also fix a small typo. 2011-12-16 23:18:24 -06:00
Ryan Houdek
800e1c9e09 Let compiling work on OSX. 2011-12-16 00:00:08 -06:00
Ryan Houdek
9ff48ac6eb Make sure not to try and bind UBO locations when it isn't supported 2011-12-15 15:48:21 -06:00
Ryan Houdek
e85a3d68b0 Looks like we make use of fmod, make a GLSL function for it! 2011-12-11 07:02:13 -06:00
Ryan Houdek
ad13f2d23d Instead of querying the vertex attribute location. Let's bind it to where CG expects it to be as well. Was causing problems when we were trying to activate the components below and they weren't available. This fixes cubivore with GLSL shader. Also any other game that uses 3 normal pointers. 2011-12-11 06:18:01 -06:00
Jordan Woyak
c908e1173d glMapBuffer was slow, go back to glBufferSubData, single combined ps/vs ubo now 2011-12-11 06:11:38 -06:00
Jordan Woyak
a613012d08 try combining vs/ps ubo 2011-12-11 06:02:47 -06:00
Jordan Woyak
5ae1f674f5 make use of glMapBuffer to set ubo data 2011-12-11 05:29:15 -06:00
Ryan Houdek
16b58a8825 Show a bit of information when using GLSL shaders. 2011-12-11 05:15:08 -06:00
Jordan Woyak
bcb2abbcf1 fix stupid indentation 2011-12-11 04:32:57 -06:00
Jordan Woyak
031c523fba have separate variables/functions for VS/PS ubo stuff, array was confusing. 2011-12-11 04:28:02 -06:00
Ryan Houdek
fbef258dab Disable UBO buffer generation if hardware doesn't support it. 2011-12-11 04:19:11 -06:00
Pierre Bourdon
df283a56a0 More coding style fixes because I suck at sed 2011-12-11 11:14:02 +01:00
Pierre Bourdon
014c474024 8 spaces indentation -> tabs 2011-12-11 11:08:18 +01:00
Ryan Houdek
1724385c8c Actually have Dual Source blending work for people. Forgot about this change. 2011-12-11 03:10:03 -06:00
Ryan Houdek
2907ffd72c Make this pretty 2011-12-10 15:58:44 -06:00
Ryan Houdek
c678172f32 Make sure our UBO buffers are always aligned correctly. 2011-12-10 15:52:20 -06:00
Ryan Houdek
97c3c156e6 Use UBOs in every shader. I had missed a few. Only cache Uniform locations if we aren't using UBOs. 2011-12-10 15:40:10 -06:00
Ryan Houdek
c72a244809 Make sure to support everything even if GPU doesn't. 2011-12-10 14:35:37 -06:00
Ryan Houdek
5925feb6e0 yay, UBOs work 100% now. 2011-12-10 08:07:13 -06:00
Ryan Houdek
7ab38cff68 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. 2011-12-10 07:38:30 -06:00
Ryan Houdek
49664bff61 More for Billiard <3 2011-12-10 02:02:22 -06:00
Ryan Houdek
24336171f1 Firin ma lazer 2011-12-10 01:57:27 -06:00
Ryan Houdek
126dfa073b Firin ma lazer 2011-12-10 01:56:37 -06:00
Ryan Houdek
54a90d08ce Fix one error. 2011-12-09 21:15:15 -06:00
Ryan Houdek
e8087aa1a9 Remove bSupportsGLSLLocation since it won't work how I expect it. 2011-12-09 19:14:02 -06:00
Ryan Houdek
4fe9792760 Merge branch 'GLSL-master' of https://code.google.com/p/dolphin-emu into GLSL-master 2011-12-09 17:30:50 -06:00