Add action journal (#3409)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Adrian Cojocaru
2025-05-27 16:15:56 +03:00
committed by GitHub
parent 5ec8430fa3
commit 08eb760acd
66 changed files with 2773 additions and 75 deletions

View File

@@ -220,6 +220,7 @@ const root = path.dirname(import.meta.dirname);
const outLocation = args.out ? args.out : root;
const shaderRoot = path.join(root, "shaders");
const outputRoot = path.join(outLocation, "include/mbgl/shaders");
const cppOutputRoot = path.join(outLocation, "src/mbgl/shaders");
let generatedHeaders = [];
let shaderNames = [];
@@ -317,4 +318,21 @@ struct ShaderSource<BuiltIn::None, gfx::Backend::Type::OpenGL> {
} // namespace mbgl
`);
// Generate shader_source.cpp
fs.writeFileSync(path.join(cppOutputRoot, "shader_source.cpp"),
`${generatedHeader}
#include <mbgl/shaders/shader_source.hpp>
#include <mbgl/util/enum.hpp>
namespace mbgl {
using namespace shaders;
MBGL_DEFINE_ENUM(BuiltIn, {
{BuiltIn::None, "None"},${shaderNames.map(name => `\n{BuiltIn::` + name + `, "` + name + `"}`)}
});
} // namespace mbgl
`);
console.log("Shaders generated!");