Commit Graph

70 Commits

Author SHA1 Message Date
degasus bbc292c210 merge Vertex and PixelShaderCache into ProgramShaderCache
this is the first step, uniform handling is still missing
2013-02-13 13:12:19 +01:00
degasus f079b04a5d also check for glsl errors on linking, activation GLSL_DEBUG again (slowdown on shader compilation) 2013-02-07 12:47:41 +01:00
degasus ef602fd643 workaround for glGetUniformLocation in efb2ram 2013-02-05 18:22:23 +01:00
degasus 76adc77fa6 bigger buffers 2013-02-05 18:01:27 +01:00
degasus 878bd7f26c implement streaming by bufferSubData, split upload and allocation in ringbuffer 2013-02-01 12:30:08 +01:00
degasus 30170575c8 create StreamBuffer class for ogl upload 2013-01-31 23:11:53 +01:00
degasus 4a463f4588 also add glBufferSubData for ubo upload
so osx start game, but everything is black
2013-01-31 13:00:15 +01:00
Ryan Houdek fa45403557 Got to love that my server's cmake is half retarded. 2013-01-28 15:32:38 -06:00
Ryan Houdek d94f3c4155 Stop using std::pair and std::map. Switch over to u64 and std::unordered_map. Provides a very small speed boost. 2013-01-28 15:18:54 -06:00
degasus fd06342a97 set hint GL_STREAM_READ
it's wrong, but so we are guaranteed to get pinned memory.
it's slower for rendering, but faster for mapping.
2013-01-28 13:03:31 +01:00
Ryan Houdek 4fadb65259 Only check shader compilation status in debug or with DEBUG_GLSL defined. invalidate range on bindbufferrange since we don't care about what is in the range. Both give a performance boost for me. 2013-01-26 11:24:24 -06:00
degasus a526fc5f92 ubo streaming 2013-01-25 13:20:42 +01:00
degasus cf11f0ea72 clear uniform cache on startup 2013-01-21 15:43:04 +01:00
degasus 074f73c641 move utils texture to sampler 8+9
rasterfont tex will aways bound to samp8.
efb copy utils will be done in samp9.
2013-01-19 00:39:31 +01:00
degasus 6401a18143 remove texture sampler from uniform list 2013-01-19 00:12:02 +01:00
degasus 3054d36534 use glBindFragDataLocation instead of glDrawBuffer 2013-01-17 11:16:12 +01:00
degasus bb200acdd8 also don't search in the shader cache if the shader isn't changed 2013-01-15 23:42:24 +01:00
degasus 687d74e6c2 only change shader if needed 2013-01-15 14:22:40 +01:00
degasus ff889c0e65 use attrib pointers in nativeVertexFormat 2013-01-14 22:59:08 +01:00
degasus 5fe3def64c videoConfig cleanup 2013-01-14 20:00:33 +01:00
degasus c3aafc77b3 upload complete uniform buffer at once
this is the way of dx11. it would upload more per draw, but uses less calls.
will be faster if many uniforms are changed, but slower else
2013-01-14 13:58:11 +01:00
degasus 2838077313 fix warnings 2013-01-11 21:24:59 +01:00
degasus 60b8e4fb1c vertex shader for texture converter 2013-01-11 11:59:42 +01:00
degasus b38b62afc6 remove glsl binding support. convert every shader to version 130 2013-01-02 16:56:08 +01:00
degasus c2898748ac bind locations _before_ link program, fix dest alpha 2012-12-31 02:34:27 +01:00
degasus d9f3fc4495 fix ubo for intel cards (also amd?) 2012-12-28 17:06:08 +01:00
Shawn Hoffman 1a8005d948 set ProgramShaderCache program format correctly. 2012-10-09 23:56:00 -05:00
Shawn Hoffman 210ecad15f let us try normal c++ static init instead... 2012-10-09 23:56:00 -05:00
Ryan Houdek 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
Ryan Houdek 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
Shawn Hoffman 108722bed0 oops, forgot to make sure the gl program is actually free'd. 2012-10-09 23:54:18 -05:00
Shawn Hoffman 4c1fef8f98 refactor ProgramShaderCache::PCacheEntry 2012-10-09 23:54:18 -05:00
Shawn Hoffman aaa405c973 Checking GLEW_VERSION_4_0 is superfluous since we check GL_ARB_get_program_binary, and it's a runtime variable anyways. 2012-10-09 23:54:18 -05:00
Shawn Hoffman 31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -05:00
Ryan Houdek c4e7a288e5 Add in the Windows fix. 2012-10-09 23:43:22 -05:00
Ryan Houdek 5c486587a6 Write all shaders to disk on emulator stop instead of constantly. Also change pair from u64 to u32. 2012-10-09 23:43:22 -05:00
Ryan Houdek 4eb227bd4c If user doesn't compile with glew 1.6, cut out program binaries so everything still compiles. 2012-10-09 23:43:22 -05:00
Sonicadvance1 7c91476650 Missed a if, don't want people crashing now do we? 2012-10-09 23:42:41 -05:00
Ryan Houdek 9996f27120 Give OSX users more of a chance of supporting Single pass DSB in the future. 2012-10-09 23:42:41 -05:00
Ryan Houdek 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
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 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