Commit graph

1418 commits

Author SHA1 Message Date
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
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
NeoBrainX
52963584f0 [bugfix] Make sure to specify the correct max lod level. 2012-10-20 21:07:03 +02:00
NeoBrainX
9d5fc3d7f0 [bugfix] Properly decode lod_bias. 2012-10-20 21:07:03 +02:00
NeoBrainX
0706050b74 [cleanup] Vastly clean up backend-specific sampler state logic. 2012-10-20 21:07:02 +02:00
NeoBrainX
069d949a57 [cleanup] TextureCache: Kill the autogen_mipmap parameter 2012-10-20 21:07:02 +02: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
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
1c1ae63b69 Windows build fix. 2012-08-26 20:26:10 +02:00
NeoBrainX
cf8744cf2c OGL: Implement pixel metrics (untested) 2012-08-26 20:26:10 +02:00
NeoBrainX
4d8d86bd6a D3D11: Implement some PE pixel performance metrics.
Super Mario Sunshine is using a cool trick: To determine how much goop has been cleaned in ep. 6 of Sirena Beach, it counts the number of pixels that are input to the blending stage. For that it's using the PE performance registers ;)

Fixes issue 1498.
2012-08-26 20:26:10 +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
skidau
0efd4e5c29 Skipped the ZCompLoc pass if the result can be determined at compile time. Brings back the speed lost by r146b02615c07. 2012-08-06 09:29:01 +10: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
1c8cdebc22 Set g_texture_cache to NULL upon shutdown. Fixes a crash introduced in previous commits. 2012-06-21 14:21:16 +02:00
NeoBrainX
cc0523e55b TextureCache: Properly assign texture hashes when EFB to RAM is used without caching.
Fixes issue 5472.
2012-06-20 18:18:21 +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
227580d1a5 Remove "Disable Textures". 2012-06-11 23:35:46 +02:00
NeoBrainX
1dd6b978c1 Remove "Disable Lighting". 2012-06-11 23:30:20 +02:00
NeoBrainX
b5ad382b07 Fast mipmaps deserves to die!! 2012-06-08 00:22:57 +02:00
NeoBrainX
372e00632d Fix changing internal resolution via hotkeys (settings above 1.5x weren't accessible anymore before). 2012-05-29 13:11:28 +02:00
skidau
146b02615c Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch) 2012-05-26 13:47:07 +10:00
NeoBrainX
54aeec7a8f Dump the redundant "save textures" function. Use TextureCache's dumping feature instead. 2012-05-13 17:48:23 +02:00
NeoBrainX
a5e68ab10e TextureCacheBase: Support dumping individual mipmaps. 2012-05-13 17:41:04 +02:00
rodolfoosvaldobogado
6a446efd5f Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
2012-04-03 00:08:36 -03: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
Shawn Hoffman
2ee5e5cebc Merge branch 'scons-removal' 2012-03-28 00:02:04 -07:00
rodolfoosvaldobogado
450dcc9d2c As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
2012-03-27 15:44:58 -03:00
Shawn Hoffman
d15740daf1 Merge branch 'wxw3-update' 2012-03-25 12:27:38 -07:00
NeoBrainX
fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01:00
Shawn Hoffman
56b1373baf Remove scons-related files 2012-03-25 12:55:02 -07:00
Shawn Hoffman
c5d746f3d8 remove scons files from VS projects 2012-03-18 06:41:12 -07:00
Shawn Hoffman
c3d13b048c build against wxWidgets3 from Externals on Windows.
use Externals version of libpng on Windows.
2012-03-18 02:31:19 -07:00
NeoBrainX
9adc119e3c PixelShaderGen: For custom textures and scaled EFB copies, use correct texel to pixel mapping when sampling textures
(D3D9 only)

