Commit e9ed3d86 by Corentin Wallez Committed by Commit Bot

Use unused uniform blocks workarounds on Linux AMD.

The Linux AMD driver optimizes out uniform blocks where WebGL2 and maybe OpenGL ES 3 forbids it. Try to fix this by enabling the workaround that was made for the same problem on OSX. BUG= Change-Id: If3b18ec1f463582d7594221a6f2a08d25207e737 Reviewed-on: https://chromium-review.googlesource.com/506189Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 07843cd6
...@@ -95,6 +95,7 @@ struct WorkaroundsGL ...@@ -95,6 +95,7 @@ struct WorkaroundsGL
// On Mac with OpenGL version 4.1, unused std140 or shared uniform blocks will be // On Mac with OpenGL version 4.1, unused std140 or shared uniform blocks will be
// treated as inactive which is not consistent with WebGL2.0 spec. Reference all members in a // treated as inactive which is not consistent with WebGL2.0 spec. Reference all members in a
// unused std140 or shared uniform block at the beginning of main to work around it. // unused std140 or shared uniform block at the beginning of main to work around it.
// Also used on Linux AMD.
bool useUnusedBlocksWithStandardOrSharedLayout = false; bool useUnusedBlocksWithStandardOrSharedLayout = false;
// This flag will keep invariant declaration for input in fragment shader for GLSL >=4.20 // This flag will keep invariant declaration for input in fragment shader for GLSL >=4.20
......
...@@ -955,6 +955,7 @@ void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workaround ...@@ -955,6 +955,7 @@ void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workaround
#if defined(ANGLE_PLATFORM_LINUX) #if defined(ANGLE_PLATFORM_LINUX)
workarounds->emulateMaxVertexAttribStride = workarounds->emulateMaxVertexAttribStride =
functions->standard == STANDARD_GL_DESKTOP && IsAMD(vendor); functions->standard == STANDARD_GL_DESKTOP && IsAMD(vendor);
workarounds->useUnusedBlocksWithStandardOrSharedLayout = IsAMD(vendor);
#endif #endif
#if defined(ANGLE_PLATFORM_APPLE) #if defined(ANGLE_PLATFORM_APPLE)
......
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