Commit Graph

1513 Commits

Author SHA1 Message Date
NeoBrainX e979b2d4a2 DX11: Fix a small mistake.
Remove some incorrect and/or confusing comments.

Fixes issue 5251. Thanks to limburgerite :)
2013-01-08 18:16:48 +01:00
Ryan Houdek d0301ca89d Revert 30dd9c2 e9d00bf db5f4c8 and bff0fae 2013-01-07 13:47:34 -06:00
degasus b7906b49c9 fix byte order in osd rasterfont 2013-01-07 20:11:26 +01:00
degasus ef32231431 fix screenshots 2013-01-03 21:40:54 +01:00
degasus fc02427d54 xfb draw by blit - disable postprocessing
blitting can't do postprocessing - so for postprocessing, we have to add a new stage
2013-01-03 20:44:47 +01:00
degasus b67b1c376d fix virtual xfb - remove glCopyTexImage2D
glCopyTexImage2D isn't in core (and so not supported everywhere) and it cannot store into GL_TEXTURE_RECTANGLE
2013-01-03 18:36:19 +01:00
degasus 363ffd3a5f swap() by blitting 2013-01-03 12:33:18 +01:00
degasus ecedf56eb4 uses the ARB_framebuffer_object syntax
also require this extention (OGL3.0), but it have one _realy_ big advantage:
- now it's possible to blit between different texture sizes, so all util draw calls can be implemented as blit
2013-01-03 12:06:47 +01:00
degasus a1ca288555 fix some AMD issues
This is only a hack. The correct solution would be:
1. don't use GL_TEXTURE_RECT ever. GL_TEXTURE_2D should also be faster
2. use GL_TEXTURE8+ for util textures
3. both
2013-01-03 09:45:12 +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 30dd9c2e17 always calls glBindBuffer(0) after disabling vao 2012-12-29 12:50:42 +01:00
degasus e9d00bfeeb revert RasterFont optimization
isn't needed and also not tested and buggy
2012-12-29 00:37:50 +01:00
degasus d9f3fc4495 fix ubo for intel cards (also amd?) 2012-12-28 17:06:08 +01:00
degasus 48ede4dd30 switch to glsl 130, more than OpenGL 3.1 isn't needed 2012-12-28 16:05:14 +01:00
degasus 70c63ce6cf fix dual pass alpha 2012-12-28 14:24:12 +01:00
degasus 82b33471ae cleanup rasterfont 2012-12-28 11:46:00 +01:00
Ryan Houdek 7d93834cd8 Bit more cleanup from removing Nvidia CG 2012-12-27 22:53:07 -06:00
degasus 193056493a also use shaderCaches in rasterFont 2012-12-28 00:52:44 +01:00
degasus 316a33d1e6 Merge branch 'master' into GLSL-master
Conflicts:
	Source/Core/DolphinWX/Src/VideoConfigDiag.h
	Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
2012-12-27 10:36:54 +01:00
degasus db5f4c8c20 fix byte order in osd rasterfont 2012-12-26 23:48:33 +01:00
Ryan Houdek 01cdcc83a3 Merge Fail: Make sure we are using the interface file to get backbuffer dimensions. GL helper function was duplicated. 2012-12-26 13:15:19 -06:00
Ryan Houdek 67c1c6b062 Merge branch 'GLES-software' 2012-12-26 12:54:58 -06:00
Ryan Houdek 9a58f9a3bb Rename another function... 2012-12-26 00:34:09 -06:00
Ryan Houdek f4e7a280a9 Remove cg.lib from some files for Windows and renaming a function. 2012-12-26 00:07:43 -06:00
Ryan Houdek 01953ff64a Rename the interface files and hopefully fix OSX building. 2012-12-25 19:08:24 -06:00
degasus bff0faea2d Merge branch 'immediate-removal'
Conflicts:
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
2012-12-25 12:39:00 +01:00
degasus 399a6af66d revert update the rasterfont shader to GLSL3.3 - OGL 2.0 should be enough 2012-12-25 12:22:02 +01:00
NeoBrainX 2fedab3bad OGL: Make OSD messages fade out properly instead of having them disappear spontaneously. 2012-12-24 19:50:16 +01:00
Ryan Houdek 9209253e0d Initial removal of Nvidia CG. Still some more cleanup to go 2012-12-24 11:09:52 -06:00
Ryan Houdek 296b9b1c16 Small bit of clean up in GLES-software. 2012-12-24 09:37:12 -06:00
degasus 85ac76e8e2 fix gcc compilation 2012-12-19 23:42:22 +01:00
Ryan Houdek b78f5debe6 Initial push of GLES and GLUtil file breakup. 2012-12-17 14:54:20 -06:00
degasus 1919a458e8 only use one buffer, orphaning should do the rest 2012-12-15 17:28:58 +01:00
degasus ba8264c2ac use VAO in VertexManager
to use VAO, we must use VBO, so some legency code was removed:

- ARB_map_buffer_range must be available (OGL 3.0), don't call glBufferSubData if not
- ARB_draw_elements_base_vertex also (OGL 3.2), else we have to set the pointers every time
- USE_JIT was removed, it was broken and it isn't needed any more

And the index and vertex buffers are now synchronized, so that there will be one VAO per
NativeVertexFormat and Buffer.
2012-12-15 14:43:01 +01:00
degasus 79a7ce4827 move glBindBuffer and glBindVertexArray out of VertexManager
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:52 -06:00
degasus 09274e2483 Check texture params before updateing them
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:48 -06:00
degasus 61836f8c51 helper for compiling glsl
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:44 -06:00
degasus 48812f7bf7 update the rasterfont shader to GLSL3.3 - so OGL 3.3 is needed
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:39 -06:00
degasus 1bd21f44b2 custom shader for RasterFont, fix color support
OpenGL2.0 compatible

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:36 -06:00
degasus 23a3336f9a increase hash size to u64
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:32 -06:00
degasus 75dd48247f initial release of new RasterFont without color support
this new design will once create a texture for all chars.
while rendering a string, a list of polygons (position on screen + texture)
for this string is generated on the fly and print at once by glDrawArrays.
atm, there is no support for colors, so everything will display white.

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:28 -06:00
degasus c207422987 using of vao, warning: ARB_vertex_array_object is needed
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:25 -06:00
degasus 5c8800968a also check for vbo updates in EncodeToRamUsingShader
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:22 -06:00
degasus 1f1b32b663 only update vbo on changes in XFBSource::Draw
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:19 -06:00
degasus 34b1451fbe cache vbos in TextureCache::TCacheEntry::FromRenderTarget
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:15 -06:00
degasus d0c4332d99 don't update vbo, if there are no changes in Renderer::Swap
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:13 -06:00
degasus bbcb442983 in the end, also Renderer::Swap in vbo
two last draw-calls are missing:
VertexManager::Draw (see Graphic_Update branch)
RasterFont::printString (perhaps reimplement with an texture)

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:10 -06:00
degasus b41c06a9ac EncodeToRamUsingShader in vbo
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:05 -06:00
degasus 8ea2ddbc50 XFBSource::Draw in vbo
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:59 -06:00
degasus d44228f1b7 TextureCache::TCacheEntry::FromRenderTarget as vbo
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:56 -06:00
degasus 6b3125728b use vbo for ShowEFBCopyRegions
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:53 -06:00
degasus 8b62be2025 fix ShowEFBCopyRegions
those fancy colors were the result of the usage of non-allocated heap

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:49 -06:00
degasus 6864b40e26 reset glEnableClientState befor every draw
should be done with VAO, but atm, this is not possible :-(
this also partial revert the fix in fb92c338af (activating texture0 globally).

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:46 -06:00
degasus 888b5fb061 remove usage of glMultiTexCoord2f
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:38 -06:00
rog 30718230b2 Fix some warnings. 2012-12-06 20:25:07 -05:00
rog 97f5b1665f what is this even... 2012-11-26 02:11:52 -05:00
NeoBrainX 4ff9e03509 Merge branch 'efb_scaling_fixes'. 2012-11-19 13:18:57 +01:00
NeoBrainX a38bb488d2 Remove Renderer::xScale and Renderer::yScale. 2012-11-16 14:29:09 +01:00
NeoBrainX 78031c2d54 Move ComputeDrawRectangle() to Renderer::UpdateDrawRectangle(). 2012-11-16 14:25:49 +01:00
rog 14aa7150d9 Add option for author name for movies. Also, minor cleanup for previous options i've added. 2012-11-14 16:23:20 -05:00
rodolfoosvaldobogado 3936c06ee8 more fixes for my last commit, player problem in twin snakes is fixed 2012-11-11 22:39:27 -03:00
rog a5d210129d Add an on screen lag counter. 2012-11-11 17:57:06 -05:00
rodolfoosvaldobogado 53b62ab169 This should fix the bugs introduced by my last commit please retest the games that where showing graphical glitches. 2012-11-10 11:37:08 -03:00
Ryan Houdek fb92c338af Bit of cleanup and fixing of one issue that was noticeable in SMS with Mario's shadow. 2012-10-27 22:50:06 -05:00
Ryan Houdek dfb3c44d1a Remove glMatrixMode and glLoadIdentity calls in Render.cpp which do absolutely nothing. 2012-10-27 18:27:16 -05:00
Ryan Houdek 8c1d104ca3 Change EFB copy location rectangles over to a Vertex array 2012-10-27 18:10:31 -05:00
Ryan Houdek c1fd640964 Rebase immediate-removal on master 2012-10-27 17:22:48 -05:00
rodolfoosvaldobogado ee72852491 implement some code to reduce the amounts of calls to setup vertex format, in d3d9 it gives no noticeable speedup, in opengl it still does not work right.
thanks to neobrain for the idea
2012-10-26 23:18:09 -03:00
rodolfoosvaldobogado eaa1ea71c1 Implement the new buffer approach in opengl. sadly in my machine it gives my only 2 more fps and if your hardware does not support ARB_map_buffer_range is even slower than plain vertex arrays.
change naming in all the backends vertex managers to make more easy to continue with the merge an some future improvements.
please test this as i'm interested in knowing the performance in linux and windows with the different hardware platforms.
2012-10-26 11:34:02 -03:00
rodolfoosvaldobogado@gmail.com 5230146c73 Hey, long time no commits :).
So to compensate lets bring back some speed to the emulation.
change a little the way the vertex are send to the gpu,
This first implementation changes dx9 a lot and dx11 a little to increase the parallelism between the cpu and gpu.
ogl: is my next step in ogl is a little more trickier so i have to take a little more time.
the original concept is Marcos idea, with my little touch to make it even more faster.
what to look for: SPEEEEEDDD :).
please test it a lot and let me know if you see any problem.
in dx9 the code is prepared to fall back to the previous implementation if your card does not support the amount of buffers needed.
So if you did not experience any speed gains you know where is the problem :).
for the ones with more experience and compression of the code please test changing the amount and size of the buffers to tune this for your specific machine.
The current values are the sweet spot for my machine.
All must Thanks Marcos, I hate him for giving good ideas when I'm full of work.
2012-10-20 10:22:15 -03:00
Ryan Houdek 57426ee726 Forced commit 2012-10-13 13:00:04 -05:00
Shawn Hoffman 1a8005d948 set ProgramShaderCache program format correctly. 2012-10-09 23:56:00 -05:00
Ryan Houdek eb7a0c485a More "stuff" for SS, also a small fix in the program shader cache cache setup." 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
Ryan Houdek 5085cebaf3 These checks aren't needed when using CG. 2012-10-09 23:55:59 -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
Ryan Houdek e3854ded73 Woops, better not forget the ing 2012-10-09 23:54:18 -05:00
Ryan Houdek 4cd748bbec Remove some warnings in ProgramShadercache, Was using wrong variable for checking dual source blending. 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 ee529b7125 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? 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
Ryan Houdek 189d12b61c If CG isn't available, still compile and fallback on GLSL 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 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