| 
									
										
										
										
											2015-05-24 06:55:12 +02:00
										 |  |  | // Copyright 2008 Dolphin Emulator Project
 | 
					
						
							| 
									
										
										
										
											2015-05-18 01:08:10 +02:00
										 |  |  | // Licensed under GPLv2+
 | 
					
						
							| 
									
										
										
										
											2013-04-17 23:09:55 -04:00
										 |  |  | // Refer to the license.txt file included.
 | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-17 16:54:31 -05:00
										 |  |  | #include <cstring>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-29 20:55:07 -04:00
										 |  |  | #include "Common/ChunkFile.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "VideoCommon/BPMemory.h"
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  | #include "VideoCommon/BoundingBox.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "VideoCommon/CPMemory.h"
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  | #include "VideoCommon/CommandProcessor.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "VideoCommon/Fifo.h"
 | 
					
						
							| 
									
										
										
										
											2014-12-14 21:23:13 +01:00
										 |  |  | #include "VideoCommon/GeometryShaderManager.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "VideoCommon/PixelEngine.h"
 | 
					
						
							|  |  |  | #include "VideoCommon/PixelShaderManager.h"
 | 
					
						
							|  |  |  | #include "VideoCommon/TextureDecoder.h"
 | 
					
						
							|  |  |  | #include "VideoCommon/VertexManagerBase.h"
 | 
					
						
							|  |  |  | #include "VideoCommon/VertexShaderManager.h"
 | 
					
						
							|  |  |  | #include "VideoCommon/VideoState.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-19 02:27:20 +01:00
										 |  |  | #include "VideoCommon/XFMemory.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  | void VideoCommon_DoState(PointerWrap& p) | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // BP Memory
 | 
					
						
							|  |  |  |   p.Do(bpmem); | 
					
						
							|  |  |  |   p.DoMarker("BP Memory"); | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // CP Memory
 | 
					
						
							|  |  |  |   DoCPState(p); | 
					
						
							| 
									
										
										
										
											2012-01-01 13:52:31 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // XF Memory
 | 
					
						
							|  |  |  |   p.Do(xfmem); | 
					
						
							|  |  |  |   p.DoMarker("XF Memory"); | 
					
						
							| 
									
										
										
										
											2013-10-29 01:23:17 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // Texture decoder
 | 
					
						
							|  |  |  |   p.DoArray(texMem); | 
					
						
							|  |  |  |   p.DoMarker("texMem"); | 
					
						
							| 
									
										
										
										
											2009-10-10 21:19:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // FIFO
 | 
					
						
							|  |  |  |   Fifo::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("Fifo"); | 
					
						
							| 
									
										
										
										
											2012-01-01 13:52:31 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   CommandProcessor::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("CommandProcessor"); | 
					
						
							| 
									
										
										
										
											2012-01-01 12:46:02 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   PixelEngine::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("PixelEngine"); | 
					
						
							| 
									
										
										
										
											2012-01-01 13:52:31 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // the old way of replaying current bpmem as writes to push side effects to pixel shader manager
 | 
					
						
							|  |  |  |   // doesn't really work.
 | 
					
						
							|  |  |  |   PixelShaderManager::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("PixelShaderManager"); | 
					
						
							| 
									
										
										
										
											2012-01-01 12:46:02 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   VertexShaderManager::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("VertexShaderManager"); | 
					
						
							| 
									
										
										
										
											2014-12-14 21:23:13 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   GeometryShaderManager::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("GeometryShaderManager"); | 
					
						
							| 
									
										
										
										
											2012-01-04 00:42:22 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-21 23:02:37 -04:00
										 |  |  |   g_vertex_manager->DoState(p); | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   p.DoMarker("VertexManager"); | 
					
						
							| 
									
										
										
										
											2014-09-14 17:52:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   BoundingBox::DoState(p); | 
					
						
							|  |  |  |   p.DoMarker("BoundingBox"); | 
					
						
							| 
									
										
										
										
											2014-09-14 17:52:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   // TODO: search for more data that should be saved and add it here
 | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | } |