Commit Graph

961 Commits

Author SHA1 Message Date
Rodolfo Osvaldo Bogado b1c6f959d9 clean a little my last commit and improve accuracy.
thanks to hrydgard and neobrain for the comments

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6876 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-18 17:48:49 +00:00
Rodolfo Osvaldo Bogado 279664df7b some adjustments in Normal loading to improve lighting in dx9.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6874 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-18 14:14:10 +00:00
Glenn Rice c6e0ea59b9 Removed my previous PanicAlert translation hack. Fixed with a better method suggested by BhaaL. The translation is done by a callback in the MsgHandler routine that is set at program start. Added macros PanicAlertT, SuccessAlertT, PanicYesNoT, and AskYesNoT that are identical to the non T versions except those strings will be added by gettext to the po files to be translated. These can and should be used anywhere in the code for strings that should be translated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6838 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-13 02:05:58 +00:00
Marcos Vitali be5c732254 Quick fifo commit:
* Change the process ProcessAllDistace to ClearRegister
* Fix a bug in ProcessFifoEvents() in commandProcessro (thanks Skid)
-- The last 2 items should be improve the speed lost in r6572 and maybe improve a little bit because ProcessFifoEvents() is right. (Test car selection in GxZero)
* Alliviate Fifo desyncs, In the meant time I still Researching for real solution. (This fix RE0 again and maybe others 
"FIFOs linked but out of sync" and "GFX FIFO: Unknown Opcode (0x%x).\n" games suffers these for desync.)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6837 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-13 01:29:34 +00:00
xsacha 299f163d38 Simplify the SSSE3 code for better understanding.
The end result is unchanged.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6815 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-11 07:25:36 +00:00
xsacha bb725858ea Forgot to commit the alignment for opcode last time.
Also, alignment fix for dlist (thx cotton).

Hopefully no crashes now :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6813 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-11 05:38:12 +00:00
xsacha 3f5d1afc6a Use alignment for ReadDataU32XN. Revert james temp fix.
Should provide some form of a speedup.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6812 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-11 04:54:35 +00:00
james.jdunne de40765504 Quick fix for DataReadU32xN_SSSE3. Should fix crashes caused by r6802.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6809 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-11 01:29:24 +00:00
xsacha f9e4e73e42 Use SSSE3 shuffle for DataReader's DataReadU32xN in VideoCommon. The function is used for reading up to 16 u32's at a time (512-bits) and then converting endianness.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6802 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-10 13:14:56 +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
xsacha 1a72beead0 TextureDecoder: Some misc clean ups. Backport code to SSE2 version. Remove redundancy in RGBA8 (5% speedup).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6789 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-09 05:06:53 +00:00
xsacha 5c725262ba Refactor all the SSSE3 functions in TextureDecoder so that the cpu_info check isn't looped over. Speeds up most textures dramatically (where it has previously slowed them).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6784 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08 09:08:36 +00:00
xsacha 394534814b New SSSE3 implementation for I4 texture decode. 14% speedup over the previous SSE4 implementation (so it was scrapped).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6783 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08 08:07:45 +00:00
xsacha 3cf8003a55 From my last commit: Fix build on Linux. Use SSSE3 instead of SSE3.
Remove some unused vars from the SSE2 CMPR.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6781 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08 04:59:26 +00:00
xsacha f667c03d55 New SSSE3 implementation of RGB5A3. About 40% improvement (less cycles) on the plain C version and 17% on the SSE2 version.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6779 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08 02:52:07 +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
xsacha 62b79028ef This needs to be in the right place to work for <sse4. Going to bed now :P.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6776 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 17:55:26 +00:00
xsacha 87bd4dd4b9 Probably want to store the result for sse4.
Makes I4 textures appear again for SSE4 codepath.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6775 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 17:52:53 +00:00
xsacha 5c1f30060e Fix a missing 'else' in last commit.
Remove more redundancy in CMPR (may make it faster - not tested).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6774 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 17:30:48 +00:00
xsacha 9efa62b0ed Add SSSE3 implementation for RGBA8 texture decode. It is 25% faster (3/4 of the cycles) than the SSE2 version.
Remove a bit of redundancy in CMPR.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6773 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 17:17:26 +00:00
xsacha 9cb3340754 An extra 5-10% speedup for I4 texture decoding with SSE4.1 intrinsics.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6772 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 16:00:39 +00:00
xsacha dcbfd4ea4c SSSE3 implementation of IA8 texture decode. Roughly 50% faster than SSE2 version on my computer (SSSE3: 77%, SSE2: 57% vs reference C on Core2 Duo). About half as many cycles.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6770 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 14:55:05 +00:00
xsacha a6acc99a89 Last commit only requires SSSE3, not SSE4.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6769 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 13:54:18 +00:00
xsacha 53474403e2 An SSE4 implementation for I8 texture decode. Slightly faster than SSE2 version on my computer (SSE4: 60%, SSE2: 55% vs reference C on Core2 Duo).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6768 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07 13:40:32 +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
james.jdunne 1671917472 Missed one MSVC-ism. Should fix build for Linux. Last revision should still work for Windows. No functionality changes this time.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6762 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06 16:50:09 +00:00
james.jdunne 2841d67ce3 Faster SSE2 optimized GX_TF_CMPR texture decoder which gets ~40% speed improvement on x64 and ~50% improvement on x86 as compared to reference C code.
The code now uses direct pointer access from C code to write the colors to the destination texture instead of trying to force them back up into an __m128i and a single write call. This is what produces the major speed-up.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6761 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06 16:41:20 +00:00
gnick79 ca2628f896 Changes:
* Fixed a bug on Texture Converter when Copy EFB to RAM's cache is disabled, so...

