A conformant OpenGL ES implementation for Windows, Mac and Linux.
Перейти к файлу
Shahbaz Youssefi 5a2553a7b6 Vulkan: Emulate subgroup ops in seamful cubemap emulation
Where subgroup ops are not available, they are emulated as such:

Code with subgroup ops:

    float lH = subgroupQuadSwapHorizontal(layer);
    float lV = subgroupQuadSwapVertical(layer);
    float lD = subgroupQuadSwapDiagonal(layer);

    bool isHelperH = subgroupQuadSwapHorizontal(gl_HelperInvocation);
    bool isHelperV = subgroupQuadSwapVertical(gl_HelperInvocation);

    if (gl_HelperInvocation)
    {
        layer = !isHelperH ? lH : !isHelperV ? lV : lD;
    }

Emulated code:

    float nonHelperLayer = gl_HelperInvocation ? 0.0 : layer;
    float lH = abs(dFdxFine(nonHelperLayer));
    float lV = abs(dFdyFine(nonHelperLayer));
    float lD = abs(dFdxFine(lV));

    float isHelperDiffH = abs(dFdxFine(float(gl_HelperInvocation)));
    bool isNonHelperH = isHelperDiffH > 0.5;

    float isHelperDiffV = abs(dFdyFine(float(gl_HelperInvocation)));
    bool isNonHelperV = isHelperDiffV > 0.5;

    if (gl_HelperInvocation)
    {
        layer = isNonHelperH ? lH : isNonHelperV ? lV : lD;
    }

Both paths are supported as on nvidia devices the emulated code
misbehaves.  This change therefore effectively only enables seamful cube
map emulation on Android where subgroup operations are not supported.

Bug: angleproject:3243
Bug: angleproject:3732
Change-Id: I9664d9760756758748183eb121c626f176789f3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1742222
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-08-14 19:45:49 +00:00
android Re-land "Cleanup angle_libs_suffix in BUILD.gn." 2019-06-28 17:47:11 +00:00
build_overrides Allow overwriting angle_root in non-Chromium GN configurations 2019-06-19 00:48:07 +00:00
doc Update dEQP charts. 2019-07-26 18:03:11 +00:00
extensions Emulate RGB textures using BGRX IOSurfaces. 2019-08-13 21:54:02 +00:00
gni Remove all global constructors and exit time destructors. 2019-08-07 21:34:14 +00:00
include Vulkan: Emulate subgroup ops in seamful cubemap emulation 2019-08-14 19:45:49 +00:00
infra [infra/config] Add cache for XCode on the mac builders 2019-08-09 13:06:34 +00:00
samples Add explicit integer casts 2019-08-14 00:52:47 +00:00
scripts Use TextureID in place of GLuint handles. 2019-08-13 12:50:10 +00:00
src Vulkan: Emulate subgroup ops in seamful cubemap emulation 2019-08-14 19:45:49 +00:00
third_party Roll glmark2. 2019-08-14 14:53:57 +00:00
tools/glslang Update glslang_validator binary for Windows. 2019-06-14 16:13:16 +00:00
util Add explicit integer casts 2019-08-14 00:52:47 +00:00
.clang-format Add script to apply clang-format on all sources 2019-07-19 20:10:28 +00:00
.gitattributes Use separate json files for each code generator. 2019-07-11 20:17:04 +00:00
.gitignore Pull angle-internal for internal ANGLE devs. 2019-06-28 21:58:38 +00:00
.gn angle: Stop setting secondary_source. 2019-05-13 13:42:57 +00:00
.style.yapf Format all of ANGLE's python code. 2019-05-06 18:56:09 +00:00
AUTHORS Vulkan: Intermittent failures in many GLES2 CTS 2019-07-22 17:37:04 +00:00
BUILD.gn Add explicit integer casts 2019-08-14 00:52:47 +00:00
CONTRIBUTORS Add tex2d half float tests to expectations file 2019-08-09 15:04:40 +00:00
DEPS Roll glmark2. 2019-08-14 14:53:57 +00:00
LICENSE Update license and readme for use downstream 2018-03-27 20:53:53 +00:00
OWNERS Add COMPONENT to OWNERS 2019-03-18 19:32:27 +00:00
PRESUBMIT.py Revert "PRESUBMIT.py: Don't require "Bug:" for autoroller CLs." 2019-07-12 14:35:18 +00:00
README.chromium Update license and readme for use downstream 2018-03-27 20:53:53 +00:00
README.md Documentation: Update support matrix. 2019-06-19 18:34:50 +00:00
WATCHLISTS Add watchlist file for ANGLE. 2019-02-28 15:47:54 +00:00
additional_readme_paths.json Use xxHash for faster hash map lookups. 2018-11-20 16:37:07 +00:00
codereview.settings Set GERRIT_SQUASH_UPLOADS to False. 2016-06-17 18:19:41 +00:00
dotfile_settings.gni Gyp is dead. Long live gn. 2018-08-29 19:26:38 +00:00

README.md

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 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.

Level of OpenGL ES support via backing renderers

Direct3D 9 Direct3D 11 Desktop GL GL ES Vulkan
OpenGL ES 2.0 complete complete complete complete complete
OpenGL ES 3.0 complete complete complete in progress
OpenGL ES 3.1 in progress complete complete not started
OpenGL ES 3.2 planned planned planned

Platform support via backing renderers

Direct3D 9 Direct3D 11 Desktop GL GL ES Vulkan
Windows complete complete complete complete complete
Linux complete complete
Mac OS X complete
Chrome OS complete planned
Android complete complete
Fuchsia in progress

ANGLE v1.0.772 was certified compliant by passing the ES 2.0.3 conformance tests in October 2011. ANGLE also provides an implementation of the EGL 1.4 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, Direct3D HLSL, and even ESSL for native GLES2 platforms.

Sources

ANGLE repository is hosted by Chromium project and can be browsed online or cloned with

git clone https://chromium.googlesource.com/angle/angle

Building

View the Dev setup instructions.

Contributing