OSDN Git Service

Fix matrix mangled name
authorAlexis Hetu <sugoi@google.com>
Tue, 26 May 2015 18:34:54 +0000 (14:34 -0400)
committerAlexis Hétu <sugoi@google.com>
Tue, 26 May 2015 19:52:13 +0000 (19:52 +0000)
NxM matrices weren't mangled properly,
since only the nominal size was taken
into account, not the secondary size,
in the mangled name.

Change-Id: I94f4d8e1909cce085e8748bbe5355c5f17b0e7c2
Reviewed-on: https://swiftshader-review.googlesource.com/3271
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/compiler/SymbolTable.cpp

index 6d7757d..1935478 100644 (file)
@@ -70,6 +70,9 @@ void TType::buildMangledName(TString& mangledName)
     }
 
     mangledName += static_cast<char>('0' + getNominalSize());
+    if(isMatrix()) {
+        mangledName += static_cast<char>('0' + getSecondarySize());
+    }
     if (isArray()) {
         char buf[20];
         snprintf(buf, sizeof(buf), "%d", arraySize);