Ignore UniformBlocks for GLES3 39/323039/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 22 Apr 2025 08:38:43 +0000 (17:38 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 23 Apr 2025 01:29:17 +0000 (10:29 +0900)
Since ResolveUniformBuffers() time doubled after we use UniformBlock at shader,
let we don't use it and use standalone block instead.

It will be changed after we can keep ther performance.

Change-Id: I3adde5ed295f0a9b621f94f4ebcab5b4bf6f64d2
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
33 files changed:
automated-tests/resources/shaders/canvas-view-with-flat.frag
automated-tests/resources/shaders/canvas-view-with-flat.frag.gles3
automated-tests/resources/shaders/canvas-view-with-flat.frag.glsl-spirv
automated-tests/resources/shaders/canvas-view-with-flat.vert
automated-tests/resources/shaders/canvas-view-with-flat.vert.gles3
automated-tests/resources/shaders/canvas-view-with-flat.vert.glsl-spirv
automated-tests/resources/shaders/canvas-view-with-output.frag
automated-tests/resources/shaders/canvas-view-with-output.frag.gles3
automated-tests/resources/shaders/canvas-view-with-output.frag.glsl-spirv
automated-tests/resources/shaders/canvas-view.frag
automated-tests/resources/shaders/canvas-view.frag.gles3
automated-tests/resources/shaders/canvas-view.frag.glsl-spirv
automated-tests/resources/shaders/canvas-view.vert
automated-tests/resources/shaders/canvas-view.vert.gles3
automated-tests/resources/shaders/canvas-view.vert.glsl-spirv
automated-tests/resources/shaders/comments-strip.frag
automated-tests/resources/shaders/comments-strip.frag.stripped
automated-tests/resources/shaders/comments-strip.vert
automated-tests/resources/shaders/comments-strip.vert.stripped
automated-tests/resources/shaders/inout-locations.frag
automated-tests/resources/shaders/inout-locations.frag.processed
automated-tests/resources/shaders/inout-locations.vert
automated-tests/resources/shaders/inout-locations.vert.processed
automated-tests/resources/shaders/native-image-test.frag
automated-tests/resources/shaders/native-image-test.frag.100
automated-tests/resources/shaders/native-image-test.frag.100.modern
automated-tests/resources/shaders/native-image-test.frag.300
automated-tests/resources/shaders/native-image-test.vert
automated-tests/resources/shaders/ubo-reused.frag
automated-tests/resources/shaders/ubo-reused.frag.glsl-spirv
automated-tests/resources/shaders/ubo-reused.vert
automated-tests/resources/shaders/ubo-reused.vert.glsl-spirv
dali/internal/graphics/common/shader-parser.cpp

index e88e47987f7cffa86f1e4b057480839aa4d1d6ed..1731f303703f53482672caf698b861d2eac0d728 100644 (file)
@@ -6,7 +6,7 @@
 #define OUT_COLOR gl_FragColor
 //@ignore:off
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
index e8c4e73a42e9ab983d84edf5f5263f61db6f4714..6a0ce52595c2919431ef82cd5045fc68077ef639 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(std140) uniform FragBlock
+layout(std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index 0ba75ee51474c3e3b906888ea592c1491678f16d..d19cadf29cd5e30d8d49f2c548300054897a3b08 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(set=0, binding=1, std140) uniform FragBlock
+layout(set=0, binding=1, std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index bff6d2aa1d5d0e80a0112fa2e0a9a8024a9fe595..ffa7121664ba7857486c0ac58b58724fbd32c6c6 100644 (file)
@@ -10,7 +10,7 @@ INPUT mediump vec2 aPosition;
 INPUT mediump vec2 aTexCoord;
 OUTPUT mediump vec2 vTexCoord;
 FLAT OUTPUT mediump int vInteger;
-UNIFORM_BLOCK VertBlock
+UNIFORM_BLOCK UtcVertBlock
 {
   UNIFORM highp mat4 uMvpMatrix;
   UNIFORM highp vec3 uSize;
index f564600776a1fd701aae32fb8fbaca957e61b4b4..1dd7e3744ecddffe0cf9f4693993b0e6451527f0 100644 (file)
@@ -12,7 +12,7 @@ in mediump vec2 aPosition;
 in mediump vec2 aTexCoord;
 out mediump vec2 vTexCoord;
 flat out mediump int vInteger;
-layout(std140) uniform VertBlock
+layout(std140) uniform UtcVertBlock
 {
  highp mat4 uMvpMatrix;
  highp vec3 uSize;
index 0fc04fd7548761be7ca4c3f0982f07f2172b71bb..6e416551a5bcfc5000aadc36b85fead53630a3f2 100644 (file)
@@ -12,7 +12,7 @@ layout(location = 0) in mediump vec2 aPosition;
 layout(location = 1) in mediump vec2 aTexCoord;
 layout(location=0) out mediump vec2 vTexCoord;
 layout(location=1) out mediump int vInteger;
-layout(set=0, binding=0, std140) uniform VertBlock
+layout(set=0, binding=0, std140) uniform UtcVertBlock
 {
  highp mat4 uMvpMatrix;
  highp vec3 uSize;
index 8c861fcecf5ff136e9362129b16a3e6b689727cd..9ae4483e79a50b31cfeaa7af886b6be07df04315 100644 (file)
@@ -6,7 +6,7 @@
 #define OUT_COLOR gl_FragColor
 //@ignore:off
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
index c5343385af57af1324e071b7175113fc4584a761..29e29ec453f9d420f76c86413b36f56d5ed12d0d 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(std140) uniform FragBlock
+layout(std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index 832f1b9bd4512745e01f89f1f4abb08aeaeb1d5e..1bbb5c654572c1dbac2d8ef02f7f9ae16f52c6a6 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(set=0, binding=1, std140) uniform FragBlock
+layout(set=0, binding=1, std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index 8d1ea120603297b06805e03702bfc28b8f5f4b7f..4a2d274b99e5c9f1d7ba394e2d8c3fca5978731c 100644 (file)
@@ -6,7 +6,7 @@
 #define OUT_COLOR gl_FragColor
 //@ignore:off
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
index 974160bdc36261c7df32ffe9137b219cf692fa34..8a8c13f720dd7cd38d4b83bf9edc2db5651917cb 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(std140) uniform FragBlock
+layout(std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index ea4ce0a2a67a95c8494568c3fea769f1d9e34247..221db7725d61f7b4f862097f79b34e8fdbb3089b 100644 (file)
@@ -8,7 +8,7 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(set=0, binding=1, std140) uniform FragBlock
+layout(set=0, binding=1, std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
index 63f6b5e5cdd32888ff78883fc3def2b81412b7c2..6f5e2dbcc346352eb8a987d3e0618a8acfcc3787 100644 (file)
@@ -9,7 +9,7 @@
 INPUT mediump vec2 aPosition;
 INPUT mediump vec2 aTexCoord;
 OUTPUT mediump vec2 vTexCoord;
-UNIFORM_BLOCK VertBlock
+UNIFORM_BLOCK UtcVertBlock
 {
   UNIFORM highp mat4 uMvpMatrix;
   UNIFORM highp vec3 uSize;
index 9859d41b763e53d56b50a90e640b6e57568e33ac..027d77372b70d35f1b2aa61b3fa5c8584dc1fb01 100644 (file)
@@ -11,7 +11,7 @@
 in mediump vec2 aPosition;
 in mediump vec2 aTexCoord;
 out mediump vec2 vTexCoord;
-layout(std140) uniform VertBlock
+layout(std140) uniform UtcVertBlock
 {
  highp mat4 uMvpMatrix;
  highp vec3 uSize;
index d22f10d0e052c6ec6f8ddacf6ecdbb0cdc83eb60..11d7634111093fe5b41fcfb96eb44130d1237541 100644 (file)
@@ -11,7 +11,7 @@
 layout(location = 0) in mediump vec2 aPosition;
 layout(location = 1) in mediump vec2 aTexCoord;
 layout(location=0) out mediump vec2 vTexCoord;
-layout(set=0, binding=0, std140) uniform VertBlock
+layout(set=0, binding=0, std140) uniform UtcVertBlock
 {
  highp mat4 uMvpMatrix;
  highp vec3 uSize;
index 66a7a7be8fdd7149e3b72aaeebc46f1f3a6adede..146bfc25e47d99d73a3e60f4708324653f268f11 100644 (file)
@@ -9,7 +9,7 @@
 //@ignore:off
 
 // Some amazing uniform block
-UNIFORM_BLOCK FragBlock// another breaking comment
+UNIFORM_BLOCK UtcFragBlock// another breaking comment
 {
   UNIFORM lowp vec4 uColor;// This is color (used to cause a parsing error!)
 };
index 7a1b76879c8770fd8516a40e872b5a43d3150eb6..5eba97b9c4370541f0d700a92100e5a73c3929a2 100644 (file)
@@ -11,7 +11,7 @@
 
 
 // Some amazing uniform block
-layout(set=0, binding=1, std140) uniform FragBlock// another breaking comment
+layout(set=0, binding=1, std140) uniform UtcFragBlock// another breaking comment
 {
  lowp vec4 uColor;// This is color (used to cause a parsing error!)
 };
index 06ff74388a8975f751176215f3dedb4fd18d8a97..15d8aa7ba48724ffcf3b279b00e5d274ee8c7da2 100644 (file)
@@ -14,7 +14,7 @@ OUTPUT mediump vec2 vTexCoord;// some output
 OUTPUT medium vec2 vTexCoord2;// other output
 
 // Some vertex block
-UNIFORM_BLOCK VertBlock//block comment
+UNIFORM_BLOCK UtcVertBlock//block comment
 {
   UNIFORM highp mat4 uMvpMatrix;//comment0
   UNIFORM highp vec3 uSize;//comment1
index 3d8dd3a64190d0c466dae189885f9d0f991fd0cf..7b1134d21c6cd08ad80e26d62c5b3f69de97e2d9 100644 (file)
@@ -16,7 +16,7 @@ layout(location=0) out mediump vec2 vTexCoord;// some output
 layout(location=1) out medium vec2 vTexCoord2;// other output
 
 // Some vertex block
-layout(set=0, binding=0, std140) uniform VertBlock//block comment
+layout(set=0, binding=0, std140) uniform UtcVertBlock//block comment
 {
  highp mat4 uMvpMatrix;//comment0
  highp vec3 uSize;//comment1
index 2fd9aba582ecc882b67f1a3896128b4a95b81d33..f5fb35e7f7ee4b2fa12f2c857bb46d8897cfe829 100644 (file)
@@ -1,7 +1,7 @@
 //@version 100
 
 // Some amazing uniform block
-UNIFORM_BLOCK FragBlock// another breaking comment
+UNIFORM_BLOCK UtcFragBlock// another breaking comment
 {
   UNIFORM lowp vec4 uColor;// This is color (used to cause a parsing error!)
 };
index 12bb98df9dd12c2c6013a2d3a3f1f4f186f54306..e316c949bb3f5cd4a686b61e13d49891a48ff2a1 100644 (file)
@@ -10,7 +10,7 @@
 #define textureCubeLod textureLod
 
 // Some amazing uniform block
-layout(set=0, binding=1, std140) uniform FragBlock// another breaking comment
+layout(set=0, binding=1, std140) uniform UtcFragBlock// another breaking comment
 {
  lowp vec4 uColor;// This is color (used to cause a parsing error!)
 };
index 4b2885c0a28f436aac387234ba30d123a150b7b8..08faedaab1b665619655116842640ecc16d8c471 100644 (file)
@@ -7,7 +7,7 @@ OUTPUT highp mat3 vMatrix;
 OUTPUT medium vec2 vTexCoord2;// other output
 
 // Some vertex block
-UNIFORM_BLOCK VertBlock//block comment
+UNIFORM_BLOCK UtcVertBlock//block comment
 {
   UNIFORM highp mat4 uMvpMatrix;//comment0
   UNIFORM highp vec3 uSize;//comment1
index 6f9374f5c3c5d99961678bf0d1977aa1a6ed7389..fb8bf6a07e3ce73a896434ffc141fef9ee57e095 100644 (file)
@@ -16,7 +16,7 @@ layout(location=1) out highp mat3 vMatrix;
 layout(location=4) out medium vec2 vTexCoord2;// other output
 
 // Some vertex block
-layout(set=0, binding=0, std140) uniform VertBlock//block comment
+layout(set=0, binding=0, std140) uniform UtcVertBlock//block comment
 {
  highp mat4 uMvpMatrix;//comment0
  highp vec3 uSize;//comment1
index 15232fe67ffdc5bac83e840b656bc77384363661..c0d9fbd9e2ba3f51887923655fd38f12d2f71952 100644 (file)
@@ -1,11 +1,11 @@
 @version 100
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
@@ -14,7 +14,7 @@ INPUT mediump vec2 vTexCoord;
 UNIFORM sampler2D sTexture;
 UNIFORM samplerCube sTextureCube;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uColor;
 };
index f836095f2aebe76cfa2f6df7b5ea61a9ce235ab0..f40cfc323f44e4efdb998f300230fea44b9546fc 100644 (file)
@@ -1,12 +1,12 @@
 @version 100
 #extension GL_OES_EGL_image_external:require
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
@@ -15,7 +15,7 @@ INPUT mediump vec2 vTexCoord;
 UNIFORM SamplerExternalOES sTexture;
 UNIFORM samplerCube sTextureCube;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uColor;
 };
index c9d213904d9a2e2347d6d9a31f6376850cffe982..026f30986079f73a84ab7645a2c79673401c004c 100644 (file)
@@ -14,12 +14,12 @@ out mediump vec4 fragColor;
 @version 100
 #extension GL_OES_EGL_image_external:require
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
@@ -28,7 +28,7 @@ INPUT mediump vec2 vTexCoord;
 UNIFORM SamplerExternalOES sTexture;
 UNIFORM samplerCube sTextureCube;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uColor;
 };
index 6352ccb4c26200f47f30e5f3a30f047ad019ba77..df6cefe4dbe45665ec999ec270438e569e5f559b 100644 (file)
@@ -1,12 +1,12 @@
 @version 100
 #extension GL_OES_EGL_image_external_essl3:require
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
@@ -15,7 +15,7 @@ INPUT mediump vec2 vTexCoord;
 UNIFORM SamplerExternalOES sTexture;
 UNIFORM samplerCube sTextureCube;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uColor;
 };
index 3945860c47cd7d433bfc2bad8d78f15711a4df3c..a07ce86be888af689f4c7b6da9ab9e730d585ee6 100644 (file)
@@ -2,18 +2,18 @@ INPUT mediump vec2 aPosition;
 INPUT mediump vec2 aTexCoord;
 OUTPUT mediump vec2 vTexCoord;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK VertBlock
+UNIFORM_BLOCK UtcVertBlock
 {
   UNIFORM highp mat4 uMvpMatrix;
   UNIFORM highp vec3 uSize;
 };
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uColor;
 };
index b1316b97e0688e7d1994795b5a8ad8c81b73da69..c0cb77a828e14474caae889dc5382ea160728d75 100644 (file)
@@ -1,10 +1,10 @@
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK FragBlock
+UNIFORM_BLOCK UtcFragBlock
 {
   UNIFORM lowp vec4 uColor;
 };
@@ -13,7 +13,7 @@ INPUT mediump vec2 vTexCoord;
 UNIFORM sampler2D sTexture;
 UNIFORM samplerCube sTextureCube;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uColor;
 };
index 36c878f07d0d2deddc46c10f0f43cd84c99539da..1d37cf3e1ad1573f1d255afe8c25ee28db0d2c99 100644 (file)
@@ -8,12 +8,12 @@
 #define texture2D texture
 #define texture2DLod textureLod
 #define textureCubeLod textureLod
-layout(set=0, binding=2, std140) uniform SharedBlock0
+layout(set=0, binding=2, std140) uniform UtcSharedBlock0
 {
  highp vec4 uOther;
 };
 
-layout(set=0, binding=3, std140) uniform FragBlock
+layout(set=0, binding=3, std140) uniform UtcFragBlock
 {
  lowp vec4 uColor;
 };
@@ -22,7 +22,7 @@ layout(location = 0) in mediump vec2 vTexCoord;
 layout(binding = 4) uniform sampler2D sTexture;
 layout(binding = 5) uniform samplerCube sTextureCube;
 
-layout(set=0, binding=0, std140) uniform SharedBlock1
+layout(set=0, binding=0, std140) uniform UtcSharedBlock1
 {
  highp vec4 uColor;
 };
index 3945860c47cd7d433bfc2bad8d78f15711a4df3c..a07ce86be888af689f4c7b6da9ab9e730d585ee6 100644 (file)
@@ -2,18 +2,18 @@ INPUT mediump vec2 aPosition;
 INPUT mediump vec2 aTexCoord;
 OUTPUT mediump vec2 vTexCoord;
 
-UNIFORM_BLOCK SharedBlock1
+UNIFORM_BLOCK UtcSharedBlock1
 {
   UNIFORM highp vec4 uOther;
 };
 
-UNIFORM_BLOCK VertBlock
+UNIFORM_BLOCK UtcVertBlock
 {
   UNIFORM highp mat4 uMvpMatrix;
   UNIFORM highp vec3 uSize;
 };
 
-UNIFORM_BLOCK SharedBlock0
+UNIFORM_BLOCK UtcSharedBlock0
 {
   UNIFORM highp vec4 uColor;
 };
index a6c4cca1c1fce0363f1a424c8cab44a9cb2f2b0d..31d5b562d671c45dcb35589510dc83915029096f 100644 (file)
@@ -11,18 +11,18 @@ layout(location = 0) in mediump vec2 aPosition;
 layout(location = 1) in mediump vec2 aTexCoord;
 layout(location=0) out mediump vec2 vTexCoord;
 
-layout(set=0, binding=0, std140) uniform SharedBlock1
+layout(set=0, binding=0, std140) uniform UtcSharedBlock1
 {
  highp vec4 uOther;
 };
 
-layout(set=0, binding=1, std140) uniform VertBlock
+layout(set=0, binding=1, std140) uniform UtcVertBlock
 {
  highp mat4 uMvpMatrix;
  highp vec3 uSize;
 };
 
-layout(set=0, binding=2, std140) uniform SharedBlock0
+layout(set=0, binding=2, std140) uniform UtcSharedBlock0
 {
  highp vec4 uColor;
 };
index 6bbde1d3e967b717f8e7f66a7a2e2009ff64a239..3407d1526bab1974cab57f71bb34f7086c575232 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/internal/graphics/common/shader-parser.h>
 #include <sstream>
 
+// Happy trick for Tizen platform! since 2025-04-22. eunkiki.hong@samsung.com
+// Since uniform buffer reduce fps near 10% than before, let we ignore uniform block feature
+// except several default SharedUniformBlocks, like "VisualVertBlock".
+// If we resolve performance issue, please remove below code!
+#define IGNORE_UNIFORM_BLOCKS_FOR_NORMAL_CASES 1
+
+#if IGNORE_UNIFORM_BLOCKS_FOR_NORMAL_CASES
+#include <unordered_set>
+#endif
+
 namespace
 {
 const std::vector<std::string> MATRIX_DATA_TYPE_TOKENS{"mat3", "mat4", "mat2"};
@@ -31,6 +41,17 @@ inline bool IsWordChar(const char c)
          (c == '_') ||
          (c == '#');
 }
+
+#if IGNORE_UNIFORM_BLOCKS_FOR_NORMAL_CASES
+const std::unordered_set<std::string_view> gExceptUniformBlockNames{
+  "VisualVertBlock",         ///< Default VisualRenderer properties
+  "GaussianBlurSampleBlock", ///< GaussianBlur effects
+  "PunctualLightBlock",      ///< For Scene3D::Light
+  "SharedFragmentBlock",     ///< For uniform-blocks.example
+  "UtcVertBlock",            ///< For UTC
+  "UtcFragBlock",            ///< For UTC
+};
+#endif
 } // namespace
 
 namespace Dali::Internal::ShaderParser
@@ -488,8 +509,13 @@ bool ProcessTokenUNIFORM_BLOCK(IT& it, Program& program, OutputLanguage lang, Sh
       }
       else if(lang >= OutputLanguage::GLSL_3 && lang <= OutputLanguage::GLSL_3_MAX)
       {
-        ss << "layout(std140) uniform" << l.line.substr(l.tokens[0].first + l.tokens[0].second).c_str() << "\n";
-        gles3plus = true;
+#if IGNORE_UNIFORM_BLOCKS_FOR_NORMAL_CASES
+        if(gExceptUniformBlockNames.find(uniformBlockName) != gExceptUniformBlockNames.end())
+#endif
+        {
+          ss << "layout(std140) uniform" << l.line.substr(l.tokens[0].first + l.tokens[0].second).c_str() << "\n";
+          gles3plus = true;
+        }
       }
       if(gles3plus) // remove word UNIFORM for gles3+/spirv
       {
@@ -510,7 +536,7 @@ bool ProcessTokenUNIFORM_BLOCK(IT& it, Program& program, OutputLanguage lang, Sh
         }
         ss << "};\n";
       }
-      else if(lang == OutputLanguage::GLSL_100_ES)
+      else
       {
         while(l.line.find('{') == std::string::npos)
         {