Removed uneeded code
This commit is contained in:
@@ -40,17 +40,6 @@ bool ShaderProgramCompiler::CompileLayerProgram(const RuntimeRenderState& state,
|
|||||||
return CompilePreparedLayerProgram(state, passSources, layerProgram, errorMessageSize, errorMessage);
|
return CompilePreparedLayerProgram(state, passSources, layerProgram, errorMessageSize, errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::string& fragmentShaderSource, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage)
|
|
||||||
{
|
|
||||||
std::vector<ShaderPassBuildSource> passSources;
|
|
||||||
ShaderPassBuildSource passSource;
|
|
||||||
passSource.passId = "main";
|
|
||||||
passSource.fragmentShaderSource = fragmentShaderSource;
|
|
||||||
passSource.outputName = "layerOutput";
|
|
||||||
passSources.push_back(std::move(passSource));
|
|
||||||
return CompilePreparedLayerProgram(state, passSources, layerProgram, errorMessageSize, errorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector<ShaderPassBuildSource>& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage)
|
bool ShaderProgramCompiler::CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector<ShaderPassBuildSource>& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage)
|
||||||
{
|
{
|
||||||
GLsizei errorBufferSize = 0;
|
GLsizei errorBufferSize = 0;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ public:
|
|||||||
ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings);
|
ShaderProgramCompiler(OpenGLRenderer& renderer, RuntimeHost& runtimeHost, ShaderTextureBindings& textureBindings);
|
||||||
|
|
||||||
bool CompileLayerProgram(const RuntimeRenderState& state, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
|
bool CompileLayerProgram(const RuntimeRenderState& state, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
|
||||||
bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::string& fragmentShaderSource, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
|
|
||||||
bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector<ShaderPassBuildSource>& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
|
bool CompilePreparedLayerProgram(const RuntimeRenderState& state, const std::vector<ShaderPassBuildSource>& passSources, LayerProgram& layerProgram, int errorMessageSize, char* errorMessage);
|
||||||
bool CompileDecodeShader(int errorMessageSize, char* errorMessage);
|
bool CompileDecodeShader(int errorMessageSize, char* errorMessage);
|
||||||
bool CompileOutputPackShader(int errorMessageSize, char* errorMessage);
|
bool CompileOutputPackShader(int errorMessageSize, char* errorMessage);
|
||||||
|
|||||||
@@ -1300,20 +1300,6 @@ bool RuntimeHost::TryAdvanceFrame()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuntimeHost::BuildLayerFragmentShaderSource(const std::string& layerId, std::string& fragmentShaderSource, std::string& error)
|
|
||||||
{
|
|
||||||
std::vector<ShaderPassBuildSource> passSources;
|
|
||||||
if (!BuildLayerPassFragmentShaderSources(layerId, passSources, error))
|
|
||||||
return false;
|
|
||||||
if (passSources.empty())
|
|
||||||
{
|
|
||||||
error = "Shader layer produced no compiled passes: " + layerId;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
fragmentShaderSource = passSources.front().fragmentShaderSource;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error)
|
bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public:
|
|||||||
void AdvanceFrame();
|
void AdvanceFrame();
|
||||||
bool TryAdvanceFrame();
|
bool TryAdvanceFrame();
|
||||||
|
|
||||||
bool BuildLayerFragmentShaderSource(const std::string& layerId, std::string& fragmentShaderSource, std::string& error);
|
|
||||||
bool BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error);
|
bool BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error);
|
||||||
std::vector<RuntimeRenderState> GetLayerRenderStates(unsigned outputWidth, unsigned outputHeight) const;
|
std::vector<RuntimeRenderState> GetLayerRenderStates(unsigned outputWidth, unsigned outputHeight) const;
|
||||||
bool TryGetLayerRenderStates(unsigned outputWidth, unsigned outputHeight, std::vector<RuntimeRenderState>& states) const;
|
bool TryGetLayerRenderStates(unsigned outputWidth, unsigned outputHeight, std::vector<RuntimeRenderState>& states) const;
|
||||||
|
|||||||
@@ -143,16 +143,6 @@ ShaderCompiler::ShaderCompiler(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShaderCompiler::BuildLayerFragmentShaderSource(const ShaderPackage& shaderPackage, std::string& fragmentShaderSource, std::string& error) const
|
|
||||||
{
|
|
||||||
if (shaderPackage.passes.empty())
|
|
||||||
{
|
|
||||||
error = "Shader package has no render passes: " + shaderPackage.id;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return BuildPassFragmentShaderSource(shaderPackage, shaderPackage.passes.front(), fragmentShaderSource, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShaderCompiler::BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const
|
bool ShaderCompiler::BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const
|
||||||
{
|
{
|
||||||
std::string wrapperSource;
|
std::string wrapperSource;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public:
|
|||||||
const std::filesystem::path& patchedGlslPath,
|
const std::filesystem::path& patchedGlslPath,
|
||||||
unsigned maxTemporalHistoryFrames);
|
unsigned maxTemporalHistoryFrames);
|
||||||
|
|
||||||
bool BuildLayerFragmentShaderSource(const ShaderPackage& shaderPackage, std::string& fragmentShaderSource, std::string& error) const;
|
|
||||||
bool BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const;
|
bool BuildPassFragmentShaderSource(const ShaderPackage& shaderPackage, const ShaderPassDefinition& pass, std::string& fragmentShaderSource, std::string& error) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user