Skip to content

Commit

Permalink
Bug 1251375. Update to ANGLE/2653
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Mar 16, 2016
1 parent d26fc6b commit 63eb86a
Show file tree
Hide file tree
Showing 309 changed files with 19,604 additions and 6,519 deletions.
4 changes: 2 additions & 2 deletions dom/canvas/WebGLShaderValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ShaderOutput(gl::GLContext* gl)
}
}

return SH_GLSL_OUTPUT;
return SH_GLSL_COMPATIBILITY_OUTPUT;
}

webgl::ShaderValidator*
Expand All @@ -129,7 +129,7 @@ WebGLContext::CreateShaderValidator(GLenum shaderType) const

ShShaderSpec spec = IsWebGL2() ? SH_WEBGL2_SPEC : SH_WEBGL_SPEC;
ShShaderOutput outputLanguage = gl->IsGLES() ? SH_ESSL_OUTPUT
: SH_GLSL_OUTPUT;
: SH_GLSL_COMPATIBILITY_OUTPUT;

// If we're using WebGL2 we want a more specific version of GLSL
if (IsWebGL2())
Expand Down
2 changes: 1 addition & 1 deletion dom/canvas/test/webgl-mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fail-if = (os == 'android')
[webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html]
fail-if = (os == 'android')
[webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html]
fail-if = (os == 'android') || (os == 'mac') || (os == 'win')
fail-if = (os == 'android') || (os == 'mac') || (os == 'win' && (os_version == '5.1' || os_version == '6.1'))
[webgl-mochitest/ensure-exts/test_EXT_frag_depth.html]
fail-if = (os == 'android')
[webgl-mochitest/ensure-exts/test_EXT_sRGB.html]
Expand Down
119 changes: 59 additions & 60 deletions gfx/angle/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,20 @@ angle_git_is_present = exec_script("src/commit_id.py",

angle_use_commit_id = angle_git_is_present == 1

gles_gypi = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("src/libGLESv2.gypi") ],
"scope",
[ "src/libGLESv2.gypi" ])

compiler_gypi = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("src/compiler.gypi") ],
"scope",
[ "src/compiler.gypi" ])
gles_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("src/libGLESv2.gypi") ],
"scope",
[ "src/libGLESv2.gypi" ])

compiler_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("src/compiler.gypi") ],
"scope",
[ "src/compiler.gypi" ])

# This config is exported to dependent targets (and also applied to internal
# ones).
config("external_config") {
include_dirs = [
"include",
]
include_dirs = [ "include" ]
}

# This config is applied to internal Angle targets (not pushed to dependents).
Expand All @@ -45,8 +41,12 @@ config("internal_config") {

if (is_win) {
copy("copy_compiler_dll") {
sources = [ "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll" ]
outputs = [ "$root_build_dir/d3dcompiler_47.dll" ]
sources = [
"$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll",
]
outputs = [
"$root_out_dir/d3dcompiler_47.dll",
]
}
}

Expand All @@ -58,11 +58,6 @@ component("translator") {

defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ]

if (angle_enable_hlsl) {
sources += rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_HLSL" ]
}

configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
":internal_config",
Expand All @@ -84,9 +79,9 @@ source_set("includes") {
"include/GLES2/gl2ext.h",
"include/GLES2/gl2platform.h",
"include/GLES3/gl3.h",
"include/GLES3/gl3platform.h",
"include/GLES3/gl31.h",
"include/GLES3/gl32.h",
"include/GLES3/gl3platform.h",
"include/GLSLANG/ShaderLang.h",
"include/KHR/khrplatform.h",
]
Expand All @@ -106,12 +101,9 @@ config("translator_static_config") {
defines = [ "ANGLE_TRANSLATOR_STATIC" ]
}


config("debug_annotations_config") {
if (is_debug) {
defines = [
"ANGLE_ENABLE_DEBUG_ANNOTATIONS",
]
defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ]
}
}

