Commit graph

252 commits

Author SHA1 Message Date
Soren Jorvang
f09fd080fb Avoid shadowing variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6628 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-20 17:06:39 +00:00
NeoBrainX
aef7f6c3f5 Win32-only:
- Merge the EmuWindow class to VideoCommon.
- Implement free look in the D3D plugins. Seems like it had broken before though; only rotating the view works..


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6616 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 19:43:18 +00:00
NeoBrainX
4553699077 Merge some state loading stuff to VideoCommon and fixed a crash on Linux system when trying to save a state.
Credits go to miquelmartos from the forums for the patch ;)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6593 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 18:21:14 +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
NeoBrainX
7698d85a8e DX11:
- Speed up MSAA by using custom resolve shaders instead of ID3D11DeviceContext::ResolveSubresource().
- Fix EFB access when MSAA is enabled.
- Implement the "force linear filtering" option.
- Compile shaders using shader model 4.1 or 5.0 if available.
- Some minor cleanups.

Who cares about DX9 and OGL anyway :P

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6481 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-27 11:11:05 +00:00
Matt Callaghan
ebe5472e1d Tiny commit. Just re-added 3D Vision to the config dialog. Hope nobody minds, I made sure it gets greyed out and all that. Sorry about my lack of commits, got another ongoing project that's gotten me a bit hooked.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6471 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-24 17:13:12 +00:00
Jordan Woyak
49120d113f Reorganized some video config dialog related code. Deleted remnants of the old DX11 config window.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6460 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-22 22:17:35 +00:00
NeoBrainX
ee21237d6a Polish, fix and otherwise improve the video plugin configuration dialog:
- Add some info about a backend's feature set (MSAA, Real XFB, EFB to RAM, ..) to VideoConfig
- Gray out options if they aren't supported by the backend or if changing them doesn't affect anything (e.g. changing STC mode if STC is disabled)
- Allow signed bytes for D3D11. Not sure if this causes glitches, but it should work
- Call wxEvent.Skip() in the event function handlers, not sure if this fixes any bugs but the old code definitely caused bugs during development of this patch
- Fix a memory leak in the configuration dialog if D3D11 is used
- Other minor stuff that doesn't need to be mentioned or which I forgot

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6450 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 14:47:28 +00:00
Glenn Rice
7788bac40c Fix ogl screenshots for windows.
Fix the macosx build (perhaps).
This changes the JitIL timed profiling to using assembly language to obtain the time.  It does seem to be faster.  Not sure if it will work on macosx, but if it does it has the necessary precision that gettimeofday does not have.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6448 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-20 03:24:51 +00:00
Jordan Woyak
0816fa2629 Fixed RealXFB being enabled when XFB box is unchecked. Moved some shared code into VideoCommon. Renamed EFBCopyDisable setting to EFBCopy"Enable" in the code and inifile. Fix DX11 settings not loading. Fixed Issue 3378.(graphics settings dialog displaying gameini settings in game)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6435 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-18 03:50:50 +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
Jordan Woyak
db35fe4100 Made the graphics plugins use a shared configuration dialog. There are a few minor issues: unsupported settings are shown, dx9 3d settings are missing, tabs/groups could be organized better, could use tooltips, cmake and scons need to be fixed.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6422 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-15 09:54:07 +00:00
Jordan Woyak
0da42fcca7 Merged some FramebufferManager code into VideoCommon.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6417 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 23:31:53 +00:00
skidau
b565618442 Removed the wait for swap when XFB is used. This fixes flickering in "Fragile Dreams" and "Another Code R".
Fixes issue 3466.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6360 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-08 08:51:30 +00:00
skidau
7410056536 Added the wait/sync back in the video thread on XFB swaps. Fixes issue 3391.
Changed the VI interrupts to occur on writes instead of reads.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6304 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 12:26:57 +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
skidau
e9734084ee VideoInterface and Progressive Scan fixes
The "Enable Progressive Scan" option in the Wii menu now controls whether the Wii/GC will detect a progressive scan display.  This affects the timing of some games (both GC and Wii).  Usually, the checkbox should be unticked as progressive scan displays require higher bandwidth.

This fixes the slow speed in NBA JAM.  This also fixes the hang in Megaman Network Transmission.  This should fix Deadly Creatures (turn off progressive scan).

