SPV: Fix extra operands when using the "struct" form of a built-in taking an 'out' param.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 41b6c5d..1d77b02 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -2892,9 +2892,11 @@
     }
 
     spv::Id id = 0;
-    if (libCall >= 0)
+    if (libCall >= 0) {
+        while (consumedOperands < (int)operands.size())
+            operands.pop_back();
         id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, operands);
-    else {
+    } else {
         switch (consumedOperands) {
         case 0:
             // should all be handled by visitAggregate and createNoArgOperation