Commit bce4b9f8 by Geoff Lang Committed by Commit Bot

Always scalarize mat and vec constructor arguments.

This workaround is always enabled in Chrome, do the same in ANGLE. BUG=882580 Change-Id: I2c01f34a589b07bd0035d7408be884f7a51b1706 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666699Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 762f180a
......@@ -44,6 +44,11 @@ struct FrontendFeatures : angle::FeatureSetBase
"On Windows Intel OpenGL drivers TexImage sometimes seems to interact "
"with the Framebuffer",
&members};
angle::Feature scalarizeVecAndMatConstructorArgs = {
"scalarize_vec_and_mat_constructor_args", angle::FeatureCategory::FrontendWorkarounds,
"Always rewrite vec/mat constructors to be consistent", &members,
"http://crbug.com/398694"};
};
inline FrontendFeatures::FrontendFeatures() = default;
......
......@@ -1350,6 +1350,7 @@ void Display::initializeFrontendFeatures()
{
// Enable on all Impls
mFrontendFeatures.loseContextOnOutOfMemory.enabled = true;
mFrontendFeatures.scalarizeVecAndMatConstructorArgs.enabled = true;
mImplementation->initializeFrontendFeatures(&mFrontendFeatures);
......
......@@ -22,6 +22,7 @@
#include "libANGLE/ResourceManager.h"
#include "libANGLE/renderer/GLImplFactory.h"
#include "libANGLE/renderer/ShaderImpl.h"
#include "platform/FrontendFeatures.h"
namespace gl
{
......@@ -342,6 +343,11 @@ void Shader::compile(const Context *context)
options |= SH_VALIDATE_LOOP_INDEXING;
}
if (context->getFrontendFeatures().scalarizeVecAndMatConstructorArgs.enabled)
{
options |= SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS;
}
mCurrentMaxComputeWorkGroupInvocations = context->getCaps().maxComputeWorkGroupInvocations;
ASSERT(mBoundCompiler.get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment