Commit Graph

597 Commits

Author SHA1 Message Date
NeoBrainX 378d3aaa52 Make FIFO watermark tightness configurable instead of hardcoding it.
To change it, right click the affected game in the iso list, select Properties, and enter some constant for "Watermark tightness". Reasonable values range from 20 to 200.

FIFO seems unoverflowable on my computer no matter what I set this value to, so test whether tuning the value helps you ;P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5907 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 15:47:28 +00:00
NeoBrainX da4c3a5f29 Committing some cleanups by avindra:
- fix numerous warnings
- make some variables unsigned
- remove redundant code and header inclusions
- make code more compact in lots of cases

Committing some additional changes by myself:
- additional header cleanups
- cleanup DX11 initialization/shutdown process (hinted at by avindra)
- Remove the cgD3D9 stuff from Externals since it's no longer needed

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5903 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 10:11:34 +00:00
Soren Jorvang b0041f00a3 I missed some cases in r5901:
Because we only ever call Pos_ReadDirect (and through that, DataRead<T>)
from JIT generated code, the compiler may not get the heads-up to properly
prepare for run-time instantiation of those template functions.

Explicitly instantiating Pos_ReadDirect gets around that issue.

Also force DataRead* inline as gcc didn't always do that itself when the
DataRead functions in turn were called from (other) template functions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5902 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 08:30:40 +00:00
Soren Jorvang faf586e8f1 Because we only ever call Pos_ReadDirect (and through that, DataRead<T>)
from JIT generated code, the compiler may not get the heads-up to properly
prepare for run-time instantiation of those template functions.

Explicitly instantiating Pos_ReadDirect gets around that issue.

Also force DataRead* inline as gcc didn't always do that itself when the
DataRead functions in turn were called from (other) template functions.

I am far from a C++ language lawyer, so I cannot speak learnedly about the
correctness of this solution, but it works.

