5#include <unordered_map>
15#include "misc/Error.h"
16#include "shader/ShaderDescription.h"
17#include "shader/general/cache/ShaderCacheManager.h"
18#include "shader/general/ShaderPack.h"
85 std::vector<ShaderDescription> vShadersToCompile,
86 const std::function<
void(
size_t iCompiledShaderCount,
size_t iTotalShadersToCompile)>& onProgress,
88 void(
ShaderDescription shaderDescription, std::variant<std::string, Error> error)>& onError,
89 const std::function<
void()>& onCompleted);
159 const std::shared_ptr<std::atomic<size_t>>& pCompiledShaderCount,
160 size_t iTotalShaderCount,
162 const std::function<
void(
size_t iCompiledShaderCount,
size_t iTotalShadersToCompile)>& onProgress,
164 void(
ShaderDescription shaderDescription, std::variant<std::string, Error> error)>& onError,
165 const std::function<
void()>& onCompleted);
177 std::shared_ptr<ShaderPack>
findShader(
const std::string& sShaderName);
246 'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
247 'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
248 'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
249 'z',
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'.',
'_',
'-'};
Definition: Renderer.h:43
Definition: ShaderManager.h:25
bool markShaderToBeRemoved(const std::string &sShaderName)
Definition: ShaderManager.cpp:106
void performSelfValidation()
Definition: ShaderManager.cpp:136
std::unique_ptr< ShaderCacheManager > pShaderCacheManager
Definition: ShaderManager.h:226
void compileShaderTask(size_t iQueryId, const std::shared_ptr< std::atomic< size_t > > &pCompiledShaderCount, size_t iTotalShaderCount, ShaderDescription shaderDescription, const std::function< void(size_t iCompiledShaderCount, size_t iTotalShadersToCompile)> &onProgress, const std::function< void(ShaderDescription shaderDescription, std::variant< std::string, Error > error)> &onError, const std::function< void()> &onCompleted)
Definition: ShaderManager.cpp:318
static const size_t iMaximumShaderNameLength
Definition: ShaderManager.h:252
static const std::array< char, 65 > vValidCharactersForShaderName
Definition: ShaderManager.h:245
std::atomic< size_t > iTotalCompileShadersQueries
Definition: ShaderManager.h:235
std::shared_ptr< ShaderPack > findShader(const std::string &sShaderName)
Definition: ShaderManager.cpp:24
Renderer *const pRenderer
Definition: ShaderManager.h:238
bool isShaderNameCanBeUsed(const std::string &sShaderName)
Definition: ShaderManager.cpp:98
std::optional< Error > compileShaders(std::vector< ShaderDescription > vShadersToCompile, const std::function< void(size_t iCompiledShaderCount, size_t iTotalShadersToCompile)> &onProgress, const std::function< void(ShaderDescription shaderDescription, std::variant< std::string, Error > error)> &onError, const std::function< void()> &onCompleted)
Definition: ShaderManager.cpp:232
void removeShaderIfMarkedToBeRemoved(const std::string &sShaderName)
Definition: ShaderManager.cpp:56
std::pair< std::recursive_mutex, ShaderData > mtxShaderData
Definition: ShaderManager.h:229
void releaseShaderBytecodeIfNotUsed(const std::string &sShaderName)
Definition: ShaderManager.cpp:36
std::optional< Error > refreshShaderCache()
Definition: ShaderManager.cpp:86
Definition: ShaderUser.h:20
Definition: ShaderDescription.h:74
Definition: ShaderManager.h:208
std::unordered_map< std::string, std::shared_ptr< ShaderPack > > compiledShaders
Definition: ShaderManager.h:216
std::vector< std::string > vShadersToBeRemoved
Definition: ShaderManager.h:222