Commit graph

1161 commits

Author SHA1 Message Date
Pierre Bourdon
bfde41895f Update the viewport when the scissor offset is changed
Fixes a bug with Another Code: R that was noticed when gx-optimization was
merged.
2012-05-27 08:03:26 +02:00
Pierre Bourdon
1efabea9b4 Fix compilation errors with g++4.7 2012-05-26 08:09:50 +02:00
skidau
146b02615c Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch) 2012-05-26 13:47:07 +10:00
nitsuja
99b202fd2e savestate vertexmanager (base) since it affects VertexLoader::RunVertices which affects g_pVideoData 2012-05-26 13:18:08 +10:00
nitsuja
ae242e5675 added some missing VideoBackendHardware data to savestates. I think this makes savestates more stable (fewer "GFX FIFO: Unknown Opcode" errors) in dual core mode.
also added some extra verification markers around here, to potentially give better info on future version mismatches
2012-05-26 13:18:08 +10:00
nitsuja
2be579e8ba fixed some graphics problems with loading savestates (for example, wrong colors on title screen of metroid prime 3) 2012-05-26 13:18:07 +10:00
nitsuja
a81631b58e made savestates synchronous and immediate. this allows saving or loading while the emulator is paused, fixes issues where savestate hotkeys would get ignored if pressed too close together, might speed up savestates in some cases, and hopefully makes savestates more stable too.
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
2012-05-26 13:09:38 +10:00
Pierre Bourdon
cf69e7ca8a Merge branch 'gx-optimization'
This branch reduces the number of useless state flushes in the video
emulation layer by checking whether a BP/XF change will have an effect
or not. Greatly reduces the number of GL calls per frame.

Thanks to degasus for his help!
2012-05-24 21:49:37 +02:00
Pierre Bourdon
fee2d83f68 Fix a data endianness problem introduced by r7cccb4baa724. 2012-05-20 22:16:21 +02:00
Pierre Bourdon
c95baf614d Avoid changing video state on useless BP writes
When a game writes the same value that was already configured to a BP
register, Dolphin previously flushed the GPU pipeline and reconfigured
the internal video state (calling SetScissor/SetLineWidth/SetDepthMode).

Some of these useless writes still need to perform actions, for example
writes to the EFB copy trigger or the texture preload registers (which
need to reload the texture from memory).
2012-05-20 20:56:03 +02:00
Pierre Bourdon
7cccb4baa7 Check if data was modified in LoadIndexedXF too 2012-05-19 10:54:40 +02:00
Pierre Bourdon
b8d4d013f6 Compute the comparison size properly (transferSize is in u32, not in u8) 2012-05-18 23:27:02 +02:00
Pierre Bourdon
5a77cae2e3 Check if BP and XF changes actually change values before flushing 2012-05-18 23:13:53 +02:00
NeoBrainX
54aeec7a8f Dump the redundant "save textures" function. Use TextureCache's dumping feature instead. 2012-05-13 17:48:23 +02:00
NeoBrainX
72e83140f0 TextureCacheBase: Remove the texture size limit for custom textures. Only the GPU restrictions for maximum texture size remain. 2012-05-13 17:43:14 +02:00
NeoBrainX
41d37ab0a0 TextureCacheBase: Support loading custom mipmaps. 2012-05-13 17:42:22 +02:00
NeoBrainX
a5e68ab10e TextureCacheBase: Support dumping individual mipmaps. 2012-05-13 17:41:04 +02:00
NeoBrainX
a8ad59ee3e TextureCacheBase: Move texture dumping to a helper function. 2012-05-13 17:41:03 +02:00
NeoBrainX
3ecc5e879c TextureCacheBase: Move custom texture loading to a helper function 2012-05-13 17:41:03 +02:00
skidau
1587cb3738 Fixed texture encoding. Fixes the interaction with objects in Another Code R. Thanks to wordmanwords for the patch.
Fixes issue 5405.
2012-05-05 11:21:05 +10:00
Pierre Bourdon
beb4204bbb Include libavutil/mathematics.h explictly in AVIDump.cpp. Fixes issue #5266. 2012-05-02 07:29:15 +02:00
Jordan Woyak
722480cb2e Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347. 2012-04-07 15:45:32 -05:00
rodolfoosvaldobogado
5650b3b5f6 more fixes. take in account when depth textures are used and alpha test fails :)( i really forgot that). 2012-04-03 15:08:58 -03:00
rodolfoosvaldobogado
4fafbd0700 Fix for my last commit thanks to Lolaker for pointing the error 2012-04-03 09:56:11 -03:00
rodolfoosvaldobogado
6a446efd5f Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
2012-04-03 00:08:36 -03:00
rodolfoosvaldobogado
a0d60210fd First Stage:
Fix depth related errors in dstalpha pass.
best place to test: water splash effect in super mario galaxy
2012-04-02 14:26:12 -03:00
NeoBrainX
460610ea0e Revert Rodolfo's recent zcomploc commits until they actually work correctly.
This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
2012-03-30 01:57:53 +02:00
rodolfoosvaldobogado
402006a83a more fixes to zcomplock and opengl implementation 2012-03-29 18:26:58 -03:00
NeoBrainX
2356def0d4 Merge branch 'fifoplayer_updates'.
This adds an "Analyzer" tab to the fifoplayer dialog which allows to conveniently browse through all register pokes that are being sent by the game each frame.
There's also a search function, but it doesn't work all that well for anything but simple searches at the moment. However, I'm merging this anyway since I'm not sure if I'm going to finish this.

Note that due to recent fifo changes, it's not yet possible to run fifoplayer in dual-core mode.
2012-03-29 22:50:45 +02:00
Shawn Hoffman
2ee5e5cebc Merge branch 'scons-removal' 2012-03-28 00:02:04 -07:00
rodolfoosvaldobogado
450dcc9d2c As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
2012-03-27 15:44:58 -03:00
Shawn Hoffman
48eb791a4e Merge remote-tracking branch 'timowiren/master' 2012-03-25 13:21:25 -07:00
Shawn Hoffman
d15740daf1 Merge branch 'wxw3-update' 2012-03-25 12:27:38 -07:00
skidau
f30aebf8d7 Added a check for TMEM overflows while preloading textures. Thanks to NeoBrainX for the tip. 2012-03-25 21:35:57 +11:00
Timo Wiren
cb92805445 Spaces to tabs. Removed a comment. 2012-03-25 13:01:26 +03:00
rodolfoosvaldobogado
9ed83765e6 long time no commits :)
a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits.
this change must behave exactly like last revision, if something is broken please let me know
2012-03-25 00:01:47 -03:00
Pierre Bourdon
b5ba2eb030 Merge branch 'master' into zcomploc-support 2012-03-24 18:41:51 +01:00
Timo Wiren
11959a3781 Matching new and delete. 2012-03-24 19:41:13 +02:00
NeoBrainX
7a1744575d D3D9: Fix texel to pixel mapping when sampling textures properly. 2012-03-24 17:23:03 +01:00
NeoBrainX
fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01:00
skidau
41bcf657f8 Adjusted the DX9 offset of the Sampling address to more closely match what we are seeing in games.
Fixes issue 5305.
2012-03-23 23:20:19 +11:00
skidau
c4fbb6e377 Checked PRELOAD_MODE to determine if TMEMODD or TMEMEVEN should be used.
Fixes issue 5212.
2012-03-23 22:10:48 +11:00
Shawn Hoffman
56b1373baf Remove scons-related files 2012-03-25 12:55:02 -07:00
Shawn Hoffman
f7423a0a4f Merge branch 'master' into wxw3-update
Conflicts:
	Source/Core/DolphinWX/Src/LogWindow.cpp
2012-03-22 17:57:38 -07:00
Pierre Bourdon
339ee98e62 Add a comment before the zcomploc test explaining the implementation/hack 2012-03-22 22:10:23 +01:00
Pierre Bourdon
0ffc12bbfd Merge branch 'master' into zcomploc-support
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2012-03-22 15:21:52 +01:00
skidau
006923e871 Disabled zcomploc while update_enable has been set in zmode. Fixes zcomploc in F-Zero GX. 2012-03-22 20:36:41 +11:00
NeoBrainX
6202714efd Fix some regressions from r3b38295cbd08. 2012-03-20 22:36:21 +01:00
skidau
a60a0825a3 Merged 'FifoBusy' branch. Thanks
to marcosvitali.

Added an external exception check when the CPU writes to the FIFO.  This allows
the CPU time to service FIFO overflows.  Fixes random hangs caused by FIFO
overflows and desyncs like in "The Last Story" and "Battalion Wars 2".  Thanks
to marcosvitali for the research.

Added some code to unlink invalidated blocks so that the recompiled block can be
linked (speed-up).

This release still fixed the hangs produced by fifo overflow without sacrifice
performance. For example you can test Tutorial moves at the beginning of The last history now
is fluid 30/60.

Fixed possibles random hangs in DC mode.
Fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc)
Implemented accurate management of Pixel Engine Interrupts.  Now the GPU loop
is stopped when a PE Interrupt needs to be managed and resumed when Pixel Engine
finish.

