Commit Graph

663 Commits

Author SHA1 Message Date
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 0e737235a8 little fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6666 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 10:49:14 +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 9938f806f1 Guess what, more ClearScreen fixes.
Additionally a small cleanup.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6656 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-25 00:25:15 +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
NeoBrainX 60ed57b32a Add an option to toggle caching EFB->RAM copies.
skid_au had implemented this in a previous revision and enabled it by default, but it caused glitches if STC wasn't set to "safe" (which kinda defeated the purpose since it slowed down stuff again).

Also renamed the "safe texture cache" to "accurate texture cache", since setting the "safe" texture cache to "safe" sounds kind of silly..

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6625 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-20 14:48:46 +00:00
nitsuja- bb8918a2ca added/changed some graphics plugin tooltips, added some low-res framebuffer options for getting a speedup (in pixel-shader-limited situations) at the cost of quality but without needing to make the window tiny, and fixed a little crash with closing the dx9 settings window at a bad time
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6624 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-20 09:17:21 +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- 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 4f4f5325f6 DX9: Added another comment to further elaborate what drawShadedTexQuad is doing.
This comment should give a great speed increase, numerous games (SMG, NSMBW, DKCR, ...) which I tested are at least 20% faster now!


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-13 18:51:08 +00:00
NeoBrainX 7cf3ef6ddc DX9: Write a detailed description of the vertex position offset magic in drawShadedTexQuad. I hope this makes at least a bit sense to anyone but me, it's better than no documentation at all though.
DX9: Revert to the old EFB coordinate scaling. Glitches caused by higher EFB scales probably can't even be fixed properly in DX9, so let's not even mess with it...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6573 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-13 17:49:21 +00:00
NeoBrainX 077c101579 Revert r6561... (yep, it was actually right before)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6562 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-11 22:06:20 +00:00
NeoBrainX 188aef2f88 DX9: Fix drawShadedTexSubQuad vertex positions, this fixes at least Mario's texture in Super Mario Sunshine when EFB->Ram is enabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6561 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-11 21:56:04 +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 1021ba0406 DX9: Fix Renderer::SetLineWidth like hrydgard suggested ;)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6551 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-10 16:13:43 +00:00
NeoBrainX 01de16df1c DX9: Build fix. Also removed the Renderer::SetLineWidth implementation since it wasn't really useful.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6550 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-10 16:03:01 +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 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 8d123adf64 DX9 debugger improvements:
- Fix "Pause at next" functionality for pixel/vertex shader changes, finished frames and texture changes.
- Implement dumping vertex declaration and vertex/index data.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6496 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-29 16:16:48 +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
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 b8218726aa DX9: Dynamically load d3d9.dll.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6452 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 15:44:50 +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
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 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
Matt Callaghan 15d74b7461 General cleanup to 3D Vision hack, fits in more with the Dolphin coding style now. Also, fixed the crash that would occur when using a mouse button with 3D Vision enabled.
Not sure how to fix Dolphins hotkeys when 3D Vision is enabled (I do know a way, but it's messy and I don't want 3D Vision messing with Dolphin's cleanliness).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6362 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-08 22:17:51 +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
skidau 6666b400a3 Updated with a less aggressive optimisation to EFB copy to RAM. The destination texture now does not get invalidated if its hash is found in the texture cache. Fixes Metroid Prime 3.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6353 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-07 04:28:33 +00:00
skidau 8775abacc6 Optimised EFB copy to RAM.
The finding was that 99% of the time, textures are static in memory. However, Dolphin would pessimistically continue to decode and copy the same texture every time.  The optimisation is to check if the texture matches what is in the cache, and if it does, Dolphin should early exit.

The result is the speed in New Super Mario Bros Wii increased 35% with spinning coins.  Still not as fast as EFB copy to texture though.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6352 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-06 04:46:44 +00:00
skidau 5436bef30b Added NVIDIA 3D Vision support. Patch by Uhyve.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6347 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-05 11:24:46 +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 765d1823fb Only enable shader dumping in Debug/DebugFast builds since the required information isn't available in Release builds due to performance reasons.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6323 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-31 15:32:04 +00:00
NeoBrainX 6b0ac026bc DX9, Debugger: Implement pixel/vertex shader and texture dumping.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6322 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-31 11:38:06 +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
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
Nolan Check 95cfca08e2 Put infrastructure in place so that other plugins may support dual-source blending.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 05:22:18 +00:00
Nolan Check 0e534dd033 Clarify texture cache code. Previously, there were THREE sets of texture dimensions, and it was hard to tell which set was for what purpose.
Now, there are two:
Real dimensions: Width and height of the original GameCube texture
Virtual dimensions: Width and height of the texture used by dolphin-emu's renderer

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6291 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 00:39:45 +00:00
Jordan Woyak cf05cca7a6 Merged common texture cache code from video plugins into VideoCommon. (DX11 native mipmaps currently broken, disabled) Hopefully everything else should still be working.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6288 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-19 22:24:27 +00:00
NeoBrainX 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
baby.lueshi d57b0a14d0 Fixed hires textures not scaling. Also increased max size of custom textures to 2048x2048.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6254 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-04 01:54:51 +00:00
Jordan Woyak 841583b8f3 Merged identical VertexManager code from DX9/DX11/OGL plugins into VideoCommon. Still need to merge VertexManager::Flush (will be easier after TextureCache is merged). Purposely using a class/virtualfuncs rather than a namespace so multiple VertexManager can be in one plugin (VideoMergeNew? :p).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6249 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-03 00:41:06 +00:00
skidau 719521eeeb Added EFB Scale option to the OpenGL plug-in.
Renamed EFB Scale to Internal Resolution.
Removed Auto Scale option (it is now always on).
Added on-the-fly changing of the Internal Resolution in the OpenGL and Direct3D9 plug-ins.
Further consolidated the code in the video plug-ins.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6240 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-30 15:24:34 +00:00
skidau 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 ecec048f0f DX9/OGL: Remove some superfluous checks (this is already done in VideoCommon).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6073 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-08 16:28:03 +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 552a535f6d Fix issue 2694.
Fix another dramatic spelling "mistake" in DX9 which I forgot to commit last time.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6042 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-03 18:57:59 +00:00
NeoBrainX c765127f0d Spelling fixes, etc
Fixes issue 2954.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6027 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01 14:46:10 +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
NeoBrainX 910d543536 DX9: Create textures needed for CPU->EFB access even if it's disabled.
That way, one can toggle that option during emulation.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6025 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01 14:20:50 +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 a2e39a84f3 Delete various unused files.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5909 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 16:15:43 +00:00
NeoBrainX e8ed50854a Remove code which got obsoleted by r5890.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5906 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 15:19:24 +00:00
Rodolfo Osvaldo Bogado 60e3a17d0d little bug fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5897 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 00:49:08 +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 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 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
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
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
Soren Jorvang a4a61ae95c Restore a line deleted by accident.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5854 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-08 15:56:09 +00:00
Soren Jorvang 39ae36398f Copy the version string obtained from svnversion at runtime instead of
using it as a constant in several places. Saves a few bytes and the time
it takes to recompile a bunch of files whenever svnversion twitches.

Using the SVN version string as an integer is not portable as the Unix
svnversion always includes e.g. the "M" suffix for a modified tree.

Windows people, please check my change to Plugin_VideoDX9/Src/main.cpp
as I don't really understand how _T() and the %hs format string work.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5852 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-08 15:25:01 +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
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 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
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
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
NeoBrainX b4f5a4d89e Compile fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5739 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 18:50:04 +00:00
NeoBrainX bf36f171a6 DX11: Add error checking to about any device object creation. Since we aren't handling creation errors that well right now we should at least output an error message.
Remove superfluous _WIN32 checks in DX11 and DX9. Meant to port that code over to Linux or what? :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5738 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 18:40:58 +00:00
NeoBrainX ca1a5e9228 Actually make use of the new CHECK functionality in DX9.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5734 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 14:18:09 +00:00
NeoBrainX 0649bf2a00 Improve the CHECK macro used in DX9 and DX11 to allow more flexible error messages.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5733 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18 14:14:13 +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
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
Rodolfo Osvaldo Bogado 9255481882 little build fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5682 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 20:08:20 +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
Rodolfo Osvaldo Bogado f0d178122e revert my last change to vertex manager as the performance difference is negligible an causes performance drop in higher definitions
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5658 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 15:38:42 +00:00
Rodolfo Osvaldo Bogado ce3c2700e7 This commit is separate in two parts:
Fix: fix for lighting equations , that must improve lighting in a lot of games (  test smg :) )
experimental speedup: implemented alpha pass using stencil buffer instead of a duplicate shader. i recommend to test this well as i dono if will work the same way in all the systems. i my system it gives a nice 2-5 fps improvement. if it brings problems in any system or game will revert asap.
enjoy

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5653 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 12:36:33 +00:00
Shawn Hoffman 7efbc879e5 apply svn:eol-style native to all of Source/*
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5652 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 02:27:51 +00:00
hrydgard 5845ff6728 build fixin', warning fixin'.
Thanks soren for the macosx fixes, this fixes the windows build and eliminates some warning from the same.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5643 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-09 21:19:23 +00:00
Rodolfo Osvaldo Bogado 9d792d4673 added ssaa and efb scale as separate configurations:
efb scale :
auto fractional: the original scaling way, will grant a 1:1 pixel mapping between efb and screen giving the best image quality even in non standard resolutions
at the cost of glitches in some games.
auto integral: automatic but only int values for the scale, no glitches but only the correct pixel scaling when using some resolutions.
the rest are the fixed scales.
enjoy.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5639 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-09 15:33:01 +00:00
Shawn Hoffman 4a0c8fc0c9 Hg:
enable newline normalization
get revision number via `hg svn info` for svnrev.h
ignore incremental/generated binary files (windows/VS at least)
leave a comment if some files need native eol set in svnprops

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5637 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-09 01:37:08 +00:00
Rodolfo Osvaldo Bogado e6810baa6f small fix for a bug introduced in 5614
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5634 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-08 02:56:00 +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
luisr142004 1aac546185 Plugins build fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5624 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 21:48:38 +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
hrydgard a3c96ac42c Warp back to 5578. Sorry for the lost changes, please re-apply. Reason: 5579 is a complete disaster.
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 18:05:08 +00:00
Shawn Hoffman e4085f0f04 Merge GCPadNew into Dolphin. This takes place in three segments: Core, InputCommon, and InputUICommon. From now on it can be referred to just as "GCPad".
Switch to Billiard's IniFile implementation throughout Dolphin (it's faster!!).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5579 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 04:55:39 +00:00
Soren Jorvang 30e437f9e3 Fix some cases of variables being used uninitialized. Also some unused
variables, writeable strings and dangerously shadowed variables.

index(), gamma(), exp() and y0() are POSIX functions and using those
names can cause namespace confusion.

A number of C files were missing the final newline required by ANSI C
and some versions of GCC are pedantic enough to complain about this.

These changes simply the scons build, allowing us to get rid of
filterWarnings which is simply more trouble than it's worth.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02 20:35:12 +00:00
Soren Jorvang 664cea45c7 Meta:
Using Unix tools to operate on a tree containing filename with spaces in them
is really annoying, so rename the handful of instances where there were spaces.

Host.cpp has never been used.

Games tend to lookup the following directories that we don't yet have anything
to put in, so prepopulate them in Data/User/Wii:

title/00010001
title/00010002
title/00010003
title/00010004
title/00010005
title/00010006
title/00010007
meta
shared2/title
 
Set eol-style native on a number of text files which didn't already have it.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5572 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02 18:00:22 +00:00
Shawn Hoffman 99e7a2ceac debug version of dx9 dll isn't always in the PATH, so you would get an error while dolphin would still load the correct release version of the lib and continue running. so...just check for the release version of the dll.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5554 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-31 02:44:48 +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
NeoBrainX 4f10ded2b6 Slightly optimize uploading D3DFMT_A8R8G8B8 data to textures.
This is especially perceptible for "big" textures, so e.g. EFB copies to RAM should be a bit faster now.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5531 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-29 09:32:44 +00:00
Jordan Woyak ceabf90bda Improve iterator usage.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5528 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-28 23:14:16 +00:00
Rodolfo Osvaldo Bogado 99d0bd7762 fixed setting of texture parameters like lod bias and max and min lod.
as a nice result of this eliminate the nasty glubuild2dmipmaps.
thanks to neobrain and orphis for discovering the error and the right values

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5475 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-25 19:25:31 +00:00
Rodolfo Osvaldo Bogado 4b1909ea98 hopefully solved all the pixel align problems when drawing full screen quads.
this not solve the remaining projection problem in some games like mario kart wii
will work that problem later.
please test and let me know the results.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5473 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-24 14:20:19 +00:00
luisr142004 1883b32f33 woops forgot some stuff :P :/
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5467 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-23 02:59:36 +00:00
luisr142004 1648b84f08 add some dx checking routines to the dx plugin + some minor stuff
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5466 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-23 02:29:23 +00:00
Rodolfo Osvaldo Bogado 782d9111e5 let's keep experimenting:
almost fixed real xfb in d3d, i say almost because there are some minor scalling problems. hope will fix them soon.
implemented a more intelligent index generator to emulate more accurately the behavior of the gc.
please give me feedback on this changes.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5465 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 21:58:43 +00:00
Rodolfo Osvaldo Bogado 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 7947543d98 a little optimization in shaders constants setting , based on the same idea of nodchip changes.
a MAYORRRRRR change in pixel shader generation, please review all games you can and leave comments this must improve accuracy in graphic emulation a lot.
for example: mario eyes in super mario galaxy, water pod transparency an water transparency on game intro in super mario sunshine, etc.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5457 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-17 22:17:46 +00:00
nodchip 7923903f92 [Plugin_VideoDX9] A minor speed up for SetMultiVSConstant4fv().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5442 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-09 03:14:11 +00:00
Rodolfo Osvaldo Bogado 0ea01d8462 fast commit :
make native mips loading an option to prevent performance lost in game that not need this functionality.( thanks to dorian.fevrier for point the performance lost.)
added a patch from  pierre@pirsoft.de to avoid vertex drops when index array is full in opengl implementation that do not support large index arrays

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5432 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-04 14:43:30 +00:00
hrydgard 66ffa3b045 Commit durante_d3dhiresfix.patch. should finally fix rb swap when loading hires replacement textures in the d3d plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5428 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-02 14:05:14 +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
Rodolfo Osvaldo Bogado 8eb21d1bac fixed mipmap loading in both plugins.
add an option to limit fps instead of vps for games with bad synchronization
some minor fixes in d3d gui
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5394 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-22 02:51:07 +00:00
nitsuja- fadbe78a59 dx9 savestate crash fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5380 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-17 20:14:38 +00:00
Glenn Rice 4b232e50c5 Re-add the show FPS/VPS speed information in the window title when not rendering to main.
Also fix an issue with the DX9 plugin not being the correct size when starting the game in fullscreen at a higher resolution than the desktop resolution.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5375 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-15 20:58:34 +00:00
Rodolfo Osvaldo Bogado 273ae5920b disable loading of native mip for compressed textures as they are not working, this should fix grass problem in zww
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5367 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-14 15:15:01 +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