Revert "Fix unit test for setting locale creating malformed HLSL shader code"
This reverts commit 5f662c0042703344eb0eef6d1c123e902e3aefbf.
Reason for revert: Some recent crashes related to streams, could be
related to this change.
https://bugs.chromium.org/p/chromium/issues/detail?id=932359
Original change's description:
> 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>
TBR=geofflang@chromium.org,jmadill@chromium.org,jonahr@google.com
Bug: angleproject:1433
Change-Id: I28caa073b3996a95f3f233bed9dc91dc44263835
Reviewed-on: https://chromium-review.googlesource.com/c/1474624
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 4b92375..fcaca76 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -611,7 +611,7 @@
return true;
}
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
reasonStream << "l-value required";
if (!message.empty())
{
@@ -902,7 +902,7 @@
{
if (ContainsSampler(pType.userDef))
{
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
reasonStream << reason << " (structure contains a sampler)";
std::string reasonStr = reasonStream.str();
error(line, reasonStr.c_str(), getBasicString(pType.type));
@@ -3066,7 +3066,7 @@
if (mComputeShaderLocalSize[i] < 1 ||
mComputeShaderLocalSize[i] > maxComputeWorkGroupSizeValue)
{
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
reasonStream << "invalid value: Value must be at least 1 and no greater than "
<< maxComputeWorkGroupSizeValue;
const std::string &reason = reasonStream.str();
@@ -3891,7 +3891,7 @@
// one to the field's struct nesting.
if (1 + field.type()->getDeepestStructNesting() > kWebGLMaxStructNesting)
{
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
if (field.type()->getStruct()->symbolType() == SymbolType::Empty)
{
// This may happen in case there are nested struct definitions. While they are also
@@ -4085,7 +4085,7 @@
ASSERT(index >= 0);
if (index >= arraySize)
{
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
reasonStream << reason << " '" << index << "'";
std::string token = reasonStream.str();
outOfRangeError(outOfRangeIndexIsError, location, reason, "[]");
@@ -4387,7 +4387,7 @@
checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310);
if (intValue < 1)
{
- std::stringstream reasonStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream reasonStream;
reasonStream << "out of range: " << getWorkGroupSizeString(index) << " must be positive";
std::string reason = reasonStream.str();
error(intValueLine, reason.c_str(), intValueString.c_str());
@@ -5672,7 +5672,7 @@
int offsetValue = values[i].getIConst();
if (offsetValue > maxOffsetValue || offsetValue < minOffsetValue)
{
- std::stringstream tokenStream = sh::InitializeStream<std::stringstream>();
+ std::stringstream tokenStream;
tokenStream << offsetValue;
std::string token = tokenStream.str();
error(offset->getLine(), "Texture offset value out of valid range",