Commit Graph

191 Commits

Author SHA1 Message Date
Soren Jorvang d78be40be9 Print the performance status in exactly one place.
Placing the render window at position 0,0 makes it unmovable on OS X.

Use the conventional r1234 format for SVN revision numbers.

Delete mis-copied .svn directories from the application bundle.
 
Only warn about a failed low-memory allocation if one was requested.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6811 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-11 04:09:11 +00:00
Rodolfo Osvaldo Bogado d47d2a05d2 some little optimizations and some cleaning.
now lighting should be fully functional again in SM 2.0 cards

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6794 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-09 14:13:24 +00:00
j4ck.fr0st bedc889a56 Fix alpha reads (hurray for the ZWW Pictograph quest and Killer 7)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6778 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 19:51:28 +00:00
Rodolfo Osvaldo Bogado f869281301 normalize the efb to texture process for color textures to make it work the same in all the plugins and with the same accuracy as real hardware (almost :))
please test for regressions and fixes.
some little changes to make pixel shader more dx9 sm2.0 friendly. the condition is not to use pixel lighting ( sorry no hardware support for the quantity of parameters needed).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6777 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 19:23:57 +00:00
donkopunchstania d16357cd5c Add anvideo config option to automatically resize the render window to the size of the game's output resolution. This avoids artifacts that appear when the render target is scaled to fit a window of a different size.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6764 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 04:57:59 +00:00
Rodolfo Osvaldo Bogado 809670611b improve z copy a little further in 4 bits copy,
fix and error introduced by my last commit in dx11 plugin

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6754 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 20:50:51 +00:00
Rodolfo Osvaldo Bogado d435fd8957 corrected depth copy shader in dx9/dx11 to improve accuracy when doing efb to texture for depth formats
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6751 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 17:16:52 +00:00
NeoBrainX 5cad834c96 D3D9:
- Assign width and height to the actual powers of two rather than to the exponents...
- Clean up FramebufferManager()
- Make use of more depth buffer formats to prevent some devices from failing to create a depth buffer

