Ryan Houdek
ef1e157786
Go back to using glGetString with GL_EXTENSIONS because glew 1.7 is required to check for newer 4.2 extensions that way.
2012-10-09 23:42:40 -05:00
Ryan Houdek
ac77bbd47b
Move the GLSL extension checks over here so it is nicer.
2012-10-09 23:42:40 -05:00
Ryan Houdek
7cb3d86e31
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.
2012-10-09 23:42:40 -05:00
Ryan Houdek
1aad2e9e56
There we go, actually found the issue.
2012-10-09 23:42:40 -05:00
Ryan Houdek
6759ee701d
This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times.
2012-10-09 23:42:40 -05:00
Ryan Houdek
66a245dd68
Remove this silliness
2012-10-09 23:42:40 -05:00
Ryan Houdek
9c09e1973a
Some shader programs don't come with Vertex shaders attached, don't try to bind a Vertex Uniform block then.
2012-10-09 23:42:40 -05:00
Ryan Houdek
f8d0c28e53
Set Sampler values at program make time instead of every frame. Fix an issue when The user had UBO support but not Binding support.
2012-10-09 23:42:40 -05:00
Ryan Houdek
ddd4360d6d
Only delete this buffer if we support it.
2012-10-09 23:42:39 -05:00
Ryan Houdek
7aad45658e
Add a GUI option to use GLSL shaders. Also fix a small typo.
2012-10-09 23:42:39 -05:00
Ryan Houdek
076c1a5aa7
Make sure not to try and bind UBO locations when it isn't supported
2012-10-09 23:41:49 -05:00
Ryan Houdek
ba12c0b4f5
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.
2012-10-09 23:41:48 -05:00
Jordan Woyak
d70726b035
glMapBuffer was slow, go back to glBufferSubData, single combined ps/vs ubo now
2012-10-09 23:41:48 -05:00
Jordan Woyak
d9117ab6a1
try combining vs/ps ubo
2012-10-09 23:41:48 -05:00
Jordan Woyak
e641ede232
make use of glMapBuffer to set ubo data
2012-10-09 23:41:48 -05:00
Ryan Houdek
04836705b7
Show a bit of information when using GLSL shaders.
2012-10-09 23:41:48 -05:00
Jordan Woyak
8e80771670
fix stupid indentation
2012-10-09 23:41:48 -05:00
Jordan Woyak
73a29bf6a1
have separate variables/functions for VS/PS ubo stuff, array was confusing.
2012-10-09 23:41:48 -05:00
Ryan Houdek
a809feae1a
Disable UBO buffer generation if hardware doesn't support it.
2012-10-09 23:41:48 -05:00
Pierre Bourdon
3bcec51334
More coding style fixes because I suck at sed
2012-10-09 23:41:48 -05:00
Pierre Bourdon
3c6d0fc710
8 spaces indentation -> tabs
2012-10-09 23:41:48 -05:00
Ryan Houdek
a5257c1a0a
Actually have Dual Source blending work for people. Forgot about this change.
2012-10-09 23:41:06 -05:00
Ryan Houdek
a304af75fd
Make this pretty
2012-10-09 23:41:06 -05:00
Ryan Houdek
67687a7b6d
Make sure our UBO buffers are always aligned correctly.
2012-10-09 23:41:06 -05:00
Ryan Houdek
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
Ryan Houdek
5bcbf92f43
Make sure to support everything even if GPU doesn't.
2012-10-09 23:41:06 -05:00
Ryan Houdek
d4a80ca3ec
yay, UBOs work 100% now.
2012-10-09 23:41:05 -05:00
Ryan Houdek
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
Ryan Houdek
904adb9e3d
More for Billiard <3
2012-10-09 23:41:05 -05:00
Ryan Houdek
ce7a54f32a
Firin ma lazer
2012-10-09 23:41:05 -05:00
Ryan Houdek
b105d70339
Firin ma lazer
2012-10-09 23:41:05 -05:00
Ryan Houdek
c82b92bfc2
Fix one error.
2012-10-09 23:41:05 -05:00
Ryan Houdek
2fbca145cb
Remove bSupportsGLSLLocation since it won't work how I expect it.
2012-10-09 23:41:05 -05:00
Ryan Houdek
4a84c6f742
Add in UBOs, doesn't work yet. Still debugging here.
2012-10-09 23:41:05 -05:00
LPFaint99
5f0f26ef35
add ProgramShaderCache.* to visual studio project files
2012-10-09 23:41:05 -05:00
Ryan Houdek
d83ead5914
Support Dual Source Blending in OGL plugin with GLSL.
2012-10-09 23:39:16 -05:00
Ryan Houdek
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
Ryan Houdek
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
Ryan Houdek
081ad949ce
Welp, just fixed that problem.
2012-10-09 23:35:45 -05:00
Ryan Houdek
3c9c5de722
Missed a spot. Most games work now, Still have a problem with viewtiful joe. Destination Alpha pass doesn't work yet, going to use Dual source blending on that.
2012-10-09 23:35:45 -05:00
Ryan Houdek
3160da1289
This lets us see stuff with GLSL shaders. Just need to take care of some compile errors now.
2012-10-09 23:33:02 -05:00
Ryan Houdek
7cec31dbf3
Almost there.
2012-10-09 23:33:02 -05:00
Ryan Houdek
0fc755c4df
More stuff
2012-10-09 23:31:31 -05:00
Ryan Houdek
7a4c080c70
mah
2012-10-09 23:29:30 -05:00
Ryan Houdek
411357b54a
Compile
2012-10-09 23:29:30 -05:00
Ryan Houdek
34c7b3fd73
meh
2012-10-09 23:29:30 -05:00
Ryan Houdek
3943840d5c
Now CG plays nice with this new stuff.
2012-10-09 23:27:59 -05:00
Ryan Houdek
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
Pierre Bourdon
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
NeoBrainX
ac2ce8b16e
Video_DX11: Remove some redundant code.
2012-09-27 18:15:45 +02:00