mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Serialize primitive_assembly
This commit is contained in:
		
							parent
							
								
									c284192a87
								
							
						
					
					
						commit
						050c3bdee5
					
				
					 4 changed files with 20 additions and 2 deletions
				
			
		
							
								
								
									
										5
									
								
								TODO
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								TODO
									
										
									
									
									
								
							|  | @ -7,16 +7,19 @@ | |||
| ☐ Perf stats | ||||
| ☐ Settings | ||||
| ☐ Telemetry session | ||||
| ☐ Replace SERIALIZE_AS_POD with BOOST_IS_BITWISE_SERIALIZABLE | ||||
| ✔ HW @done(19-08-13 15:41) | ||||
|     ✔ GPU regs @done(19-08-13 15:41) | ||||
|     ✔ LCD regs @done(19-08-13 15:41) | ||||
| ☐ Video core @started(19-08-13 16:43) | ||||
|     ✔ Geometry pipeline @done(19-12-22 15:52) | ||||
|         Required more use of g_state | ||||
|     ✔ PICA state @done(19-08-13 15:41) | ||||
|     ☐ Primitive assembly | ||||
|     ✔ Primitive assembly @done(19-12-22 16:05) | ||||
|     ✔ Shader @done(19-08-13 16:03) | ||||
| ☐ HLE @started(19-08-13 16:43) | ||||
|     ☐ Kernel @started(19-08-13 16:43) | ||||
|         Most of these require adding g_kernel | ||||
|         ✔ Address arbiter @done(19-08-13 16:40) | ||||
|         ✔ Client port @done(19-08-13 16:40) | ||||
|         ✔ Client session @done(19-08-13 16:40) | ||||
|  |  | |||
|  | @ -228,7 +228,7 @@ private: | |||
|         ar & immediate; | ||||
|         ar & gs_unit; | ||||
|         ar & geometry_pipeline; | ||||
|         // ar & primitive_assembler;
 | ||||
|         ar & primitive_assembler; | ||||
|         ar & vs_float_regs_counter; | ||||
|         ar & vs_uniform_write_buffer; | ||||
|         ar & gs_float_regs_counter; | ||||
|  |  | |||
|  | @ -6,6 +6,7 @@ | |||
| 
 | ||||
| #include <functional> | ||||
| #include "video_core/regs_pipeline.h" | ||||
| namespace boost::serialization { class access; } | ||||
| 
 | ||||
| namespace Pica { | ||||
| 
 | ||||
|  | @ -62,6 +63,17 @@ private: | |||
|     VertexType buffer[2]; | ||||
|     bool strip_ready = false; | ||||
|     bool winding = false; | ||||
| 
 | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int version) | ||||
|     { | ||||
|         ar & topology; | ||||
|         ar & buffer_index; | ||||
|         ar & buffer; | ||||
|         ar & strip_ready; | ||||
|         ar & winding; | ||||
|     } | ||||
|     friend class boost::serialization::access; | ||||
| }; | ||||
| 
 | ||||
| } // namespace Pica
 | ||||
|  |  | |||
|  | @ -16,6 +16,7 @@ | |||
| #include "common/common_types.h" | ||||
| #include "common/hash.h" | ||||
| #include "common/vector_math.h" | ||||
| #include "common/pod.h" | ||||
| #include "video_core/pica_types.h" | ||||
| #include "video_core/regs_rasterizer.h" | ||||
| #include "video_core/regs_shader.h" | ||||
|  | @ -64,6 +65,8 @@ struct OutputVertex { | |||
|     static void ValidateSemantics(const RasterizerRegs& regs); | ||||
|     static OutputVertex FromAttributeBuffer(const RasterizerRegs& regs, | ||||
|                                             const AttributeBuffer& output); | ||||
| 
 | ||||
|     SERIALIZE_AS_POD | ||||
| }; | ||||
| #define ASSERT_POS(var, pos)                                                                       \ | ||||
|     static_assert(offsetof(OutputVertex, var) == pos * sizeof(float24), "Semantic at wrong "       \ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue