mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Serialize primitive_assembly
This commit is contained in:
		
							parent
							
								
									c284192a87
								
							
						
					
					
						commit
						050c3bdee5
					
				
					 4 changed files with 20 additions and 2 deletions
				
			
		|  | @ -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