Use OES_texture_storage_multisample_2d_array
There's an OES extension for multisample texture arrays,
OES_texture_storage_multisample_2d_array. Change references from
ANGLE_texture_multisample_array to the native extension in the shader
compiler.
ANGLE still needs to have robust behavior for out-of-range texel
fetches that's not found in the original extension, but this does not
need to be spelled out in the extension spec.
BUG=angleproject:2775
TEST=angle_unittests
Change-Id: Ie80ae767cc92ccaf7389af28789f45547f86978f
Reviewed-on: https://chromium-review.googlesource.com/1193266
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ExtensionBehavior.cpp b/src/compiler/translator/ExtensionBehavior.cpp
index 5d906e2..4046a9e 100644
--- a/src/compiler/translator/ExtensionBehavior.cpp
+++ b/src/compiler/translator/ExtensionBehavior.cpp
@@ -12,22 +12,22 @@
#include <string.h>
-#define LIST_EXTENSIONS(OP) \
- OP(ANGLE_texture_multisample_array) \
- OP(ARB_texture_rectangle) \
- OP(ARM_shader_framebuffer_fetch) \
- OP(EXT_blend_func_extended) \
- OP(EXT_draw_buffers) \
- OP(EXT_frag_depth) \
- OP(EXT_geometry_shader) \
- OP(EXT_shader_framebuffer_fetch) \
- OP(EXT_shader_texture_lod) \
- OP(EXT_YUV_target) \
- OP(NV_EGL_stream_consumer_external) \
- OP(NV_shader_framebuffer_fetch) \
- OP(OES_EGL_image_external) \
- OP(OES_EGL_image_external_essl3) \
- OP(OES_standard_derivatives) \
+#define LIST_EXTENSIONS(OP) \
+ OP(ARB_texture_rectangle) \
+ OP(ARM_shader_framebuffer_fetch) \
+ OP(EXT_blend_func_extended) \
+ OP(EXT_draw_buffers) \
+ OP(EXT_frag_depth) \
+ OP(EXT_geometry_shader) \
+ OP(EXT_shader_framebuffer_fetch) \
+ OP(EXT_shader_texture_lod) \
+ OP(EXT_YUV_target) \
+ OP(NV_EGL_stream_consumer_external) \
+ OP(NV_shader_framebuffer_fetch) \
+ OP(OES_EGL_image_external) \
+ OP(OES_EGL_image_external_essl3) \
+ OP(OES_standard_derivatives) \
+ OP(OES_texture_storage_multisample_2d_array) \
OP(OVR_multiview)
namespace sh
diff --git a/src/compiler/translator/ExtensionBehavior.h b/src/compiler/translator/ExtensionBehavior.h
index aef269e..d021bd2 100644
--- a/src/compiler/translator/ExtensionBehavior.h
+++ b/src/compiler/translator/ExtensionBehavior.h
@@ -18,7 +18,6 @@
{
UNDEFINED, // Special value used to indicate no extension.
- ANGLE_texture_multisample_array,
ARB_texture_rectangle,
ARM_shader_framebuffer_fetch,
EXT_blend_func_extended,
@@ -33,6 +32,7 @@
OES_EGL_image_external,
OES_EGL_image_external_essl3,
OES_standard_derivatives,
+ OES_texture_storage_multisample_2d_array,
OVR_multiview
};
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index 80c37e0..0a6aef1 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -73,9 +73,9 @@
{
extBehavior[TExtension::EXT_geometry_shader] = EBhUndefined;
}
- if (resources.ANGLE_texture_multisample_array)
+ if (resources.OES_texture_storage_multisample_2d_array)
{
- extBehavior[TExtension::ANGLE_texture_multisample_array] = EBhUndefined;
+ extBehavior[TExtension::OES_texture_storage_multisample_2d_array] = EBhUndefined;
}
}
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index 10cc5e9..21e3e72 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -186,23 +186,23 @@
resources->MaxDrawBuffers = 1;
// Extensions.
- resources->OES_standard_derivatives = 0;
- resources->OES_EGL_image_external = 0;
- resources->OES_EGL_image_external_essl3 = 0;
- resources->NV_EGL_stream_consumer_external = 0;
- resources->ARB_texture_rectangle = 0;
- resources->EXT_blend_func_extended = 0;
- resources->EXT_draw_buffers = 0;
- resources->EXT_frag_depth = 0;
- resources->EXT_shader_texture_lod = 0;
- resources->WEBGL_debug_shader_precision = 0;
- resources->EXT_shader_framebuffer_fetch = 0;
- resources->NV_shader_framebuffer_fetch = 0;
- resources->ARM_shader_framebuffer_fetch = 0;
- resources->OVR_multiview = 0;
- resources->EXT_YUV_target = 0;
- resources->EXT_geometry_shader = 0;
- resources->ANGLE_texture_multisample_array = 0;
+ resources->OES_standard_derivatives = 0;
+ resources->OES_EGL_image_external = 0;
+ resources->OES_EGL_image_external_essl3 = 0;
+ resources->NV_EGL_stream_consumer_external = 0;
+ resources->ARB_texture_rectangle = 0;
+ resources->EXT_blend_func_extended = 0;
+ resources->EXT_draw_buffers = 0;
+ resources->EXT_frag_depth = 0;
+ resources->EXT_shader_texture_lod = 0;
+ resources->WEBGL_debug_shader_precision = 0;
+ resources->EXT_shader_framebuffer_fetch = 0;
+ resources->NV_shader_framebuffer_fetch = 0;
+ resources->ARM_shader_framebuffer_fetch = 0;
+ resources->OVR_multiview = 0;
+ resources->EXT_YUV_target = 0;
+ resources->EXT_geometry_shader = 0;
+ resources->OES_texture_storage_multisample_2d_array = 0;
resources->NV_draw_buffers = 0;
diff --git a/src/compiler/translator/SymbolTable_autogen.cpp b/src/compiler/translator/SymbolTable_autogen.cpp
index 7b3ed4e..cbb48b4 100644
--- a/src/compiler/translator/SymbolTable_autogen.cpp
+++ b/src/compiler/translator/SymbolTable_autogen.cpp
@@ -8142,7 +8142,7 @@
constexpr const TFunction kFunction_textureSize_0P(
BuiltInId::textureSize_Sampler2DMSArray1,
BuiltInName::textureSize,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0P2C0C,
1,
StaticType::Get<EbtInt, EbpUndefined, EvqGlobal, 3, 1>(),
@@ -8151,7 +8151,7 @@
constexpr const TFunction kFunction_textureSize_0V(
BuiltInId::textureSize_ISampler2DMSArray1,
BuiltInName::textureSize,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0V2C0C,
1,
StaticType::Get<EbtInt, EbpUndefined, EvqGlobal, 3, 1>(),
@@ -8160,7 +8160,7 @@
constexpr const TFunction kFunction_textureSize_0b(
BuiltInId::textureSize_USampler2DMSArray1,
BuiltInName::textureSize,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0b2C0C,
1,
StaticType::Get<EbtInt, EbpUndefined, EvqGlobal, 3, 1>(),
@@ -9384,7 +9384,7 @@
constexpr const TFunction kFunction_texelFetch_0P2C0C(
BuiltInId::texelFetch_Sampler2DMSArray1_Int3_Int1,
BuiltInName::texelFetch,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0P2C0C,
3,
StaticType::Get<EbtFloat, EbpUndefined, EvqGlobal, 4, 1>(),
@@ -9393,7 +9393,7 @@
constexpr const TFunction kFunction_texelFetch_0V2C0C(
BuiltInId::texelFetch_ISampler2DMSArray1_Int3_Int1,
BuiltInName::texelFetch,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0V2C0C,
3,
StaticType::Get<EbtInt, EbpUndefined, EvqGlobal, 4, 1>(),
@@ -9402,7 +9402,7 @@
constexpr const TFunction kFunction_texelFetch_0b2C0C(
BuiltInId::texelFetch_USampler2DMSArray1_Int3_Int1,
BuiltInName::texelFetch,
- TExtension::ANGLE_texture_multisample_array,
+ TExtension::OES_texture_storage_multisample_2d_array,
BuiltInParameters::p0b2C0C,
3,
StaticType::Get<EbtUInt, EbpUndefined, EvqGlobal, 4, 1>(),
diff --git a/src/compiler/translator/builtin_function_declarations.txt b/src/compiler/translator/builtin_function_declarations.txt
index a6449ee..9f0408f 100644
--- a/src/compiler/translator/builtin_function_declarations.txt
+++ b/src/compiler/translator/builtin_function_declarations.txt
@@ -382,7 +382,7 @@
GROUP END TextureSizeMS
GROUP BEGIN TextureSizeMSArray
- DEFAULT METADATA {"level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction", "extension": "ANGLE_texture_multisample_array"}
+ DEFAULT METADATA {"level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction", "extension": "OES_texture_storage_multisample_2d_array"}
ivec3 textureSize(gsampler2DMSArray);
GROUP END TextureSizeMSArray
@@ -478,7 +478,7 @@
GROUP END TexelFetchMS
GROUP BEGIN TexelFetchMSArray
- DEFAULT METADATA {"level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction", "extension": "ANGLE_texture_multisample_array"}
+ DEFAULT METADATA {"level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction", "extension": "OES_texture_storage_multisample_2d_array"}
gvec4 texelFetch(gsampler2DMSArray, ivec3, int);
GROUP END TexelFetchMSArray
diff --git a/src/compiler/translator/builtin_symbols_hash_autogen.txt b/src/compiler/translator/builtin_symbols_hash_autogen.txt
index ed00aa0..d1cc50c 100644
--- a/src/compiler/translator/builtin_symbols_hash_autogen.txt
+++ b/src/compiler/translator/builtin_symbols_hash_autogen.txt
@@ -1 +1 @@
-981c1d80d682250a98834c8c1297e616
\ No newline at end of file
+73cc05cec23b85e97dfc3c1b334a927c
\ No newline at end of file
diff --git a/src/compiler/translator/glslang.l b/src/compiler/translator/glslang.l
index 88d2a6a..abfe233 100644
--- a/src/compiler/translator/glslang.l
+++ b/src/compiler/translator/glslang.l
@@ -204,9 +204,9 @@
"samplerCubeShadow" { return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); }
"sampler2DArrayShadow" { return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); }
"__samplerExternal2DY2YEXT" { return ES3_extension_keyword_else_ident(context, TExtension::EXT_YUV_target, SAMPLEREXTERNAL2DY2YEXT); }
-"sampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, SAMPLER2DMSARRAY); }
-"isampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, ISAMPLER2DMSARRAY); }
-"usampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, USAMPLER2DMSARRAY); }
+"sampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, SAMPLER2DMSARRAY); }
+"isampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, ISAMPLER2DMSARRAY); }
+"usampler2DMSArray" { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, USAMPLER2DMSARRAY); }
"struct" { return STRUCT; }
diff --git a/src/compiler/translator/glslang_lex.cpp b/src/compiler/translator/glslang_lex.cpp
index 4d31627..930afde 100644
--- a/src/compiler/translator/glslang_lex.cpp
+++ b/src/compiler/translator/glslang_lex.cpp
@@ -2028,15 +2028,15 @@
YY_BREAK
case 83:
YY_RULE_SETUP
-{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, SAMPLER2DMSARRAY); }
+{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, SAMPLER2DMSARRAY); }
YY_BREAK
case 84:
YY_RULE_SETUP
-{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, ISAMPLER2DMSARRAY); }
+{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, ISAMPLER2DMSARRAY); }
YY_BREAK
case 85:
YY_RULE_SETUP
-{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::ANGLE_texture_multisample_array, USAMPLER2DMSARRAY); }
+{ return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, USAMPLER2DMSARRAY); }
YY_BREAK
case 86:
YY_RULE_SETUP