2014-10-16 16:52:32 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "VideoCommon/ShaderGenCommon.h"
|
2014-12-19 12:10:06 +00:00
|
|
|
#include "VideoCommon/VertexManagerBase.h"
|
2014-10-16 16:52:32 +00:00
|
|
|
#include "VideoCommon/VideoCommon.h"
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
|
|
struct geometry_shader_uid_data
|
|
|
|
{
|
|
|
|
u32 NumValues() const { return sizeof(geometry_shader_uid_data); }
|
2014-12-19 12:10:06 +00:00
|
|
|
bool IsPassthrough() const { return primitive_type == PRIMITIVE_TRIANGLES && !stereo && !wireframe; }
|
2014-10-16 16:52:32 +00:00
|
|
|
|
|
|
|
u32 stereo : 1;
|
2014-11-22 18:18:45 +00:00
|
|
|
u32 numTexGens : 4;
|
|
|
|
u32 pixel_lighting : 1;
|
2014-12-14 18:41:16 +00:00
|
|
|
u32 primitive_type : 2;
|
2014-12-19 11:03:11 +00:00
|
|
|
u32 wireframe : 1;
|
2014-10-16 16:52:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
typedef ShaderUid<geometry_shader_uid_data> GeometryShaderUid;
|
|
|
|
|
2014-12-14 18:41:16 +00:00
|
|
|
void GenerateGeometryShaderCode(ShaderCode& object, u32 primitive_type, API_TYPE ApiType);
|
|
|
|
void GetGeometryShaderUid(GeometryShaderUid& object, u32 primitive_type, API_TYPE ApiType);
|