Should fix issue 3256.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6730 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-03 14:35:07 +00:00
NeoBrainX 07d947c834 DX9/DX11: Fixing some maybe possible crashes if a game was started, the config dialog opened and the game closed again. Due to other issues this still happens quite often though...
Various warning fixes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6684 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-29 13:07:00 +00:00
NeoBrainX 7de6773483 Invalidate texture cache when the STC or native mipmaps options are changed.
Fixes minor graphical glitches in these cases.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6677 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-28 12:46:00 +00:00
NeoBrainX a271bb8182 Implement pixel data reinterpretation on EFB format change.
Whatever that means, it fixes that stupid Super Mario Sunshine glitch and possibly lots of other stuff, so test as many glitchy games as possible with this ;)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6669 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 21:56:20 +00:00
NeoBrainX 6e8df50fff Yet another ClearScreen fix, should be the last one now.
Should fix almost all regressions of the recent ClearScreen changes and keep the fixed stuff.
The Super Mario Sunshine glitch is caused by another issue and will be addressed in my next commit.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6668 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 18:09:03 +00:00
Rodolfo Osvaldo Bogado c2283ad6c0 Second Experimental commit:
corrected peek color and peek z to  correctly emulate real hardware formats.
implements native gamma correction.(i don't own any game that uses this functionality so i will appreciate feedback)
i need a lot of feedback in this changes please
enjoy

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6664 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 03:18:01 +00:00
NeoBrainX 6087987f85 ClearScreen fixes:
- Clear alpha channel to 0xFF instead of 0x00 whenever we (re-)create the EFB texture
- Disable color/alpha channels whenever the actual EFB format doesn't use them

Fixes issue 2826.
Fixes issue 1879.

Please check if issue 3014 is fixed now, as well as any other games which might have broken due to ClearScreen changes.
For what it's worth, Super Mario Sunshine still shows a small glitch even with these changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6635 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-21 22:18:40 +00:00
NeoBrainX 9ebf507a55 Various ClearScreen fixes.
Will fix some games and break some others.
Assist trophies in SSBB work fine now, Super Mario Sunshine is a little broken again.
Still needs some more work...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6627 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-20 16:57:29 +00:00
gnick79 670192e568 * revert Clear Screen's stuff from r6604
reason : failure! (are needed more testing)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6621 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 22:00:25 +00:00
nitsuja- 6492b84ca5 this probably doesn't fix anything noticeable, but, it seems like a bug that C_COLORMATRIX+4 overlapped with C_PLIGHTS
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6620 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 21:09:29 +00:00
nitsuja- 98fe8437ae reduced frequency of dx9 ps_2_0 pixel generation errors, and made dx9 efb depth peek of 16-bit depth buffer not use 24-bit adjustment factor. shouldn't affect other the plugins.
(probably nobody else cares, but I need at least one video plugin that actually works on this computer)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6618 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 20:59:23 +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
gnick79 522746b2c2 **Changes**
* More formats recognition for "Clear Screen" step. Improved the ability handling the alpha channel (% color translucency).
* Related to CPUID detecting:
	- Added support displaying correct SysInfo for recent multicore Intel CPUs x86-64 with HT/SMT (Core i3/i5/i7 and Xeon) based on Nehalem architecture.

+ minor and passive changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6604 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-18 18:23:22 +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 aa226aaf41 Revert most stuff from r6517 and revert r6501.
PixelShaderGen changes broke Mario Kart Wii, ClearScreen changes broke Super Mario Sunshine.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6592 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 17:40:45 +00:00
NeoBrainX 5d16185cf9 Fix some other off-by-one errors in DX9/DX11.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6560 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-11 21:19:25 +00:00
NeoBrainX 7473a0cf98 VideoCommon: Use integer arithmetic instead of floating point arithmetic when dealing with EFB scales.
Should fix problems caused by EFB scales other than Native (excluding fractional!). Test whether this fixes games which work fine with native EFB resolution but show glitches with higher internal resolutions.

Also fixed numerous warnings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6549 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-10 15:54:14 +00:00
NeoBrainX e2543689b8 DX11: Fix a crash when accessing the EFB.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6536 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 22:28:46 +00:00
NeoBrainX 8d9e1f2dd1 DX11: Remove some dead code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6533 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 17:39:42 +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
Rodolfo Osvaldo Bogado cb58eb45f0 posible fix for issues 2850 and 3407
thanks to tapcio for the info

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6502 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-30 21:44:54 +00:00
Rodolfo Osvaldo Bogado 28216fc7f2 possible fix for issue 3014
thanks to iceman4love77 for tracking the error

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6501 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-30 15:03:49 +00:00
NeoBrainX c540995193 DX11: Fix two crashes. One occured when trying to run a game with D3D 10.0 level hardware, the other one when closing a game when MSAA was disabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6494 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-28 17:25:19 +00:00
NeoBrainX fa5f206797 DX11: Disable MSAA when using a GPU which only supports D3D 10.0.
10.0 level hardware can't create multisampled depth buffers which can be bound as shader resources as well, but we need that for e.g. EFB access or EFB copies.
Only multisampling the color buffer doesn't work either since color and depth targets must be using the same sample count.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6491 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-28 15:23:51 +00:00
NeoBrainX 5ae1b65388 DX11: Fix stuff if MSAA is disabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6482 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-27 11:37:57 +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
Jordan Woyak e6658d5339 Minor change to ease video plugin merging. Made static NativeVertexFormat::Create function into a virtual function of VertexManager. I believe this is the last bit of code which is only declared in VideoCommon and defined in each of the plugins.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6479 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-26 09:25:08 +00:00
NeoBrainX 76b9e975d5 DX11: Fix mipmaps. Someone forgot creating them at the proper time ;P
DX11: Fix a DX11 debug runtime error caused by the vertex shader output signature and the pixel shader input signature not matching if per-pixel lighting is disabled. Someone forgot disabling those pixel shader parameters ;P
DX11: Enable use of dynamic textures wherever possible.
DX9: Remove two unnecessary TODOs. Someone forgot removing those since they've been obsolete for a long time ;P

Anyway, at least working mipmaps and dynamic textures should increase DX11 performance a bit. And "a bit" is more than my usual "marginally" ;)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6473 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-24 19:13:19 +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
NeoBrainX d36ede020c DX11:
Add multisampling support.
EFB access doesn't work with MSAA enabled, yet.

Additionally clean up some stuff, fix a memory leak, ...


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6468 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-23 19:58:02 +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 5ef4167c55 DX11: Dynamically load dxgi.dll and d3d11.dll.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6451 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 15:34:04 +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
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 b4ffd640b7 Made LinearDiskCache a template class. Keys are now some POD type (fixed size). Eliminates casting and key size checking.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6420 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-15 05:22:03 +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
Nolan Check 3d866bd35d DX11 plugin: Fix a small oversight
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6389 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-13 00:05:14 +00:00
NeoBrainX 38d06e76d6 DX11: Add an option to choose the internal resolution.
DX9: When clearing the back buffer in Renderer::Swap(), use IDirect3DDevice9::Clear instead of a clear quad if possible. Should improve performance marginally.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6373 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 16:43:27 +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
NeoBrainX 58c8e7cb48 DX9/DX11: Remove some dead or obsolete code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6354 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-07 10:11:58 +00:00
NeoBrainX 48859da6e3 DX9/DX11: Fix and simplify ClearScreen. At least fixes a small glitch in Super Mario Sunshine with DX11, might fix several other things as well in both plugins though (so test this, please!)
Explanation of this commit: We only have to care about four BP registers in ClearScreen, the remaining API state should be reset. The colorEnable and alphaEnable parameters are obsolete, for some reason directly using them caused the SMS glitch with DX11 (because of that bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 check in BPFunctions.cpp, is this one actually correct?)

