VideoCommon: Add names for textures and shaders

This commit is contained in:
Pokechu22
2021-12-09 14:00:08 -08:00
parent 85d2ea0dd2
commit afd02b79a5
9 changed files with 146 additions and 46 deletions

View File

@ -3,8 +3,11 @@
#pragma once
#include <fmt/format.h>
#include <functional>
#include "Common/CommonTypes.h"
#include "VideoCommon/RenderState.h"
#include "VideoCommon/ShaderGenCommon.h"
@ -27,3 +30,15 @@ ShaderCode GenerateGeometryShaderCode(APIType api_type, const ShaderHostConfig&
const geometry_shader_uid_data* uid_data);
GeometryShaderUid GetGeometryShaderUid(PrimitiveType primitive_type);
void EnumerateGeometryShaderUids(const std::function<void(const GeometryShaderUid&)>& callback);
template <>
struct fmt::formatter<geometry_shader_uid_data>
{
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const geometry_shader_uid_data& uid, FormatContext& ctx)
{
return format_to(ctx.out(), "passthrough: {}, {} tex gens, primitive type {}",
uid.IsPassthrough(), uid.numTexGens, uid.primitive_type);
}
};