Fixed Metroid Prime 3 and 2 desync. And other games with desync because of
FIFO Reset. That happens because  FIFO_RW_DISTANCE_HI must be written first, for checking
fifo.CPReadWriteDistance == 0, so some fifo resets was not managed in the right
way.

Fixed Super Monkey Ball in some cases when the game write the
WriteReadDistance need to be safe like the SafeCPRead.

Improved the CheckException for the GatherPipe writes in JIT, now only the
External Exceptions are processed.

Fixed definitely Pokemon XD in dual core mode. This game is doing something
not allowed. It attach to CPU the same fifo attached to the GPU in multibuffer
mode. I added a check to prevent overwrite the GPU FIFO with the CPU FIFO. If
the game do that on breakpoint the solution can fail.

Fixed ReadWriteDistance calc when CPRead > CPWrite.

Added Token and Finish cause to GP Jit checking.

Additional cleanup in CommandProcessor.



Fixes issue 5209
Fixes issue 5055
Fixes issue 4889
Fixes issue 4061
Fixes issue 4010
Fixes issue 3902
2012-03-20 19:37:25 +11:00
marcosvitali
20eca1bf7e Ive fixed definitely Pokemon XD in dual core mode. This game is doing something not allowed. It attach to CPU the same fifo attached to the GPU in multibuffer mode. I added a check to prevent overwrite the GPU FIFO with the CPU FIFO. If the game do that on breakpoint the solution can fail.
Fixed ReadWriteDistance calc when CPRead > CPWrite.
Added Token and Finish cause to GP Jit checking.
2012-03-18 22:54:58 -03:00
Shawn Hoffman
c5d746f3d8 remove scons files from VS projects 2012-03-18 06:41:12 -07:00
skidau
dc79d68e72 Added the corresponding change from r352ab2ba4394 into JITIL.
Tidied some code.
2012-03-13 22:35:11 +11:00
marcosvitali
fedf6055ce I've fixed Super Monkey Ball in some cases when the game write the WriteReadDistance need to be safe like the SafeCPRead.
This fix is not related with the previous commits, but the previous commits help me to see that because in the new scenery SMB was hanging. May be in the past also doesn't boot some times because of that.

Please Test FZero boot also. Thanks.
2012-03-11 12:40:39 -03:00
marcosvitali
104603467b This commit fix games hanging because of my prior Revision c2e6fdf09f
The external exceptions in dolphin are checking frequently but is different to real HW, so sometime the game is in a loop checking GPU STATUS, the exceptions doesn't checked, and the game hang.\
For solve this I need a trick: still waiting for the exception handler be linked but if CommandProcecsor is reading the GPStatus, resume this.

This fixed "TimeSplitters: Future Perfect" broken in the Revision c2e6fdf09f and surely others games.
2012-03-09 18:58:23 -03:00
marcosvitali
41652d6b1f I've fixed Metroid Prime 3 and 2 desync. And other games with desync because of FIFO Reset.
That happens because  FIFO_RW_DISTANCE_HI must be written first, for checking fifo.CPReadWriteDistance == 0, so some fifo resets was not managed in the right way.
I didn't test Metroid 2 desync reported in Issue 4336 but I think is the same.
About the flickering in MP2, I don't know for my is not related or yes, but you can test anyway.

Fixed Issue 3902

Well now the FIFO is 99.99% finished :)
2012-03-09 01:33:29 -03:00
marcosvitali
c2e6fdf09f - I've fixed possibles random hangs in DC mode.
- I've fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc)
- I've implemented accurate manage of Pixel Engine Interrupts, now the GPU loop is stopped when a PE Interrupt needs to be managed and resume when Pixel Engine finish,
I think now, the Fifo in DC mode is more accurate than SC mode. :)

Time to close the big fifo Issue 3694 (snif), please if you have a possible fifo issue report this like a game issue.

I was working with Skid_AU together, especially thanks for him.

Test a lot all games, and compare the performance with the master maybe this accuracy has a cost (not a lot).
I think now the fifo is very stable, overflow fixed, random hang fixed, if you have a game with a hang with this rev and not in master please report this.
2012-03-08 02:47:55 -03:00
LPFaint99
6fc8cdf12d revert r90a2096a24f4 behavior changes in PixelEngine.cpp. Thanks to Autoran1 for finding the responsible commit. Fixes Scrubbing Serena Beach Countdown in both SC and DC.
Fixes issue 1498.
2012-03-07 20:08:14 -08:00
marcosvitali
b0f75f17ae This release still fixed the hangs produced by fifo overflow without sacrifice performance.
For example you can test Tutorial moves at the beginning of The last history now is fluid 30/60.
Shuffle2: I've delete the hacky line, I think is not necessary anymore. Additional some clean in CommandProcessor.
Please test The Last Story and others games affected in the previous commits and give me a feedback.
2012-03-05 02:40:10 -03:00
Henrik Rydgard
f5d4fe0bfe Fix some minor bugs pointed out by PVS Studio (thanks!) 2012-03-03 20:07:20 +01:00
skidau
9e398fd418 Added an external exception check when the CPU writes to the FIFO. This allows the CPU time to service FIFO overflows. Fixes random hangs caused by FIFO overflows and desyncs like in "The Last Story" and "Battalion Wars 2". Thanks to marcosvitali for the research.
Fixes issue 5209.
Fixes issue 5150.
Fixes issue 5055.
Fixes issue 4889.
Fixes issue 4061.
Fixes issue 4010.
Fixes issue 3902.
2012-03-02 18:53:41 +11:00
Jordan Woyak
f92d1e1e93 fix some clang compilation errors 2012-02-24 14:25:02 -06:00
NeoBrainX
3a9fed0ba2 PixelShaderGen: Fix a bug introduced in revision 9adc119e3c.
D3D11: Fix shader constant mapping.
2012-02-21 12:51:41 +01:00
NeoBrainX
9adc119e3c PixelShaderGen: For custom textures and scaled EFB copies, use correct texel to pixel mapping when sampling textures
(D3D9 only)

This is basically the same as revision e58692653a, just for scaled textures and with a LOT more work...
2012-02-20 20:32:08 +01:00
NeoBrainX
e58692653a PixelShaderGen: Use correct texel to pixel mapping when sampling textures
(D3D9 only)

