This commit is contained in:
bruvzg
2024-07-17 09:24:27 +03:00
parent 43c0ee8a73
commit 6e8038ec3f
3527 changed files with 0 additions and 1615421 deletions

View File

@@ -1,59 +0,0 @@
# Defines the ANGLE style for automatic reformatting.
# https://code.google.com/p/angleproject/wiki/CodingStandard
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# Allow double brackets such as std::vector<std::vector<int>>.
Standard: Cpp11
# Indent 4 spaces at a time.
IndentWidth: 4
# Keep lines under 100 columns long.
ColumnLimit: 100
# Always break before braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# Keeps extern "C" blocks unindented.
AfterExternBlock: false
# Indent case labels.
IndentCaseLabels: true
# Right-align pointers and references
PointerAlignment: Right
# ANGLE likes to align things as much as possible.
AlignOperands: true
AlignConsecutiveAssignments: true
# Use 2 space negative offset for access modifiers
AccessModifierOffset: -2
# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
AllowShortCaseLabelsOnASingleLine: false
# Useful for spacing out functions in classes
KeepEmptyLinesAtTheStartOfBlocks: true
# Indent nested PP directives.
IndentPPDirectives: AfterHash
# Include blocks style
IncludeBlocks: Preserve

21
.gitattributes vendored
View File

@@ -1,21 +0,0 @@
* text=auto
*.sln eol=crlf
*.vcxproj eol=crlf
*.vcxproj.filters eol=crlf
*.bat eol=crlf
*.rc eol=crlf
**/compiled/*.h eol=crlf
**/shaders/gen/*.inc eol=lf
*.sh eol=lf
*.gn eol=lf
*.gni eol=lf
*.star eol=lf
infra/config/generated/*.cfg eol=lf
infra/config/generated/*.pyl eol=lf
src/compiler/preprocessor/preprocessor_*.* eol=lf
src/compiler/translator/glslang_*.* eol=lf
src/tests/capture_tests/expected/*.* eol=lf
# Git conflict markers in the json file break the code generator.
# Using a binary merge strategy forces conflicts without changing file contents.
scripts/code_generation_hashes/*.json merge=binary

6
.gitmodules vendored
View File

@@ -1,6 +0,0 @@
[submodule "third_party/astc-encoder/src"]
path = third_party/astc-encoder/src
url = https://chromium.googlesource.com/external/github.com/ARM-software/astc-encoder
[submodule "third_party/zlib"]
path = third_party/zlib
url = https://chromium.googlesource.com/chromium/src/third_party/zlib

56
.gn
View File

@@ -1,56 +0,0 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file is used when gn runs in this directory (or a lower directory
# and searching upward ends here). See "gn help dotfile."
# As a result this file will only affect stand-alone ANGLE builds,
# not chromium builds.
import("//build/dotfile_settings.gni")
import("//dotfile_settings.gni")
# Location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"
# The python interpreter to use by default. On Windows, this will look
# for python3.exe and python3.bat.
script_executable = "python3"
# These are the targets to check headers for by default. The files in targets
# matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
check_targets = [ "*" ]
# These are the list of GN files that run exec_script. This allowlist exists
# to force additional review for new uses of exec_script, which is strongly
# discouraged except for gypi_to_gn calls.
exec_script_whitelist = angle_dotfile_settings.exec_script_whitelist +
build_dotfile_settings.exec_script_whitelist +
[
"//build/config/sysroot.gni",
"//build/config/win/BUILD.gn",
"//build/config/win/visual_studio_version.gni",
"//build/gn_helpers.py",
"//build_overrides/build.gni",
]
default_args = {
clang_use_chrome_plugins = true
build_angle_deqp_tests = true
use_sysroot = true
# Saves on importing extra dependencies and ANGLE doesn't use JS.
enable_js_protobuf = false
# Saves on importing extra dependencies and ANGLE doesn't use Rust.
enable_rust = false
# Disable location tags in isolates.
tests_have_location_tags = false
# Use base level API level 29 support for AHardwareBuffer ANGLE tests.
android32_ndk_api_level = 29
android64_ndk_api_level = 29
}

View File

@@ -1,4 +0,0 @@
[style]
based_on_style = yapf
column_limit = 99
indent_width = 4

394
.vpython
View File

@@ -1,394 +0,0 @@
# This is a vpython "spec" file.
#
# It describes patterns for python wheel dependencies of the python scripts in
# the chromium repo, particularly for dependencies that have compiled components
# (since pure-python dependencies can be easily vendored into third_party).
#
# When vpython is invoked, it finds this file and builds a python VirtualEnv,
# containing all of the dependencies described in this file, fetching them from
# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`,
# this never requires the end-user machine to have a working python extension
# compilation environment. All of these packages are built using:
# https://chromium.googlesource.com/infra/infra/+/main/infra/tools/dockerbuild/
#
# All python scripts in the repo share this same spec, to avoid dependency
# fragmentation.
#
# If you have depot_tools installed in your $PATH, you can invoke python scripts
# in this repo by running them as you normally would run them, except
# substituting `vpython` instead of `python` on the command line, e.g.:
# vpython path/to/script.py some --arguments
#
# Read more about `vpython` and how to modify this file here:
# https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md
#
# For the definition of this spec, see:
# https://chromium.googlesource.com/infra/luci/luci-go/+/main/vpython/api/vpython/spec.proto
python_version: "2.7"
# Used by:
# build/chromeos/test_runner.py
wheel: <
name: "infra/python/wheels/jsonlines-py2_py3"
version: "version:1.2.0"
>
wheel: <
name: "infra/python/wheels/subprocess32/${vpython_platform}"
version: "version:3.5.0rc1"
# Only download for linux since we shouldn't be running CrOS tests on mac/win.
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
>
# Used by:
# build/chromeos/test_runner.py
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.2.2"
>
# Used by:
# build/lacros/test_runner.py
wheel: <
name: "infra/python/wheels/parameterized-py2_py3"
version: "version:0.7.1"
>
# Used by:
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
#
# This version must also be compatible with the "numpy" version, as "cv2"
# depends on "numpy". In this case, OpenCV@2.4.13.2 has been built against
# numpy@1.11.3.
wheel: <
name: "infra/python/wheels/opencv_python/${vpython_platform}"
version: "version:2.4.13.2"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
# Used by:
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
wheel: <
name: "infra/python/wheels/numpy/${vpython_platform}"
version: "version:1.11.3"
>
# Used by:
# third_party/catapult
wheel: <
name: "infra/python/wheels/pypiwin32/${vpython_platform}"
version: "version:219"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>
# Used by:
# chrome/test/data/android/upload_download_utils_test.py
wheel: <
name: "infra/python/wheels/pyfakefs-py2_py3"
version: "version:3.7.2"
>
# Used by:
# tools/perf/fetch_benchmark_deps.py
wheel: <
name: "infra/python/wheels/google_compute_engine-py2_py3"
version: "version:2.6.2"
>
wheel: <
name: "infra/python/wheels/boto-py2_py3"
version: "version:2.48.0"
>
# Used by:
# testing/buildbot/generate_buildbot_json_coveragetest.py
wheel: <
name: "infra/python/wheels/coverage/${vpython_platform}"
version: "version:4.3.4"
>
# Used by:
# build/android/pylib/local/emulator/avd.py
wheel: <
name: "infra/python/wheels/protobuf-py2_py3"
version: "version:3.6.1"
>
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel: <
name: "infra/python/wheels/pyftpdlib-py2_py3"
version: "version:0.7.0"
>
wheel: <
name: "infra/python/wheels/simplejson/${vpython_platform}"
version: "version:3.13.2"
>
# Used by:
# tools/perf/core/results_dashboard.py
wheel: <
name: "infra/python/wheels/httplib2-py2_py3"
version: "version:0.10.3"
>
# Used by:
# tools/perf/flakiness_cli
wheel: <
name: "infra/python/wheels/pandas/${vpython_platform}"
version: "version:0.23.4"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
wheel: <
name: "infra/python/wheels/pytz-py2_py3"
version: "version:2018.4"
>
wheel: <
name: "infra/python/wheels/python-dateutil-py2_py3"
version: "version:2.7.3"
>
# Used by:
# content/test/gpu/gpu_tests/color_profile_manager_mac.py
# Note: there's a version of this wheel for even older OS versions,
# but we don't need it for the GPU tests, and it looks like there are
# bugs in the not_match_tag implementation.
wheel: <
name: "infra/python/wheels/pyobjc/${vpython_platform}"
version: "version:4.1"
match_tag: < platform: "macosx_10_10_intel" >
>
# Used by:
# third_party/catapult
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel: <
name: "infra/python/wheels/pbr-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
# Used by:
# chrome/test/chromedriver/test/run_webdriver_tests.py
wheel <
name: "infra/python/wheels/pytest-py2_py3"
version: "version:3.6.2"
>
wheel <
name: "infra/python/wheels/attrs-py2_py3"
version: "version:17.4.0"
>
wheel <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel <
name: "infra/python/wheels/more-itertools-py2_py3"
version: "version:4.1.0"
>
wheel <
name: "infra/python/wheels/scandir/${vpython_platform}"
version: "version:1.7"
>
wheel <
name: "infra/python/wheels/pluggy-py2_py3"
version: "version:0.7.1"
>
wheel <
name: "infra/python/wheels/py-py2_py3"
version: "version:1.5.3"
>
wheel <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.2.2"
>
# Used by:
# tools/infra
wheel: <
name: "infra/python/wheels/requests-py2_py3"
version: "version:2.13.0"
>
wheel: <
name: "infra/python/wheels/colorama-py2_py3"
version: "version:0.4.1"
>
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/atomicwrites-py2_py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/pathlib2-py2_py3"
version: "version:2.3.3"
>
# Used by Web Platform Tests (WPT) codebase in
# //third_party/blink/web_tests/external/wpt/tools/
wheel: <
name: "infra/python/wheels/html5lib-py2_py3"
version: "version:1.0.1"
>
wheel: <
name: "infra/python/wheels/mozdebug-py2_py3"
version: "version:0.1.1"
>
wheel: <
name: "infra/python/wheels/mozinfo-py2_py3"
version: "version:1.1.0"
>
wheel: <
name: "infra/python/wheels/mozlog-py2_py3"
version: "version:5.0"
>
wheel: <
name: "infra/python/wheels/mozprocess-py2_py3"
version: "version:0.26"
>
wheel: <
name: "infra/python/wheels/urllib3-py2_py3"
version: "version:1.22"
>
wheel: <
name: "infra/python/wheels/blessings-py2_py3"
version: "version:1.7"
>
wheel: <
name: "infra/python/wheels/mozfile-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/mozterm-py2_py3"
version: "version:1.0.0"
>
wheel: <
name: "infra/python/wheels/webencodings-py2_py3"
version: "version:0.5.1"
>
wheel: <
name: "infra/python/wheels/certifi-py2_py3"
version: "version:2018.11.29"
>
wheel: <
name: "infra/python/wheels/chardet-py2_py3"
version: "version:3.0.4"
>
wheel: <
name: "infra/python/wheels/idna-py2_py3"
version: "version:2.8"
>
wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:6.0.0"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
# Used by:
# //third_party/blink/tools/blinkpy/web_tests/port/server_process.py
wheel: <
name: "infra/python/wheels/pywin32/${vpython_platform}"
version: "version:227"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>

530
.vpython3
View File

@@ -1,530 +0,0 @@
# This is a vpython "spec" file.
#
# It describes patterns for python wheel dependencies of the python scripts in
# the chromium repo, particularly for dependencies that have compiled components
# (since pure-python dependencies can be easily vendored into third_party).
#
# When vpython is invoked, it finds this file and builds a python VirtualEnv,
# containing all of the dependencies described in this file, fetching them from
# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`,
# this never requires the end-user machine to have a working python extension
# compilation environment. All of these packages are built using:
# https://chromium.googlesource.com/infra/infra/+/main/infra/tools/dockerbuild/
#
# All python scripts in the repo share this same spec, to avoid dependency
# fragmentation.
#
# If you have depot_tools installed in your $PATH, you can invoke python scripts
# in this repo by running them as you normally would run them, except
# substituting `vpython` instead of `python` on the command line, e.g.:
# vpython path/to/script.py some --arguments
#
# Read more about `vpython` and how to modify this file here:
# https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md
python_version: "3.8"
# Used by:
# build/android/pylib/local/emulator/avd.py
wheel: <
name: "infra/python/wheels/protobuf-py3"
version: "version:3.20.0"
>
# TODO(https://crbug.com/898348): Add in necessary wheels as Python3 versions
# become available.
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
# These wheels are necessary to run pytype, i.e. enforce Python 3 type hinting.
# We currently use 2021.11.2 instead of the 2022.5.5 available in CIPD because
# 2022.5.5 seems to have issues when analyzing code that imports the asyncio
# module. 2021.11.2 only has Linux wheels available, so restrict to that
# platform.
wheel: <
name: "infra/python/wheels/pytype/${vpython_platform}"
version: "version:2021.11.2"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/importlab-py3"
version: "version:0.6.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/networkx-py3"
version: "version:2.5"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/decorator-py3"
version: "version:5.0.9"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/libcst-py3"
version: "version:0.3.19"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/pyyaml/${vpython_platform}"
version: "version:5.4.1.chromium.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typing-inspect-py3"
version: "version:0.7.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typing-extensions-py3"
version: "version:4.0.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/tabulate-py3"
version: "version:0.8.9"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typed-ast/${vpython_platform}"
version: "version:1.5.3"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/ninja/${vpython_platform}"
version: "version:1.10.0.post2"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/mypy-extensions-py3"
version: "version:0.4.3"
match_tag: <
platform: "manylinux1_x86_64"
>
>
# Common utilities.
# Use the same versions specified by //third_party/catapult/.vpython3 so that
# Chromium tests using Telemetry function properly.
wheel: <
name: "infra/python/wheels/numpy/${vpython_platform}"
version: "version:1.2x.supported.1"
>
wheel: <
name: "infra/python/wheels/pexpect/${vpython_platform}"
version: "version:4.8.0.chromium.1"
>
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.8.0.chromium.3"
>
wheel: <
name: "infra/python/wheels/requests-py3"
version: "version:2.31.0"
>
wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:8.3.1"
# There is currently no Linux arm/arm64 version in CIPD.
not_match_tag <
platform: "linux_aarch64"
>
>
wheel: <
name: "infra/python/wheels/opencv_python/${vpython_platform}"
version: "version:4.5.3.56.chromium.4"
# There is currently no Linux arm/arm64 version in CIPD.
not_match_tag <
platform: "linux_aarch64"
>
>
# Used by various python unit tests.
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/parameterized-py2_py3"
version: "version:0.7.1"
>
wheel: <
name: "infra/python/wheels/pbr-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/pyfakefs-py2_py3"
version: "version:3.7.2"
>
# Used by:
# build/chromeos/test_runner.py
wheel: <
name: "infra/python/wheels/jsonlines-py2_py3"
version: "version:1.2.0"
>
wheel: <
name: "infra/python/wheels/python-dateutil-py2_py3"
version: "version:2.7.3"
>
# Used by WPT importer
wheel: <
name: "infra/python/wheels/charset_normalizer-py3"
version: "version:2.0.4"
>
wheel: <
name: "infra/python/wheels/pyasn1-py2_py3"
version: "version:0.4.5"
>
wheel: <
name: "infra/python/wheels/pyasn1_modules-py2_py3"
version: "version:0.2.4"
>
wheel: <
name: "infra/python/wheels/rsa-py2_py3"
version: "version:3.4.2"
>
wheel: <
name: "infra/python/wheels/cachetools-py2_py3"
version: "version:2.0.1"
>
wheel: <
name: "infra/python/wheels/uritemplate-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/google-auth-py2_py3"
version: "version:1.25.0"
>
wheel: <
name: "infra/python/wheels/googleapis-common-protos-py2_py3"
version: "version:1.52.0"
>
wheel: <
name: "infra/python/wheels/google-api-core-py3"
version: "version:1.31.5"
>
wheel: <
name: "infra/python/wheels/google-auth-httplib2-py2_py3"
version: "version:0.1.0"
>
wheel: <
name: "infra/python/wheels/google-api-python-client-py3"
version: "version:2.2.0"
>
wheel: <
name: "infra/python/wheels/oauth2client-py2_py3"
version: "version:3.0.0"
>
# Used by:
# //third_party/blink/tools/wpt_upload.py
wheel: <
name: "infra/python/wheels/crcmod/${vpython_platform}"
version: "version:1.7.chromium.3"
>
wheel: <
name: "infra/python/wheels/grpcio/${vpython_platform}"
version: "version:1.44.0"
>
wheel: <
name: "infra/python/wheels/grpc-google-iam-v1-py3"
version: "version:0.12.3"
>
wheel: <
name: "infra/python/wheels/proto-plus-py3"
version: "version:1.20.3"
>
wheel: <
name: "infra/python/wheels/google-cloud-kms-py3"
version: "version:2.11.1"
>
# Used by Web Platform Tests (WPT) codebase in
# //third_party/wpt_tools
wheel: <
name: "infra/python/wheels/html5lib-py2_py3"
version: "version:1.0.1"
>
wheel: <
name: "infra/python/wheels/mozdebug-py3"
version: "version:0.3.0"
>
wheel: <
name: "infra/python/wheels/mozinfo-py2_py3"
version: "version:1.2.2"
>
wheel: <
name: "infra/python/wheels/mozlog-py2_py3"
version: "version:7.1.0"
>
wheel: <
name: "infra/python/wheels/mozprocess-py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/urllib3-py2_py3"
version: "version:1.24.3"
>
wheel: <
name: "infra/python/wheels/blessings-py2_py3"
version: "version:1.7"
>
wheel: <
name: "infra/python/wheels/mozfile-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/mozterm-py2_py3"
version: "version:1.0.0"
>
wheel: <
name: "infra/python/wheels/webencodings-py2_py3"
version: "version:0.5.1"
>
wheel: <
name: "infra/python/wheels/certifi-py2_py3"
version: "version:2020.11.8"
>
wheel: <
name: "infra/python/wheels/chardet-py2_py3"
version: "version:3.0.4"
>
wheel: <
name: "infra/python/wheels/idna-py2_py3"
version: "version:2.8"
>
wheel: <
name: "infra/python/wheels/distro-py2_py3"
version: "version:1.4.0"
>
wheel: <
name: "infra/python/wheels/aioquic/${vpython_platform}"
version: "version:0.9.15"
>
wheel: <
name: "infra/python/wheels/pylsqpack/${vpython_platform}"
version: "version:0.3.12"
>
wheel: <
name: "infra/python/wheels/cryptography/${vpython_platform}"
version: "version:3.3.1.chromium.1"
>
wheel: <
name: "infra/python/wheels/cffi/${vpython_platform}"
version: "version:1.14.5.chromium.7"
>
wheel: <
name: "infra/python/wheels/pycparser-py2_py3"
version: "version:2.19"
>
wheel: <
name: "infra/python/wheels/ecdsa-py2_py3"
version: "version:0.17.0"
>
# Used by:
# chrome/test/chromedriver/test/run_webdriver_tests.py
wheel: <
name: "infra/python/wheels/iniconfig-py3"
version: "version:1.1.1"
>
wheel: <
name: "infra/python/wheels/packaging-py2_py3"
version: "version:16.8"
>
wheel: <
name: "infra/python/wheels/pyparsing-py2_py3"
version: "version:2.4.7"
>
wheel: <
name: "infra/python/wheels/toml-py3"
version: "version:0.10.1"
>
wheel <
name: "infra/python/wheels/pytest-py3"
version: "version:6.2.2"
>
wheel <
name: "infra/python/wheels/pytest-asyncio-py3"
version: "version:0.14.0"
>
wheel <
name: "infra/python/wheels/attrs-py2_py3"
version: "version:21.4.0"
>
wheel <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel <
name: "infra/python/wheels/more-itertools-py2_py3"
version: "version:4.1.0"
>
wheel <
name: "infra/python/wheels/pluggy-py3"
version: "version:0.13.1"
>
wheel <
name: "infra/python/wheels/py-py2_py3"
version: "version:1.10.0"
>
wheel <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/atomicwrites-py2_py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/colorama-py2_py3"
version: "version:0.4.1"
>
# Used by:
# testing/buildbot/generate_buildbot_json_coveragetest.py
wheel: <
name: "infra/python/wheels/coverage/${vpython_platform}"
version: "version:5.5.chromium.3"
>
# Used by:
# //content/test/gpu
wheel: <
name: "infra/python/wheels/pathos/${vpython_platform}"
version: "version:0.2.7.chromium.5"
not_match_tag <
abi: "cp27mu"
platform: "manylinux1_i686"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_mips64"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_armv6l"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_armv7l"
>
>
wheel: <
name: "infra/python/wheels/websockets-py3"
version: "version:10.1"
>
# Used by:
# //tools/infra/find_bad_builds.py
wheel: <
name: "infra/python/wheels/pytz-py2_py3"
version: "version:2018.4"
>
# Used by:
# //third_party/blink/tools/blinkpy/web_tests/port/server_process.py
wheel: <
name: "infra/python/wheels/pywin32/${vpython_platform}"
version: "version:300"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>
# Used by:
# //content/test/gpu/gpu_tests/color_profile_manager_mac.py
wheel: <
name: "infra/python/wheels/pyobjc/${vpython_platform}"
version: "version:7.3.chromium.1"
match_tag: <
platform: "macosx_10_10_intel"
>
match_tag: <
platform: "macosx_11_0_arm64"
>
>
# Used by:
# tools/perf/core/results_dashboard.py
wheel: <
name: "infra/python/wheels/httplib2-py3"
version: "version:0.19.1"
>
# Used by:
# tools/perf/flakiness_cli
wheel: <
name: "infra/python/wheels/pandas/${vpython_platform}"
version: "version:1.3.2.chromium.1"
not_match_tag: <
platform: "linux_aarch64"
>
>
# Used by:
# testing/script/run_variations_smoke_tests.py
wheel: <
name: "infra/python/wheels/selenium-py3"
version: "version:3.14.0"
>
# Used by meson
wheel: <
name: "infra/python/wheels/markupsafe/${vpython_platform}"
version: "version:2.0.1"
>
wheel: <
name: "infra/python/wheels/mako-py3"
version: "version:1.2.3"
>

View File

@@ -1 +0,0 @@
scripts/export_targets.py

86
AUTHORS
View File

@@ -1,86 +0,0 @@
# This is the official list of The ANGLE Project Authors
# for copyright purposes.
# This file is distinct from the CONTRIBUTORS files.
# See the latter for an explanation.
# Names should be added to this file as
# Name or Organization
# Email addresses for individuals are tracked elsewhere to avoid spam.
Google Inc.
TransGaming Inc.
3DLabs Inc. Ltd.
Adobe Systems Inc.
Autodesk, Inc.
BlackBerry Limited
Cable Television Laboratories, Inc.
Collabora, Ltd.
Cloud Party, Inc.
Igalia, S.L.
Imagination Technologies Ltd.
Intel Corporation
LunarG, Inc.
Mozilla Corporation
Turbulenz
Klarälvdalens Datakonsult AB
Microsoft Corporation
Microsoft Open Technologies, Inc.
NVIDIA Corporation
Opera Software ASA
The Qt Company Ltd.
Advanced Micro Devices, Inc.
LG Electronics, Inc.
IBM Inc.
AdaptVis GmbH
Samsung Electronics, Inc.
Arm Ltd.
Broadcom Inc.
Facebook, Inc.
The Khronos Group, Inc.
Numfum GmbH
Yandex LLC
Rive
Institute of Software, Chinese Academy of Sciences
Guangdong OPPO Mobile Telecommunications Corp., Ltd
Jacek Caban
Mark Callow
Ginn Chen
Tibor den Ouden
Régis Fénéon
James Hauxwell
Sam Hocevar
Pierre Leveille
Jonathan Liu
Boying Lu
Aitor Moreno
Yuri O'Donnell
Josh Soref
Ma Aiguo
Maks Naumov
Jinyoung Hur
Sebastian Bergstein
James Ross-Gowan
Nickolay Artamonov
Ihsan Akmal
Andrei Volykhin
Jérôme Duval
Руслан Ижбулатов
Thomas Miller
Till Rathmann
Nick Shaforostov
Jaime Bernardo
Le Hoang Quyen
Ethan Lee
Renaud Lepage
Artem Bolgar
Wander Lairson Costa
Stephan Hartmann
SeongHwan Park
Xiaopeng Li
Akihiko Odaki
Ho Cheung
Tao Wang
Phan Quang Minh
Hongchen Yan

View File

@@ -1,2 +0,0 @@
# This file exists purely to prevent Android.mk files in subdirectories from being automatically used
# See http://b/188491905 for more details

1812
BUILD.gn

File diff suppressed because it is too large Load Diff

View File

@@ -1,237 +0,0 @@
# This is the official list of people who can contribute
# (and who have contributed) code to the ANGLE project
# repository.
# The AUTHORS file lists the copyright holders; this file
# lists people. For example, Google employees are listed here
# but not in AUTHORS, because Google holds the copyright.
#
TransGaming Inc.
Nicolas Capens
Daniel Koch
Geoff Lang
Andrew Lewycky
Jamie Madill
Gavriel State
Shannon Woods
Google Inc.
Brent Austin
Michael Bai
John Bauman
Peter Beverloo
Eric Binet
Steve Block
Rachel Blum
Eric Boren
Henry Bridge
Victor Costan
James Dong
Nat Duca
Courtney Goeltzenleuchter
Tobin Ehlis
Ian Elliott
Scott Graham
Peter Kasting
Vangelis Kokkevis
Charlie Lao
Jiacheng Lu
Zhenyao Mo
Daniel Nicoara
Kai Ninomiya
Cody Northrop
Justin Novosad
Alastair Patrick
Alok Priyadarshi
Kenneth Russell
Jonah Ryan-Davis
Brian Salomon
Justin Schuh
Gregg Tavares
thestig@chromium.org
Jeff Timanus
Tim Van Patten
Ben Vanik
Adrienne Walker
Corentin Wallez
Shahbaz Youssefi
Hailin Zhang
Adobe Systems Inc.
Alexandru Chiculita
Steve Minns
Max Vujovic
Apple Inc.
Dan Glastonbury
Dean Jackson
Kimmo Kinnunen
Kyle Piddington
Autodesk, Inc.
Ranger Harke
Cloud Party, Inc.
Conor Dickinson
The Qt Company Ltd.
Andrew Knight
Imagination Technologies Ltd.
Gregoire Payen de La Garanderie
Kyle Griffiths
Intel Corporation
Jin Yang
Andy Chen
Josh Triplett
Sudarsana Nagineni
Jiajia Qin
Jiawei Shao
Jie Chen
Qiankun Miao
Bryan Bernhart
Yunchao He
Xinghua Cao
Brandon Jones
Enrico Galli
Klarälvdalens Datakonsult AB
Milian Wolff
Mozilla Corp.
Dzmitry Malyshau
Ehsan Akhgari
Edwin Flores
Jeff Gilbert
Mike Hommey
Benoit Jacob
Makoto Kato
Vladimir Vukicevic
Josh Matthews
Turbulenz
Michael Braithwaite
Ulrik Persson (ddefrostt)
Mark Banner (standard8mbp)
David Kilzer
Jacek Caban
Tibor den Ouden
Régis Fénéon
Sebastian Bergstein
James Ross-Gowan
Andrei Volykhin
Jérôme Duval
Till Rathmann
Nick Shaforostov
Microsoft Corporation
Cooper Partin
Austin Kinross
Mingyu Hu
Minmin Gong
Shawn Hargreaves
Rafael Cintron
James Clarke
Nathan Zabriskie
Patrick To
Microsoft Open Technologies, Inc.
Cooper Partin
Austin Kinross
NVIDIA Corporation
Olli Etuaho
Arun Patole
Qingqing Deng
Kimmo Kinnunen
Sami Väisänen
Martin Radev
Joonatan Saarhelo
Markus Tavenrath
Anders Leino
Opera Software ASA
Daniel Bratell
Tomasz Moniuszko
David Landell
Advanced Micro Devices, Inc.
Russ Lind
LG Electronics, Inc.
Jani Hautakangas
Ivan Murashov
IBM Inc.
Junliang Yan
AdaptVis GmbH
Sascha Kolodzey
Samsung Electronics, Inc.
Brandon Schade
Colin Peter
Hyunchang Kim
Hyunseok Ko
Jaedon Lee
Jeff Vigil
Jonah Taylor
Kevin Jung
Kyeongmin Kim
Mahmoud Kharsa
Mathew Prabakar
Minkyu Jeong
Mohan Maiya
Nirmal Singh
Peter Mowry
Sangwon Park
Saurabh Badenkal
Younggwan Kim
Sungyong Choi
Arm Ltd.
Fei Yang
Xinyi He
Sunny Sun
Xiaoxuan Liu
Ancheng Qiao
Amy Liu
Jian Li
Cheryl Wei
Guoxing Wu
Min Zhang
Broadcom Inc.
Gary Sweet
Facebook, Inc.
Artem Bolgar
The Khronos Group, Inc.
Alexey Knyazev
Igalia, S.L.
Jose Dapena Paz
Numfum GmbH
Carl Woffenden
Collabora, Ltd.
Lubosz Sarnecki
LunarG, Inc.
Mark Lobodzinski
Valve Corporation
Steven Noonan
Yandex LLC
Andrew Naumov
Rive
Chris Dalton
Institute of Software, Chinese Academy of Sciences
Wang Chen

5213
DEPS

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
monorail {
component: "Internals>GPU>ANGLE"
}
team_email: "angleproject@googlegroups.com"

38
OWNERS
View File

@@ -1,38 +0,0 @@
# See https://chromium.googlesource.com/angle/angle/+/main/doc/ContributingCode.md#selecting-reviewers for more info
# Note: Owners must be split by domain to avoid git merge conflicts on platforms that cannot have
# email addresses from all platforms. Also, to avoid downstream git merge conflicts, all changes
# to this file should be done in the upstream ANGLE repository's main branch.
# @chromium.org email addresses:
geofflang@chromium.org
jmadill@chromium.org
kbr@chromium.org
syoussefi@chromium.org
ynovikov@chromium.org
# @google.com email addresses:
abdolrashidi@google.com
cclao@google.com
chrisforbes@google.com
cnorthrop@google.com
geofflang@google.com
ianelliott@google.com
jmadill@google.com
jonahr@google.com
lpy@google.com
romanl@google.com
solti@google.com
srisser@google.com
syoussefi@google.com
vantablack@google.com
ynovikov@google.com
yuxinhu@google.com
# The auto-roller can also modify autogenerated files, so we give it ownership
# over all ANGLE files.
angle-autoroll@skia-public.iam.gserviceaccount.com
per-file AUTHORS=*
per-file CONTRIBUTORS=*
per-file DEPS=*
per-file WATCHLISTS=*

View File

@@ -1,510 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for code generation.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into depot_tools.
"""
import itertools
import os
import re
import shutil
import subprocess
import sys
import tempfile
import textwrap
import pathlib
# This line is 'magic' in that git-cl looks for it to decide whether to
# use Python3 instead of Python2 when running the code in this file.
USE_PYTHON3 = True
# Fragment of a regular expression that matches C/C++ and Objective-C++ implementation files and headers.
_IMPLEMENTATION_AND_HEADER_EXTENSIONS = r'\.(c|cc|cpp|cxx|mm|h|hpp|hxx)$'
# Fragment of a regular expression that matches C++ and Objective-C++ header files.
_HEADER_EXTENSIONS = r'\.(h|hpp|hxx)$'
_PRIMARY_EXPORT_TARGETS = [
'//:libEGL',
'//:libGLESv1_CM',
'//:libGLESv2',
'//:translator',
]
def _SplitIntoMultipleCommits(description_text):
paragraph_split_pattern = r"(?m)(^\s*$\n)"
multiple_paragraphs = re.split(paragraph_split_pattern, description_text)
multiple_commits = [""]
change_id_pattern = re.compile(r"(?m)^Change-Id: [a-zA-Z0-9]*$")
for paragraph in multiple_paragraphs:
multiple_commits[-1] += paragraph
if change_id_pattern.search(paragraph):
multiple_commits.append("")
if multiple_commits[-1] == "":
multiple_commits.pop()
return multiple_commits
def _CheckCommitMessageFormatting(input_api, output_api):
def _IsLineBlank(line):
return line.isspace() or line == ""
def _PopBlankLines(lines, reverse=False):
if reverse:
while len(lines) > 0 and _IsLineBlank(lines[-1]):
lines.pop()
else:
while len(lines) > 0 and _IsLineBlank(lines[0]):
lines.pop(0)
def _IsTagLine(line):
return ":" in line
def _CheckTabInCommit(lines):
return all([line.find("\t") == -1 for line in lines])
allowlist_strings = ['Revert', 'Roll', 'Manual roll', 'Reland', 'Re-land']
summary_linelength_warning_lower_limit = 65
summary_linelength_warning_upper_limit = 70
description_linelength_limit = 72
git_output = input_api.change.DescriptionText()
multiple_commits = _SplitIntoMultipleCommits(git_output)
errors = []
for k in range(len(multiple_commits)):
commit_msg_lines = multiple_commits[k].splitlines()
commit_number = len(multiple_commits) - k
commit_tag = "Commit " + str(commit_number) + ":"
commit_msg_line_numbers = {}
for i in range(len(commit_msg_lines)):
commit_msg_line_numbers[commit_msg_lines[i]] = i + 1
_PopBlankLines(commit_msg_lines, True)
_PopBlankLines(commit_msg_lines, False)
allowlisted = False
if len(commit_msg_lines) > 0:
for allowlist_string in allowlist_strings:
if commit_msg_lines[0].startswith(allowlist_string):
allowlisted = True
break
if allowlisted:
continue
if not _CheckTabInCommit(commit_msg_lines):
errors.append(
output_api.PresubmitError(commit_tag + "Tabs are not allowed in commit message."))
# the tags paragraph is at the end of the message
# the break between the tags paragraph is the first line without ":"
# this is sufficient because if a line is blank, it will not have ":"
last_paragraph_line_count = 0
while len(commit_msg_lines) > 0 and _IsTagLine(commit_msg_lines[-1]):
last_paragraph_line_count += 1
commit_msg_lines.pop()
if last_paragraph_line_count == 0:
errors.append(
output_api.PresubmitError(
commit_tag +
"Please ensure that there are tags (e.g., Bug:, Test:) in your description."))
if len(commit_msg_lines) > 0:
if not _IsLineBlank(commit_msg_lines[-1]):
output_api.PresubmitError(commit_tag +
"Please ensure that there exists 1 blank line " +
"between tags and description body.")
else:
# pop the blank line between tag paragraph and description body
commit_msg_lines.pop()
if len(commit_msg_lines) > 0 and _IsLineBlank(commit_msg_lines[-1]):
errors.append(
output_api.PresubmitError(
commit_tag + 'Please ensure that there exists only 1 blank line '
'between tags and description body.'))
# pop all the remaining blank lines between tag and description body
_PopBlankLines(commit_msg_lines, True)
if len(commit_msg_lines) == 0:
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure that your description summary'
' and description body are not blank.'))
continue
if summary_linelength_warning_lower_limit <= len(commit_msg_lines[0]) \
<= summary_linelength_warning_upper_limit:
errors.append(
output_api.PresubmitPromptWarning(
commit_tag + "Your description summary should be on one line of " +
str(summary_linelength_warning_lower_limit - 1) + " or less characters."))
elif len(commit_msg_lines[0]) > summary_linelength_warning_upper_limit:
errors.append(
output_api.PresubmitError(
commit_tag + "Please ensure that your description summary is on one line of " +
str(summary_linelength_warning_lower_limit - 1) + " or less characters."))
commit_msg_lines.pop(0) # get rid of description summary
if len(commit_msg_lines) == 0:
continue
if not _IsLineBlank(commit_msg_lines[0]):
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure the summary is only 1 line and '
'there is 1 blank line between the summary '
'and description body.'))
else:
commit_msg_lines.pop(0) # pop first blank line
if len(commit_msg_lines) == 0:
continue
if _IsLineBlank(commit_msg_lines[0]):
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure that there exists only 1 blank line '
'between description summary and description body.'))
# pop all the remaining blank lines between
# description summary and description body
_PopBlankLines(commit_msg_lines)
# loop through description body
while len(commit_msg_lines) > 0:
line = commit_msg_lines.pop(0)
# lines starting with 4 spaces, quotes or lines without space(urls)
# are exempt from length check
if line.startswith(" ") or line.startswith("> ") or " " not in line:
continue
if len(line) > description_linelength_limit:
errors.append(
output_api.PresubmitError(
commit_tag + 'Line ' + str(commit_msg_line_numbers[line]) +
' is too long.\n' + '"' + line + '"\n' + 'Please wrap it to ' +
str(description_linelength_limit) + ' characters. ' +
"Lines without spaces or lines starting with 4 spaces are exempt."))
break
return errors
def _CheckChangeHasBugField(input_api, output_api):
"""Requires that the changelist have a Bug: field from a known project."""
bugs = input_api.change.BugsFromDescription()
if not bugs:
return [
output_api.PresubmitError('Please ensure that your description contains:\n'
'"Bug: angleproject:[bug number]"\n'
'directly above the Change-Id tag.')
]
# The bug must be in the form of "project:number". None is also accepted, which is used by
# rollers as well as in very minor changes.
if len(bugs) == 1 and bugs[0] == 'None':
return []
projects = [
'angleproject:', 'chromium:', 'dawn:', 'fuchsia:', 'skia:', 'swiftshader:', 'tint:', 'b/'
]
bug_regex = re.compile(r"([a-z]+[:/])(\d+)")
errors = []
extra_help = None
for bug in bugs:
if bug == 'None':
errors.append(
output_api.PresubmitError('Invalid bug tag "None" in presence of other bug tags.'))
continue
match = re.match(bug_regex, bug)
if match == None or bug != match.group(0) or match.group(1) not in projects:
errors.append(output_api.PresubmitError('Incorrect bug tag "' + bug + '".'))
if not extra_help:
extra_help = output_api.PresubmitError('Acceptable format is:\n\n'
' Bug: project:bugnumber\n\n'
'Acceptable projects are:\n\n ' +
'\n '.join(projects))
if extra_help:
errors.append(extra_help)
return errors
def _CheckCodeGeneration(input_api, output_api):
class Msg(output_api.PresubmitError):
"""Specialized error message"""
def __init__(self, message, **kwargs):
super(output_api.PresubmitError, self).__init__(
message,
long_text='Please ensure your ANGLE repositiory is synced to tip-of-tree\n'
'and all ANGLE DEPS are fully up-to-date by running gclient sync.\n'
'\n'
'If that fails, run scripts/run_code_generation.py to refresh generated hashes.\n'
'\n'
'If you are building ANGLE inside Chromium you must bootstrap ANGLE\n'
'before gclient sync. See the DevSetup documentation for more details.\n',
**kwargs)
code_gen_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
'scripts/run_code_generation.py')
cmd_name = 'run_code_generation'
cmd = [input_api.python3_executable, code_gen_path, '--verify-no-dirty']
test_cmd = input_api.Command(name=cmd_name, cmd=cmd, kwargs={}, message=Msg)
if input_api.verbose:
print('Running ' + cmd_name)
return input_api.RunTests([test_cmd])
# Taken directly from Chromium's PRESUBMIT.py
def _CheckNewHeaderWithoutGnChange(input_api, output_api):
"""Checks that newly added header files have corresponding GN changes.
Note that this is only a heuristic. To be precise, run script:
build/check_gn_headers.py.
"""
def headers(f):
return input_api.FilterSourceFile(f, files_to_check=(r'.+%s' % _HEADER_EXTENSIONS,))
new_headers = []
for f in input_api.AffectedSourceFiles(headers):
if f.Action() != 'A':
continue
new_headers.append(f.LocalPath())
def gn_files(f):
return input_api.FilterSourceFile(f, files_to_check=(r'.+\.gn',))
all_gn_changed_contents = ''
for f in input_api.AffectedSourceFiles(gn_files):
for _, line in f.ChangedContents():
all_gn_changed_contents += line
problems = []
for header in new_headers:
basename = input_api.os_path.basename(header)
if basename not in all_gn_changed_contents:
problems.append(header)
if problems:
return [
output_api.PresubmitPromptWarning(
'Missing GN changes for new header files',
items=sorted(problems),
long_text='Please double check whether newly added header files need '
'corresponding changes in gn or gni files.\nThis checking is only a '
'heuristic. Run build/check_gn_headers.py to be precise.\n'
'Read https://crbug.com/661774 for more info.')
]
return []
def _CheckExportValidity(input_api, output_api):
outdir = tempfile.mkdtemp()
# shell=True is necessary on Windows, as otherwise subprocess fails to find
# either 'gn' or 'vpython3' even if they are findable via PATH.
use_shell = input_api.is_windows
try:
try:
subprocess.check_output(['gn', 'gen', outdir], shell=use_shell)
except subprocess.CalledProcessError as e:
return [
output_api.PresubmitError(
'Unable to run gn gen for export_targets.py: %s' % e.output)
]
export_target_script = os.path.join(input_api.PresubmitLocalPath(), 'scripts',
'export_targets.py')
try:
subprocess.check_output(
['vpython3', export_target_script, outdir] + _PRIMARY_EXPORT_TARGETS,
stderr=subprocess.STDOUT,
shell=use_shell)
except subprocess.CalledProcessError as e:
if input_api.is_committing:
return [output_api.PresubmitError('export_targets.py failed: %s' % e.output)]
return [
output_api.PresubmitPromptWarning(
'export_targets.py failed, this may just be due to your local checkout: %s' %
e.output)
]
return []
finally:
shutil.rmtree(outdir)
def _CheckTabsInSourceFiles(input_api, output_api):
"""Forbids tab characters in source files due to a WebKit repo requirement."""
def implementation_and_headers_including_third_party(f):
# Check third_party files too, because WebKit's checks don't make exceptions.
return input_api.FilterSourceFile(
f,
files_to_check=(r'.+%s' % _IMPLEMENTATION_AND_HEADER_EXTENSIONS,),
files_to_skip=[f for f in input_api.DEFAULT_FILES_TO_SKIP if not "third_party" in f])
files_with_tabs = []
for f in input_api.AffectedSourceFiles(implementation_and_headers_including_third_party):
for (num, line) in f.ChangedContents():
if '\t' in line:
files_with_tabs.append(f)
break
if files_with_tabs:
return [
output_api.PresubmitError(
'Tab characters in source files.',
items=sorted(files_with_tabs),
long_text=
'Tab characters are forbidden in ANGLE source files because WebKit\'s Subversion\n'
'repository does not allow tab characters in source files.\n'
'Please remove tab characters from these files.')
]
return []
# https://stackoverflow.com/a/196392
def is_ascii(s):
return all(ord(c) < 128 for c in s)
def _CheckNonAsciiInSourceFiles(input_api, output_api):
"""Forbids non-ascii characters in source files."""
def implementation_and_headers(f):
return input_api.FilterSourceFile(
f, files_to_check=(r'.+%s' % _IMPLEMENTATION_AND_HEADER_EXTENSIONS,))
files_with_non_ascii = []
for f in input_api.AffectedSourceFiles(implementation_and_headers):
for (num, line) in f.ChangedContents():
if not is_ascii(line):
files_with_non_ascii.append("%s: %s" % (f, line))
break
if files_with_non_ascii:
return [
output_api.PresubmitError(
'Non-ASCII characters in source files.',
items=sorted(files_with_non_ascii),
long_text='Non-ASCII characters are forbidden in ANGLE source files.\n'
'Please remove non-ASCII characters from these files.')
]
return []
def _CheckCommentBeforeTestInTestFiles(input_api, output_api):
"""Require a comment before TEST_P() and other tests."""
def test_files(f):
return input_api.FilterSourceFile(
f, files_to_check=(r'^src/tests/.+\.cpp$', r'^src/.+_unittest\.cpp$'))
tests_with_no_comment = []
for f in input_api.AffectedSourceFiles(test_files):
diff = f.GenerateScmDiff()
last_line_was_comment = False
for line in diff.splitlines():
# Skip removed lines
if line.startswith('-'):
continue
new_line_is_comment = line.startswith(' //') or line.startswith('+//')
new_line_is_test_declaration = (
line.startswith('+TEST_P(') or line.startswith('+TEST(') or
line.startswith('+TYPED_TEST('))
if new_line_is_test_declaration and not last_line_was_comment:
tests_with_no_comment.append(line[1:])
last_line_was_comment = new_line_is_comment
if tests_with_no_comment:
return [
output_api.PresubmitError(
'Tests without comment.',
items=sorted(tests_with_no_comment),
long_text='ANGLE requires a comment describing what a test does.')
]
return []
def _CheckShaderVersionInShaderLangHeader(input_api, output_api):
"""Requires an update to ANGLE_SH_VERSION when ShaderLang.h or ShaderVars.h change."""
def headers(f):
return input_api.FilterSourceFile(
f,
files_to_check=(r'^include/GLSLANG/ShaderLang.h$', r'^include/GLSLANG/ShaderVars.h$'))
headers_changed = input_api.AffectedSourceFiles(headers)
if len(headers_changed) == 0:
return []
# Skip this check for reverts and rolls. Unlike
# _CheckCommitMessageFormatting, relands are still checked because the
# original change might have incremented the version correctly, but the
# rebase over a new version could accidentally remove that (because another
# change in the meantime identically incremented it).
git_output = input_api.change.DescriptionText()
multiple_commits = _SplitIntoMultipleCommits(git_output)
for commit in multiple_commits:
if commit.startswith('Revert') or commit.startswith('Roll'):
return []
diffs = '\n'.join(f.GenerateScmDiff() for f in headers_changed)
versions = dict(re.findall(r'^([-+])#define ANGLE_SH_VERSION\s+(\d+)', diffs, re.M))
if len(versions) != 2 or int(versions['+']) <= int(versions['-']):
return [
output_api.PresubmitError(
'ANGLE_SH_VERSION should be incremented when ShaderLang.h or ShaderVars.h change.',
)
]
return []
def _CheckGClientExists(input_api, output_api, search_limit=None):
presubmit_path = pathlib.Path(input_api.PresubmitLocalPath())
for current_path in itertools.chain([presubmit_path], presubmit_path.parents):
gclient_path = current_path.joinpath('.gclient')
if gclient_path.exists() and gclient_path.is_file():
return []
# search_limit parameter is used in unit tests to prevent searching all the way to root
# directory for reproducibility.
elif search_limit != None and current_path == search_limit:
break
return [
output_api.PresubmitError(
'Missing .gclient file.',
long_text=textwrap.fill(
width=100,
text='The top level directory of the repository must contain a .gclient file.'
' You can follow the steps outlined in the link below to get set up for ANGLE'
' development:') +
'\n\nhttps://chromium.googlesource.com/angle/angle/+/refs/heads/main/doc/DevSetup.md')
]
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CheckTabsInSourceFiles(input_api, output_api))
results.extend(_CheckNonAsciiInSourceFiles(input_api, output_api))
results.extend(_CheckCommentBeforeTestInTestFiles(input_api, output_api))
results.extend(_CheckShaderVersionInShaderLangHeader(input_api, output_api))
results.extend(_CheckCodeGeneration(input_api, output_api))
results.extend(_CheckChangeHasBugField(input_api, output_api))
results.extend(input_api.canned_checks.CheckChangeHasDescription(input_api, output_api))
results.extend(_CheckNewHeaderWithoutGnChange(input_api, output_api))
results.extend(_CheckExportValidity(input_api, output_api))
results.extend(
input_api.canned_checks.CheckPatchFormatted(
input_api, output_api, result_factory=output_api.PresubmitError))
results.extend(_CheckCommitMessageFormatting(input_api, output_api))
results.extend(_CheckGClientExists(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api):
return CheckChangeOnUpload(input_api, output_api)

View File

@@ -1,13 +0,0 @@
Name: ANGLE
URL: http://angleproject.org
Version: unknown
License: BSD
License File: LICENSE
Shipped: yes
Description:
The goal of ANGLE is to allow users of multiple operating systems
to seamlessly run WebGL and other OpenGL ES content by translating
OpenGL ES API calls to one of the hardware-supported APIs available
for that platform.

105
README.md
View File

@@ -1,105 +0,0 @@
# ANGLE - Almost Native Graphics Layer Engine
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other
OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available
for that platform. ANGLE currently provides translation from OpenGL ES 2.0, 3.0 and 3.1 to Vulkan,
desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Future plans include ES 3.2, translation to
Metal and MacOS, Chrome OS, and Fuchsia support.
### Level of OpenGL ES support via backing renderers
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan | Metal |
|----------------|:-------------:|:----------------:|:--------------:|:-------------:|:-------------:|:-------------:|
| OpenGL ES 2.0 | complete | complete | complete | complete | complete | complete |
| OpenGL ES 3.0 | | complete | complete | complete | complete | complete |
| OpenGL ES 3.1 | | [incomplete][ES31OnD3D] | complete | complete | complete | |
| OpenGL ES 3.2 | | | in progress | in progress | in progress | |
Additionally, OpenGL ES 1.1 is implemented in the front-end using OpenGL ES 3.0 features. This
version of the specification is thus supported on all platforms specified above that support OpenGL
ES 3.0 with [known issues][ES1].
[ES31OnD3D]: doc/ES31StatusOnD3D11.md
[ES1]: doc/ES1Status.md
### Platform support via backing renderers
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan | Metal |
|-------------:|:--------------:|:--------------:|:-------------:|:-----------:|:-----------:|:--------------------:|
| Windows | complete | complete | complete | complete | complete | |
| Linux | | | complete | | complete | |
| Mac OS X | | | complete | | | complete [1] |
| iOS | | | | | | complete [2] |
| Chrome OS | | | | complete | planned | |
| Android | | | | complete | complete | |
| GGP (Stadia) | | | | | complete | |
| Fuchsia | | | | | complete | |
[1] Metal is supported on macOS 10.14+
[2] Metal is supported on iOS 12+
ANGLE v1.0.772 was certified compliant by passing the OpenGL ES 2.0.3 conformance tests in October 2011.
ANGLE has received the following certifications with the Vulkan backend:
* OpenGL ES 2.0: ANGLE 2.1.0.d46e2fb1e341 (Nov, 2019)
* OpenGL ES 3.0: ANGLE 2.1.0.f18ff947360d (Feb, 2020)
* OpenGL ES 3.1: ANGLE 2.1.0.f5dace0f1e57 (Jul, 2020)
ANGLE also provides an implementation of the EGL 1.5 specification.
ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Firefox on Windows
platforms. Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated
Canvas2D implementation and the Native Client sandbox environment.
Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL
implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of
the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders
are accepted across browsers and platforms. The shader translator can be used to translate shaders
to other shading languages, and to optionally apply shader modifications to work around bugs or
quirks in the native graphics drivers. The translator targets Desktop GLSL, Vulkan GLSL, Direct3D
HLSL, and even ESSL for native GLES2 platforms.
## Sources
ANGLE repository is hosted by Chromium project and can be
[browsed online](https://chromium.googlesource.com/angle/angle) or cloned with
git clone https://chromium.googlesource.com/angle/angle
## Building
View the [Dev setup instructions](doc/DevSetup.md).
## Contributing
* Join our [Google group](https://groups.google.com/group/angleproject) to keep up to date.
* Join us on [Slack](https://chromium.slack.com) in the #angle channel. You can
follow the instructions on the [Chromium developer page](https://www.chromium.org/developers/slack)
for the steps to join the Slack channel. For Googlers, please follow the
instructions on this [document](https://docs.google.com/document/d/1wWmRm-heDDBIkNJnureDiRO7kqcRouY2lSXlO6N2z6M/edit?usp=sharing)
to use your google or chromium email to join the Slack channel.
* [File bugs](http://anglebug.com/new) in the [issue tracker](https://bugs.chromium.org/p/angleproject/issues/list) (preferably with an isolated test-case).
* [Choose an ANGLE branch](doc/ChoosingANGLEBranch.md) to track in your own project.
* Read ANGLE development [documentation](doc).
* Look at [pending](https://chromium-review.googlesource.com/q/project:angle/angle+status:open)
and [merged](https://chromium-review.googlesource.com/q/project:angle/angle+status:merged) changes.
* Become a [code contributor](doc/ContributingCode.md).
* Use ANGLE's [coding standard](doc/CodingStandard.md).
* Learn how to [build ANGLE for Chromium development](doc/BuildingAngleForChromiumDevelopment.md).
* Get help on [debugging ANGLE](doc/DebuggingTips.md).
* Go through [ANGLE's orientation](doc/Orientation.md) and sift through [starter projects](https://bugs.chromium.org/p/angleproject/issues/list?q=Hotlist%3DStarterBug). If you decide to take on any task, write a comment so you can get in touch with us, and more importantly, set yourself as the "owner" of the bug. This avoids having multiple people accidentally working on the same issue.
* Read about WebGL on the [Khronos WebGL Wiki](http://khronos.org/webgl/wiki/Main_Page).
* Learn about the initial ANGLE implementation details in the [OpenGL Insights chapter on ANGLE](http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-ANGLE.pdf) (this is not the most up-to-date ANGLE implementation details, it is listed here for historical reference only) and this [ANGLE presentation](https://drive.google.com/file/d/0Bw29oYeC09QbbHoxNE5EUFh0RGs/view?usp=sharing&resourcekey=0-CNvGnQGgFSvbXgX--Y_Iyg).
* Learn about the past, present, and future of the ANGLE implementation in [this presentation](https://docs.google.com/presentation/d/1CucIsdGVDmdTWRUbg68IxLE5jXwCb2y1E9YVhQo0thg/pub?start=false&loop=false).
* Watch a [short presentation](https://youtu.be/QrIKdjmpmaA) on the Vulkan back-end.
* Track the [dEQP test conformance](doc/dEQP-Charts.md)
* Read design docs on the [Vulkan back-end](src/libANGLE/renderer/vulkan/README.md)
* Read about ANGLE's [testing infrastructure](infra/README.md)
* View information on ANGLE's [supported extensions](doc/ExtensionSupport.md)
* If you use ANGLE in your own project, we'd love to hear about it!

View File

@@ -1,25 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Watchlist Rules
# Refer: http://dev.chromium.org/developers/contributing-code/watchlists
# IMPORTANT: The regular expression filepath is tested against each path using
# re.search, so it is not usually necessary to add .*.
{
'WATCHLIST_DEFINITIONS': {
'vulkan': {
'filepath': 'src/libANGLE/renderer/vulkan/',
},
},
##############################################################################
# Please keep alphabetical
##############################################################################
'WATCHLISTS': {
'vulkan': ['cclao+angleWatchVk@google.com',
'jmadill+watch@chromium.org'],
},
}

View File

@@ -1,4 +0,0 @@
[
"src/common/third_party/xxhash",
"src/libANGLE/renderer/vulkan/shaders/src/third_party/ffx_spd"
]

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.android.angle">
<application android:allowBackup="false"
android:label="com.android.angle"
android:extractNativeLibs="false"
android:forceQueryable="true"
android:multiArch="true">
<activity android:name="com.android.angle.EmptyMainActivity"
android:label="Empty Main Activity"
android:visibleToInstantApps="true"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.INFO"/>
</intent-filter>
<!-- Indicate that this PKG is ANGLE. -->
<intent-filter android:priority="1">
<action android:name="android.app.action.ANGLE_FOR_ANDROID" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="{{manifest_package|default('org.chromium.angle')}}">
<application android:label="Angle for Android"
android:extractNativeLibs="{{extract_native_libs|default('false')}}"
android:multiArch="true">
</application>
</manifest>

View File

@@ -1,2 +0,0 @@
cnorthrop@google.com
ianelliott@google.com

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2023 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<permissions>
<privapp-permissions package="com.android.angle">
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
</privapp-permissions>
</permissions>

View File

@@ -1,111 +0,0 @@
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("../gni/angle.gni")
vulkan_validation_layers = [ "VkLayer_khronos_validation" ]
angle_libraries = [
"libEGL",
"libGLESv1_CM",
"libGLESv2",
"libfeature_support",
]
if (enable_java_templates) {
template("angle_apk") {
manifest_target_name = "${target_name}__manifest"
manifest_path =
"${target_gen_dir}/${target_name}/android/AndroidManifest.xml"
jinja_template(manifest_target_name) {
input = "${angle_root}/android/AndroidManifest.xml.jinja2"
output = manifest_path
variables = [
"manifest_package=${invoker.package_name}",
"extract_native_libs=${angle_extract_native_libs}",
]
}
android_assets("${invoker.package_name}_assets") {
disable_compression = true
sources = [ "src/feature_support_util/a4a_rules.json" ]
}
android_apk(target_name) {
forward_variables_from(invoker, "*")
android_manifest = manifest_path
android_manifest_dep = ":$manifest_target_name"
version_code = invoker.version_code
version_name = invoker.version_name
min_sdk_version = 26
target_sdk_version = 28
deps = [ ":${invoker.package_name}_assets" ]
if (symbol_level != 0) {
deps += [ ":compressed_symbols" ]
if (android_64bit_target_cpu &&
defined(android_secondary_abi_toolchain)) {
deps += [ ":compressed_symbols($android_secondary_abi_toolchain)" ]
}
}
if (android_64bit_target_cpu &&
defined(android_secondary_abi_toolchain)) {
if (symbol_level == 0) {
secondary_abi_shared_libraries = []
foreach(_library, angle_libraries) {
secondary_abi_shared_libraries +=
[ "$angle_root:${_library}($android_secondary_abi_toolchain)" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" +
"($android_secondary_abi_toolchain)" ]
}
}
} else {
_secondary_out_dir = get_label_info(
":compressed_symbols($android_secondary_abi_toolchain)",
"root_out_dir")
secondary_abi_loadable_modules = []
foreach(_library, angle_libraries) {
secondary_abi_loadable_modules += [ "$_secondary_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_loadable_modules += [ "${_secondary_out_dir}/lib.compressed/lib${_layer}${shlib_extension}" ]
}
}
}
}
if (symbol_level == 0) {
shared_libraries = []
foreach(_library, angle_libraries) {
shared_libraries += [ "$angle_root:$_library" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" ]
}
}
} else {
loadable_modules = []
foreach(_library, angle_libraries) {
loadable_modules += [ "$root_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
loadable_modules += [
"$root_out_dir/lib.compressed/lib${_layer}${shlib_extension}",
]
}
}
}
}
}
}

View File

@@ -1,98 +0,0 @@
#!/usr/bin/env python
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Generate library file with compressed symbols per Android build
# process.
# https://www.ece.villanova.edu/VECR/doc/gdb/MiniDebugInfo.html
import argparse
import subprocess
import sys
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
'--objcopy', required=True, help='The objcopy binary to run', metavar='PATH')
parser.add_argument('--nm', required=True, help='The nm binary to run', metavar='PATH')
parser.add_argument('--strip', required=True, help='The strip binary to run', metavar='PATH')
parser.add_argument(
'--output', required=True, help='Final output shared object file', metavar='FILE')
parser.add_argument(
'--unstrippedsofile',
required=True,
help='Unstripped shared object file produced by linking command',
metavar='FILE')
args = parser.parse_args()
copy_cmd = ["cp", args.unstrippedsofile, args.output]
result = subprocess.call(copy_cmd)
nm_cmd = subprocess.Popen([args.nm, '-D', args.output, '--format=posix', '--defined-only'],
stdout=subprocess.PIPE)
awk_cmd = subprocess.Popen(['awk', '{ print $1}'], stdin=nm_cmd.stdout, stdout=subprocess.PIPE)
dynsym_out = open(args.output + '.dynsyms', 'w')
sort_cmd = subprocess.Popen(['sort'], stdin=awk_cmd.stdout, stdout=dynsym_out)
sort_cmd.wait()
dynsym_out.close()
funcsyms_out = open(args.output + '.funcsyms', 'w')
nm_cmd = subprocess.Popen([args.nm, args.output, '--format=posix', '--defined-only'],
stdout=subprocess.PIPE)
awk_cmd = subprocess.Popen(['awk', '{ if ($2 == "T" || $2 == "t" || $2 == "D") print $1 }'],
stdin=nm_cmd.stdout,
stdout=subprocess.PIPE)
sort_cmd = subprocess.Popen(['sort'], stdin=awk_cmd.stdout, stdout=funcsyms_out)
sort_cmd.wait()
funcsyms_out.close()
keep_symbols = open(args.output + '.keep_symbols', 'w')
comm_cmd = subprocess.Popen(
['comm', '-13', args.output + '.dynsyms', args.output + '.funcsyms'], stdout=keep_symbols)
comm_cmd.wait()
# Ensure that the keep_symbols file is not empty.
keep_symbols.write("\n")
keep_symbols.close()
objcopy_cmd = [args.objcopy, '--only-keep-debug', args.output, args.output + '.debug']
subprocess.check_call(objcopy_cmd)
objcopy_cmd = [
args.objcopy, '-S', '--remove-section', '.gdb_index', '--remove-section', '.comment',
'--keep-symbols', args.output + '.keep_symbols', args.output + '.debug',
args.output + '.mini_debuginfo'
]
subprocess.check_call(objcopy_cmd)
strip_cmd = [args.strip, '--strip-all', '-R', '.comment', args.output]
subprocess.check_call(strip_cmd)
xz_cmd = ['xz', '-f', args.output + '.mini_debuginfo']
subprocess.check_call(xz_cmd)
objcopy_cmd = [
args.objcopy, '--add-section', '.gnu_debugdata=' + args.output + '.mini_debuginfo.xz',
args.output
]
subprocess.check_call(objcopy_cmd)
# Clean out scratch files
rm_cmd = [
'rm', '-f', args.output + '.dynsyms', args.output + '.funcsyms',
args.output + '.keep_symbols', args.output + '.debug', args.output + '.mini_debuginfo',
args.output + '.mini_debuginfo.xz'
]
result = subprocess.call(rm_cmd)
return result
if __name__ == "__main__":
sys.exit(main())

View File

@@ -1,25 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Override for angle_root
angle_root = "//"
# True if ANGLE can access build/, testing/ and other Chrome folders.
angle_has_build = true
# Declares the maximum supported VulkanMemoryAllocator version by the client
# in format AAABBBCCC, where AAA = major, BBB = minor, CCC = patch.
# The VulkanMemoryAllocator version may be found in its CHANGELOG.md.
angle_vma_version = 2003000
# Overrides for ANGLE's dependencies
angle_abseil_cpp_dir = "//third_party/abseil-cpp"
angle_glslang_dir = "//third_party/vulkan-deps/glslang/src"
angle_googletest_dir = "//third_party/googletest/src"
angle_jsoncpp_dir = "//third_party/jsoncpp"
angle_libjpeg_turbo_dir = "//third_party/libjpeg_turbo"
angle_libpng_dir = "//third_party/libpng"
angle_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
angle_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
angle_vulkan_memory_allocator_dir = "//third_party/vulkan_memory_allocator"

View File

@@ -1,61 +0,0 @@
# Copyright 2017 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
build_with_chromium = false
ignore_elf32_limitations = true
use_system_xcode = ""
# If true, it assumes that //third_party/abseil-cpp is an available
# dependency for googletest.
gtest_enable_absl_printers = false
}
if (host_os == "mac" && use_system_xcode == "") {
_result = exec_script("//build/mac/should_use_hermetic_xcode.py",
[ target_os ],
"value")
assert(_result != 2,
"Do not allow building targets with the default" +
"hermetic toolchain if the minimum OS version is not met.")
assert(_result != 3,
"iOS does not support building with a hermetic toolchain. " +
"Please install Xcode.")
use_system_xcode = _result != 1
}
enable_java_templates = true
# Build with fewer Android dependencies
limit_android_deps = true
# Standalone ANGLE is used in places that are extremely performance sensitive,
# such as the system graphics driver on Android. ANGLE validates arguments at
# the API boundary and assumes that all bounds, et cetera are valid elsewhere
# in internal code.
#
# Unfortunately, this means the compiler cannot optimize out the vast majority
# of hardening checks. To ensure performance remains competitive, drop the
# libc++ hardening checks, since ANGLE already makes no security guarantees in
# these situations.
if (is_win) {
# TODO(https://crbug.com/1418717): ANGLE uses Chromium's abseil-cpp directory.
# Since Abseil does not mark symbols as exported, Chromium uses an alternate
# approach to scrape the symbols that need to be exported and generates .def
# files that the ANGLE build reuses.
#
# However, these symbol names include libc++ types, and libc++ hardening
# affects ABI, so ANGLE and Chromium's libc++ hardening modes need to remain
# in sync on Windows. This is a bit of a hack but "OK" since the performance
# concerns for standalone ANGLE builds are not relevant on Windows.
enable_safe_libcxx = true
} else if (is_linux) {
# https://anglebug.com/8040: turning off safe_libcxx breaks TSAN
enable_safe_libcxx = true
} else {
enable_safe_libcxx = false
}

View File

@@ -1,10 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Paths to glslang dependencies in ANGLE
glslang_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
# Reduce glslang's features to what the Vulkan backend of ANGLE uses. This both speeds up glslang's
# initialization and reduces binary footprint.
glslang_angle = true

View File

@@ -1,17 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Override settings for third_party integration with Google Test.
# Exclude support for registering main function in multi-process tests.
gtest_include_multiprocess = true
# Exclude support for platform-specific operations across unit tests.
gtest_include_platform_test = true
# Exclude support for testing Objective C code on OS X and iOS.
gtest_include_objc_support = true
# Exclude support for flushing coverage files on iOS.
gtest_include_ios_coverage = true

View File

@@ -1,10 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We are building inside ANGLE
spirv_tools_standalone = false
# Paths to SPIRV-Tools dependencies in ANGLE
spirv_tools_googletest_dir = "//third_party/googletest/src"
spirv_tools_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"

View File

@@ -1,9 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We are building SwiftShader in ANGLE
swiftshader_standalone = false
# Path to SwiftShader
swiftshader_dir = "//third_party/SwiftShader"

View File

@@ -1,13 +0,0 @@
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//gni/angle.gni")
vulkan_headers_dir = angle_vulkan_headers_dir
vulkan_data_subdir = angle_data_dir
vulkan_gen_subdir = "angle/vulkan"
vulkan_use_x11 = angle_use_x11
vulkan_use_wayland = angle_use_wayland

View File

@@ -1,5 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -1,7 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")
vulkan_loader_shared = angle_shared_libvulkan

View File

@@ -1,5 +0,0 @@
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -1,5 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -1,9 +0,0 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")
vvl_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
vvl_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
vvl_glslang_dir = "//third_party/vulkan-deps/glslang/src"

View File

@@ -1,11 +0,0 @@
# Copyright 2022 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//gni/angle.gni")
# Path to Wayland sources
wayland_dir = angle_wayland_dir
# ANGLE standalone has no Wayland GN
wayland_gn_dir = ""

View File

@@ -1,6 +0,0 @@
# This file is used by git cl to get repository specific information.
CODE_REVIEW_SERVER: https://chromium-review.googlesource.com
GERRIT_HOST: True
TRYSERVER_GERRIT_URL: https://chromium-review.googlesource.com
GERRIT_SQUASH_UPLOADS: False
FORMAT_FULL_BY_DEFAULT: True

View File

@@ -1,15 +0,0 @@
# 64-bit Safety In the Compiler
An issue that has arisen recently for contributors making changes to the GLSL ES
grammar files has been that certain versions of flex, the lexer on which ANGLE
relies, produce outputs which are not safe in 64-bit builds.
To address this issue, ANGLE has added a step to its generation scripts to apply
64-bit safety fixes to newly regenerated outputs. This should be unnoticeable to
developers invoking flex via the generate\_parser.sh scripts in the relevant
compiler directories, as the fixes will be applied by the patch utility as part
of that script.
When making code contributions that affect the grammar files, please ensure that
you've generated the outputs using the script, to make certain that the 64-bit
safety fixes are applied.

View File

@@ -1,46 +0,0 @@
# Introduction
This page describes how to add new extensions to ANGLE.
# Adding EGL extensions
Note: see also [anglebug.com/2621](http://anglebug.com/2621), linked
from the [starter project](Starter-Projects.md) doc, to simplify some
of these steps.
For extensions requiring new entry points:
* Add the extension xml to
[scripts/egl_angle_ext.xml](../scripts/egl_angle_ext.xml) .
* Note the prototypes for the new entry points must be added to the
top of the file, and the functions themselves grouped under the
extension name to the bottom of the file.
* Modify [scripts/registry_xml.py](../scripts/registry_xml.py) to add
the new extension as needed.
* Run
[scripts/run_code_generation.py](../scripts/run_code_generation.py)
.
* The entry point itself goes in
[entry_points_egl_ext.h](../src/libGLESv2/entry_points_egl_ext.h)
and
[entry_points_egl_ext.cpp](../src/libGLESv2/entry_points_egl_ext.cpp)
.
* Add the new function to [libEGL.cpp](../src/libEGL/libEGL.cpp) and
[libEGL.def](../src/libEGL/libEGL.def) .
* Update [eglext_angle.h](../include/EGL/eglext_angle.h) with the new
entry points and/or enums.
* Add members to the appropriate Extensions struct in
[Caps.h](../src/libANGLE/Caps.h) and
[Caps.cpp](../src/libANGLE/Caps.cpp) .
* Initialize extension availability in the `Display` subclass's
`generateExtensions` method for displays that can support the
extension; for example,
[DisplayCGL](../src/libANGLE/renderer/gl/cgl/DisplayCGL.mm).

View File

@@ -1,97 +0,0 @@
# How to Branch and Roll Chromium's ANGLE Dependency
ANGLE provides an implementation of OpenGL ES on top of other APIs (e.g. DirectX11, Vulkan). ANGLE
uses (i.e. depends upon) other third-party software that comes from different repositories. ANGLE specifies
its dependencies on a specific version of each of these other repositories in the [ANGLE DEPS file](https://chromium.googlesource.com/angle/angle/+/main/DEPS).
Chromium relies upon ANGLE for hardware accelerated rendering and WebGL support. Chromium similarly
specifies its dependency on a specific version of ANGLE in the [Chromium repository's src/DEPS file](http://src.chromium.org/viewvc/chrome/trunk/src/DEPS).
This document describes how to update those dependencies, and, if necessary, create an ANGLE branch
to correspond to a branched release of Chrome.
ANGLE's commit queue also runs browser-level tests which are hosted in
the Chromium repository. To reduce the chance of a Chromium-side
change breaking ANGLE's CQ, the version of Chromium against which
ANGLE changes is also snapshotted, and rolled forward into ANGLE with
appropriate testing.
## Autorollers
At present, autorollers manage both the ANGLE roll into Chromium, and
the Chromium roll into ANGLE. There is also an autoroller for ANGLE into [Android AOSP](https://android.googlesource.com/platform/external/angle/).
All of the ANGLE-related autorollers are documented in the [ANGLE Wrangling documentation](../infra/ANGLEWrangling.md#the-auto-rollers).
## Manually rolling DEPS
As mentioned above, dependencies are encoded in `DEPS` files. The process to update a given
dependency is as follows:
* Find the appropriate line in the relevant `DEPS` file that defines the dependency
* Change the [git SHA-1 revision number](http://git-scm.com/book/ch6-1.html) to be that of the commit
on which to depend upon (Note: use the full SHA-1, not a
shortened version)
* You can find the SHA-1 for a particular commit with `git log` on the appropriate branch of the
repository, or via a public repository viewer
* If using the [ANGLE public repository viewer](https://chromium.googlesource.com/angle/angle), you will need to select the branch whose log you
wish to view from the list on the left-hand side, and then click on the "tree" link at the top of
the resulting page. Alternatively, you can navigate to
`https://chromium.googlesource.com/angle/angle/+/<branch name>/` --
including the terminating forward slash. (e.g.
`https://chromium.googlesource.com/angle/angle/+/main/`)
### Rolling Vulkan Memory Allocator (VMA)
ANGLE and other Google projects (e.g. Skia, Chrome) use the open-source [Vulkan Memory Allocator][vma-upstream] (VMA)
library. As with with other external repositories, these projects do not directly use the [upstream Vulkan Memory Allocator][vma-upstream] repository.
Instead, a [Google-local repository][vma-chrome] is used, which contains Google-local changes and fixes (e.g. changes
to `BUILD.gn`). This Google-local repository repository contains the following key branches:
- `upstream/master` is automatically mirrored with the contents of the [upstream VMA][vma-upstream] repository
- `main` is manually curated by Google, with a combination of upstream and Google-local changes
ANGLE's `DEPS` file points to a git SHA-1 revision of the `main` branch.
Manual rolls of the `main` branch currently involve rebasing all of the Google-local changes on top of newer upstream changes. The current process (done in 2022) is to:
* Revert all of the Google-local changes (i.e. with a single commit)
* Merge or cherry-pick all of the upstream changes
* Cherry-pick the Google-local changes on top
* Note: it may be possible to simply merge future upstream changes directly, without reverting the Google-local changes
Manual rolls of which SHA-1 revision the ANGLE's `DEPS` file points to is done via the process
outlined above. Within an ANGLE build, you can navigate to the `third_party/vulkan_memory_allocator`
directory, check out the `main` branch, and use `git log` to select the desired Git revision.
**Please note** that cross-project coordination may be required when rolling VMA, as some projects (e.g. Chrome) builds itself with a single VMA version across Chrome, ANGLE, and Skia.
[vma-upstream]: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
[vma-chrome]: https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
Note: When ANGLE is AutoRolled to the Android AOSP source tree, Google-local
changes to the VMA `BUILD.gn` file will be converted to the ANGLE `Android.bp` file.
## Branching ANGLE
Sometimes, individual changes to ANGLE are needed for a release of Chrome which
has already been branched. If this is the case, a branch of ANGLE should be
created to correspond to the Chrome release version, so that Chrome may
incorporate only these changes, and not everything that has been committed since
the version on which Chrome depended at branch time. **Please note: Only ANGLE
admins can create a new branch.** To create a branch of ANGLE for a branched
Chrome release:
* Determine what the ANGLE dependency is for the Chrome release
by checking the DEPS file for that branch.
* Check out this commit as a new branch in your local repository.
* e.g., for [the Chrome 34 release at
chrome/branches/1847](http://src.chromium.org/viewvc/chrome/branches/1847/src/DEPS),
the ANGLE version is 4df02c1ed5e97dd54576b06964b1da67ea30238e. To
check this commit out locally and create a new branch named 'mybranch'
from this commit, use: ```git checkout -b mybranch
4df02c1ed5e97dd54576b06964b1da67ea30238e```
* To create this new branch in the public repository, you'll need to push the
branch to the special Gerrit reference location, 'refs/heads/<branch name>'. You
must be an ANGLE administrator to be able to push this new branch.
* e.g., to use your local 'mybranch' to create a branch in the public repository called
'chrome\_m34', use: ```git push origin mybranch:refs/heads/chrome_m34```
* The naming convention that ANGLE uses for its release-dedicated branches is 'chrome\_m##'.

View File

@@ -1,122 +0,0 @@
# Introduction
Since Direct3D 9 only supports buffers that either contain vertex or index data,
and OpenGL buffers can contain both, ANGLE waits till a draw call is issued to
determine which resources to create/update. The generic implementation 'streams'
the data into global vertex and index buffers. This streaming buffer
implementation works in all circumstances, but does not offer optimal
performance. When buffer data isn't updated, there's no reason to copy the data
again. For these cases a 'static' buffer implementation is used.
The OpenGL ES 2.0 glBufferData() function allows to specify a usage hint
parameter (GL\_STREAM\_DRAW, GL\_DYNAMIC\_DRAW or GL\_STATIC\_DRAW). Both
GL\_STREAM\_DRAW and GL\_DYNAMIC\_DRAW use the streaming buffer implementation.
With the GL\_STATIC\_DRAW hint, ANGLE will attempt to use the static buffer
implementation. If you update the buffer data after it has already been used in
a draw call, it falls back to the streaming buffer implementation, because
updating static ones would involve creating new ones, which is slower than
updating streaming ones (more on this later).
Because some applications use GL\_STREAM\_DRAW or GL\_DYNAMIC\_DRAW even when
the data is not or very infrequently updated, ANGLE also has a heuristic to
promote buffers to use the static implementation.
# Streaming buffers
The streaming buffers implementation uses one Context-global vertex buffer
(VertexDataManager::mStreamingBuffer) and two index buffers
(IndexDataManager::mStreamingBufferShort and
IndexDataManager::mStreamingBufferInt). The streaming behavior is achieved by
writing new data behind previously written data (i.e. without overwriting old
data). Direct3D 9 allows to efficiently update vertex and index buffers when
you're not reading or overwriting anything (it won't stall waiting for the GPU
finish using it).
When the end of these streaming buffers is reached, they are 'recycled' by
discarding their content. D3D9 will still keep a copy of the data that's in use,
so this recycling efficiently renames the driver level buffers. ANGLE can then
write new data to the beginning of the vertex or index buffer.
The ArrayVertexBuffer::mWritePosition variable holds the current end position of
the last data that was written. StreamingVertexBuffer::reserveRequiredSpace()
allocates space to write the data, and StreamingVertexBuffer::map() actually
locks the D3D buffer and updates the write position. Similar for index buffers.
# Static buffers
Each GL buffer object can have a corresponding static vertex or index buffer
(Buffer::mVertexBuffer and Buffer::mIndexBuffer). When a GL buffer with static
usage is used in a draw call for the first time, all of its data is converted to
a D3D vertex or index buffer, based on the attribute or index formats
respectively. If a subsequent draw call uses different formats, the static
buffer is invalidated (deleted) and the streaming buffer implementation is used
for this buffer object instead. So for optimal performance it's important to
store only a single format of vertices or indices in a buffer. This is highly
typical, and even when in some cases it falls back to the streaming buffer
implementation the performance isn't bad at all.
The StreamingVertexBuffer and StaticVertexBuffer classes share a common base
class, ArrayVertexBuffer. StaticVertexBuffer also has access to the write
position, but it's used only for the initial conversion of the data. So the
interfaces of both classes are not that different. Static buffers have an exact
size though, and can't be changed afterwards (streaming buffers can grow to
handle draw calls which use more data, and avoid excessive recycling).
StaticVertexBuffer has a lookupAttribute() method to retrieve the location of a
certain attribute (this is also used to verify that the formats haven't changed,
which would result in invalidating the static buffer). The descriptions of all
the attribute formats a static buffer contains are stored in the
StaticVertexBuffer::mCache vector.
StaticIndexBuffer also caches information about what's stored in them, namely
the minimum and maximum value for certain ranges of indices. This information is
required by the Direct3D 9 draw calls, and is also used to know the range of
vertices that need to be copied to the streaming vertex buffer in case it needs
to be used (e.g. it is not uncommon to have a buffer with static vertex position
data and a buffer with streaming texture coordinate data for skinning).
# Constant attributes
Aside from using array buffers to feed attribute data to the vertex shader,
OpenGL also supports attributes which remain constant for all vertices used in a
draw call. Direct3D 9 doesn't have a similar concept, at least not explicitly.
Constant attributes are implemented using separate (static) vertex buffers,
and uses a stride of 0 to ensure that every vertex retrieves the same data.
Using a stride of 0 is not possible with streaming buffers because on some
hardware it is incompatible with the D3DUSAGE\_DYNAMIC flag. We found that with
static usage, all hardware tested so far can handle stride 0 fine.
This functionality was implemented in a ConstantVertexBuffer class, and it
integrates nicely with the rest of the static buffer implementation.
# Line loops
Direct3D 9 does not support the 'line loop' primitive type directly. This is
implemented by drawing the 'closing' line segment separately, constructing a
tiny temporary index buffer connecting the last and first vertex.
# Putting it all together
glDrawElements() calls IndexDataManager::prepareIndexData() to retrieve a
Direct3D index buffer containing the necessary data. If an element array is used
(i.e. a buffer object), it has static usage, and it hasn't been invalidated, the
GL buffer's static D3D index buffer will be returned. Else the updated streaming
index buffer is returned, as well as the index offset (write position) where the
new data is located. When prepareIndexData() does find a static index buffer,
but it's empty, it means the GL buffer's data hasn't been converted and stored
in the D3D index buffer yet. So in the convertIndices() call it will convert the
entire buffer. prepareIndexData() will also look up the min/max value of a range
of indices, or computes it when not already in the static buffer or when a
streaming buffer is used.
Similarly, both glDrawElements() and glDrawArrays() both call
VertexDataManager::prepareVertexData() to retrieve a set of Direct3D vertex
buffers and their translated format and offset information. It's implementation
is more complicated than prepareIndexData() because buffer objects can contain
multiple vertex attributes, and multiple buffers can be used as input to the
vertex shader. So first it accumulates how much storage space is required for
each of the buffers in use. For all static non-empty buffers in use, it
determines whether the stored attributes still match what is required by the
draw call, and invalidates them if not (at which point more space is allocated
in the streaming buffer). Converting the GL buffer object's data into D3D
compatible vertex formats is still done by specialized template functions.

View File

@@ -1,66 +0,0 @@
# How to build ANGLE in Chromium for dev
## Introduction
On Windows, Linux, and Mac ANGLE now builds most core components cross platform, including the shader validator and translator as well as the graphics API translator. These parts can be built and tested inside a Chromium checkout.
ANGLE also includes some sample applications and a few other targets that don't build on Chromium. These steps describe how to build such targets within a Chromium checkout.
Prerequisite Steps:
* Checkout and build [Chromium](http://dev.chromium.org/Home).
* To setup run these commands (note similarity to [DevSetup](DevSetup.md)):
## Standalone ANGLE inside Chromium
* To sync all standalone dependencies run:
```bash
cd src/third_party/angle
python3 scripts/bootstrap.py
gclient sync
```
* To generate ANGLE standalone build files run:
```bash
cd src/third_party/angle
gn gen out/Debug
```
* To build:
```bash
cd src/third_party/angle
ninja -j 10 -k1 -C out/Debug
```
* For example, `ninja -j 10 -k1 -C out/Debug angle_gles2_deqp_tests`
* To run a sample application: `./out/Debug/hello_triangle`
* To go back to the Chromium-managed version, remove `third_party/angle/.gclient`.
## Working with ANGLE in Chromium
You will also want to work with a local version of ANGLE instead of the version that is pulled in by Chromium's [DEPS](https://chromium.googlesource.com/chromium/src/+/main/DEPS) file. To do this do the following:
* cd to `chromium/`. One directory above `chromium/src`. Add this to `chromium/.gclient`:
```python
solutions = [
{
# ...
u'custom_deps':
{
"src/third_party/angle": None,
},
},
]
```
You will have full control over your ANGLE workspace and are responsible for running all git commands (pull, rebase, etc.) for managing your branches.
If you decide you need to go back to the DEPS version of ANGLE:
* Comment out or remove the `src/third_party/angle` line in your `custom_deps` in `chomium/.gclient`.
* Se the ANGLE workspace to the version specified in Chromium's DEPS. Ensure there are no modified or new files.
* `gclient sync` your Chromium workspace.

View File

@@ -1,245 +0,0 @@
# ANGLE OpenGL Frame Capture and Replay
ANGLE currently supports a limited OpenGL capture and replay framework.
Limitations:
* GLES capture has many unimplemented functions.
* EGL capture and replay is not yet supported.
* Mid-execution capture is supported with the Vulkan back-end.
* Mid-execution capture has many unimplemented features.
* Capture and replay is currently only tested on desktop platforms.
* Binary replay is unimplemented. CPP replay is supported.
## Capturing and replaying an application
To build ANGLE with capture and replay enabled update your GN args:
```
angle_with_capture_by_default = true
```
Once built with capture enabled by default, ANGLE supports capturing OpenGL ES calls to CPP replay
files. To enable capture, set the `ANGLE_CAPTURE_FRAME_START` and `ANGLE_CAPTURE_FRAME_END`
environment variables to define a capture frame range, or use the [capture trigger
property][CaptureTrigger] on Android. By default the replay will be stored in the current working
directory. The capture files will be named according to the pattern
`angle_capture_context{id}_frame{n}.cpp`. Each GL Context currently has its own replay sources.
ANGLE will write out data binary blobs for large Texture or Buffer contents to
`angle_capture_context{id}_frame{n}.angledata`. Replay programs must be able to load data from the
corresponding `angledata` files.
## Controlling Frame Capture
Some simple environment variables control frame capture:
* `ANGLE_CAPTURE_ENABLED`:
* Set to `0` to disable capture entirely. Default is `1`.
* `ANGLE_CAPTURE_COMPRESSION`:
* Set to `0` to disable capture compression. Default is `1`.
* `ANGLE_CAPTURE_OUT_DIR=<path>`:
* Can specify an alternate replay output directory.
* Example: `ANGLE_CAPTURE_OUT_DIR=samples/capture_replay`. Default is the CWD.
* `ANGLE_CAPTURE_FRAME_START=<n>`:
* Uses mid-execution capture to write "Setup" functions that starts a Context at frame `n`.
* Example: `ANGLE_CAPTURE_FRAME_START=2`. Default is `0`.
* `ANGLE_CAPTURE_FRAME_END=<n>`:
* Example: `ANGLE_CAPTURE_FRAME_END=4`. Default is `0` which disables capture.
* `ANGLE_CAPTURE_LABEL=<label>`:
* When specified, files and functions will be labeled uniquely.
* Example: `ANGLE_CAPTURE_LABEL=foo`
* Results in filenames like this:
```
foo.angledata.gz
foo_context1_001.cpp
foo_context1_002.cpp
foo_context1_003.cpp
foo_context1.cpp
foo_context1.h
foo.json
foo_shared.cpp
...
```
* `ANGLE_CAPTURE_SERIALIZE_STATE`:
* Set to `1` to enable GL state serialization. Default is `0`.
A good way to test out the capture is to use environment variables in conjunction with the sample
template. For example:
```
$ ANGLE_CAPTURE_FRAME_END=4 ANGLE_CAPTURE_OUT_DIR=samples/capture_replay out/Debug/simple_texture_2d --use-angle=vulkan
```
## Running the capture_replay sample (desktop only)
To run a sample replay you can use a template located in
[samples/capture_replay](../samples/capture_replay). First run your sample and ensure all capture
files are written to `samples/capture_replay`. You can conveniently use `ANGLE_CAPTURE_OUT_DIR`.
Make sure `ANGLE_CAPTURE_LABEL` is left unset during capture to use the default file names.
Then enable the `capture_replay_sample` via `gn args`:
```
angle_build_capture_replay_sample = true
```
See [samples/BUILD.gn](../samples/BUILD.gn) for details. Then build and run your replay sample:
```
$ autoninja -C out/Debug capture_replay_sample
$ out/Debug/capture_replay_sample
```
## Running a perf test replay (all platforms, including Android)
To run your capture on any platform (Windows, Linux, Android, Mac (untested)), you'll need to
compile it as part of ANGLE's Trace Replay harness, which is part of `angle_perftests`.
Create a folder under `src/tests/restricted_traces` that matches the `ANGLE_CAPTURE_LABEL` you
used above.
Place all the trace output files into it. For example, if the label was `desktop_test`:
```
src/tests/restricted_traces$ ls -1 desktop_test/
desktop_test.angledata.gz
desktop_test_context1_001.cpp
desktop_test_context1_002.cpp
desktop_test_context1_003.cpp
desktop_test_context1.cpp
desktop_test_context1.h
desktop_test.json
desktop_test_shared.cpp
```
Then add the label of your trace to
[restricted_traces.json](../src/tests/restricted_traces/restricted_traces.json).
Note it includes a version with the string. Just use the number `1` for local changes.
```
"dead_trigger_2 1",
+ "desktop_test 1",
"disney_tsum_tsum 5",
```
Now you should be able to compile and run the perf test including your trace:
```
autoninja -C out/Debug angle_perftests
ANGLE_CAPTURE_ENABLED=0 out/Debug/angle_perftests --gtest_filter="*desktop_test*" --verbose
```
## Capturing an Android application
In order to capture on Android, the following additional steps must be taken. These steps
presume you've built and installed the ANGLE APK with capture enabled, and selected ANGLE
as the GLES driver for your application.
1. Create the output directory
Determine your package name:
```
export PACKAGE_NAME com.android.gl2jni
```
Then create an output directory that it can write to:
```
$ adb shell mkdir -p /sdcard/Android/data/$PACKAGE_NAME/angle_capture
```
2. Set properties to use for environment variable
On Android, it is difficult to set an environment variable before starting native code.
To work around this, ANGLE will read debug system properties before starting the capture
and use them to prime environment variables used by the capture code.
Note: Mid-execution capture doesn't work for Android just yet, so frame_start must be
zero, which is the default. This it is sufficient to only set the end frame.
```
$ adb shell setprop debug.angle.capture.frame_end 200
```
There are other properties that can be set that match 1:1 with the env vars, but
they are not required for capture:
```
# Optional
$ adb shell setprop debug.angle.capture.enabled 0
$ adb shell setprop debug.angle.capture.out_dir foo
$ adb shell setprop debug.angle.capture.frame_start 0
$ adb shell setprop debug.angle.capture.label bar
```
3. Run the application, then pull the files to the capture_replay directory
```
$ cd samples/capture_replay
$ adb pull /sdcard/Android/data/$PACKAGE_NAME/angle_capture replay_files
$ cp replay_files/* .
```
4. Update your GN args to specifiy which context will be replayed.
By default Context ID 1 will be replayed. On Android, Context ID 2 is more typical, some apps
we've run go as high as ID 6.
Note: this solution is temporary until EGL capture is in place.
```
angle_capture_replay_sample_context_id = 2
```
5. Replay the capture on desktop
Until we have samples building for Android, the replay sample must be run on desktop.
We will also be plumbing replay files into perf and correctness tests which will run on Android.
```
$ autoninja -C out/Release capture_replay_sample
$ out/Release/capture_replay_sample
```
### Starting capture at an arbitrary frame
In some scenarios, you don't know which frame you want to start on. You'll only know when target
content is being rendered. For that we've added a trigger that can allow starting the capture at
any time.
To use it, set the following environment variable, in addition to all the setup steps above. Set
the trigger value equal to the number of frames you'd like to capture.
```
adb shell setprop debug.angle.capture.trigger 20
```
When this value is set, `ANGLE_CAPTURE_FRAME_START` and `ANGLE_CAPTURE_FRAME_END` will be ignored.
While your content is rendering, wait until you arrive at the scene you'd like to capture. Then
set the value back to zero:
```
adb shell setprop debug.angle.capture.trigger 0
```
ANGLE will detect this change and start recording the requested number of frames.
## Testing
### Regression Testing Architecture
The [python script][link_to_python_script] uses the job queue pattern. We spawn n-1 independent
worker processes, where n is the value returned by multiprocessing.cpu_count(). Whenever a worker
process finishes a job and becomes available, it grabs the next job from a shared job queue and
runs that job on its CPU core. When there are no more jobs in the queue, the worker processes
terminate and the main process reports results.
![Point-in-time snapshot of the job queue](img/RegressionTestingArchitecture.png)
### Job unit
A job unit is a test batch. Each test has to go through 3 stages: capture run, replay build, and
replay run. The test batch batches the replay build stage of multiple tests together, and the
replay run stage of multiple tests together.
![A test batch as a job unit](img/JobUnit.png)
### Running tests
From the command line, navigate to the ANGLE root folder [angle][angle_folder] then run the
command below:
```
python3 src/tests/capture_replay_tests.py --use-goma --gtest_filter=*/ES2_Vulkan --keep-temp-files --output-to-file --batch-count=8
```
* `--use-goma` to turn on/off building with goma
* `--gtest_filter` to run only specific tests
* `--keep-temp-files` to keep the trace files
* `--output-to-file` to write the log to results.txt at
[src/tests/capture_replay_tests][capture_replay_test_folder] folder.
* `--batch-count` to set the number of tests in a batch. More tests in a batch means that
the tests will finish faster, but also means a lower level of granularity.
All command line arguments can be found at the top of the [python script][link_to_python_script].
[angle_folder]: ../
[capture_replay_test_folder]: ../src/tests/capture_replay_tests/
[link_to_python_script]: ../src/tests/capture_replay_tests.py
[CaptureTrigger]: ../src/tests/restricted_traces/README.md#trigger-the-capture

View File

@@ -1,77 +0,0 @@
# Choosing an ANGLE branch for your project
ANGLE is under continuous development, and does not create release tarballs or
tag specific revisions as releases, which may make the process of choosing a
point in ANGLE's history as the dependency for your project less than obvious.
This document illustrates how to choose a branch of ANGLE which can be expected
to be updated with critical fixes, should they be needed.
## ANGLE automatic branching
Branches are created automatically in ANGLE to correspond to branches created in
Chromium. These branches are named `chromium/####`, where the number is the
matching Chromium branch. These branches will be created from the revision which
that Chromium branch points to as its dependency. So, for example, the
`chromium/2013` branch point is at r28bcf4ff, because [Chromium's dependency
file for the 2013 branch]
(http://src.chromium.org/viewvc/chrome/branches/2013/src/DEPS?revision=272741)
uses this ANGLE revision.
It isn't necessary to be familiar with how Chromium's dependency management
works to choose an appropriate ANGLE branch for your project. You will, however,
likely want to make sure that you choose a branch that is used for a relatively
stable Chromium release channel build, as those branches will be deployed with
Chromium, and receive updates if bugs are found and fixed during release
lifetime, while the more volatile channels will turn over quickly, and their
branches will be short-lived.
**We recommend choosing a branch corresponding to a Beta or Stable Chromium
release** if you are pursuing periodic, not continuous, integration of ANGLE.
## Matching a Chromium release to an ANGLE branch
In order to determine which branches are used by Chromium releases, please use
[the OmahaProxy tool](http://omahaproxy.appspot.com/), which lists build
information about current Chromium releases. Find the entry for a suitable
release channel (for now, we recommend one of the Windows desktop releases), and
note the branch listed in the `true_branch` column. This identifies the ANGLE
branch used by that Chromium release.
## Updates to release branches
If bugs (stability, security, performance, or otherwise) are discovered after a
branch has been created, and that branch is used by a Chromium release, the
fixes for those bugs will be applied to the ANGLE branches for uptake by
Chromium and any other projects using that branch. You should need only to
perform a `git pull` to check for and apply any such changes.
## Cherry-picking a change to a release branch
Occasionally a bug fix must be merged back to an earlier Chromium
release branch. To do this, first look up the branch number in
[OmahaProxy](https://omahaproxy.appspot.com/). For example, M55
corresponds to branch number 2883.
In the simple case where there are no conflicts, the merge can be done
entirely in the Gerrit UI. Click the "Cherry pick" button and enter
`chromium/[branch_number]` as the branch to merge to.
If there are conflicts, however, follow these steps:
1. `git checkout chromium/[branch_number]`
2. `git cherry-pick [commit_hash]`
3. Fix any merge conflicts.
4. `git cl upload`
Have the cherry-pick reviewed, and then land it. It's also OK to skip
the review and land it yourself with TBR= in the issue description, if
you have that ability.
There is one final step to pick up the ANGLE change into a Chromium Beta or
Stable branch. A Skia auto-roller updates the DEPS file in the corresponding
Chromium branch automatically once the ANGLE change is merged into an ANGLE
branch. To make sure that your change has made it into Chromium you can check
these auto-rollers:
1. https://autoroll.skia.org/r/angle-chromium-beta-autoroll
1. https://autoroll.skia.org/r/angle-chromium-stable-autoroll

View File

@@ -1,57 +0,0 @@
# ANGLE's Code Review Process
This page describes the review process for ANGLE reviewers and committers. For
instructions on submitting your change list for review, please see
[ContributingCode](ContributingCode.md).
## Reviewing Changes
The author of a CL may designate reviewers. Please feel free to weigh in on
changes even if you are not a designated reviewer!
1. To review a change, you can either navigate directly to the URL for the CL,
or, if you are one of the designated reviewers, the change will appear in
your dashboard at https://chromium-review.googlesource.com/
2. Review the change listed by looking over the diffs listed in the most recent
patch set.
* You may view the diffs either side-to-side, or in unified diff format.
* You can comment on a specific line of code by double-clicking that line,
or on the file as a whole by clicking the "Add file comment" icon, which
appears above the diff, in the line number column.
* Note that, for CLs submitted as fixes to standing bugs, style issues
that pre-exist the CL are not required to be addressed in the CL. As a
reviewer, you can request a follow-up CL to address the style issue if
you desire. This exception doesn't apply for CLs which implement new
functionality, perform refactoring, or introduce style issues
themselves.
3. Once your review is complete, click the "Review" button
* If you are satisfied with the change list as it is, give a positive
review (Code-Review +1 or +2).
* If you think the change list is a good idea, but needs changes, leave
comments and a neutral review. (Code-Review 0)
* If you think the change list should be abandoned, give a negative
review. (Code-Review -1 or -2)
* A +2 code review is required before landing. Only ANGLE committers may
provide a +2 code review.
* ANGLE has a 2-reviewer policy for CLs. This means all changes should get
a positive review from more than one person before they are accepted.
This is most usually handled by reserving the +2 review for the second
reviewer to clear the CL.
* If you made comments on the files, the draft comments will appear below
the cover message. These comments are not published until you click on
the "Publish Comments" button.
4. Verification and landing:
* If the CL author is not an ANGLE committer, the CL should be verified
and landed by a committer. Once verified, the "+1 Verified" status may
be added, and the CL may be landed with the "Publish and Submit" button.
There should be no need to rebase via the "Rebase Change" button prior
to landing.
* If the CL author is an ANGLE committer, they should verify and land the
CL themselves.
* Please note: Verification and commit-queue workflow may be subject to
change in the near future.
5. Cherry-picking to other branches
* If the change is needed on other branches, you may be able to land it
using the "Cherry Pick To" button on the CL page.
* If this cherry pick fails, you will need to rebase the patch yourself
and submit a new change for review on the branch.

View File

@@ -1,176 +0,0 @@
# Coding Standard for the ANGLE Project
## Google Style Guide
We generally use the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) as a basis for
our Coding Standard, however we will deviate from it in a few areas, as noted
below.
Items marked {DEV} indicate a deviation from the Google guidelines. Items marked
{DO} are reiterating points from the Google guidelines.
Before you upload code to Gerrit, use `git cl format` to auto-format your code.
This will catch most of the trivial formatting errors and save you time.
### [Header Files](https://google.github.io/styleguide/cppguide.html#Header_Files)
* We use **`.h`** for C++ headers.
* {DEV} #define guards should be of the form: `<PATH>_<FILE>_H_`. (Compiler
codebase is varied, including `<PROJECT>_` makes the names excessively
long).
### [Scoping](https://google.github.io/styleguide/cppguide.html#Scoping)
* {DO} avoid globally scoped variables, unless absolutely necessary.
### [Classes](https://google.github.io/styleguide/cppguide.html#Classes)
* {DEV} Inherit (privately) from angle::NonCopyable helper class (defined in
common/angleutils.h) to disable default copy and assignment operators.
### [Other C++ Features](https://google.github.io/styleguide/cppguide.html#Other_C++_Features)
* {DO} avoid use of default arguments.
* {DONT} use C++ exceptions, they are disabled in the builds and not caught.
* {DO} use nullptr (instead of 0 or NULL) for pointers.
* {DO} use size\_t for loop iterators and size values.
* {DO} use uint8\_t pointers instead of void pointers to denote binary data.
* {DO} use C++11/14/17 according to the
[Chromium C++ features guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md).
### [Naming](https://google.github.io/styleguide/cppguide.html#Naming)
#### File Names
* {DEV} Filenames should be all lowercase and can include underscores (`_`).
If the file is an implementation of a class, the filename may be capitalized
the same as the major class.
* {DEV} We use .cpp (instead of .cc), .h and .inl (inlined files) for C++
files and headers.
#### Directory Names
* Directory names should be all lowercase, unless following an externally
imposed capitalization (eg include/EGL, or src/libGLESv2, etc)
#### Variable Names
Use the following guidelines, they do deviate somewhat from the [Google
guidelines](https://google.github.io/styleguide/cppguide.html#Naming).
* Class and type names: start with capital letter and use CamelCase.
* {DEV} Class member variables: use an **`m`** prefix instead of trailing
underscore and use CamelCase.
* Global variables (if they must be used): use a **`g`** prefix.
* {DEV} Variable names: start with lower case and use CamelCase (chosen for consistency)
* {DEV} Function names: Member functions start with lower case and use CamelCase. Non-member and static member functions start with capital letter and
use CamelCase (chosen for consistency)
* {DO} Constants: start with a **`k`** and use CamelCase
* Namespaces: short names. use all lower case
* {DEV} Enum Names: use strongly typed class enums when possible. Use CamelCase for class enum members. See [official docs][EnumsOfficial].
* Macros: all uppercase with underscores
* Exceptions to naming: use common sense!
[EnumsOfficial]: https://google.github.io/styleguide/cppguide.html#Enumerator_Names
### [Comments](https://google.github.io/styleguide/cppguide.html#Comments)
* {DO} read and follow Google's recommendations.
* Each file **must** start with the following boilerplate notice:
```
//
// Copyright $YEAR The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
```
* $YEAR should be set to the current year at the time a file is created, and not changed thereafter.
### [Formatting](https://google.github.io/styleguide/cppguide.html#Formatting)
* {DEV} Avoid excessively long lines. Please keep lines under 100 columns
long.
* Use unix-style newlines.
* {DO} use only spaces. No tab characters. Configure your editor to emit
spaces when you hit the TAB-key.
* {DEV} indent 4 spaces at a time.
* conditionals: place space outside the parenthesis. No spaces inside.
* switch statements: use the output of `git cl format`.
* class format(eg private, public, protected): indent by 2 spaces. Regular
4-space indent from the outer scope for declarations/definitions.
* pointers and references: **`*`** and **`&`** tight against the variable
* namespaces: are not indented.
* extern code blocks: are not indented.
* {DEV} braces should go on a separate line, except for functions defined in a
header file where the whole function declaration and definition fit on one
line.
Examples:
```
if (conditional)
{
stuff();
}
else
{
otherstuff()
}
```
```
switch (conditional)
{
case foo:
dostuff();
break;
case bar:
otherstuff();
break;
default:
WTFBBQ();
}
```
```
class MyClass : public Foo
{
public:
MyClass();
~MyClass() {};
private:
DISALLOW_COPY_AND_ASSIGN(MyClass);
};
```
```
char *c;
const string &str;
```
### [Exceptions to the Rules](https://google.github.io/styleguide/cppguide.html#Exceptions_to_the_Rules)
* If modifying pre-existing code that does not match the standard, the altered
portions of the code should be changed to match the standard.
### Generated Source Files
Prefer storing generated sources as baked files in the repository. Avoid using
GN actions to run Python scripts.
**Definition:**
Sometimes helper scripts can create compilable sources more easily from XML or
JSON data sources than maintaining source files by hand. These scripts are often
written in Python and output generated sources.
**Decision**
Storing generated sources in the repository makes integration easier for non-GN
users. Python scripts can be expensive and slow to run at compile-time.
Generated sources can be a pain point for messing up builds.
It could be possible to solve the build clobbering problem. And we could replace
Python with something faster. But to allow for easier integration with our tools
and customers we should bake generated files into the repository.

View File

@@ -1,108 +0,0 @@
# Introduction
There are many situations in which it's useful for WebGL applications to
transform shaders in various ways. ANGLE's shader translator can be used for
this purpose: compiling it with [Emscripten](http://emscripten.org/) allows it
to be invoked from a web page. This wiki page provides some preliminary details
about how to do this.
# Details
Pull top of tree ANGLE.
Install the Emscripten toolchain per the [instructions](http://emscripten.org/).
Symlink (preferred) or copy the ANGLE directory into ...emsdk/emscripten/master.
Put a shader to compile into a file (named with .vert or .frag suffix) in the
same directory. For example, put the following shader from the [WebGL Aquarium]
(http://webglsamples.org/aquarium/aquarium.html) into `aq-fish-nm.frag`:
```
precision mediump float;
uniform vec4 lightColor;
varying vec4 v_position;
varying vec2 v_texCoord;
varying vec3 v_tangent; // #normalMap
varying vec3 v_binormal; // #normalMap
varying vec3 v_normal;
varying vec3 v_surfaceToLight;
varying vec3 v_surfaceToView;
uniform vec4 ambient;
uniform sampler2D diffuse;
uniform vec4 specular;
uniform sampler2D normalMap; // #normalMap
uniform float shininess;
uniform float specularFactor;
// #fogUniforms
vec4 lit(float l ,float h, float m) {
return vec4(1.0,
max(l, 0.0),
(l > 0.0) ? pow(max(0.0, h), m) : 0.0,
1.0);
}
void main() {
vec4 diffuseColor = texture2D(diffuse, v_texCoord);
mat3 tangentToWorld = mat3(v_tangent, // #normalMap
v_binormal, // #normalMap
v_normal); // #normalMap
vec4 normalSpec = texture2D(normalMap, v_texCoord.xy); // #normalMap
vec3 tangentNormal = normalSpec.xyz - vec3(0.5, 0.5, 0.5); // #normalMap
tangentNormal = normalize(tangentNormal + vec3(0, 0, 2)); // #normalMap
vec3 normal = (tangentToWorld * tangentNormal); // #normalMap
normal = normalize(normal); // #normalMap
vec3 surfaceToLight = normalize(v_surfaceToLight);
vec3 surfaceToView = normalize(v_surfaceToView);
vec3 halfVector = normalize(surfaceToLight + surfaceToView);
vec4 litR = lit(dot(normal, surfaceToLight),
dot(normal, halfVector), shininess);
vec4 outColor = vec4(
(lightColor * (diffuseColor * litR.y + diffuseColor * ambient +
specular * litR.z * specularFactor * normalSpec.a)).rgb,
diffuseColor.a);
// #fogCode
gl_FragColor = outColor;
}
```
Compile the shader translator, the translator sample, and the shader all
together:
```
./emcc -Iangle/include -Iangle/src angle/samples/translator/translator.cpp angle/src/compiler/preprocessor/*.cpp angle/src/compiler/translator/*.cpp angle/src/compiler/translator/timing/*.cpp angle/src/compiler/translator/depgraph/*.cpp angle/src/third_party/compiler/*.cpp angle/src/common/*.cpp -o translator.html --preload-file aq-fish-nm.frag -s NO_EXIT_RUNTIME=1
```
Serve up the resulting translator.html via `python -m SimpleHTTPServer`.
Navigate the browser to localhost:8000.
The translator sample will run, displaying its output into the text area on the
page. Since it isn't receiving any input, it simply outputs a help message and
exits.
To invoke the translator again, processing the shader we included along with the
source code, open the JavaScript console and type:
```
Module['callMain'](['-s=w', '-u', 'aq-fish-nm.frag'])
```
The active uniforms and their types will be printed to the text area after the
translator sample processes the shader.
# Issues and Next Steps
It's clearly not useful to have to compile the shader in to the
Emscripten-translated executable. It would be helpful to define a simple wrapper
function which can easily be called from JavaScript and which defines enough
parameters to pass in a shader as a string, transform it somehow or compile it
to another language target, and return the compiled result (or other
information). A simple JavaScript library that wraps all of the interactions
with the Emscripten binary would be useful.
It's not feasible to interact with the translator's data structures, nor
traverse the AST from JavaScript. The code that operates upon the shader must be
written in C++ and compiled in to the shader translator.
emcc should be integrated better with ANGLE's build system.

View File

@@ -1,272 +0,0 @@
# Contributing Code
## Communicate
* Whether you're writing a new feature or fixing an existing bug, it pays to get a second opinion
before you get too far. If it's a new feature idea, post to the discussion group
([angleproject][ANGLE-website]).
* Not all bugs in our [bug system][anglebug.com] are assigned, but if the one you're interested in
fixing is, send a note to the person it's assigned to and ask if they would like a patch.
* Behavior changes and anything nontrivial (i.e. anything other than simple cleanups and style
fixes) should generally be tracked in the bug system. Please [file a bug][anglebug-new] and
describe what you're doing if there isn't one already.
* If you would like bug-editing rights, simply ask a team member via email or the discussion group.
[ANGLE-website]: https://groups.google.com/forum/?fromgroups#!forum/angleproject
[anglebug.com]: http://anglebug.com
[anglebug-new]: http://anglebug.com/new
## Get your code ready
### Code
1. Must conform to the [ANGLE style][ANGLE-style] guidelines.
2. Must be tested. (see the [Testing][Testing] section below)
3. Should be a reasonable size to review. Giant patches are unlikely to get reviewed quickly.
[ANGLE-style]: CodingStandard.md
[Testing]: #Testing
### Build maintenance
1. If you added or removed source files:
* You _must_ update the build files with your changes. See [`src/libGLESv2.gni`][libGLESv2.gni]
and [`src/compiler.gni`][compiler.gni].
2. ANGLE's BUILD.gn script is used by [Chromium's gn build][gn-build-config]. If you change build
files other than to add or remove source files be aware you could break the Chromium build.
ANGLE's commit queue (CQ) will detect such breakage. Ask a project member for help with Chromium
issues if you don't have a Chromium checkout.
3. Some generated code is baked into the repository. If you modify the source of these files, such
as the translator's [`glslang.l`][glslang.l], or one of the internal shaders in the Vulkan
backend, you will need to run [`scripts/run_code_generation.py`][run_code_generation.py] and
include the autogenerated files in your change.
`git cl upload` should warn you if you are missing this step.
[gn-build-config]: https://www.chromium.org/developers/gn-build-configuration
[compiler.gni]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/compiler.gni
[libGLESv2.gni]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/libGLESv2.gni
[glslang.l]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/compiler/translator/glslang.l
[run_code_generation.py]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/scripts/run_code_generation.py
### Testing
* ANGLE uses trybots to test on a variety of platforms. Please run your changes against our bots
and check the results before landing changes or requesting reviews.
* Upload your change (see [Making changes](#making-changes)).
* To kick off a try job, use the 'CQ Dry Run' button, or set the Commit-Queue +1 label to trigger
a dry run of the CQ (will not land the change).
* If you are not part of the `angle-committers` group, you will need to either ask to be added or
ask a member of the group to submit the tryjob for you. Add jmadill or geofflang as a reviewer
for assistance.
* Wait for the bots to report the result on the code review page. The bot results should be
visible in Gerrit as yellow (in-progress), green (passed), or red (failed). This can take up to
two hours for some of the debug bots. Click on the colored rectangle to open the bot log to
triage failed tests.
* If a failure is unexpected, or seems likely unrelated to your change, ask an ANGLE project
member for advice.
* We do not currently have the capability to run individual bots or tests in a run.
* Tests can also be run locally, ANGLE's main testing methods are:
* `angle_unittests`, `angle_end2end_tests` and `angle_white_box_tests` targets.
* The OpenGL CTS also known as [drawElements Quality Program (dEQP)](dEQP.md).
If you're working on a new feature, there may be some extensive tests for it already written.
* The [Top-of-Tree WebGL Conformance tests][WebGL-CTS].
* If you are a Chromium developer, see
[Building ANGLE for Chromium Development][build-ANGLE-for-chromium] for instructions on
building ANGLE within Chromium.
* If you aren't a browser developer, you should be able to drop your compiled DLLs into a
Chrome installation, in place of those distributed with Chrome, to check WebGL conformance.
[Chrome Canary][Chrome-Canary] is well-suited for this.
* If your code isn't covered by an existing test, you are *strongly encouraged* to add new test
coverage. This both ensures that your code is correct and that new contributors won't break it
in the future.
* Add new tests to `angle_end2end_tests` for OpenGL-based API tests, `angle_unittests` for
cross-platform internal tests, and `angle_white_box_tests` for rendering tests which also need
visibility into internal ANGLE classes.
* If you are submitting a performance fix, test your code with `angle_perftests` and add a new
performance test if it is not covered by the existing benchmarks. For more documentation on
`angle_perftests` see the [README][README].
* The [Chromium GPU FYI bot waterfall][Chromium-waterfall] provides continuous integration for
ANGLE patches that have been committed. There may be hardware configurations that are not
tested by the ANGLE trybots, if you notice breakage on this waterfall after landing a patch,
please notify a project member.
[WebGL-CTS]: https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html
[build-ANGLE-for-Chromium]: BuildingAngleForChromiumDevelopment.md
[Chrome-Canary]: https://www.google.com/chrome/browser/canary.html
[README]: ../src/tests/perf_tests/README.md
[Chromium-waterfall]: https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console
### Legal
1. You must complete the [Individual Contributor License Agreement][Individual-CLA]. You can do this
online, and it only takes a minute. If you are contributing on behalf of a corporation, you must
fill out the [Corporate Contributor License Agreement][Corporate-CLA] and send it to Google as
described on that page.
2. Once you've submitted the CLA, please email the following information (as entered on the CLA) to
`shannonwoods at chromium dot org` for record keeping purposes:
* Full Name:
* Email:
* Company (If applicable):
3. If you've never submitted code before, you must add your (or your organization's) name and
contact info to the [AUTHORS](../AUTHORS) file.
4. *NOTE TO REVIEWERS*: Follow the [External Contributor Checklist][Contributor-checklist].
[Individual-CLA]: https://cla.developers.google.com/about/google-individual
[Corporate-CLA]: https://cla.developers.google.com/about/google-corporate
[Contributor-checklist]: http://www.chromium.org/developers/contributing-code/external-contributor-checklist
## Life of a Change List
### <a name="getting-started-with-gerrit"></a>Getting started with Gerrit for ANGLE
1. Go to [https://chromium.googlesource.com/new-password][CR-passwd]
2. Log in with the email you use for your git commits.
3. Follow the directions on the new-password page to set up authentication with your Google account.
4. Make sure to set your real name.
* Visit [https://chromium-review.googlesource.com/#/settings][CR-settings] and check the "Full
Name" field.
5. Check out the repository (see [DevSetup](DevSetup.md)).
6. Install the Gerrit `commit_msg` hook
* Gerrit requires a hook to append a change ID tag to each commit, so that it can associate your
CL with a particular review, and track dependencies between commits.
* Download the hook from
[https://chromium-review.googlesource.com/tools/hooks/commit-msg][commit-msg-hook] and copy
this file to `.git/hooks/commit-msg` within your local repository. On non-Windows platforms,
ensure that permissions are set to allow execution.
* *BE AWARE:* Some patch management tools, such as StGit, currently bypass git hooks. They should
not currently be used with changes intended for review.
[CR-passwd]: https://chromium.googlesource.com/new-password
[CR-settings]: https://chromium-review.googlesource.com/#/settings
[commit-msg-hook]: https://chromium-review.googlesource.com/tools/hooks/commit-msg
### Making changes
1. Commit your changes locally:
* `git add src/../FileName.cpp`
* `git commit`
* A text editor will open. Add a description at the top of the file.
* Associate the CL with an issue in the issue tracker (e.g. a fix for a reported bug)
by adding the following line to the commit message: `Bug: angleproject:<issue number>`.
* If necessary please file a new bug at http://anglebug.com/new
* Save.
* Close the text editor.
* Use `git commit --amend` to update your CL with new changes.
* Use `git cl format` to amend the style of your CL. This saves both your time and the reviewers'!
2. Ensure your code is landed on top of latest changes
* `git pull --rebase`
* Resolve conflicts if necessary
3. Upload the change list
* `git cl upload`
* The change list and modified files will be uploaded to [ANGLE Gerrit][ANGLE-Gerrit].
* Follow the generated URL to the new issue.
* Take a moment to perform a self-review of your code. Gerrit's viewer makes it easy to see
whitespace errors, erroneous tabs, and other simple style problems.
* [Select reviewers](#selecting-reviewers). If you don't do this, reviewers may not realize
you're requesting a review!
* Make changes, upload and repeat as necessary.
* Project members and others will review your code as described in the
[CodeReviewProcess](CodeReviewProcess.md).
5. If your change list needs revision:
* If you have correctly installed the commit hook from the section above, Gerrit will be able to
track your changes by Change-Id.
* You should need only to update your commit with `git commit --amend` and re-upload with
`git cl upload`.
6. Landing change after it receives +2 Code Review:
* If you are a committer, you may submit the change yourself via the Gerrit web interface.
* If you are not a committer, ask your reviewer to submit the change list.
7. Pull and integrate reviewed CL:
* `git pull --rebase`
[ANGLE-Gerrit]: https://chromium-review.googlesource.com/q/project:angle/angle
### Selecting reviewers
When your CL is ready to review, you can use the "Find Owners" button in
Gerrit to select appropriate code reviewers. They will be able to route your
CL to additional reviewers as neccessary and answer any questions you may have
about the process.
### Rules for submission
* At least one **Owner** must give approval.
* The owner must be from the **most specific** directory.
* At least two **Committers** must give approval for non-trival CLs.
For trivial CLs, a single Owner approval is sufficient.
* Only **Committers** may submit CLs. If you aren't a committer please ask for help submitting.
* Committers may submit high-priority small CLs immediately using **TBR**.
See [the Chromium docs][TBR] for more info.
* There are exceptions to these rules. Use your best judgement.
[TBR]: https://chromium.googlesource.com/chromium/src/+/main/docs/code_reviews.md#tbr-to-be-reviewed
### Reverting a CL
Sometimes a change will cause an unforseen problem, e.g. on a platform that's not tested with
pre-submit testing. In those cases, a CL may be reverted; often by a "[Wrangler][wrangler]", who is
an engineer who keeps the testing infrastructure healthy/green.
[wrangler]: ../infra/ANGLEWrangling.md
The best and easiest way to create a revert change is with Gerrit's **REVERT** button, in the
upper-right corner of the original change. Pressing this will pop up a dialog with a template
commit message, and an optional checkbox for automatically sending the revert CL to CQ. Please edit
the commit message with the reason for the revert. When satisfied, press the dialog's **REVERT**
button. It is wise to add the author and reviewers of the original CL as reviewers of the revert
CL. If it's been less than 24 hours since the original CL landed, the revert Cl will land
immediately and bypass the try bots.
If you cannot use Gerrit's **REVERT** button, you can create a revert CL with the "git revert"
command. When doing so, the commit message should include a short description for why the original
commit needs to be reverted, and potentially a bug; similar to this example [revert CL][RevertCL].
[RevertCL]: https://chromium-review.googlesource.com/c/chromium/src/+/2453504
### Relanding a reverted CL
When you re-land a reverted CL, follow this process:
* Prefix the CL title with "Reland: ".
* Keep the commit message of the original CL and add a description of what changed in the re-land.
* Ensure the re-land CL has a unique Change-Id.
* First upload the reverted CL as Patchset 1 with no changes applied.
* Then, apply your fixes, and upload your CL as a new Patchset. The reviewers will be able to see
the diff between Patchset 1 and the fixed/final Patchset.
Here is an example [reland CL][RelandCL]. This [link][RelandCLDiff] shows the difference between Patchset 1
and the fixed/final Patchset. Notice how a reviewer can easily see the fix to the original CL.
[RelandCL]: https://chromium-review.googlesource.com/c/angle/angle/+/2197735
[RelandCLDiff]: https://chromium-review.googlesource.com/c/angle/angle/+/2197735/1..3
If you do not need to make any changes to your CL to re-land, you can instead use Gerrit's **CREATE
RELAND** button.
### Committer status
Similar to [Chromium's committer status][Committer-status], long-term contributors to the ANGLE
project may request to join the `angle-committers` group. This allows you to give `+2` on code
reviews and land patches without assistance. After about 6 months of regular contributions, you may
request committer status from a core ANGLE team member via email or code review. Chromium
committers and Googlers may ask at any time.
### OWNERS files and becoming an Owner
See these Chromium docs for some good guidelines: [link][Owners].
### More info
See also:
* [ANGLE Gerrit][ANGLE-Gerrit]
* [Chromium Projects: Contributing Code][Contributing-code]
* [depot_tools tutorial][depot-tools-tutorial]
* [angle_perftests README][Perftest-README]
* [ANGLE Testing and Processes](TestingAndProcesses.md)
[Committer-status]: https://dev.chromium.org/getting-involved/become-a-committer
[Contributing-code]: http://www.chromium.org/developers/contributing-code/
[depot-tools-tutorial]: http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html
[Perftest-README]: ../src/tests/perf_tests/README.md
[Owners]: https://chromium.googlesource.com/chromium/src/+/main/docs/code_reviews.md#expectations-of-owners

View File

@@ -1,133 +0,0 @@
# Debug Overlay in ANGLE's Vulkan Backend
## Motivation
A complex application has frequently changing performance characteristics due to
both a varying number of objects to draw and different effects that need to be
applied to them. When characterizing the performance of an application, it can
be easy to miss scenes which need optimization, especially if they are
ephemeral.
A debug overlay that shows on-the-fly statistics from the running application
can greatly aid the developer in finding where the bottlenecks are and which
scenes need further investigation and profiling.
ANGLE's Vulkan debug overlay implements this. The initial implementation
includes a few pieces of information for demonstration purposes. Here's the
glmark2 *terrain* scene with these overlay items enabled:
![glmark2 terrain scene](img/VangleDebugOverlay.png)
This is a screenshot of a debug build, hence the low FPS. The command graph size
widget no longer applies to current ANGLE code.
## Implementation
Overlay items are of two fundamental types:
* Text items: A single line of text with small or large font.
* Graph items: A bar graph of data. These each have a Text item attached
that is automatically rendered with the graph item.
Built on these, various overlay item types are defined that gather statistics.
Five such types are defined with one item per type as example:
* **Count**: An item that counts something. **VulkanValidationMessageCount**
is an overlay item of this type that shows the number of validation messages
received from the validation layers.
* **Text**: A generic text widget. **VulkanLastValidationMessage** is an overlay
item of this type that shows the last validation message.
* **PerSecond**: A value that gets reset every second automatically. **FPS** is
an overlay item of this type that simply gets incremented on every `swap()`.
* **RunningGraph**: A graph of the last N values. **VulkanRenderPassCount** is an
overlay of this type. This counter reports the number of RenderPasses rendered
in each vkQueueSubmit call.
* **RunningHistogram**: A histogram of last N values. Input values are in the
[0, 1] range and they are ranked to N buckets for histogram calculation.
**VulkanSecondaryCommandBufferPoolWaste** is an overlay item of this type.
On `vkQueueSubmit()`, the memory waste from command buffer pool allocations
is recorded in the histogram.
Overlay font is placed in [libANGLE/overlay/](../src/libANGLE/overlay/) which
[gen_overlay_fonts.py](../src/libANGLE/gen_overlay_fonts.py) processes to create
an array of rasterized font data, which is used at runtime to create the font
image (an image with one layer per character, and one mip level per font size).
The overlay widget layout is defined in
[overlay_widgets.json](../src/libANGLE/overlay_widgets.json)
which [gen_overlay_widgets.py](../src/libANGLE/gen_overlay_widgets.py)
processes to generate an array of widgets, each of its respective type,
and sets their properties, such as color and bounding box.
The json file allows widgets to align against other widgets as well as against
the framebuffer edges. The following is a part of this file:
```json
{
"name": "VulkanValidationMessageCount",
"type": "Count",
"color": [255, 0, 0, 255],
"coords": [10, "VulkanLastValidationMessage.top.adjacent"],
"font": "small",
"length": 25
},
{
"name": "VulkanSecondaryCommandBufferPoolWaste",
"type": "RunningHistogram(50)",
"color": [255, 200, 75, 200],
"coords": [-50, 100],
"bar_width": 6,
"height": 100,
"description": {
"color": [255, 200, 75, 255],
"coords": ["VulkanSecondaryCommandBufferPoolWaste.left.align",
"VulkanSecondaryCommandBufferPoolWaste.top.adjacent"],
"font": "small",
"length": 40
}
}
```
Negative coordinates in this file indicate alignment to the right/bottom of the
framebuffer. `OtherItem.edge.mode` lets an item be aligned with another.
If `mode` is `align`, the item has the same origin as `OtherItem` and expands
in the same direction. If `adjacent`, the item expands in the opposite
direction.
The UI is rendered in two passes, one draw call for all graph widgets and
another draw call for all text widgets. The vertex shader in these draw calls
generates 4 vertices for each instance (one instance per widget) based on the
widget bounding box. The fragment shader renders font or a graph based on widget
data. This is done once per frame on `present()`, and the result is blended into
the swapchain image.
To build ANGLE with overlay capability, `angle_enable_overlay = true` must be
placed in `args.gn`.
Currently, to enable overlay items an environment variable is used. For example:
On Desktop:
```commandline
$ export ANGLE_OVERLAY=FPS:Vulkan*PipelineCache*
$ ./hello_triangle --use-angle=vulkan
```
On Android:
```
$ adb shell setprop debug.angle.overlay FPS:Vulkan*PipelineCache*
$ ./hello_triangle --use-angle=vulkan
```
## Future Work
Possible future work:
* On Android, add settings in developer options and enable items based on those.
* Spawn a small server in ANGLE and write an application that sends
enable/disable commands remotely.
* Move the Overlay rendering functionality to the front-end to benefit all
backends.
* Add more overlay widgets.
* Implement automatic widget layout to remove the need to specify positions in
the overlay widgets JSON.

View File

@@ -1,545 +0,0 @@
# Debugging Tips
There are many ways to debug ANGLE using generic or platform-dependent tools. Here is a list of tips
on how to use them.
## Running ANGLE under apitrace on Linux
[Apitrace](http://apitrace.github.io/) captures traces of OpenGL commands for later analysis,
allowing us to see how ANGLE translates OpenGL ES commands. In order to capture the trace, it
inserts a driver shim using `LD_PRELOAD` that records the command and then forwards it to the OpenGL
driver.
The problem with ANGLE is that it exposes the same symbols as the OpenGL driver so apitrace captures
the entry point calls intended for ANGLE and reroutes them to the OpenGL driver. In order to avoid
this problem, use the following:
1. Link your application against the static ANGLE libraries (libGLESv2_static and libEGL_static) so
they don't get shadowed by apitrace's shim.
2. Ask apitrace to explicitly load the driver instead of using a dlsym on the current module.
Otherwise apitrace will use ANGLE's symbols as the OpenGL driver entrypoint (causing infinite
recursion). To do this you must point an environment variable to your GL driver. For example:
`export TRACE_LIBGL=/usr/lib/libGL.so.1`. You can find your libGL with
`ldconfig -p | grep libGL`.
3. Link ANGLE against libGL instead of dlsyming the symbols at runtime; otherwise ANGLE won't use
the replaced driver entry points. This is done with the gn arg `angle_link_glx = true`.
If you follow these steps, apitrace will work correctly aside from a few minor bugs like not being
able to figure out what the default framebuffer size is if there is no glViewport command.
For example, to trace a run of `hello_triangle`, assuming the apitrace executables are in `$PATH`:
```
gn args out/Debug # add "angle_link_glx = true"
# edit samples/BUILD.gn and append "_static" to "angle_util", "libEGL", "libGLESv2"
ninja -C out/Debug
export TRACE_LIBGL="/usr/lib/libGL.so.1" # may require a different path
apitrace trace -o mytrace ./out/Debug/hello_triangle
qapitrace mytrace
```
## Enabling General Logging
Normally, ANGLE only logs errors and warnings (e.g. to Android logcat). General logging, or
additional levels of "trace" messages will be logged when the following GN arg is set:
```
angle_enable_trace = true
```
To log all GLES and EGL commands submitted by an application, including the following flag:
```
angle_enable_trace_events = true
```
## Debug Angle on Android
Android is built as an Android APK, which makes it more difficult to debug an APK that is using ANGLE. The following information can allow you to debug ANGLE with LLDB.
* You need to build ANGLE with debug symbols enabled. Assume your build variant is called Debug. Make sure you have these lines in out/Debug/args.gn
```
is_component_build = false
is_debug = true
is_official_build = false
symbol_level = 2
strip_debug_info = false
ignore_elf32_limitations = true
angle_extract_native_libs = true
```
The following local patch may also be necessary:
```
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 96a18d91a3f6..ca7971fdfd48 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -86,7 +86,8 @@ declare_args() {
# Whether an error should be raised on attempts to make debug builds with
# is_component_build=false. Very large debug symbols can have unwanted side
# effects so this is enforced by default for chromium.
- forbid_non_component_debug_builds = build_with_chromium
+ forbid_non_component_debug_builds = false
```
Build/install/enable ANGLE apk for your application following other instructions.
* Modify gdbclient.py script to let it find the ANGLE symbols.
```
diff --git a/scripts/gdbclient.py b/scripts/gdbclient.py
index 61fac4000..1f43f4f64 100755
--- a/scripts/gdbclient.py
+++ b/scripts/gdbclient.py
@@ -395,6 +395,8 @@ def generate_setup_script(debugger_path, sysroot, linker_search_dir, binary_file
vendor_paths = ["", "hw", "egl"]
solib_search_path += [os.path.join(symbols_dir, x) for x in symbols_paths]
solib_search_path += [os.path.join(vendor_dir, x) for x in vendor_paths]
+ solib_search_path += ["/your_path_to_chromium_src/out/Debug/lib.unstripped/"]
if linker_search_dir is not None:
solib_search_path += [linker_search_dir]
```
* Start your lldbclient.py from `/your_path_to_chromium_src/out/Debug` folder. This adds the ANGLE source-file paths to what is visible to LLDB, which allows LLDB to show ANGLE's source files. Refer to https://source.android.com/devices/tech/debug/gdb for how to attach the app for debugging.
* If you are debugging angle_perftests, you can use `--shard-timeout 100000000` to disable the timeout so that the test won't get killed while you are debugging. If the test runs too fast that you don't have time to attach, use `--delay-test-start=60` to give you extra time to attach.
## Enabling Debug-Utils Markers
ANGLE can emit debug-utils markers for every GLES API command that are visible to both Android GPU
Inspector (AGI) and RenderDoc. This support requires
[enabling general logging](#enabling-general-logging) as well as setting the following additional
GN arg:
```
angle_enable_annotator_run_time_checks = true
```
In addition, if the following GN arg is set, the API calls will output to Android's logcat:
```
angle_enable_trace_android_logcat = true
```
Once compiled, the markers need to be turned on.
### Turning on Debug Markers on Android
On Android, debug markers are turned on and off with an Android debug property that is
automatically deleted at the next reboot:
```
adb shell setprop debug.angle.markers 1
```
* 0: Turned off/disabled (default)
* 1: Turned on/enabled
### Turning on Debug Markers on Desktop
On desktop, debug markers are turned on and off with the ANGLE_ENABLE_DEBUG_MARKERS environment
variable (set in OS-specific manner):
* 0: Turned off/disabled (default)
* 1: Turned on/enabled
## Running ANGLE under GAPID on Linux
[GAPID](https://github.com/google/gapid) can be used to capture trace of Vulkan commands on Linux.
When capturing traces of gtest based tests built inside Chromium checkout, make sure to run the
tests with `--single-process-tests` argument.
## Running ANGLE under GAPID on Android
[GAPID](https://github.com/google/gapid) can be used to capture a trace of the Vulkan or OpenGL ES
command stream on Android. For it to work, ANGLE's libraries must have different names from the
system OpenGL libraries. This is done with the gn arg:
```
angle_libs_suffix = "_ANGLE_DEV"
```
All
[AngleNativeTest](https://chromium.googlesource.com/chromium/src/+/main/third_party/angle/src/tests/test_utils/runner/android/java/src/com/android/angle/test/AngleNativeTest.java)
based tests share the same activity name, `com.android.angle.test.AngleUnitTestActivity`.
Thus, prior to capturing your test trace, the specific test APK must be installed on the device.
When you build the test, a test launcher is generated, for example,
`./out/Release/bin/run_angle_end2end_tests`. The best way to install the APK is to run this test
launcher once.
In GAPID's "Capture Trace" dialog, "Package / Action:" should be:
```
android.intent.action.MAIN:com.android.angle.test/com.android.angle.test.AngleUnitTestActivity
```
The mandatory [extra intent
argument](https://developer.android.com/studio/command-line/adb.html#IntentSpec) for starting the
activity is `org.chromium.native_test.NativeTest.StdoutFile`. Without it the test APK crashes. Test
filters can be specified via either the `org.chromium.native_test.NativeTest.CommandLineFlags` or
the `org.chromium.native_test.NativeTest.GtestFilter` argument. Example "Intent Arguments:" values in
GAPID's "Capture Trace" dialog:
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt -e org.chromium.native_test.NativeTest.CommandLineFlags "--gtest_filter=*ES2_VULKAN"
```
or
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt --e org.chromium.native_test.NativeTest.GtestFilter RendererTest.SimpleOperation/ES2_VULKAN:SimpleOperationTest.DrawWithTexture/ES2_VULKAN
```
## Running ANGLE under RenderDoc
An application running through ANGLE can confuse [RenderDoc](https://github.com/baldurk/renderdoc),
as RenderDoc [hooks to EGL](https://github.com/baldurk/renderdoc/issues/1045) and ends up tracing
the calls the application makes, instead of the calls ANGLE makes to its backend. As ANGLE is a
special case, there's little support for it by RenderDoc, though there are workarounds.
### Windows
On Windows, RenderDoc supports setting the environment variable `RENDERDOC_HOOK_EGL` to 0 to avoid
this issue.
### Linux
On Linux, there is no supported workaround by RenderDoc. See [this
issue](https://github.com/baldurk/renderdoc/issues/1045#issuecomment-463999869). To capture Vulkan
traces, the workaround is to build RenderDoc without GL(ES) support.
Building RenderDoc is straightforward. However, here are a few instructions to keep in mind.
```
# Install dependencies based on RenderDoc document. Here are some packages that are unlikely to be already installed:
$ sudo apt install libxcb-keysyms1-dev python3-dev qt5-qmake libqt5svg5-dev libqt5x11extras5-dev
# Inside the RenderDoc directory:
$ cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H. -DENABLE_GLES=OFF -DENABLE_GL=OFF
# QT_SELECT=5 is necessary if your distribution doesn't default to Qt5
$ QT_SELECT=5 make -j -C build
# Run RenderDoc from the build directory:
$ ./build/bin/qrenderdoc
```
If your distribution does not provide a recent Vulkan SDK package, you would need to manually
install that. This script tries to perform this installation as safely as possible. It would
overwrite the system package's files, so follow at your own risk. Place this script just above the
extracted SDK directory.
```
#! /bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
ver=$1
if [ ! -d "$ver" ]; then
echo "$ver is not a directory"
fi
# Verify everything first
echo "Verifying files..."
echo "$ver"/x86_64/bin/vulkaninfo
test -f "$ver"/x86_64/bin/vulkaninfo || exit 1
echo "$ver"/x86_64/etc/explicit_layer.d/
test -d "$ver"/x86_64/etc/explicit_layer.d || exit 1
echo "$ver"/x86_64/lib/
test -d "$ver"/x86_64/lib || exit 1
echo "Verified. Performing copy..."
echo sudo cp "$ver"/x86_64/bin/vulkaninfo /usr/bin/vulkaninfo
sudo cp "$ver"/x86_64/bin/vulkaninfo /usr/bin/vulkaninfo
echo sudo cp "$ver"/x86_64/etc/explicit_layer.d/* /etc/explicit_layer.d/
sudo cp "$ver"/x86_64/etc/explicit_layer.d/* /etc/explicit_layer.d/
echo sudo rm /usr/lib/x86_64-linux-gnu/libvulkan.so*
sudo rm /usr/lib/x86_64-linux-gnu/libvulkan.so*
echo sudo cp -P "$ver"/x86_64/lib/lib* /usr/lib/x86_64-linux-gnu/
sudo cp -P "$ver"/x86_64/lib/lib* /usr/lib/x86_64-linux-gnu/
echo "Done."
```
### Android
#### Using Linux as a Local Machine
If you are on Linux, make sure not to use the build done in the previous section. The GL renderer
disabled in the previous section is actually needed in this section.
```
# Inside the RenderDoc directory:
# First delete the Cmake Cache in build/ directory
rm build/CMakeCache.txt
# Then build RenderDoc with cmake:
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H.
QT_SELECT=5 make -j -C build
```
Follow
[Android Dependencies on Linux](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Dependencies.md#android-dependencies-on-linux)
to download dependency files.
Define the following environment variables, for example in `.bashrc` (values are examples):
```
export JAVA_HOME=<path_to_jdk_root>
export ANDROID_SDK=<path_to_sdk_root>
export ANDROID_NDK=<path_to_ndk_root>
export ANDROID_NDK_HOME=<path_to_ndk_root>
```
In the renderdoc directory, create Android builds of RenderDoc:
```
mkdir build-android-arm32
cd build-android-arm32/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a ..
make -j
cd ../
mkdir build-android-arm64
cd build-android-arm64/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=arm64-v8a ..
make -j
cd ../
```
Note that you need both arm32 and arm64 builds even if working with an arm64 device. See
[RenderDoc's documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android)
for more information.
When you run RenderDoc, choose the "Replay Context" from the bottom-left part of the UI (defaults to
Local). When selecting the device, you should see the RenderDoc application running.
In ANGLE itself, make sure you add a suffix for its names to be different from the system's. Add
this to gn args:
```
angle_libs_suffix = "_ANGLE_DEV"
```
Next, you need to install an ANGLE test APK. When you build the test, a test launcher is generated,
for example, `./out/Release/bin/run_angle_end2end_tests`. The best way to install the APK is to run
this test launcher once.
In RenderDoc, use `com.android.angle.test/com.android.angle.test.AngleUnitTestActivity` as the
Executable Path, and provide the following arguments:
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt -e org.chromium.native_test.NativeTest.CommandLineFlags "--gtest_filter=*ES2_VULKAN"
```
Note that in the above, only a single command line argument is supported with RenderDoc. If testing
dEQP on a non-default platform, the easiest way would be to modify `GetDefaultAPIName()` in
`src/tests/deqp_support/angle_deqp_gtest.cpp` (and avoid `--use-angle=X`).
#### Using Windows as a Local Machine
You should be able to download the latest [RenderDoc on Windows](https://renderdoc.org/builds) and follow the
[RenderDoc Official Documentation](https://renderdoc.org/docs/how/how_android_capture.html) for instructions on how to
use RenderDoc on Android. If you would like to build RenderDoc for Android on Windows yourself, you can follow the
[RenderDoc Officual Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android).
We listed more detailed instructions below on how to set up the build on Windows.
##### Install Android Dependencies
On windows, we need to install dependencies to build android, as described in
[RenderDoc Official Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Dependencies.md#android)
1. Install [Android SDK](https://developer.android.com/about/versions/12/setup-sdk#install-sdk).
Add a new system variable:
Variable: ANDROID_SDK
Value: path_to_sdk_directory (e.g. C:\Users\test\Appdata\Local\Android\Sdk)
2. Install [Android NDK](https://developer.android.com/studio/projects/install-ndk).
Add a new system variable:
Variable: ANDROID_NDK
Value: path_to_ndk_directory (e.g. C:\Users\test\Appdata\Local\Android\Sdk\ndk\23.1.7779620)
3. Install [Java 8](https://www.oracle.com/java/technologies/downloads/#java8).
Add a new system variable:
Variable: JAVA_HOME
Value: path_to_jdk1.8_directory (e.g. C:\Program Files\Java\jdk1.8.0_311)
5. Install [Android Debug Bridge](https://developer.android.com/studio/releases/platform-tools).
Append android_sdk_platform-tools_directory to the Path system variable.
e.g. C:\Users\Test\AppData\Local\Android\Sdk\platform-tools
##### Install Build Tools
1. Install a bash shell. Git Bash comes with Git installation on Windows should work.
2. Install [make](http://gnuwin32.sourceforge.net/packages/make.htm).
Add the path to bin folder of GnuWin32 to the Path system variable.
##### Build RenderDoc Android APK on Windows
If you are using the Git Bash that comes with MinGW generator, you can run below commands to build Android APK
```
mkdir build-android-arm32
cd build-android-arm32/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a -G "MinGW Makefiles" ..
make -j
cd ../
mkdir build-android-arm64
cd build-android-arm64/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=arm64-v8a -G "MinGW Makefiles" ..
make -j
cd ../
```
If the generator type of the bash shell you are using is different from MinGW, replace the "MinGW" in the above cmake
command with the generator
type you are using, as described in
[RenderDoc Official Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android).
##### Build Errors And Resolutions
* **cmake command errors**
```
Error: Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe to get the value of
VCTargetsPath:
error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.
Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.
Configuration='Debug' Platform='x64'.
```
This is due to the cmake command is using Visual Studio as the generator type. Run the cmake command with the
generator type "MinGW Makefiles" or "MSYS Makefiles".
```Error: Does not match the generator used previously```
Delete the CMakeCache file in build directories build-android-arm64/ or build-android-arm32/.
* **make command errors**
```
-Djava.ext.dirs is not supported.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
Downgrade Java JDK version to [Java 8](https://www.oracle.com/java/technologies/downloads/#java8).
##### Steps to use the RenderDoc you just built
1. Build arm32 and arm64 android packages. See [instructions](#build-renderdoc-android-apk-on-windows) in the above
section.
2. Uninstall the renderdoc package.
This step is required if you have installed / used RenderDoc on the same Android device before. RenderDoc only pushes
the renderdoccmd APK to the Android device if it finds the version of the existing APK on the device is different from
the version of the APK we are going to install, and the version is dictated by the git hash it was built from. Therefore
any local modifications in the RenderDoc codebase would not get picked up if we don't uninstall the old APK first.
```
adb uninstall org.renderdoc.renderdoccmd.arm64
adb uninstall org.renderdoc.renderdoccmd.arm32
```
3. Build renderdoc on windows desktop by clicking "build solution" in visual studio.
4. Launch renderdoc from visual studio, and push the android packages to android device by selecting the connected
device at the bottom left corner.
### Add SPIRV-to-GLSL Shader View Option
RenderDoc allows us to add and configure customized shader processing tools:
https://renderdoc.org/docs/window/settings_window.html#shader-processing-tools-config.
To configure RenderDoc to display shader source code in GLSL, instead of spirv,
follow the below steps:
1. Get the SPIRV-Cross tool:
Clone the SPIRV-Cross git repo: https://github.com/KhronosGroup/SPIRV-Cross:
```
git clone https://github.com/KhronosGroup/SPIRV-Cross.git
```
Compile the SPIRV-Cross:
```
# inside SPIRV-Cross directory
make
```
2. Open Shader Viewer Settings window: RenderDoc -> Tools -> Settings, and select
Shader Viewer on the left.
3. Click Add on the bottom to add a new tool, and fill the new tool details:
| Item | Value |
|------------|-------------------------------------|
| Name | SPIRV-CROSS |
| Tool Type | SPIRV-Cross |
| Executable | <spirv-cross-repo-root>/spirv-cross |
5. Restart RenderDoc.
## Testing with Chrome Canary
Many of ANGLE's OpenGL ES entry points are exposed in Chromium as WebGL 1.0 and WebGL 2.0 APIs that
are available via JavaScript. For testing purposes, custom ANGLE builds may be injected in Chrome
Canary.
### Setup
#### Windows
1. Download and install [Google Chrome Canary](https://www.google.com/chrome/canary/).
2. Build ANGLE x64, Release.
3. Run `python scripts\update_chrome_angle.py` to replace Canary's ANGLE with your custom ANGLE
(note: Canary must be closed).
#### Linux
1. Install Google Chrome Dev (via apt, or otherwise). Expected installation directory is
`/opt/google/chrome-unstable`.
2. Build ANGLE for the running platform. `is_component_build = false` is suggested in the GN args.
3. Run `python scripts/update_chrome_angle.py` to replace Dev's ANGLE with your custom ANGLE
4. Add ANGLE's build path to the `LD_LIBRARY_PATH` environment variable.
#### macOS
1. Download and install [Google Chrome Canary](https://www.google.com/chrome/canary/).
2. Build ANGLE for the running platform; GN args should contain `is_debug = false`.
3. Run `./scripts/update_chrome_angle.py` to replace Canary's ANGLE with your custom ANGLE.
### Usage
Run Chrome:
- On Windows: `%LOCALAPPDATA%\Google\Chrome SxS\chrome.exe`
- On Linux: `/opt/google/chrome-unstable/google-chrome-unstable`
- On macOS: `./Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary`
With the following command-line options:
* `--use-cmd-decoder=passthrough --use-gl=angle` and one of
* `--use-angle=d3d9` (Direct3D 9 renderer, Windows only)
* `--use-angle=d3d11` (Direct3D 11 renderer, Windows only)
* `--use-angle=d3d11on12` (Direct3D 11on12 renderer, Windows only)
* `--use-angle=gl` (OpenGL renderer)
* `--use-angle=gles` (OpenGL ES renderer)
* `--use-angle=vulkan` (Vulkan renderer)
* `--use-angle=swiftshader` (SwiftShader renderer)
* `--use-angle=metal` (Metal renderer, macOS only)
Additional useful options:
* `--enable-logging`: To see logs
* `--disable-gpu-watchdog`: To disable Chromium's watchdog, killing the GPU process when slow (due
to a debug build for example)
* `--disable-gpu-sandbox`: To disable Chromium's sandboxing features, if it's getting in the way of
testing.
* `--disable-gpu-compositing`: To make sure only the WebGL test being debugged is run through ANGLE,
not the entirety of Chromium.

View File

@@ -1,216 +0,0 @@
# ANGLE Development
ANGLE provides OpenGL ES 3.1 and EGL 1.5 libraries and tests. You can use these to build and run OpenGL ES applications on Windows, Linux, Mac and Android.
## Development setup
### Version Control
ANGLE uses git for version control. Helpful documentation can be found at [http://git-scm.com/documentation](http://git-scm.com/documentation).
### Required First Setup (do this first)
Note: If you are building inside a Chromium checkout [see these instructions instead](https://chromium.googlesource.com/angle/angle/+/HEAD/doc/BuildingAngleForChromiumDevelopment.md).
Required on all platforms:
* [Python 3](https://www.python.org/downloads/) must be available in your path.
* [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
* Required to download dependencies (with gclient), generate build files (with GN), and compile ANGLE (with ninja).
* Ensure `depot_tools` is in your path as it provides ninja for compilation.
* For Googlers, run `download_from_google_storage --config` to login to Google Storage before fetching the source.
On Windows:
* ***IMPORTANT: Set `DEPOT_TOOLS_WIN_TOOLCHAIN=0` in your environment if you are not a Googler.***
* Install [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/)
* Install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/).
* You can install it through Visual Studio Installer if available. It might be necessary to switch to the `Individual components` tab to find the latest version.
* The currently supported Windows SDK version can be found in [vs_toolchain.py](https://chromium.googlesource.com/chromium/src/build/+/refs/heads/main/vs_toolchain.py).
* The SDK is required for GN-generated Visual Studio projects, the D3D Debug runtime, and the latest HLSL Compiler runtime.
* (optional) See the [Chromium Windows build instructions](https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md) for more info.
On Linux:
* Dependencies will be handled later (see `install-build-deps.sh` below).
On MacOS:
* [XCode](https://developer.apple.com/xcode/) for Clang and development files.
* For Googlers on MacOS, you'll first need authorization to download macOS SDK's from Chromium
servers before running `gclient sync`. Obtain this authorization via `cipd auth-login`
and following the instructions.
### Getting the source
```
mkdir angle
cd angle
fetch angle
```
If you're contributing code, you will also need to set up the Git `commit-msg` hook. See [ContributingCode#getting-started-with-gerrit](ContributingCode.md#getting-started-with-gerrit) for instructions.
On Linux only, you need to install all the necessary dependencies before going further by running this command:
```
./build/install-build-deps.sh
```
If building for Android (which requires Linux), switch to the [Android steps](https://chromium.googlesource.com/angle/angle.git/+/HEAD/doc/DevSetupAndroid.md) at this point.
After this completes successfully, you are ready to generate the ninja files:
```
gn gen out/Debug
```
If you had trouble checking out the code, please inspect the error message. As
a reminder, on Windows, ensure you **set `DEPOT_TOOLS_WIN_TOOLCHAIN=0` in
your environment if you are not a Googler**. If you are a Googler, ensure you
ran `download_from_google_storage --config`.
GN will generate ninja files. The default build options build ANGLE with clang
and in release mode. Often, the default options are the desired ones, but
they can be changed by running `gn args out/Debug`. Some options that are
commonly overriden for development are:
```
is_component_build = true/false (false forces static links of dependencies)
target_cpu = "x64"/"x86" (the default is "x64")
is_debug = true/false (use false for release builds. is_debug = true is the default)
angle_assert_always_on = true/false (enables release asserts and runtime debug layers)
is_clang = false (NOT RECOMMENDED) (to use system default compiler instead of clang)
```
For a release build run `gn args out/Release` and set `is_debug = false`.
Optionally set `angle_assert_always_on = true` for Release testing.
On Windows, you can build for the Universal Windows Platform (UWP) by setting
`target_os = "winuwp"` in the args. Setting `is_component_build = false` is
highly recommended to support moving libEGL.dll and libGLESv2.dll to an
application's directory and being self-contained, instead of depending on
other DLLs (d3dcompiler_47.dll is still needed for the Direct3D backend). We
also recommend using `is_clang = false` with UWP.
For more information on GN run `gn help`.
Use `autoninja` to compile on all platforms with one of the following commands:
```
autoninja -C out/Debug
autoninja -C out/Release
```
`depot_tools` provides `autoninja`, so it should be available in your path
from earlier steps. Ninja automatically calls GN to regenerate the build
files on any configuration change. `autoninja` automatically specifies a
thread count to `ninja` based on your system configuration.
### Building with Goma (Google employees only)
In addition, we highly recommend Google employees use goma, a distributed
compilation system. Detailed information is available internally. To enable
Goma set the GN arg:
```
use_goma = true
```
### Building and Debugging with Visual Studio
To generate the Visual Studio solution in `out/Debug/angle-debug.sln`:
```
gn gen out/Debug --sln=angle-debug --ide=vs2022 --ninja-executable="C:\src\angle\third_party\ninja\ninja.exe"
```
In Visual Studio:
1. Open the ANGLE solution file `out/Debug/angle-debug.sln`.
2. We recommended you use `autoninja` from a command line to build manually.
3. "Build Solution" from the IDE is broken with GN. You can use the IDE to build one target or one file at a time.
Once the build completes, all ANGLE libraries, tests, and samples will be located in `out/Debug`.
### Building ANGLE for Android
See the Android specific [documentation](DevSetupAndroid.md#ANGLE-for-Android).
## Application Development with ANGLE
This sections describes how to use ANGLE to build an OpenGL ES application.
### Choosing a Backend
ANGLE can use a variety of backing renderers based on platform. On Windows, it defaults to D3D11 where it's available,
or D3D9 otherwise. On other desktop platforms, it defaults to GL. On mobile, it defaults to GLES.
ANGLE provides an EGL extension called `EGL_ANGLE_platform_angle` which allows uers to select
which renderer to use at EGL initialization time by calling eglGetPlatformDisplayEXT with special
enums. Details of the extension can be found in its specification in
`extensions/EGL_ANGLE_platform_angle.txt` and `extensions/EGL_ANGLE_platform_angle_*.txt` and
examples of its use can be seen in the ANGLE samples and tests, particularly `util/EGLWindow.cpp`.
To change the default D3D backend:
1. Open `src/libANGLE/renderer/d3d/DisplayD3D.cpp`
2. Locate the definition of `ANGLE_DEFAULT_D3D11` near the head of the file, and set it to your preference.
To remove any backend entirely:
1. Run `gn args <path/to/build/dir>`
2. Set the appropriate variable to `false`. Options are:
- `angle_enable_d3d9`
- `angle_enable_d3d11`
- `angle_enable_gl`
- `angle_enable_metal`
- `angle_enable_null`
- `angle_enable_vulkan`
- `angle_enable_essl`
- `angle_enable_glsl`
### To Use ANGLE in Your Application
On Windows:
1. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files.
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, click _C/C++_.
* Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_.
2. Configure your build environment to have access to `libEGL.lib` and `libGLESv2.lib` found in the build output directory (see [Building ANGLE](#building-with-visual-studio)).
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
* Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
3. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](#building-with-visual-studio)) into your application folder.
4. Code your application to the Khronos [OpenGL ES 2.0](http://www.khronos.org/registry/gles/) and [EGL 1.4](http://www.khronos.org/registry/egl/) APIs.
On Linux and MacOS, either:
- Link you application against `libGLESv2` and `libEGL`
- Use `dlopen` to load the OpenGL ES and EGL entry points at runtime.
## GLSL ES Translator
In addition to OpenGL ES and EGL libraries, ANGLE also provides a GLSL ES
translator. The translator targets various back-ends, including HLSL, GLSL
for desktop and mobile, SPIR-V and Metal SL. To build the translator, build
the `angle_shader_translator` target. Run the translator binary without
arguments to see a usage message.
### Source and Building
The translator code is included with ANGLE but fully independent; it resides
in [`src/compiler`](../src/compiler). Follow the steps above for
[getting and building ANGLE](#getting-the-source) to build the translator on
the platform of your choice.
### Usage
The ANGLE [`shader_translator`](../samples/shader_translator/shader_translator.cpp)
sample demos basic C++ API usage. To translate a GLSL ES shader, call the following
functions in the same order:
* `sh::Initialize()` initializes the translator library and must be called only once from each process using the translator.
* `sh::ContructCompiler()` creates a translator object for vertex or fragment shader.
* `sh::Compile()` translates the given shader.
* `sh::Destruct()` destroys the given translator.
* `sh::Finalize()` shuts down the translator library and must be called only once from each process using the translator.

View File

@@ -1,265 +0,0 @@
# ANGLE for Android
**Important note**: Android builds currently require Linux.
## Setting up the ANGLE build for Android
Please follow the instructions in [DevSetup](DevSetup.md) to check out and bootstrap ANGLE with
gclient. Then edit your `.gclient` to add `target_os = ['android']` to check out Android
dependencies. Then run `gclient sync` to download all required sources and packages.
The following command will open a text editor to populate GN args for an Android Release build:
```
gn args out/Android
```
Once the editor is up, paste the following GN args to generate an Android build, and save the file.
```
target_os = "android"
target_cpu = "arm64"
is_component_build = false
is_debug = false
angle_assert_always_on = true # Recommended for debugging. Turn off for performance.
use_goma = true # Googlers-only! If you're not a Googler remove this.
```
More targeted GN arg combinations can be found [below](#android-gn-args-combinations).
If you run into any problems with the above, you can copy the canonical args from CI:
- Visit the ANGLE [CI Waterfall](https://ci.chromium.org/p/angle/g/ci/console).
- Open any recent Android build.
- Expand the for "lookup GN args" step and copy the GN args.
- Always omit the `goma_dir` flag.
- If you are not a Googler, also omit the `use_goma` flag.
## Building ANGLE for Android
Build all ANGLE targets using the following command:
```
autoninja -C out/Android
```
Most ANGLE build targets are supported. We do not support the ANGLE samples on
Android currently. ANGLE tests will be in your `out/Android` directory, and can
be run with various options. For instance, angle perftests can be run with:
```
./out/Android/angle_perftests --verbose --local-output --gtest_filter=DrawCallPerf*
```
Additional details are in [Android Test Instructions][AndroidTest].
Additional Android dEQP notes can be found in [Running dEQP on Android](dEQP.md#Running-dEQP-on-Android).
If you are targeting WebGL and want to run with ANGLE, you will need to build within a full
Chromium checkout. Please follow the [Chromium build instructions for Android][ChromeAndroid].
Also refer to the [ANGLE Guide][ANGLEChrome] on how to work with Top of Tree ANGLE in Chromium.
Build the `chrome_public_apk` target, and follow the [GPU Testing][GPU Testing] doc, using
`--browser=android-chromium`. Make sure to set your `CHROMIUM_OUT_DIR` environment variable, so
that your browser is found, otherwise the tests will use the stock browser.
[AndroidTest]: https://chromium.googlesource.com/chromium/src/+/main/docs/testing/android_test_instructions.md
[GPU Testing]: http://www.chromium.org/developers/testing/gpu-testing#TOC-Running-the-GPU-Tests-Locally
[ChromeAndroid]: https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md
[ANGLEChrome]: BuildingAngleForChromiumDevelopment.md
## Using ANGLE as the Android OpenGL ES driver
Starting with Android 10 (Q), you can load ANGLE as your device's OpenGL ES driver.
`== Important Note ==` You can only run this ANGLE with *DEBUGGABLE APPS* or when you have
*ROOT ACCESS*. Debuggable apps are [marked debuggable][Debuggable] in the manifest. For root
access, see the [Android documentation][UserDebug] for how to build from source.
To build the ANGLE APK, you must first bootstrap your build by following the steps
[above](#ANGLE-for-Android). The steps below will result in an APK that contains the ANGLE
libraries and can be installed on any Android 10+ build.
Apps can be opted in to ANGLE [one at a time](#ANGLE-for-a-single-OpenGL-ES-app), in
[groups](#ANGLE-for-multiple-OpenGL-ES-apps), or [globally](#ANGLE-for-all-OpenGL-ES-apps). The
apps must be launched by the Java runtime since the libraries are discovered within an installed
package. This means ANGLE cannot be used by native executables or SurfaceFlinger at this time.
## Building the ANGLE APK
Using `gn args` from above, you can build the ANGLE apk using:
```
autoninja -C out/Android angle_apks
```
## Installing the ANGLE APK
```
adb install -r -d --force-queryable out/Android/apks/AngleLibraries.apk
```
You can verify installation by looking for the package name:
```
$ adb shell pm path org.chromium.angle
package:/data/app/org.chromium.angle-HpkUceNFjoLYKPbIVxFWLQ==/base.apk
```
Note that `angle_debug_package` must be set to `org.chromium.angle` for this apk to be loaded.
## Selecting ANGLE as the OpenGL ES driver
For debuggable applications or root users, you can tell the platform to load ANGLE libraries from
the installed package.
```
adb shell settings put global angle_debug_package org.chromium.angle
```
Remember that ANGLE can only be used by applications launched by the Java runtime.
## ANGLE driver choices
There are multiple values you can use for selecting which OpenGL ES driver is loaded by the platform.
The following values are supported for `angle_gl_driver_selection_values`:
- `angle` : Use ANGLE.
- `native` : Use the native OpenGL ES driver.
- `default` : Use the default driver. This allows the platform to decide which driver to use.
In each section below, replace `<driver>` with one of the values above.
### ANGLE for a *single* OpenGL ES app
```
adb shell settings put global angle_gl_driver_selection_pkgs <package name>
adb shell settings put global angle_gl_driver_selection_values <driver>
```
### ANGLE for *multiple* OpenGL ES apps
Similar to selecting a single app, you can select multiple applications by listing their package
names and driver choice in comma separated lists. Note the lists must be the same length, one
driver choice per package name.
```
adb shell settings put global angle_gl_driver_selection_pkgs <package name 1>,<package name 2>,<package name 3>,...
adb shell settings put global angle_gl_driver_selection_values <driver 1>,<driver 2>,<driver 3>,...
```
### ANGLE for *all* OpenGL ES apps
`Note: This method only works on a device with root access.`
Enable:
```
adb shell settings put global angle_gl_driver_all_angle 1
```
Disable:
```
adb shell settings put global angle_gl_driver_all_angle 0
```
## Check for success
Check to see that ANGLE was loaded by your application:
```
$ adb logcat -d | grep ANGLE
V GraphicsEnvironment: ANGLE developer option for <package name>: angle
I GraphicsEnvironment: ANGLE package enabled: org.chromium.angle
I ANGLE : Version (2.1.0.f87fac56d22f), Renderer (Vulkan 1.1.87(Adreno (TM) 615 (0x06010501)))
```
Note that this might be logged by the built-in ANGLE and not the installed apk if `angle_debug_package` wasn't set.
## Clean up
Settings persist across reboots, so it is a good idea to delete them when finished.
```
adb shell settings delete global angle_debug_package
adb shell settings delete global angle_gl_driver_all_angle
adb shell settings delete global angle_gl_driver_selection_pkgs
adb shell settings delete global angle_gl_driver_selection_values
```
## Troubleshooting
If your application is not debuggable or you are not root, you may see an error like this in the log:
```
$ adb logcat -d | grep ANGLE
V GraphicsEnvironment: ANGLE developer option for <package name>: angle
E GraphicsEnvironment: Invalid number of ANGLE packages. Required: 1, Found: 0
E GraphicsEnvironment: Failed to find ANGLE package.
```
Double check that you are root, or that your application is [marked debuggable][Debuggable].
## Android GN args combinations
The [above](#angle-gn-args-for-android) GN args only modify default values to generate a Debug
build for Android. Below are some common configurations used for different scenarios.
To determine what is different from default, you can point the following command at your target
directory. It will show the list of gn args in use, where they came from, their current value,
and their default values.
```
gn args --list <dir>
```
### Performance config
This config is designed to get maximum performance by disabling debug configs and validation layers.
Note: The oddly named `is_official_build` is a more aggressive optimization level than `Release`. Its name is historical.
```
target_os = "android"
target_cpu = "arm64"
angle_enable_vulkan = true
is_component_build = false
is_official_build = true
is_debug = false
```
### Debug config
This config is useful for quickly ensuring Vulkan is running cleanly. It disables debug, but
enables asserts and allows validation errors.
```
target_os = "android"
target_cpu = "arm64"
is_component_build = false
is_debug = true
```
#### Application Compatibility
Application compatibility may be increased by enabling non-conformant features and extensions with
a GN arg:
```
angle_expose_non_conformant_extensions_and_versions = true
```
## Accessing ANGLE traces
To sync and build the ANGLE traces, jump to [ANGLE Restricted Traces](https://chromium.googlesource.com/angle/angle.git/+/HEAD/src/tests/restricted_traces/README.md#angle-restricted-traces).
## Command line for launching chrome on Android
[This Makefile](https://github.com/phuang/test/blob/main/chromium/Makefile) contains many useful
command lines for launching chrome.
Targets run_chrome_public_apk_* is for launching chrome on Android.
To use this Makefile, download it into chrome build tree, and use below commands (for more targets please check Makefile)
```
# To edit gn args
$ make args OUT=out_android/Release # The OUT can be set in Makefile instead of passing it in command line
# Build and run chrome on Android device with GLRenderer
$ make run_chrome_public_apk_gl
# Build and run chrome on Android device with SkiaRenderer
$ make run_chrome_public_apk_skia
# Run adb logcat
$ make adb_logcat
# Symbolize Android crash stack
$ make android_symbol
# Build and run gpu_unittests
$ make gpu_unittests GTEST_FILTER="gtest-filters" # If GTEST_FILTER is not specified, all tests will be run.
```
[Debuggable]: https://developer.android.com/guide/topics/manifest/application-element#debug
[UserDebug]: https://source.android.com/setup/build/building

View File

@@ -1,111 +0,0 @@
# Dirty Bits and State Changes
OpenGL render loops typically involve changing some render states followed by
a draw call. For instance the app might change a few uniforms and invoke
`glDrawElements`:
```
for (const auto &obj : scene) {
for (const auto &uni : obj.uniforms) {
glUniform4fv(uni.loc, uni.data);
}
glDrawElements(GL_TRIANGLES, obj.eleCount, GL_UNSIGNED_SHORT, obj.eleOffset);
}
```
Another update loop may change Texture and Vertex Array state before the draw:
```
for (const auto &obj : scene) {
glBindBuffer(GL_ARRAY_BUFFER, obj.arrayBuffer);
glBufferSubData(GL_ARRAY_BUFFER, obj.bufferOffset, obj.bufferSize, obj.bufferData);
glVertexAttribPointer(obj.arrayIndex, obj.arraySize, GL_FLOAT, GL_FALSE, 0, nullptr);
glBindTexture(GL_TEXTURE_2D, obj.texture);
glDrawElements(GL_TRIANGLES, obj.eleCount, GL_UNSIGNED_SHORT, obj.eleOffset);
}
```
Other update loops may change render states like the blending modes, the depth test, or Framebuffer
attachments. In each case ANGLE needs to validate, track, and translate these state changes to the
back-end as efficiently as possible.
## Dirty Bits
Each OpenGL Context state value is stored in [`gl::State`](../src/libANGLE/State.h). For instance
the blending state, depth/stencil state, and current object bindings. Our problem is deciding how to
notify the back-end when app changes front-end state. We decided to bundle changed state into
bitsets. Each 1 bit indicates a specific changed state value. We call these bitsets "*dirty bits*".
See [`gl::State::DirtyBitType`][DirtyBitType].
Each back-end handles state changes in a `syncState` implementation function that takes a dirty
bitset. See examples in the [GL back-end][GLSyncState], [D3D11 back-end][D3D11SyncState] and
[Vulkan back-end][VulkanSyncState].
Container objects such as Vertex Array Objects and Framebuffers also have their own OpenGL front-end
state. [VAOs][VAOState] store vertex arrays and array buffer bindings. [Framebuffers][FBOState]
store attachment state and the active read and draw buffers. These containers also have internal
dirty bits and `syncState` methods. See [`gl::Framebuffer::DirtyBitType`][FBODirtyBits] and
[`rx::FramebufferVk::syncState`][FBOVkSyncState] for example.
Dirty bits allow us to efficiently process groups of state updates. We use fast instrinsic functions
to scan the bitsets for 1 bits. See [`bitset_utils.h`](../src/common/bitset_utils.h) for more
information.
## Cached Validation and State Change Notifications
To optimize validation we cache many checks. See [`gl::StateCache`][StateCache] for examples. We
need to refresh cached values on state changes. For instance, enabling a generic vertex array
changes a cached mask of active vertex arrays. Changes to a texture's images could change a cached
framebuffer's completeness when the texture is bound as an attachment. And if the draw framebuffer
becomes incomplete it changes a cached draw call validation check.
See a below example of a call to `glTexImage2D` that can affect draw call validation:
<!-- Generated from https://bramp.github.io/js-sequence-diagrams/
participant App
participant Context
participant Framebuffer
participant Texture
App->Context: glTexImage2D
Context->Texture: setImage
Texture- ->Framebuffer: onSubjectStateChange
Note over Framebuffer: cache update
Framebuffer- ->Context: onSubjectStateChange
Note over Context: cache update
-->
![State Change Example](https://raw.githubusercontent.com/google/angle/main/doc/img/StateNotificationExample.svg?sanitize=true)
We use the [Observer pattern](https://en.wikipedia.org/wiki/Observer_pattern) to implement cache
invalidation notifications. See [`Observer.h`](../src/libANGLE/Observer.h). In the example the
`Framebuffer` observes `Texture` attachments via [`angle::ObserverBinding`][ObserverBinding].
`Framebuffer` implements [`angle::ObserverInterface::onSubjectStateChange`][FBOStateChange] to
receive a notification to update its completeness cache. The `STORAGE_CHANGED` message triggers a
call to [`gl::Context::onSubjectStateChange`][ContextStateChange] which in turn calls
[`gl::StateCache::updateBasicDrawStatesError`][StateCacheUpdate] to re-validate the draw
framebuffer's completeness. On subsequent draw calls we skip re-validation at minimal cost.
See the below diagram for the dependency relations between Subjects and Observers.
![State Change Notification Flow](https://raw.githubusercontent.com/google/angle/main/doc/img/StateChangeNotificationFlow.svg?sanitize=true)
## Back-end specific Optimizations
See [Fast OpenGL State Transitions][FastStateTransitions] in [Vulkan documents][VulkanREADME] for
additional information for how we implement state change optimization on the Vulkan back-end.
[DirtyBitType]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/State.h#483
[GLSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/gl/StateManagerGL.cpp#1576
[D3D11SyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp#852
[VulkanSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/vulkan/ContextVk.cpp#642
[VAOState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/VertexArray.h#35
[FBOState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.h#52
[FBODirtyBits]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.h#319
[FBOVkSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/vulkan/FramebufferVk.cpp#726
[StateCache]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.h#98
[ObserverBinding]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Observer.h#103
[FBOStateChange]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.cpp#1811
[ContextStateChange]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.cpp#7981
[StateCacheUpdate]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.cpp#8190
[FastStateTransitions]: ../src/libANGLE/renderer/vulkan/doc/FastOpenGLStateTransitions.md
[VulkanREADME]: ../src/libANGLE/renderer/vulkan/README.md

View File

@@ -1,24 +0,0 @@
# About
Because ANGLE can only generate full HLSL programs after we known the signatures
between the vertex and pixel stages, we can not immediately call the D3D
compiler at GL shader compile time. Moreover, we can insert additional
optimization code right at draw-time.
ESSL 1.00 shaders treat all vertex inputs as floating point. We insert a
conversion routine to transform un-normalized integer vertex attributes in the
shader preamble to floating point, saving CPU conversion time.
At draw-time, we also optimize out any unused render target outputs. This
improved draw call performance significantly on lower spec and integrated
devices. Changing render target setups may trigger a shader recompile at draw
time.
# Addendum
ANGLE is not the only program to do this kind of draw-time optimization. A
common complaint from application developers is that draw calls sometimes
perform very slowly due to dynamic shader re-compilation. A future design
direction for ANGLE, when targeting a more modern API, is to perform the vertex
conversion in a separate shader pass, which would then be linked with another
compiled shader.

View File

@@ -1,22 +0,0 @@
# ES1 Status
ES1 is implemented entirely in the front-end using features from GLES3.0. Therefore, every backend
with GLES3 support (i.e. everything other than D3D9) supports GLES1 as well.
ANGLE passes GLES1's `MustPass`, however there are known missing features.
| Features | Status | Backends |
|:-------------------------------------|:---------------------------------------------|:------------|
| Logic Op | Implemented through extensions [1](#notes-1) | Vulkan, GL |
| Palette compressed textures | Emulated with uncompressed format | Vulkan |
| [Smooth lines][lines] | Unimplemented | None |
| [Two-sided lighting][lighting] | Unimplemented | None |
| [Matrix palette][matrix] | Unimplemented (optional) | None |
[lines]: http://anglebug.com/7950
[lighting]: http://anglebug.com/7702
[matrix]: http://anglebug.com/7951
### Notes [1]
* Logic op is implemented through the `ANGLE_logic_op` or `EXT_framebuffer_fetch` extensions.
* Currently, these are supported on the Vulkan and GL backends only.

View File

@@ -1,31 +0,0 @@
# ES31 Status on Direct3D 11
| New Features | Status | Limitations |
|:---------------------------------------------------|:-----------------------------|:------------|
| Arrays of arrays (shading language only) | Fully implemented | None |
| Compute shaders | Fully implemented | None |
| Explicit uniform location | Fully implemented | None |
| Framebuffers with no attachments | Fully implemented | None |
| Indirect draw commands | Fully implemented | None |
| Multisample formats for immutable textures | Fully implemented | None |
| Program interface queries | Fully implemented | None |
| Shader bitfield operations (shading language only) | Fully implemented | None |
| Shader layout binding (shading language only) | Fully implemented | None |
| Texture gather operations | Fully implemented | None |
| Vertex attribute binding | Fully implemented | None |
| Atomic counters | Implemented with limitations | Atomic counters in non-compute shaders are not implemented yet. |
| Shader image load/store operations | Implemented with limitations | See notes [1] [below](#notes-1) |
| Shader storage buffer objects | Implemented with limitations | See notes [2] [below](#notes-2) |
| Shader helper invocation (shading language only) | Hard to implement | The equivalent of gl_HelperInvocation is WaveIsHelperLane which requres SM6. |
| Separate shader objects | Unimplemented | It can be implemented with medium complexity. |
| Stencil texturing | Unimplemented | It can be implemented with medium complexity. Refer [here](https://stackoverflow.com/questions/34601325/directx11-read-stencil-bit-from-compute-shader). |
### Notes [1]
* Images in non-compute shaders are not implemented yet.
* Multiple image variables are not allowed to be bound to the same image unit which refers to the same layer and level of a texture image. It means image aliasing is not supported.
* The same layer and level of a texture are not allowed to be bound to multiple image units.
* When a texture is bound to an image unit, the image unit format must exactly match the texture internal format. Similarly, the format layout qualifier for an image variable must exactly match the format of the image unit. Re-interpretation is not supported. See [here](http://anglebug.com/3038).
### Notes [2]
* Shader storage blocks in non-compute shaders are not implemented yet.
* Multiple shader storage blocks are not allowed to be bound to the same buffer. See [here](http://anglebug.com/3032).

View File

@@ -1,351 +0,0 @@
# ANGLE Supported Extensions
This is a list of all extensions currently supported by ANGLE's front-end, and
support listed for some of the tested targets for ANGLE's Vulkan back-end. To
produce a list of all supported extensions in the Vulkan back-end, run
`angle_end2end_tests` with `--gtest_filter EGLPrintEGLinfoTest.PrintGLInfo/ES*_Vulkan`.
Specifications for GLES extensions can be found in the [Khronos OpenGL ES API
Registry](http://www.khronos.org/registry/gles/)
Specifications for EGL extensions can be found in the [Khronos EGL API
Registry](http://www.khronos.org/registry/egl/)
Specifications for ANGLE-specific extensions can be found in the [ANGLE
extension registry](../extensions)
This list is automatically generated by [`gen_extensions.py`](../src/libANGLE/gen_extensions.py)
using data from registry_xml.py and gl.xml.
## GLES 2.0, 3.0, 3.1 and 3.2 extension support
*Note: some data is sampled from older drivers, so might not represent the latest driver support.*
| Extension Name | NVIDIA 1660 Win10 | Intel 630 Win10 | NVIDIA 1660 Linux | Intel 630 Linux | SwiftShader Win10 | Pixel 4 Android 11 | Pixel 6 Android 13 |
| -------------- | :---------------: | :-------------: | :---------------: | :-------------: | :---------------: | :----------------: | :----------------: |
| [GL_EXT_base_instance](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_base_instance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_blend_equation_advanced](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_blend_equation_advanced.txt) | &#x2714; | | &#x2714; | | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_blend_func_extended](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_func_extended.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; | |
| [GL_EXT_blend_minmax](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_minmax.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_buffer_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_buffer_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_clip_control](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_clip_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_clip_cull_distance](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_clip_cull_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_APPLE_clip_distance](https://khronos.org/registry/OpenGL/extensions/APPLE/APPLE_clip_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_EXT_color_buffer_float](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_color_buffer_half_float](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_R11_signed_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_R11_signed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_R11_unsigned_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_R11_unsigned_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_RG11_signed_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_RG11_signed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_RG11_unsigned_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_RG11_unsigned_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_compressed_ETC1_RGB8_sub_texture](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_compressed_ETC1_RGB8_sub_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC1_RGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_punchthroughA_RGBA8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_RGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_RGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_RGBA8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_RGBA8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_sRGB8_alpha8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_sRGB8_alpha8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_sRGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_sRGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_paletted_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_paletted_texture.txt) | | | | | | | |
| [GL_EXT_conservative_depth](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_conservative_depth.txt) | | | | | | | |
| [GL_EXT_copy_image](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_copy_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_copy_image](https://khronos.org/registry/OpenGL/extensions/OES/OES_copy_image.txt) | | | | | | | |
| [GL_KHR_debug](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_debug_label](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_debug_label.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_debug_marker](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_debug_marker.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth24](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth24.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth32](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth32.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_depth_buffer_float2](https://khronos.org/registry/OpenGL/extensions/NV/NV_depth_buffer_float2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_depth_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_depth_clamp.txt) | | | | | | | |
| [GL_ANGLE_depth_texture](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_depth_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth_texture_cube_map](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth_texture_cube_map.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_discard_framebuffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_discard_framebuffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_disjoint_timer_query](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_disjoint_timer_query.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_buffers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_buffers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_buffers_indexed](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_buffers_indexed.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_draw_buffers_indexed](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_buffers_indexed.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_elements_base_vertex](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_elements_base_vertex.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_draw_elements_base_vertex](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_elements_base_vertex.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_array](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image_external](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image_external_essl3](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external_essl3.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_external_wrap_modes](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_external_wrap_modes.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_EGL_stream_consumer_external](https://khronos.org/registry/OpenGL/extensions/NV/NV_EGL_stream_consumer_external.txt) | | | | | | | |
| [GL_OES_EGL_sync](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_sync.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_element_index_uint](https://khronos.org/registry/OpenGL/extensions/OES/OES_element_index_uint.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANDROID_extension_pack_es31a](https://khronos.org/registry/OpenGL/extensions/ANDROID/ANDROID_extension_pack_es31a.txt) | &#x2714; | | | | | | &#x2714; |
| [GL_EXT_external_buffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_buffer.txt) | | | | | | &#x2714; | &#x2714; |
| [GL_OES_fbo_render_mipmap](https://khronos.org/registry/OpenGL/extensions/OES/OES_fbo_render_mipmap.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_fence](https://khronos.org/registry/OpenGL/extensions/NV/NV_fence.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_float_blend](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_float_blend.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_EXT_frag_depth](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_frag_depth.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_framebuffer_blit](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_framebuffer_blit.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_framebuffer_blit](https://khronos.org/registry/OpenGL/extensions/NV/NV_framebuffer_blit.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_MESA_framebuffer_flip_y](https://khronos.org/registry/OpenGL/extensions/MESA/MESA_framebuffer_flip_y.txt) | | | | | | | |
| [GL_EXT_geometry_shader](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_geometry_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_geometry_shader](https://khronos.org/registry/OpenGL/extensions/OES/OES_geometry_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_get_program_binary](https://khronos.org/registry/OpenGL/extensions/OES/OES_get_program_binary.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_gpu_shader5](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_gpu_shader5.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_ANGLE_instanced_arrays](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_instanced_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_instanced_arrays](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_instanced_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_mapbuffer](https://khronos.org/registry/OpenGL/extensions/OES/OES_mapbuffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_map_buffer_range](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_map_buffer_range.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_memory_object](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_memory_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_memory_object_fd](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_objects_fd.txt) | | | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_EXT_multi_draw_indirect](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multi_draw_indirect.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_multisample_compatibility](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisample_compatibility.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_multisampled_render_to_texture](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt) | | | | | | | |
| [GL_EXT_multisampled_render_to_texture2](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture2.txt) | | | | | | | |
| [GL_OVR_multiview](https://khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OVR_multiview2](https://khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_no_error](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_no_error.txt) | | | | | | | |
| [GL_EXT_occlusion_query_boolean](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_occlusion_query_boolean.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_packed_depth_stencil](https://khronos.org/registry/OpenGL/extensions/OES/OES_packed_depth_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_pack_reverse_row_order](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_pack_reverse_row_order.txt) | | | | | | | |
| [GL_NV_pack_subimage](https://khronos.org/registry/OpenGL/extensions/NV/NV_pack_subimage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_parallel_shader_compile](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_parallel_shader_compile.txt) | | | | | | | |
| [GL_AMD_performance_monitor](https://khronos.org/registry/OpenGL/extensions/AMD/AMD_performance_monitor.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_pixel_buffer_object](https://khronos.org/registry/OpenGL/extensions/NV/NV_pixel_buffer_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_polygon_mode](https://khronos.org/registry/OpenGL/extensions/NV/NV_polygon_mode.txt) | | | | | | | |
| [GL_EXT_polygon_offset_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_polygon_offset_clamp.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_primitive_bounding_box](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_primitive_bounding_box.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_primitive_bounding_box](https://khronos.org/registry/OpenGL/extensions/OES/OES_primitive_bounding_box.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_protected_textures](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_protected_textures.txt) | | | | | | &#x2714; | |
| [GL_EXT_pvrtc_sRGB](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_pvrtc_sRGB.txt) | | | | | | | |
| [GL_NV_read_depth](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_depth.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_read_depth_stencil](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_depth_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_read_format_bgra](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_read_format_bgra.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_read_stencil](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_QCOM_render_shared_exponent](https://khronos.org/registry/OpenGL/extensions/QCOM/QCOM_render_shared_exponent.txt) | | | | | | | |
| [GL_EXT_render_snorm](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_render_snorm.txt) | | | | | | | |
| [GL_OES_rgb8_rgba8](https://khronos.org/registry/OpenGL/extensions/OES/OES_rgb8_rgba8.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_robust_buffer_access_behavior](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_robust_buffer_access_behavior.txt) | | | | | | | |
| [GL_EXT_robustness](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_robustness.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_robustness_video_memory_purge](https://khronos.org/registry/OpenGL/extensions/NV/NV_robustness_video_memory_purge.txt) | | | | | | | |
| [GL_OES_sample_shading](https://khronos.org/registry/OpenGL/extensions/OES/OES_sample_shading.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_sample_variables](https://khronos.org/registry/OpenGL/extensions/OES/OES_sample_variables.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_semaphore](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_semaphore.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_semaphore_fd](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_objects_fd.txt) | | | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_EXT_separate_shader_objects](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_separate_shader_objects.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ARM_shader_framebuffer_fetch](https://khronos.org/registry/OpenGL/extensions/ARM/ARM_shader_framebuffer_fetch.txt) | | | | | &#x2714; | | &#x2714; |
| [GL_EXT_shader_framebuffer_fetch](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch.txt) | | | | | &#x2714; | | &#x2714; |
| [GL_EXT_shader_framebuffer_fetch_non_coherent](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch_non_coherent.txt) | | | | | &#x2714; | | |
| [GL_OES_shader_image_atomic](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_image_atomic.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_io_blocks](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_io_blocks.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_shader_io_blocks](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_io_blocks.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_shader_multisample_interpolation](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_multisample_interpolation.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_non_constant_global_initializers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_non_constant_global_initializers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_shader_noperspective_interpolation](https://khronos.org/registry/OpenGL/extensions/NV/NV_shader_noperspective_interpolation.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_texture_lod](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_texture_lod.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_QCOM_shading_rate](https://khronos.org/registry/OpenGL/extensions/QCOM/QCOM_shading_rate.txt) | | | | | | | |
| [GL_EXT_shadow_samplers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shadow_samplers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB_write_control](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB_write_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_standard_derivatives](https://khronos.org/registry/OpenGL/extensions/OES/OES_standard_derivatives.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_surfaceless_context](https://khronos.org/registry/OpenGL/extensions/OES/OES_surfaceless_context.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ARB_sync](https://khronos.org/registry/OpenGL/extensions/ARB/ARB_sync.txt) | | | | | | | |
| [GL_EXT_tessellation_shader](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_tessellation_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_texture_3D](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_3D.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_border_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_border_clamp.txt) | &#x2714; | &#x2714; | | | &#x2714; | | &#x2714; |
| [GL_OES_texture_border_clamp](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_border_clamp.txt) | &#x2714; | &#x2714; | | | &#x2714; | | &#x2714; |
| [GL_EXT_texture_buffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_buffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_buffer](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_buffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_compression_astc](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt) | | | | | | | |
| [GL_EXT_texture_compression_astc_decode_mode](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_astc_decode_mode.txt) | | | | | | | |
| [GL_EXT_texture_compression_astc_decode_mode_rgb9e5](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_astc_decode_mode_rgb9e5.txt) | | | | | | | |
| [GL_KHR_texture_compression_astc_hdr](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_hdr.txt) | | | | | | | |
| [GL_KHR_texture_compression_astc_ldr](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_ldr.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_texture_compression_astc_sliced_3d](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_sliced_3d.txt) | | | | | | | |
| [GL_EXT_texture_compression_bptc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_bptc.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_compression_dxt1](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_dxt1.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_IMG_texture_compression_pvrtc](https://khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc.txt) | | | | | | | |
| [GL_IMG_texture_compression_pvrtc2](https://khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc2.txt) | | | | | | | |
| [GL_EXT_texture_compression_rgtc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_rgtc.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_compression_s3tc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc.txt) | | | | | | | |
| [GL_EXT_texture_compression_s3tc_srgb](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc_srgb.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_cube_map_array](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_cube_map_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_cube_map_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_cube_map_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_filter_anisotropic](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_filter_anisotropic.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_filter_minmax](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_filter_minmax.txt) | | | | | | | |
| [GL_OES_texture_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_float_linear](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_float_linear.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; |
| [GL_EXT_texture_format_BGRA8888](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_format_sRGB_override](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_sRGB_override.txt) | | &#x2714; | | | | | |
| [GL_OES_texture_half_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_half_float_linear](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_half_float_linear.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_mirror_clamp_to_edge](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_mirror_clamp_to_edge.txt) | | | | | | | |
| [GL_EXT_texture_norm16](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt) | | &#x2714; | | &#x2714; | | | |
| [GL_OES_texture_npot](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_npot.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_rg](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_rg.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_decode](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_decode.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_R8](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_R8.txt) | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_RG8](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_RG8.txt) | | | | | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_stencil8](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_stencil8.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_storage_multisample_2d_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_storage_multisample_2d_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_type_2_10_10_10_REV](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_type_2_10_10_10_REV.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_texture_usage](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_texture_usage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_translated_shader_source](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_translated_shader_source.txt) | | | | | | | |
| [GL_EXT_unpack_subimage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_unpack_subimage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_array_object](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_array_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_half_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_type_10_10_10_2](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_type_10_10_10_2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_WEBGL_video_texture](https://khronos.org/registry/OpenGL/extensions/WEBGL/WEBGL_video_texture.txt) | | | | | | | |
| [GL_EXT_YUV_target](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_YUV_target.txt) | | | | | | | |
## ANGLE unofficial extension support
*Note: some ANGLE extensions are currently missing specifications.*
| Extension Name | NVIDIA 1660 Win10 | Intel 630 Win10 | NVIDIA 1660 Linux | Intel 630 Linux | SwiftShader Win10 | Pixel 4 Android 11 | Pixel 6 Android 13 |
| -------------- | :---------------: | :-------------: | :---------------: | :-------------: | :---------------: | :----------------: | :----------------: |
| [GL_ANGLE_base_vertex_base_instance](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_base_vertex_base_instance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_base_vertex_base_instance_shader_builtin](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_base_vertex_base_instance_shader_builtin.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_bind_generates_resource](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_bind_generates_resource.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_bind_uniform_location](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_bind_uniform_location.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_client_arrays](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_client_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_clip_cull_distance](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_clip_cull_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_CHROMIUM_color_buffer_float_rgb](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_color_buffer_float_rgb.txt) | | | | | | | |
| [GL_CHROMIUM_color_buffer_float_rgba](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_color_buffer_float_rgba.txt) | | | | | | | |
| [GL_ANGLE_compressed_texture_etc](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_compressed_texture_etc.txt) | | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_copy_compressed_texture](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_copy_compressed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_copy_texture](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_copy_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_copy_texture_3d](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_copy_texture_3d.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_framebuffer_mixed_samples](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_framebuffer_mixed_samples.txt) | | | | | | | |
| [GL_ANGLE_framebuffer_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_framebuffer_multisample.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_image](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_serialized_context_string](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_serialized_context_string.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_tex_level_parameter](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_tex_level_parameter.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_logic_op](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_logic_op.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | |
| [GL_CHROMIUM_lose_context](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_lose_context.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_lossy_etc_decode](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_lossy_etc_decode.txt) | | | | | | | |
| [GL_ANGLE_memory_object_flags](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_object_flags.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_memory_object_fuchsia](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_object_fuchsia.txt) | | | | | | | |
| [GL_ANGLE_memory_size](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_size.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_multi_draw](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_multi_draw.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_multiview_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_multiview_multisample.txt) | | | | | | | |
| [GL_ANGLE_polygon_mode](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_polygon_mode.txt) | | | | | | | |
| [GL_ANGLE_program_binary](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_program_binary.txt) | | | | | | | |
| [GL_ANGLE_program_cache_control](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_program_cache_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_provoking_vertex](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_provoking_vertex.txt) | | | | | | | |
| [GL_ANGLE_read_only_depth_stencil_feedback_loops](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_read_only_depth_stencil_feedback_loops.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_relaxed_vertex_attribute_type](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_relaxed_vertex_attribute_type.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_renderability_validation](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_renderability_validation.txt) | | | | | | | |
| [GL_ANGLE_request_extension](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_request_extension.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_rgbx_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_rgbx_internal_format.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_client_memory](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_client_memory.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_fragment_shader_output](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_fragment_shader_output.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_resource_initialization](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_resource_initialization.txt) | | | | | | | |
| [GL_ANGLE_semaphore_fuchsia](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_semaphore_fuchsia.txt) | | | | | | | |
| [GL_ANGLE_shader_binary](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_binary.txt) | | | | | | | |
| [GL_ANGLE_shader_pixel_local_storage](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_pixel_local_storage.txt) | | | | | | | |
| [GL_ANGLE_shader_pixel_local_storage_coherent](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_pixel_local_storage.txt) | | | | | | | |
| [GL_ANGLE_stencil_texturing](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_stencil_texturing.txt) | | | | | | | |
| [GL_CHROMIUM_sync_query](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_sync_query.txt) | | | | | | | |
| [GL_ANGLE_texture_compression_dxt3](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_compression_dxt3.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_ANGLE_texture_compression_dxt5](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_compression_dxt5.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_ANGLE_texture_external_update](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_external_update.txt) | | | | | | | |
| [GL_CHROMIUM_texture_filtering_hint](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_texture_filtering_hint.txt) | | | | | &#x2714; | | |
| [GL_ANGLE_texture_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_multisample.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_texture_rectangle](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_rectangle.txt) | | | | | | | |
| [GL_ANGLE_vulkan_image](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_vulkan_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_webgl_compatibility](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_webgl_compatibility.txt) | | | | | | | |
| [GL_ANGLE_yuv_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_yuv_internal_format.txt) | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
## GLES 1.0 and 1.1 extension support
| Extension Name | SwiftShader Win10 |
| -------------- | :---------------: |
| [GL_OES_draw_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_texture.txt) | &#x2714; |
| [GL_OES_framebuffer_object](https://khronos.org/registry/OpenGL/extensions/OES/OES_framebuffer_object.txt) | &#x2714; |
| [GL_OES_matrix_palette](https://khronos.org/registry/OpenGL/extensions/OES/OES_matrix_palette.txt) | |
| [GL_OES_point_size_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_point_size_array.txt) | &#x2714; |
| [GL_OES_point_sprite](https://khronos.org/registry/OpenGL/extensions/OES/OES_point_sprite.txt) | &#x2714; |
| [GL_OES_query_matrix](https://khronos.org/registry/OpenGL/extensions/OES/OES_query_matrix.txt) | |
| [GL_OES_texture_cube_map](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_cube_map.txt) | &#x2714; |
## EGL extension support
Currently EGL extensions are not automatically tracked by our scripting. For a
list of supported EGL extensions in ANGLE's front-end see
[`src/libANGLE/Caps.h`](../src/libANGLE/Caps.h).
## Configuration information
NVIDIA 1660 Win10:
* `GL_RENDERER` is `ANGLE (NVIDIA, Vulkan 1.2.142 (NVIDIA GeForce GTX 1660 (0x00002184)), NVIDIA-456.38.0.0)`
* `GL_VENDOR` is `Google Inc. (NVIDIA)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Intel 630 Win10:
* `GL_RENDERER` is `ANGLE (Intel, Vulkan 1.3.215 (Intel(R) UHD Graphics 630 (0x00009BC5)), Intel Corporation-101.101.)`
* `GL_VENDOR` is `Google Inc. (Intel)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
NVIDIA 1660 Linux:
* `GL_RENDERER` is `ANGLE (NVIDIA, Vulkan 1.1.119 (NVIDIA GeForce GTX 1660 (0x00002184)), NVIDIA-440.100.0.0)`
* `GL_VENDOR` is `Google Inc. (NVIDIA)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Intel 630 Linux:
* `GL_RENDERER` is `ANGLE (Intel, Vulkan 1.2.131 (Intel(R) UHD Graphics 630 (CML GT2) (0x00009BC5)), Intel open-source Mesa driver-20.0.8)`
* `GL_VENDOR` is `Google Inc. (Intel)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
SwiftShader Win10:
* `GL_RENDERER` is `ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver-5.0.0)`
* `GL_VENDOR` is `Google Inc. (Google)`
* `GL_VERSION` is `OpenGL ES 3.1.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Pixel 4 Android 11:
* `GL_RENDERER` is `ANGLE (Qualcomm, Vulkan 1.1.128 (Adreno (TM) 640 (0x06040001)), Qualcomm Technologies Inc. Adreno Vulkan Driver-512.490.0)`
* `GL_VENDOR` is `Google Inc. (Qualcomm)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Pixel 6 Android 13:
* `GL_RENDERER` is `ANGLE (ARM, Vulkan 1.1.201 (Mali-G78 (0x92020010)), Mali-G78-36.0.0)`
* `GL_VENDOR` is `Google Inc. (ARM)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
## How to update supported extension data
Supported extension data is stored in the ANGLE repo as JSON files in
[`scripts/extension_data`](../scripts/extension_data). The JSON data is
sourced from public ANGLE test runs. Look for `angle_end2end_tests` in a bot
run: [example link](https://ci.chromium.org/ui/p/angle/builders/ci/win-test/520/overview).
Search for "`angle_end2end_tests`", then click on the "cas output" and find
`GLinfo_ES3_2_Vulkan.json` or `GLinfo_ES3_1_Vulkan_SwiftShader.json` for
SwiftShader.
All data except for GLES 1 is automatically updated using
the [`update_extension_data.py`](../scripts/update_extension_data.py) script.
To use it first authenticate to the `bb` and `luci-go` tools by running `bb
auth-login` and `./tools/luci-go/swarming login`. Then run the script and
re-run [code generation][CodeGen].
The GLES 1 data is currently manually updated. Find the relevant
file from the task output (see above) and overwrite the correspoding file.
Re-run [code generation][CodeGen] and create a CL as per our normal process.
To add a new configuration, first retrieve the JSON data, modify
[`gen_extensions.py`](../src/libANGLE/gen_extensions.py) as necessary, then
run [`scripts/run_code_generation.py`][CodeGen] to refresh generated files.
Also update `update_extension_data.py` as necessary.
[CodeGen]: ../scripts/run_code_generation.py

View File

@@ -1,124 +0,0 @@
# Using External Benchmarks with ANGLE
This document contains instructions on how to run external benchmarks on ANGLE as the GLES renderer.
There is a section for each benchmark with subsections for each platform. The general theme is to
make the benchmark application pick ANGLE's `libGLESv2.so` and `libEGL.so` files instead of the
system ones.
On Linux, this is generally achieved with setting `LD_LIBRARY_PATH`. On Windows, ANGLE dlls may
need to be copied to the benchmark's executable directory.
## glmark2
This benchmark can be found on [github](https://github.com/glmark2/glmark2). It's written against
GLES 2.0 and supports Linux and Android. It performs tens of tests and reports the framerate for
each test.
### glmark2 on Linux
To build glmark2 on Linux:
```
$ git clone https://github.com/glmark2/glmark2.git
$ cd glmark2
$ ./waf configure --with-flavors=x11-glesv2 --data-path=$PWD/data/
$ ./waf
```
To run glmark2 using the native implementation of GLES:
```
$ cd build/src
$ ./glmark2-es2
```
To run glmark2 using ANGLE, we need to first create a few links in the build directory of ANGLE:
```
$ cd /path/to/angle/out/release
$ ln -s libEGL.so libEGL.so.1
$ ln -s libGLESv2.so libGLESv2.so.2
```
Back in glmark2, we need to make sure these shared objects are picked up:
```
$ cd /path/to/glmark2/build/src
$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ldd ./glmark2-es2
```
With `ldd`, you can verify that `libEGL.so.1` and `libGLESv2.so.2` are correctly picked up from
ANGLE's build directory.
To run glmark2 on the default back-end of ANGLE:
```
$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
```
To run glmark2 on a specific back-end of ANGLE:
```
$ ANGLE_DEFAULT_PLATFORM=vulkan LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
```
### glmark2 on Linux for Android
**Prerequisites**
Below steps are set up to use version 26.0.1 of build-tools, which can be downloaded here:
[https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip](https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip)
Tested with r19 of NDK, which can be downloaded here:
[https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip](https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip)
Tested with OpenJDK 8:
```
sudo apt-get install openjdk-8-jdk
```
Note: This is built from a branch that has fixes for Android. It only supports
32-bit ARM (armeabi-v7a). Supporting other ABIs requires more work, possibly
including a move to cmake instead of ndk-build.
**Setup**
```
export ANDROID_SDK=<path_to_Android_SDK>
export ANDROID_NDK=<path_to_Android_NDK>
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
```
**Build**
```
git clone https://github.com/cnorthrop/glmark2.git
cd glmark2/android
git checkout android_fixes
./build.sh
```
**Install**
```
adb install --abi armeabi-v7a glmark2.apk
```
**Run**
To select ANGLE as the driver on Android (requires Android Q):
```
adb shell settings put global angle_gl_driver_selection_pkgs org.linaro.glmark2
adb shell settings put global angle_gl_driver_selection_values angle
```
To switch back to native GLES driver:
```
adb shell settings delete global angle_gl_driver_selection_values
adb shell settings delete global angle_gl_driver_selection_pkgs
```

View File

@@ -1,82 +0,0 @@
# GPU Memory Reporting and Analysis
[MemRptExt]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_device_memory_report.html
[enabling-general-logging]: DebuggingTips.md#enabling-general-logging
GPU memory usage data can be reported when using the Vulkan back-end with drivers that support the
[VK_EXT_device_memory_report][MemRptExt] extension. When enabled, ANGLE will produce log messages
based on every allocation, free, import, unimport, and failed allocation of GPU memory. This
functionality requires [enabling general logging](#enabling-general-logging) as well as enabling
one or two feature flags.
## GPU Memory Reporting
ANGLE registers a callback function with the Vulkan driver for the
[VK_EXT_device_memory_report][MemRptExt] extension. The Vulkan driver calls this callback for
each of the following GPU memory events:
- Allocation of GPU memory by ANGLE
- Free of GPU memory by ANGLE
- Import of GPU memory provided by another process (e.g. Android SurfaceFlinger)
- Unimport of GPU memory provided by another process
- Failed allocation
The callback provides additional information about each event such as the size, the VkObjectType,
and the address (see the extension documentation for more details). ANGLE caches this information,
and logs messages based on this information. ANGLE keeps track of how much of each type of memory
is allocated and imported. For example, if a GLES command causes ANGLE five 4 KB descriptor set
(VK_OBJECT_TYPE_DESCRIPTOR_SET) allocations, ANGLE will add 20 KB to the total of allocated
descriptor set memory.
ANGLE supports two types of memory reporting, both of which are enabled
via feature flags:
* `logMemoryReportStats` provides summary statistics at each eglSwapBuffers() command
* `logMemoryReportCallbacks` provides per-callback information at the time of the callback
Both feature flags can be enabled at the same time. A simple way to enable either or both of these
feature flags on Android is with with the following command:
```
adb shell setprop debug.angle.feature_overrides_enabled <feature>[:<feature>]
```
where `<feature>` is either `logMemoryReportStats` or `logMemoryReportCallbacks`. Both can be
enabled by putting a colon between them, such as the following:
```
adb shell setprop debug.angle.feature_overrides_enabled logMemoryReportCallbacks:logMemoryReportStats
```
Another way to enable either or both of these feature flags is by editing the `RendererVk.cpp` file,
and changing `false` in the following lines to `true`:
```
ANGLE_FEATURE_CONDITION(&mFeatures, logMemoryReportCallbacks, false);
ANGLE_FEATURE_CONDITION(&mFeatures, logMemoryReportStats, false);
```
Note: At this time, GPU memory reporting has only been tested and used on Android, where the logged
information can be viewed with the `adb logcat` command.
## GPU Memory Analysis
GPU memory reporting can be combined with other forms of debugging in order to do analysis. For
example, for a GLES application/test that properly shuts down, the total size of each type of
allocated and imported memory should be zero bytes at the end of the application/test. If not, a
memory leak exists, and the log can be used to determine where the leak occurs.
If an application seems to be using too much GPU memory, enabling memory reporting can reveal which
type of memory is being excessively used.
Complex forms of analysis can be done by enabling logging of every GLES and EGL API command. This
can be enabled at compilation time by [enabling general logging](#enabling-general-logging) as well
as setting the following GN arg:
```
angle_enable_trace_android_logcat = true
```
Combining that with enabling the `logMemoryReportCallbacks` feature flag will allow each memory
allocation and import to be correlated with the GLES/EGL commands that caused it. If more context
is needed for the type of drawing and/or setup that is being done in a sea of GLES commands, this
can also be combined with the use of a graphics debugger such as Android GPU Inspector (AGI) or
RenderDoc. The debugger can help you understand what the application is doing at the time of the
particular GPU memory event is occuring. For example, you might determine that the application is
doing something to cause a memory leak; or you may get insight into what the game is doing that
contributes to ANGLE using excessive amounts of GPU memory.

View File

@@ -1,9 +0,0 @@
# M(ulti-platform)ANGLE effort
Starting in early 2014, the ANGLE team has begun work on refactoring the code
with the goal of supporting translation to desktop OpenGL. In 2016, work on
supporting Vulkan as a back-end started. The new purpose of ANGLE is to
provide a consistent OpenGL ES and EGL context on as many platforms as possible.
The design doc is available [here]
(https://docs.google.com/document/d/17mxRfzXuEWyvGM3t2KqVY4svvfRj_GzysOEpmnDpqeo/edit?usp=sharing).

View File

@@ -1,146 +0,0 @@
# ANGLE Orientation
A basic guide to get up and running fixing bugs and performance issues in ANGLE.
## First ANGLE Compile
### Windows
- Download and install
[Visual Studio Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx).
Installing takes some time.
- Take the time to register a Microsoft account, otherwise you'll get nagged to death.
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Add the `depot_tools` dir to your system path. Open start menu, type "edit environment variables",
add it to PATH.
- (recommended) Download and install [Git for Windows](http://gitforwindows.org/).
- Open Git bash, head to C:/src and follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#Development-setup-Getting-the-source)
to set up the ANGLE solution for the first time.
- If you follow the [ANGLE wiki VS solution building and debugging guide](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#building-and-debugging-with-visual-studio), the VS solution will be in `c:/src/angle/out/Debug/angle-debug.sln`. Open and let the installation
finish. **Important**: set indent style to spaces, not tabs!
- Building should work at this point!
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
- Useful VS extensions:
1. [Build Only Startup Project](https://marketplace.visualstudio.com/items?itemName=SenHarada.BuildOnlyStartupProject)
2. [SwitchStartupProject](https://marketplace.visualstudio.com/items?itemName=vs-publisher-141975.SwitchStartupProject)
3. [Smart CommandLine Arguments](https://www.visualstudiogallery.msdn.microsoft.com/535f79b1-fbe0-4b0a-a346-8cdf271ea071)
### Linux
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Ensure you add `depot_tools` to your bashrc as in the wiki link above.
- Follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#Development-setup-Getting-the-source)
to setup ANGLE's build.
- Building should work at this point! Follow the steps on the Wiki.
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
## Setting up the [drawElements testing suite](http://go/dEQP)
- [Cherry](https://sites.google.com/a/google.com/deqp/cherry) is the UI for viewing test results.
ANGLE checks out a copy in `<angledir>/third_party/cherry`.
- Follow the instructions in the
[installation README](https://android.googlesource.com/platform/external/cherry/+/refs/heads/main/README)
to get it running. On Windows, use 64-bit.
- Read up on testing with
[dEQP on the ANGLE Wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/dEQP.md).
- Try running `angle_deqp_gles2_tests_no_gtest` with the flag
`--deqp-case=dEQP-GLES2.functional.negative_api.*` and load a test report in Cherry.
- To use Cherry, browse to [http://localhost:8080/#/results](http://localhost:8080/#/results) and
click '**Import existing batch**', loading `TestResults.qpa`. Look for the qpa file in the
current working directory, or `<angledir>/src/tests` if you ran the tests from Visual Studio.
- Note: we only use Cherry for viewing test output, not running the tests. On start, you may see
some runtime messages about unable to load case lists. These are safe to ignore. If you didn't
load the results URL directly, click the "**Results**" tab to find the Import button.
## Profiling
- You can use `scripts/perf_test_runner.py` to run any target of `./angle_perftests` (see script
source for details).
### With Visual Studio
- In Visual Studio 2017, look under Debug/Profiler/Performance Explorer/New Performance Session.
Right-click "Targets" and add `angle_perftests` as a Target Project.
- Run `angle_perftests` with the flag `--gtest_filter=DrawCallPerfBenchmark.Run/d3d11_null` for
D3D11, `.../d3d9_null` for D3D9, `.../gl_null` for OpenGL and `.../vulkan_null` for Vulkan.
- Make sure you close all open instances of Chrome, they use a lot of background CPU and GPU. In
fact, close every process and application you can.
### Profiling with Visual Studio + Chrome
- Install [Chrome Canary](https://www.google.com/chrome/browser/canary.html).
- Canary's install dir is usually `%APPDATA%/Local/Google/Chrome SxS/Application`
- Build ANGLE x64, Release, and run 'python scripts/update_chrome_angle.py' to replace Canary's
ANGLE with your custom ANGLE. (Note: Canary must be closed)
- Start Canary with `--gpu-startup-dialog --disable-gpu-sandbox`, wait for the dialog.
- In Visual Studio, under Debug/Profiler, choose attach to process.
- Attach to the Chrome GPU process, then immediately pause profiling.
- **IMPORTANT:** Verify ANGLE details are correct in `about:gpu`.
- In Canary, start your benchmark, then resume profiling, and exit when done. The report will load
automatically.
## Bookmark the latest Khronos specs
- [The GLES 2.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf)
- [The GLES 3.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf)
- [The GLES 3.1 Spec](https://www.khronos.org/registry/gles/specs/3.1/es_spec_3.1.pdf)
- [The GLES Shading Language 1.00 Spec](https://www.khronos.org/files/opengles_shading_language.pdf)
- [The GLES Shading Language 3.00 Spec](https://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.4.pdf)
- [The WebGL Specs](https://www.khronos.org/registry/webgl/specs/latest/)
- [A modern desktop OpenGL Spec](https://www.opengl.org/registry/doc/glspec45.core.pdf)
(for reference)
- [The Vulkan Spec](https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/vkspec.html)
These specs can be found in the [OpenGL Registry](https://github.com/KhronosGroup/OpenGL-Registry)
and the [Vulkan Docs](https://github.com/KhronosGroup/Vulkan-Docs) repositories as well.
## Join Groups and Chats
- Join the `#angle` channel in `chromium.slack.com`.
### For Googlers
- Join angle-team@ for access to many important emails and shared documents.
- We have a Hangouts Chat channel. Ask for an invite.

View File

@@ -1,34 +0,0 @@
# Resource Limits
OpenGL ES 2.0 API is quite powerful but there are still some features that are
optional or allow for wide variability between implementations.
Applications that need more than the minimum values for these limits should
query the capabilities of the GL device and scale their usage based on the
devices feature set. Failing to do so and assuming sufficient limits typically
results in reduced portability.
The various implementation dependent limits can be found in Tables 6.18 6.20
of the [OpenGL ES 2.0.25 specification]
(http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf).
# Capabilities
Capability | ES 2.0 Minimum | ANGLE | SM2 | SM3 | SM4+
:----------------------------------------- | :------------- | :--------------- | :---- | :------- | :-------
GL\_MAX\_VERTEX\_ATTRIBS | 8 | 16 | | |
GL\_MAX\_VERTEX\_UNIFORM\_VECTORS | 128 | 254 | | |
GL\_MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS | 0 | (fn1) | 0 | 0 | 4
GL\_MAX\_VARYING\_VECTORS | 8 | (fn1) | 8 | 10 | 10
GL\_MAX\_FRAGMENT\_UNIFORM\_VECTORS | 16 | (fn1) | 29 | 221 | 221
GL\_MAX\_TEXTURE\_IMAGE\_UNITS | 8 | 16 | | |
GL\_MAX\_TEXTURE\_SIZE | 64 | 2048-16384 (fn1) | | |
GL\_MAX\_CUBE\_MAP\_SIZE | 16 | 2048-16384 (fn1) | | |
GL\_MAX\_RENDERBUFFER\_SIZE | 1 | 2048-16384 (fn1) | | |
GL\_ALIASED\_POINT\_SIZE\_RANGE (min, max) | (1, 1) | (fn2) | (1,1) | (1, fn2) | (1, fn2)
GL\_ALIASED\_LINE\_WIDTH\_RANGE (min, max) | (1, 1) | (1, 1) | | |
## Notes
* fn1: limits vary based on the underlying hardware capabilities
* fn2: on SM3 or better hardware the max point size is D3DCAPS9.MaxPointSize

View File

@@ -1,15 +0,0 @@
# ANGLE Source Code
# Browsing
ANGLE's source no longer resides at code.google.com! To browse the ANGLE source,
please visit https://chromium.googlesource.com/angle/angle
# Checkout
You may clone the ANGLE repository with:
> `git clone https://chromium.googlesource.com/angle/angle`
For full instructions on setting up your system with the necessary prerequisites
for development with ANGLE, please see the DevSetup page.

View File

@@ -1,121 +0,0 @@
# Handling Test Failures
ANGLE is tested by a number of test suites, including by the ANGLE CI and Try testers, and by the
Chromium FYI testers. See pointers and explanations in the
[ANGLE Wrangling](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/infra/ANGLEWrangling.md) documentation.
We run a large number of tests for each ANGLE CL, both in ANGLE standalone and Chromium
configurations, both pre- and post- commit. Some tests will fail, crash, or timeout. If these
cannot be addressed in a timely manner, file a bug and update test expectations files. Timeliness
depends on the context. For example, a Wrangler trying to unblock an AutoRoller will typically
suppress failures immediately; where a developer will typically delay landing their CL in favor of
fixing test failures.
## Handling a Vulkan Validation Layer error
Many tests are run with an option that enables the Vulkan Validation Layers (sometimes referred to
as VVL). Validation errors will cause an otherwise-passing test to fail.
The [vulkan-deps into ANGLE AutoRoller](https://autoroll.skia.org/r/vulkan-deps-angle-autoroll)
updates ANGLE to the top-of-tree (ToT) upstream Vulkan tools and SDK. Sometimes validation errors
are the result of bugs in the Vulkan Validation Layers, sometimes because of bugs in ANGLE.
Therefore, investigate the cause of the error and determine if it's an ANGLE bug or a Vulkan
Validation Layer bug. For Vulkan Validation Layer bugs, file an
[upstream bug](https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/new), and
suppress the error. The ANGLE Wrangler will also suppress a validation error when the
`vulkan-deps` AutoRoller introduces a new validation error. The ANGLE Wrangler isn't expected to
resolve the error or diagnose an upstream bug (but it is welcome as extra credit).
Handle a validation error by doing the following:
1. [File an ANGLE bug](http://anglebug.com/new). If this is an active Wrangler issue, set the Label
`Hotlist-Wrangler` on the bug.
2. Add the VVL error tag to the
[kSkippedMessages](https://chromium.googlesource.com/angle/angle.git/+/8f8ca06dfb903fcc8517c69142c46c05e618f40d/src/libANGLE/renderer/vulkan/RendererVk.cpp#129)
array in `RendererVk.cpp` file. Follow the pattern for adding a comment with the associated bug
in the line above the VVL tag.
## dEQP test expectations
There are a set of [dEQP](dEQP.md) expectations files in the
[src/tests/deqp_support](../src/tests/deqp_support) directory. Notice the format of a line and
your choices for OS, driver, etc. This is described in the directory's
[README.md](../src/tests/deqp_support/README.md) file. This includes:
- `FLAKY` - For rare flakes
- `FAIL` - For a test that flakes often or persistently fails
- `SKIP` - For a test that crashes
- `TIMEOUT` - For a test that is very slow and may timeout
## angle_end2end_tests expectations
These expectations all live in the
[angle_end2end_tests_expectations.txt](../src/tests/angle_end2end_tests_expectations.txt) file. The file format
is the same as for the dEQP expectations. However, `FAIL` and `FLAKY` are not valid, and so the choices are:
- `SKIP` - For a test that fails or crashes
- `TIMEOUT` - For a test that is very slow and may timeout
## Rubber stamping expectations CLs
CLs that only change dEQP or angle_end2end_tests expectations don't require a human reviewer and can be
[Rubber Stamped](https://chromium.googlesource.com/infra/infra/+/refs/heads/main/go/src/infra/appengine/rubber-stamper/README.md).
The procedure is:
1. Add rubber-stamper@appspot.gserviceaccount.com as the reviewer on the expectations CL. Please also CC a human reviewer for TBR.
2. After 1 minute, Rubber Stamper should set "Bot-Commit: +1" on the CL.
3. Now you should be able to "Commit-Queue: +2" your CL.
## WebGL conformance test expectations
The expectations files are hosted in the `chromium/src` repository under
[content/test/gpu/gpu_tests/test_expectations](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/content/test/gpu/gpu_tests/test_expectations/).
Note that this is not included in local ANGLE-only source tree.
The format of the file, including the different tags, is documented at the top of the file. This
includes the following results:
- `RetryOnFailure` - For a test that rarely flakes
- `Failure` - For a test that fails consistently or flakes often
- `Skip` - For a test that causes catastrophic failures (e.g. ends an entire test run, causes a bot
to BSoD); `Skip` should be used very sparingly
You will need to contact an OWNER of the file to +1 your CL.
You have two options for creating a CL to the expectations files:
1. For trivial edits, you can edit the expectations files via
[Chromium Code Search](https://source.chromium.org/chromium/chromium/src/+/main:content/test/gpu/gpu_tests/test_expectations/):
- In the browser, press the `Edit code` button. This will bring up a new browser window/tab,
in an editor mode.
- Edit the expecations and then press the `Create change` (or `Update change` button if you
need to change your CL later), which will create a CL.
2. Otherwise please [check out the code](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/get_the_code.md)
and [upload a CL](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md#Creating-a-change)
## "internal swarming failure" on one of the test shards
This might be caused by a bad bot, clicking on link "Bot assigned to task" will show recent tasks which might look bad
(for example, lots of BOT_DIED in [crbug.com/1350556](https://crbug.com/1350556)). The best course of action in this case is to
stop the bot by clicking the "stop the bot gracefully" button which will result in a task that looks like
"Terminate build117-a9", then open a bug in the Infra>Labs component.
Googlers, see also: [go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool](http://go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool)
# Requesting access to the Commit Queue and issue tracker
If you need to request access for a user (or yourself) please ask a project owner to help. Googlers, email
angle-team@google.com. External users, find a couple owners in the [OWNERS](../OWNERS) file and send a
request via email.
If you are an ANGLE owner and you want to grant a user access:
* For the Monorail issue tracker, add users via the ["People" administration console][MonorailPeople].
* For the ANGLE Commit Queue (CQ), grant try-job access via the [Chrome Infra Auth administration console][ChromeAdmin].
* The admin console also has a separate group for [CQ access][CQAccessAdmin].
[MonorailPeople]: https://bugs.chromium.org/p/angleproject/people/list
[ChromeAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-tryjob-access
[CQAccessAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-committers

View File

@@ -1,119 +0,0 @@
# ANGLE Development Update - July 4, 2012
We haven't posted an update on the development status of ANGLE in quite some
time and we'd like to provide an update on some of the new features and
improvements that we've been working on.
## Conformance
As announced in the [Chromium Blog]
(http://blog.chromium.org/2011/11/opengl-es-20-certification-for-angle.html),
ANGLE v1.0 has passed the Khronos OpenGL ES 2.0 certification process and is now
a [conformant](http://www.khronos.org/conformance/adopters/conformant-products/)
OpenGL ES 2.0 implementation.
## Extensions
We have recently completed the implementation of depth texture support
([ANGLE\_depth\_texture]
(https://code.google.com/p/angleproject/source/browse/extensions/ANGLE_depth_texture.txt?name=master))
and earlier in the year we added support for instancing via attribute array
divisors ([ANGLE\_instanced\_arrays]
(https://code.google.com/p/angleproject/source/browse/extensions/ANGLE_instanced_arrays.txt?name=master)).
See ExtensionSupport for a complete list of extensions that are supported by
ANGLE.
## Shader Compiler
We have also made a number of improvements in the shader compiler.
* We addressed a number of defects related to scoping differences between HLSL and
GLSL and improved the scoping support in ANGLE's compiler front-end. We also
worked with The Khronos Group to get an ESSL spec bug fixed and several items
clarified.
* We addressed a number of correctness issues in the GLSL to HLSL
translation process. We fixed some bugs related to constant propagation and
comma conditional assignments. More importantly, we fully implemented support
for short-circuiting boolean logic operations. In GLSL, Boolean expressions do
short-circuit evaluation as in C, but HLSL evaluates them entirely. This only
has an observable effect if a short-circuited operation has side effects, such
as a function call that modifies global variables.
* We implemented detection
for discontinuous gradient or derivative computations inside loops and replace
them with explicitly defined continuous behaviour. HLSL and GLSL differ in their
specified behaviour for operations which compute gradients or derivatives.
Gradients are computed by texture sampling functions which don't specify a
specific mipmap LOD level, and by the OES\_standard\_derivatives built-in
functions. To determine the gradient, the corresponding values in neighbouring
pixels are differentiated. If neighbouring pixels execute different paths
through the shader this can cause a discontinuity in the gradient. GLSL
specifies that in these cases the gradient is undefined. HLSL tries to avoid the
discontinuity in the compiler by unrolling loops so that every pixel executes
all iterations. This can make the D3D HLSL compiler spend a long time generating
code permutations, and possibly even fail compilation due to running out of
instruction slots or registers. Because the GLSL specification allows undefined
behaviour, we can define such texture sampling functions to use mipmap LOD level
0, and have the derivatives functions return 0.0. To do this we examine the GLSL
code's abstract syntax tree and detect whether the shader contains any loops
with discontinuities and gradient operations. Within such loops, we generate
HLSL code that uses explicitly defined texture LODs and derivative information.
One additional consideration is that within these loops there can be calls to
user-defined functions which may contain gradient operations. In this case, we
generate variants of user-defined functions where these operations are
explicitly defined. We use these new functions instead of the original ones in
loops with discontinuities.
These fixes result in ANGLE being able successfully compile a number of the more
complex shaders. Unfortunately there are still some complex shaders which we
have not yet been able to obtain solutions for. Ultimately Direct3D 9 SM3
shaders are more restricted than what can be expressed in GLSL.  Most of the
problematic shaders we've encountered will also not compile successfully on
current ES 2.0 implementations.  We would only be able to achieve parity with
Desktop GL implementations by using Direct3D 10 or above.
## Texture Origin Changes
We have also made a major change to ANGLE in the way the origin difference
between D3D and OpenGL is handled. This difference is normally observable when
using render-to-texture techniques, and if not accounted for, it would appear
that images rendered to textures are upside down. In recent versions of ANGLE
(r536 (on Google Code)-r1161 (on Google Code)), we have been storing surfaces
following the D3D Y convention where (0, 0) is the top-left, rather than GL's
bottom-left convention. This was done by vertically flipping textures on load
and then adjusting the texture coordinates in the shaders to compensate. This
approach worked well, but it did leave the orientation of pbuffers inverted when
compared to native GL implementations. As of ANGLE r1162 (on Google Code), we
have changed this back to the original way it was implemented - textures are
loaded and stored in the GL orientation, and the final rendered scene is flipped
when it is displayed to a window by eglSwapBuffers. This should be essentially
transparent to applications except that orientation of pbuffers will change.  In
addition to fixing the pbuffer orientation, this change:
* eliminates
dependent-texture look-ups in the shaders, caused by flipping the texture
y-coordinates
* rounding of texture coordinates (while previously within spec)
will be more consistent with other implementations, and
* allows potential
faster paths for loading texture data to be implemented. The only potential
downside to this approach is that window-based rendering may be a bit slower for
simple scenes. The good news is that this path is not used by browser
implementations on most versions of Windows.
## Preprocessor
Finally, Alok P. from Google has been working on implementing a new shader
preprocessor for the last number of months and this effort is nearly complete.
This new preprocessor should be more robust and much more maintainable. It also
includes many (~5000) unit tests and passes all WebGL conformance tests. If you
wish to try this out before it is enabled by default, define
ANGLE\_USE\_NEW\_PREPROCESSOR=1 in your project settings for the
translator\_common project.
## Contributions
As always we welcome contributions either in the bug reports (preferably with an
isolated test-case) or in the form of code contributions. We have added a
[ContributingCode](ContributingCode.md) wiki page documenting the preferred
process for contributing code. We do need to ask that you sign a Contributor
License Agreement before we can integrate your patches.

View File

@@ -1,26 +0,0 @@
# ANGLE Development Update - June 18, 2013
This week brings some significant changes to ANGLE, which we think are worth
covering in a development update.
## Migration from svn to git
We've changed our backing version control system from svn to git. Projects and
contributors pulling from the svn repository will continue to be able to do so,
but please note that this repository is now read-only, and no further updates
will be made there. To continue tracking new development and issue fixes, you'll
need to watch the git repository. Instructions on checking out code from the git
repository can be found on the [Source Checkout](https://code.google.com/p/angleproject/source/checkout) page.
## DirectX 11 Support
ANGLE now provides both a DirectX 9 and a DirectX 11-backed renderer in the same
code base. By default, support for the DirectX 11 renderer is disabled, but it
can be enabled by toggling the value of ANGLE\_ENABLE\_D3D11 as described on the
DevSetup page. On systems without DirectX 11 support, ANGLE will fall back to
DirectX 9.
This work originally appeared in our dx11proto branch, which, with the move to
the new repository, has been promoted to master. Code previously located in the
trunk of the svn repository will now be located in the git legacy branch, and
active development will now move to the newly promoted master.

View File

@@ -1,15 +0,0 @@
# ANGLE Development Update - November 20, 2013
ANGLE has undergone a few further migrations in the past week, which we thought
it important to mention in a front-page update.
The review process for contributed code has moved from [Rietveld](https://codereview.appspot.com/)
to [Gerrit](https://chromium-review.googlesource.com). This migration allows us to more
easily support a Git-centric workflow, and eases the process of accepting
changes submitted by contributors without commit access to our repositories.
As a result of this change, our repository has also moved from its prior
location at code.google.com to https://chromium.googlesource.com/angle/angle.
The repository may still be pulled from its old location, but no further changes
will be committed there. Updates will be made only to the repository's new
location.

View File

@@ -1,30 +0,0 @@
# ES 3.0 Development Branch merging
ANGLE will soon be merging its ES 3.0 development branch to master, to make
available (and more visible) the changes we've been making over the past several
months in support of ES 3.0, and to remove divergence between the master and
development branches.
The previous master branch will still be available as the es2only-legacy branch,
and SHAs will not change, so dependencies on individual commits of ANGLE will
continue to work as expected. However, new contributions against es2only-legacy
will generally not be considered, and future work should be done on master.
This merge doesn't signify completion of ES 3.0, as we have some features still
left to implement there, but interested developers can explore the work in
progress. A significant portion of 3.0 features have been implemented,
including:
* 2D array textures, 3D textures
* Expanded texture format support
* Uniform Buffer Objects
* Vertex Array Objects
* Sampler objects, expanded sampler types
* Transform Feedback
* Texture Swizzle
* GLSL integer support
ES 3.0 features should not yet be considered stable, even where implemented, and
some features are present only via naive implementation so far. There is still
quite a bit of work ahead of us before ES 3.0 support is complete, but this
merge should provide insight to those interested in what we've been working on!

View File

@@ -1,45 +0,0 @@
# Multiplatform ANGLE Refactor Complete
ANGLE's [multiplatform refactoring effort](MANGLE.md) is now complete, paving
the way for additional rendering backends, allowing ANGLE to enable OpenGL ES
not just over Direct3D 9 and 11, but also desktop OpenGL.
The refactoring we've done encapsulates D3D-related assumptions and API calls at
the renderer level, so that no D3D calls are made in the renderer-agnostic
portions of the codebase, and D3D-specific feature implementations won't be
included on non-D3D platforms. For example, the creation and maintenance of
CPU-side copies of texture data, which are required to enable GL-style
per-mip-level texture creation over D3D's entire-mipchain texture creation API,
is contained entirely within the D3D renderers, allowing a GL implementation to
avoid this complication.
Work will now begin within ANGLE to add a desktop OpenGL renderer, and EGL
implementations compatible with OS X and Linux.
# ES 3.0 Development Status
Our ES 3.0 development branch was merged into mainline ANGLE in April 2014, but
ES 3.0 support is not yet complete. The majority of API functionality has been
implemented; features still pending include:
* ETC2/EAC support
* primitive restart index
* drawRangeElements
* full GetProgramBinary support in core
Additional work remains in the compiler, including:
* Array .length()
* inf/nan detection
* math utility functions, rounding
* VertexID/InstanceID support
* floating point packing functions
* operators new in ES 3.0
* name redeclaration
* relaxed array indexing
* switch statement support
* loop & iteration improvements
ES 3.0 features should not be considered stable, even where implemented, and
some features are present only via naive implementation so far, but we welcome
bugs filed against this functionality, and thank all our contributors!

View File

@@ -1,76 +0,0 @@
# Vertex Texture Fetch
This page details the steps necessary to implement vertex texture fetch in ANGLE
and documents some of the pitfalls that may be encountered along the way.
# Details
Tasks to implement vertex texture support.
1. add/enable vertex shader texture look up functions in compiler & HLSL
translator.
* add texture2DLod, texture2DProjLod (2 variants), textureCubeLod (these
are **only** valid in vertex shaders)
* ensure other (non-bias/non-LOD) texture functions work in vertex shaders
* non-mipmapped textures use the only level available
* mipmapped textures use only the base level (ie level 0).
2. update implementation-dependent constants in Context.h
* MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS = 4
* MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS =
MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS + MAX\_TEXTURE\_IMAGE\_UNITS (ie 20).
* these limits have to change based on the d3d device characteristics. For
example we likely don't want to advertise vertex image units on SM2.0
cards (unless we end up using software vertex processing).
* detection of hardware support for various formats, types, etc.
* As a first pass, use the "hasVertexTextures" check that Aras suggested
to only enable VTF on DX10 NVIDIA and AMD parts, and SM3 Intel parts.
* If this proves insufficient, there are other things we can do, but it
involves using software vertex processing for unsupported formats and
system memory copies of textures -- all stuff which is rather annoying
and likely to hurt performance (see point 4. below).
3. add support and handling for vertex textures/samplers in the API.
* any textures used in a vertex shader need to get assigned to the special
samplers in d3d9
* there are only 4 of them (D3DVERTEXTEXTURESAMPLER0..
D3DVERTEXTEXTURESAMPLER3)
* if a texture is used in both vertex & fragment it counts twice against
the "MAX\_COMBINED" limit (validated in Program::validateSamplers)
* there are a number of places in our code where we have arrays of size,
or iterate over, MAX\_TEXTURE\_IMAGE\_UNITS. These will need to be
changed to operate on MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS instead. A
(possibly incomplete & outdated) list of areas that need to be updated
is as follows:
* Program.h - increase size of mSamplers
* Context.h - increase size of samplerTexture
* glActiveTexture needs accept values in the range
0..MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS-1
* Context::~Context
* GetIntegerv (2D\_BINDING, CUBE\_BINDING)
* Context::applyTextures
* Context::detachTexture
* Program::getSamplerMapping
* Program::dirtyAllSamplers
* Program::applyUniform1iv
* Program::unlink
* Program::validateSamplers
4. handling the nasty corner cases: texture formats, filtering and cube
textures.
* OpenGL doesn't provide any restrictions on what formats and/or types of
textures can used for vertex textures, or if filtering can be enabled,
whereas D3D9 does.
* Reference Rasterizer / Software Vertex Processing: all formats & types
supported (including filtering)
* ATI R500 (on Google Code) cards do not support VTF (even though they are
SM 3.0)
* ATI R600 (on Google Code) (and later) and in theory the Intel 965+,
claim to support all texture formats/types we care about and some with
filtering
* NVIDIA cards fall into two camps:
* dx9 SM3 (6&7 series): only R32F & A32B32G32R32F supported for 2D and no
filtering, CUBE or VOL texture support
* dx10 (8+ series): only float texture formats for 2D, CUBE & VOLUME. no
filtering (according to caps)
* further info from Aras P. suggests that all formats are supported on
DX10 hardware, but are just not advertised.
* unsure what they do on these cards under OpenGL. Need to do more
testing, but suspect software fallback.

View File

@@ -1,50 +0,0 @@
# How to write ANGLE shader translator AST transformations
Usually, a shader AST transformation is structured as such:
**.h file**: one function taking a node to transform, often the root node. If the transformation needs to create new variables or functions, you need to pass a pointer to the TSymbolTable as well (all functions and variables need an id number that's based on a counter in TSymbolTable).
class TIntermBlock;
TransformAST(TIntermBlock *root)
**.cpp file**: implementation of the transformation, with all the implementation code in an anonymous namespace.
## Utilities to implement a transformation
The utilities for implementing AST transformations are in **src/compiler/translator/tree_util/**
**TIntermTraverser**: This traverses the tree recursively, visiting all nodes. Override the visit* functions you need.
**TLValueTrackingTraverser**: If you need to know if the node that is being visited is a target of a write (used as an l-value), use TLValueTrackingTraverser and its isLValueRequiredHere() function.
If you're only interested in function declarations or global variables, they're all in the global scope, so you can get away with just iterating over the root block instead of using a traverser.
TIntermTraverser has member functions to insert and replace nodes. To remove a node, replace it with an empty list. Usually visit functions queue replacements and then updateTree() is called after the traversal is complete - this way the replacement doesn't affect the current traversal. For some transformations of nested AST structures you may need to do multiple traversals.
**BuiltIn.h**: With the helpers here you can easily and cheaply create references to built-in variables that are stored as constexpr.
**IntermNode_utils.h**: These utilities can do things like create a zero node with an arbitrary type, create bool nodes, index nodes, or operations on temporary variables.
**RunAtTheEndOfShader.h**: Use this when you need to run code at the end of the shader so you don't need to worry about corner cases like return statements in main().
**ReplaceVariable.h**: Replace all references to a specific variable in the AST. Useful if a type of a variable needs to be changed, for example.
**FindMain.h**: Find the main() function in the AST.
**FindSymbolNode.h**: Find a particular symbol in the AST.
**IntermNodePatternMatcher.h**: This helper matches certain AST patterns that are needed in more than one different transformation, such as expressions returning an array.
**StaticType.h**: Create TType objects that are initialized at compile time.
Some member functions of AST nodes can also be useful:
* **deepCopy()** creates a copy of any typed node, including its children.
* **hasSideEffects()** determines whether an expression might have side effects. Usually we want to avoid removing nodes with side effects unless there's certainty they would never be executed.
## Checklist
When implementing traversers, be careful that:
* Each node will only have one parent (multiple parents could mess up further AST transformations)
* You take into account some less common AST structures, such as declarations inside a loop header.
* You run the transformation at the right stage of compilation. You don't want to reintroduce AST structures that have already been pruned away for example, and on the other hand you can depend on earlier transformations to clean up some inconvenient structures from the AST, like empty declarations or multiple variables declared on the same line.
* Make sure that any functions you add are marked with SymbolType::AngleInternal so they exist in a separate namespace from user-defined names and can't conflict with them.

View File

@@ -1,124 +0,0 @@
# Charts
These charts are generated nightly from the [chrome GPU waterfall bots](https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console?limit=200). The output of dEQP tests are parsed by [generate_stats.py](https://chromium.googlesource.com/angle/angle/+/HEAD/scripts/generate_stats.py) and collected into a Sheet here: https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek
Warning: the charts below that are wrapped by iframe tags may not display
properly on GitHub Markdown. The charts can be viewed best on the
[Chromium repo page](https://chromium.googlesource.com/angle/angle/+/HEAD/doc/dEQP-Charts.md).
[TOC]
## Win Desktop OpenGL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=2131794282](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=2131794282)
<iframe id="GLES 2.0 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2017908944&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1311087567&format=interactive"></iframe>
<iframe id="GLES 3.1 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=786488695&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=485763259&format=interactive"></iframe>
## Win Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=88272764](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=88272764)
<iframe id="GLES 2.0 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1224536816&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=470578632&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=304442659&format=interactive"></iframe>
<iframe id="EGL Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=907538347&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1264555977&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=884611147&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=441071086&format=interactive"></iframe>
## Win D3D11 Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1236517289](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1236517289)
<iframe id="GLES 2.0 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2018286499&format=interactive"></iframe>
<iframe id="GLES 3.0 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=725892266&format=interactive"></iframe>
<iframe id="GLES 3.1 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=415437873&format=interactive"></iframe>
<iframe id="EGL D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1558331750&format=interactive"></iframe>
## Mac Desktop Open GL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=745187740](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=745187740)
<iframe id="GLES 2.0 Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=405516565&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1993001882&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=718088219&format=interactive"></iframe>
## Linux Desktop Open GL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=518000832](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=518000832)
<iframe id="GLES 2.0 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1000752961&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=658136720&format=interactive"></iframe>
<iframe id="GLES 3.1 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=637777434&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1262725407&format=interactive"></iframe>
## Linux Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1271046732](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1271046732)
<iframe id="GLES 2.0 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2098104121&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1985365791&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=288024561&format=interactive"></iframe>
<iframe id="EGL Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1792478091&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1734147637&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1396798929&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=383448866&format=interactive"></iframe>
## Android Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=703637628](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=703637628)
<iframe id="GLES 2.0 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1563521823&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=330631789&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1089048598&format=interactive"></iframe>
<iframe id="EGL Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=345901518&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1369552559&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=211294637&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=679956702&format=interactive"></iframe>
## Unexpected Passes/Failures
The latest list of unexpected passed/failed tests on HEAD.
Each test is followed by a list of links to any builds on which they passed/failed unexpectedly.
<iframe id="Unexpected Passed Tests" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubhtml?gid=227024905&single=true&widget=true&headers=false" width="100%" height="600px"></iframe>
<iframe id="Unexpected Failed Tests" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubhtml?gid=101098052&single=true&widget=true&headers=false" width="100%" height="600px"></iframe>

View File

@@ -1,88 +0,0 @@
# ANGLE + dEQP
drawElements (dEQP) is a very robust and comprehensive set of open-source
tests for GLES2, GLES3+ and EGL. They provide a huge net of coverage for
almost every GL API feature. ANGLE by default builds dEQP testing targets for
testing against GLES 2, GLES 3, EGL, and GLES 3.1 (on supported platforms).
## How to build dEQP
You should have dEQP as a target if you followed the [DevSetup](DevSetup.md)
instructions. Current targets:
* `angle_deqp_gles2_tests` for GLES 2.0 tests
* `angle_deqp_gles2_no_gtest` for GLES 2.0 tests without google test suite
* `angle_deqp_gles3_tests` for GLES 3.0 tests
* `angle_deqp_gles3_no_gtest` for GLES 3.0 tests without google test suite
* `angle_deqp_egl_tests` for EGL 1.x tests
* `angle_deqp_egl_no_gtest` for EGL 1.x tests without google test suite
* `angle_deqp_gles31_tests` for GLES 3.1 tests (currently very experimental)
* `angle_deqp_gles31_no_gtest` for GLES 3.1 tests (currently very experimental) without google test suite
## How to use dEQP
Note:
To run an individual test, use the `--deqp-case` flag on any of the `no_gtest` targets.
It supports simple wildcard support. For example: `--deqp-case=dEQP-
GLES2.functional.shaders.linkage.*`.
The `gtest` targets support wildcards via the `--gtest_filter` argument,
but have different test names.
The tests lists are sourced from the Android CTS masters in
`third_party/VK-GL-CTS/src/android/cts/master`. See `gles2-master.txt`,
`gles3-master.txt`, `gles31-master.txt` and `egl-master.txt`.
If you're running a full test suite, it might take very long time. Running in
Debug is only useful to isolate and fix particular failures, Release will give
a better sense of total passing rate.
### Choosing a Renderer
By default ANGLE tests with D3D11 on Windows, GLES on mobile and Desktop GL otherwise.
To specify the exact platform for ANGLE + dEQP, use the arguments:
* `--deqp-egl-display-type=angle-d3d11` for D3D11 (highest available feature level)
* `--deqp-egl-display-type=angle-d3d9` for D3D9
* `--deqp-egl-display-type=angle-d3d11-fl93` for D3D11 Feature level 9_3
* `--deqp-egl-display-type=angle-gl` for OpenGL Desktop (OSX, Linux and Windows)
* `--deqp-egl-display-type=angle-gles` for OpenGL ES (Android/ChromeOS, some Windows platforms)
* `--deqp-egl-display-type=angle-metal` for Metal (Mac)
* `--deqp-egl-display-type=angle-swiftshader` for Vulkan with SwiftShader as driver (Android, Linux, Mac, Windows)
* `--deqp-egl-display-type=angle-vulkan` for Vulkan (Android, Linux, Windows)
The flag `--use-angle=X` has the same effect as `--deqp-egl-display-type=angle-X`.
### Check your results
If run from Visual Studio 2015, dEQP generates a test log to
`out/sln/obj/src/tests/TestResults.qpa`. To view the test log information, you'll need to
use the open-source GUI
[Cherry](https://android.googlesource.com/platform/external/cherry). ANGLE
checks out a copy of Cherry to `angle/third_party/cherry` when you sync with
gclient. Note, if you are using ninja or another build system, the qpa file
will be located in your working directory.
See the [official Cherry README](https://android.googlesource.com/platform/external/cherry/+/master/README)
for instructions on how to run Cherry on Linux or Windows.
### GoogleTest, ANGLE and dEQP
ANGLE also supports the same set of targets built with GoogleTest, for running
on the bots. We don't currently recommend using these for local debugging, but
we do maintain lists of test expectations in `src/tests/deqp_support` (see
[Handling Test Failures](TestingAndProcesses.md)). When
you fix tests, please remove the suppression(s) from the relevant files!
### Running dEQP on Android
When you only need to run a few tests with `--gtest_filter` you can use Android wrappers such as `angle_deqp_egl_tests` directly but beware that Android test runner wipes data by default (try `--skip-clear-data`).
Running the tests not using the test runner is tricky, but is necessary in order to get a complete TestResults.qpa from the dEQP tests when running many tests (since the runner shards the tests, only the results of the last shard will be available when using the test runner). First, use the runner to install the APK, test data and test expectations on the device. After the tests start running, the test runner can be stopped with Ctrl+C. Then, run
```
adb shell am start -a android.intent.action.MAIN -n org.chromium.native_test/.NativeUnitTestNativeActivity -e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt
```
After the tests finish, get the results with (requires `adb root`)
```
adb pull /data/data/com.android.angle.test/TestResults.qpa .
```
Note: this location might change, one can double-check with `adb logcat -d | grep qpa`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

View File

@@ -1,10 +0,0 @@
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contains variables that can be imported into a repo's dotfile (.gn)
# to make it easier to roll new versions of ANGLE in.
angle_dotfile_settings = {
exec_script_whitelist = [ get_path_info("BUILD.gn", "abspath") ]
}

View File

@@ -1,226 +0,0 @@
Name
ANGLE_base_vertex_base_instance
Name Strings
GL_ANGLE_base_vertex_base_instance
Contributors
Shrek Shao, Google Inc.
Contributors to the OES_draw_elements_base_vertex specification
Contributors to the EXT_draw_elements_base_vertex specification
Contributors to the EXT_multi_draw_arrays specification
Contributors to the ARB_shader_draw_parameters specification
Contact
Shrek Shao (shrekshao 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Nov 19, 2021
Author Revision: 3
Number
OpenGL ES Extension XX
Dependencies
OpenGL ES 3.1 is required.
This extension is written against the OpenGL ES 3.1 specification, the
OpenGL ES 3.2 specification, and the OpenGL ES Shading Language 3.0
specification.
GL_ANGLE_multi_draw is required.
Overview
This extension exposes the *BaseVertex* draw call in
OES_draw_elements_base_vertex/EXT_draw_elements_base_vertex together with
their newly added *BaseInstance and MultiDraw* variants in addition to the
vertex shader builtins <gl_BaseVertex> and <gl_BaseInstance> exposed by
ARB_shader_draw_parameters for OpenGL.
*BaseInstance behaves identically to its counterpart draw calls except that
<instanceCount> instances of the range of elements are executed and the
value of <instance> advances for each iteration. Those attributes that have
non-zero values for <divisor>, as specified by VertexAttribDivisor, advance
once per <divisor> instances of the set(s) of vertices being rendered.
Additionally, <baseInstance> specifies the first element within the
instanced vertex attributes.
*BaseVertex* is equivalent to its counterpart draw calls except that
the value of the base vertex passed into the driver is <baseVertex> instead
of zero, and that <instances> of the set of elements are executed and the
value of <instance> advances between each set.
IP Status
No known IP claims.
New Procedures and Functions
void DrawArraysInstancedBaseInstanceANGLE(enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
void MultiDrawArraysInstancedBaseInstanceANGLE(enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
New Tokens
None.
Additions to Chapter 10 of the OpenGL ES 3.2 Specification
Section 10.5 Drawing Commands Using Vertex Arrays:
The command
void DrawArraysInstancedBaseInstanceANGLE(
enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
Behaves identically to DrawArraysInstanced except that <baseInstance> is
passed down to DrawArraysOneInstance instead of zero.
The command
void MultiDrawArraysInstancedBaseInstanceANGLE(
enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
Behaves identically to DrawArraysInstancedBaseInstanceANGLE except that a
list of arrays is specified instead. The number of lists is specified in
the <drawcount> parameter. It has the same effect as:
for(i=0; i<drawcount; i++) {
if (*(counts+i)>0) DrawArraysInstancedBaseInstance(
mode,
*(counts+i),
*(instanceCounts+i),
*(firsts+i),
*(baseInstance+i)
);
}
The index of the draw (<i> in the above pseudo-code) may be read by
a vertex shader as <gl_DrawID> which is defined in GL_ANGLE_multi_draw.
The command
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
Behaves identically to DrawElementsInstanced except that <baseVertex> and
<baseInstance> are passed down to DrawElementsOneInstance instead of zero.
The command
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
Behaves identically to DrawElementsInstancedBaseVertexBaseInstanceANGLE
except that a list of arrays is specified instead. The number of lists is
specified in the <drawcount> parameter. It has the same effect as:
for(i=0; i<drawcount; i++) {
if (*(counts+i)>0) DrawElementsInstancedBaseVertexBaseInstanceANGLE(
mode,
*(counts+i),
type,
*(instanceCounts+i),
*(indices+i),
*(baseVertices+i),
*(baseInstances+i)
);
}
The index of the draw (<i> in the above pseudo-code) may be read by
a vertex shader as <gl_DrawID> which is defined in GL_ANGLE_multi_draw.
Errors
DrawArraysInstancedBaseInstanceANGLE and
DrawElementsInstancedBaseVertexBaseInstanceANGLE
generate the same errors as DrawArraysInstanced and DrawElementsInstanced.
MultiDrawArraysInstancedBaseInstanceANGLE and
MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE
generate the same errors as DrawArraysInstanced and DrawElementsInstanced,
respectively, for any draw <i> where an error is generated. If any call
would produce an error, no drawing is performed.
The error INVALID_VALUE is generated by the MultiDraw* functions if
<drawcount> is less than zero.
Dependencies on GL_OES_draw_elements_base_vertex and
GL_EXT_draw_elements_base_vertex
If the OpenGL ES context version is less than 3.2, this extension is only
available when GL_OES_draw_elements_base_vertex or
GL_EXT_draw_elements_base_vertex are available.
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------------- --------------------------------------------
1 08/13/19 Shrek Shao First revision.
2 07/14/20 Shrek Shao Fix baseInstance type from GLint to GLuint.
3 11/19/21 Shrek Shao Decouple gl_BaseVertex/gl_BaseInstance.
4 06/21/22 Alexey Knyazev Fixed typos and type usage.

View File

@@ -1,142 +0,0 @@
Name
ANGLE_base_vertex_base_instance_shader_builtin
Name Strings
GL_ANGLE_base_vertex_base_instance_shader_builtin
Contributors
Shrek Shao, Google Inc.
Contributors to the ANGLE_base_vertex_base_instance specification
Contributors to the ARB_shader_draw_parameters specification
Contact
Shrek Shao (shrekshao 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Nov 19, 2021
Author Revision: 1
Number
OpenGL ES Extension XX
Dependencies
The extension is based on ANGLE_base_vertex_base_instance, all limitations of which
apply to this extension.
Overview
This extension is based on ANGLE_base_vertex_base_instance. It should be enabled
only if ANGLE_base_vertex_base_instance is enabled.
Additional to the functionality exposed by ANGLE_base_vertex_base_instance,
<gl_BaseVertex> and <gl_BaseInstance> builtins are added to the shading language.
For any *BaseVertex* draw call variant, the <baseVertex> of the draw may be
read by the vertex shader as <gl_BaseVertex>. For non *BaseVertex* calls,
the value of <gl_BaseVertex> is 0.
For any *BaseInstance draw call variant, the baseInstance of the draw may
be read by the vertex shader as <gl_BaseInstance>. For non *BaseInstance
calls, the value of <gl_BaseInstance> is 0.
IP Status
No known IP claims.
New Procedures and Functions
None.
New Tokens
None.
Additions to Chapter 10 of the OpenGL ES 3.2 Specification
Section 10.5 Drawing Commands Using Vertex Arrays:
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>, for the commands
void DrawArraysInstancedBaseInstanceANGLE(
enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
and
void MultiDrawArraysInstancedBaseInstanceANGLE(
enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
The base index of the vertex may be read by a vertex shader as
<gl_BaseVertex>. This value is also added to the <gl_VertexID>.
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>. Note that this value is not added to the
<gl_InstanceID>, for the commands
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
and
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
Errors
None.
Modifications to the OpenGL ES Shading Language Specification, Version 3.00
Including the following line in a shader controls the
language featured described in this extension:
#extension GL_ANGLE_base_vertex_base_instance_shader_builtin : <behavior>
where <behavior> is as specified in section 3.5.
A new preprocessor #define is added to the OpenGL ES Shading Language:
#define GL_ANGLE_base_vertex_base_instance_shader_builtin 1
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------------- --------------------------------------------
1 11/19/21 Shrek Shao First revision.
2 06/21/22 Alexey Knyazev Fixed typos and type usage.

View File

@@ -1,103 +0,0 @@
Name
ANGLE_client_arrays
Name Strings
GL_ANGLE_client_arrays
Contributors
Geoff Lang
Contact
Geoff Lang (geofflang 'at' google.com)
Notice
Copyright (c) 2016 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html
Status
Draft
Version
Version 1, February 13, 2016
Number
OpenGL ES Extension #??
Dependencies
Requires OpenGL ES 2.0
Written against the OpenGL ES 2.0 specification.
Overview
This extension allows the OpenGL context to indicate if it supports drawing
with client-side vertex or index data. Client-side can be very inefficient
and unsafe, it is convenient for some users to completely disable its usage.
New Procedures and Functions
None
New Tokens
Accepted by the <cap> parameter to IsEnabled and the <pname> parameter to
GetBooleanv, GetIntegerv, GetFloatv, and GetInteger64v:
CLIENT_ARRAYS_ANGLE 0x93AA
Additions to the OpenGL ES Specification
Add after paragraph 3 of section 2.8 "Vertex Arrays":
If VertexAttribPointer is called while zero is bound to the ARRAY_BUFFER
buffer object binding point, the pointer argument is not NULL, and
CLIENT_ARRAYS_ANGLE is TRUE, an INVALID_OPERATION error is generated.
Add to the end of section 2.9.1 "Vertex Arrays in Buffer Objects":
Rendering commands that draw more than 0 primitives using enabled vertex
attributes with no buffer bound when CLIENT_ARRAYS_ANGLE is TRUE generate
an INVALID_OPERATION error.
Add to the end of section 2.9.2 "Array Indices in Buffer Objects":
Rendering commands that draw using index data when no buffer is bound to
the ELEMENT_ARRAY_BUFFER binding point when CLIENT_ARRAYS_ANGLE is TRUE
generate an INVALID_OPERATION error.
New State
Modify Table 6.22, Miscellaneous
Add:
Initial
Get Value Type Get Command Value Description
-------------------- ---- ----------- ------- ---------------------
CLIENT_ARRAYS_ANGLE B IsEnabled TRUE Client arrays enabled
Conformance Tests
TBD
Issues
None
Revision History
Rev. Date Author Changes
---- ------------- --------- ----------------------------------------
2 Jun 12, 2018 Brandon Jones (Intel) Remove primitives > 0 requirement to error
when doing an indexed draw with no bound
ELEMENT_ARRAY_BUFFER
1 Feb 13, 2016 geofflang Initial version

View File

@@ -1,114 +0,0 @@
Name
ANGLE_clip_cull_distance
Name Strings
GL_ANGLE_clip_cull_distance
Contributors
Contributors to EXT_clip_cull_distance
Members of the WebGL working group
Status
Draft
Version
Last Modified Date: December 1, 2022
Revision: 1
Number
OpenGL ES Extension XX
Dependencies
This specification is written against the OpenGL ES 3.2 Specification
(May 5, 2022), and the OpenGL ES 3.20 Shading Language Specification
(July 10, 2019) but can apply to prior specifications.
OpenGL ES 3.0 and OpenGL ES Shading Language 3.00 are required.
Overview
This extension has the same semantics as EXT_clip_cull_distance but
the number of supported cull distances may be zero.
New Procedures and Functions
None
New Tokens
Accepted by the <pname> parameters of GetBooleanv, GetIntegerv,
GetInteger64v, and GetFloatv:
MAX_CLIP_DISTANCES_ANGLE 0x0D32
MAX_CULL_DISTANCES_ANGLE 0x82F9
MAX_COMBINED_CLIP_AND_CULL_DISTANCES_ANGLE 0x82FA
Accepted by the <pname> parameters of Enable, Disable and IsEnabled:
CLIP_DISTANCE0_ANGLE 0x3000
CLIP_DISTANCE1_ANGLE 0x3001
CLIP_DISTANCE2_ANGLE 0x3002
CLIP_DISTANCE3_ANGLE 0x3003
CLIP_DISTANCE4_ANGLE 0x3004
CLIP_DISTANCE5_ANGLE 0x3005
CLIP_DISTANCE6_ANGLE 0x3006
CLIP_DISTANCE7_ANGLE 0x3007
Additions to OpenGL ES Shading Language 3.20 Specification
Including the following line in a shader can be used to control
the language features described in this extension:
#extension GL_ANGLE_clip_cull_distance : <behavior>
where <behavior> is as described in section 3.4.
A new preprocessor #define is added to the OpenGL ES Shading Language:
#define GL_ANGLE_clip_cull_distance 1
Other additions follow the EXT_clip_cull_distance specification.
Dependencies on cull distance support
If cull distances are not supported, querying MAX_CULL_DISTANCES_ANGLE
and MAX_COMBINED_CLIP_AND_CULL_DISTANCES_ANGLE must return zero, the
built-in constants gl_MaxCullDistances and gl_MaxCombinedClipAndCullDistances
are defined as zero, and gl_CullDistance must not be used in shaders.
New State
Add the following to Table 21.6 (Transformation State):
Initial
Get Value Type Get Command Value Description Sec.
-------------------- ------ ----------- -------- ----------------- ----
CLIP_DISTANCEi_ANGLE 8* x B IsEnabled FALSE ith user clip 12.5
distance enabled
New Implementation Dependent State
Add the following to Table 21.40 (Implementation Dependent Values):
Minimum
Get Value Type Get Command Value Description Sec.
------------------------ ---- ----------- -------- ----------------- ----
MAX_CLIP_DISTANCES_ANGLE Z+ GetIntegerv 8 Max. no. of user 12.5
clip distances
MAX_CULL_DISTANCES_ANGLE Z+ GetIntegerv 0 Max. no. of user 12.5
cull distances
MAX_COMBINED_CLIP_AND- Z+ GetIntegerv 0 Max. combined no. 12.5
_CULL_DISTANCES_ANGLE of user clip and
cull distances
Revision History
12/1/2022 First revision

View File

@@ -1,73 +0,0 @@
Name
ANGLE_compressed_texture_etc
Name Strings
GL_ANGLE_compressed_texture_etc
Version
Last Modifed Date: October 5, 2019
Dependencies
OpenGL ES 2.0 is required.
Overview
This extension exposes the OpenGL ES 3.0 core compressed texture
formats in OpenGL ES 2.0.
New Procedures and Functions
None
New Tokens
Accepted by the <internalformat> parameter of CompressedTexImage2D and the
<format> parameter of CompressedTexSubImage2D:
COMPRESSED_R11_EAC 0x9270
COMPRESSED_SIGNED_R11_EAC 0x9271
COMPRESSED_RG11_EAC 0x9272
COMPRESSED_SIGNED_RG11_EAC 0x9273
COMPRESSED_RGB8_ETC2 0x9274
COMPRESSED_SRGB8_ETC2 0x9275
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
COMPRESSED_RGBA8_ETC2_EAC 0x9278
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
Querying COMPRESSED_TEXTURE_FORMATS will include these new formats.
New Procedures and Functions
None.
Errors
The error INVALID_VALUE is generated if the <internalformat> parameter of
CompressedTexImage2D or the <format> parameter of CompressedTexSubImage2D is
COMPRESSED_R11_EAC, COMPRESSED_SIGNED_R11_EAC, COMPRESSED_RGB8_ETC2,
COMPRESSED_SRGB8_ETC2, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 or
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, and imageSize is not
floor((width + 3) / 4) * floor((height + 3) / 4) * 8
The error INVALID_VALUE is generated if the <internalformat> parameter of
CompressedTexImage2D or the <format> paremeter of CompressedTexSubImage2D is
COMPRESSED_RG11_EAC, COMPRESSED_SIGNED_RG11_EAC, COMPRESSED_RGBA8_ETC2_EAC,
or COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, and imageSize is not
floor((width + 3) / 4) * floor((height + 3) / 4) * 16
New State
None.
Revision History
9/19/2016 First revision
10/5/2019 Rename to ANGLE_compressed_texture_etc

View File

@@ -1,225 +0,0 @@
Name
ANGLE_copy_texture_3d
Name Strings
GL_ANGLE_copy_texture_3d
Contributors
Brandon Jones, Intel
Contacts
Brandon Jones, Intel (brandon1.jones 'at' intel 'dot' com)
Status
Implemented.
Version
Version 1, 2018-8-8
Dependencies
OpenGL ES 3.0 required.
Overview
This extension adds 3D texture support to the functionality
provided by the CHROMIUM_copy_texture extension. Two new
functions are exported, glCopyTexture3DANGLE and
glCopySubTexture3DANGLE that perform the same copy operations as
glCopyTextureCHROMIUM and glCopySubTextureCHROMIUM, respectively,
on GL_TEXTURE_3D and GL_TEXTURE_2D_ARRAY bound textures.
New Procedures and Functions
void CopyTexture3DANGLE(uint sourceId,
int sourceLevel,
enum destTarget,
uint destId,
int destLevel,
int internalFormat,
enum destType,
boolean unpackFlipY,
boolean unpackPremultiplyAlpha,
boolean unpackUnmultiplyAlpha)
void CopySubTexture3DANGLE(uint sourceId,
int sourceLevel,
enum destTarget,
uint destId,
int destLevel,
int xoffset,
int yoffset,
int zoffset,
int x,
int y,
int z,
sizei width,
sizei height,
sizei depth,
boolean unpackFlipY,
boolean unpackPremultiplyAlpha,
boolean unpackUnmultiplyAlpha)
Additions to the OpenGL ES 3.0 Specification
The command
CopyTexture3DANGLE
All CopyTexture3DANGLE behavior is the same as
CopyTextureCHROMIUM unless otherwise defined below.
When source texture doesn't contain a superset of the component
required by <internalFormat>, fill the components by the
following rules.
source format color components
----------------------------------------
RED (R, 0, 0, 1)
RED_INTEGER (R, 0, 0, 1)
RG (R, G, 0, 1)
RG_INTEGER (R, G, 0, 1)
RGB (R, G, B, 1)
RGB_INTEGER (R, G, B, 1)
RGBA (R, G, B, A)
RGBA_INTEGER (R, G, B, A)
LUMINANCE_ALPHA (L, L, L, A)
LUMINANCE (L, L, L, 1)
ALPHA (0, 0, 0, A)
INVALID_OPERATION is generated if the format of <sourceId> is not
one of formats in Table 1.1.
INVALID_ENUM is generated if <destTarget> is not TEXTURE_3D or
TEXTURE_2D_ARRAY.
INVALID_VALUE is generated if the texture corresponding to
<sourceId> has not been bound as <destTarget>.
INVALID_OPERATION is generated if <internalFormat> is not one of
the sized internal formats in Table 1.0.
The command
CopySubTexture3DANGLE
All CopySubTexture3DANGLE behavior is the same as
CopySubTextureCHROMIUM unless otherwise defined below.
<zoffset> specifies a texel offset in the z direction
respectively within the destination texture.
<z> specifies a texel offset in the z direction respectively
within the source texture.
<depth> specifies the depth of the texture subimage.
INVALID_ENUM is generated if <destTarget> is not TEXTURE_3D or
TEXTURE_2D_ARRAY.
INVALID_VALUE is generated if the texture corresponding to
<sourceId> and <destId> have not been bound as <destTarget>.
INVALID_VALUE is generated if either <sourceId> texture or
<destId> texture is not defined.
INVALID_OPERATION is generated if the format of <sourceId> or
<destId> is not one of formats in Table 1.1.
INVALID_VALUE is generated if zoffset is less than 0.
INVALID_VALUE is generated if z is less than 0.
INVALID_VALUE is generated if depth is less than 0.
INVALID_VALUE is generated if (<z> + <depth>) > srcDepth.
INVALID_VALUE is generated if (<zoffset> + <depth>) > destDepth.
Table 1.0 internal formats for CopyTexture3DANGLE:
<internalFormat>
---------------
RGB
RGBA
LUMINANCE
LUMINANCE_ALPHA
ALPHA
R8
R8_SNORM
R16F
R32F
R8UI
R8I
R16UI
R16I
R32UI
R32I
RG8
RG8_SNORM
RG16F
RG32F
RG8UI
RG8I
RG16UI
RG16I
RG32UI
RG32I
RGB8
SRGB8
RGB565
RGB8_SNORM
R11F_G11F_B10F
RGB9_E5
RGB16F
RGB32F
RGB8UI
RGB8I
RGB16UI
RGB16I
RGB32UI
RGB32I
RGBA8
SRGB8_ALPHA8
RGBA8_SNORM
RGB5_A1
RGBA4
RGB10_A2
RGBA16F
RGBA32F
RGBA8UI
RGBA8I
RGB10_A2UI
RGBA16UI
RGBA16I
RGBA32I
RGBA32UI
Table 1.1 Valid source texture formats for
CopyTexture3DANGLE and source and destination formats for
CopySubTexture3DANGLE:
Format
---------------
RED
RED_INTEGER
RG
RG_INTEGER
RGB
RGB_INTEGER
RGBA
RGBA_INTEGER
LUMINANCE_ALPHA
LUMINANCE
ALPHA
Revision History
Version 1, 2018-8-8 (Brandon Jones)
- Initial implementation.

View File

@@ -1,402 +0,0 @@
Name
ANGLE_depth_texture
Name Strings
GL_ANGLE_depth_texture
Contributors
Nicolas Capens, TransGaming
Daniel Koch, TransGaming
Shannon Woods, TransGaming
Kenneth Russell, Google
Vangelis Kokkevis, Google
Gregg Tavares, Google
Contributors to OES_depth_texture
Contributors to OES_packed_depth_stencil
Contact
Shannon Woods, TransGaming (shannon 'dot' woods 'at' transgaming.com)
Status
Implemented in ANGLE.
Version
Last Modified Date: February 25, 2013
Revision: #4
Number
TBD
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the OpenGL ES 2.0.25 specification
OES_packed_depth_stencil affects the definition of this extension.
EXT_texture_storage affects the definition of this extension.
Overview
This extension defines support for 2D depth and depth-stencil
textures in an OpenGL ES implementation.
This extension incorporates the depth texturing functionality of
OES_depth_texture and OES_packed_depth_stencil, but does not
provide the ability to load existing data via TexImage2D or
TexSubImage2D. This extension also allows implementation
variability in which components from a sampled depth texture
contain the depth data. Depth textures created with this
extension only support 1 level.
New Procedures and Functions
None
New Tokens
Accepted by the <format> parameter of TexImage2D and TexSubImage2D and
<internalformat> parameter of TexImage2D:
DEPTH_COMPONENT 0x1902
DEPTH_STENCIL_OES 0x84F9
Accepted by the <type> parameter of TexImage2D, TexSubImage2D:
UNSIGNED_SHORT 0x1403
UNSIGNED_INT 0x1405
UNSIGNED_INT_24_8_OES 0x84FA
Accepted by the <internalformat> parameter of TexStorage2DEXT:
DEPTH_COMPONENT16 0x81A5
DEPTH_COMPONENT32_OES 0x81A7
DEPTH24_STENCIL8_OES 0x88F0
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
Update Section 2.10.5 "Shader Execution" in the subsection titled
"Texture Access" add a new paragraph before the last paragraph add
this line:
"The stencil index texture internal component is ignored if the base
internal format is DEPTH_STENCIL_OES.
If a vertex shader uses..."
Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterization)
Add the following rows to Table 3.2 (page 62):
type Parameter GL Data Type Special
------------------------------------------------
... ... ...
UNSIGNED_SHORT ushort No
UNSIGNED_INT uint No
UNSIGNED_INT_24_8_OES uint Yes
Add the following rows to Table 3.3 (page 62):
Format Name Element Meaning and Order Target Buffer
------------------------------------------------------------------
... ... ...
DEPTH_COMPONENT Depth Depth
DEPTH_STENCIL_OES Depth and Stencil Index Depth and Stencil
... ... ...
Add a row to Table 3.5 "Packed pixel formats" (page 64):
type Parameter GL Type Components Pixel Formats
------------------------------------------------------------------
... ... ... ...
UNSIGNED_INT_24_8_OES uint 2 DEPTH_STENCIL_OES
Add a new table after Table 3.6 (page 64):
UNSIGNED_INT_24_8_OES
31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0
+----------------------------------+---------------+
| 1st Component | 2nd Component |
+----------------------------------+---------------+
Table 3.6.B: UNSIGNED_INT formats
Add a row to Table 3.7 "Packed pixel field assignments" (page 65):
Format | 1st 2nd 3rd 4th
------------------+-------------------------------
... | ... ... ... ...
DEPTH_STENCIL_OES | depth stencil N/A N/A
Add the following paragraph to the end of the section "Conversion to
floating-point" (page 65):
"For groups of components that contain both standard components and index
elements, such as DEPTH_STENCIL_OES, the index elements are not converted."
In section 3.7.1 "Texture Image Specification", update page 67 to
say:
"The selected groups are processed as described in section 3.6.2, stopping
just before final conversion. Each R, G, B, A, or depth value so generated
is clamped to [0, 1], while the stencil index values are masked by 2^n-1,
where n is the number of stencil bits in the internal format resolution
(see below).
Components are then selected from the resulting R, G, B, A, depth, or
stencil index values to obtain a texture with the base internal format
specified by <internalformat>. Table 3.8 summarizes the mapping of R, G,
B, A, depth, or stencil values to texture components, as a function of the
base internal format of the texture image. <internalformat> may be
specified as one of the internal format symbolic constants listed in
table 3.8. Specifying a value for <internalformat> that is not one of the
above values generates the error INVALID_VALUE. If <internalformat> does
not match <format>, the error INVALID_OPERATION is generated.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES are supported by texture image specification commands
only if <target> is TEXTURE_2D. Using these formats in conjunction with
any other <target> will result in an INVALID_OPERATION error.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES only support one level of image data. Specifying a
non-zero value for <level> will result in an INVALID_OPERATION error.
Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES
require either depth component data or depth/stencil component data.
Textures with other base internal formats require RGBA component data. The
error INVALID_OPERATION is generated if the base internal format is
DEPTH_COMPONENT or DEPTH_STENCIL_OES and <format> is not DEPTH_COMPONENT or
DEPTH_STENCIL_OES, or if the base internal format is not DEPTH_COMPONENT or
DEPTH_STENCIL_OES and <format> is DEPTH_COMPONENT or DEPTH_STENCIL_OES.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES do not support loading image data via the TexImage
commands. They can only have their contents specified by rendering
to them. The INVALID_OPERATION error is generated by the TexImage2D
command if <data> is not NULL for such textures."
Add a row to table 3.8 (page 68), and update the title of the
second column:
Base Internal Format RGBA, Depth and Stencil Values Internal Components
-------------------------------------------------------------------------
... ... ...
DEPTH_COMPONENT Depth D
DEPTH_STENCIL_OES Depth,Stencil D,S
... ... ...
Update the caption for table 3.8 (page 68)
"Table 3.8: Conversion from RGBA, depth, and stencil pixel components to
internal texture components. Texture components R, G, B, A, and L are
converted back to RGBA colors during filtering as shown in table 3.12.
Texture components D are converted to RGBA colors as described in
section 3.7.8-1/2."
Add the following to section 3.7.2 "Alternate Texture Image Specification
Commands":
"CopyTexImage2D and CopyTexSubImage2D generate the INVALID_OPERATION
error if the base internal format of the destination texture is
DEPTH_COMPONENT or DEPTH_STENCIL_OES.
TexSubImage2D generates the INVALID_OPERATION error if the base internal
format of the texture is DEPTH_COMPONENT or DEPTH_STENCIL_OES."
Add a new section between sections 3.7.8 and 3.7.9:
"3.7.8-1/2 Depth/Stencil Textures
If the currently bound texture's base internal format is DEPTH_COMPONENT or
DEPTH_STENCIL_OES, then the output of the texture unit is as described
below. Otherwise, the texture unit operates in the normal manner.
Let <D_t> be the depth texture value, provided by the shader's texture lookup
function. Then the effective texture value is computed as follows:
<Tau> = <D_t>
If the texture image has a base internal format of DEPTH_STENCIL_OES, then
the stencil index texture component is ignored. The texture value <Tau> does
not include a stencil index component, but includes only the depth
component.
The resulting <Tau> is assigned to <R_t>. In some implementations, <Tau> is
also assigned to <G_t>, <B_t>, or <A_t>. Thus in table 3.12, textures with
depth component data behave as if their base internal format is RGBA, with
values in <G_t>, <B_t>, and <A_t> being implementation dependent."
Add the following to section 3.7.11 "Mipmap Generation":
"If the level zero array contains depth or depth-stencil data, the
error INVALID_OPERATION is generated."
Insert a new paragraph after the first paragraph of the "Texture Access"
subsection of section 3.8.2 on page 87, which says:
"Texture lookups involving textures with depth component data generate
a texture source color by using depth data directly, as described in
section 3.7.8-1/2. The stencil texture internal component is ignored
if the base internal format is DEPTH_STENCIL_OES."
Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment
Operations and the Framebuffer)
In section 4.4.5 "Framebuffer Completeness", replace the the 3rd
paragraph with the following text:
"* An internal format is color-renderable if it is one of the formats
from table 4.5 noted as color-renderable or if it is unsized format
RGBA or RGB. No other formats, including compressed internal formats,
are color-renderable.
* An internal format is depth-renderable if it is one of the sized
internal formats from table 4.5 noted as depth-renderable, if it
is the unsized format DEPTH_COMPONENT or if it is the internal
format value of DEPTH24_STENCIL8_OES. No other formats are
depth-renderable.
* An internal format is stencil-renderable if it is one of the sized
internal formats from table 4.5 noted as stencil-renderable or if it
is DEPTH24_STENCIL8_OES. No other formats are stencil-renderable."
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
Functions)
None.
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
Requests)
None.
Interactions with OES_packed_depth_stencil
If OES_packed_depth_stencil is not supported, mentions of
DEPTH_STENCIL_OES and UNSIGNED_INT_24_8_OES as a format/type combinations
for TexImage2D and TexSubImage2D are omitted. Mentions of
the internal format DEPTH24_STENCIL8_OES are also omitted.
Interactions with EXT_texture_storage
If EXT_texture_storage is supported the following internalformat
to format/type mappings are used:
<internalformat> <format> <type>
---------------- -------- ------
DEPTH_COMPONENT16 DEPTH_COMPONENT UNSIGNED_SHORT
DEPTH_COMPONENT32_OES DEPTH_COMPONENT UNSIGNED_INT
DEPTH24_STENCIL8_OES DEPTH_STENCIL_OES UNSIGNED_INT
Textures with the above <internalformats> only support one level of
image data. Specifying a value other than one for the <levels> parameter
to TexStorage2DEXT will result in an INVALID_OPERATION error.
If EXT_texture_storage is not supported, ignore any references
to TexStorage2DEXT.
Errors
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT,
or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT, or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT,
or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT, or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are DEPTH_STENCIL_OES and <type> is not
UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
is DEPTH_STENCIL_OES and <type> is not UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> is not DEPTH_STENCIL_OES and <type> is
UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
is not DEPTH_STENCIL_OES and <type> is UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated in the following situations:
- TexImage2D is called with <format> and <internalformat> of
DEPTH_COMPONENT or DEPTH_STENCIL_OES and
- <target> is not TEXTURE_2D,
- <data> is not NULL, or
- <level> is not zero.
- TexSubImage2D is called with <format> of DEPTH_COMPONENT or
DEPTH_STENCIL_OES.
- TexStorage2DEXT is called with <internalformat> of DEPTH_COMPONENT16,
DEPTH_COMPONENT32_OES, or DEPTH24_STENCIL8_OES, and
- <target> is not TEXTURE_2D, or
- <levels> is not one.
- CopyTexImage2D is called with an <internalformat> that has a base
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
- CopyTexSubImage2D is called with a target texture that has a base
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
- GenerateMipmap is called on a texture that has a base internal format
of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
New State
None.
Issues
1) What are the differences between this extension and OES_depth_texture
and OES_packed_depth_stencil?
RESOLVED: This extension:
- does not support loading pre-baked depth stencil data via
TexImage2D or TexSubImage2D.
- allows variability in the y-, z-, and w-components of the sample
results from depth textures.
- only supports one level textures.
- explicitly lists the errors for unsupported functionality.
Since these were not clearly specified in the OES_depth_texture
extension there may be differences in error values between
implementations of OES_depth_texture and ANGLE_depth_texture.
This specification was also rebased to apply against the OpenGL ES 2.0
specification instead of the OpenGL specification, making it more
obvious what all the functionality changes are.
2) Why does TexSubImage2D accept the new format/type combinations even
though it does not actually support loading data?
RESOLVED: This was done to be more consistent with the OES_depth_texture
extension and to make it easier to add support for loading texture
data if it is possible to support in the future.
3) Why are only 1-level depth textures supported?
RESOLVED: The only use for multiple levels of depth textures would
be for fitlered texturing. However since it is not possible to
render to non-zero-level texture levels in OpenGL ES 2.0, and since
this extension forbids loading existing data and GenerateMipmap on
depth textures, it is impossible to initialize or specify contents
for non-zero levels of depth textures.
Revision History
02/25/2013 swoods revise to allow texture lookup to guarantee depth values
only in red channel of sample result.
06/04/2012 dgkoch fix errors, disallow multi-level depth textures.
05/30/2012 dgkoch minor updates and add issues.
05/23/2012 dgkoch intial revision based on OES_depth_texture and
OES_packed_depth_stencil and rebased against the ES 2.0 spec

View File

@@ -1,81 +0,0 @@
Name
ANGLE_explicit_context_gles1
Name Strings
GL_ANGLE_explicit_context_gles1
Contributors
Brandon Jones, Intel
Contacts
Brandon Jones, Intel (brandon1.jones 'at' intel 'dot' com)
Status
Complete.
Version
Version 1, 2018-5-22
Number
GL Extension XXX
Dependencies
OpenGL ES 1.0 is required.
EGL_ANGLE_explicit_context is required.
Overview
This extension adds new OpenGL ES entry points that allow the user to pass the current EGL
context as a function parameter. This allows users to skip lookup of the thread's current
context upon entry.
New Types
typedef void* GLeglContextANGLE
New Procedures and Functions
For every OpenGL ES entry point available in OpenGL ES 1.0, an additional entry point is made
available. The entry points have the form of:
<return value> gl<entry point name>ContextANGLE(GLeglContextANGLE context, <entry point parameters>)
If a function already has an extension suffix, this form still applies.
New Tokens
None.
Additions to Chapter 2 of the OpenGL ES 1.0 Specification (OpenGL ES Operation)
The ContextANGLE entry points allow the user to pass the current EGL context as a function
parameter to provide better performance than looking up the current EGL context at every GL
entry point.
Calls made with an explicit context provide no additional validation for the passed context
parameter.
Calls made with an explicit context will generate errors under the same conditions as they
would without an explicit context. Any instances of undefined behaviour without specifying
an explicit context are still undefined when specifying an explicit context.
When an EGL context that is not current is explicitly passed, the resulting behavior is
undefined.
Issues
None.
Revision History
Version 1, 2018-5-22 (Brandon Jones)
- Initial draft

View File

@@ -1,333 +0,0 @@
Name
ANGLE_external_objects_flags
Name Strings
GL_ANGLE_memory_object_flags
Contributors
Shahbaz Youssefi, Google
Contact
Shahbaz Youssefi, Google (syoussefi 'at' google.com)
Status
Draft
Version
Last Modified Date: Nov 10, 2021
Revision: 2
Number
TBD
Dependencies
Written against the OpenGL 4.5 and OpenGL ES 3.2 specifications
GL_ANGLE_memory_object_flags requires GL_EXT_memory_object.
Overview
Building upon the OpenGL memory object framework defined in
EXT_external_objects, this extension introduces new Texture entry points
for specifying create and usage flags parameters. These parameters match
an external Texture's corresponding Vulkan create and usage flags. This
allows applications to drop usage flags that are detrimental to
performance, or add create flags as necessary.
Additionally, these entry points take the pointer to the chain of extension
structures appended to VkImageCreateInfo, so that the OpenGL implementation
can recreate the image identically.
New Procedures and Functions
The following commands are added:
void TexStorageMemFlags2DANGLE(enum target,
sizei levels,
enum internalFormat,
sizei width,
sizei height,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TexStorageMemFlags2DMultisampleANGLE(enum target,
sizei samples,
enum internalFormat,
sizei width,
sizei height,
boolean fixedSampleLocations,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TexStorageMemFlags3DANGLE(enum target,
sizei levels,
enum internalFormat,
sizei width,
sizei height,
sizei depth,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TexStorageMemFlags3DMultisampleANGLE(enum target,
sizei samples,
enum internalFormat,
sizei width,
sizei height,
sizei depth,
boolean fixedSampleLocations,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
[[ The following are added if direct state access is supported ]]
void TextureStorageMemFlags2DANGLE(uint texture,
sizei levels,
enum internalFormat,
sizei width,
sizei height,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TextureStorageMemFlags2DMultisampleANGLE(uint texture,
sizei samples,
enum internalFormat,
sizei width,
sizei height,
boolean fixedSampleLocations,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TextureStorageMemFlags3DANGLE(uint texture,
sizei levels,
enum internalFormat,
sizei width,
sizei height,
sizei depth,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TextureStorageMemFlags3DMultisampleANGLE(uint texture,
sizei samples,
enum internalFormat,
sizei width,
sizei height,
sizei depth,
boolean fixedSampleLocations,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
[[ The following are available in OpenGL only ]]
void TexStorageMemFlags1DANGLE(enum target,
sizei levels,
enum internalFormat,
sizei width,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
[[ The following are availble in OpenGL only, and only when
direct state access is available ]]
void TextureStorageMemFlags1DANGLE(uint texture,
sizei levels,
enum internalFormat,
sizei width,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
New Tokens
The following tokens are added:
Accepted by the <createFlags> parameter of TexStorageMemFlags*ANGLE() and
TextureStorageMemFlags*ANGLE().
CREATE_SPARSE_BINDING_BIT_ANGLE 0x00000001
CREATE_SPARSE_RESIDENCY_BIT_ANGLE 0x00000002
CREATE_SPARSE_ALIASED_BIT_ANGLE 0x00000004
CREATE_MUTABLE_FORMAT_BIT_ANGLE 0x00000008
CREATE_CUBE_COMPATIBLE_BIT_ANGLE 0x00000010
CREATE_ALIAS_BIT_ANGLE 0x00000400
CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_ANGLE 0x00000040
CREATE_2D_ARRAY_COMPATIBLE_BIT_ANGLE 0x00000020
CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_ANGLE 0x00000080
CREATE_EXTENDED_USAGE_BIT_ANGLE 0x00000100
CREATE_PROTECTED_BIT_ANGLE 0x00000800
CREATE_DISJOINT_BIT_ANGLE 0x00000200
CREATE_CORNER_SAMPLED_BIT_ANGLE 0x00002000
CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_ANGLE 0x00001000
CREATE_SUBSAMPLED_BIT_ANGLE 0x00004000
Accepted by the <usageFlags> parameter of TexStorageMemFlags*ANGLE() and
TextureStorageMemFlags*ANGLE().
USAGE_TRANSFER_SRC_BIT_ANGLE 0x00000001
USAGE_TRANSFER_DST_BIT_ANGLE 0x00000002
USAGE_SAMPLED_BIT_ANGLE 0x00000004
USAGE_STORAGE_BIT_ANGLE 0x00000008
USAGE_COLOR_ATTACHMENT_BIT_ANGLE 0x00000010
USAGE_DEPTH_STENCIL_ATTACHMENT_BIT_ANGLE 0x00000020
USAGE_TRANSIENT_ATTACHMENT_BIT_ANGLE 0x00000040
USAGE_INPUT_ATTACHMENT_BIT_ANGLE 0x00000080
USAGE_SHADING_RATE_IMAGE_BIT_ANGLE 0x00000100
USAGE_FRAGMENT_DENSITY_MAP_BIT_ANGLE 0x00000200
Additions to Chapter 8 of the OpenGL 4.5 Specification (Textures and
Samplers)
For each list of TexStorage* commands in the 1D, 2D, 3D,
2DMultisample, and 3DMultisample families, add the following
variants:
void TexStorageMemFlags*ANGLE(<existing parameters>,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
void TextureStorageMemFlags*ANGLE(<existing parameters>,
uint memory,
uint64 offset,
bitfield createFlags,
bitfield usageFlags,
const void *imageCreateInfoPNext);
For each of the TexStorageMemFlags*ANGLE commands, move the description from
the corresponding TexStorageMem*EXT from EXT_external_objects under that
command and add the following language:
"The implementation should apply the same semantics to the internal
storage of the texture based on <createFlags>, <usageFlags> and
<imageCreateInfoPNext> as the corresonding VkImageCreateFlags,
VkImageUsageFlags and chained structs to VkImageCreateInfo would have
on a Vulkan image respectively. See tables 8.17 and 8.18 for the
mapping between the GL and Vulkan flags. It is undefined behavior if
the application provides create flags, usage flags or chained structs
that are not identical to those used to create the Vulkan image."
Table 8.17: Create flags and corresponding Vulkan Image Create Flags
| Create Flag | Equivalent Vulkan Create Flag |
+----------------------------------------------------+-----------------------------------------------------------+
| CREATE_SPARSE_BINDING_BIT_ANGLE | VK_IMAGE_CREATE_SPARSE_BINDING_BIT |
| CREATE_SPARSE_RESIDENCY_BIT_ANGLE | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT |
| CREATE_SPARSE_ALIASED_BIT_ANGLE | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT |
| CREATE_MUTABLE_FORMAT_BIT_ANGLE | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT |
| CREATE_CUBE_COMPATIBLE_BIT_ANGLE | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT |
| CREATE_ALIAS_BIT_ANGLE | VK_IMAGE_CREATE_ALIAS_BIT |
| CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_ANGLE | VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT |
| CREATE_2D_ARRAY_COMPATIBLE_BIT_ANGLE | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT |
| CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_ANGLE | VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT |
| CREATE_EXTENDED_USAGE_BIT_ANGLE | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT |
| CREATE_PROTECTED_BIT_ANGLE | VK_IMAGE_CREATE_PROTECTED_BIT |
| CREATE_DISJOINT_BIT_ANGLE | VK_IMAGE_CREATE_DISJOINT_BIT |
| CREATE_CORNER_SAMPLED_BIT_ANGLE | VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV |
| CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_ANGLE | VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT |
| CREATE_SUBSAMPLED_BIT_ANGLE | VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT |
+----------------------------------------------------------------------------------------------------------------+
Table 8.18: Usage flags and corresponding Vulkan Image Usage Flags
| Usage Flag | Equivalent Vulkan Usage Flag |
+------------------------------------------+---------------------------------------------+
| USAGE_TRANSFER_SRC_BIT_ANGLE | VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
| USAGE_TRANSFER_DST_BIT_ANGLE | VK_IMAGE_USAGE_TRANSFER_DST_BIT |
| USAGE_SAMPLED_BIT_ANGLE | VK_IMAGE_USAGE_SAMPLED_BIT |
| USAGE_STORAGE_BIT_ANGLE | VK_IMAGE_USAGE_STORAGE_BIT |
| USAGE_COLOR_ATTACHMENT_BIT_ANGLE | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
| USAGE_DEPTH_STENCIL_ATTACHMENT_BIT_ANGLE | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
| USAGE_TRANSIENT_ATTACHMENT_BIT_ANGLE | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT |
| USAGE_INPUT_ATTACHMENT_BIT_ANGLE | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
| USAGE_SHADING_RATE_IMAGE_BIT_ANGLE | VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV |
| USAGE_FRAGMENT_DENSITY_MAP_BIT_ANGLE | VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT |
+----------------------------------------------------------------------------------------+
Add the following errors for each of the TexStorageMemFlags*ANGLE commands:
"An INVALID_VALUE error is generated if <createFlags> has a bit set
other than those specified in table 8.17."
"An INVALID_VALUE error is generated if <usageFlags> has a bit set
other than those specified in table 8.18."
For each of the TexStorageMem*EXT commands, change the description of
TexStorageMem*EXT and TextureStorageMem*EXT as such:
"Calling TexStorageMem*EXT is equivalent to calling
TexStorageMemFlags*ANGLE with 0 as <createFlags>, all
Vulkan-supported usage flags as <usageFlags>, even if there are no
corresponding GL flags specified in this extension, and NULL as
<imageCreateInfoPNext>."
Issues
1) Can the GL and Vulkan create and usage flag values diverge?
RESOLVED: No. It is expected for the application to provide the flags
used to create the Vulkan image verbatim.
2) What if Vulkan adds new create and usage flags?
RESOLVED: If the implementation is too old to be aware of those flags,
the functions from GL_EXT_memory_object must be used instead. New flags
can be added through new extensions that build on this extension.
3) Should the GL implementation apply the same validation as Vulkan based
on the create and usage flags?
RESOLVED: No. The application has already created an image with these
flags in Vulkan, so the GL implementation can assume they are valid.
Validating this is expensive and unnecessary in almost all applications.
4) How can extension structs applied to VkImageCreateInfo be communicated
to the GL implementation?
RESOLVED: The chain of structs itself is directly passed to the
implementation.
Revision History
Revision 2, 2021-11-10 (Shahbaz Youssefi)
- Added the imageCreateInfoPNext parameter.
Revision 1, 2020-08-03 (Shahbaz Youssefi)
- Initial draft based on EXT_external_objects.

View File

@@ -1,135 +0,0 @@
Name
ANGLE_external_objects_fuchsia
Name Strings
GL_ANGLE_memory_object_fuchsia
GL_ANGLE_semaphore_fuchsia
Contributors
Michael Spang, Google
Contact
Michael Spang, Google (spang 'at' google.com)
Status
Draft
Version
Last Modified Date: Feb 19, 2020
Revision: 1
Number
TBD
Dependencies
Written against the OpenGL 4.5 and OpenGL ES 3.2 specifications
GL_ANGLE_memory_object_fuchsia requires GL_EXT_memory_object
GL_ANGLE_semaphore_fuchsia requires GL_EXT_semaphore
Overview
Building upon the OpenGL memory object and semaphore framework
defined in EXT_external_objects, this extension enables an OpenGL
application to import a memory object or semaphore from Zircon
external handles.
New Procedures and Functions
If the GL_ANGLE_memory_object_fuchsia string is reported, the following
commands are added:
void ImportMemoryZirconHandleANGLE(uint memory,
uint64 size,
enum handleType,
uint handle);
If the GL_ANGLE_semaphore_fuchsia string is reported, the following commands
are added:
void ImportSemaphoreZirconHandleANGLE(uint semaphore,
enum handleType,
uint handle);
New Tokens
If the GL_ANGLE_memory_object_fuchsia string is reported, the following
tokens are added:
Accepted by the <handleType> parameter of ImportMemoryZirconHandleANGLE().
HANDLE_TYPE_ZIRCON_VMO_ANGLE 0x93AE
If the GL_ANGLE_semaphore_fuchsia string is reported, the following
tokens are added:
Accepted by the <handleType> parameter of ImportSemaphoreZirconHandleANGLE().
HANDLE_TYPE_ZIRCON_EVENT_ANGLE 0x93AF
Additions to Chapter 4 of the OpenGL 4.5 Specification (Event Model)
Add the following entry to table 4.2 "Commands for importing
external semaphore handles."
| Handle Type | Import command |
+--------------------------------+----------------------------------+
| HANDLE_TYPE_ZIRCON_EVENT_ANGLE | ImportSemaphoreZirconHandleANGLE |
+--------------------------------+----------------------------------+
Replace the paragraph in section 4.2.1 beginning "External handles
are often defined..." with the following
The command
ImportSemaphoreZirconHandleANGLE(uint semaphore,
enum handleType,
uint handle);
imports a semaphore from the zircon handle <handle>. What type of
handle <handle> refers to is determined by <handleType>. A successful
import operation transfers ownership of <handle> to the GL
implementation, and performing any operation on <handle> in the
application after an import results in undefined behavior.
Additions to Chapter 6 of the OpenGL 4.5 Specification (Memory Objects)
Add the following entry to table 6.2 "Commands for importing
external memory handles."
| Handle Type | Import command |
+------------------------------+-------------------------------+
| HANDLE_TYPE_ZIRCON_VMO_ANGLE | ImportMemoryZirconHandleANGLE |
+------------------------------+-------------------------------+
Replace the paragraph in section 6.1 beginning "External handles are
often defined..." with the following
The command
void ImportMemoryZirconHandleANGLE(uint memory,
uint64 size,
enum handleType,
uint handle);
imports a memory object of length <size> from the handle
<handle>. What type of object <handle> refers to is determined by
<handleType>. A successful import operation transfers ownership
of <handle> to the GL implementation, and performing any operation on
<handle> in the application after an import results in undefined
behavior.
Revision History
Revision 1, 2020-02-19 (Michael Spang)
- Initial draft based closely on EXT_external_objects_fd.

View File

@@ -1,437 +0,0 @@
Name
ANGLE_framebuffer_blit
Name Strings
GL_ANGLE_framebuffer_blit
Contributors
Contributors to EXT_framebuffer_blit
Daniel Koch, TransGaming Inc.
Shannon Woods, TransGaming Inc.
Kenneth Russell, Google Inc.
Vangelis Kokkevis, Google Inc.
Contact
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com)
Status
Implemented in ANGLE ES2
Version
Last Modified Date: Sept 22, 2012
Author Revision: 4
Number
OpenGL ES Extension #83
Dependencies
OpenGL ES 2.0 is required.
The extension is written against the OpenGL ES 2.0 specification.
OES_texture_3D affects the definition of this extension.
Overview
This extension modifies framebuffer objects by splitting the
framebuffer object binding point into separate DRAW and READ
bindings. This allows copying directly from one framebuffer to
another. In addition, a new high performance blit function is
added to facilitate these blits and perform some data conversion
where allowed.
IP Status
No known IP claims.
New Procedures and Functions
void BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
bitfield mask, enum filter);
New Tokens
Accepted by the <target> parameter of BindFramebuffer,
CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES,
FramebufferRenderbuffer, and
GetFramebufferAttachmentParameteriv:
// (reusing the tokens from EXT_framebuffer_blit)
READ_FRAMEBUFFER_ANGLE 0x8CA8
DRAW_FRAMEBUFFER_ANGLE 0x8CA9
Accepted by the <pname> parameters of GetIntegerv and GetFloatv:
// (reusing the tokens from EXT_framebuffer_blit)
DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias FRAMEBUFFER_BINDING
READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
Change the last paragraph of section 3.7.2 (Alternate Texture Image
Specification Commands) to:
"Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will
result in an INVALID_FRAMEBUFFER_OPERATION error if the object bound
to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete"
(section 4.4.4.2)."
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
Operations and the Framebuffer)
Change the first word of Chapter 4 from "The" to "A".
Append to the introduction of Chapter 4:
"Conceptually, the GL has two active framebuffers; the draw
framebuffer is the destination for rendering operations, and the
read framebuffer is the source for readback operations. The same
framebuffer may be used for both drawing and reading. Section
4.4.1 describes the mechanism for controlling framebuffer usage."
Modify the first sentence of the last paragraph of section 4.1.1 as follows:
"While an application-created framebuffer object is bound to
DRAW_FRAMEBUFFER_ANGLE, the pixel ownership test always passes."
Add to 4.3.1 (Reading Pixels), right before the subsection titled
"Obtaining Pixels from the Framebuffer":
"Calling ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if
the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer
complete" (section 4.4.4.2). GetIntegerv generates an INVALID_OPERATION
error if the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not
framebuffer complete, or if the GL is using a framebuffer object
(i.e. READ_FRAMEBUFFER_BINDING_ANGLE is non-zero) and there is no color
attachment."
Insert a new section 4.3.2 titled "Copying Pixels" and renumber the
subsequent sections. Add the following text:
"BlitFramebufferANGLE transfers a rectangle of pixel values from one
region of the read framebuffer to another in the draw framebuffer.
BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1,
int dstX0, int dstY0, int dstX1, int dstY1,
bitfield mask, enum filter);
<mask> is the bitwise OR of a number of values indicating which
buffers are to be copied. The values are COLOR_BUFFER_BIT,
DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT, which are described in
section 4.2.3. The pixels corresponding to these buffers are
copied from the source rectangle, bound by the locations (srcX0,
srcY0) and (srcX1, srcY1), to the destination rectangle, bound by
the locations (dstX0, dstY0) and (dstX1, dstY1). The lower bounds
of the rectangle are inclusive, while the upper bounds are
exclusive.
The actual region taken from the read framebuffer is limited to the
intersection of the source buffers being transferred, which may include
the color buffer, the depth buffer, and/or the stencil buffer depending on
<mask>. The actual region written to the draw framebuffer is limited to the
intersection of the destination buffers being written, which may include
the color buffer, the depth buffer, and/or the stencil buffer
depending on <mask>. Whether or not the source or destination regions are
altered due to these limits, the offset applied to pixels being transferred
is performed as though no such limits were present.
Stretching and scaling during a copy are not supported. If the source
and destination rectangle dimensions do not match, no copy is
performed and an INVALID_OPERATION error is generated.
Because stretching is not supported, <filter> must be NEAREST and
no filtering is applied.
Flipping during a copy is not supported. If either the source or
destination rectangle specifies a negative dimension, the error
INVALID_OPERATION is generated. If both the source and
destination rectangles specify a negative dimension for the same
direction, no reversal is required and the operation is supported.
If the source and destination buffers are identical, and the
source and destination rectangles overlap, the result of the blit
operation is undefined.
The pixel copy bypasses the fragment pipeline. The only fragment
operations which affect the blit are the pixel ownership test and
the scissor test.
If a buffer is specified in <mask> and does not exist in both the
read and draw framebuffers, the corresponding bit is silently
ignored.
Calling BlitFramebufferANGLE will result in an
INVALID_FRAMEBUFFER_OPERATION error if the objects bound to
DRAW_FRAMEBUFFER_BINDING_ANGLE and READ_FRAMEBUFFER_BINDING_ANGLE are
not "framebuffer complete" (section 4.4.4.2)."
Calling BlitFramebufferANGLE will result in an INVALID_OPERATION
error if <mask> includes COLOR_BUFFER_BIT and the source and
destination color formats to not match.
Calling BlitFramebufferANGLE will result in an INVALID_OPERATION
error if <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT
and the source and destination depth and stencil buffer formats do
not match.
If <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, only
complete buffers can be copied. If the source rectangle does not
specify the complete source buffer or the destination rectangle
(after factoring the scissor region, if applicable) does not specify
the complete destination buffer, an INVALID_OPERATION
error is generated.
Modify the beginning of section 4.4.1 as follows:
"The default framebuffer for rendering and readback operations is
provided by the windowing system. In addition, named framebuffer
objects can be created and operated upon. The namespace for
framebuffer objects is the unsigned integers, with zero reserved
by the GL for the default framebuffer.
A framebuffer object is created by binding an unused name to
DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE. The binding is
effected by calling
void BindFramebuffer(enum target, uint framebuffer);
with <target> set to the desired framebuffer target and
<framebuffer> set to the unused name. The resulting framebuffer
object is a new state vector, comprising one set of the state values
listed in table 6.23 for each attachment point of the
framebuffer, set to the same initial values. There is one
color attachment point, plus one each
for the depth and stencil attachment points.
BindFramebuffer may also be used to bind an existing
framebuffer object to DRAW_FRAMEBUFFER_ANGLE or
READ_FRAMEBUFFER_ANGLE. If the bind is successful no change is made
to the state of the bound framebuffer object, and any previous
binding to <target> is broken.
If a framebuffer object is bound to DRAW_FRAMEBUFFER_ANGLE or
READ_FRAMEBUFFER_ANGLE, it becomes the target for rendering or
readback operations, respectively, until it is deleted or another
framebuffer is bound to the corresponding bind point. Calling
BindFramebuffer with <target> set to FRAMEBUFFER binds the
framebuffer to both DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE.
While a framebuffer object is bound, GL operations on the target
to which it is bound affect the images attached to the bound
framebuffer object, and queries of the target to which it is bound
return state from the bound object. Queries of the values
specified in table 6.20 (Implementation Dependent Pixel Depths)
and table 6.yy (Framebuffer Dependent Values) are
derived from the framebuffer object bound to DRAW_FRAMEBUFFER_ANGLE.
The initial state of DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE
refers to the default framebuffer provided by the windowing
system. In order that access to the default framebuffer is not
lost, it is treated as a framebuffer object with the name of 0.
The default framebuffer is therefore rendered to and read from
while 0 is bound to the corresponding targets. On some
implementations, the properties of the default framebuffer can
change over time (e.g., in response to windowing system events
such as attaching the context to a new windowing system drawable.)"
Change the description of DeleteFramebuffers as follows:
"<framebuffers> contains <n> names of framebuffer objects to be
deleted. After a framebuffer object is deleted, it has no
attachments, and its name is again unused. If a framebuffer that
is currently bound to one or more of the targets
DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE is deleted, it is as
though BindFramebuffer had been executed with the corresponding
<target> and <framebuffer> zero. Unused names in <framebuffers>
are silently ignored, as is the value zero."
In section 4.4.3 (Renderbuffer Objects), modify the first two sentences
of the description of FramebufferRenderbuffer as follows:
"<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE, or
FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as
though DRAW_FRAMEBUFFER_ANGLE was specified. The INVALID_OPERATION
error is generated if the value of the corresponding binding is zero."
In section 4.4.3 (Renderbuffer Objects), modify the first two sentences
of the description of FramebufferTexture2D as follows:
"<target> must be DRAW_FRAMEBUFFER_ANGLE,
READ_FRAMEBUFFER_ANGLE, or FRAMEBUFFER. If <target> is
FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was
specified. The INVALID_OPERATION error is generated if the value of the
corresponding binding is zero."
In section 4.4.5 (Framebuffer Completeness), modify the first sentence
of the description of CheckFramebufferStatus as follows:
"If <target> is not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or
FRAMEBUFFER, the error INVALID_ENUM is generated. If <target> is
FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was
specified."
Modify the first sentence of the subsection titled "Effects of Framebuffer
Completeness on Framebuffer Operations" to be:
"Attempting to render to or read from a framebuffer which is not
framebuffer complete will generate an
INVALID_FRAMEBUFFER_OPERATION error."
Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
Requests)
In section 6.1.3, modify the first sentence of the description of
GetFramebufferAttachmentParameteriv as follows:
"<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or
FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as
though DRAW_FRAMEBUFFER_ANGLE was specified."
Modify the title of Table 6.23 (Framebuffer State) to be "Framebuffer
(state per attachment point)".
Dependencies on OES_texture_3D
On an OpenGL ES implementation, in the absense of OES_texture_3D,
omit references to FramebufferTexture3DOES and CopyTexSubImage3DOES.
Errors
The error INVALID_FRAMEBUFFER_OPERATION is generated if
BlitFramebufferANGLE is called while the
draw framebuffer is not framebuffer complete.
The error INVALID_FRAMEBUFFER_OPERATION is generated if
BlitFramebufferANGLE, ReadPixels, CopyTex{Sub}Image*, is called while the
read framebuffer is not framebuffer complete.
The error INVALID_OPERATION is generated if GetIntegerv is called
while the read framebuffer is not framebuffer complete, or if there
is no color attachment present on the read framebuffer object.
The error INVALID_VALUE is generated by BlitFramebufferANGLE if
<mask> has any bits set other than those named by
COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT.
The error INVALID_OPERATION is generated if BlitFramebufferANGLE is
called and <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT
and the source and destination depth or stencil buffer formats do
not match.
The error INVALID_OPERATION is generated if BlitFramebufferANGLE is
called and any of the following conditions are true:
- the source and destination rectangle dimensions do not match
(ie scaling or flipping is required).
- <mask> includes COLOR_BUFFER_BIT and the source and destination
buffer formats do not match.
- <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT and the
source or destination rectangles do not specify the entire source
or destination buffer (after applying any scissor region).
The error INVALID_ENUM is generated by BlitFramebufferANGLE if
<filter> is not NEAREST.
The error INVALID_ENUM is generated if BindFramebuffer,
CheckFramebufferStatus, FramebufferTexture{2D|3DOES},
FramebufferRenderbuffer, or
GetFramebufferAttachmentParameteriv is called and <target> is
not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or FRAMEBUFFER.
New State
(Add a new table 6.xx, "Framebuffer (state per framebuffer target binding point)")
Get Value Type Get Command Initial Value Description Section
------------------------------ ---- ----------- -------------- ------------------- ------------
DRAW_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object bound 4.4.1
to DRAW_FRAMEBUFFER_ANGLE
READ_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object 4.4.1
to READ_FRAMEBUFFER_ANGLE
Remove reference to FRAMEBUFFER_BINDING from Table 6.23.
(Add a new table 6.yy, "Framebuffer Dependent Values")
Get Value Type Get Command Initial Value Description Section
---------------------------- ---- ----------- -------------- ------------------- ------------
SAMPLE_BUFFERS Z+ GetIntegerv 0 Number of multisample 3.2
buffers
SAMPLES Z+ GetIntegerv 0 Coverage mask size 3.2
Remove the references to SAMPLE_BUFFERS and SAMPLES from Table 6.17.
Issues
1) What should we call this extension?
Resolved: ANGLE_framebuffer_blit.
This extension is a result of a collaboration between Google and
TransGaming for the open-source ANGLE project. Typically one would
label a multi-vendor extension as EXT, but EXT_framebuffer_blit
is already the name for this on Desktop GL. Additionally this
isn't truely a multi-vendor extension because there is only one
implementation of this. We'll follow the example of the open-source
MESA project which uses the project name for the vendor suffix.
2) Why is this done as a separate extension instead of just supporting
EXT_framebuffer_blit?
To date, EXT_framebuffer_blit has not had interactions with OpenGL ES
specified and, as far as we know, it has not previously been exposed on
an ES 1.1 or ES 2.0 implementation. Because there are enough
differences between Desktop GL and OpenGL ES, and since OpenGL ES 2.0
has already subsumed the EXT_framebuffer_object functionality (with
some changes) it was deemed a worthwhile exercise to fully specify the
interactions. Additionally, some of the choices in exactly which
functionality is supported by BlitFramebufferANGLE is dictated by
what is reasonable to support on a implementation which is
layered on Direct3D9. It is not expected that other implementations
will necessary have the same set of restrictions or requirements.
3) How does this extension differ from EXT_framebuffer_blit?
This extension is designed to be a pure subset of the
EXT_framebuffer_blit functionality as applicable to OpenGL ES 2.0.
Functionality that is unchanged:
- the split DRAW and READ framebuffer attachment points and related sematics.
- the token values for the DRAW/READ_FRAMEBUFFER and DRAW/READ_FRAMBUFFER_BINDING
- the signature of the BlitFramebuffer entry-point.
Additional restrictions imposed by BlitFramebufferANGLE:
- no color conversions are supported
- no scaling, stretching or flipping are supported
- no filtering is supported (a consequence of no stretching)
- only whole depth and/or stencil buffers can be copied
Revision History
Revision 1, 2010/07/06
- copied from revision 15 of EXT_framebuffer_object
- removed language that was clearly not relevant to ES2
- rebased changes against the OpenGL ES 2.0 specification
- added ANGLE-specific restrictions
Revision 2, 2010/07/15
- clarifications of implicit clamping to buffer sizes (from ARB_fbo)
- clarify that D/S restricts apply after the scissor is applied
- improve some error language
Revision 3, 2010/08/06
- add additional contributors, update implementation status
Revision 4, 2012/09/22
- document errors for GetIntegerv.

View File

@@ -1,363 +0,0 @@
Name
ANGLE_framebuffer_multisample
Name Strings
GL_ANGLE_framebuffer_multisample
Contributors
Contributors to EXT_framebuffer_multisample
Daniel Koch, TransGaming Inc.
Shannon Woods, TransGaming Inc.
Kenneth Russell, Google Inc.
Vangelis Kokkevis, Google Inc.
Contacts
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com)
Status
Implemented in ANGLE ES2
Version
Last Modified Date: Aug 6, 2010
Author Revision: #3
Number
OpenGL ES Extension #84
Dependencies
Requires OpenGL ES 2.0.
Requires GL_ANGLE_framebuffer_blit (or equivalent functionality).
The extension is written against the OpenGL ES 2.0 specification.
OES_texture_3D affects the definition of this extension.
Overview
This extension extends the framebuffer object framework to
enable multisample rendering.
The new operation RenderbufferStorageMultisampleANGLE() allocates
storage for a renderbuffer object that can be used as a multisample
buffer. A multisample render buffer image differs from a
single-sample render buffer image in that a multisample image has a
number of SAMPLES that is greater than zero. No method is provided
for creating multisample texture images.
All of the framebuffer-attachable images attached to a framebuffer
object must have the same number of SAMPLES or else the framebuffer
object is not "framebuffer complete". If a framebuffer object with
multisample attachments is "framebuffer complete", then the
framebuffer object behaves as if SAMPLE_BUFFERS is one.
The resolve operation is affected by calling
BlitFramebufferANGLE (provided by the ANGLE_framebuffer_blit
extension) where the source is a multisample application-created
framebuffer object and the destination is a single-sample
framebuffer object (either application-created or window-system
provided).
New Procedures and Functions
void RenderbufferStorageMultisampleANGLE(
enum target, sizei samples,
enum internalformat,
sizei width, sizei height);
New Types
None.
New Tokens
Accepted by the <pname> parameter of GetRenderbufferParameteriv:
RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
Returned by CheckFramebufferStatus:
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
and GetFloatv:
MAX_SAMPLES_ANGLE 0x8D57
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
Add to the last paragraph of 3.7.2 (Alternate Texture Image Specification)
(as modified by ANGLE_framebuffer_blit) the following:
"Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will
result in INVALID_OPERATION being generated if the object bound to
READ_FRAMEBUFFER_BINDING_ANGLE is "framebuffer complete" and the value
of SAMPLE_BUFFERS is greater than zero."
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
Operations and the Framebuffer)
Add to 4.3.1 (Reading Pixels), right before the subsection titled
"Obtaining Pixels from the Framebuffer":
"ReadPixels generates INVALID_OPERATION if READ_FRAMEBUFFER_BINDING_ANGLE
(section 4.4) is non-zero, the read framebuffer is framebuffer
complete, and the value of SAMPLE_BUFFERS for the read framebuffer
is greater than zero."
In 4.3.2 (Copying Pixels), add to the section describing BlitFramebuffer
that was added by ANGLE_framebuffer_blit.
"If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
SAMPLE_BUFFERS for the draw framebuffer is zero, the samples
corresponding to each pixel location in the source are converted to
a single sample before being written to the destination.
If SAMPLE_BUFFERS for the draw framebuffer is greater than zero,
no copy is performed and an INVALID_OPERATION error is generated.
If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
<mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, no copy is
performed and an INVALID_OPERATION error is generated.
If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
the format of the read and draw framebuffers are not identical, no
copy is performed and an INVALID_OPERATION error is generated.
If SAMPLE_BUFFERS for the read framebuffer is greater than zero, the
dimensions of the source and destination rectangles provided to
BlitFramebufferANGLE must be identical and must specify the complete
source and destination buffers, otherwise no copy is performed and
an INVALID_OPERATION error is generated."
Modification to 4.4.3 (Renderbuffer Objects)
Add, just above the definition of RenderbufferStorage:
"The command
void RenderbufferStorageMultisampleANGLE(
enum target, sizei samples,
enum internalformat,
sizei width, sizei height);
establishes the data storage, format, dimensions, and number of
samples of a renderbuffer object's image. <target> must be
RENDERBUFFER. <internalformat> must be one of the color-renderable,
depth-renderable, or stencil-renderable formats described in table 4.5.
<width> and <height> are the dimensions in pixels of the renderbuffer. If
either <width> or <height> is greater than the value of
MAX_RENDERBUFFER_SIZE, or if <samples> is greater than MAX_SAMPLES_ANGLE,
then the error INVALID_VALUE is generated. If OpenGL ES is unable to
create a data store of the requested size, the error OUT_OF_MEMORY
is generated.
Upon success, RenderbufferStorageMultisampleANGLE deletes any existing
data store for the renderbuffer image and the contents of the data
store after calling RenderbufferStorageMultisampleANGLE are undefined.
RENDERBUFFER_WIDTH is set to <width>, RENDERBUFFER_HEIGHT is
set to <height>, and RENDERBUFFER_INTERNAL_FORMAT is set to
<internalformat>.
If <samples> is zero, then RENDERBUFFER_SAMPLES_ANGLE is set to zero.
Otherwise <samples> represents a request for a desired minimum
number of samples. Since different implementations may support
different sample counts for multisampled rendering, the actual
number of samples allocated for the renderbuffer image is
implementation dependent. However, the resulting value for
RENDERBUFFER_SAMPLES_ANGLE is guaranteed to be greater than or equal
to <samples> and no more than the next larger sample count supported
by the implementation.
An OpenGL ES implementation may vary its allocation of internal component
resolution based on any RenderbufferStorageMultisampleANGLE parameter (except
target), but the allocation and chosen internal format must not be a
function of any other state and cannot be changed once they are
established. The actual resolution in bits of each component of the
allocated image can be queried with GetRenderbufferParameteriv."
Modify the definiton of RenderbufferStorage as follows:
"The command
void RenderbufferStorage(enum target, enum internalformat,
sizei width, sizei height);
is equivalent to calling RenderbufferStorageMultisampleANGLE with
<samples> equal to zero."
In section 4.4.5 (Framebuffer Completeness) in the subsection
titled "Framebuffer Completeness" add an entry to the bullet list:
* The value of RENDERBUFFER_SAMPLES_ANGLE is the same for all attached
images.
{ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE }
Also add a paragraph to the end of the section after the definition
of CheckFramebufferStatus:
"The values of SAMPLE_BUFFERS and SAMPLES are derived from the
attachments of the currently bound framebuffer object. If the
current DRAW_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete",
then both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise,
SAMPLES is equal to the value of RENDERBUFFER_SAMPLES_ANGLE for the
attached images (which all must have the same value for
RENDERBUFFER_SAMPLES_ANGLE). Further, SAMPLE_BUFFERS is one if
SAMPLES is non-zero. Otherwise, SAMPLE_BUFFERS is zero.
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
Requests)
In section 6.1.3 (Enumeraged Queries), modify the third paragraph
of the description of GetRenderbufferParameteriv as follows:
"Upon successful return from GetRenderbufferParameteriv, if
<pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT,
RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_ANGLE, then <params>
will contain the width in pixels, height in pixels, internal format, or
number of samples, respectively, of the image of the renderbuffer
currently bound to <target>."
Dependencies on ANGLE_framebuffer_blit
ANGLE_framebuffer_blit is required. Technically, ANGLE_framebuffer_blit
would not be required to support multisampled rendering, except for
the fact that it provides the only method of doing a multisample
resovle from a multisample renderbuffer.
Dependencies on OES_texture_3D
On an OpenGL ES implementation, in the absense of OES_texture_3D,
omit references to CopyTexSubImage3DOES.
Errors
The error INVALID_OPERATION is generated if ReadPixels or
CopyTex{Sub}Image* is called while READ_FRAMEBUFFER_BINDING_ANGLE
is non-zero, the read framebuffer is framebuffer complete, and the
value of SAMPLE_BUFFERS for the read framebuffer is greater than
zero.
If both the draw and read framebuffers are framebuffer complete and
the draw framebuffer has a value of SAMPLE_BUFFERS that is greater
than zero, then the error INVALID_OPERATION is generated if
BlitFramebufferANGLE is called.
If both the draw and read framebuffers are framebuffer complete and
the read framebuffer has a value of SAMPLE_BUFFERS that is greater
than zero, the error INVALID_OPERATION is generated if
BlitFramebufferANGLE is called and any of the following conditions
are true:
- <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT.
- the source or destination rectangles do not specify the entire
source or destination buffer.
If both the draw and read framebuffers are framebuffer complete and
either has a value of SAMPLE_BUFFERS that is greater than zero, then
the error INVALID_OPERATION is generated if BlitFramebufferANGLE is
called and the formats of the draw and read framebuffers are not
identical.
If either the draw or read framebuffer is framebuffer complete and
has a value of SAMPLE_BUFFERS that is greater than zero, then the
error INVALID_OPERATION is generated if BlitFramebufferANGLE is called
and the specified source and destination dimensions are not
identical.
If RenderbufferStorageMultisampleANGLE is called with <target> not
equal to RENDERBUFFER, the error INVALID_ENUM is generated.
If RenderbufferStorageMultisampleANGLE is called with an
<internalformat> that is not listed as one of the color-, depth-
or stencil-renderable formats in Table 4.5, then the error
INVALID_ENUM is generated.
If RenderbufferStorageMultisampleANGLE is called with <width> or
<height> greater than MAX_RENDERBUFFER_SIZE, then the error
INVALID_VALUE is generated.
If RenderbufferStorageMultisampleANGLE is called with a value of
<samples> that is greater than MAX_SAMPLES_ANGLE or less than zero,
then the error INVALID_VALUE is generated.
The error OUT_OF_MEMORY is generated when
RenderbufferStorageMultisampleANGLE cannot create storage of the
specified size.
New State
Add to table 6.22 (Renderbuffer State)
Get Value Type Get Command Initial Value Description Section
------------------------------- ------ -------------------------- ------------- -------------------- -------
RENDERBUFFER_SAMPLES_ANGLE Z+ GetRenderbufferParameteriv 0 number of samples 4.4.3
Add to table 6.yy (Framebuffer Dependent Vaues) (added by
ANGLE_framebuffer_blit), the following new framebuffer dependent state.
Get Value Type Get Command Minimum Value Description Section
----------------- ---- ----------- ------------- ------------------- -------
MAX_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of 4.4.3
samples supported
for multisampling
Issues
Issues from EXT_framebuffer_multisample have been removed.
1) What should we call this extension?
Resolved: ANGLE_framebuffer_blit.
This extension is a result of a collaboration between Google and
TransGaming for the open-source ANGLE project. Typically one would
label a multi-vendor extension as EXT, but EXT_framebuffer_mulitsample
is already the name for this on Desktop GL. Additionally this
isn't truely a multi-vendor extension because there is only one
implementation of this. We'll follow the example of the open-source
MESA project which uses the project name for the vendor suffix.
2) How does this extension differ from EXT_framebuffer_multisample?
This is designed to be a proper subset of EXT_framebuffer_multisample
functionality as applicable to OpenGL ES 2.0.
Functionality that is unchanged:
- creation of multisample renderbuffers.
- whole buffer multi-sample->single-sample resolve.
- no format conversions, stretching or flipping supported on multisample blits.
Additional restrictions on BlitFramebufferANGLE:
- multisample resolve is only supported on color buffers.
- no blits to multisample destinations (no single->multi or multi-multi).
- only entire buffers can be resolved.
Revision History
Revision 1, 2010/07/08
- copied from revision 7 of EXT_framebuffer_multisample
- removed language that was not relevant to ES2
- rebase changes against the Open GL ES 2.0 specification
- added ANGLE-specific restrictions
Revision 2, 2010/07/19
- fix missing error code
Revision 3, 2010/08/06
- add additional contributors, update implementation status
- disallow negative samples

View File

@@ -1,227 +0,0 @@
Name
ANGLE_get_image
Name Strings
GL_ANGLE_get_image
Contributors
Jamie Madill
Contact
Jamie Madill (jmadill 'at' google.com)
Notice
Copyright (c) 2019 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html
Status
Draft
Version
Version 2, Sept 15, 2021
Number
OpenGL ES Extension #??
Dependencies
Requires OpenGL ES 2.0
Written against the OpenGL ES 3.2 specification.
Overview
This extension allows the OpenGL application to query and read back Texture
and Renderbuffer pixel data. The OpenGL context exposes new queries for the
implementation pixel format and type similar to glReadPixels. The context
also exposes new commands to read back pixel data with these parameters.
New Procedures and Functions
void GetTexImageANGLE(GLenum target, GLint level, GLenum format, GLenum type,
void *pixels);
void GetCompressedTexImageANGLE(enum target, int level, void *pixels);
void GetRenderbufferImageANGLE(GLenum target, GLint level, GLenum format,
GLenum type, void *pixels);
New Tokens
None
Additions to the OpenGL ES Specification
Update section 8.11.2 "Texture Parameter Queries":
Change "<pname> must be one of IMAGE_FORMAT_COMPATIBILITY_TYPE, TEXTURE_-
IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, or one of the symbolic
values in table 8.19." to "<pname> must be one of IMAGE_FORMAT_COMPATIBILITY_-
TYPE, TEXTURE_IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, IMPLEMENTATION_-
COLOR_READ_TYPE, IMPLEMENTATION_COLOR_READ_FORMAT or one of the symbolic
values in table 8.19.".
Add a paragrah: "Querying <pname> with IMPLEMENTATION_COLOR_READ_TYPE or
IMPLEMENTATION_COLOR_READ_FORMAT returns the implementation-dependent read
format and type for use with GetTexImageANGLE."
Update section 9.2.6 "Renderbuffer Object Queries":
Add a paragraph: "If <pname> is IMPLEMENTATION_COLOR_READ_TYPE or
IMPLEMENTATION_COLOR_READ_FORMAT then <params> will contain the
implementation-dependent read format and type for use with
GetRenderbufferImageANGLE."
Add a section "Texture and Renderbuffer Image Queries":
Texture and Renderbuffer images may be obtained from a Texture or
Renderbuffer with the commands
void GetTexImageANGLE(GLenum target, GLint level, GLenum format, GLenum type,
void *pixels);
void GetCompressedTexImageANGLE(GLenum target, GLint level, void *pixels);
void GetRenderbufferImageANGLE(GLenum target, GLenum format, GLenum type,
void *pixels);
For GetTexImageANGLE and GetCompressedTexImageANGLE, <target> specifies the
target to which the texture object is bound. target must be one of
TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY, indicating
a two- or three-dimensional, two-dimensional array, cube map array
respectively. <target> may also be one of the targets from table 8.20,
indicating the corresponding face of a cube map texture.
For GetRenderbufferImageANGLE, <target> must be RENDERBUFFER.
<level> is a level-of-detail number, <format> is a pixel format from table 8.5,
and <type> is a pixel type from table 8.4.
GetTexImageANGLE and GetRenderbufferImageANGLE obtain component groups
from a texture or renderbuffer image with the indicated level-of-detail.
If <format> is a color format then the components are assigned among R,
G, B, and A, starting with the first group in the first row, and
continuing by obtaining groups in order from each row and proceeding from
the first row to the last, and from the first image to the last for
three-dimensional textures. Two-dimensional array and cube map array
textures are treated as three-dimensional images, where the layers are
treated as rows or images. Cube map textures are treated as
three-dimensional images with a depth of 6, where the cube map faces are
ordered as image layers as shown in table 8.24.
If <format> is DEPTH_COMPONENT, DEPTH_STENCIL, or STENCIL_INDEX, then
each depth component and/or stencil index is assigned with the same ordering of
rows and images.
These groups are then packed and placed in client or pixel buffer object memory.
If a pixel pack buffer is bound (as indicated by a non-zero value of PIXEL_-
PACK_BUFFER_BINDING), <pixels> is an offset into the pixel pack buffer;
otherwise, <pixels> is a pointer to client memory. Pixel storage modes that are
applicable to ReadPixels are applied, as described in table 16.1 and section
16.1.2.
When called, GetCompressedTexImageANGLE writes n ubytes of compressed
image data to the pixel pack buffer or client memory pointed to by pixels.
n is the value of TEXTURE_COMPRESSED_IMAGE_SIZE for the texture image. The
compressed image data is formatted according to the definition of the texture's
internal format.
For three-dimensional, two-dimensional array, cube map array, and cube map
textures pixel storage operations are applied as if the image were two-
dimensional, except that the additional pixel storage state values
PACK_IMAGE_HEIGHT and PACK_SKIP_IMAGES are applied. The correspondence of texels
to memory locations is as defined for TexImage3D in section 8.5.
The row length, number of rows, image depth, and number of images are determined
by the size of the texture or renderbuffer image (including any borders).
Errors:
An INVALID_ENUM error is generated by GetTexImage if <target> is
not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY,
or one of the targets from table 8.20.
An INVALID_ENUM error is generated by GetRenderbufferImage is <target> is not
RENDERBUFFER.
An INVALID_VALUE error is generated if <level> is negative or larger than
the maximum allowable level.
An INVALID_OPERATION error is generated if any of the following mismatches
between <format> and the internal format of the texture or renderbuffer image
exist:
* <format> is a color format (one of the formats in table 8.3 whose target is
the color buffer) and the base internal format of the texture or renderbuffer
image is not a color format.
* <format> is DEPTH_COMPONENT and the base internal format is not
DEPTH_COMPONENT or DEPTH_STENCIL.
* <format> is DEPTH_STENCIL and the base internal format is not DEPTH_-
STENCIL.
* <format> is STENCIL_INDEX and the base internal format is not
STENCIL_INDEX or DEPTH_STENCIL.
* <format> is one of the integer formats in table 8.5 and the internal format
of the texture or renderbuffer image is not integer, or <format> is not one
of the integer formats in table 8.5 and the internal format is integer.
An INVALID_OPERATION error is generated if a pixel pack buffer object
is bound and packing the texture or renderbuffer image into the buffers
memory would exceed the size of the buffer.
An INVALID_OPERATION error is generated if a pixel pack buffer object
is bound and <pixels> is not evenly divisible by the number of basic machine
units needed to store in memory the GL data type corresponding to type (see
table 8.4).
An INVALID_OPERATION error is generated by GetCompressedTexImageANGLE if the
texture image is stored with an uncompressed internal format.
Dependencies on ARB_texture_rectangle
TEXTURE_RECTANGLE is accepted by GetTexImageANGLE and GetRenderbufferImageANGLE.
An INVALID_VALUE error is generated if <level> is non-zero and the effective
<target> is TEXTURE_RECTANGLE.
New State
Add to table 21.10 "Textures (state per texture object)":
Get Value Type Get Command Initial Value Description Section
-------------------------------- ---- ----------- ------------- --------------------------- -------
IMPLEMENTATION_COLOR_READ_FORMAT E GetTextureParameteriv empty Implementation pixel format 8.11.2
IMPLEMENTATION_COLOR_READ_TYPE E GetTextureParameteriv empty Implementation pixel type 8.11.2
Add to table 21.17 "Renderbuffer (state per renderbuffer object)":
Get Value Type Get Command Initial Value Description Section
-------------------------------- ---- ----------- ------------- --------------------------- -------
IMPLEMENTATION_COLOR_READ_FORMAT E GetRenderbufferParameteriv empty Implementation pixel format 9.2.6
IMPLEMENTATION_COLOR_READ_TYPE E GetRenderbufferParameteriv empty Implementation pixel type 9.2.6
Issues
1) Should GetTexImageANGLE/GetRenderbufferImageANGLE only accept IMPLEMENTATION-
_COLOR_READ_FORMAT/TYPE or should they behave the same as GetTexImage in GL?
Resolved: Keep the spec wording closer to the desktop GL version. It should
not involve much additional implementation work except for validation.
Revision History
Rev. Date Author Changes
---- ------------- --------- ----------------------------------------
2 Sept 15, 2021 jmadill Add GetCompressedTexImageANGLE
1 Oct 24, 2019 jmadill Initial version

View File

@@ -1,71 +0,0 @@
Name
ANGLE_get_serialized_context_string
Name Strings
GL_ANGLE_get_serialized_context_string
Contributors
Jamie Madill, Google
Contact
Jamie Madill, Google (jmadill 'at' google.com)
Status
Implemented in ANGLE.
Version
Last Modified Date: April 2, 2021
Revision: #1
Number
TBD
Dependencies
OpenGL ES 2.0 is required.
Overview
Adds a query for a serialized string representation of a context.
Useful for testing to easily compare two states.
New Tokens
Accepted by the <name> parameter of glGetString:
SERIALIZED_CONTEXT_STRING_ANGLE 0x96B0
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (Querying GL State)
Update Section 6.1.5 "String Queries" to accept the new enum specified
above. The SERIALIZED_CONTEXT_STRING_ANGLE string is an implementation-
dependent representation of the current context state. Two contexts
with the same internal state are guaranteed to have the same value. Note
that the reverse is not true - two contexts with different states are
may also have the same serialized string.
New State
None.
Issues
1) Should two contexts with different states return different strings?
RESOLVED: We don't provide a guarantee that every state is serialized
into the string. This loose wording lets the extension provide
some additional extra validation without being overly strict and
making the implementation difficult. It also allow a no-op
implementation to satisfy the extension requirements.
Revision History
2021/04/02 jmadill Initial revision.

View File

@@ -1,174 +0,0 @@
Name
ANGLE_get_tex_level_parameter
Name Strings
GL_ANGLE_get_tex_level_parameter
Contributors
Geoff Lang, Google
Contact
Geoff Lang (geofflang 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Oct 12, 2020
Author Revision: 1
Number
OpenGL ES Extension XX
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the OpenGL ES 3.0.5 specification.
Overview
This extension allows the user to query information about specific texture
levels exposed later in OpenGL ES 3.1.
IP Status
No known IP claims.
New Procedures and Functions
void GetTexLevelParameter{if}vANGLE(enum target, int level,
enum pname, T *params );
New Tokens
Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:
TEXTURE_WIDTH 0x1000
TEXTURE_HEIGHT 0x1001
TEXTURE_DEPTH 0x8071
TEXTURE_INTERNAL_FORMAT 0x1003
TEXTURE_RED_SIZE 0x805C
TEXTURE_GREEN_SIZE 0x805D
TEXTURE_BLUE_SIZE 0x805E
TEXTURE_ALPHA_SIZE 0x805F
TEXTURE_DEPTH_SIZE 0x884A
TEXTURE_STENCIL_SIZE 0x88F1
TEXTURE_SHARED_SIZE 0x8C3F
TEXTURE_RED_TYPE 0x8C10
TEXTURE_GREEN_TYPE 0x8C11
TEXTURE_BLUE_TYPE 0x8C12
TEXTURE_ALPHA_TYPE 0x8C13
TEXTURE_DEPTH_TYPE 0x8C16
TEXTURE_COMPRESSED 0x86A1
Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State
Requests)
Modify Section 6.1.4 "Texture Queries":
(Add the following text to the end of the section)
The commands
void GetTexLevelParameter{if}vANGLE(enum target, int level,
enum pname, T *params );
place information about texture image parameter <pname> for level-of-detail
<level> of the specified target into <params>. <pname> must be one of the
symbolic values in table 6.11.
<target> may be one of TEXTURE_2D or one of the cube map face targets from
table 3.18, indicating the two-dimensional texture or one of the six distinct
2D images making up the cube map texture object. Otherwise an INVALID_ENUM is
generated.
<level> determines which level-of-detail's state is returned. If <level>
is negative or larger than the maximum allowable level-of-detail, then an
INVALID_VALUE error is generated.
Note that TEXTURE_CUBE_MAP is not a valid <target> parameter for
GetTexLevelParameter{if}vANGLE, because it does not specify a particular
cube map face.
For texture images with uncompressed internal formats, queries of
<pname> TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE, TEXTURE_BLUE_TYPE,
TEXTURE_ALPHA_TYPE, and TEXTURE_DEPTH_TYPE return the data type used
to store the component. Types NONE, SIGNED_NORMALIZED, UNSIGNED_-
NORMALIZED, FLOAT, INT, and UNSIGNED_INT respectively indicate missing,
signed normalized fixed-point, unsigned normalized fixed-point,
floating-point, signed unnormalized integer, and unsigned unnormalized
integer components. Queries of <pname> TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE,
TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE, TEXTURE_DEPTH_SIZE,
TEXTURE_STENCIL_SIZE, and TEXTURE_SHARED_SIZE return the actual resolutions
of the stored image components, not the resolutions specified when the image
was defined. Invalid <pname> generate an INVALID_ENUM error.
For texture images with compressed internal formats, the types returned
specify how components are interpreted after decompression, while the
resolutions returned specify the component resolution of an uncompressed
internal format that produces an image of roughly the same quality as the
compressed image in question. Since the quality of the implementation's
compression algorithm is likely data-dependent, the returned component sizes
should be treated only as rough approximations.
Queries of <pname> TEXTURE_INTERNAL_FORMAT, TEXTURE_WIDTH, TEXTURE_HEIGHT,
and TEXTURE_DEPTH return the internal format, width, height, and depth,
respectively, as specified when the image array was created.
Errors
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
if <target> is not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of
the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE.
The error INVALID_VALUE is generated by GetTexLevelParameter{if}vANGLE
if <level> is negative or larger than the maximum allowable level-of-detail.
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
if <value> is not one of TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE,
TEXTURE_BLUE_TYPE, TEXTURE_ALPHA_TYPE, TEXTURE_DEPTH_TYPE,
TEXTURE_DEPTH_SIZE, TEXTURE_STENCIL_SIZE, TEXTURE_SHARED_SIZE,
TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH, TEXTURE_INTERNAL_FORMAT,
TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE,
or TEXTURE_COMPRESSED.
New State
(add new table 6.10, Textures (state per texture image), renumber subsequent tables)
Initial
Get Value Type Get Command Value Description Sec.
---------------------- ---- ------------------- ------ --------------------------- ------
TEXTURE_WIDTH Z+ GetTexLevelParameterANGLE 0 Specified width 3.8
TEXTURE_HEIGHT Z+ GetTexLevelParameterANGLE 0 Specified height (2D/3D) 3.8
TEXTURE_DEPTH Z+ GetTexLevelParameterANGLE 0 Specified depth (3D) 3.8
TEXTURE_INTERNAL_FORMAT E GetTexLevelParameterANGLE RGBA Internal format 3.8
or R8 (see section 3.8.14)
TEXTURE_x_SIZE 6xZ+ GetTexLevelParameterANGLE 0 Component resolution (x is 3.8
RED, GREEN, BLUE, ALPHA,
DEPTH, or STENCIL)
TEXTURE_SHARED_SIZE Z+ GetTexLevelParameterANGLE 0 Shared exponent field 3.8
resolution
TEXTURE_x_TYPE E GetTexLevelParameterANGLE NONE Component type (x is RED, 6.1.4
GREEN, BLUE, ALPHA, or
DEPTH)
TEXTURE_COMPRESSED B GetTexLevelParameterANGLE FALSE True if image has a 3.8.6
compressed internal format
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------- --------------------------------------------
1 14/10/20 Geoff Lang First revision. Adapted from OpenGL ES
specification 3.1.

View File

@@ -1,359 +0,0 @@
Name
ANGLE_instanced_arrays
Name Strings
GL_ANGLE_instanced_arrays
Contributors
Contributors to ARB_instanced_arrays
Nicolas Capens, TransGaming Inc.
James Helferty, TransGaming Inc.
Kenneth Russell, Google Inc.
Vangelis Kokkevis, Google Inc.
Contact
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming.com)
Status
Implemented in ANGLE r976.
Version
Last Modified Date: February 8, 2012
Author Revision: 3
Number
OpenGL ES Extension #109
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the OpenGL ES 2.0 Specification.
Overview
A common use case in GL for some applications is to be able to
draw the same object, or groups of similar objects that share
vertex data, primitive count and type, multiple times. This
extension provides a means of accelerating such use cases while
restricting the number of API calls, and keeping the amount of
duplicate data to a minimum.
This extension introduces an array "divisor" for generic
vertex array attributes, which when non-zero specifies that the
attribute is "instanced." An instanced attribute does not
advance per-vertex as usual, but rather after every <divisor>
conceptual draw calls.
(Attributes which aren't instanced are repeated in their entirety
for every conceptual draw call.)
By specifying transform data in an instanced attribute or series
of instanced attributes, vertex shaders can, in concert with the
instancing draw calls, draw multiple instances of an object with
one draw call.
IP Status
No known IP claims.
New Tokens
Accepted by the <pname> parameters of GetVertexAttribfv and
GetVertexAttribiv:
VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
New Procedures and Functions
void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
sizei primcount);
void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
const void *indices, sizei primcount);
void VertexAttribDivisorANGLE(uint index, uint divisor);
Additions to Chapter 2 of the OpenGL ES 2.0 Specification
(OpenGL ES Operation)
Modify section 2.8 (Vertex Arrays), p. 21
After description of EnableVertexAttribArray / DisableVertexAttribArray
add the following:
"The command
void VertexAttribDivisorANGLE(uint index, uint divisor);
modifies the rate at which generic vertex attributes advance when
rendering multiple instances of primitives in a single draw call
(see DrawArraysInstancedANGLE and DrawElementsInstancedANGLE below).
If <divisor> is zero, the attribute at slot <index> advances once
per vertex. If <divisor> is non-zero, the attribute advances once
per <divisor> instances of the primitives being rendered.
An attribute is referred to as "instanced" if its <divisor> value is
non-zero."
Replace the text describing DrawArrays and DrawElements in the
"Transferring Array Elements" subsection of 2.8, from the second paragraph
through the end of the section with the following:
"The command
void DrawArraysOneInstance( enum mode, int first, sizei count, int instance );
does not exist in the GL, but is used to describe functionality in
the rest of this section. This function constructs a sequence of
geometric primitives by transferring elements <first> through <first> +
<count> - 1 of each enabled non-instanced array to the GL. <mode>
specifies what kind of primitives are constructed, as defined in section
2.6.1.
If an enabled vertex attribute array is instanced (it has a non-zero
attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
that is transferred to the GL is given by:
floor( <instance> / <divisor> ).
If an array corresponding to a generic attribute required by a vertex shader
is not enabled, then the corresponding element is taken from the current
generic attribute state (see section 2.7).
If an array corresponding to a generic attribute required by a vertex shader
is enabled, the corresponding current generic attribute value is unaffected
by the execution of DrawArraysOneInstance.
Specifying <first> < 0 results in undefined behavior. Generating the error
INVALID_VALUE is recommended in this case.
The command
void DrawArrays( enum mode, int first, sizei count );
is equivalent to the command sequence
DrawArraysOneInstance(mode, first, count, 0);
The command
void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
sizei primcount);
behaves identically to DrawArrays except that <primcount>
instances of the range of elements are executed, and the
<instance> advances for each iteration. Instanced attributes that
have <divisor> N, (where N > 0, as specified by
VertexAttribDivisorANGLE) advance once every N instances.
It has the same effect as:
if (mode, count, or primcount is invalid)
generate appropriate error
else {
for (i = 0; i < primcount; i++) {
DrawArraysOneInstance(mode, first, count, i);
}
}
The command
void DrawElementsOneInstance( enum mode, sizei count, enum type,
void *indices, int instance );
does not exist in the GL, but is used to describe functionality in
the rest of this section. This command constructs a sequence of
geometric primitives by successively transferring the <count> elements
whose indices are stored in the currently bound element array buffer
(see section 2.9.2) at the offset defined by <indices> to the GL.
The <i>-th element transferred by DrawElementsOneInstance will be taken
from element <indices>[i] of each enabled non-instanced array.
<type> must be one of UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT,
indicating that the index values are of GL type ubyte, ushort, or uint
respectively. <mode> specifies what kind of primitives are constructed,
as defined in section 2.6.1.
If an enabled vertex attribute array is instanced (it has a non-zero
attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
that is transferred to the GL is given by:
floor( <instance> / <divisor> );
If an array corresponding to a generic attribute required by a vertex
shader is not enabled, then the corresponding element is taken from the
current generic attribute state (see section 2.7). Otherwise, if an array
is enabled, the corresponding current generic attribute value is
unaffected by the execution of DrawElementsOneInstance.
The command
void DrawElements( enum mode, sizei count, enum type,
const void *indices);
behaves identically to DrawElementsOneInstance with the <instance>
parameter set to zero; the effect of calling
DrawElements(mode, count, type, indices);
is equivalent to the command sequence:
if (mode, count or type is invalid )
generate appropriate error
else
DrawElementsOneInstance(mode, count, type, indices, 0);
The command
void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
const void *indices, sizei primcount);
behaves identically to DrawElements except that <primcount>
instances of the set of elements are executed and the instance
advances between each set. Instanced attributes are advanced as they do
during the execution of DrawArraysInstancedANGLE. It has the same effect as:
if (mode, count, primcount, or type is invalid )
generate appropriate error
else {
for (int i = 0; i < primcount; i++) {
DrawElementsOneInstance(mode, count, type, indices, i);
}
}
If the number of supported generic vertex attributes (the value of
MAX_VERTEX_ATTRIBS) is <n>, then the client state required to implement
vertex arrays consists of <n> boolean values, <n> memory pointers, <n>
integer stride values, <n> symbolic constants representing array types,
<n> integers representing values per element, <n> boolean values
indicating normalization, and <n> integers representing vertex attribute
divisors.
In the initial state, the boolean values are each false, the memory
pointers are each NULL, the strides are each zero, the array types are
each FLOAT, the integers representing values per element are each four,
and the divisors are each zero."
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
None
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
Operations and the Framebuffer)
None
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
None
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
Requests)
In section 6.1.8, add VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE to the list of
pnames accepted by GetVertexAttribfv and GetVertexAttribiv.
Additions to the AGL/EGL/GLX/WGL Specifications
None
Dependencies on OES_element_index_uint
If OES_element_index_uint is not supported, removed all references
to UNSIGNED_INT indices and the associated GL data type uint in
the description of DrawElementsOneInstance.
Errors
INVALID_VALUE is generated by VertexAttribDivisorANGLE if <index>
is greater than or equal to MAX_VERTEX_ATTRIBS.
INVALID_ENUM is generated by DrawElementsInstancedANGLE if <type> is
not one of UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT.
INVALID_VALUE is generated by DrawArraysInstancedANGLE if <first>,
<count>, or <primcount> is less than zero.
INVALID_ENUM is generated by DrawArraysInstancedANGLE or
DrawElementsInstancedANGLE if <mode> is not one of the modes described in
section 2.6.1.
INVALID_VALUE is generated by DrawElementsInstancedANGLE if <count> or
<primcount> is less than zero.
INVALID_OPERATION is generated by DrawArraysInstancedANGLE or
DrawElementsInstancedANGLE if there is not at least one enabled
vertex attribute array that has a <divisor> of zero and is bound to an
active generic attribute value in the program used for the draw command.
New State
Changes to table 6.7, p. 268 (Vertex Array Data)
Initial
Get Value Type Get Command Value Description Sec.
--------- ----- ----------- ------- ----------- ----
VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 8*xZ+ GetVertexAttrib 0 Instance Divisor 2.8
Issues
1) Should vertex attribute zero be instance-able?
Resolved: Yes.
Discussion: In Direct3D 9 stream 0 must be specified as indexed data
and it cannot be instanced. In ANGLE we can work around this by
remapping any other stream that does have indexed data (ie a zero
attribute divisor) to stream 0 in D3D9. This works because the HLSL
vertex shader matches attributes against the stream by using the
shader semantic index.
2) Can all vertex attributes be instanced simultaneously?
Resolved: No
Discussion: In rare cases it is possible for no attribute to have a
divisor of 0, meaning that all attributes are instanced and none of
them are regularly indexed. This in turn means each instance can only
have a single position element, and so it only actually renders
something when rendering point primitives. This is not a very
meaningful way of using instancing (which is likely why D3D restricts
stream 0 to be indexed regularly for position data in the first place).
We could implement it by drawing these points one at a time (essentially
emulating instancing), but it would not be very efficient and there
seems to be little-to-no value in doing so.
If all of the enabled vertex attribute arrays that are bound to active
generic attributes in the program have a non-zero divisor, the draw
call should return INVALID_OPERATION.
3) Direct3D 9 only supports instancing for DrawIndexedPrimitive which
corresponds to DrawElementsInstanced. Should we support
DrawArraysInstanced?
Resolved: Yes
Discussion: This can be supported easily enough by simply manufacturing
a linear index buffer of sufficient size and using that to do indexed
D3D9 drawing.
4) How much data is needed in a buffer for an instanced attribute?
Resolved: Where stride is the value passed to VertexAttribPointer:
if stride > 0
size = stride * ceil(primcount / divisor);
else
size = elementsize * ceil(primcount / divisor);
Revision History
#3 February 8, 2012 dgkoch
- clarify Issue 3 and the error condition for no indexed attributes
#2 January 24, 2012 dgkoch
- fix typos, add clarifications, and more errors
#1 January 17, 2012 dgkoch
- initial GLES2 version from ARB_instanced_arrays

View File

@@ -1,79 +0,0 @@
Name
ANGLE_logic_op
Name Strings
GL_ANGLE_logic_op
Contributors
Shahbaz Youssefi, Google
Contact
Shahbaz Youssefi, Google (syoussefi 'at' google.com)
Status
Draft
Version
Last Modified Date: Sep 14, 2022
Revision: 1
Number
TBD
Dependencies
Written against the OpenGL ES 2.0 specifications
Overview
For internal use of ANGLE for GLES1 emulation, through this extension the
backend lets the frontend know that the equivalent of glLogicOp is natively
supported and can be used.
New Procedures and Functions
The following commands are added:
void LogicOpANGLE(enum op);
New Tokens
The following tokens are added:
Accepted by the <cap> parameter of Enable, Disable, and IsEnabled:
COLOR_LOGIC_OP_ANGLE 0x0BF2
Accepted by the <op> parameter of LogicOpANGLE:
LOGIC_OP_CLEAR_ANGLE 0x1500
LOGIC_OP_AND_ANGLE 0x1501
LOGIC_OP_AND_REVERSE_ANGLE 0x1502
LOGIC_OP_COPY_ANGLE 0x1503
LOGIC_OP_AND_INVERTED_ANGLE 0x1504
LOGIC_OP_NOOP_ANGLE 0x1505
LOGIC_OP_XOR_ANGLE 0x1506
LOGIC_OP_OR_ANGLE 0x1507
LOGIC_OP_NOR_ANGLE 0x1508
LOGIC_OP_EQUIV_ANGLE 0x1509
LOGIC_OP_INVERT_ANGLE 0x150A
LOGIC_OP_OR_REVERSE_ANGLE 0x150B
LOGIC_OP_COPY_INVERTED_ANGLE 0x150C
LOGIC_OP_OR_INVERTED_ANGLE 0x150D
LOGIC_OP_NAND_ANGLE 0x150E
LOGIC_OP_SET_ANGLE 0x150F
The semantics of LogicOpANGLE and COLOR_LOGIC_OP_ANGLE are identical to LogicOp
and COLOR_LOGIC_OP in the OpenGL ES 1.0 specification.
Revision History
Revision 1, 2022-07-14 (Shahbaz Youssefi)
- Initial draft

View File

@@ -1,159 +0,0 @@
Name
ANGLE_lossy_etc_decode
Name Strings
GL_ANGLE_lossy_etc_decode
Contributors
Minmin Gong (mgong 'at' microsoft.com)
Contacts
Minmin Gong (mgong 'at' microsoft.com)
Status
Draft
Version
Last Modified Date: Nov 25, 2015
Author Revision: 1
Number
TBD
Dependencies
Requires OpenGL ES 3.0 for ETC2 and EAC formats, or OpenGL ES 2.0 and
OES_compressed_ETC1_RGB8_texture for ETC1 format.
The extension is written against the OpenGL ES 2.0 specification.
Overview
Both the OpenGL ES 3.0 specification and OES_compressed_ETC1_RGB8_texture
specify that Ericsson Texture Compression (ETC) decoding must not be lossy.
The goal of this extension is to allow a lossy decode of
compressed textures in the ETC formats in OpenGL ES, for lower memory
and bandwidth consumption.
This extension uses the same ETC compression format as OpenGL ES 3.0
and OES_compressed_ETC1_RGB8_texture, with the restriction that the texture
dimensions must be a multiple of four (except for mip levels where the
dimensions are either 2 or 1). And the requirement that ETC decoding must
not be lossy is relaxed.
See OES_compressed_ETC1_RGB8_texture for a description of the ETC1 format.
Also see OpenGL ES 3.0 specification appendix C.2 (ETC Compressed Texture
ImageFormats) for a description of ETC2 and EAC formats.
IP Status
See Ericsson's "IP Statement"
New Procedures and Functions
None.
New Types
None.
New Tokens
Accepted by the <internalformat> parameter of CompressedTexImage2D
and the <format> parameter of CompressedTexSubImage2D:
ETC1_RGB8_LOSSY_DECODE_ANGLE 0x9690
COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE 0x9691
COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE 0x9692
COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9693
COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9694
COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE 0x9695
COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE 0x9696
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9697
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9698
COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x9699
COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969A
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
Add the following to Section 3.7.3 (Compressed Texture Images)
(at the end of the description of the CompressedTexImage2D command):
Compressed Internal Format Base Internal Format
========================== ====================
ETC1_RGB8_LOSSY_DECODE_ANGLE RGB
COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE R
COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE R
COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE RG
COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE RG
COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE RGB
COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE RGB
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE RGBA
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE RGBA
COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE RGBA
COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE RGBA
Table 3.x: Specific Compressed Internal Formats
If <internalformat> is one of the ETC lossy decode formats listed in
Table 3.x, the compressed texture is stored in an unspecified compressed
texture format, that may introduce losses of precision in the texture data.
The GL and the ETC texture compression algorithm support only 2D images
without borders.
CompressedTexImage2D will produce the INVALID_OPERATION error when
<internalformat> is one of the lossy decode ETC-format values from
Table 3.x under the following conditions:
* <border> is non-zero.
* <width> is not one, two, nor a multiple of four.
* <height> is not one, two, nor a multiple of four.
Add the following to Section 3.7.3 (Compressed Texture Images)
(at the end of the description of the CompressedTexSubImage2D command):
If the internal format of the texture image being modified is an ETC-format
listed in Table 3.x, the compressed texture is stored in an unspecified
compressed texture format. The xoffset and yoffset must also be aligned to
4x4 texel block boundaries, since ETC encoding makes it difficult to modify
non-aligned regions. CompressedTexSubImage2D will result in an
INVALID_OPERATION error only if one of the following conditions occurs:
* <width> is not a multiple of four nor equal to TEXTURE_WIDTH.
* <height> is not a multiple of four nor equal to TEXTURE_HEIGHT.
* <xoffset> or <yoffset> is not a multiple of four.
* <format> does not match the internal format of the texture image
being modified.
Errors
INVALID_OPERATION is generated by CompressedTexImage2D if
lossy decode ETC-format is used and <internalformat> is one of the
compressed internal formats from Table 3.x and any of the following apply:
- <border> is not equal to zero.
- <width> is not one, two, nor a multiple of four.
- <height> is not one, two, nor a multiple of four.
INVALID_OPERATION is generated by CompressedTexSubImage2D if
lossy decode ETC-format is used and <format> is one of the compressed
interal formats from Table 3.x and any of the following apply:
- <width> is not a multiple of four nor equal to TEXTURE_WIDTH;
- <height> is not a multiple of four nor equal to TEXTURE_HEIGHT;
- <xoffset> or <yoffset> is not a multiple of four;
- <format> does not match the internal format of the texture image
being modified.
New State
None.
Revision History
Revision 1, 2015/11/25 - mgong
- Initial revision

Some files were not shown because too many files have changed in this diff Show More