Dolphin.app built on OS X 10.6 now actually works on 10.5 as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5901 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 05:31:51 +00:00
Rodolfo Osvaldo Bogado f78133f261 big changes here:
- Eliminate the useless check for cpu modifications option from efb to ram as it must be enabled always
- use constant names in dx11 for buffer length calculation instead to simplify code reading
- implemented scaled efb copy in opengl, still bugy in some games, the option is not in the gui but will add it when it works perfect
- Change the depth calculation behavior:
if the game use z textures is exactly the same as before.
if the game do not use z texture calculate z values in the vertex shader. the advantage id this approach is that early z culling is applied,
improving fill rate. this mus speed up things, even with ssaa and msaa enabled.
please test for regression and enjoy.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5896 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 00:18:31 +00:00
Soren Jorvang 4b1a3152b6 Plugin_VideoOGL has been using an old duplicate of VertexLoaderManager.cpp.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5895 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17 23:36:03 +00:00
NeoBrainX aa88d8b790 Since apparently no one feels like fixing SMG FIFO overflows, commit iceman4love77's fix. No idea if it works or what it does, he seemed pretty confident that it works though.
Only fail once if EFB pokes are requested in DX9/DX11.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5888 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 21:51:35 +00:00
Rodolfo Osvaldo Bogado 665d83ed45 some more minor optimizations introduced by aavindraa, i only corrected evaluation order using some ().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5883 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 12:36:55 +00:00
luisr142004 c2ee89b170 include the MP compiler option, which will allow for faster compiling + some minorly stuff :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5882 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 09:22:53 +00:00
Rodolfo Osvaldo Bogado 9cb41e7c70 hopefully fixed zww issue with new efb to ram.
implemented new efb to ram in opengl
modified TextureConversionShader preparing the implementation of new efb to ram in dx11
please test for regressions

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5874 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-12 19:30:25 +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 539f63b58b ok, here goes a really experimental commit:
replace efb to ram implementation by a hybrid approach.
explanation:
when copying from efb to texture, instead of make a copy to a texture or to the ram, copy the data to both, in hi quality to the texture and in native quality to the ram.
then instead of re-decoding the data from ram (very slow) use the data in the texture.
to improve this even more, test if the cpu has modified the data in the ram copy, if so, update the texture in memory and mark it as dynamic to avoid redundant work in future frames.
having all this implemented this is what is archived:
sms: full quality with scaled efb copies and fully functional goop cleaning :)
ztp: efb to texture speed with full map support.
nsmbw: this is a hard to emulate game, as it make a lot of shading and texture modification in cpu. it only have 35 fps in my system with new efb to ram but is 10 fps faster than normal efb to ram.
this game also show me another unimplemented feature, copy efb to multiple textures at the same time (is used to animate coins and other things in the world).
this is a remaining todo in efb to texture.
a lot of games should improve, so please test and let me know any regresion caused by this commit. 
if everyone likes this the next step is, implement efb to multilpe textures and merge efb to ram and efb to texture.
then port to the other plugins.
enjoy.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5846 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-06 22:27:13 +00:00
Rodolfo Osvaldo Bogado 0f5998d358 little fix for error introduced in shader generator in R5842
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5844 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-06 17:21:24 +00:00
luisr142004 e9e12ff100 cleanup + some eolz
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5842 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-06 13:14:51 +00:00
Rodolfo Osvaldo Bogado 12a676c273 this is a pure optimization commit:
return to the  old values in constants in pixelshader, the old values give mi 3 or 4 fps more,(maybe some kind of compiler optimization) in some games and with the current algorithm i notice no difference with this values, please report any problem.
optimizes SSAA to make it a little faster and, the quality should be the same but with a little speedup.
change the way the frame is processed depending is xfb is enabled or not to make this a little faster.
please test and report any problem

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5820 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-02 17:09:53 +00:00
Rodolfo Osvaldo Bogado 2455037d26 little fix for an error introduced in my last commit, thanks to Soren for pointing the error
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5817 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-01 12:51:55 +00:00
Rodolfo Osvaldo Bogado a52d2f0ccc little fix for may last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5813 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-29 16:54:15 +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
Orphis 8315aa1432 Fix some projects to include CLRun/include to find the OpenCL headers.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5809 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-29 09:15:29 +00:00
Orphis 685bae34e5 Dynamically load OpenCL on Windows with CLRun. There shouldn't be the need to make a separate build now or download a big SDK to link Dolphin.
If compilation fails, rebuild the whole solution as Visual Studio struggles with the not so complex project dependencies.
ATI users still need to install the Stream SDK as it's the only way to have an OpenCL driver.
NVidia users just have to install a recent driver (version 197 is tested and working).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5808 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-29 02:23:09 +00:00
Soren Jorvang 8c3ed5dc46 Lint.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5796 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 13:12:28 +00:00
Marcos Vitali f94eed887b Uncomment Ayuanx patch, this was commented in my last commit by error, My apologize...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5784 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-25 00:13:06 +00:00
Marcos Vitali 10b5d2371c My first commit :D
Dual Core sync fix.
When the FIFO is processing data we must not advance the cpu cycles in CoreTiming because in this way the VI will be desynchronized. So, We are waiting until the FIFO finish and while we process only the events required by the FIFO.
This should fix Issue 2072 .
This affect to all games in dual core mode.
Please, You can test all games with VPS limiter auto, 60, 50 depending of the game and compare with prev revision.
For example now NSMB in the video Intro has 60 fps (prev 30 fps) :D or SMG does't need anymore FPS Limitter Hack to get 55-60 fps
Beside the slowdowns now are more softly and the fps more stables because the VI sync is almost perfect.
The Core Timing and Fifo modifications are delicated. Please report if this hang any game. Don't forget check with prev revision.
Enjoy it! Thanks to Rodolfo for teach me all about dolphin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5777 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-24 13:28:54 +00:00
nodchip 5cf491af64 VideoCommon: A minor speed up.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5772 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-23 03:02:15 +00:00
xsacha 21fb4cb96c Add a toggle option for OpenCL in Config (in Advanced Settings). Default is off.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5768 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22 13:17:01 +00:00
Orphis 2cc5b98f07 Added OpenCL texture decoding to RGBA usable by DX11 for formats RGB565, RGBA8, RGB5A3 and CMPR
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5765 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22 03:10:43 +00:00
Orphis c2e32371f6 Refactor and prepare the OpenCL texture decoder for decoding textures to RGBA format required by DX11.
Fix the decoder codepath when OpenCL is enabled and the DX11 plugin is used.
Added the DX11 plugin to the Dolphin project dependencies.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5764 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22 00:52:17 +00:00
hrydgard 6a88241e64 D3D9: Delete some long dead code. Also add one more statistic: number of compiled shaders that actually have unique code (not accurate unless you delete the shader cache before running). This stat clearly shows that in f-zero we create 5x as many pixel shaders as we should, so there's clearly a problem with the shader ID generation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5754 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-20 22:23:34 +00:00
Rodolfo Osvaldo Bogado 4ab0e4b8a0 fix for rbga8 decoding that causes problems in nsmbw
fix for screen clearing in opengl and d3d

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5749 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19 21:12:09 +00:00
hrydgard ccbc1feb0b D3D9: Fix issue where the shader caches were lost whenever the render window was resized. Add some error logging to LinearDiskCache. + some minor cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5747 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19 16:22:24 +00:00
Rodolfo Osvaldo Bogado 8c6ae1f6f4 add a path to texture decoder to produce only rgba textures, this will make texture loading in dx11 a lot easier and give a little performance boost to.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5746 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19 13:31:40 +00:00
luisr142004 ab1e5f8537 apply a patch done by xsacha :) + some minor stuff :p
what changes do: cmpr decoding is fixed and rgb5a3 is re-enabled

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5744 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19 07:59:53 +00:00
ayuanx 221e722284 Linux build fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5725 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 14:22:17 +00:00
Soren Jorvang ce3eb2a13b Automatically detect and use shared library packages for
LZO/SFML/SOIL as already done for GLEW/SDL/zlib.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5723 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 12:42:49 +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
ayuanx 9b6ccb4d77 Alleviate FIFO overflown situation a bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5719 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 07:22:47 +00:00
ayuanx 4464c11457 Sorry, I forgot to implement LoWatermark code for SC, now both SC & DC are working.
By now I'm pretty sure some games are written in multi-thread, and they depend on Watermark to suspend/resume their threads.
So without Watermark, they will never work.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5709 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 14:24:01 +00:00
ayuanx 40d87e0f8f Oops, the HiWatermark interrupt latency is too long for game to react.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5707 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 11:20:05 +00:00
ayuanx 105f64359a Games like "Star Fox Adventures" which were enabled in r5681 are now InGame, though the watermark slows the emulator a bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5706 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 10:58:14 +00:00
ayuanx 64299206d1 I was wrong on the CPEnd issue, which reveals CPBreakpoint > CPEnd is possible and that explains why some BPs could never be achieved before.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5705 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 09:58:43 +00:00
ayuanx 673b9ac179 Implemented accurate BP and accurate Watermark, this should eventually retire FAKE_Watchdog.
AbortFrame is not implemented yet.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5699 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 21:55:40 +00:00
ayuanx 857f1f4d38 Fixed GPFifo out of bounds by 32 bytes
Fixed incorrect FIFO out of bounds check
plus a bit optimization of CheckPipe()

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5692 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 16:32:40 +00:00
Rodolfo Osvaldo Bogado fc12291806 some fixes to my last commit and ....
modify shader generator to produce native sm 4.0 code.
eliminate compatibility mode in dx11 so now all shader must work much better.
please test.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5691 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 14:36:01 +00:00
NeoBrainX a0f1797e46 Revert even more stuff from r5681.
I have no idea how all this stuff works, but this fixes at least some (if not all) games which worked before r5681.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5689 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 09:05:47 +00:00
Rodolfo Osvaldo Bogado 41266b5ed0 fast fix for pixel shader compilation in dx11
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5687 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 03:09:44 +00:00
ayuanx 7e27914b45 Revert r5681
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5685 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 23:26:22 +00:00
ayuanx f7a91ff3cd Unleash the beast.
Improved dual core mode for "Metroid Prime 2", "Star Fox Adventures", etc. 

