HLSL: allow name mangling based on texture template type
Name mangling did not account for the vector size in the template type of a texture. This adds that. The mangle is as it ever was for the vec4 case, which leaves all GLSL behavior and most HLSL behavior uneffected. For vec1-3 the size is added to the mangle. Current limitation: textures cannot presently be templatized on structured types, so this works only for vectors of basic types. Fixes #895.
This commit is contained in:
@@ -99,6 +99,14 @@ void TType::buildMangledName(TString& mangledName) const
|
||||
case EsdSubpass: mangledName += "P"; break;
|
||||
default: break; // some compilers want this
|
||||
}
|
||||
|
||||
switch (sampler.vectorSize) {
|
||||
case 1: mangledName += "1"; break;
|
||||
case 2: mangledName += "2"; break;
|
||||
case 3: mangledName += "3"; break;
|
||||
case 4: break; // default to prior name mangle behavior
|
||||
}
|
||||
|
||||
if (sampler.ms)
|
||||
mangledName += "M";
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user