This is basically the same as revision e58692653a, just for scaled textures and with a LOT more work...
2012-02-20 20:32:08 +01:00
NeoBrainX
eb01a110c9 Implement texture preloading 2012-02-03 21:21:13 +01:00
NeoBrainX
1446fb33d5 TextureCacheBase: Replace the efbcopy_state member variable of texture cache entries with a more general "texture type" 2012-01-31 19:52:02 +01:00
NeoBrainX
cc54ee7d94 TextureCache: Move EFB copy cache code from TextureConverter to TextureCache 2012-01-31 19:51:32 +01:00
NeoBrainX
a02df43e6d TextureConverter (OGL/D3D9): Kill EncodeToRam because it wasn't used anywhere and it basically does the same as EncodeToRamFromTexture anyway 2012-01-31 18:09:35 +01:00
NeoBrainX
3b38295cbd TextureCacheBase: De-uglify hybrid EFB copies (documentation needs updating though)
TextureCacheBase: Fixed dynamic EFB copies being set to normal textures.
2012-01-31 18:09:35 +01:00
NeoBrainX
5239ba88c9 TextureCache: Remove unsafe texture cache 2012-01-31 18:09:35 +01:00
NeoBrainX
c5008fe9de TextureCache: Renaming some variables
OGL: Fix a possible bug at texture dumping
OGL: Add a TODO about a possible bug
2012-01-31 18:09:34 +01:00
nitsuja
39613a95a8 initialize the uninitialized 2012-01-04 01:36:09 -08:00
nitsuja
3e773f093d fixed a freeze on emu shutdown in windows build 2011-12-19 15:13:26 -08:00
Maarten ter Huurne
ed1bfdf293 Merge branch 'cmake-osx2' 2011-12-17 16:30:02 +01:00
Maarten ter Huurne
8c3775ee6f Under OS X, link GL plugin against Cg framework instead of Cg library. 2011-12-05 01:12:09 +01:00
Pierre Bourdon
252093295b Do not fail with strict drivers when compiling a not SM2.0 shader
To enforce SM2.0 compatibility, the OpenGL plugin was made to crash when
compiling a shader which does not fit in the SM2.0a limits. However, on some
combinations of OS/drivers/GPU, our shaders already do not fit in these limits,
causing artificial failures only to try to keep a non existant SM2.0a compat.
Basically, this sucks.

This commit increases the artificial limit to SM3.0. If you're using a GPU
which does not support SM3.0 and Dolphin works properly, this should not cause
any problem at all.
2011-12-03 23:24:10 +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
81c614fa07 Clean up various things. 2011-09-29 23:32:39 +02:00
NeoBrainX
08af37509e More buildfixes.. 2011-09-29 23:32:38 +02:00
Glenn Rice
6ccfd85f42 Build fix for the linux libav build. 2011-09-29 23:32:38 +02:00
NeoBrainX
c710ea33f9 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-29 23:32:38 +02:00
NeoBrainX
bd4a5b5ef6 Implement frame dumping in D3D11.
Fixes issue 4831.
2011-09-29 23:32:38 +02:00
NeoBrainX
5c14a24ce1 Make shader ID validation optional by adding a gfx setting called "EnableShaderDebugging".
Setting this to True will enable additional checks if the shader cache misses any relevant register changes.
2011-09-09 21:34:46 +02:00
NeoBrainX
b28348066e Improve the shader UID debugging stuff and merge it to VideoCommon, effectively enabling it in D3D9 and D3D11 as well. 2011-09-09 00:32:04 +02:00
NeoBrainX
349a3ae91d Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uids 2011-09-08 02:14:18 +02:00
NeoBrainX
3939f9595a Add runtime checks to make sure we aren't overoptimizing the pixel shader cache. 2011-09-07 21:15:09 +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
Shawn Hoffman
95517a9741 vs2010: Disable LTCG for realz 2011-09-05 09:43:23 -07:00
Ryan Houdek
5a6a2b2bec Do clearscreen and swap, probably won't do debug text nonsense since it looks like trash anyway. maybe later. 2011-08-25 05:20:41 -05:00
Ryan Houdek
31fd25bf61 Move on to XFB drawing 2011-08-25 04:41:45 -05:00
Ryan Houdek
d021f9e3b6 Here we go with the texture cache 2011-08-25 04:28:29 -05:00
Ryan Houdek
12a8f590f8 Remove immediate mode from the Texture converter, probably need to redo this for texcache rewrite :/ 2011-08-25 04:02:11 -05:00