* ...accordingly, I revert my latest commit because now it becomes useless.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6760 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06 16:05:11 +00:00
Soren Jorvang 95b6d3f445 Kill HAVE_OPENCL.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6756 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06 01:11:32 +00:00
james.jdunne 5ca3adde3c Enabled SSE2 optimization of GX_TF_CMPR decoder only for x86 builds. It can't compete with the x64 optimized reference C code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6755 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06 00:32:52 +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 0a36663b01 corrected a little error in my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6752 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 17:22:25 +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
james.jdunne 8f9f1b64ff Fixed Linux build.
Fixed small undiscovered bug in WII_IPC_HLE_Device_FileIO.cpp when looking at 0-length strings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6745 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 03:19:53 +00:00
james.jdunne 6eff71b893 Fixed S3TC DXT1 decoder implementation. I see ~40% speed improvements running on x86 Intel hardware and 0% improvements running on x64 AMD hardware. Strange. More investigation to follow!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6744 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 02:48:32 +00:00
gnick79 1fbf53cbdf * By forcing resolution size to back-buffer size when the latter one is changed!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6742 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05 01:29:38 +00:00
james.jdunne dd7d325453 Temporarily reverting to unoptimized until I can figure this out. Apologies for the SNAFU :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6741 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-04 22:30:58 +00:00
james.jdunne 99b4f4703d ~40% speed improvement for decoding GX_TF_CMPR (S3TC) textures using SSE2 intrinsics.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6740 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-04 19:54:30 +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 fea85945da Warning fix for gcc ;)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6727 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-03 01:59:44 +00:00
james.jdunne b7f7a248c5 Fix for bit reduction regression in GX_TF_RGB565 textures from previous commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6726 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-03 01:24:35 +00:00
NeoBrainX ecf92f5c3c D3D9: Make sure to use powers of two as render target dimensions if it's needed by the device.
Some other cleanups.

Possibly fixes issue 3256.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6725 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-02 23:13:29 +00:00
james.jdunne 4b15325acd GX_TF_RGB565 texture decoder optimized with SSE2 producing a ~78% speed increase over reference C implementation.
Fixed crash in debugger when attempting to enable profiler before having run any game.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6724 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-02 22:53:25 +00:00
Soren Jorvang 6ffdbe8482 Use the public svn_rev_str for the kernel.bin header instead of
the private SVN_REV_STR which relies on finicky build mechanics.

