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