--User changes

-Add new variations waves22, waves23, waves42, waves3 and waves4 from user tatasz.
 -Add new stylesheet called lightdark.qss which gives a more modern look to the dark theme. Started by Michel Mastriani (triptychaos).
 --Included in the qmake and Wix installers.

--Code changes
 -Add a new C# project that attempts to convert Apophysis plugins to Fractorium style Variation classes. It's not entirely perfect, but gets most of the job done much more quickly than doing so manually.
 -Remove unused OpenCL functions from variations: elliptic, poincare, mask, bMod, bSwirl, bTransform, bCollide, farblur, popcorn2_3D, falloff, falloff2, falloff3, crackle2, waves2b, hypercrop, depth_gaussian2, depth_sine, depth_sine2, dust, asteria, vibration, vibration2, arctanh, smartshape, squares, starblur2, Truchet,.
 -Add code in EmberTester to automatically detect such unused functions.
This commit is contained in:
Person
2019-05-06 19:29:27 -07:00
parent 5faa8aa5bd
commit b4ba6d6a82
35 changed files with 2738 additions and 207 deletions

View File

@ -1278,6 +1278,12 @@ bool TestGlobalFuncs()
{
auto var = vlf->GetVariation(i);
funcs = var->OpenCLGlobalFuncNames();
auto localfuncs = var->OpenCLFuncsString();
Ember<float> ember;
Xform<float> xf;
xf.AddVariation(var->Copy());
ember.AddXform(xf);
auto kernel = GetEmberCLKernelString(ember, true, false, false, 1u, false);
for (auto& func : funcs)//Test if the functions the variation says it requires actually exist.
{
@ -1308,6 +1314,44 @@ bool TestGlobalFuncs()
}
}
}
//Test whether the global functions the variations purports to need are actually used.
for (auto& v : vec)
{
bool found = false;
for (auto& v2 : vec)//Test if the functions the variation uses possibly use this function. It can be the case sometimes where a variation does not use it directly, but its global functions do.
{
if (v != v2)
{
auto it = funcmap.find(v2);
if (it != funcmap.end())
{
if (Find(it->second, v + "("))
{
found = true;
break;
}
}
}
}
if (!found && Find(str, v + "("))
{
found = true;
}
if (!found && Find(localfuncs, v + "("))
{
found = true;
}
if (!found)
{
cout << "Variation " << var->Name() << " purported to require the usage of global function " << v << ", but it's not found in its OpenCL function string:\n" /*<< kernel*/ << endl;
}
}
}
return success;