I should have committed this long time ago, but I don't have every game to test compatibility... Any way, better late than never.

PS: If any regression observed, feel free to revert this rev.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5681 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 20:06:29 +00:00
NeoBrainX 3ea2a1387c Add a DX11 video plugin.
Might or might not work for you, yet.
Anyway, read the soon to be created forum thread on this plugin before asking any questions.

Huge thanks to rodolfoosvaldobogado for helping me out in various areas.
Also, thanks to everyone on IRC who supported me during development ;)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5680 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 19:50:06 +00:00
Rodolfo Osvaldo Bogado 20e3919033 apply James333 patch to make dx9 plugin use wxwidgets.
some other minor warning fixes.
thanks to James333 nice patch :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5679 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 19:41:07 +00:00
NeoBrainX a6ebc8234f Preparing stuff for DX11:
- be more strict with the input signature of generated pixel shaders
- replace the D3D parameter with an API_TYPE one, so that we can further distinguish between DX9 and DX11
- for what it's worth dx11 (using vs_4_0) doesn't support D3DCOLORtoUBYTE4; added a workaround for this
- add a "dx9-" prefix to the shader cache files to avoid conflicts with dx11 shaders

Apart from that we're calling CommandProcessor::Shutdown() in main.cpp,Shutdown() now.
Delete all files in User/ShaderCache if you want to save a few KB disk space :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5659 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 15:49:21 +00:00