Commit Graph

118 Commits

Author SHA1 Message Date
Ryan Houdek d0301ca89d Revert 30dd9c2 e9d00bf db5f4c8 and bff0fae 2013-01-07 13:47:34 -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
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
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
NeoBrainX b5ad382b07 Fast mipmaps deserves to die!! 2012-06-08 00:22:57 +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
NeoBrainX fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01: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 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
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
Glenn Rice ba54fac9eb Convert GetUserPath to return a std::string instead of a const char *. This simplifies its usage in most cases.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7265 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-28 20:40:15 +00:00
donkopunchstania c36ed08cfc Rework XF register loading a bit and change how registers are arranged in memory. This removes the assumption that all data for a viewport or projection matrix will be available when index 0 is loaded. Fixes issue 3688 and probably breaks old save states (sorry).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7083 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-05 18:25:34 +00:00
Soren Jorvang 955e3abe9e Clean out the long since bit-rotted video profiling code.
Profiler.{cpp,h} also happened to be the only dupliated
filenames left in Source, the absence of which should make
link-time optimization easier to get working.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6935 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27 21:57:36 +00:00
NeoBrainX 7854bd7109 Merged the D3D9 debugger into VideoCommon/VideoUICommon:
Separated UI from debugger functionality. Generally cleaned up that stuff.
Most functionality needs to be reimplemented now, but will be available to D3D9, D3D11 as well as OpenGL then.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6523 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 14:15:36 +00:00
Jordan Woyak 159ed43f67 Move some shared gfx plugin code into VideoCommon. Changed "Renderer" class to use virtual functions. (setting stuff up for video plugin merging)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6433 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-18 02:21:26 +00:00
Nolan Check 61c6d4fe59 OpenGL plugin: Should fix building with earlier versions of GLEW. You'll still need the latest GLEW if you want to try dual-source blending.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6311 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 18:26:28 +00:00
Nolan Check 2ec3db44ed OpenGL plugin: Support for dual-source blending, CURRENTLY DISABLED. It doesn't work yet. To fix it, we may need to convert all our shaders to GLSL so that we can use glBindFragDataLocation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6306 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 19:55:19 +00:00
Nolan Check 95cfca08e2 Put infrastructure in place so that other plugins may support dual-source blending.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 05:22:18 +00:00
Nolan Check 0e534dd033 Clarify texture cache code. Previously, there were THREE sets of texture dimensions, and it was hard to tell which set was for what purpose.
Now, there are two:
Real dimensions: Width and height of the original GameCube texture
Virtual dimensions: Width and height of the texture used by dolphin-emu's renderer

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6291 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 00:39:45 +00:00
Jordan Woyak cf05cca7a6 Merged common texture cache code from video plugins into VideoCommon. (DX11 native mipmaps currently broken, disabled) Hopefully everything else should still be working.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6288 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-19 22:24:27 +00:00
NeoBrainX ccb4645f24 Fix a bug introduced by r6240.
Fixes issue 3320.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6265 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-09 13:47:56 +00:00
baby.lueshi d57b0a14d0 Fixed hires textures not scaling. Also increased max size of custom textures to 2048x2048.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6254 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-04 01:54:51 +00:00
Jordan Woyak 841583b8f3 Merged identical VertexManager code from DX9/DX11/OGL plugins into VideoCommon. Still need to merge VertexManager::Flush (will be easier after TextureCache is merged). Purposely using a class/virtualfuncs rather than a namespace so multiple VertexManager can be in one plugin (VideoMergeNew? :p).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6249 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-03 00:41:06 +00:00
skidau 719521eeeb Added EFB Scale option to the OpenGL plug-in.
Renamed EFB Scale to Internal Resolution.
Removed Auto Scale option (it is now always on).
Added on-the-fly changing of the Internal Resolution in the OpenGL and Direct3D9 plug-ins.
Further consolidated the code in the video plug-ins.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6240 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-30 15:24:34 +00:00
skidau 88cd9f3df1 Minor code formatting:
First step to bring a level of consistency between the video plug-ins - variable names, spacing, function names, function order, comments, file names.  This will help us identify common code for VideoMerge.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6235 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-28 02:15:02 +00:00
Rodolfo Osvaldo Bogado e641323de2 i know still a lot to fix and much work to do but sometimes experiments are fun :)
for all the plugins implemented per pixel lighting, this will make games that uses lighting  a lot nice. (just look at mario sunshine and compare :))
for dx9: implemented temporal anaglyph stereo: just grab your red-cyan glasses  and enjoy.
stereo calibration: use stereo separation ( distance of the point from you are looking) and Focal Angle: the angle necessary to focus in one particular object.
this settings are different in every games as they use different depth ranges.
please for any regression and bug introduced by this commit.
if you ask why i did not implement stereo in dx11 and opengl the reason is one: they don't work right when i have more time will try to find a way to make them work.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6224 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-23 02:17:48 +00:00
Nolan Check 4229d9e01e Remove a bunch of freshly-obsolete code
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6148 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-29 19:34:54 +00:00
Nolan Check e1d1a1eba0 Fix EFB Scaled Copy in OpenGL plugin.
It no longer uses the TEXTURE_RECTANGLE extension for GameCube textures. Since GameCube always uses normalized texture coordinates, it's an unnecessary burden.