With SCons, kill the old svnrev.h in Source if still present.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6715 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-01 21:08:30 +00:00
james.jdunne 7703018632 Possibly fixed game crash issues by switching to unaligned SSE2 loads/stores.
Removed unnecessary work being done in the file system when logging is disabled.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6714 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-01 20:54:15 +00:00
james.jdunne 60082853ec GX_TF_I4 texture decoder optimized with SSE2 producing a ~76% speed increase over reference C implementation.
GX_TF_RGBA8 texture decoder optimized with SSE2 producing a ~68% speed increase over reference C implementation.
TABified the entire document per NeoBrainX. :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6706 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-01 03:52:32 +00:00
james.jdunne 134fca9b82 ~68% increase in GX_TF_IA8 decoding speed. Not an oft-used texture format. An example use is the Wii cursor in MKWii in the menus.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6699 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-31 10:20:43 +00:00
james.jdunne 343e3f7c75 ~80% speed improvement in decoding GX_TF_I8 textures. Yes, EIGHTY PERCENT. However, for MKWii movie playback I still can't break the fluffin' 48 FPS boundary on my machine! There's something else at play here because this decoder is ridonkulously fast.
~25% speed improvement in decoding GX_TF_RGB5A3 textures which aren't used very much. I thought it would help for movie playback but I misled myself. Video playback has nothing to do with this texture format.
Next I'll see if I can knock out some of these other texture decoders. Byte swizzling I'm sure can somehow be accomplished using _mm_unpacklo_epi8 trickery, so that'd be another big win I hope.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6698 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-31 07:23:17 +00:00
donkopunchstania 41c40bcd50 Finish implementing gamma correction in DX9.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6697 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-31 07:06:53 +00:00
james.jdunne b038df64bf TextureDecoder.cpp: new SSE2 optimized GX_TF_I8 decoder. Probably not ultimately optimal SSE2 code, but provably better (on my machine) than the memset version. Tested with __rdtsc counts in an independent project. I get about 6-7 FPS more on average during the intro movie playback in Mario Kart Wii. Hope this compiles for GCC okay.
TextureDecoder.cpp: merged two functionally identical decode5A3RGBA and decode5A3rgba methods.
OpcodeDecoding.cpp and DLCache.cpp: optimization for GX_LOAD_XF_REG. The PSUHFB solution sounds better for SSSE3, but this is a small win for the default case.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6692 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-30 19:17:08 +00:00
Glenn Rice 765fb4bbe3 Linux build fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6686 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-29 15:23:02 +00:00
Marcos Vitali 24eafcb342 More FIFO work. This is an Experimental commit, Fixed "Monopoly Wii" ("FIFOs linked but out of sync" problem in this game) Re-sync the FIFO again when this is in immediate mode. Copy CP register values to PI register. Now this games is booting and ingame :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6682 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-29 07:12:37 +00:00
NeoBrainX 9bf2705c2d Small fix in addition to r6669.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6676 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-28 01:10:40 +00:00
Soren Jorvang 33506f5bdc All 64-bit capable Macs have the SSSE3 extension.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6671 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 22:17:19 +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
Marcos Vitali d59b1e5e7a Ops! Little fix for my prior commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6665 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 03:46:17 +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
Rodolfo Osvaldo Bogado f3336a84a1 First Experimental Commit:
make some changes to the Clear code. please test a lot , the point of this commit is to determine the correct behavior of the efb clearing so feedback is welcome

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6663 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 03:09:11 +00:00
Marcos Vitali 695010520f More FIFO work, HACK Solution for extreme overflow on breakpoints.
1) What is the FIFO? The fifo is a ring queue for write (CPU) and read (GPU) the graphics commands.
2) What is the Brakpoints? The breakpoint is the FIFO mark to allow parallel work (CPU-GPU) When the GPU reached the breakpoint must stop read immediately until this Breakpoint will be removed for the CPU.
3) What is an overflow? The CPU write all room FIFO possible, and like a ring overwrite commands not processed yet.
4) ¿Why you have an overflow? In theory should not have an overflow never because the fifo has another mark (High Watermark) When the CPU Write reach this mark raise a CP interruption and the FIFO CPU WRITES should stop write until distance between READ POINTER AND WRITE POINTER will be equal to another mark (LO Watemark to prevent and overflow.
5) ¡So if impossible why you have overflows? Simple, the CP interruption is processed later and the Overflow happens. (there is a lot of theories about this)
6) ¿Why is no so simple like when CPU WRITE POINTER is near to the end of the FIFO only process pending graphics command?
Because when this happens sometimes we are in BREAKPOINT and is IMPOSIBLE process the graphics commands.

- This HACK process the pending data when CPU WRITE POINTER is 32 bytes before the end of the fifo, and if there is a Breakpoint force the situation to process the commands and prevent an overflown.
In theory you have not see "FIFO is overflown by GatherPipe nCPU thread is too fast!" anymore. But if you have a hang in game where you had this please read the NOTICE LOG in user\logs, I've added this message "FIFO is almost in overflown, BreakPoint" when the hack is activated. (I will delete this message very soon)

Good Luck!! PD: Shuffle sorry for the large commit description :P

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6662 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-27 02:55:35 +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
Shawn Hoffman 444854601c CMPR texel blocks are 8x8 in hardware, even though the source format says 4x4.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6655 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-24 11:15:51 +00:00
NeoBrainX 86c46a9530 More ClearScreen fixes for PIXELFMT_RGB565_Z16...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6651 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-23 10:36:00 +00:00
Shawn Hoffman 750515ea79 some better default settings:
logging: turn off write to file
core: don't insert anything in memcard b slot
video: efb scale to integral, AF to 1x
audio: 100% volume, 48KHz sample rate

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6650 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-23 06:00:17 +00:00
skidau 0d5480073f Added a game property for the "Enable CPU Access" video option. Patch by Link_to_the_past.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6641 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-22 01:05:29 +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
Marcos Vitali 0030d55725 More FIFO works, Hopefully this commit can fix randoms hangs in Wii Music, Wii Sports, maybe in Wii Resort, etc. Please test your games now. This commit is not related with FIFO Overflown and Fifo linked desync.
Good luck! 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6632 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-21 04:39:39 +00:00
gnick79 d9701a74c5 * 2nd attempt to fix Alpha channel on ClearScreen
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6631 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-21 01:04:53 +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
Rodolfo Osvaldo Bogado 9d30d1348e fix Issue 3539
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6622 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 22:24:19 +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- 60d2d42525 made texture conversion shaders use less instructions
this is mainly so they fit within ps_2_0 limits, but I made this separate from my last checkin to make it easier to test separately in case it somehow causes problems

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6619 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 21:05:41 +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
Soren Jorvang fe9e72d6dc Lock emulation while saving state on all platforms.
Fixes issue 2805. Fixes issue 3235.

