fix function name mangling

This commit is contained in:
evghenii
2014-01-02 17:01:10 +01:00
parent 298b4b8b5b
commit c4c30a416a
2 changed files with 5 additions and 5 deletions

View File

@@ -207,8 +207,8 @@ static inline void ao_tile(
uniform int nsubsamples, uniform int nsubsamples,
uniform float image[]) uniform float image[])
{ {
static uniform Plane plane = { { 0.0f, -0.5f, 0.0f }, { 0.f, 1.f, 0.f } }; uniform Plane plane = { { 0.0f, -0.5f, 0.0f }, { 0.f, 1.f, 0.f } };
static uniform Sphere spheres[3] = { uniform Sphere spheres[3] = {
{ { -2.0f, 0.0f, -3.5f }, 0.5f }, { { -2.0f, 0.0f, -3.5f }, 0.5f },
{ { -0.5f, 0.0f, -3.0f }, 0.5f }, { { -0.5f, 0.0f, -3.0f }, 0.5f },
{ { 1.0f, 0.0f, -2.2f }, 0.5f } }; { { 1.0f, 0.0f, -2.2f }, 0.5f } };

View File

@@ -744,7 +744,7 @@ EnumType::Mangle() const {
std::string ret; std::string ret;
if (isConst) ret += "C"; if (isConst) ret += "C";
ret += variability.MangleString(); ret += variability.MangleString();
ret += std::string("enum[") + name + std::string("]"); ret += std::string("enum_5B_") + name + std::string("_5C_");
return ret; return ret;
} }
@@ -2040,12 +2040,12 @@ lMangleStruct(Variability variability, bool isConst, const std::string &name) {
Assert(variability != Variability::Unbound); Assert(variability != Variability::Unbound);
std::string ret; std::string ret;
ret += "s["; ret += "s_5B_";
if (isConst) if (isConst)
ret += "_c_"; ret += "_c_";
ret += variability.MangleString(); ret += variability.MangleString();
ret += name + std::string("]"); ret += name + std::string("_5C_");
return ret; return ret;
} }