Expand All @@ -128,10 +120,24 @@ static_library("angle_common") {

static_library("translator_lib") {
sources = rebase_path(compiler_gypi.angle_translator_lib_sources, ".", "src")
defines = []

if (angle_enable_essl) {
sources +=
rebase_path(compiler_gypi.angle_translator_lib_essl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_ESSL" ]
}

if (angle_enable_glsl) {
sources +=
rebase_path(compiler_gypi.angle_translator_lib_glsl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_GLSL" ]
}

if (angle_enable_hlsl) {
sources += rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src")
defines = [ "ANGLE_ENABLE_HLSL" ]
sources +=
rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_HLSL" ]
}
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
Expand Down Expand Up @@ -246,18 +252,13 @@ static_library("libANGLE") {

include_dirs = []
libs = []
defines = [
"LIBANGLE_IMPLEMENTATION",
]
defines = [ "LIBANGLE_IMPLEMENTATION" ]

# Shared D3D sources.
if (angle_enable_d3d9 || angle_enable_d3d11) {
sources += rebase_path(gles_gypi.libangle_d3d_shared_sources, ".", "src")

defines += [
"ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " +
"\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }",
]
defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ]
}

if (angle_enable_d3d9) {
Expand Down Expand Up @@ -285,9 +286,7 @@ static_library("libANGLE") {
}

if (is_debug) {
defines += [
"ANGLE_GENERATE_SHADER_DEBUG_INFO",
]
defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ]
}

configs -= [ "//build/config/compiler:chromium_code" ]
Expand All @@ -300,10 +299,10 @@ static_library("libANGLE") {
]

deps = [
":angle_common",
":commit_id",
":includes",
":translator_static",
":angle_common",
]

if (is_win) {
Expand All @@ -315,8 +314,8 @@ shared_library("libGLESv2") {
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")

if (is_win) {
ldflags = [ "/DEF:" +
rebase_path("src/libGLESv2/libGLESv2.def", root_build_dir) ]
ldflags =
[ "/DEF:" + rebase_path("src/libGLESv2/libGLESv2.def", root_build_dir) ]
}

configs -= [ "//build/config/compiler:chromium_code" ]
Expand All @@ -328,9 +327,7 @@ shared_library("libGLESv2") {
"//build/config/compiler:no_chromium_code",
]

defines = [
"LIBGLESV2_IMPLEMENTATION",
]
defines = [ "LIBGLESV2_IMPLEMENTATION" ]

deps = [
":includes",
Expand All @@ -342,8 +339,7 @@ shared_library("libEGL") {
sources = rebase_path(gles_gypi.libegl_sources, ".", "src")

if (is_win) {
ldflags = [ "/DEF:" +
rebase_path("src/libEGL/libEGL.def", root_build_dir) ]
ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ]
}

configs -= [ "//build/config/compiler:chromium_code" ]
Expand All @@ -355,21 +351,25 @@ shared_library("libEGL") {
"//build/config/compiler:no_chromium_code",
]

defines = [
"LIBEGL_IMPLEMENTATION",
]
defines = [ "LIBEGL_IMPLEMENTATION" ]

deps = [
":includes",
":libGLESv2",
]
}

util_gypi = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("util/util.gyp") ],
"scope",
[ "util/util.gyp" ])
util_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("util/util.gyp") ],
"scope",
[ "util/util.gyp" ])

config("angle_util_config") {
include_dirs = [ "util" ]
if (is_linux) {
libs = [ "X11" ]
}
}

static_library("angle_util") {
sources = rebase_path(util_gypi.util_sources, ".", "util")
Expand All @@ -396,16 +396,15 @@ static_library("angle_util") {
"EGL_EGLEXT_PROTOTYPES",
]

configs += [
":internal_config",
":debug_annotations_config",
]
configs += [ ":debug_annotations_config" ]

include_dirs = [
"util",
public_configs = [
":angle_util_config",
":internal_config",
]

deps = [
":angle_common",
":libEGL",
":libGLESv2",
]
Expand Down
34 changes: 34 additions & 0 deletions gfx/angle/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,40 @@ hooks = [
'-s', 'buildtools/linux64/clang-format.sha1',
],
},
# Pull GN binaries using checked-in hashes.
{
'name': 'gn_win',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=win32',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'buildtools/win/gn.exe.sha1',
],
},
{
'name': 'gn_mac',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=darwin',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'buildtools/mac/gn.sha1',
],
},
{
'name': 'gn_linux64',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=linux*',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'buildtools/linux64/gn.sha1',
],
},
{
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
"pattern": ".",
Expand Down
1 change: 1 addition & 0 deletions gfx/angle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ View the [Dev setup instructions](doc/DevSetup.md). For generating a Windows Sto
* Read about WebGL on the [Khronos WebGL Wiki](http://khronos.org/webgl/wiki/Main_Page).
* Learn about implementation details in the [OpenGL Insights chapter on ANGLE](http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-ANGLE.pdf) and this [ANGLE presentation](https://drive.google.com/file/d/0Bw29oYeC09QbbHoxNE5EUFh0RGs/view?usp=sharing).
* Learn about the past, present, and future of the ANGLE implementation in [this recent presentation](https://docs.google.com/presentation/d/1CucIsdGVDmdTWRUbg68IxLE5jXwCb2y1E9YVhQo0thg/pub?start=false&loop=false).
* Notes on [debugging ANGLE](doc/DebuggingTips.md).
* If you use ANGLE in your own project, we'd love to hear about it!

25 changes: 25 additions & 0 deletions gfx/angle/include/EGL/eglext.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu
#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */

#ifndef EGL_ANGLE_direct_composition
#define EGL_ANGLE_direct_composition 1
#define EGL_DIRECT_COMPOSITION_ANGLE 0x33A5
#endif /* EGL_ANGLE_direct_composition */

#ifndef EGL_ANGLE_platform_angle
#define EGL_ANGLE_platform_angle 1
#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
Expand Down Expand Up @@ -504,6 +509,26 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu
#define EGL_X11_VISUAL_ID_ANGLE 0x33A3
#endif /* EGL_ANGLE_x11_visual */

#ifndef EGL_ANGLE_flexible_surface_compatibility
#define EGL_ANGLE_flexible_surface_compatibility 1
#define EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6
#endif /* EGL_ANGLE_flexible_surface_compatibility */

#ifndef EGL_ANGLE_surface_orientation
#define EGL_ANGLE_surface_orientation
#define EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7
#define EGL_SURFACE_ORIENTATION_ANGLE 0x33A8
#define EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001
#define EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002
#endif /* EGL_ANGLE_surface_orientation */

#ifndef EGL_ANGLE_experimental_present_path
#define EGL_ANGLE_experimental_present_path
#define EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
#define EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
#define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
#endif /* EGL_ANGLE_experimental_present_path */

#ifndef EGL_ARM_pixmap_multisample_discard
#define EGL_ARM_pixmap_multisample_discard 1
#define EGL_DISCARD_SAMPLES_ARM 0x3286
Expand Down
15 changes: 15 additions & 0 deletions gfx/angle/include/GLES2/gl2ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,21 @@ GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
#define GL_SHADER_BINARY_VIV 0x8FC4
#endif /* GL_VIV_shader_binary */

#ifndef GL_ANGLE_lossy_etc_decode
#define GL_ANGLE_lossy_etc_decode 1
#define GL_ETC1_RGB8_LOSSY_DECODE_ANGLE 0x9690
#define GL_COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE 0x9691
#define GL_COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE 0x9692
#define GL_COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9693
#define GL_COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9694
#define GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE 0x9695
#define GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE 0x9696
#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9697
#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9698
#define GL_COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x9699
#define GL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969A
#endif /* GL_ANGLE_lossy_etc_decode */

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 63eb86a

Please sign in to comment.