CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Compiler.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
12#include <array>
13#include <chrono>
14
16
17 // Compiler driver class.
18 class Compiler {
19 public:
20 using Time = std::chrono::system_clock;
21 using TimePoint = std::chrono::time_point<std::chrono::system_clock>;
22
23 // Time points of all compiler stages.
32
33 private:
34 Log* mLog = nullptr;
36
37 public:
38 explicit Compiler(Log* log = nullptr);
39
42
43 private:
45 void warning(const String& msg);
48 };
49
50} // namespace CeresEngine::ShaderCompiler
Definition Compiler.hpp:18
std::chrono::time_point< std::chrono::system_clock > TimePoint
Definition Compiler.hpp:21
void validateArguments(const ShaderInput &inputDesc, const ShaderOutput &outputDesc)
bool returnWithError(const String &msg)
bool compileShaderPrimary(const ShaderInput &inputDesc, const ShaderOutput &outputDesc, Reflection::ReflectionData *reflectionData)
Log * mLog
Definition Compiler.hpp:34
void warning(const String &msg)
StageTimePoints mTimePoints
Definition Compiler.hpp:35
std::chrono::system_clock Time
Definition Compiler.hpp:20
bool compileShader(const ShaderInput &inputDesc, const ShaderOutput &outputDesc, Reflection::ReflectionData *reflectionData=nullptr, StageTimePoints *stageTimePoints=nullptr)
Log base class.
Definition Log.hpp:19
Definition AST.hpp:33
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
TimePoint parser
Definition Compiler.hpp:26
TimePoint analyzer
Definition Compiler.hpp:27
TimePoint optimizer
Definition Compiler.hpp:28
TimePoint preprocessor
Definition Compiler.hpp:25
TimePoint generation
Definition Compiler.hpp:29
TimePoint reflection
Definition Compiler.hpp:30
Structure for shader output statistics (e.g. texture/buffer binding points).
Definition Reflection.hpp:418
Shader input descriptor structure.
Definition ShaderCompiler.hpp:223
Shader output descriptor structure.
Definition ShaderCompiler.hpp:293