If this causes problems on Windows, just use this intead:

#if defined(HAVE_X11) && HAVE_X11 || defined __APPLE__


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6614 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 16:07:05 +00:00
Soren Jorvang 38a46ddf94 Avoid shadowing variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6613 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 16:03:39 +00:00
Glenn Rice 05ad8d01d3 Fix TextureDecoder.cl to work on both NVidia and ATI video cards.
To do so I had to re-add the casting bloat removed in revision 6102.  Also, for some odd reason the NVidia OpenCL drivers don't like 8 bit rotations, but are okay with 2, 4 bit rotations.  These are apparently bugs in the NVidia drivers that are hopefully fixed in future versions.
Also, on linux make sure the TextureDecoder.cl file is copied from the shared data directory to the users directory.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6611 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 14:59:57 +00:00
skidau 0b72d34f6d Build fix for Linux x86
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6609 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 13:25:57 +00:00
skidau 9114c96c78 Cached the compiled OpenCL kernels to disk (User/OpenCL/kernel.bin). This reduces the start up delay in OpenCL mode. Added a 10 byte header to the file which contains the current svn rev string. This will recompile the OpenCL kernels with every new revision.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6608 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 11:03:09 +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
Glenn Rice 4295f2f008 Fix an omission from the last commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6594 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-16 18:39:57 +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
Glenn Rice 77837b8034 Make sure a few more directories exist when needed. Most package builders (including cmake/cpack) do not install the empty directories in the shared data, and so the paths need to be created at runtime.
Also set up cmake/cpack to create prebuilt binary packages and source packages.
Also change the vertex shader dump file name in the gfx debugger to something that makes more sense.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6587 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-15 14:47:13 +00:00
Glenn Rice 76d9209ad4 When the gfx debugger is saving shaders make sure the directory exists.
Make sure the gfx debugger unpauses when the emulator is stopped.
When a wad is installed make sure directories exist.
For the cmake build if a header is not provided in the check_lib macro don't check for it, and assume pkg-config was supposed to work.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6581 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-14 23:19:34 +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
Marcos Vitali 5fd9951649 - I've implemented cache of interrupt states for PEFINISH and PETOKEN
- I've implemented calling to ProcessFifoEvents when is there is a pending event in the main queue from CP, PE & GP
- I've implemented FifoIntReset(TRUE, TRUE) in write Clear Register.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6572 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-13 07:56:54 +00:00
Marcos Vitali dde2d1a117 Before my second part, little fixes :D 1) I was wrong the games can use also BP and BP int in multi buffer mode or or at least Pokemon XD can hehehe. Pokemon is booting again but this game also need accurate AbortFrame dont care about "GFX FIFO: Unknown Opcode" in this case 2) Fixed a stupid error in UpdateInterrupts (CUT&PASTE mistake)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6570 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-13 04:44:33 +00:00
Glenn Rice 73da637a42 Rename wii wc24 system files to lower case as on the wii itself. These files are not detected on linux unless the case matches. This fixes an issue when Mario Kart Wii (and possible other games) is run with a clean user directory that renders the game unplayable.
Also fix some compiler warnings.
On linux don't install the license.txt file.  Most distributions handle license files via a package.  For example on debian based systems this gives a lintian warning.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6568 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-12 15:25:03 +00:00
NeoBrainX 3d0ec2f2f1 Remove the watermark tightness option since it's obsolete now.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6567 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-12 10:59:06 +00:00
NeoBrainX 3b6b8b718c Fix some off-by-one errors in the EFB scaling stuff.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6559 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-11 21:07:07 +00:00
Marcos Vitali a9ca9cfd9b BIG FIFO Commit PART 1! Sometimes you need to write everything from 0, so 10 days later Ive rewrited some parts of the FIFO in Dual Core mode. Is pending use the same code for SC mode.
- Improved the GP Register Status: now this is all the time from the fifo loop.
- Improved the Interrupts manage:
	1) Removed All UpdateInturrupts from CommandProcessor Writes and Read.
	2) now the CP interrupts are schedule from the video thread and the fifo loop waiting until this happens
	3) considering Inmediate mode for the CP interrupts
	3) Implemented Interrupt CP Cache State
	4) Implemented only Overflow interrupt in GatherPipeCheck because this need to be detected quickly.
- Implemented Overflow handling like a real HW, when Hiwatermark interrupt happens this write ClearRegister with True en HI and False in LO (FifoIntReset) after that a Control Register is writed and the FIFO is processed  to LO Watermark.
- Removed all ugly code from LO and HI watermark manage
- Removed all ugly code from BP manage
- Change >= by == in the BP clauses
- Removed speed hack (1024 chunk) for better GP Status Control.
- Commented GXSetGPFifo very soon hack
- Commented FackWatchDog hack
- Commented FIFO_RW_DISTANCE = WritePointer hack

