| 
									
										
										
										
											2015-05-24 06:55:12 +02:00
										 |  |  | // Copyright 2014 Dolphin Emulator Project
 | 
					
						
							| 
									
										
										
										
											2015-05-18 01:08:10 +02:00
										 |  |  | // Licensed under GPLv2+
 | 
					
						
							| 
									
										
										
										
											2014-10-16 18:52:32 +02:00
										 |  |  | // Refer to the license.txt file included.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-01 10:56:13 -05:00
										 |  |  | #include "Common/CommonTypes.h"
 | 
					
						
							| 
									
										
										
										
											2014-10-16 18:52:32 +02:00
										 |  |  | #include "VideoCommon/ShaderGenCommon.h"
 | 
					
						
							| 
									
										
										
										
											2014-12-19 13:10:06 +01:00
										 |  |  | #include "VideoCommon/VertexManagerBase.h"
 | 
					
						
							| 
									
										
										
										
											2016-07-21 19:04:57 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | enum class APIType; | 
					
						
							| 
									
										
										
										
											2014-10-16 18:52:32 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #pragma pack(1)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct geometry_shader_uid_data | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   u32 NumValues() const { return sizeof(geometry_shader_uid_data); } | 
					
						
							|  |  |  |   bool IsPassthrough() const | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     return primitive_type == PRIMITIVE_TRIANGLES && !stereo && !wireframe; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   u32 stereo : 1; | 
					
						
							|  |  |  |   u32 numTexGens : 4; | 
					
						
							|  |  |  |   u32 pixel_lighting : 1; | 
					
						
							|  |  |  |   u32 primitive_type : 2; | 
					
						
							|  |  |  |   u32 wireframe : 1; | 
					
						
							| 
									
										
										
										
											2016-01-16 22:56:49 +13:00
										 |  |  |   u32 msaa : 1; | 
					
						
							|  |  |  |   u32 ssaa : 1; | 
					
						
							| 
									
										
										
										
											2014-10-16 18:52:32 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma pack()
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef ShaderUid<geometry_shader_uid_data> GeometryShaderUid; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-21 19:04:57 -04:00
										 |  |  | ShaderCode GenerateGeometryShaderCode(APIType ApiType, const geometry_shader_uid_data* uid_data); | 
					
						
							| 
									
										
										
										
											2016-01-16 23:49:39 +13:00
										 |  |  | GeometryShaderUid GetGeometryShaderUid(u32 primitive_type); |