The comment in BPFunctions.cpp was at least misleading (if not even wrong), so I removed it.

For what it's worth, someone needs to port this to the OpenGL and Software plugins (unless they're doing this properly already)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6327 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-01 19:13:50 +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 b71cd5f383 A couple minor things I have left over
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6312 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 19:41:10 +00:00
NeoBrainX 5be617c129 Fix an off-by-one error introduced in r6309.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6310 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 17:04:20 +00:00
NeoBrainX 5cdda90182 DX11: Fix ClearScreen properly this time. Should fix quite a few games (or break them :P)
Fixes issue 3399.

Also remove unnecessary stateman/gfxstate applies:
- gfxstate->ApplyState/Reset only need to be called by VertexManager
- stateman->Apply only needs to be called before any Draw/DrawIndexed call

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6309 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 16:53:33 +00:00
NeoBrainX 91186d2b8a DX11: If the virtual XFB list overflows, replace the oldest XFB with a new one instead of just failing.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6305 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 18:44:01 +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 5ebc9c97db Fix another bug introduced by r6301: Using observer variables now to check for ring buffer wraps.
Small performance improvements by increasing the ring buffer size and using a better offset algorithm.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6303 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 09:59:33 +00:00
NeoBrainX ae07f24b98 Fix a small but severe and stupid bug introduced by r6301...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6302 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22 20:58:42 +00:00
NeoBrainX f9187ab508 DX11: Use a ring buffer in the utility functions for speedup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6301 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22 20:48:20 +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 4c4348a0a7 Applied the change from r6297 to the DX11 plug-in.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6298 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 15:06:01 +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 cb453a0fb3 DX11 plugin: Do destination-alpha in a single pass. No more drawing the same geometry twice! SMG is faster now because it uses destination-alpha extensively. This uses dual-source color blending, a DirectX 10-level feature. The equivalent OpenGL function comes from the GL_ARB_blend_func_extended extension, which was made core in OpenGL 3.3.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6294 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 03:11:22 +00:00
Nolan Check 479eea6ad2 DX11 plugin: Fix numerous Metroid Prime glitches. The "techno energy ball lighting" glitch is remains, however.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6293 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 02:29:20 +00:00
Nolan Check b1d6417f13 DX11 plugin: Use a better mechanism to load vertex and index buffers; prevent a potential bug where triangles, lines, and points could fight over the same buffers
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6292 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 02:17:16 +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 9ffc071e34 Some stuff which was still lying around on my hard disk:
- Add a sanity check in CRenderFrame::MSWWindowProc. Possibly reduces the risk of a crash when starting a game and immediately closing the emulation window when using the DX9 plugin.
- DX11: Add the resource usage as a parameter to CreateQuadVertexBuffer, possibly to be used in the future.
- reduce the size of the EFB access buffers from 4x4 to 1x1 since they needn't be bigger anymore
- some fixes to the recent hires commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6256 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-04 11:09:32 +00:00
NeoBrainX 4907e6b6d2 DX11: Add texture dumping and hires texture loading support.
Not sure if hires textures are working perfectly, yet, so test this, please.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6255 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-04 11:02:35 +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
NeoBrainX c0e90d4b39 DX11: Clean up AccessEFB and fix a crash. Thanks to pico554 for hinting at the wrong part ;)
Should fix SMG for NVIDIA users. Slightly changes behavior of the AccessEFB function, so test this for regressions, please (esp. in HD resolutions).

I tried to apply the same changes to Video_DX9, but for some reason EFB access didn't work anymore then. Might look into that later.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6247 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-02 11:50:50 +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
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
skidau a3b59f6845 Change Disc functionality:
* Fixed the "Change disc..." command.  The filename of the disc was being lost between functions.
* Split the ChangeDisc function into two functions: EjectDisc and InsertDisc
* Moved the "Change disc..." command to the File menu.
* Removed some log messages that caused the debug build to crash when loaded with release build plug-ins.

Fixes issue 3036.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6206 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-15 12:30:56 +00:00
Rodolfo Osvaldo Bogado 73adab0ce1 Dlist Cache step 2:
include referenced array data in the hash to avoid problems in some games.
this version is a slower than the last version but is more stable, still much work to do but so little time to do it :)
Added Dlist Caching Option to the plugin configuration so anyone can compare the performance change.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6205 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-14 22:48:22 +00:00
NeoBrainX ae309405a5 DX9/DX11: Missing breaks are just as evil as static variables.
This commit might fix some issues when colors were drawn slightly wrong in the DX plugins but correct in OpenGL. So please test this ;)
Thanks to Billiard for spotting.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6171 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-03 22:31:52 +00:00
Nolan Check 6a695eff49 Remove more obsolete code
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6153 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-30 04:05:06 +00:00
Rodolfo Osvaldo Bogado 3e7dafbbd7 fully implemented display list cache with vertex data included and added in all the plugins.
still experimental, not totally optimized but must bring a nice speed up
please test for regressions an error. an please Linux people fix scons :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6149 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-29 23:08:56 +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
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
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
NeoBrainX d5d7beb6c7 Move the ZTP hack to the game properties (reverted all changes from r6057 to the video plugins) due to some obvious reasons. Also some fixes to the coding style.
Remove a member variable which I introduced in r5907 although it never actually got used. Restores binary compatibility (at least in that regard) to pre-r5907 video plugins, but breaks any binaries after that :P

Update FIFO watermark tightness recommendations. 1000 is quite a high value I guess, but some people seem to need it.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6060 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-05 18:41:02 +00:00
Fircrestsk8 040a6e1eb3 This commit addresses the Hyrule field slowdown issue in Zelda: Twilight Princess, as discussed in Xtreme2damax's thread: http://forums.dolphin-emu.com/thread-10638.html. It can be activated in the DX9, DX11, and OpenGL plugin GUI's. Enabling the hack while playing other games besides ZTP will likely have either an undesirable or no(more likely) effect.
The code changes disable the usual pipeline flush for certain BP Writes that occur while the minimap is being drawn in Zelda: twilight princess. This significantly increases speed while in hyrule field. The way this is accomplished is described more in depth on page 42 of Xtreme's thread. Big thanks to Xtreme for doing a great job hosting that thread, and Kiesel-stein for initial work on the hack

Also, I used the resource editor in Visual studio to generate the GUI code for the DX11 plugin, and some code appeared to be removed, although the behavior of the GUI did not seem to change. Hopefully someone more experienced with resource files (forms?) can double check that no code was damaged


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6057 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-05 03:24:13 +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
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
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
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
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
NeoBrainX 11d34fa964 Fix issue 2836: static local variables are evil.
If you want to celebrate this commit, what about playing _TWO_ rounds smg or something? ;P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5892 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17 16:13:37 +00:00
NeoBrainX 15eb779c01 Move sampler state setting outside the drawQuad utility functions.
Use linear filtering for various buffer copies, improves visual quality a lot.

Some other tiny changes as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5891 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17 15:18:52 +00:00
NeoBrainX 5abed9d5a4 Dependency cleanup in DX9.
Dynamically load a d3dx9 dll at runtime (I tested Dolphin with the first d3dx9 dll and it even worked fine there).
Should fix the flood of users asking why they can't select the DX9 plugin :P

Compilers should be able to stop bundling cgD3D9.dll now.

Minor changes in DX11.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5890 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17 11:42:28 +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
luisr142004 ddaf442e9e DX11: fix mem leak on closing a game (Fixes issue #2836, thanks to aavindra)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5881 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 06:16:03 +00:00
Jordan Woyak deffc95794 New Wiimote Plugin: Moved Linux cursor position code into ControllerInterface/Xlib. (absolute cursor position can be mapped to something other than IR camera) (code fixed by Glennrics) Put the UDP Wiimote dialog's Update Buttons,Update IR,Update Nunchuk... checkboxes in an "Update" group box. Fixed some Linux config dialog problems. (thanks Glennrics again) Some other minor cleanup in ControllerInterface. (changed some std::string/stringstream to char[] where possible) Removed a warning in DX11 plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5880 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 03:43:11 +00:00
NeoBrainX dcc51e0ef8 DX9/DX11, improvement to r5870: Instead of skipping SetViewport(), fix the viewport to match the old EFB dimensions.
Should reduce or even fix most graphical glitches caused by huge viewports in HD resolutions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5873 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-12 15:10:27 +00:00
NeoBrainX ff917cb0c9 DX9/DX11: Workaround the viewpoint/EFB creation issues in e.g. SMG2 on NVIDIA hardware or when using HD. Will most likely cause glitches, but prevents crashing. Correct behavior can't be implemented in Direct3D, so this is the best option we have.
Also two little changes which don't affect functionality or performance:
Change an IUnknown* cast to a T* cast.
Improve some error messages.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5870 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-11 16:26:46 +00:00