Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/MrTroble/TGEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTroble committed Oct 2, 2023
2 parents aea080d + ceccf4b commit 4cbb4d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions TGEngine/private/graphics/Vulkan/VulkanShaderModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@
#undef ERROR
#define SPR_NO_DEBUG_OUTPUT 1
#define SPR_NO_GLSL_INCLUDE 1
#define SPR_NO_STATIC 1
#define SPR_STATIC extern
#include "../../../public/headerlibs/ShaderPermute.hpp"

namespace permute {
std::map<std::string, int> lookupCounter;
permute::lookup glslLookup = {{"next", next}};
} // namespace permute

namespace tge::shader {

using namespace vk;
Expand Down
1 change: 1 addition & 0 deletions TGEngine/public/Error.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdint.h>
#include <plog/Log.h>

#include <cstddef>
#include <limits>
Expand Down
6 changes: 4 additions & 2 deletions TGEngine/public/headerlibs/ShaderPermute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ struct GlslSettings {

SPR_STATIC std::map<std::string, int> lookupCounter;

SPR_STATIC std::string next(const std::string &input) {
inline std::string next(const std::string &input) {
const auto id = lookupCounter[input];
lookupCounter[input]++;
#ifdef SPR_USE_FORMAT_LIB
Expand All @@ -285,7 +285,9 @@ SPR_STATIC std::string next(const std::string &input) {

SPR_STATIC lookup glslLookup
#ifndef SPR_NO_STATIC
= {{"next", next}}
= {{"next", next}};
#else
;
#endif // SPR_STATIC
;

Expand Down

0 comments on commit 4cbb4d3

Please sign in to comment.