2015-05-24 07:55:12 +03:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-18 02:08:10 +03:00
|
|
|
// Licensed under GPLv2+
|
2014-10-16 19:52:32 +03:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-07-20 06:52:23 +03:00
|
|
|
#include <functional>
|
2017-02-01 17:56:13 +02:00
|
|
|
#include "Common/CommonTypes.h"
|
2017-04-30 11:07:57 +03:00
|
|
|
#include "VideoCommon/RenderState.h"
|
2014-10-16 19:52:32 +03:00
|
|
|
#include "VideoCommon/ShaderGenCommon.h"
|
2016-07-22 02:04:57 +03:00
|
|
|
|
|
|
|
enum class APIType;
|
2014-10-16 19:52:32 +03:00
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
|
|
struct geometry_shader_uid_data
|
|
|
|
{
|
2016-06-24 11:43:46 +03:00
|
|
|
u32 NumValues() const { return sizeof(geometry_shader_uid_data); }
|
2017-06-24 11:18:53 +03:00
|
|
|
bool IsPassthrough() const;
|
2016-06-24 11:43:46 +03:00
|
|
|
|
|
|
|
u32 numTexGens : 4;
|
2017-09-09 11:30:15 +03:00
|
|
|
u32 primitive_type : 2;
|
2014-10-16 19:52:32 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
typedef ShaderUid<geometry_shader_uid_data> GeometryShaderUid;
|
|
|
|
|
2017-07-20 10:10:02 +03:00
|
|
|
ShaderCode GenerateGeometryShaderCode(APIType ApiType, const ShaderHostConfig& host_config,
|
|
|
|
const geometry_shader_uid_data* uid_data);
|
2017-04-30 11:07:57 +03:00
|
|
|
GeometryShaderUid GetGeometryShaderUid(PrimitiveType primitive_type);
|
2017-07-20 06:52:23 +03:00
|
|
|
void EnumerateGeometryShaderUids(const std::function<void(const GeometryShaderUid&)>& callback);
|