Commit Graph

508 Commits

Author SHA1 Message Date
Ryan Houdek 73eb98ed8e Move swap control to the host specific GLInterface files. 2013-01-24 10:31:08 -06:00
degasus e0ffdda26e Merge branch 'immediate-removal' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp

immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal
so we get less conflicts by merging
2013-01-24 16:58:28 +01:00
degasus d60cc373d1 Revert "Revert 30dd9c2 e9d00bf db5f4c8 and bff0fae"
This reverts commit d0301ca89d.

Conflicts:
	.gitignore
2013-01-24 16:11:07 +01:00
degasus da0ec6618f always init ogl configs 2013-01-21 18:44:33 +01:00
degasus ebaaf6d468 glShadeModel is also obsolete 2013-01-21 10:37:16 +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 714ff50fdf set blending if dual source might be triggered 2013-01-18 00:44:35 +01:00
degasus a87fd89fce disable ogl shader cache
it doesn't check the shader itself only the id of the shaders.
So there are cache mismatch atm
2013-01-17 12:36:20 +01:00
degasus 3054d36534 use glBindFragDataLocation instead of glDrawBuffer 2013-01-17 11:16:12 +01:00
lioncash 0ef3bd9c77 Revert "Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names)."
Turns out I was wrong in my previous commit. My bad.

This reverts commit 8743166663.
2013-01-16 15:46:11 -05:00
degasus 8a7f1e9264 workaround for older ati drivers 2013-01-16 19:37:57 +01:00
lioncash 8743166663 Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names).
This also gets rid of some more typecasts in some cases.
2013-01-16 09:42:51 -05:00
degasus 687d74e6c2 only change shader if needed 2013-01-15 14:22:40 +01:00
degasus 2f78986e2c Merge branch 'Graphic_Update' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
2013-01-14 21:36:31 +01:00
degasus 5fe3def64c videoConfig cleanup 2013-01-14 20:00:33 +01:00
degasus adeac6f4a5 remove old deprecated calls and fixed functions parameters 2013-01-14 17:48:38 +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 092a99cbd2 glsl shaders for showEfbCopyRegions 2013-01-09 20:08:55 +01:00
degasus bff02b3b73 Merge branch 'arb_framebuffer' into GLSL-master
Conflicts:
	Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
	Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
2013-01-09 11:00:26 +01:00
degasus 84debc17d5 fix msaa
blitting between msaa fbos may not scale. So we need to resolve the efb before swapping.
2013-01-09 01:50:52 +01:00
NeoBrainX be706a3977 Disable color writing when alpha test always fails. 2013-01-08 18:56:01 +01:00
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 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 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 30dd9c2e17 always calls glBindBuffer(0) after disabling vao 2012-12-29 12:50:42 +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
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
degasus bff0faea2d Merge branch 'immediate-removal'
Conflicts:
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
2012-12-25 12:39:00 +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 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 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 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 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
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
rog a5d210129d Add an on screen lag counter. 2012-11-11 17:57:06 -05: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
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
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 31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -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 189d12b61c If CG isn't available, still compile and fallback on GLSL 2012-10-09 23:43:22 -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 66a245dd68 Remove this silliness 2012-10-09 23:42:40 -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 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 035840e7b5 Move last XFB size from Render to FramebufferManager. 2012-10-03 13:44:35 +02:00
NeoBrainX 8f5223d0e6 More cleanups. 2012-10-03 13:44:13 +02:00
NeoBrainX 6e4a61a991 Minor cleanups. 2012-10-03 13:44:04 +02:00
plbl4ster 94e49c5044 Fix frame skipping on non-win32 systems missing libav
Fixes issue 4097.
2012-08-28 12:29:51 +02:00
NeoBrainX 08a9c66037 Revert the recent zcomploc changes including the Graphic_Fixes merge.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.

This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
2012-08-10 20:12:02 +02:00
Pierre Bourdon d33e48319f Fix accesses to the 16 lower pixels of the EFB with OpenGL
The GL EFB cache did not clamp correctly the coordinates when computing
the rectangle it needed to cache, leading to negative values being used
as indexes and often crashes.

Fixes issue 5510.
2012-07-23 22:35:51 +02:00
NeoBrainX 8d30ac462a Instead of invalidating texcache whenever the graphics configuration dialog gets opened, clean up textures on configuration changes. 2012-06-20 18:18:05 +02:00
NeoBrainX b5ad382b07 Fast mipmaps deserves to die!! 2012-06-08 00:22:57 +02:00
rodolfoosvaldobogado a0d60210fd First Stage:
Fix depth related errors in dstalpha pass.
best place to test: water splash effect in super mario galaxy
2012-04-02 14:26:12 -03:00
NeoBrainX 460610ea0e Revert Rodolfo's recent zcomploc commits until they actually work correctly.
This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
2012-03-30 01:57:53 +02:00
rodolfoosvaldobogado 402006a83a more fixes to zcomplock and opengl implementation 2012-03-29 18:26:58 -03:00
NeoBrainX 5239ba88c9 TextureCache: Remove unsafe texture cache 2012-01-31 18:09:35 +01:00
Jordan Woyak 575814895c Merge branch 'clearscreen-kill-immediate-mode' 2011-12-01 20:16:23 -06:00
Maarten ter Huurne 98981cc724 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).
2011-12-01 02:46:59 +01:00
Jordan Woyak 4fcd6994c6 fix wireframe setting toggling 2011-11-29 22:21:43 -06:00
Jordan Woyak 0dfca1cf2b remove now unnecessary glPolygonMode from ResetAPIState 2011-11-29 22:02:18 -06:00
Jordan Woyak 88700e817a make OpenGL ClearScreen use glClear 2011-11-29 21:50:31 -06:00
Pierre Bourdon 1e558aedeb Added an EFB peek cache to the GL video plugin
Most of the games using EFB peeks are suffering from major performance problems
when these peeks are not disabled in the graphics settings. This is an attempt
to fix this in the GL renderer by doing the glReadPixels in bulk: instead of
doing a lot of 1x1 pixel reads, read for 64x64 pixels at once and keep that in
a cache.

Deck menu in Baten Kaitos: 3FPS -> 54FPS
Character creation in Monster Hunter Tri: 7FPS -> 60FPS
2011-10-17 18:30:13 +02:00
NeoBrainX 2df4811807 More buildfixes.. 2011-09-12 17:58:05 +02:00
Glenn Rice e4b358d0a7 Build fix for the linux libav build. 2011-09-08 22:24:11 -05:00
NeoBrainX 5eb1e55f80 Merge some frame dumping code to VideoCommon, fixes a memory leak in D3D9 and OpenGL if emulation is stopped while dumping frames.
Breaks D3D11 frame dumping for some weird reason (memory corruption or whatever?).
2011-09-08 17:09:24 +02:00
NeoBrainX 1c85be8625 Implement frame dumping in D3D11.
Fixes issue 4831.
2011-09-08 15:39:03 +02:00
NeoBrainX 17fcd406fc Merge some scissor rect related code to VideoCommon. 2011-09-05 22:04:28 +02:00
Shawn Hoffman b867c21fea apply to dx9 and dx11 backends as well 2011-09-05 12:19:11 -07:00
NeoBrainX 6845a1596c Fix various cases in scissor rect emulation.
Patch by delroth.
2011-09-05 11:10:23 -07:00