Commit Graph

286 Commits

Author SHA1 Message Date
Rodolfo Osvaldo Bogado c21f804c48 more work on dlist caching now should be a little faster
a little bugfix in vertex loading and some fixes.
not much time to work these days but  at least i can spend a little time fixing thing.
please test for regressions.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6409 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 14:42:11 +00:00
NeoBrainX ab53c84dcf Properly emulate the alpha read pixel engine register function (used for EFB peeks).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6313 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 19:52:52 +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
NeoBrainX ef75d96655 Main change: Implemented EFB pokes in DX9/DX11.
Games affected by this change: Mario Smash Football, Mario Strikers Charged Football, Monster Hunter Tri.
Other games possibly affected: Shaun White Snowboarding, Resident Evil Code: Veronica, Baten Kaitos.
This implementation will decrease performance if the game uses this feature, but the glitches will be gone. I'll add an option for this in a later commit. EFB pokes are somewhat slow in DX11 right now, speed should be okayish in DX9 though.

Other changes:
- SOMEWHAT cleaned up the EFB access code in DX9
- Fixed incompatible parameter list of AccessEFB and TVideo_AccessEFB.
- Fixed a theoretical bug in ReplaceRGBATexture2D, add support for STAGING textures
- Removed unused parameters in various DX9 functions


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6300 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22 19:40:05 +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
Rodolfo Osvaldo Bogado c203cd5dae little commit for developers:
patch/hack to make dolphin work under virtual box using Linux guest
tested under gentoo and virtualbox 3.2.8 with 3d acceleration on

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6262 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-06 18:03:31 +00:00
Soren Jorvang c8c805f720 Remove unnecessary shadow variables and signed/unsigned comparisons.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6244 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-01 12:38:31 +00:00
skidau 23f8da4bf7 Fixed the glitches when an internal resolution other than Native was used in the OpenGL plug-in.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6243 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-01 11:03:37 +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
Glenn Rice a1daa636c2 Take care of some compiler warnings from unused variables, and a little code cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6081 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-10 01:08:22 +00:00
Glenn Rice 957e7c415e Several little things:
Clean up of the input selected for the opengl x window in linux.
Fix a potential segfault when taking a screenshot (happens consistently when using "Save Targets" from the video debugger window).
Fix a memory corruption error that results from the wrong image size being passed when dumping textures.
Make the screenshot hotkey configurable.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6067 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-08 00:13:05 +00:00
skidau c76ba17ff4 Stub out glGetError() calls from the release build of the OpenGL plug-in (found by ector, code by LordMark). Gives a speed-up in the OpenGL plug-in.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6039 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-03 10:48:49 +00:00
NeoBrainX d411924eee Marginally improve FPS counting logic in the video plugins.
Should fix DX11 peaking at 59 FPS instead of 60 FPS.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6026 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01 14:43:07 +00:00
Soren Jorvang 53f5bc682d Make Cg conditional on those platforms for which it is available.
Of course, this doesn't do much good without another shader compiler..