Fixes issue 2068.
Fixes issue 5158.
2012-02-17 17:09:17 +01:00
NeoBrainX
439613b833 TextureCacheBase: Remove a superfluous TODO (texture hashing takes care of that stuff) 2012-02-04 13:01:52 +01:00
NeoBrainX
eb01a110c9 Implement texture preloading 2012-02-03 21:21:13 +01:00
NeoBrainX
dabb35afce Prepare texture preloading support 2012-02-03 21:20:34 +01:00
NeoBrainX
d1605abfa9 Add license header for TextureCacheBase files 2012-01-31 19:52:02 +01:00
NeoBrainX
1446fb33d5 TextureCacheBase: Replace the efbcopy_state member variable of texture cache entries with a more general "texture type" 2012-01-31 19:52:02 +01:00
NeoBrainX
cf899781f9 TextureCacheBase: Update and improve documentation for EFB copies 2012-01-31 19:52:02 +01:00
NeoBrainX
b34b6e47f2 TextureCacheBase: Remove a redundant variable 2012-01-31 19:52:02 +01:00
NeoBrainX
9fed10fc75 Remove SaveTexture declaration in VideoCommon since it's only actually defined in OpenGL 2012-01-31 19:52:02 +01:00
NeoBrainX
3b38295cbd TextureCacheBase: De-uglify hybrid EFB copies (documentation needs updating though)
TextureCacheBase: Fixed dynamic EFB copies being set to normal textures.
2012-01-31 18:09:35 +01:00
NeoBrainX
67129404dd TextureCacheBase: Small bugfix
Added documentation for hybrid EFB copy stuff
2012-01-31 18:09:35 +01:00
NeoBrainX
5239ba88c9 TextureCache: Remove unsafe texture cache 2012-01-31 18:09:35 +01:00
NeoBrainX
8c2d87f668 TextureCacheBase: Move around stuff, add some TODOs 2012-01-31 18:09:35 +01:00
NeoBrainX
93dbd93a8d TextureCacheBase: More cleanup... 2012-01-31 18:09:35 +01:00
NeoBrainX
0c1e015ec3 TextureCacheBase: Small change 2012-01-31 18:09:35 +01:00
NeoBrainX
f68ee87e0e TextureCacheBase: De-uglify texcache entry lookup even more + documentation 2012-01-31 18:09:35 +01:00
NeoBrainX
dcf18fbaaf TextureCacheBase: Force autogenerating mipmaps if custom textures are used 2012-01-31 18:09:35 +01:00
NeoBrainX
8bc9e443fd TextureCacheBase: De-uglify entry lookup a bit 2012-01-31 18:09:35 +01:00
NeoBrainX
9c39952c34 TextureCacheBase: Kill deprecated entry member isNonPow2
TextureCacheBase: Add a TODO about a potential bug
2012-01-31 18:09:35 +01:00
NeoBrainX
94a8536b8c TextureCacheBase: Simplify texture cache entry initialization 2012-01-31 18:09:34 +01:00
NeoBrainX
c5008fe9de TextureCache: Renaming some variables
OGL: Fix a possible bug at texture dumping
OGL: Add a TODO about a possible bug
2012-01-31 18:09:34 +01:00
NeoBrainX
2d6d73df95 [maintenance] Add a note explaining why we aren't emulating CP clear register writes.
For further reference, see also r700f5eabc752.
2012-01-21 14:58:29 +01:00
NeoBrainX
ad1a4d7ce3 FifoPlayer: Add a search function for the analyzer tab.
Also some tiny fixes.
2012-01-21 13:49:24 +01:00
NeoBrainX
ecb616f7ff FifoPlayer: Make sure that we actually display "Yes" if some variable is true...
FifoPlayer: More consistency of output (display "0x" in front of hex numbers, write hex numbers in capital letters)
2012-01-21 13:49:24 +01:00
NeoBrainX
5eb24a51cf FifoPlayer: Add a description label for the currently selected object command.
Requires adding such descriptions for all BP/CP/XF registers. For now, I added descriptions for EFB copy related BP registers.
2012-01-21 13:49:24 +01:00
nitsuja
39613a95a8 initialize the uninitialized 2012-01-04 01:36:09 -08:00
nitsuja
3e773f093d fixed a freeze on emu shutdown in windows build 2011-12-19 15:13:26 -08:00
Maarten ter Huurne
ed1bfdf293 Merge branch 'cmake-osx2' 2011-12-17 16:30:02 +01:00
NeoBrainX
3d9c35f58e VideoCommon: Fix upper and lower depth bytes being switched when performing Z16L EFB copies (EFB to texture only).
Fixes issue 4989.
Fixes issue 5056.
2011-12-10 16:08:26 +01:00
Maarten ter Huurne
bb182d88b7 Link against systemwide OpenCL on OS X. 2011-12-05 05:26:28 +01:00
Glenn Rice
e5d051a4e9 Update linux libav frame dump code for recent api changes. 2011-11-22 19:24:05 -06:00
Pierre Bourdon
8f31968466 Revert "Merge branch 'zcomploc-support'"
This reverts commit 9dad9ebe89, reversing
changes made to e76bc71efe.
2011-11-01 01:37:54 +01:00
crudelios
dd551814c9 Bounding Box bugfixes.
- Fixes all (I hope) BBox-related unknown pointer crashes.
- Fixes wrong BBox values with Frame Skip on (and the resulting unknown pointer crashes).
- Fixes a small oversight on the change I made to the ISO Properties dialog.

This should also be a (very very little) bit faster than the previous version.
2011-10-28 21:12:12 +01:00
crudelios
852fe9c4be Added proper Bounding Box support.
Should fix most graphical issues with Paper Mario: TTYD and Super Paper Mario. Fixes issue 360.

Since only those two games seem to require BBox support, and as per ector's suggestion, BBox is only enabled for those two games.

BBoxes and Display List Caches don't get along too well, causing Paper Mario: TTYD to hang during certain effects where BBoxes are used. For now, I disabled DList Cache for the Paper Mario games, hopefully both will be compatible in the future.
2011-10-26 01:19:10 +01:00
skidau
5d14bb5e70 Changed the save state system to load/save only after the screen has been drawn. This should help stabilise the save states. 2011-10-15 22:19:42 +11:00
Pierre Bourdon
59072adc32 Align stack variables on a 16-bytes boundary in SSSE3 functions
Fixes issue 4450. Thanks to pholklore1 for his patch.
2011-10-08 17:36:01 +02:00
Pierre Bourdon
9dad9ebe89 Merge branch 'zcomploc-support'
zcomploc is a feature of the BP which switch depth test from before the alpha
test to after the alpha test. This way, transparent fragments are written to
the depth buffer too.

The current implementation is quite hacky and does not cover all cases but is
enough to fix problems in a lot of game. A complete implementation would
require a multipass rendering method and is attempted in the
zcomploc-experimental branch.

According to testers feedback, fixes bugs in the following games:
- Baten Kaitos
- Baten Kaitos Origins
- 007: Everything or Nothing
- Ty the Tasmanian Tiger
- Tony Hawk's Pro Skater 3

And probably other games too.

Conflicts (because of new-shadercache-uids):
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2011-10-04 07:56:13 +02:00