This is the beginning and the base for the future., If this broke your favorite game my apologize, only report this and will try solve it. If you have a Overflown don't worry, I've implemented the real solution code using the Overflow Interruption only need continue working for a perfect protection. Why I did it? Because is preferable a accurate and clean fifo instead hack y fifo for improve that. Thanks to DONKO for you awesome Video Plug in and skid for the chatting. PD: I have 7-10 fps more in the star fox video. bye :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6554 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-11 12:42:55 +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
Glenn Rice 06013d5eec Make the cmake check_lib macro more versatile. It first tries pkg-config, and if that fails it then check for libraries and required headers. Also cleaned up the output a little bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6544 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-10 02:00:05 +00:00
Glenn Rice 2caa685c7f Fix a few more linkage issues in the cmake build.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6537 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-06 13:06:54 +00:00
Glenn Rice d171f7277b Fix the nogui build on linux. The software plugin config dialog should not be built.
Fix the default wiimote emulation mouse button settings on linux.
Fix a little c++ operator precedence issue.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6534 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 18:10:13 +00:00
NeoBrainX 5910ef259c Fix building with BBOX_SUPPORT enabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6530 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 16:15:01 +00:00
Soren Jorvang f169def36f First pass at dealing with different size_t/off_t sizes in C90 environments.
Most of the code dealing with the LogTypes namespace was C which lead to a
lot of nonsensical casting, so I have dumbed LOG_TYPE and LOG_LEVEL down to
plain C even though the move of wiiuse into Source means we don't currently
call GenericLog from C.

Set logging threshold to MAX_LOGLEVEL at startup so debug builds will also
p  rint debugging messages before the GUI is running.

For some reason the way we use SetDefaultStyle doesn't play nice with wx 2.9
so we just get the default black text on a black background. Using a gray
background works around that problem, but I found it to also be much easier
on the eyes so I have switched the background color on all versions.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6528 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 15:59:11 +00:00
Soren Jorvang a754f8e703 We effectively only have a single namespace for private header files,
so the recent addition of VideoCommon/Src/Debugger.h clashed with
DebuggerWX/Src/Debugger.h.

The latter had atrophied anyway, so just get rid of it to resolve the
conflict.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6526 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 15:28:31 +00:00
NeoBrainX f3d6b42e83 Fix VideoCommon build configuration for DebugFast/x64.
VertexLoader: Align bounding box registers properly, the hardware reads them in 2x2 blocks.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6524 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 14:31:00 +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
Shawn Hoffman 9da4fe086b allow gcc to check the format of args being passed to MsgAlert and GenericLog. Fixed nearly all warnings that arose from this, as well as some preexisting ones (some were actually crashes and/or bugs...)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6522 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 09:04:34 +00:00
Rodolfo Osvaldo Bogado 6df84ddc31 little fix for r6517
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6520 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 03:36:37 +00:00
Rodolfo Osvaldo Bogado c8305a7b7d two fixes in this commit:
first fix for issues introduced in sms in r6501, please test for a regressions in The Calling
Second Fix for Issue 3539, by making pixel Dept calculation an option. in games with this issue Enabling pixel depth will solve the issue, in other games disabling the option will not cause speed lost
some cleanup in dlist cache

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6517 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-04 17:58:33 +00:00
Rodolfo Osvaldo Bogado 97e3a3ea6f remove fifowait flag, is not needed now as we execute all events that need to be executed even if the cpu is waiting for the fifo.
this way fifo will not avid other thread events to bi executed.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6514 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-04 03:44:56 +00:00
Marcos Vitali 08a3b60f8c I reverted my last commit 6508. I was wrong, sorry about that. It is 3am maybe need to rest of the FIFO for while. My Apologies.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6509 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-03 06:08:12 +00:00
Marcos Vitali ad8248cedd The STATUS_REGISTER should return the actual status HI (Overflow) and LO (underflow) watermark because this register can be polled by the game.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6508 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-03 04:58:28 +00:00
Marcos Vitali 9f6dd239b6 Possible FIX to randoms hangs, this correction in the clause fifo.bFF_Breakpoint=false fix hangs in WII Music, I don't have WII sport resort, etc. Please test games with fifo hangs (FPS:0 VPS:99) in yours PC again. :D
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6507 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-03 01:29:43 +00:00
donkopunchstania f91ac92895 Change comparison in specular light function. Fixes issue 1258.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6505 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 04:50:25 +00:00
donkopunchstania 1f660de7e5 Avoid repeatedly asserting in SWG plugin when matrix indices don't match. Small change to the transform unit to avoid some unnecessary work. Check if Q is zero before dividing UV coordinates by it. Fixes issue 3454.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6504 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 04:26:21 +00:00
Marcos Vitali 0718e1bd77 More fifo work and the Pokemon teaching us ;)
* I've fixed concurrency problem with fifo.bFF_GPReadEnable when the breakpoint is achieved
* I modified when fifo.bFF_Breakpoint is turn off to prevent that the  interruption happens
* I reverted r6483 
* I improved the commit r6495 adding another protection when the GPRead is enabled in CTRL_REGISTER

