Commit Graph

3045 Commits

Author SHA1 Message Date
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
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 72cb1734ee Some code cleaning for my last commit.
the amount and size of the buffer is now changed to "new hardware" frienly values and will fall back to the right values if hardware does not support them.
my next commit will be to a branch, with my ogl work.
2012-10-22 19:37:26 -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
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
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
NeoBrainX c143e08b9a Recreate screenshot texture whenever the backbuffer resolution changes. Fixes crashes when taking screenshots after changing window size or switching to/from fullscreen mode. 2012-08-07 15:18:10 +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 8bed27a3d1 Enable hires textures even when texture dumping is enabled.
Remove some deprecated code.
2012-06-20 18:18:17 +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
nitsuja a81631b58e made savestates synchronous and immediate. this allows saving or loading while the emulator is paused, fixes issues where savestate hotkeys would get ignored if pressed too close together, might speed up savestates in some cases, and hopefully makes savestates more stable too.
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
2012-05-26 13:09:38 +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
skidau ec0ddb476e Fixed texture encoding in DX11. Thanks to wordmanwords for the patch. 2012-05-06 10:51:38 +10: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
NeoBrainX 6ee6d0088a Merge branch 'zfreeze-new' 2012-03-29 23:02:27 +02:00
Shawn Hoffman 2ee5e5cebc Merge branch 'scons-removal' 2012-03-28 00:02:04 -07:00
rodolfoosvaldobogado 48d8d71391 Fix for my last commit, this must fix the problem in the algorithm pointed by neobrain. thanks 2012-03-27 23:14:59 -03:00