Fixes issue 3314.
Fixes issue 3066.
Fixes issue 2571.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6297 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 14:50:42 +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
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
1450385a53 Undid the merges made to the OpenGL plug-in's Init and Shutdown functions as these changes broke non-Windows builds.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6241 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-30 16:11:31 +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
7eb99b9088 Fixed r6235 for the Mac and Linux builds. Thanks, glennricster.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6238 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-28 21:28:49 +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
Soren Jorvang
db072e1986 Add Common::AtomicDecrement for gcc to match win32.
Use the debug option for conf.CheckWXConfig on OS X as on Unix.

Take care of a few compiler warnings.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6084 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-10 08:29:15 +00:00
Marcos Vitali
3b7a6ce336 I've observed that "FIFO is overflown by GatherPipe" is not real overflow.
Really that happens because the fifo.CPReadWriteDistance is negative.
Example: CPReadWriteDistance: -864 CPEnd: 10092672 fifo.CPBase: 9568416
In SMG this is because  PI_FIFO_RESET is writing and after fifo.CPReadWriteDistance will be setted to 0.
To Prevent that, I've Implemented AbortFrame function in the CommmandProcessor. It should fix overflown because of that. 
Note: There is other issue (Issue 2846) where the fifo.CPReadWriteDistance is negative too but the effect is different.
I'm working to solve this.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6083 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-10 07:25:35 +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
4bef335632 Remove duplicate instantiation of PNG wxImage handler.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6028 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01 15:48:11 +00:00
Glenn Rice
06fb0c292a Removed the hackery that was being done with the plugin configuration dialogs on windows. That was unnecessary and ugly. The HWND type is dead for non windows. Also cleaned up the gui a little.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5999 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-30 03:51:49 +00:00
Glenn Rice
3859a7dce2 Lots more work on making the frame aui stuff functional.
Also added a DSPCORE_STOP state.  The DSP-LLE debugger window segmentation faults if it is openned when a game is not running.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5931 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-22 02:05:28 +00:00
Glenn Rice
b175397cb7 Some work on cleaning up the FrameAui code. Primarily this fixes the debugger windows for the audio and video plugins. They are now all subclasses of a wxPanel, instead of a mix of wxFrames and wxDialogs. This makes them work correctly in linux, windows (they really didn't before), and most likely on MacOSX too!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5913 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-19 02:09:34 +00:00
Glenn Rice
02ce753b76 This is basicall linux code cleanup. We don not need to pass the X display handle from the video plugin anymore. The wiimote plugins now open their own display handles, and the GUI uses the display handle of the main window frame. Only the window handle from the video plugin is needed. The pWindowHandle variable now passes this instead of the display handle.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5884 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 14:14:57 +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
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
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
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
Shawn Hoffman
1d8db5ce3f osx buildfix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5402 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-23 19:15:44 +00:00
Glenn Rice
140332c02e Move fullscreen display resolution control to the GUI with the rest of the fullscreen toggling code. This removes redundancy of code that was in several places through the various video plugins. Unfortunately it means the fullscreen resolution setting also had to be moved to the main configuration dialog. I am sure that will meet some resistance.
Also added a window size setting for windowed mode.

Also pulled some X11 specific code out into a separate file.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5395 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-22 04:28:34 +00:00
Glenn Rice
0a12b9d9f5 Logical reorderring of the GUI boot sequence. Also a little clean up in the OpenGL plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5379 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-17 03:17:36 +00:00
Shawn Hoffman
0dc924efef osx buildfix, add resolutions to ogl dialog
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5363 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-14 04:32:59 +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
Glenn Rice
f6c8fd691a Fix state saving and loading in linux. Apparently that is why the OpenGL_MakeCurent was in the video plugin DoState.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5265 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-01 23:13:26 +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
Glenn Rice
02edaf3db8 Added several XKeyToString translations.
Fixed minor font issue with wiimote pad button dialog.
Removed unnecessary OpenGL_MakeCurrent call from DoState.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5209 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-17 18:58:19 +00:00
Glenn Rice
721935c6ff Several little fixes.
Fixed a segfault in linux when a cd/dvd drive is empty or invalid and "Boot from DVD" or "Show Drives" are selected.
On all platforms if a game fails to load show the game list again.
The other things here are essentially code cleanup and won't be noticeable by most users.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5204 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-17 01:54:40 +00:00
Glenn Rice
5fa18ae114 Fixed an issue that caused the render to main window to lose focus if the gfx config dialog is opened while the emulator is running. Only affects linux. Also fixed a few preprocessor conditionals.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5186 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-10 17:29:19 +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