mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 21:32:23 +08:00
~ Fixed an infinite loop in the shader compiler
+ Added more valid variable types to the shader compiler so compilation doesn't fail Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
cbb02873a8
commit
9d2e9b43ee
2
main.cpp
2
main.cpp
@ -97,7 +97,7 @@ int main (int argc, char* argv[])
|
||||
|
||||
case 'p':
|
||||
case 'd':
|
||||
std::cout << "--dir/--pkg is deprecated and not used anymore" << std::endl;
|
||||
std::cerr << "--dir/--pkg is deprecated and not used anymore" << std::endl;
|
||||
path = stringPathFixes (optarg);
|
||||
break;
|
||||
|
||||
|
@ -302,6 +302,13 @@ namespace WallpaperEngine::Render::Shaders
|
||||
this->m_compiledContent += "uniform " + type + " " + name + array + ";";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// continue reading the original shader as this most likely is a variable name or something
|
||||
// that is not really interesting for the compiler
|
||||
this->m_compiledContent += *it;
|
||||
it ++;
|
||||
}
|
||||
}
|
||||
/*else if (*it == 'a')
|
||||
{
|
||||
@ -661,6 +668,9 @@ namespace WallpaperEngine::Render::Shaders
|
||||
|
||||
std::vector<std::string> Compiler::sTypes =
|
||||
{
|
||||
"vec4", "vec3", "vec2", "float", "sampler2D", "mat4x3", "mat4", "uint4"
|
||||
"vec4", "uvec4", "ivec4", "dvec4", "bvec4",
|
||||
"vec3", "uvec3", "ivec3", "dvec3", "bvec3",
|
||||
"vec2", "uvec2", "ivec2", "dvec2", "bvec2",
|
||||
"float", "sampler2D", "mat4x3", "mat4", "mat3", "uint4"
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user