Commit 43acf3ba by Jamie Madill Committed by Commit Bot

GL: Compiler changes for GL_OES_texture_buffer

This extension is core in GLES 3.2 This CL enables the extension, added 412 new dEQP tests for texture buffer. 410 of these tests pass, but there are two tests that fail, detailed in anglebug.com/4933 Also includes a fix for completeness checks. Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: I45759d765c88c64f21b592eab01d910dc4bc8da3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2521239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 7616dfbd
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 237 #define ANGLE_SH_VERSION 238
enum ShShaderSpec enum ShShaderSpec
{ {
...@@ -407,6 +407,9 @@ struct ShBuiltInResources ...@@ -407,6 +407,9 @@ struct ShBuiltInResources
int EXT_shadow_samplers; int EXT_shadow_samplers;
int OES_shader_multisample_interpolation; int OES_shader_multisample_interpolation;
int OES_shader_image_atomic; int OES_shader_image_atomic;
int OES_texture_buffer;
int EXT_texture_buffer;
// Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives // Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives
// with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate // with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate
// EXT_draw_buffers by using it in combination with GLES3.0 glDrawBuffers // EXT_draw_buffers by using it in combination with GLES3.0 glDrawBuffers
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"src/compiler/translator/generate_parser.py": "src/compiler/translator/generate_parser.py":
"566178ecdfae3a29803b3687fc518ebb", "566178ecdfae3a29803b3687fc518ebb",
"src/compiler/translator/glslang.l": "src/compiler/translator/glslang.l":
"d0119d698e056a454a4414a254324df4", "e31e622f26fefd9fb271474e11ac9e10",
"src/compiler/translator/glslang.y": "src/compiler/translator/glslang.y":
"d00fad5170eb80f9d420d126eb0d311c", "a28cb3d179632938d06010e748d6dff7",
"src/compiler/translator/glslang_lex_autogen.cpp": "src/compiler/translator/glslang_lex_autogen.cpp":
"6e265988e6f6afe3ff984a07ce3caf16", "c75df7edcc64c07fab616a37f460dfe3",
"src/compiler/translator/glslang_tab_autogen.cpp": "src/compiler/translator/glslang_tab_autogen.cpp":
"3a39adeee3876580c27993da0555320a", "a40597be88d6fe1f229239ae0f65297a",
"src/compiler/translator/glslang_tab_autogen.h": "src/compiler/translator/glslang_tab_autogen.h":
"ed181c8ef2a71585f18b2015f5f1c098", "c6f1ee189993fa5d6075f00a0d621b32",
"tools/flex-bison/linux/bison.sha1": "tools/flex-bison/linux/bison.sha1":
"efa86001f00e7bcfdbe899dd15fc88e0", "efa86001f00e7bcfdbe899dd15fc88e0",
"tools/flex-bison/linux/flex.sha1": "tools/flex-bison/linux/flex.sha1":
......
{ {
"src/compiler/translator/ImmutableString_ESSL_autogen.cpp": "src/compiler/translator/ImmutableString_ESSL_autogen.cpp":
"bab94ae93917a40dd2f3184be08a4933", "681fc68d9b569792f8080e2217d75abe",
"src/compiler/translator/ImmutableString_autogen.cpp": "src/compiler/translator/ImmutableString_autogen.cpp":
"fa74ff3796c28e14bb617749987c94f8", "fa74ff3796c28e14bb617749987c94f8",
"src/compiler/translator/ParseContext_ESSL_autogen.h": "src/compiler/translator/ParseContext_ESSL_autogen.h":
"fb36d587618dabfd828d7d5f645fa2e5", "3f9db6a162f1a73c17d0f142d76213ad",
"src/compiler/translator/ParseContext_complete_autogen.h": "src/compiler/translator/ParseContext_complete_autogen.h":
"2db8d7d0efd13afdd4b971c89f785f7e", "2db8d7d0efd13afdd4b971c89f785f7e",
"src/compiler/translator/SymbolTable_ESSL_autogen.cpp": "src/compiler/translator/SymbolTable_ESSL_autogen.cpp":
"6a4ad24f5d85a39e797226cc9416df1d", "d84e2717f4a225dba071f200e0646da4",
"src/compiler/translator/SymbolTable_autogen.cpp": "src/compiler/translator/SymbolTable_autogen.cpp":
"0ea25cc0c63638efa3f38923e796008b", "63cc020a43f6d4cfbe9cd98f11c1f69b",
"src/compiler/translator/SymbolTable_autogen.h": "src/compiler/translator/SymbolTable_autogen.h":
"2d8bed6ff5debc6546199a2add316a66", "2d8bed6ff5debc6546199a2add316a66",
"src/compiler/translator/builtin_function_declarations.txt": "src/compiler/translator/builtin_function_declarations.txt":
"dfc73c66a0efbdc7543ed7a6fbd3f00c", "6bd6a29dcb3b536df8269b106f095e5a",
"src/compiler/translator/builtin_variables.json": "src/compiler/translator/builtin_variables.json":
"98d347a6ed181eca3d89bfd73193d787", "98d347a6ed181eca3d89bfd73193d787",
"src/compiler/translator/gen_builtin_symbols.py": "src/compiler/translator/gen_builtin_symbols.py":
"03bdb7260ac347f4be968229a6a97aab", "03bdb7260ac347f4be968229a6a97aab",
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h": "src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h":
"359670b3327789b173bb961e3c66a19f", "848af57c8fea997e9e1fc7e9f6dbff1b",
"src/compiler/translator/tree_util/BuiltIn_complete_autogen.h": "src/compiler/translator/tree_util/BuiltIn_complete_autogen.h":
"2ec6e29190e01f1731b3e3a18d6f0684", "2c91eb13bbe7901453a2272e39bfc3d4",
"src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp":
"90bfc0010975c358a3a8d6336f9afb01", "253167c79fadea9e4f90131e7c7c8704",
"src/tests/compiler_tests/ImmutableString_test_autogen.cpp": "src/tests/compiler_tests/ImmutableString_test_autogen.cpp":
"7994b8d74b3f497da8e7b031a7f83e3d" "0366f33a5cfbf9c093f01c94bd41856d"
} }
\ No newline at end of file
{ {
"src/common/gen_uniform_type_table.py": "src/common/gen_uniform_type_table.py":
"43f21df292ca1864166cc93ed59f2b66", "0dbc1867be7607fdf97587799474252d",
"src/common/uniform_type_info_autogen.cpp": "src/common/uniform_type_info_autogen.cpp":
"ecffb0755d6051d656f9b68e3d7eea72" "9ab3b9142292306d0a29493ff40d5105"
} }
\ No newline at end of file
...@@ -16,21 +16,23 @@ all_uniform_types = [ ...@@ -16,21 +16,23 @@ all_uniform_types = [
"GL_FLOAT_MAT2", "GL_FLOAT_MAT2x3", "GL_FLOAT_MAT2x4", "GL_FLOAT_MAT3", "GL_FLOAT_MAT3x2", "GL_FLOAT_MAT2", "GL_FLOAT_MAT2x3", "GL_FLOAT_MAT2x4", "GL_FLOAT_MAT3", "GL_FLOAT_MAT3x2",
"GL_FLOAT_MAT3x4", "GL_FLOAT_MAT4", "GL_FLOAT_MAT4x2", "GL_FLOAT_MAT4x3", "GL_FLOAT_VEC2", "GL_FLOAT_MAT3x4", "GL_FLOAT_MAT4", "GL_FLOAT_MAT4x2", "GL_FLOAT_MAT4x3", "GL_FLOAT_VEC2",
"GL_FLOAT_VEC3", "GL_FLOAT_VEC4", "GL_IMAGE_2D", "GL_IMAGE_2D_ARRAY", "GL_IMAGE_3D", "GL_FLOAT_VEC3", "GL_FLOAT_VEC4", "GL_IMAGE_2D", "GL_IMAGE_2D_ARRAY", "GL_IMAGE_3D",
"GL_IMAGE_CUBE", "GL_IMAGE_CUBE_MAP_ARRAY", "GL_INT", "GL_INT_IMAGE_2D", "GL_IMAGE_CUBE", "GL_IMAGE_CUBE_MAP_ARRAY", "GL_IMAGE_BUFFER", "GL_INT", "GL_INT_IMAGE_2D",
"GL_INT_IMAGE_2D_ARRAY", "GL_INT_IMAGE_3D", "GL_INT_IMAGE_CUBE", "GL_INT_IMAGE_CUBE_MAP_ARRAY", "GL_INT_IMAGE_2D_ARRAY", "GL_INT_IMAGE_3D", "GL_INT_IMAGE_CUBE", "GL_INT_IMAGE_CUBE_MAP_ARRAY",
"GL_INT_SAMPLER_2D", "GL_INT_SAMPLER_2D_ARRAY", "GL_INT_SAMPLER_2D_MULTISAMPLE", "GL_INT_IMAGE_BUFFER", "GL_INT_SAMPLER_2D", "GL_INT_SAMPLER_2D_ARRAY",
"GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GL_INT_SAMPLER_3D", "GL_INT_SAMPLER_CUBE", "GL_INT_SAMPLER_2D_MULTISAMPLE", "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GL_INT_SAMPLER_3D",
"GL_INT_SAMPLER_CUBE_MAP_ARRAY", "GL_INT_VEC2", "GL_INT_VEC3", "GL_INT_VEC4", "GL_SAMPLER_2D", "GL_INT_SAMPLER_CUBE", "GL_INT_SAMPLER_CUBE_MAP_ARRAY", "GL_INT_SAMPLER_BUFFER", "GL_INT_VEC2",
"GL_SAMPLER_2D_ARRAY", "GL_SAMPLER_2D_ARRAY_SHADOW", "GL_SAMPLER_2D_MULTISAMPLE", "GL_INT_VEC3", "GL_INT_VEC4", "GL_SAMPLER_2D", "GL_SAMPLER_2D_ARRAY",
"GL_SAMPLER_2D_MULTISAMPLE_ARRAY", "GL_SAMPLER_2D_RECT_ANGLE", "GL_SAMPLER_2D_SHADOW", "GL_SAMPLER_2D_ARRAY_SHADOW", "GL_SAMPLER_2D_MULTISAMPLE", "GL_SAMPLER_2D_MULTISAMPLE_ARRAY",
"GL_SAMPLER_3D", "GL_SAMPLER_CUBE", "GL_SAMPLER_CUBE_MAP_ARRAY", "GL_SAMPLER_CUBE_SHADOW", "GL_SAMPLER_2D_RECT_ANGLE", "GL_SAMPLER_2D_SHADOW", "GL_SAMPLER_3D", "GL_SAMPLER_CUBE",
"GL_SAMPLER_CUBE_MAP_ARRAY", "GL_SAMPLER_BUFFER", "GL_SAMPLER_CUBE_SHADOW",
"GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW", "GL_SAMPLER_EXTERNAL_OES", "GL_UNSIGNED_INT", "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW", "GL_SAMPLER_EXTERNAL_OES", "GL_UNSIGNED_INT",
"GL_UNSIGNED_INT_ATOMIC_COUNTER", "GL_UNSIGNED_INT_IMAGE_2D", "GL_UNSIGNED_INT_IMAGE_2D_ARRAY", "GL_UNSIGNED_INT_ATOMIC_COUNTER", "GL_UNSIGNED_INT_IMAGE_2D", "GL_UNSIGNED_INT_IMAGE_2D_ARRAY",
"GL_UNSIGNED_INT_IMAGE_3D", "GL_UNSIGNED_INT_IMAGE_CUBE", "GL_UNSIGNED_INT_IMAGE_3D", "GL_UNSIGNED_INT_IMAGE_CUBE",
"GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY", "GL_UNSIGNED_INT_SAMPLER_2D", "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY", "GL_UNSIGNED_INT_IMAGE_BUFFER",
"GL_UNSIGNED_INT_SAMPLER_2D_ARRAY", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", "GL_UNSIGNED_INT_SAMPLER_2D", "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY",
"GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GL_UNSIGNED_INT_SAMPLER_3D", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY",
"GL_UNSIGNED_INT_SAMPLER_CUBE", "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", "GL_UNSIGNED_INT_SAMPLER_3D", "GL_UNSIGNED_INT_SAMPLER_CUBE",
"GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", "GL_UNSIGNED_INT_SAMPLER_BUFFER",
"GL_UNSIGNED_INT_VEC2", "GL_UNSIGNED_INT_VEC3", "GL_UNSIGNED_INT_VEC4", "GL_UNSIGNED_INT_VEC2", "GL_UNSIGNED_INT_VEC3", "GL_UNSIGNED_INT_VEC4",
"GL_SAMPLER_VIDEO_IMAGE_WEBGL" "GL_SAMPLER_VIDEO_IMAGE_WEBGL"
] ]
...@@ -51,6 +53,7 @@ texture_types = { ...@@ -51,6 +53,7 @@ texture_types = {
"EXTERNAL_OES": "EXTERNAL_OES", "EXTERNAL_OES": "EXTERNAL_OES",
"RECT": "RECTANGLE", "RECT": "RECTANGLE",
"CUBE_MAP_ARRAY": "CUBE_MAP_ARRAY", "CUBE_MAP_ARRAY": "CUBE_MAP_ARRAY",
"BUFFER": "BUFFER",
"VIDEO_IMAGE_WEBGL": "VIDEO_IMAGE_WEBGL", "VIDEO_IMAGE_WEBGL": "VIDEO_IMAGE_WEBGL",
} }
......
...@@ -165,6 +165,9 @@ GLenum VariableComponentType(GLenum type) ...@@ -165,6 +165,9 @@ GLenum VariableComponentType(GLenum type)
case GL_IMAGE_CUBE_MAP_ARRAY: case GL_IMAGE_CUBE_MAP_ARRAY:
case GL_INT_IMAGE_CUBE_MAP_ARRAY: case GL_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_IMAGE_BUFFER:
case GL_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_ATOMIC_COUNTER: case GL_UNSIGNED_INT_ATOMIC_COUNTER:
case GL_SAMPLER_VIDEO_IMAGE_WEBGL: case GL_SAMPLER_VIDEO_IMAGE_WEBGL:
return GL_INT; return GL_INT;
...@@ -316,6 +319,7 @@ int VariableRowCount(GLenum type) ...@@ -316,6 +319,7 @@ int VariableRowCount(GLenum type)
case GL_SAMPLER_2D_MULTISAMPLE: case GL_SAMPLER_2D_MULTISAMPLE:
case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_SAMPLER_CUBE_MAP_ARRAY: case GL_SAMPLER_CUBE_MAP_ARRAY:
case GL_SAMPLER_BUFFER:
case GL_INT_SAMPLER_2D: case GL_INT_SAMPLER_2D:
case GL_INT_SAMPLER_3D: case GL_INT_SAMPLER_3D:
case GL_INT_SAMPLER_CUBE: case GL_INT_SAMPLER_CUBE:
...@@ -323,6 +327,7 @@ int VariableRowCount(GLenum type) ...@@ -323,6 +327,7 @@ int VariableRowCount(GLenum type)
case GL_INT_SAMPLER_2D_MULTISAMPLE: case GL_INT_SAMPLER_2D_MULTISAMPLE:
case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_INT_SAMPLER_BUFFER:
case GL_UNSIGNED_INT_SAMPLER_2D: case GL_UNSIGNED_INT_SAMPLER_2D:
case GL_UNSIGNED_INT_SAMPLER_3D: case GL_UNSIGNED_INT_SAMPLER_3D:
case GL_UNSIGNED_INT_SAMPLER_CUBE: case GL_UNSIGNED_INT_SAMPLER_CUBE:
...@@ -330,6 +335,7 @@ int VariableRowCount(GLenum type) ...@@ -330,6 +335,7 @@ int VariableRowCount(GLenum type)
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE:
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_BUFFER:
case GL_SAMPLER_2D_SHADOW: case GL_SAMPLER_2D_SHADOW:
case GL_SAMPLER_CUBE_SHADOW: case GL_SAMPLER_CUBE_SHADOW:
case GL_SAMPLER_2D_ARRAY_SHADOW: case GL_SAMPLER_2D_ARRAY_SHADOW:
...@@ -350,6 +356,9 @@ int VariableRowCount(GLenum type) ...@@ -350,6 +356,9 @@ int VariableRowCount(GLenum type)
case GL_IMAGE_CUBE_MAP_ARRAY: case GL_IMAGE_CUBE_MAP_ARRAY:
case GL_INT_IMAGE_CUBE_MAP_ARRAY: case GL_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_IMAGE_BUFFER:
case GL_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_IMAGE_BUFFER:
case GL_SAMPLER_VIDEO_IMAGE_WEBGL: case GL_SAMPLER_VIDEO_IMAGE_WEBGL:
return 1; return 1;
case GL_FLOAT_MAT2: case GL_FLOAT_MAT2:
...@@ -388,6 +397,7 @@ int VariableColumnCount(GLenum type) ...@@ -388,6 +397,7 @@ int VariableColumnCount(GLenum type)
case GL_SAMPLER_2D_MULTISAMPLE: case GL_SAMPLER_2D_MULTISAMPLE:
case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_SAMPLER_CUBE_MAP_ARRAY: case GL_SAMPLER_CUBE_MAP_ARRAY:
case GL_SAMPLER_BUFFER:
case GL_INT_SAMPLER_2D: case GL_INT_SAMPLER_2D:
case GL_INT_SAMPLER_3D: case GL_INT_SAMPLER_3D:
case GL_INT_SAMPLER_CUBE: case GL_INT_SAMPLER_CUBE:
...@@ -395,6 +405,7 @@ int VariableColumnCount(GLenum type) ...@@ -395,6 +405,7 @@ int VariableColumnCount(GLenum type)
case GL_INT_SAMPLER_2D_MULTISAMPLE: case GL_INT_SAMPLER_2D_MULTISAMPLE:
case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_INT_SAMPLER_BUFFER:
case GL_SAMPLER_EXTERNAL_OES: case GL_SAMPLER_EXTERNAL_OES:
case GL_SAMPLER_2D_RECT_ANGLE: case GL_SAMPLER_2D_RECT_ANGLE:
case GL_UNSIGNED_INT_SAMPLER_2D: case GL_UNSIGNED_INT_SAMPLER_2D:
...@@ -404,6 +415,7 @@ int VariableColumnCount(GLenum type) ...@@ -404,6 +415,7 @@ int VariableColumnCount(GLenum type)
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE:
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_BUFFER:
case GL_SAMPLER_2D_SHADOW: case GL_SAMPLER_2D_SHADOW:
case GL_SAMPLER_CUBE_SHADOW: case GL_SAMPLER_CUBE_SHADOW:
case GL_SAMPLER_2D_ARRAY_SHADOW: case GL_SAMPLER_2D_ARRAY_SHADOW:
...@@ -420,6 +432,9 @@ int VariableColumnCount(GLenum type) ...@@ -420,6 +432,9 @@ int VariableColumnCount(GLenum type)
case GL_IMAGE_CUBE_MAP_ARRAY: case GL_IMAGE_CUBE_MAP_ARRAY:
case GL_INT_IMAGE_CUBE_MAP_ARRAY: case GL_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_IMAGE_BUFFER:
case GL_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_IMAGE_BUFFER:
case GL_IMAGE_CUBE: case GL_IMAGE_CUBE:
case GL_INT_IMAGE_CUBE: case GL_INT_IMAGE_CUBE:
case GL_UNSIGNED_INT_IMAGE_CUBE: case GL_UNSIGNED_INT_IMAGE_CUBE:
...@@ -469,6 +484,7 @@ bool IsSamplerType(GLenum type) ...@@ -469,6 +484,7 @@ bool IsSamplerType(GLenum type)
case GL_SAMPLER_2D_MULTISAMPLE: case GL_SAMPLER_2D_MULTISAMPLE:
case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_SAMPLER_CUBE_MAP_ARRAY: case GL_SAMPLER_CUBE_MAP_ARRAY:
case GL_SAMPLER_BUFFER:
case GL_SAMPLER_2D_RECT_ANGLE: case GL_SAMPLER_2D_RECT_ANGLE:
case GL_INT_SAMPLER_2D: case GL_INT_SAMPLER_2D:
case GL_INT_SAMPLER_3D: case GL_INT_SAMPLER_3D:
...@@ -477,6 +493,7 @@ bool IsSamplerType(GLenum type) ...@@ -477,6 +493,7 @@ bool IsSamplerType(GLenum type)
case GL_INT_SAMPLER_2D_MULTISAMPLE: case GL_INT_SAMPLER_2D_MULTISAMPLE:
case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_INT_SAMPLER_BUFFER:
case GL_UNSIGNED_INT_SAMPLER_2D: case GL_UNSIGNED_INT_SAMPLER_2D:
case GL_UNSIGNED_INT_SAMPLER_3D: case GL_UNSIGNED_INT_SAMPLER_3D:
case GL_UNSIGNED_INT_SAMPLER_CUBE: case GL_UNSIGNED_INT_SAMPLER_CUBE:
...@@ -484,6 +501,7 @@ bool IsSamplerType(GLenum type) ...@@ -484,6 +501,7 @@ bool IsSamplerType(GLenum type)
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE:
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY: case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_SAMPLER_BUFFER:
case GL_SAMPLER_2D_SHADOW: case GL_SAMPLER_2D_SHADOW:
case GL_SAMPLER_CUBE_SHADOW: case GL_SAMPLER_CUBE_SHADOW:
case GL_SAMPLER_2D_ARRAY_SHADOW: case GL_SAMPLER_2D_ARRAY_SHADOW:
...@@ -525,6 +543,9 @@ bool IsImageType(GLenum type) ...@@ -525,6 +543,9 @@ bool IsImageType(GLenum type)
case GL_IMAGE_CUBE_MAP_ARRAY: case GL_IMAGE_CUBE_MAP_ARRAY:
case GL_INT_IMAGE_CUBE_MAP_ARRAY: case GL_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:
case GL_IMAGE_BUFFER:
case GL_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_IMAGE_BUFFER:
case GL_IMAGE_CUBE: case GL_IMAGE_CUBE:
case GL_INT_IMAGE_CUBE: case GL_INT_IMAGE_CUBE:
case GL_UNSIGNED_INT_IMAGE_CUBE: case GL_UNSIGNED_INT_IMAGE_CUBE:
......
...@@ -1092,6 +1092,8 @@ void TCompiler::setResourceString() ...@@ -1092,6 +1092,8 @@ void TCompiler::setResourceString()
<< ":EXT_shadow_samplers:" << mResources.EXT_shadow_samplers << ":EXT_shadow_samplers:" << mResources.EXT_shadow_samplers
<< ":OES_shader_multisample_interpolation:" << mResources.OES_shader_multisample_interpolation << ":OES_shader_multisample_interpolation:" << mResources.OES_shader_multisample_interpolation
<< ":OES_shader_image_atomic:" << mResources.OES_shader_image_atomic << ":OES_shader_image_atomic:" << mResources.OES_shader_image_atomic
<< ":OES_texture_buffer:" << mResources.OES_texture_buffer
<< ":EXT_texture_buffer:" << mResources.EXT_texture_buffer
<< ":MinProgramTextureGatherOffset:" << mResources.MinProgramTextureGatherOffset << ":MinProgramTextureGatherOffset:" << mResources.MinProgramTextureGatherOffset
<< ":MaxProgramTextureGatherOffset:" << mResources.MaxProgramTextureGatherOffset << ":MaxProgramTextureGatherOffset:" << mResources.MaxProgramTextureGatherOffset
<< ":MaxImageUnits:" << mResources.MaxImageUnits << ":MaxImageUnits:" << mResources.MaxImageUnits
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
OP(EXT_shader_non_constant_global_initializers) \ OP(EXT_shader_non_constant_global_initializers) \
OP(EXT_shader_texture_lod) \ OP(EXT_shader_texture_lod) \
OP(EXT_shadow_samplers) \ OP(EXT_shadow_samplers) \
OP(EXT_texture_buffer) \
OP(EXT_texture_cube_map_array) \ OP(EXT_texture_cube_map_array) \
OP(EXT_YUV_target) \ OP(EXT_YUV_target) \
OP(NV_EGL_stream_consumer_external) \ OP(NV_EGL_stream_consumer_external) \
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
OP(OES_shader_image_atomic) \ OP(OES_shader_image_atomic) \
OP(OES_standard_derivatives) \ OP(OES_standard_derivatives) \
OP(OES_texture_3D) \ OP(OES_texture_3D) \
OP(OES_texture_buffer) \
OP(OES_texture_cube_map_array) \ OP(OES_texture_cube_map_array) \
OP(OES_texture_storage_multisample_2d_array) \ OP(OES_texture_storage_multisample_2d_array) \
OP(OVR_multiview) \ OP(OVR_multiview) \
......
...@@ -34,6 +34,7 @@ enum class TExtension : uint8_t ...@@ -34,6 +34,7 @@ enum class TExtension : uint8_t
EXT_shader_non_constant_global_initializers, EXT_shader_non_constant_global_initializers,
EXT_shader_texture_lod, EXT_shader_texture_lod,
EXT_shadow_samplers, EXT_shadow_samplers,
EXT_texture_buffer,
EXT_texture_cube_map_array, EXT_texture_cube_map_array,
EXT_YUV_target, EXT_YUV_target,
NV_EGL_stream_consumer_external, NV_EGL_stream_consumer_external,
...@@ -45,6 +46,7 @@ enum class TExtension : uint8_t ...@@ -45,6 +46,7 @@ enum class TExtension : uint8_t
OES_shader_image_atomic, OES_shader_image_atomic,
OES_standard_derivatives, OES_standard_derivatives,
OES_texture_3D, OES_texture_3D,
OES_texture_buffer,
OES_texture_cube_map_array, OES_texture_cube_map_array,
OES_texture_storage_multisample_2d_array, OES_texture_storage_multisample_2d_array,
OVR_multiview, OVR_multiview,
......
...@@ -137,6 +137,14 @@ void InitExtensionBehavior(const ShBuiltInResources &resources, TExtensionBehavi ...@@ -137,6 +137,14 @@ void InitExtensionBehavior(const ShBuiltInResources &resources, TExtensionBehavi
{ {
extBehavior[TExtension::OES_shader_image_atomic] = EBhUndefined; extBehavior[TExtension::OES_shader_image_atomic] = EBhUndefined;
} }
if (resources.OES_texture_buffer)
{
extBehavior[TExtension::OES_texture_buffer] = EBhUndefined;
}
if (resources.EXT_texture_buffer)
{
extBehavior[TExtension::EXT_texture_buffer] = EBhUndefined;
}
} }
void ResetExtensionBehavior(const ShBuiltInResources &resources, void ResetExtensionBehavior(const ShBuiltInResources &resources,
......
...@@ -21,77 +21,77 @@ namespace BuiltInGroup ...@@ -21,77 +21,77 @@ namespace BuiltInGroup
bool isTextureOffsetNoBias(const TFunction *func) bool isTextureOffsetNoBias(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3671 && id <= 3740; return id >= 3680 && id <= 3749;
} }
bool isTextureOffsetBias(const TFunction *func) bool isTextureOffsetBias(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3741 && id <= 3760; return id >= 3750 && id <= 3769;
} }
bool isTextureGatherOffsetsComp(const TFunction *func) bool isTextureGatherOffsetsComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3798 && id <= 3810; return id >= 3807 && id <= 3819;
} }
bool isTextureGatherOffsetsNoComp(const TFunction *func) bool isTextureGatherOffsetsNoComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3811 && id <= 3826; return id >= 3820 && id <= 3835;
} }
bool isTextureGatherOffsets(const TFunction *func) bool isTextureGatherOffsets(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3798 && id <= 3826; return id >= 3807 && id <= 3835;
} }
bool isTextureGatherOffsetComp(const TFunction *func) bool isTextureGatherOffsetComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3827 && id <= 3832; return id >= 3836 && id <= 3841;
} }
bool isTextureGatherOffsetNoComp(const TFunction *func) bool isTextureGatherOffsetNoComp(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3833 && id <= 3840; return id >= 3842 && id <= 3849;
} }
bool isTextureGatherOffset(const TFunction *func) bool isTextureGatherOffset(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3827 && id <= 3840; return id >= 3836 && id <= 3849;
} }
bool isTextureGather(const TFunction *func) bool isTextureGather(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3774 && id <= 3840; return id >= 3783 && id <= 3849;
} }
bool isInterpolationFS(const TFunction *func) bool isInterpolationFS(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3853 && id <= 3876; return id >= 3862 && id <= 3885;
} }
bool isAtomicMemory(const TFunction *func) bool isAtomicMemory(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3881 && id <= 3898; return id >= 3890 && id <= 3907;
} }
bool isImageLoad(const TFunction *func) bool isImageLoad(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3929 && id <= 3943; return id >= 3944 && id <= 3961;
} }
bool isImageAtomic(const TFunction *func) bool isImageAtomic(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3944 && id <= 4522; return id >= 3962 && id <= 4537;
} }
bool isImageStore(const TFunction *func) bool isImageStore(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 4523 && id <= 4537; return id >= 4538 && id <= 4555;
} }
bool isImage(const TFunction *func) bool isImage(const TFunction *func)
{ {
int id = func->uniqueId().get(); int id = func->uniqueId().get();
return id >= 3899 && id <= 4537; return id >= 3908 && id <= 4555;
} }
} // namespace BuiltInGroup } // namespace BuiltInGroup
......
...@@ -182,6 +182,8 @@ void InitBuiltInResources(ShBuiltInResources *resources) ...@@ -182,6 +182,8 @@ void InitBuiltInResources(ShBuiltInResources *resources)
resources->OES_shader_multisample_interpolation = 0; resources->OES_shader_multisample_interpolation = 0;
resources->NV_draw_buffers = 0; resources->NV_draw_buffers = 0;
resources->OES_shader_image_atomic = 0; resources->OES_shader_image_atomic = 0;
resources->OES_texture_buffer = 0;
resources->EXT_texture_buffer = 0;
resources->MaxClipDistances = 0; resources->MaxClipDistances = 0;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -255,6 +255,7 @@ void TranslatorGLSL::writeVersion(TIntermNode *root) ...@@ -255,6 +255,7 @@ void TranslatorGLSL::writeVersion(TIntermNode *root)
void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions compileOptions) void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions compileOptions)
{ {
bool usesTextureCubeMapArray = false; bool usesTextureCubeMapArray = false;
bool usesTextureBuffer = false;
TInfoSinkBase &sink = getInfoSink().obj; TInfoSinkBase &sink = getInfoSink().obj;
const TExtensionBehavior &extBehavior = getExtensionBehavior(); const TExtensionBehavior &extBehavior = getExtensionBehavior();
...@@ -314,6 +315,13 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions ...@@ -314,6 +315,13 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions
{ {
usesTextureCubeMapArray = true; usesTextureCubeMapArray = true;
} }
if ((iter.first == TExtension::OES_texture_buffer ||
iter.first == TExtension::EXT_texture_buffer) &&
(iter.second == EBhRequire || iter.second == EBhEnable))
{
usesTextureBuffer = true;
}
} }
// GLSL ES 3 explicit location qualifiers need to use an extension before GLSL 330 // GLSL ES 3 explicit location qualifiers need to use an extension before GLSL 330
...@@ -349,6 +357,20 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions ...@@ -349,6 +357,20 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions
} }
} }
if (usesTextureBuffer)
{
if (getOutputType() >= SH_GLSL_COMPATIBILITY_OUTPUT &&
getOutputType() < SH_GLSL_400_CORE_OUTPUT)
{
sink << "#extension GL_ARB_texture_buffer_objects : enable\n";
}
else if (getOutputType() == SH_ESSL_OUTPUT && getShaderVersion() < 320)
{
sink << "#extension GL_OES_texture_buffer : enable\n";
sink << "#extension GL_EXT_texture_buffer : enable\n";
}
}
TExtensionGLSL extensionGLSL(getOutputType()); TExtensionGLSL extensionGLSL(getOutputType());
root->traverse(&extensionGLSL); root->traverse(&extensionGLSL);
......
...@@ -56,6 +56,8 @@ const char *getBasicString(TBasicType t) ...@@ -56,6 +56,8 @@ const char *getBasicString(TBasicType t)
return "sampler2DMSArray"; return "sampler2DMSArray";
case EbtSamplerCubeArray: case EbtSamplerCubeArray:
return "samplerCubeArray"; return "samplerCubeArray";
case EbtSamplerBuffer:
return "samplerBuffer";
case EbtISampler2D: case EbtISampler2D:
return "isampler2D"; return "isampler2D";
case EbtISampler3D: case EbtISampler3D:
...@@ -70,6 +72,8 @@ const char *getBasicString(TBasicType t) ...@@ -70,6 +72,8 @@ const char *getBasicString(TBasicType t)
return "isampler2DMSArray"; return "isampler2DMSArray";
case EbtISamplerCubeArray: case EbtISamplerCubeArray:
return "isamplerCubeArray"; return "isamplerCubeArray";
case EbtISamplerBuffer:
return "isamplerBuffer";
case EbtUSampler2D: case EbtUSampler2D:
return "usampler2D"; return "usampler2D";
case EbtUSampler3D: case EbtUSampler3D:
...@@ -84,6 +88,8 @@ const char *getBasicString(TBasicType t) ...@@ -84,6 +88,8 @@ const char *getBasicString(TBasicType t)
return "usampler2DMSArray"; return "usampler2DMSArray";
case EbtUSamplerCubeArray: case EbtUSamplerCubeArray:
return "usamplerCubeArray"; return "usamplerCubeArray";
case EbtUSamplerBuffer:
return "usamplerBuffer";
case EbtSampler2DShadow: case EbtSampler2DShadow:
return "sampler2DShadow"; return "sampler2DShadow";
case EbtSamplerCubeShadow: case EbtSamplerCubeShadow:
...@@ -126,6 +132,12 @@ const char *getBasicString(TBasicType t) ...@@ -126,6 +132,12 @@ const char *getBasicString(TBasicType t)
return "iimageCubeArray"; return "iimageCubeArray";
case EbtUImageCubeArray: case EbtUImageCubeArray:
return "uimageCubeArray"; return "uimageCubeArray";
case EbtImageBuffer:
return "imageBuffer";
case EbtIImageBuffer:
return "iimageBuffer";
case EbtUImageBuffer:
return "uimageBuffer";
case EbtAtomicCounter: case EbtAtomicCounter:
return "atomic_uint"; return "atomic_uint";
case EbtSamplerVideoWEBGL: case EbtSamplerVideoWEBGL:
......
...@@ -669,6 +669,15 @@ GROUP BEGIN OES_cube_map_array ...@@ -669,6 +669,15 @@ GROUP BEGIN OES_cube_map_array
vec4 textureGather(samplerCubeArrayShadow, vec4, float); vec4 textureGather(samplerCubeArrayShadow, vec4, float);
GROUP END OES_cube_map_array GROUP END OES_cube_map_array
// These functions are part of OES/EXT_texture_buffer.
// There's no way to mark alternative extensions for builtins, so these are marked with none.
// TODO(anglebug.com/4589)
GROUP BEGIN OES_texture_buffer
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
int textureSize(gsamplerBuffer);
gvec4 texelFetch(gsamplerBuffer, int);
GROUP END OES_texture_buffer
GROUP BEGIN TexelFetchMS GROUP BEGIN TexelFetchMS
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL1_5_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "glsl_level": "GLSL1_5_BUILTINS", "op": "CallBuiltInFunction"}
gvec4 texelFetch(gsampler2DMS, ivec2, int); gvec4 texelFetch(gsampler2DMS, ivec2, int);
...@@ -1041,6 +1050,12 @@ GROUP BEGIN Image {"queryFunction": true} ...@@ -1041,6 +1050,12 @@ GROUP BEGIN Image {"queryFunction": true}
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
gvec4 imageStore(gimageCubeArray, ivec3, gvec4); gvec4 imageStore(gimageCubeArray, ivec3, gvec4);
// These functions are part of OES/EXT_texture_buffer.
// There's no way to mark alternative extensions for builtins, so these are marked with none.
// TODO(anglebug.com/4589)
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
void imageStore(gimageBuffer, int, gvec4);
DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "op": "CallBuiltInFunction"}
void imageStore(writeonly IMAGE_PARAMS, gvec4); void imageStore(writeonly IMAGE_PARAMS, gvec4);
GROUP END Store GROUP END Store
...@@ -1057,6 +1072,12 @@ GROUP BEGIN Image {"queryFunction": true} ...@@ -1057,6 +1072,12 @@ GROUP BEGIN Image {"queryFunction": true}
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
gvec4 imageLoad(gimageCubeArray, ivec3); gvec4 imageLoad(gimageCubeArray, ivec3);
// These functions are part of OES/EXT_texture_buffer.
// There's no way to mark alternative extensions for builtins, so these are marked with none.
// TODO(anglebug.com/4589)
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
gvec4 imageLoad(gimageBuffer, int);
DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"glsl_level": "GLSL4_2_BUILTINS", "op": "CallBuiltInFunction"}
gvec4 imageLoad(readonly IMAGE_PARAMS); gvec4 imageLoad(readonly IMAGE_PARAMS);
GROUP END Load GROUP END Load
...@@ -1072,6 +1093,12 @@ GROUP BEGIN Image {"queryFunction": true} ...@@ -1072,6 +1093,12 @@ GROUP BEGIN Image {"queryFunction": true}
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
ivec3 imageSize(gimageCubeArray); ivec3 imageSize(gimageCubeArray);
// These functions are part of OES/EXT_texture_buffer.
// There's no way to mark alternative extensions for builtins, so these are marked with none.
// TODO(anglebug.com/4589)
DEFAULT METADATA {"essl_level": "ESSL3_1_BUILTINS", "op": "CallBuiltInFunction"}
int imageSize(gimageBuffer);
DEFAULT METADATA {"glsl_level": "GLSL4_3_BUILTINS", "op": "CallBuiltInFunction"} DEFAULT METADATA {"glsl_level": "GLSL4_3_BUILTINS", "op": "CallBuiltInFunction"}
int imageSize(readonly writeonly gimage1D); int imageSize(readonly writeonly gimage1D);
ivec2 imageSize(readonly writeonly gimage2D); ivec2 imageSize(readonly writeonly gimage2D);
......
...@@ -110,6 +110,7 @@ static int ES3_reserved_ES3_extension_ES3_1_keyword(TParseContext *context, TExt ...@@ -110,6 +110,7 @@ static int ES3_reserved_ES3_extension_ES3_1_keyword(TParseContext *context, TExt
static int ES3_reserved_ES3_extension_ES3_2_keyword(TParseContext *context, TExtension extension, int token); static int ES3_reserved_ES3_extension_ES3_2_keyword(TParseContext *context, TExtension extension, int token);
static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword(TParseContext *context, TExtension extension, int token); static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword(TParseContext *context, TExtension extension, int token);
static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context, TExtension extension1, TExtension extension2, int token1, int token2); static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context, TExtension extension1, TExtension extension2, int token1, int token2);
static int ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context, TExtension extension1, TExtension extension2, int token1, int token2);
static int WEBGL_video_texture_extension(TParseContext *context, int token); static int WEBGL_video_texture_extension(TParseContext *context, int token);
static int uint_constant(TParseContext *context); static int uint_constant(TParseContext *context);
static int int_constant(TParseContext *context); static int int_constant(TParseContext *context);
...@@ -234,9 +235,12 @@ O [0-7] ...@@ -234,9 +235,12 @@ O [0-7]
"isampler2DMSArray" { return ES3_reserved_ES3_1_extension_ES3_2_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, ISAMPLER2DMSARRAY); } "isampler2DMSArray" { return ES3_reserved_ES3_1_extension_ES3_2_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, ISAMPLER2DMSARRAY); }
"usampler2DMSArray" { return ES3_reserved_ES3_1_extension_ES3_2_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, USAMPLER2DMSARRAY); } "usampler2DMSArray" { return ES3_reserved_ES3_1_extension_ES3_2_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, USAMPLER2DMSARRAY); }
"samplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, SAMPLERCUBEARRAYOES, SAMPLERCUBEARRAYEXT); } "samplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, SAMPLERCUBEARRAYOES, SAMPLERCUBEARRAYEXT); }
"samplerBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, SAMPLERBUFFER, SAMPLERBUFFER); }
"samplerCubeArrayShadow" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, SAMPLERCUBEARRAYSHADOWOES, SAMPLERCUBEARRAYSHADOWEXT); } "samplerCubeArrayShadow" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, SAMPLERCUBEARRAYSHADOWOES, SAMPLERCUBEARRAYSHADOWEXT); }
"isamplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, ISAMPLERCUBEARRAYOES, ISAMPLERCUBEARRAYEXT); } "isamplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, ISAMPLERCUBEARRAYOES, ISAMPLERCUBEARRAYEXT); }
"isamplerBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, ISAMPLERBUFFER, ISAMPLERBUFFER); }
"usamplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, USAMPLERCUBEARRAYOES, USAMPLERCUBEARRAYEXT); } "usamplerCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, USAMPLERCUBEARRAYOES, USAMPLERCUBEARRAYEXT); }
"usamplerBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, USAMPLERBUFFER, USAMPLERBUFFER); }
"samplerVideoWEBGL" { return WEBGL_video_texture_extension(context, SAMPLERVIDEOWEBGL); } "samplerVideoWEBGL" { return WEBGL_video_texture_extension(context, SAMPLERVIDEOWEBGL); }
"struct" { return STRUCT; } "struct" { return STRUCT; }
...@@ -262,6 +266,9 @@ O [0-7] ...@@ -262,6 +266,9 @@ O [0-7]
"imageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, IMAGECUBEARRAYOES, IMAGECUBEARRAYEXT); } "imageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, IMAGECUBEARRAYOES, IMAGECUBEARRAYEXT); }
"iimageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, IIMAGECUBEARRAYOES, IIMAGECUBEARRAYEXT); } "iimageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, IIMAGECUBEARRAYOES, IIMAGECUBEARRAYEXT); }
"uimageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, UIMAGECUBEARRAYOES, UIMAGECUBEARRAYEXT); } "uimageCubeArray" { return ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_cube_map_array, TExtension::EXT_texture_cube_map_array, UIMAGECUBEARRAYOES, UIMAGECUBEARRAYEXT); }
"imageBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, IMAGEBUFFER, IMAGEBUFFER); }
"iimageBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, IIMAGEBUFFER, IIMAGEBUFFER); }
"uimageBuffer" { return ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(context, TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer, UIMAGEBUFFER, UIMAGEBUFFER); }
"readonly" { return ES3_reserved_ES3_1_keyword(context, READONLY); } "readonly" { return ES3_reserved_ES3_1_keyword(context, READONLY); }
"writeonly" { return ES3_reserved_ES3_1_keyword(context, WRITEONLY); } "writeonly" { return ES3_reserved_ES3_1_keyword(context, WRITEONLY); }
"coherent" { return ES3_reserved_ES3_1_keyword(context, COHERENT); } "coherent" { return ES3_reserved_ES3_1_keyword(context, COHERENT); }
...@@ -290,9 +297,6 @@ O [0-7] ...@@ -290,9 +297,6 @@ O [0-7]
"image2DShadow" | "image2DShadow" |
"image1DArrayShadow" | "image1DArrayShadow" |
"image2DArrayShadow" | "image2DArrayShadow" |
"imageBuffer" |
"iimageBuffer" |
"uimageBuffer" |
"sampler1DArray" | "sampler1DArray" |
"sampler1DArrayShadow" | "sampler1DArrayShadow" |
...@@ -301,10 +305,7 @@ O [0-7] ...@@ -301,10 +305,7 @@ O [0-7]
"usampler1D" | "usampler1D" |
"usampler1DArray" | "usampler1DArray" |
"isampler2DRect" | "isampler2DRect" |
"usampler2DRect" | "usampler2DRect" {
"samplerBuffer" |
"isamplerBuffer" |
"usamplerBuffer" {
if (context->getShaderVersion() < 300) { if (context->getShaderVersion() < 300) {
yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); yylval->lex.string = AllocatePoolCharArray(yytext, yyleng);
return check_type(yyscanner); return check_type(yyscanner);
...@@ -764,6 +765,31 @@ static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context ...@@ -764,6 +765,31 @@ static int ES3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context
return check_type(yyscanner); return check_type(yyscanner);
} }
static int ES3_and_3_1_reserved_ES3_1_extension_ES3_2_keyword_2(TParseContext *context, TExtension extension1, TExtension extension2, int token1, int token2)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
yyscan_t yyscanner = (yyscan_t) context->getScanner();
// A keyword in GLSL ES 3.20 or GLSL ES 3.10 with enabled extension.
if (is_extension_enabled_or_is_core(context, 310, extension1, 320))
{
return token1;
}
else if (is_extension_enabled_or_is_core(context, 310, extension2, 320))
{
return token2;
}
// A reserved word in GLSL ES 3.00 and 3.10
if (context->getShaderVersion() >= 300)
{
return reserved_word(yyscanner);
}
yylval->lex.string = AllocatePoolCharArray(yytext, yyleng);
return check_type(yyscanner);
}
int uint_constant(TParseContext *context) int uint_constant(TParseContext *context)
{ {
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
......
...@@ -175,11 +175,13 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons ...@@ -175,11 +175,13 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons
%token <lex> SAMPLER3D SAMPLER3DRECT SAMPLER2DSHADOW SAMPLERCUBESHADOW SAMPLER2DARRAYSHADOW SAMPLERVIDEOWEBGL %token <lex> SAMPLER3D SAMPLER3DRECT SAMPLER2DSHADOW SAMPLERCUBESHADOW SAMPLER2DARRAYSHADOW SAMPLERVIDEOWEBGL
%token <lex> SAMPLERCUBEARRAYOES SAMPLERCUBEARRAYSHADOWOES ISAMPLERCUBEARRAYOES USAMPLERCUBEARRAYOES %token <lex> SAMPLERCUBEARRAYOES SAMPLERCUBEARRAYSHADOWOES ISAMPLERCUBEARRAYOES USAMPLERCUBEARRAYOES
%token <lex> SAMPLERCUBEARRAYEXT SAMPLERCUBEARRAYSHADOWEXT ISAMPLERCUBEARRAYEXT USAMPLERCUBEARRAYEXT %token <lex> SAMPLERCUBEARRAYEXT SAMPLERCUBEARRAYSHADOWEXT ISAMPLERCUBEARRAYEXT USAMPLERCUBEARRAYEXT
%token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
%token <lex> SAMPLEREXTERNAL2DY2YEXT %token <lex> SAMPLEREXTERNAL2DY2YEXT
%token <lex> IMAGE2D IIMAGE2D UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY %token <lex> IMAGE2D IIMAGE2D UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE %token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
%token <lex> IMAGECUBEARRAYOES IIMAGECUBEARRAYOES UIMAGECUBEARRAYOES %token <lex> IMAGECUBEARRAYOES IIMAGECUBEARRAYOES UIMAGECUBEARRAYOES
%token <lex> IMAGECUBEARRAYEXT IIMAGECUBEARRAYEXT UIMAGECUBEARRAYEXT %token <lex> IMAGECUBEARRAYEXT IIMAGECUBEARRAYEXT UIMAGECUBEARRAYEXT
%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
%token <lex> ATOMICUINT %token <lex> ATOMICUINT
%token <lex> LAYOUT %token <lex> LAYOUT
%token <lex> YUVCSCSTANDARDEXT YUVCSCSTANDARDEXTCONSTANT %token <lex> YUVCSCSTANDARDEXT YUVCSCSTANDARDEXTCONSTANT
...@@ -1126,6 +1128,16 @@ type_specifier_nonarray ...@@ -1126,6 +1128,16 @@ type_specifier_nonarray
} }
$$.initialize(EbtSamplerCubeArray, @1); $$.initialize(EbtSamplerCubeArray, @1);
} }
| SAMPLERBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__samplerBuffer");
}
$$.initialize(EbtSamplerBuffer, @1);
}
| ISAMPLER2D { | ISAMPLER2D {
$$.initialize(EbtISampler2D, @1); $$.initialize(EbtISampler2D, @1);
} }
...@@ -1160,6 +1172,16 @@ type_specifier_nonarray ...@@ -1160,6 +1172,16 @@ type_specifier_nonarray
} }
$$.initialize(EbtISamplerCubeArray, @1); $$.initialize(EbtISamplerCubeArray, @1);
} }
| ISAMPLERBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__isamplerBuffer");
}
$$.initialize(EbtISamplerBuffer, @1);
}
| USAMPLER2D { | USAMPLER2D {
$$.initialize(EbtUSampler2D, @1); $$.initialize(EbtUSampler2D, @1);
} }
...@@ -1194,6 +1216,16 @@ type_specifier_nonarray ...@@ -1194,6 +1216,16 @@ type_specifier_nonarray
} }
$$.initialize(EbtUSamplerCubeArray, @1); $$.initialize(EbtUSamplerCubeArray, @1);
} }
| USAMPLERBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__usamplerBuffer");
}
$$.initialize(EbtUSamplerBuffer, @1);
}
| SAMPLER2DSHADOW { | SAMPLER2DSHADOW {
$$.initialize(EbtSampler2DShadow, @1); $$.initialize(EbtSampler2DShadow, @1);
} }
...@@ -1334,6 +1366,36 @@ type_specifier_nonarray ...@@ -1334,6 +1366,36 @@ type_specifier_nonarray
} }
$$.initialize(EbtUImageCubeArray, @1); $$.initialize(EbtUImageCubeArray, @1);
} }
| IMAGEBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__imageBuffer");
}
$$.initialize(EbtImageBuffer, @1);
}
| IIMAGEBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__iimageBuffer");
}
$$.initialize(EbtIImageBuffer, @1);
}
| UIMAGEBUFFER {
constexpr std::array<TExtension, 2u> extensions{ { TExtension::OES_texture_buffer,
TExtension::EXT_texture_buffer } };
if (context->getShaderVersion() < 320
&& !context->checkCanUseOneOfExtensions(@1, extensions))
{
context->error(@1, "unsupported type", "__uimageBuffer");
}
$$.initialize(EbtUImageBuffer, @1);
}
| ATOMICUINT { | ATOMICUINT {
$$.initialize(EbtAtomicCounter, @1); $$.initialize(EbtAtomicCounter, @1);
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -151,81 +151,87 @@ enum yytokentype ...@@ -151,81 +151,87 @@ enum yytokentype
SAMPLERCUBEARRAYSHADOWEXT = 352, SAMPLERCUBEARRAYSHADOWEXT = 352,
ISAMPLERCUBEARRAYEXT = 353, ISAMPLERCUBEARRAYEXT = 353,
USAMPLERCUBEARRAYEXT = 354, USAMPLERCUBEARRAYEXT = 354,
SAMPLEREXTERNAL2DY2YEXT = 355, SAMPLERBUFFER = 355,
IMAGE2D = 356, ISAMPLERBUFFER = 356,
IIMAGE2D = 357, USAMPLERBUFFER = 357,
UIMAGE2D = 358, SAMPLEREXTERNAL2DY2YEXT = 358,
IMAGE3D = 359, IMAGE2D = 359,
IIMAGE3D = 360, IIMAGE2D = 360,
UIMAGE3D = 361, UIMAGE2D = 361,
IMAGE2DARRAY = 362, IMAGE3D = 362,
IIMAGE2DARRAY = 363, IIMAGE3D = 363,
UIMAGE2DARRAY = 364, UIMAGE3D = 364,
IMAGECUBE = 365, IMAGE2DARRAY = 365,
IIMAGECUBE = 366, IIMAGE2DARRAY = 366,
UIMAGECUBE = 367, UIMAGE2DARRAY = 367,
IMAGECUBEARRAYOES = 368, IMAGECUBE = 368,
IIMAGECUBEARRAYOES = 369, IIMAGECUBE = 369,
UIMAGECUBEARRAYOES = 370, UIMAGECUBE = 370,
IMAGECUBEARRAYEXT = 371, IMAGECUBEARRAYOES = 371,
IIMAGECUBEARRAYEXT = 372, IIMAGECUBEARRAYOES = 372,
UIMAGECUBEARRAYEXT = 373, UIMAGECUBEARRAYOES = 373,
ATOMICUINT = 374, IMAGECUBEARRAYEXT = 374,
LAYOUT = 375, IIMAGECUBEARRAYEXT = 375,
YUVCSCSTANDARDEXT = 376, UIMAGECUBEARRAYEXT = 376,
YUVCSCSTANDARDEXTCONSTANT = 377, IMAGEBUFFER = 377,
IDENTIFIER = 378, IIMAGEBUFFER = 378,
TYPE_NAME = 379, UIMAGEBUFFER = 379,
FLOATCONSTANT = 380, ATOMICUINT = 380,
INTCONSTANT = 381, LAYOUT = 381,
UINTCONSTANT = 382, YUVCSCSTANDARDEXT = 382,
BOOLCONSTANT = 383, YUVCSCSTANDARDEXTCONSTANT = 383,
FIELD_SELECTION = 384, IDENTIFIER = 384,
LEFT_OP = 385, TYPE_NAME = 385,
RIGHT_OP = 386, FLOATCONSTANT = 386,
INC_OP = 387, INTCONSTANT = 387,
DEC_OP = 388, UINTCONSTANT = 388,
LE_OP = 389, BOOLCONSTANT = 389,
GE_OP = 390, FIELD_SELECTION = 390,
EQ_OP = 391, LEFT_OP = 391,
NE_OP = 392, RIGHT_OP = 392,
AND_OP = 393, INC_OP = 393,
OR_OP = 394, DEC_OP = 394,
XOR_OP = 395, LE_OP = 395,
MUL_ASSIGN = 396, GE_OP = 396,
DIV_ASSIGN = 397, EQ_OP = 397,
ADD_ASSIGN = 398, NE_OP = 398,
MOD_ASSIGN = 399, AND_OP = 399,
LEFT_ASSIGN = 400, OR_OP = 400,
RIGHT_ASSIGN = 401, XOR_OP = 401,
AND_ASSIGN = 402, MUL_ASSIGN = 402,
XOR_ASSIGN = 403, DIV_ASSIGN = 403,
OR_ASSIGN = 404, ADD_ASSIGN = 404,
SUB_ASSIGN = 405, MOD_ASSIGN = 405,
LEFT_PAREN = 406, LEFT_ASSIGN = 406,
RIGHT_PAREN = 407, RIGHT_ASSIGN = 407,
LEFT_BRACKET = 408, AND_ASSIGN = 408,
RIGHT_BRACKET = 409, XOR_ASSIGN = 409,
LEFT_BRACE = 410, OR_ASSIGN = 410,
RIGHT_BRACE = 411, SUB_ASSIGN = 411,
DOT = 412, LEFT_PAREN = 412,
COMMA = 413, RIGHT_PAREN = 413,
COLON = 414, LEFT_BRACKET = 414,
EQUAL = 415, RIGHT_BRACKET = 415,
SEMICOLON = 416, LEFT_BRACE = 416,
BANG = 417, RIGHT_BRACE = 417,
DASH = 418, DOT = 418,
TILDE = 419, COMMA = 419,
PLUS = 420, COLON = 420,
STAR = 421, EQUAL = 421,
SLASH = 422, SEMICOLON = 422,
PERCENT = 423, BANG = 423,
LEFT_ANGLE = 424, DASH = 424,
RIGHT_ANGLE = 425, TILDE = 425,
VERTICAL_BAR = 426, PLUS = 426,
CARET = 427, STAR = 427,
AMPERSAND = 428, SLASH = 428,
QUESTION = 429 PERCENT = 429,
LEFT_ANGLE = 430,
RIGHT_ANGLE = 431,
VERTICAL_BAR = 432,
CARET = 433,
AMPERSAND = 434,
QUESTION = 435
}; };
#endif #endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2159,30 +2159,30 @@ class BuiltInId ...@@ -2159,30 +2159,30 @@ class BuiltInId
static constexpr const TSymbolUniqueId pt01b = TSymbolUniqueId(1533); static constexpr const TSymbolUniqueId pt01b = TSymbolUniqueId(1533);
static constexpr const TSymbolUniqueId imageSize_UImageCubeArray1 = TSymbolUniqueId(1534); static constexpr const TSymbolUniqueId imageSize_UImageCubeArray1 = TSymbolUniqueId(1534);
static constexpr const TSymbolUniqueId pt01c = TSymbolUniqueId(1535); static constexpr const TSymbolUniqueId pt01c = TSymbolUniqueId(1535);
static constexpr const TSymbolUniqueId imageSize_Image1D1 = TSymbolUniqueId(1536); static constexpr const TSymbolUniqueId imageSize_ImageBuffer1 = TSymbolUniqueId(1536);
static constexpr const TSymbolUniqueId pt01L = TSymbolUniqueId(1537); static constexpr const TSymbolUniqueId pt01g = TSymbolUniqueId(1537);
static constexpr const TSymbolUniqueId imageSize_IImage1D1 = TSymbolUniqueId(1538); static constexpr const TSymbolUniqueId imageSize_IImageBuffer1 = TSymbolUniqueId(1538);
static constexpr const TSymbolUniqueId pt01M = TSymbolUniqueId(1539); static constexpr const TSymbolUniqueId pt01h = TSymbolUniqueId(1539);
static constexpr const TSymbolUniqueId imageSize_UImage1D1 = TSymbolUniqueId(1540); static constexpr const TSymbolUniqueId imageSize_UImageBuffer1 = TSymbolUniqueId(1540);
static constexpr const TSymbolUniqueId pt01N = TSymbolUniqueId(1541); static constexpr const TSymbolUniqueId pt01i = TSymbolUniqueId(1541);
static constexpr const TSymbolUniqueId imageSize_ImageRect1 = TSymbolUniqueId(1542); static constexpr const TSymbolUniqueId imageSize_Image1D1 = TSymbolUniqueId(1542);
static constexpr const TSymbolUniqueId pt01d = TSymbolUniqueId(1543); static constexpr const TSymbolUniqueId pt01L = TSymbolUniqueId(1543);
static constexpr const TSymbolUniqueId imageSize_IImageRect1 = TSymbolUniqueId(1544); static constexpr const TSymbolUniqueId imageSize_IImage1D1 = TSymbolUniqueId(1544);
static constexpr const TSymbolUniqueId pt01e = TSymbolUniqueId(1545); static constexpr const TSymbolUniqueId pt01M = TSymbolUniqueId(1545);
static constexpr const TSymbolUniqueId imageSize_UImageRect1 = TSymbolUniqueId(1546); static constexpr const TSymbolUniqueId imageSize_UImage1D1 = TSymbolUniqueId(1546);
static constexpr const TSymbolUniqueId pt01f = TSymbolUniqueId(1547); static constexpr const TSymbolUniqueId pt01N = TSymbolUniqueId(1547);
static constexpr const TSymbolUniqueId imageSize_Image1DArray1 = TSymbolUniqueId(1548); static constexpr const TSymbolUniqueId imageSize_ImageRect1 = TSymbolUniqueId(1548);
static constexpr const TSymbolUniqueId pt01O = TSymbolUniqueId(1549); static constexpr const TSymbolUniqueId pt01d = TSymbolUniqueId(1549);
static constexpr const TSymbolUniqueId imageSize_IImage1DArray1 = TSymbolUniqueId(1550); static constexpr const TSymbolUniqueId imageSize_IImageRect1 = TSymbolUniqueId(1550);
static constexpr const TSymbolUniqueId pt01P = TSymbolUniqueId(1551); static constexpr const TSymbolUniqueId pt01e = TSymbolUniqueId(1551);
static constexpr const TSymbolUniqueId imageSize_UImage1DArray1 = TSymbolUniqueId(1552); static constexpr const TSymbolUniqueId imageSize_UImageRect1 = TSymbolUniqueId(1552);
static constexpr const TSymbolUniqueId pt01Q = TSymbolUniqueId(1553); static constexpr const TSymbolUniqueId pt01f = TSymbolUniqueId(1553);
static constexpr const TSymbolUniqueId imageSize_ImageBuffer1 = TSymbolUniqueId(1554); static constexpr const TSymbolUniqueId imageSize_Image1DArray1 = TSymbolUniqueId(1554);
static constexpr const TSymbolUniqueId pt01g = TSymbolUniqueId(1555); static constexpr const TSymbolUniqueId pt01O = TSymbolUniqueId(1555);
static constexpr const TSymbolUniqueId imageSize_IImageBuffer1 = TSymbolUniqueId(1556); static constexpr const TSymbolUniqueId imageSize_IImage1DArray1 = TSymbolUniqueId(1556);
static constexpr const TSymbolUniqueId pt01h = TSymbolUniqueId(1557); static constexpr const TSymbolUniqueId pt01P = TSymbolUniqueId(1557);
static constexpr const TSymbolUniqueId imageSize_UImageBuffer1 = TSymbolUniqueId(1558); static constexpr const TSymbolUniqueId imageSize_UImage1DArray1 = TSymbolUniqueId(1558);
static constexpr const TSymbolUniqueId pt01i = TSymbolUniqueId(1559); static constexpr const TSymbolUniqueId pt01Q = TSymbolUniqueId(1559);
static constexpr const TSymbolUniqueId imageSize_Image2DMS1 = TSymbolUniqueId(1560); static constexpr const TSymbolUniqueId imageSize_Image2DMS1 = TSymbolUniqueId(1560);
static constexpr const TSymbolUniqueId pt01R = TSymbolUniqueId(1561); static constexpr const TSymbolUniqueId pt01R = TSymbolUniqueId(1561);
static constexpr const TSymbolUniqueId imageSize_IImage2DMS1 = TSymbolUniqueId(1562); static constexpr const TSymbolUniqueId imageSize_IImage2DMS1 = TSymbolUniqueId(1562);
......
...@@ -381,6 +381,8 @@ GLenum GLVariableType(const TType &type) ...@@ -381,6 +381,8 @@ GLenum GLVariableType(const TType &type)
return GL_SAMPLER_2D_MULTISAMPLE_ARRAY; return GL_SAMPLER_2D_MULTISAMPLE_ARRAY;
case EbtSamplerCubeArray: case EbtSamplerCubeArray:
return GL_SAMPLER_CUBE_MAP_ARRAY; return GL_SAMPLER_CUBE_MAP_ARRAY;
case EbtSamplerBuffer:
return GL_SAMPLER_BUFFER;
case EbtISampler2D: case EbtISampler2D:
return GL_INT_SAMPLER_2D; return GL_INT_SAMPLER_2D;
case EbtISampler3D: case EbtISampler3D:
...@@ -395,6 +397,8 @@ GLenum GLVariableType(const TType &type) ...@@ -395,6 +397,8 @@ GLenum GLVariableType(const TType &type)
return GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY; return GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY;
case EbtISamplerCubeArray: case EbtISamplerCubeArray:
return GL_INT_SAMPLER_CUBE_MAP_ARRAY; return GL_INT_SAMPLER_CUBE_MAP_ARRAY;
case EbtISamplerBuffer:
return GL_INT_SAMPLER_BUFFER;
case EbtUSampler2D: case EbtUSampler2D:
return GL_UNSIGNED_INT_SAMPLER_2D; return GL_UNSIGNED_INT_SAMPLER_2D;
case EbtUSampler3D: case EbtUSampler3D:
...@@ -409,6 +413,8 @@ GLenum GLVariableType(const TType &type) ...@@ -409,6 +413,8 @@ GLenum GLVariableType(const TType &type)
return GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY; return GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY;
case EbtUSamplerCubeArray: case EbtUSamplerCubeArray:
return GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY; return GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY;
case EbtUSamplerBuffer:
return GL_UNSIGNED_INT_SAMPLER_BUFFER;
case EbtSampler2DShadow: case EbtSampler2DShadow:
return GL_SAMPLER_2D_SHADOW; return GL_SAMPLER_2D_SHADOW;
case EbtSamplerCubeShadow: case EbtSamplerCubeShadow:
...@@ -447,6 +453,12 @@ GLenum GLVariableType(const TType &type) ...@@ -447,6 +453,12 @@ GLenum GLVariableType(const TType &type)
return GL_INT_IMAGE_CUBE_MAP_ARRAY; return GL_INT_IMAGE_CUBE_MAP_ARRAY;
case EbtUImageCubeArray: case EbtUImageCubeArray:
return GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY; return GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY;
case EbtImageBuffer:
return GL_IMAGE_BUFFER;
case EbtIImageBuffer:
return GL_INT_IMAGE_BUFFER;
case EbtUImageBuffer:
return GL_UNSIGNED_INT_IMAGE_BUFFER;
case EbtAtomicCounter: case EbtAtomicCounter:
return GL_UNSIGNED_INT_ATOMIC_COUNTER; return GL_UNSIGNED_INT_ATOMIC_COUNTER;
case EbtSamplerVideoWEBGL: case EbtSamplerVideoWEBGL:
......
...@@ -138,6 +138,10 @@ Compiler::Compiler(rx::GLImplFactory *implFactory, const State &state, egl::Disp ...@@ -138,6 +138,10 @@ Compiler::Compiler(rx::GLImplFactory *implFactory, const State &state, egl::Disp
// EXT_shadow_samplers // EXT_shadow_samplers
mResources.EXT_shadow_samplers = extensions.shadowSamplersEXT; mResources.EXT_shadow_samplers = extensions.shadowSamplersEXT;
// OES_texture_buffer
mResources.OES_texture_buffer = extensions.textureBufferOES;
mResources.EXT_texture_buffer = extensions.textureBufferEXT;
// GLSL ES 3.0 constants // GLSL ES 3.0 constants
mResources.MaxVertexOutputVectors = caps.maxVertexOutputComponents / 4; mResources.MaxVertexOutputVectors = caps.maxVertexOutputComponents / 4;
mResources.MaxFragmentInputVectors = caps.maxFragmentInputComponents / 4; mResources.MaxFragmentInputVectors = caps.maxFragmentInputComponents / 4;
......
...@@ -309,6 +309,12 @@ SamplerFormat TextureState::computeRequiredSamplerFormat(const SamplerState &sam ...@@ -309,6 +309,12 @@ SamplerFormat TextureState::computeRequiredSamplerFormat(const SamplerState &sam
bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState, bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState,
const State &state) const const State &state) const
{ {
// Buffer textures cannot be incomplete.
if (mType == TextureType::Buffer)
{
return true;
}
if (mBaseLevel > mMaxLevel) if (mBaseLevel > mMaxLevel)
{ {
return false; return false;
......
...@@ -1579,6 +1579,8 @@ void GenerateCaps(const FunctionsGL *functions, ...@@ -1579,6 +1579,8 @@ void GenerateCaps(const FunctionsGL *functions,
caps->maxTextureBufferSize = QuerySingleGLInt(functions, GL_MAX_TEXTURE_BUFFER_SIZE); caps->maxTextureBufferSize = QuerySingleGLInt(functions, GL_MAX_TEXTURE_BUFFER_SIZE);
caps->textureBufferOffsetAlignment = caps->textureBufferOffsetAlignment =
QuerySingleGLInt(functions, GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT); QuerySingleGLInt(functions, GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT);
extensions->textureBufferOES = true;
extensions->textureBufferEXT = true;
} }
else else
{ {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1427,6 +1427,9 @@ TEST(ImmutableStringTest, ScriptGeneratedHashesMatch) ...@@ -1427,6 +1427,9 @@ TEST(ImmutableStringTest, ScriptGeneratedHashesMatch)
ASSERT_EQ(0x000003bdu, ImmutableString("imageSize(01a").mangledNameHash()); ASSERT_EQ(0x000003bdu, ImmutableString("imageSize(01a").mangledNameHash());
ASSERT_EQ(0x000005f2u, ImmutableString("imageSize(01b").mangledNameHash()); ASSERT_EQ(0x000005f2u, ImmutableString("imageSize(01b").mangledNameHash());
ASSERT_EQ(0x000003bbu, ImmutableString("imageSize(01c").mangledNameHash()); ASSERT_EQ(0x000003bbu, ImmutableString("imageSize(01c").mangledNameHash());
ASSERT_EQ(0x000005fcu, ImmutableString("imageSize(01g").mangledNameHash());
ASSERT_EQ(0x000003b6u, ImmutableString("imageSize(01h").mangledNameHash());
ASSERT_EQ(0x000003b7u, ImmutableString("imageSize(01i").mangledNameHash());
ASSERT_EQ(0x000003a1u, ImmutableString("imageSize(01L").mangledNameHash()); ASSERT_EQ(0x000003a1u, ImmutableString("imageSize(01L").mangledNameHash());
ASSERT_EQ(0x000003a2u, ImmutableString("imageSize(01M").mangledNameHash()); ASSERT_EQ(0x000003a2u, ImmutableString("imageSize(01M").mangledNameHash());
ASSERT_EQ(0x00000560u, ImmutableString("imageSize(01N").mangledNameHash()); ASSERT_EQ(0x00000560u, ImmutableString("imageSize(01N").mangledNameHash());
...@@ -1436,9 +1439,6 @@ TEST(ImmutableStringTest, ScriptGeneratedHashesMatch) ...@@ -1436,9 +1439,6 @@ TEST(ImmutableStringTest, ScriptGeneratedHashesMatch)
ASSERT_EQ(0x000005b1u, ImmutableString("imageSize(01O").mangledNameHash()); ASSERT_EQ(0x000005b1u, ImmutableString("imageSize(01O").mangledNameHash());
ASSERT_EQ(0x000003b0u, ImmutableString("imageSize(01P").mangledNameHash()); ASSERT_EQ(0x000003b0u, ImmutableString("imageSize(01P").mangledNameHash());
ASSERT_EQ(0x000003b1u, ImmutableString("imageSize(01Q").mangledNameHash()); ASSERT_EQ(0x000003b1u, ImmutableString("imageSize(01Q").mangledNameHash());
ASSERT_EQ(0x000005fcu, ImmutableString("imageSize(01g").mangledNameHash());
ASSERT_EQ(0x000003b6u, ImmutableString("imageSize(01h").mangledNameHash());
ASSERT_EQ(0x000003b7u, ImmutableString("imageSize(01i").mangledNameHash());
ASSERT_EQ(0x000003aeu, ImmutableString("imageSize(01R").mangledNameHash()); ASSERT_EQ(0x000003aeu, ImmutableString("imageSize(01R").mangledNameHash());
ASSERT_EQ(0x000003afu, ImmutableString("imageSize(01S").mangledNameHash()); ASSERT_EQ(0x000003afu, ImmutableString("imageSize(01S").mangledNameHash());
ASSERT_EQ(0x000003b4u, ImmutableString("imageSize(01T").mangledNameHash()); ASSERT_EQ(0x000003b4u, ImmutableString("imageSize(01T").mangledNameHash());
......
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.* = FAIL 1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.* = FAIL
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform.random.* = FAIL 1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform.random.* = FAIL
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.* = FAIL 1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.* = FAIL
4933 OPENGL : dEQP-GLES31.functional.texture.texture_buffer.render_modify.as_fragment_texture.mapbuffer_* = FAIL
// Slow / timeout on Linux GL // Slow / timeout on Linux GL
5197 LINUX OPENGL : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.large_offset = TIMEOUT 5197 LINUX OPENGL : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.large_offset = TIMEOUT
......
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