Please test hi-res textures.

Wow, it's been a while.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6144 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-29 04:56:53 +00:00
Rodolfo Osvaldo Bogado 9b0357b5e2 sometimes to advance you have to make a step back.
use plain vertex arrays instead of VBOs to render in Opengl plugin as the nature of the data make VBOs slower. This must bring, depending on the implementation, a good speedup in opengl.
in my system now opengl and d3d9 have a difference of 1 to 5 fps depending of the game.
some cleanup and a little work pointing to future improvements in the way of rendering.
please test and check for any errors.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6139 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-28 15:09:42 +00:00
pierre e5f629da37 Fix saving states on mesa3d and clean up the handling of asynchronous requests
(those originating from a thread other than the gpu thread)

glxMakeCurrent is supposed to error out when the context is
still current in another thread. NVIDIA handles that, but mesa3d errors.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6054 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-04 21:02:32 +00:00
Soren Jorvang 7ddf0aa711 Silence gcc warnings about empty statements and out-of-order initializers.
Increase ISO properties window size to make room for the new Gecko codes.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6050 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-04 14:00:59 +00:00
Rodolfo Osvaldo Bogado d0c9a38681 2 commits in one:
fix frame dumping and screenshots in d3d9 and opengl
some improvements to the new efb to ram
please test to see if the issues introduced by the new efb to ram are solved by this commit

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5862 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-09 20:56:16 +00:00
Rodolfo Osvaldo Bogado d511b50612 this commit is divided in 4 parts:
1 - Optimize pixelshadergen to avoid redundant register overflow math, with this if a game don't need this will be not applied.
this must bring some fill rate back and improve speed a little in fill rate limited systems.
2- some corrections to vertexshadergen to avoid uninitialized texture coordinates, dono if is the correct way to fix it but t least it will make house of the dead overkill playable in dx11.
the bad thing: still missing geometri in dx9, in dx11 it works exactly as on opengl.
3 - some optimization made to improve fps a little wih the latests changes made to fifo.
* back to the original code in beginfield as now it will work right.
* check for efb access more often as a lot of time is lost waiting for efb access
4 - apply a little fix for missing textures in nvidia opengl tanks to  Wagnard28 for finding that nvidia does not like invalid shader id :)
please test for any regression

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5812 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-29 14:40:37 +00:00
luisr142004 4f8a6a1573 apply some speedup to dx11 plugin + some minor stuff
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5721 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 10:12:57 +00:00
Rodolfo Osvaldo Bogado 782d9111e5 let's keep experimenting:
almost fixed real xfb in d3d, i say almost because there are some minor scalling problems. hope will fix them soon.
implemented a more intelligent index generator to emulate more accurately the behavior of the gc.
please give me feedback on this changes.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5465 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 21:58:43 +00:00
Rodolfo Osvaldo Bogado 3ff6a8bd68 small commit to try to fix issue 1509
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5460 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-19 21:54:54 +00:00
Rodolfo Osvaldo Bogado 0ea01d8462 fast commit :
make native mips loading an option to prevent performance lost in game that not need this functionality.( thanks to dorian.fevrier for point the performance lost.)
added a patch from  pierre@pirsoft.de to avoid vertex drops when index array is full in opengl implementation that do not support large index arrays

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5432 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-04 14:43:30 +00:00
Sonicadvance1 2049caa9fc Fix NoWX build, use a different define in CoreParameter, the one we all know and love, and add a Function call to VertexManager which can boost performance, tells the drivers that we don't care about the current data, because we are putting new data in it anyway. This gives quite a performance boost on OSX since it bypasses a call in the drivers that takes around 24% CPU time
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5179 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-09 21:15:28 +00:00
Glenn Rice 154bc956ad Some code clean up, and take care of some compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5090 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-20 04:18:19 +00:00
Glenn Rice feba09f7a3 Linux global build. At least the basic footwork is done here.
Basic usage:  "sudo scons install=global install"
Hopefully this doesn't break builds on Macs.  I have tested this on linux and windows.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-02 21:56:29 +00:00
Rodolfo Osvaldo Bogado 9ec5ee94b4 this was a hard fix to found:
if a degenerated primitive is passed to the VertexManager treat it as a compatible primitive, for example if a 5 vertex quad is passed treat it as a triangle fan.
as crazy at this seems it fix the sun glare in ZWW, please test an d let me know if it make a difference in other games

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4931 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-23 12:56:07 +00:00
Rodolfo Osvaldo Bogado 19b8e6bc08 Sps fixed in all the games tested, code cleanup and reordering
implemented buffer format fall back to allow hardware that don't support lockable formats to run the games with Z peeking disabled, applied as well the patch suggested in issue 1494 please give heavy test to this commit

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4365 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-06 14:24:10 +00:00