From 213ad6bd46cba8eb03c42c8465bc668923eb44dc Mon Sep 17 00:00:00 2001 From: Clemen Deng Date: Fri, 16 Aug 2019 16:31:32 -0400 Subject: [PATCH] Get rid of gl_ViewID_OVR for ESSL1 Only use UInt gl_ViewID_OVR from ESSL3 OVR multiview should not be exposed in ESSL1 Bug: angleproject:3822 Change-Id: Ia9d6247e3a717b06db26f1d436e2b33336b12a7d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1759143 Reviewed-by: Jamie Madill Reviewed-by: Shahbaz Youssefi Commit-Queue: Clemen Deng --- .../ESSL_static_builtins.json | 6 ++-- .../translator/SymbolTable_autogen.cpp | 30 ++----------------- .../translator/builtin_variables.json | 13 -------- .../translator/tree_util/BuiltIn_autogen.h | 2 -- 4 files changed, 5 insertions(+), 46 deletions(-) diff --git a/scripts/code_generation_hashes/ESSL_static_builtins.json b/scripts/code_generation_hashes/ESSL_static_builtins.json index e64e51995..639d4f28c 100644 --- a/scripts/code_generation_hashes/ESSL_static_builtins.json +++ b/scripts/code_generation_hashes/ESSL_static_builtins.json @@ -4,17 +4,17 @@ "src/compiler/translator/ParseContext_autogen.h": "48f878f5878e8ab239af7c14e5878b62", "src/compiler/translator/SymbolTable_autogen.cpp": - "96ed28ab5a4a213a7077b7bf6fdb5463", + "d596cedd9f12e0c91fea4fe0d04d207a", "src/compiler/translator/SymbolTable_autogen.h": "bdb3c8eab0d48267a2f264e3af635e1a", "src/compiler/translator/builtin_function_declarations.txt": "583e23ceaca8d2baeb07694049b68644", "src/compiler/translator/builtin_variables.json": - "bbcda061188c066dd887f9ecf5f6f4b4", + "779ab43201aac2ac26017e87331c80d1", "src/compiler/translator/gen_builtin_symbols.py": "70805846a33bf9b0c47639c80d01f0f8", "src/compiler/translator/tree_util/BuiltIn_autogen.h": - "eb49e9f6216e90d11e91d60a2446ac6d", + "12f125f1b65be3379b08d2cf831a2e3a", "src/tests/compiler_tests/ImmutableString_test_autogen.cpp": "99468acdcf2bad59fd9f6a7519bcf390" } \ No newline at end of file diff --git a/src/compiler/translator/SymbolTable_autogen.cpp b/src/compiler/translator/SymbolTable_autogen.cpp index 54b37e73c..65c871b17 100644 --- a/src/compiler/translator/SymbolTable_autogen.cpp +++ b/src/compiler/translator/SymbolTable_autogen.cpp @@ -2233,9 +2233,8 @@ constexpr const TSymbolUniqueId BuiltInId::gl_in; constexpr const TSymbolUniqueId BuiltInId::gl_PerVertexOutBlock; constexpr const TSymbolUniqueId BuiltInId::gl_PositionGS; constexpr const TSymbolUniqueId BuiltInId::gl_ViewID_OVR; -constexpr const TSymbolUniqueId BuiltInId::gl_ViewID_OVRESSL1; -const int TSymbolTable::kLastBuiltInId = 2296; +const int TSymbolTable::kLastBuiltInId = 2295; namespace BuiltInName { @@ -4962,12 +4961,6 @@ constexpr const TVariable var_gl_ViewID_OVR( SymbolType::BuiltIn, TExtension::UNDEFINED, StaticType::Get()); -constexpr const TVariable var_gl_ViewID_OVRESSL1( - BuiltInId::gl_ViewID_OVRESSL1, - BuiltInName::gl_ViewID_OVR, - SymbolType::BuiltIn, - TExtension::UNDEFINED, - StaticType::Get()); constexpr const TVariable var_gl_ViewportIndex( BuiltInId::gl_ViewportIndex, BuiltInName::gl_ViewportIndex, @@ -5868,11 +5861,6 @@ const TVariable *gl_ViewID_OVR() return &var_gl_ViewID_OVR; } -const TVariable *gl_ViewID_OVRESSL1() -{ - return &var_gl_ViewID_OVRESSL1; -} - const TVariable *gl_ViewportIndex() { return &var_gl_ViewportIndex; @@ -32292,20 +32280,6 @@ const TSymbol *TSymbolTable::findBuiltIn(const ImmutableString &name, int shader } } } - if (mResources.OVR_multiview && mShaderType != GL_COMPUTE_SHADER) - { - switch (nameHash) - { - case 0x0000024eu: - { - if (name == BuiltInName::gl_ViewID_OVR) - { - return &BuiltInVariable::var_gl_ViewID_OVRESSL1; - } - break; - } - } - } } switch (nameHash) { @@ -51070,7 +51044,7 @@ const TSymbol *TSymbolTable::findBuiltIn(const ImmutableString &name, int shader { if (name == BuiltInName::gl_ViewID_OVR) { - return &BuiltInVariable::var_gl_ViewID_OVRESSL1; + return &BuiltInVariable::var_gl_ViewID_OVR; } break; } diff --git a/src/compiler/translator/builtin_variables.json b/src/compiler/translator/builtin_variables.json index 899cff6bc..d6f70d021 100644 --- a/src/compiler/translator/builtin_variables.json +++ b/src/compiler/translator/builtin_variables.json @@ -895,19 +895,6 @@ } } } - }, - "ESSL1":{ - "variables":{ - "gl_ViewID_OVR":{ - "suffix":"ESSL1", - "level":"ESSL1_BUILTINS", - "type":{ - "basic":"Int", - "precision":"High", - "qualifier":"ViewIDOVR" - } - } - } } } } diff --git a/src/compiler/translator/tree_util/BuiltIn_autogen.h b/src/compiler/translator/tree_util/BuiltIn_autogen.h index f9c740e65..2a6c643e0 100644 --- a/src/compiler/translator/tree_util/BuiltIn_autogen.h +++ b/src/compiler/translator/tree_util/BuiltIn_autogen.h @@ -3482,7 +3482,6 @@ class BuiltInId static constexpr const TSymbolUniqueId gl_PerVertexOutBlock = TSymbolUniqueId(2293); static constexpr const TSymbolUniqueId gl_PositionGS = TSymbolUniqueId(2294); static constexpr const TSymbolUniqueId gl_ViewID_OVR = TSymbolUniqueId(2295); - static constexpr const TSymbolUniqueId gl_ViewID_OVRESSL1 = TSymbolUniqueId(2296); }; // class BuiltInId @@ -3517,7 +3516,6 @@ const TVariable *gl_PrimitiveIDIn(); const TVariable *gl_SecondaryFragColorEXT(); const TVariable *gl_VertexID(); const TVariable *gl_ViewID_OVR(); -const TVariable *gl_ViewID_OVRESSL1(); const TVariable *gl_ViewportIndex(); const TVariable *gl_WorkGroupID(); const TVariable *gl_WorkGroupSize();