You can test Pokemon XD in dual core mode is more estable now :P This commit could solve others hangs fifo related in DKC, Sport Resorts, etc. I dont have these games.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6503 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 03:04:36 +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
Marcos Vitali 40c4e5f9a7 More FIFO work. I've implemented intelligent mechanism in GatherPipeBursted to prevent "FIFO is overflown by GatherPipe!". I commented HiWatermark_Tighter parameter. If Hopefully this patch fix this issue. I will delete this definitely. I tested StarFox for 20 minutes and works really fine. :) This patch also can help when the CPU go ahead the GPU and sync in better way.
Plus: I added a _assert_msg_ in FIFO loop when the WriteDistance is negative. Please if that happens report it, this can help to solve strange issues with wrong WriteDistances.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6495 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-28 20:12:41 +00:00
Marcos Vitali 88916a61da In the command processor when FIFO_READ_POINTER is reading Is better return fifo.CPWritePointer instead fifo.CPReadPointer.
In this way it prevents wrong fifo.CPReadWriteDistance in the future. That should fix RE0 Issue 2846 and others "Warning: GFX FIFO: Unknown Opcode (0x4d)" in dual core mode. 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6485 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-28 03:20:20 +00:00
Marcos Vitali 762563a026 If there is a SetBreakPoint and the actual distance is enough to achieve the BP, we wait for the FIFO Loop in dual core mode. That fix Pokemon XD in game in dual core mode (also maybe this fix Issue 3452) and hopefully others FIFO hangs related with BP. I test games like SMG and don't produce slowdowns. If you have any slowdown about this commit. Please report it.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6483 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-27 19:36:18 +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
gnick79 2e59d26133 Related to Texture's glitches:
* fixed a bug on QUAD-Vertex generator

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6478 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-25 20:39:54 +00:00
Marcos Vitali 7fe6a0b451 Corrected the FIFO breakpoint clause in Single Core mode too. That fix Pokemon XD (Only single core mode) Dual core mode suffer distances problems like RE0.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6476 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-25 02:25:27 +00:00
Jordan Woyak f0ac60935c Renamed the "Disable Copy to EFB" option in the game properties(and game ini) to "Enable Copy to EFB", as it is named in the global video settings. (fixes issue 3556)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6475 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-25 02:19:06 +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
Glenn Rice 84a72e90b0 Migrate the opencl setting completely to the gfx config dialog.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6472 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-24 17:30:04 +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
skidau 2808f75f74 Corrected the FIFO breakpoint clause in the FIFO loop. This fixes Super Monkey Ball: Banana Blitz, Super Monkey Ball: Step & Roll and Pokemon XD.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6470 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-24 06:02:03 +00:00
gnick79 4267adbd5e Related FOG changes:
* revert back to proper upscale mantissa of parameters A and C
* properly downscale magnitude to 0.24 bits instead than ≡0.23
* Z Eyespace conversion for projection by original patent concept

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6463 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-23 13:57:01 +00:00
skidau 1830342d66 Quick FIFO fix for Donkey Kong Country Returns. Added a FIFO breakpoint check in the main FIFO loop. Aligned some of the FIFO registers to 32 byte boundaries, matching the VideoSoftware plug-in code.
Fixes issue 3536.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6461 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-23 10:51:14 +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
Soren Jorvang 63aae7e5e0 Build missing BPFunctions.cpp with SCons.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6440 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-18 23:25:40 +00:00
Glenn Rice f8fbcecad6 Encode framedumps in AVI format on linux as on windows. This adds the additional dependency of libavformat-dev. Remember if you want raw framedumps as before add -DENCODE_FRAMEDUMPS=OFF to the cmake command line.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6438 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-18 16:46:17 +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
Glenn Rice a279b391cc Make Linux/MacOSX system checks correct in the cmake build. UNIX is true on both linux and osx. The cmake build probably still doesn't work on MacOSX though.
Also added an option to explicitly disable building with MPG framedumps.  To use it add -DENCODE_FRAMEDUMPS=OFF to cmake on the command line.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6429 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-17 01:03:39 +00:00
Glenn Rice 4f81997c14 Fix the no gui cmake build.
Add a version check for avcodec and swscale libraries.
Fix a bug in the xlib wiimote emulation button configuration.  If you are using a mouse button for wiimote emulation you may need to adjust your settings.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6426 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-16 04:34:52 +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 73ed235fd1 Changed macro for disallowing copy-ctor and =operator into an inheritable class. Removed IrPointer.ini (no longer used)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6421 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-15 05:29:10 +00:00
Soren Jorvang 62a7f101a7 Some compiler warnings and eol-style.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6418 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 23:56:26 +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
Glenn Rice 2378b443c1 Build fix for windows.
Also a correction to the frame rate for the mpg encoding.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6416 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 22:07:52 +00:00
Glenn Rice 50882c8d30 On linux encode frame dumps in MPG format instead of writing raw frames. To enable this portion of the code you must have libavcodec-dev and libswscale-dev installed (package names for Ubuntu).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6414 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 21:14:26 +00:00
Rodolfo Osvaldo Bogado a4fe774528 little bug fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6413 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 18:25:01 +00:00
j4ck.fr0st b5e4f7f622 OSX buildfix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6410 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 15:12:07 +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
nodchip d888f13bb9 VideoCommon: An experimental fix for Issue 3493. Changed _mm_load_si128 to _mm_loadu_si128. I could not test the bug because I don't have Sonic Colors.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6402 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14 04:29:20 +00:00
Soren Jorvang 02edf66b49 Simplify OpenCL compile-time detection on OS X.
Turn wiiuse io_osx.m into Objective-C++.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6398 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-13 20:02:01 +00:00
skidau d4b72eaae5 Added a projection hack for Metroid: Other M. This fixes the black screens that occur in cut-scenes. Patch by Trevor002.
Fixes issue 3477.
Fixes issue 3127.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6381 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-11 09:22:19 +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
Jordan Woyak 26f84c1e74 StringUtil cleanup. Nothing seems broken.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6367 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 04:12:31 +00:00
Glenn Rice e72ae04e5c Setup opencl to work like most of the other externals. Autodetect native shared libraries and if not found fall back to the static libs built from the externals.
Also some general clean up of the main CMakeLists.txt file.  I think it is nice to keep the checks and analysis of the results together.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6363 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-09 00:29:07 +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
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
Glenn Rice d0afc20596 Added checks for portaudio and opencl to the cmake build system.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6351 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-06 03:49:18 +00:00
Glenn Rice 2383e2b0f5 Improve the compiler flags for the cmake build system. -fPIC only needs to be specified for static libraries that are linked into shared libraries. cmake automatically uses -fPIC for shared libraries. Also ported several other needed compiler flags from the scons build. Set up the debug build, enabled with "-D CMAKE_BUILD_TYPE=Release", to work with wxWidgets debugging.
Note that most users will want to use the release build to get a -O3 optimized build.  This can be enabled by adding "-D CMAKE_BUILD_TYPE=Release".


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6344 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-05 02:23:24 +00:00
NeoBrainX b75a805859 Add an experimental CMake build system as a possible replacement for SCons. Only tested on Linux, should work on OS X and Windows in the future as well though.
Some notes about this:
- config.h doesn't get written yet, so you'll have to use one generated by SCons
- dependency checking isn't really implemented, yet. Just some basic checks for OpenGL or ALSA, we need something more sophisticated though.
- the OpenGL plugin fails to load for some reason which I can't debug right now due to the libc debuginfo package version in openSUSE not matching the runtime packages
- there's even some support for generating install packages (rpm/deb/.. packages, NSIS installer, etc). It doesn't work properly right now though, since some paths seem to be hardcoded into Dolphin's source
- probably lots of other stuff I forgot... Just take a look at all the TODOs in the CMakeLists.txt files for more information ;P

Additionally, I added various files to the svn:ignore list.

tl;dr: Unless you are a dev or you're building binary packages, this commit shouldn't bother you :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6326 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-01 15:47:02 +00:00
NeoBrainX f7d1184d87 VideoCommon: Properly upscale the mantissa of some fog params.
Might fix games with minor gfx glitches, try e.g. Super Mario Sunshine or Super Mario Galaxy 2.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6319 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-29 21:37:20 +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
NeoBrainX 52cd3aee95 Fix a major speed regression from r6288:
Upon texture reloading, the cache entry hash wasn't updated and thus we effectively disabled any texture caching in that case.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6308 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 15:16:31 +00:00
skidau 56e79aa87d Added a safer OpenCL shutdown procedure.
Fixes issue 3015.
Fixes issue 3089.
Fixes issue 3099.
Fixes issue 3360.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6307 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24 04:17:36 +00:00
Nolan Check 2ec3db44ed OpenGL plugin: Support for dual-source blending, CURRENTLY DISABLED. It doesn't work yet. To fix it, we may need to convert all our shaders to GLSL so that we can use glBindFragDataLocation.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6306 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-23 19:55:19 +00:00
NeoBrainX ef75d96655 Main change: Implemented EFB pokes in DX9/DX11.
Games affected by this change: Mario Smash Football, Mario Strikers Charged Football, Monster Hunter Tri.
Other games possibly affected: Shaun White Snowboarding, Resident Evil Code: Veronica, Baten Kaitos.
This implementation will decrease performance if the game uses this feature, but the glitches will be gone. I'll add an option for this in a later commit. EFB pokes are somewhat slow in DX11 right now, speed should be okayish in DX9 though.

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


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6300 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22 19:40:05 +00:00
nodchip e9d115a8b1 VideoCommon: Fixed the crash when the code cache of DLCache is full.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6299 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22 03:50:44 +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 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
Soren Jorvang 9a03484d64 Goto'ing past variable initializations is undefined behavior.
Work around different gcc versions giving conflicting warnings
about signed/unsigned comparisons involving bit fields.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6290 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 00:12:41 +00:00
Jordan Woyak cf05cca7a6 Merged common texture cache code from video plugins into VideoCommon. (DX11 native mipmaps currently broken, disabled) Hopefully everything else should still be working.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6288 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-19 22:24:27 +00:00
Rodolfo Osvaldo Bogado 7797b9d753 a little bugfix and a small optimization.
this should fix issue 3313 but i can't test it


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6267 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-10 14:35:31 +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
Soren Jorvang 4b5b9ad05c Add Turntable.cpp to SCons build.
Set native eol-style on recently added files.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6252 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-03 08:20:24 +00:00
Jordan Woyak aae0fa7909 InputCommon(GCPad/WiimoteNew): Fixed issue when inifile didn't exist, defaults were loaded, and input didn't work. Fixed prob in DirectInput(hopefully doesn't break any other gamepads): buffered data wasn't ever being used. WiimoteNew: Hopefully made emulated swinging better(please comment). Added (completely untested) incomplete emulated turntable(DJ Hero) extension support :p. Deleted some files that I meant to delete in my last commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6250 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-03 04:29:34 +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
Shawn Hoffman 73f4bc4598 Some more cleanup which should've been in r6232. Thanks Billiard.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6234 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-27 05:16:11 +00:00
Shawn Hoffman 18be8ffa6e Replace all bitfields which were only declared with "(un)signed" with their actual types. Let me know if I missed any. It would also be a good idea to test this commit in both x64 and x86.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6232 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-27 04:29:51 +00:00
pierre 91036ae160 Slightly adjust z-values calculated in the vertex shader so OGL does not clip the
final rendering of (at least) Sonic Unleashed.

This should be (nearly) invisible in Z16 depth copies and in games, but there is
some chance that it collides with other such border cases. There probably is some
room to decrease the adjustment but 9999999/10000000 is not enough. A static offset 
may be an option, too. I don't know if the game can/does set something like that.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6225 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-23 19:38:49 +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
Jordan Woyak 194493cc04 Some work on merging the video plugins: Added a new plugin to the solution(shouldn't build by default) which combines the DX9, DX11, and OGL plugins with their common code merged (and some things temporarily removed). In it's current state the plugin is hardly usable. Perhaps someone with knowledge of the video plugins will be able to fix the things I have broken more easily than me(or point me in the right direction). I will continue to work on it as well.
Main Issues:
DX11 is functional with a ~2MB/s mem leak.
OpenGL/DirectX9 have a black display while game runs. (DirectX 9 flashes good display on emulation stop)
Too many virtual function calls. (once everything is working, I will work on removing them)
Won't build on non-Windows in its current state. (mainly EmuWindow will need changes for Linux/OS X)
Probably other stuff.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6219 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-20 21:45:47 +00:00
Glenn Rice 7824855116 Silence some compiler warnings that have accumulated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6211 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-16 04:22:27 +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
nodchip 08b999dbfa VideoCommon: A minor optimization.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6204 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-14 13:52:17 +00:00
nodchip 412ce56f83 Added options to enable/disable Block Merging and DList Cache into game specific settings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6203 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-14 13:50:25 +00:00
Soren Jorvang d02dd6d3fa std::string needs <string> rather than <string.h>.
Also some minor cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6184 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-06 12:14:18 +00:00
j4ck.fr0st c92ae1c915 I think it should be addr there, not address. Plus code-formatting.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6169 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-03 14:06:34 +00:00
Rodolfo Osvaldo Bogado 625d78fb59 fix for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6156 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-30 15:33:37 +00:00
Rodolfo Osvaldo Bogado c9dd11c803 some fixes for dlist, now is configurable in the video config section, still not in the gui,
disabled by default till a fix for segfaults in linux and geometry problems in some games

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6155 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-30 15:18:43 +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
anusko e4f9b6a5f8 I'm an 100% scons noob but I think this fixes r6149, although it seems that the repository revision isn't appearing correctly (only happening with me?).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6150 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-30 00:00:14 +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
Soren Jorvang 1d05290be7 Include "Hash.h" rather than "hash.h" for case-sensitive file systems.
Fix some compiler warnings.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6141 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-28 15:53:01 +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
Rodolfo Osvaldo Bogado 8e4df07353 sorry for the last one, please test this one :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6125 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-25 11:18:46 +00:00
Rodolfo Osvaldo Bogado 3b30019fcb some experiments with lighting, please test an let me know if is a improvement or make things worst
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6124 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-25 03:42:57 +00:00
Rodolfo Osvaldo Bogado fb1c14e2cc long time no commits :).
fixed one of the last graphic problems in smg, now the glow in the plants and planets must be correct.
the error was caused by a error in lighting calculations. so it must affect other games.
please test and let me know the results.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6103 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-16 22:37:04 +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