Fix unit test for setting locale creating malformed HLSL shader code
Fix malformed HLSL shader code in other locales than classic
Bug: angleproject:1433
Change-Id: I30bad0bd0cfda465ec7200e48e12800d7d8efd26
Reviewed-on: https://chromium-review.googlesource.com/c/1447862
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
diff --git a/src/compiler/translator/AtomicCounterFunctionHLSL.cpp b/src/compiler/translator/AtomicCounterFunctionHLSL.cpp
index 63fe026..9f8e4fd 100644
--- a/src/compiler/translator/AtomicCounterFunctionHLSL.cpp
+++ b/src/compiler/translator/AtomicCounterFunctionHLSL.cpp
@@ -9,6 +9,7 @@
#include "compiler/translator/AtomicCounterFunctionHLSL.h"
+#include "compiler/translator/Common.h"
#include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/IntermNode.h"
@@ -92,7 +93,7 @@
ImmutableString getAtomicCounterNameForBinding(int binding)
{
- std::stringstream counterName;
+ std::stringstream counterName = sh::InitializeStream<std::stringstream>();
counterName << kAtomicCounterBaseName << binding;
return ImmutableString(counterName.str());
}