WIP of OS X application bundle building.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5961 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 10:24:16 +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 0cdfef4056 fix for msaa in opengl
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5850 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-07 22:09:52 +00:00
Rodolfo Osvaldo Bogado 19cdaaae89 little fx to solve issue 2897
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5839 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-05 19:27:08 +00:00
j4ck.fr0st 8e4ef9b9e5 Slightly change my last commit with sorens idea of using CG_VERSION_NUM instead.
For everyone having black screens on Windows: Try switching off MSAA, it seems to be broken (at least for me)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5832 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-03 21:21:28 +00:00
j4ck.fr0st 6cc3e4ba14 Add the patch from Dragonlord for broken Cg 2.1 on Linux with ATI cards (Fixes Issue 2508). Shouldn't affect anything else than Linux, please test it there.
Update Issue 2508
This should take care about the black screen. Please open a new issue for other problems that may arise.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5830 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-03 19:10:23 +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 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
Rodolfo Osvaldo Bogado 3435c0f647 fixed blending in dx9 and dx11
fixed fps counter in all the plugins
enjoy

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5778 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-24 15:58:06 +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 cb1694252b more bug fix in dx11:
fixed screen clearing and simplify drawClearQuad a little
put some nice code from dx11 that i like in dx9.
modify plugin spec preparing for implementing efb poke (is not used often but is a missing functionality so..)
please test.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5710 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15 21:19:09 +00:00
Rodolfo Osvaldo Bogado b20c04aa45 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5629 8ced0084-cf51-0410-be5f-012b33b47a6e 2010-06-06 14:44:35 +00:00
Rodolfo Osvaldo Bogado eb6fabdb00 apply Wagnard28 patch for nvidia cards texture problems
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5616 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 02:15:13 +00:00
luisr142004 2e783d9769 space changes, merge #defines, language fix, and code reorder/cleanup :P
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5614 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 01:38:22 +00:00
Rodolfo Osvaldo Bogado c98f8a96d2 HUGE commit :)
in general cleanup and bugfix disable pierre  patch for the moment as it causes problem in some games and hopefully fix the remaining missing textures for nvidia users in opengl.
make the code in pixelshadergen looks nice and readable.
D3D: this is a ultra experimental commit please check for regressions or error.
make the efb Scale / super sampling level customizable to improve the output quality and let the user configure quality according to his hardware.
is everyone likes this change will translate it to opengl
please test


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5612 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 00:01:18 +00:00
Jordan Woyak 05ef8231b8 Changed both video plugins to save PNG screenshots. Made GCPad New default in trunk (it already is in stable). Fixed a hack in new wiimote plugin. Other minor changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5532 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-29 10:09:24 +00:00
Soren Jorvang daf1069c27 Fix variable types.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5483 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 20:46:28 +00:00
Rodolfo Osvaldo Bogado 2c7a08fc61 after a good commit lets make some experiments:
implemented fixed efb scale to improve alignment and discard some error caused by incorrect scale.
make both plugins work similar. this must improve opengl image quality a lot.
also implemented dynamic resizing in opengl, this way the resolution math the windows resolution on resize.
this is highly experimental so please test a lot.
implemented shader dumping on error thinking  in future experiments with shaders.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5458 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-19 03:15:36 +00:00
Rodolfo Osvaldo Bogado aaafff7f9d a little fix for real xfb in opengl that stop working after one of my commits.
thanks to lordmark to point me the exact revision.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5451 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-14 21:47:16 +00:00
Rodolfo Osvaldo Bogado a25dfc47b4 fixed xfb bumping introduced by my last commit.
implemented loading of native mips, see sms water :).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5366 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-14 13:57:16 +00:00
Glenn Rice 33a64d5db0 Big restructuring of how the video plugin works. In linux and windows you shouldn't see a change in the functionality; however, there are changes in how render to main or not, and fullscreen modes, and such are handled. Input is largely restructured for the video plugin. It is now handled by the host. Keys for pausing and changing fullscreen are configurable. More will probably be later. This is probably classified as highly experimental.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5336 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-12 01:33:10 +00:00
Rodolfo Osvaldo Bogado 3746b9e505 corrected some things i forget in my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5273 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-04 13:19:03 +00:00
Rodolfo Osvaldo Bogado a4736f7f6b back to limit vps instead of fps as this fix fps limit and now it works correctly as now the sync between the plug in and the core is almost correct.
fixed fps display in the top bar, now it shows the real fps of the game.
some code clean up and some corrections to make everything work right in the reference renderer.
multiples xfb now is broken even in single core as is was not an error caused by dual core, i really dono where the error is,everything looks correct but if you test a game with multiples xfb or the ipl you will see the error.
ector if you can take a look at he code and throw me some ideas i'll thank you.
please test.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5272 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-03 22:22:55 +00:00
Rodolfo Osvaldo Bogado 49d568488c fixed fps limiting when using using virtual xfb, now fps = vps, in fact now real xfb is as fast as no using xfb, i'm thinking now that the correct thing is leave it enabled as default, and even remove the option.
the problem is one strange behavior i found, in opengl when xfb is enable, frame limit causes the frame rate to be limited exact half the correct speed, so if you choose auto and the game uses 30 fps you get 15 fps
so in opengl, you have to limit to the exact double of the game speed, 100 to pal games and 120 to ntsc.
in d3d this not happened every time, it just happen when you change some time consuming setting like changing the ssaa or resizing the window, in that case you have to disable and re enable frame limit to get the correct fps
to all the devs please if you can help me debug this, will give you a lot of thanks as i'm short in time to debug this error and is driving me crazy not to find the source of the problem.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5249 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-28 23:51:32 +00:00
Rodolfo Osvaldo Bogado beee4f4804 other experimental commit:
applied mlkbouba patch to make Mario Strikers Charged Football work (i do not own the game so please test).
some minor tweaks to the plugins to improve performance. for game that do not use xfb the best settings are dual core enabled, audio throtle disabled, frame limit set to the desired value, and xfb off.
change the frameskip calculations to use fps instead of vps as in dual core vps != fps caused by unresolved sync problems, till this problems are fixed the best for game play is calculate times in base of fps.
please test and let me know the results

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5239 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-25 22:01:33 +00:00
donkopunchstania 70627c5652 Extend the OGL virtual XFB to handle games that use multiple XFBs to make a frame. This should allow games that require the XFB to work without using a real XFB in RAM which is slow and limited to the original resolution. To use this enhancement you must check Use XFB in the options. The previous option was renamed Use Real XFB. I don't think this works with the aspect settings yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5185 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-10 06:45:13 +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
Rodolfo Osvaldo Bogado e93e777ffb second try to implement a more correct safe texture cache, implemented full hashing of tlut textures as they are the more problematic, this should solve virtually all the problems with characters in all the games that have them.
sorry to tell but this will bring a speed drop, so let you decide if this change stay or not.( used the fastest open source hash algorithm i know) 
do not apply full hashing to other format because it kills the performance.
for popular request added 9x SSAA believe me will kill your graphic card even if is the best but the image quality is exceptional.
as always please test and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5034 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-08 23:23:04 +00:00
Rodolfo Osvaldo Bogado 811cfb059e D3D and Opengl:
reverted a tiny leftover of my safe texture cache commit
D3D
renamed the SSAA modes to use samples as MSAA now they are 2,25x and 4x.
OpenGL:
fixed a nasty logical bug introduced in 4984 that causes efb corruption when efb to texture is used
re enabled shader caching as it was not producing errors.
fixed efb misalignment caused by integer rounding still a bit misaligned but many games will look better now

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5020 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-06 16:05:48 +00:00
Rodolfo Osvaldo Bogado e98a273b54 fixes for my last commit:
chage the global format of the screenshots to bmp, is correctly supported by both plugins and is faster.
reverted the changes in safe texture cache, will try to make them more stable then commit them, this should fix compilation in linux and macand error introduced in MP games
corrected all the issues commented by ector, thanks for the comments alway is good that the code is revised by others to find missed spots.
please report any remaining issue to solve them.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5001 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 14:13:03 +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