aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com>2022-04-20 06:10:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-20 06:10:46 +0000
commit1d2a4f1bb007c787a5563439e2de9f904b1ef1a6 (patch)
tree7f55222c67195ecbf3a1e83b00147de07b28d5c3
parentb068044e5fa4417443b4117a93db18cb5a140de5 (diff)
parent713865d19413f62a370bf9e59b79f342dc9737a9 (diff)
downloadangle-1d2a4f1bb007c787a5563439e2de9f904b1ef1a6.tar.gz
Roll ANGLE from d2fd28caead9 to c3f1596293c9 (8 revisions) am: 4e9775f972 am: 1120ead7a6 am: 713865d194
Original change: https://android-review.googlesource.com/c/platform/external/angle/+/2064550 Change-Id: I94b07b84fc9dee36804a6dc7ed03ac2cf218c61d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--DEPS28
-rw-r--r--doc/DevSetup.md2
-rw-r--r--gni/angle.gni1
-rw-r--r--include/platform/FeaturesMtl.h6
-rw-r--r--include/platform/mtl_features.json11
-rw-r--r--scripts/angle_deqp_test_merge.py16
-rw-r--r--scripts/code_generation_hashes/ANGLE_features.json8
-rwxr-xr-xscripts/run_gtest_angle_test.py20
-rw-r--r--src/libANGLE/renderer/metal/ContextMtl.h4
-rw-r--r--src/libANGLE/renderer/metal/ContextMtl.mm24
-rw-r--r--src/libANGLE/renderer/metal/DisplayMtl.mm2
-rw-r--r--src/libANGLE/renderer/metal/FrameBufferMtl.mm14
-rw-r--r--src/libANGLE/renderer/metal/mtl_resources.h3
-rw-r--r--src/libANGLE/renderer/metal/mtl_resources.mm14
-rw-r--r--src/libANGLE/validationES.cpp2
-rw-r--r--src/libANGLE/validationES.h2
-rw-r--r--src/tests/angle_end2end_tests_expectations.txt1
-rw-r--r--src/tests/py_utils/angle_path_util.py26
-rwxr-xr-xsrc/tests/py_utils/skia_gold/__init__.py7
-rw-r--r--src/tests/py_utils/skia_gold/angle_skia_gold_properties.py (renamed from src/tests/skia_gold/angle_skia_gold_properties.py)9
-rw-r--r--src/tests/py_utils/skia_gold/angle_skia_gold_session.py (renamed from src/tests/skia_gold/angle_skia_gold_session.py)10
-rw-r--r--src/tests/py_utils/skia_gold/angle_skia_gold_session_manager.py (renamed from src/tests/skia_gold/angle_skia_gold_session_manager.py)10
-rw-r--r--src/tests/restricted_traces/BUILD.gn3
-rwxr-xr-xsrc/tests/restricted_traces/restricted_trace_gold_tests.py26
-rwxr-xr-xsrc/tests/skia_gold/__init__.py13
m---------third_party/SwiftShader0
m---------third_party/catapult0
m---------third_party/depot_tools0
-rw-r--r--util/BUILD.gn2
-rw-r--r--util/angle_features_autogen.cpp2
-rw-r--r--util/angle_features_autogen.h1
31 files changed, 170 insertions, 97 deletions
diff --git a/DEPS b/DEPS
index 0cfcd8893e..fed02a9012 100644
--- a/DEPS
+++ b/DEPS
@@ -34,7 +34,7 @@ vars = {
'checkout_android_native_support': 'checkout_android or checkout_chromeos',
# Version of Chromium our Chromium-based DEPS are mirrored from.
- 'chromium_revision': '61150a1970a397f29af174922cad7c5b7fe21cab',
+ 'chromium_revision': 'e6765ea8299f1aa4afbe0994f415ce3e25d24435',
# We never want to checkout chromium,
# but need a dummy DEPS entry for the autoroller
'dummy_checkout_chromium': False,
@@ -79,7 +79,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling catapult
# and whatever else without interference from each other.
- 'catapult_revision': '22aa2610ecac1299d73eb94e1d82bb07edad62f1',
+ 'catapult_revision': 'e9e999a4a88a2963b60bec778f340d3c3d00fa1a',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling luci-go
@@ -119,7 +119,7 @@ vars = {
deps = {
'build': {
- 'url': '{chromium_git}/chromium/src/build.git@cd7f6f65811c44e68fc4c0941d116f1d520da45e',
+ 'url': '{chromium_git}/chromium/src/build.git@bb1c23c67d2328cbb89966535bfca2916854bb8e',
'condition': 'not build_with_chromium',
},
@@ -137,7 +137,7 @@ deps = {
'packages': [
{
'package': 'gn/gn/linux-amd64',
- 'version': 'git_revision:ae110f8b525009255ba1f9ae96982176d3bfad3d',
+ 'version': 'git_revision:c114b7e0b3a327e854cae6b560902230436f1ac7',
}
],
'dep_type': 'cipd',
@@ -148,7 +148,7 @@ deps = {
'packages': [
{
'package': 'gn/gn/mac-${{arch}}',
- 'version': 'git_revision:ae110f8b525009255ba1f9ae96982176d3bfad3d',
+ 'version': 'git_revision:c114b7e0b3a327e854cae6b560902230436f1ac7',
}
],
'dep_type': 'cipd',
@@ -166,7 +166,7 @@ deps = {
},
'buildtools/third_party/libunwind/trunk': {
- 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libunwind.git@c39fea88739be63a2d5590a938ce19d762b915fc',
+ 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libunwind.git@bbcbce996866ff1f947414a8d9db1e79bdc7dca2',
'condition': 'not build_with_chromium',
},
@@ -174,7 +174,7 @@ deps = {
'packages': [
{
'package': 'gn/gn/windows-amd64',
- 'version': 'git_revision:ae110f8b525009255ba1f9ae96982176d3bfad3d',
+ 'version': 'git_revision:c114b7e0b3a327e854cae6b560902230436f1ac7',
}
],
'dep_type': 'cipd',
@@ -182,12 +182,12 @@ deps = {
},
'testing': {
- 'url': '{chromium_git}/chromium/src/testing@6d2fe2e47789e557f8b18db1a33d9f48b7eb70c6',
+ 'url': '{chromium_git}/chromium/src/testing@533b4e6461e1c4867f9950ff7147c7e889ed97d0',
'condition': 'not build_with_chromium',
},
'third_party/abseil-cpp': {
- 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@ef6cda34631acea9c51a5fa6c27f2ccd2942ba14',
+ 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@1f41b4fc8f4e69c27772a6ea14e534a7197568d3',
'condition': 'not build_with_chromium',
},
@@ -332,7 +332,7 @@ deps = {
},
'third_party/depot_tools': {
- 'url': '{chromium_git}/chromium/tools/depot_tools.git@3b97fa826eee4bd1978c4c049038b1e4f201e8f2',
+ 'url': '{chromium_git}/chromium/tools/depot_tools.git@3c6f0eb95fddb6833820d3a10e80a7a2fb5d0167',
'condition': 'not build_with_chromium',
},
@@ -496,7 +496,7 @@ deps = {
},
'third_party/SwiftShader': {
- 'url': '{swiftshader_git}/SwiftShader@011bba68c81900f1c80c619ec4dc4b7478304efa',
+ 'url': '{swiftshader_git}/SwiftShader@1d450ae99a0f4ade28dd55dac962f8b28d990376',
'condition': 'not build_with_chromium',
},
@@ -541,7 +541,7 @@ deps = {
},
'tools/clang': {
- 'url': '{chromium_git}/chromium/src/tools/clang.git@b5e2f7c16bbf3aefc9354e8fbad3de0a543f2193',
+ 'url': '{chromium_git}/chromium/src/tools/clang.git@d82302711f8b44cb5a4adffa044343342a08118d',
'condition': 'not build_with_chromium',
},
@@ -582,12 +582,12 @@ deps = {
},
'tools/memory': {
- 'url': '{chromium_git}/chromium/src/tools/memory@6efd4ff84419a48a22f5bd63ff28a49aa86e9dcc',
+ 'url': '{chromium_git}/chromium/src/tools/memory@087c7630a33cb558fec1b863cc5076d97a67aef8',
'condition': 'not build_with_chromium',
},
'tools/perf': {
- 'url': '{chromium_git}/chromium/src/tools/perf@ff11f6105ca19f033170ccdad9a7dcef7978a866',
+ 'url': '{chromium_git}/chromium/src/tools/perf@7b9534832c3f0bab0835e78a455ca4bd7d9107ec',
'condition': 'not build_with_chromium',
},
diff --git a/doc/DevSetup.md b/doc/DevSetup.md
index d9f5c85557..e742068f53 100644
--- a/doc/DevSetup.md
+++ b/doc/DevSetup.md
@@ -23,7 +23,7 @@ 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.
+ * 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.
diff --git a/gni/angle.gni b/gni/angle.gni
index 19a3d5d00b..f9c3893c9b 100644
--- a/gni/angle.gni
+++ b/gni/angle.gni
@@ -459,6 +459,7 @@ if (angle_standalone || build_with_chromium) {
data = invoker.data + [
"$angle_root/scripts/run_gtest_angle_test.py",
+ "$angle_root/src/tests/py_utils/angle_path_util.py",
"//testing/scripts/common.py",
"//testing/xvfb.py",
]
diff --git a/include/platform/FeaturesMtl.h b/include/platform/FeaturesMtl.h
index ddbb0b7cf3..87cbd2ac45 100644
--- a/include/platform/FeaturesMtl.h
+++ b/include/platform/FeaturesMtl.h
@@ -200,6 +200,12 @@ struct FeaturesMtl : FeatureSetBase
"multisample_color_format_shader_read_workaround", FeatureCategory::MetalWorkarounds,
"Add shaderRead usage to some multisampled texture formats", &members,
"http://anglebug.com/7049"};
+
+ FeatureInfo copyIOSurfaceToNonIOSurfaceForReadOptimization = {
+ "copy_iosurface_to_non_iosurface_for_read_optimization", FeatureCategory::MetalWorkarounds,
+ "some GPUs are faster to read an IOSurface texture by first copying the texture to a "
+ "non-IOSurface texture",
+ &members, "http://anglebug.com/7117"};
};
inline FeaturesMtl::FeaturesMtl() = default;
diff --git a/include/platform/mtl_features.json b/include/platform/mtl_features.json
index eb12b37cdd..2f2ae3ffe2 100644
--- a/include/platform/mtl_features.json
+++ b/include/platform/mtl_features.json
@@ -245,6 +245,17 @@
"Add shaderRead usage to some multisampled texture formats"
],
"issue": "http://anglebug.com/7049"
+ },
+
+ {
+ "name": "copyIOSurfaceToNonIOSurfaceForReadOptimization",
+ "display_name": "copy_iosurface_to_non_iosurface_for_read_optimization",
+ "category": "Workarounds",
+ "description": [
+ "some GPUs are faster to read an IOSurface texture by first copying the texture to a ",
+ "non-IOSurface texture"
+ ],
+ "issue": "http://anglebug.com/7117"
}
]
}
diff --git a/scripts/angle_deqp_test_merge.py b/scripts/angle_deqp_test_merge.py
index ab0fdf1d41..b0af79448e 100644
--- a/scripts/angle_deqp_test_merge.py
+++ b/scripts/angle_deqp_test_merge.py
@@ -8,13 +8,17 @@
import os
import sys
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(THIS_DIR)
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'testing', 'merge_scripts'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing', 'merge_scripts'))
+def _AddToPathIfNeeded(path):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+
+_AddToPathIfNeeded(
+ os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src', 'tests', 'py_utils')))
+import angle_path_util
+
+angle_path_util.AddDepsDirToPath('testing/merge_scripts')
import merge_api
import standard_isolated_script_merge
diff --git a/scripts/code_generation_hashes/ANGLE_features.json b/scripts/code_generation_hashes/ANGLE_features.json
index 6f4781fb4c..6b97211bc7 100644
--- a/scripts/code_generation_hashes/ANGLE_features.json
+++ b/scripts/code_generation_hashes/ANGLE_features.json
@@ -4,7 +4,7 @@
"include/platform/FeaturesGL.h":
"c29f5ed18ab719dc01c42221bde72519",
"include/platform/FeaturesMtl.h":
- "a5f41dc5dbc9f9272819cb6c0ff02a47",
+ "351a698b8956590eb64afe7a0872cf0c",
"include/platform/FeaturesVk.h":
"9ef07a932e5fce68c47180bcf0accce3",
"include/platform/FrontendFeatures.h":
@@ -18,11 +18,11 @@
"include/platform/gl_features.json":
"ff2f4dac740e071f511f751f59f3ef31",
"include/platform/mtl_features.json":
- "3f4a698e0bf3dcd448a7316202faf174",
+ "82d4a2487985b1ba5f440c88bba22e1c",
"include/platform/vk_features.json":
"88a1d0be37101c4a0bd90ddabff23a7d",
"util/angle_features_autogen.cpp":
- "bc9759c7812cca59578fba80ce2cd292",
+ "0493a7bb6d4c1501faf2167e785e4505",
"util/angle_features_autogen.h":
- "9574b3893fe21d3db6283d313a0f849d"
+ "7de3794b3d93f8094fde74e2329f9374"
} \ No newline at end of file
diff --git a/scripts/run_gtest_angle_test.py b/scripts/run_gtest_angle_test.py
index f0b062e2a3..685b199e38 100755
--- a/scripts/run_gtest_angle_test.py
+++ b/scripts/run_gtest_angle_test.py
@@ -31,17 +31,17 @@ import sys
import tempfile
import traceback
-# Add //src/testing into sys.path for importing xvfb and test_env, and
-# //src/testing/scripts for importing common.
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(THIS_DIR)
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'testing'))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'testing', 'scripts'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing'))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing', 'scripts'))
+def _AddToPathIfNeeded(path):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+
+_AddToPathIfNeeded(
+ os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src', 'tests', 'py_utils')))
+import angle_path_util
+
+angle_path_util.AddDepsDirToPath('testing/scripts')
import common
import xvfb
import test_env
diff --git a/src/libANGLE/renderer/metal/ContextMtl.h b/src/libANGLE/renderer/metal/ContextMtl.h
index 0f6ab975af..d1e4ab3bb0 100644
--- a/src/libANGLE/renderer/metal/ContextMtl.h
+++ b/src/libANGLE/renderer/metal/ContextMtl.h
@@ -376,6 +376,9 @@ class ContextMtl : public ContextImpl, public mtl::Context
const mtl::ContextDevice &getMetalDevice() const { return mContextDevice; }
+ angle::Result copy2DTextureSlice0Level0ToWorkTexture(const mtl::TextureRef &srcTexture);
+ const mtl::TextureRef &getWorkTexture() const { return mWorkTexture; }
+
private:
void ensureCommandBufferReady();
angle::Result ensureIncompleteTexturesCreated(const gl::Context *context);
@@ -570,6 +573,7 @@ class ContextMtl : public ContextImpl, public mtl::Context
VertexArrayMtl *mVertexArray = nullptr;
ProgramMtl *mProgram = nullptr;
QueryMtl *mOcclusionQuery = nullptr;
+ mtl::TextureRef mWorkTexture;
using DirtyBits = angle::BitSet<DIRTY_BIT_MAX>;
diff --git a/src/libANGLE/renderer/metal/ContextMtl.mm b/src/libANGLE/renderer/metal/ContextMtl.mm
index 40b3c32a1b..cf166774da 100644
--- a/src/libANGLE/renderer/metal/ContextMtl.mm
+++ b/src/libANGLE/renderer/metal/ContextMtl.mm
@@ -2623,4 +2623,28 @@ angle::Result ContextMtl::checkIfPipelineChanged(const gl::Context *context,
return angle::Result::Continue;
}
+
+angle::Result ContextMtl::copy2DTextureSlice0Level0ToWorkTexture(const mtl::TextureRef &srcTexture)
+{
+ if (!mWorkTexture || !mWorkTexture->sameTypeAndDimemsionsAs(srcTexture))
+ {
+ auto formatId = mtl::Format::MetalToAngleFormatID(srcTexture->pixelFormat());
+ auto format = getPixelFormat(formatId);
+
+ ANGLE_TRY(mtl::Texture::Make2DTexture(this, format, srcTexture->widthAt0(),
+ srcTexture->heightAt0(), srcTexture->mipmapLevels(),
+ false, true, &mWorkTexture));
+ }
+ auto *blitEncoder = getBlitCommandEncoder();
+ blitEncoder->copyTexture(srcTexture,
+ 0, // srcStartSlice
+ mtl::MipmapNativeLevel(0), // MipmapNativeLevel
+ mWorkTexture, // dst
+ 0, // dstStartSlice
+ mtl::MipmapNativeLevel(0), // dstStartLevel
+ 1, // sliceCount,
+ 1); // levelCount
+
+ return angle::Result::Continue;
+}
}
diff --git a/src/libANGLE/renderer/metal/DisplayMtl.mm b/src/libANGLE/renderer/metal/DisplayMtl.mm
index a94fd6d211..c464e65211 100644
--- a/src/libANGLE/renderer/metal/DisplayMtl.mm
+++ b/src/libANGLE/renderer/metal/DisplayMtl.mm
@@ -1096,6 +1096,8 @@ void DisplayMtl::initializeFeatures()
isIntel() && GetMacOSVersion() < OSVersion(12, 0, 0));
ANGLE_FEATURE_CONDITION((&mFeatures), multisampleColorFormatShaderReadWorkaround, isAMD());
+ ANGLE_FEATURE_CONDITION((&mFeatures), copyIOSurfaceToNonIOSurfaceForReadOptimization,
+ isIntel());
ANGLE_FEATURE_CONDITION((&mFeatures), forceNonCSBaseMipmapGeneration, isIntel());
diff --git a/src/libANGLE/renderer/metal/FrameBufferMtl.mm b/src/libANGLE/renderer/metal/FrameBufferMtl.mm
index 22e4c72f14..70fc858e23 100644
--- a/src/libANGLE/renderer/metal/FrameBufferMtl.mm
+++ b/src/libANGLE/renderer/metal/FrameBufferMtl.mm
@@ -1486,6 +1486,20 @@ angle::Result FramebufferMtl::readPixelsImpl(const gl::Context *context,
}
ANGLE_MTL_CHECK(contextMtl, texture->samples() == 1, GL_INVALID_OPERATION);
}
+
+ if (contextMtl->getDisplay()
+ ->getFeatures()
+ .copyIOSurfaceToNonIOSurfaceForReadOptimization.enabled &&
+ texture->hasIOSurface() && texture->mipmapLevels() == 1 &&
+ texture->textureType() == MTLTextureType2D)
+ {
+ // Reading a texture may be slow if it's an IOSurface because metal has to lock/unlock the
+ // surface, whereas copying the texture to non IOSurface texture and then reading from that
+ // may be fast depending on the GPU/driver.
+ ANGLE_TRY(contextMtl->copy2DTextureSlice0Level0ToWorkTexture(texture));
+ texture = contextMtl->getWorkTexture();
+ }
+
if (texture->isBeingUsedByGPU(contextMtl))
{
contextMtl->flushCommandBuffer(mtl::WaitUntilFinished);
diff --git a/src/libANGLE/renderer/metal/mtl_resources.h b/src/libANGLE/renderer/metal/mtl_resources.h
index 239b62f1d3..afbc985eb9 100644
--- a/src/libANGLE/renderer/metal/mtl_resources.h
+++ b/src/libANGLE/renderer/metal/mtl_resources.h
@@ -233,6 +233,9 @@ class Texture final : public Resource,
uint32_t samples() const;
+ bool hasIOSurface() const;
+ bool sameTypeAndDimemsionsAs(const TextureRef &other) const;
+
angle::Result resize(ContextMtl *context, uint32_t width, uint32_t height);
// For render target
diff --git a/src/libANGLE/renderer/metal/mtl_resources.mm b/src/libANGLE/renderer/metal/mtl_resources.mm
index 9dc361306c..6bcb9cd8d3 100644
--- a/src/libANGLE/renderer/metal/mtl_resources.mm
+++ b/src/libANGLE/renderer/metal/mtl_resources.mm
@@ -752,6 +752,20 @@ uint32_t Texture::samples() const
return static_cast<uint32_t>(get().sampleCount);
}
+bool Texture::hasIOSurface() const
+{
+ return (get().iosurface) != nullptr;
+}
+
+bool Texture::sameTypeAndDimemsionsAs(const TextureRef &other) const
+{
+ return textureType() == other->textureType() && pixelFormat() == other->pixelFormat() &&
+ mipmapLevels() == other->mipmapLevels() &&
+ cubeFacesOrArrayLength() == other->cubeFacesOrArrayLength() &&
+ widthAt0() == other->widthAt0() && heightAt0() == other->heightAt0() &&
+ depthAt0() == other->depthAt0();
+}
+
angle::Result Texture::resize(ContextMtl *context, uint32_t width, uint32_t height)
{
// Resizing texture view is not supported.
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index c3b2f2f11a..d0abbf0f16 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -918,7 +918,7 @@ bool ValidateDrawInstancedANGLE(const Context *context, angle::EntryPoint entryP
const auto &attribs = state.getVertexArray()->getVertexAttributes();
const auto &bindings = state.getVertexArray()->getVertexBindings();
- for (size_t attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++)
+ for (size_t attributeIndex = 0; attributeIndex < attribs.size(); attributeIndex++)
{
const VertexAttribute &attrib = attribs[attributeIndex];
const VertexBinding &binding = bindings[attrib.bindingIndex];
diff --git a/src/libANGLE/validationES.h b/src/libANGLE/validationES.h
index ef3c3f1883..5984e07716 100644
--- a/src/libANGLE/validationES.h
+++ b/src/libANGLE/validationES.h
@@ -1253,7 +1253,7 @@ ANGLE_INLINE bool ValidateVertexAttribIndex(const Context *context,
angle::EntryPoint entryPoint,
GLuint index)
{
- if (index >= MAX_VERTEX_ATTRIBS)
+ if (index >= static_cast<GLuint>(context->getCaps().maxVertexAttributes))
{
context->validationError(entryPoint, GL_INVALID_VALUE,
err::kIndexExceedsMaxVertexAttribute);
diff --git a/src/tests/angle_end2end_tests_expectations.txt b/src/tests/angle_end2end_tests_expectations.txt
index d6ba0051a5..af74f258fb 100644
--- a/src/tests/angle_end2end_tests_expectations.txt
+++ b/src/tests/angle_end2end_tests_expectations.txt
@@ -160,6 +160,7 @@
6643 MAC AMD OPENGL : TransformFeedbackTest.TransformFeedbackPausedDrawThenResume/* = SKIP
6738 MAC AMD OPENGL : Texture3DTestES3.PixelUnpackStateTex* = SKIP
1296467 MAC OPENGL : VertexAttributeTestES3.emptyBuffer/* = SKIP
+7203 MAC INTEL OPENGL : CopyTextureTest.CopyToMipmap/* = SKIP
// BlitFramebufferTest.ScissoredMultisampleStencil failures
3496 MAC INTEL OPENGL : BlitFramebufferTest.ScissoredMultisampleStencil/* = SKIP
diff --git a/src/tests/py_utils/angle_path_util.py b/src/tests/py_utils/angle_path_util.py
new file mode 100644
index 0000000000..077ab8e9ba
--- /dev/null
+++ b/src/tests/py_utils/angle_path_util.py
@@ -0,0 +1,26 @@
+# 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 os
+import posixpath
+import sys
+
+ANGLE_ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+
+
+def _AddToPathIfNeeded(path):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+
+def AddDepsDirToPath(posixpath_from_root):
+ relative_path = os.path.join(*posixpath.split(posixpath_from_root))
+ full_path = os.path.join(ANGLE_ROOT_DIR, relative_path)
+ if not os.path.exists(full_path):
+ # Assume Chromium checkout
+ chromium_root_dir = os.path.abspath(os.path.join(ANGLE_ROOT_DIR, '..', '..'))
+ full_path = os.path.join(chromium_root_dir, relative_path)
+ assert os.path.exists(full_path)
+
+ _AddToPathIfNeeded(full_path)
diff --git a/src/tests/py_utils/skia_gold/__init__.py b/src/tests/py_utils/skia_gold/__init__.py
new file mode 100755
index 0000000000..ac4f801337
--- /dev/null
+++ b/src/tests/py_utils/skia_gold/__init__.py
@@ -0,0 +1,7 @@
+# Copyright 2020 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 angle_path_util
+
+angle_path_util.AddDepsDirToPath('build')
diff --git a/src/tests/skia_gold/angle_skia_gold_properties.py b/src/tests/py_utils/skia_gold/angle_skia_gold_properties.py
index 69296c2330..4fa67b66c2 100644
--- a/src/tests/skia_gold/angle_skia_gold_properties.py
+++ b/src/tests/py_utils/skia_gold/angle_skia_gold_properties.py
@@ -3,18 +3,9 @@
# found in the LICENSE file.
"""ANGLE implementation of //build/skia_gold_common/skia_gold_properties.py."""
-import os
-import sys
import subprocess
import sys
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(d(d(THIS_DIR)))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'build'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'build'))
-
from skia_gold_common import skia_gold_properties
diff --git a/src/tests/skia_gold/angle_skia_gold_session.py b/src/tests/py_utils/skia_gold/angle_skia_gold_session.py
index 7da60dfd34..c34ebc06ab 100644
--- a/src/tests/skia_gold/angle_skia_gold_session.py
+++ b/src/tests/py_utils/skia_gold/angle_skia_gold_session.py
@@ -3,16 +3,6 @@
# found in the LICENSE file.
"""ANGLE implementation of //build/skia_gold_common/skia_gold_session.py."""
-import os
-import sys
-
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(d(d(THIS_DIR)))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'build'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'build'))
-
from skia_gold_common import output_managerless_skia_gold_session as omsgs
diff --git a/src/tests/skia_gold/angle_skia_gold_session_manager.py b/src/tests/py_utils/skia_gold/angle_skia_gold_session_manager.py
index 0413b91da7..183ca74586 100644
--- a/src/tests/skia_gold/angle_skia_gold_session_manager.py
+++ b/src/tests/py_utils/skia_gold/angle_skia_gold_session_manager.py
@@ -3,16 +3,6 @@
# found in the LICENSE file.
"""ANGLE implementation of //build/skia_gold_common/skia_gold_session_manager.py."""
-import os
-import sys
-
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(d(d(THIS_DIR)))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'build'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'build'))
-
from skia_gold_common import skia_gold_session_manager as sgsm
from .angle_skia_gold_session import ANGLESkiaGoldSession
diff --git a/src/tests/restricted_traces/BUILD.gn b/src/tests/restricted_traces/BUILD.gn
index 210d66958a..1108deb607 100644
--- a/src/tests/restricted_traces/BUILD.gn
+++ b/src/tests/restricted_traces/BUILD.gn
@@ -78,7 +78,8 @@ group("angle_restricted_trace_gold_tests") {
data = [
"restricted_trace_gold_tests.py",
"restricted_traces.json",
- "../skia_gold/",
+ "../py_utils/angle_path_util.py",
+ "../py_utils/skia_gold/",
"//build/skia_gold_common/",
"//testing/scripts/common.py",
"//testing/xvfb.py",
diff --git a/src/tests/restricted_traces/restricted_trace_gold_tests.py b/src/tests/restricted_traces/restricted_trace_gold_tests.py
index 7ae614414e..aa5afa2ec9 100755
--- a/src/tests/restricted_traces/restricted_trace_gold_tests.py
+++ b/src/tests/restricted_traces/restricted_trace_gold_tests.py
@@ -23,24 +23,18 @@ import tempfile
import time
import traceback
-# Add //src/testing into sys.path for importing xvfb and test_env, and
-# //src/testing/scripts for importing common.
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-sys.path.insert(0, d(THIS_DIR))
+def _AddToPathIfNeeded(path):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+
+_AddToPathIfNeeded(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'py_utils')))
+import angle_path_util
from skia_gold import angle_skia_gold_properties
from skia_gold import angle_skia_gold_session_manager
-ANGLE_SRC_DIR = d(d(d(THIS_DIR)))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'testing'))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'testing', 'scripts'))
-# Handle the Chromium-relative directory as well. As long as one directory
-# is valid, Python is happy.
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing'))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing', 'scripts'))
-
+angle_path_util.AddDepsDirToPath('testing/scripts')
import common
import test_env
import xvfb
@@ -448,8 +442,8 @@ def main():
try:
# read test set
- json_name = os.path.join(ANGLE_SRC_DIR, 'src', 'tests', 'restricted_traces',
- 'restricted_traces.json')
+ json_name = os.path.join(angle_path_util.ANGLE_ROOT_DIR, 'src', 'tests',
+ 'restricted_traces', 'restricted_traces.json')
with open(json_name) as fp:
tests = json.load(fp)
diff --git a/src/tests/skia_gold/__init__.py b/src/tests/skia_gold/__init__.py
deleted file mode 100755
index 70fcdbc7f4..0000000000
--- a/src/tests/skia_gold/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2020 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 os
-import sys
-
-d = os.path.dirname
-THIS_DIR = d(os.path.abspath(__file__))
-ANGLE_SRC_DIR = d(d(d(d(THIS_DIR))))
-sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'build'))
-CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
-sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'build'))
diff --git a/third_party/SwiftShader b/third_party/SwiftShader
-Subproject 011bba68c81900f1c80c619ec4dc4b7478304ef
+Subproject 1d450ae99a0f4ade28dd55dac962f8b28d99037
diff --git a/third_party/catapult b/third_party/catapult
-Subproject 22aa2610ecac1299d73eb94e1d82bb07edad62f
+Subproject e9e999a4a88a2963b60bec778f340d3c3d00fa1
diff --git a/third_party/depot_tools b/third_party/depot_tools
-Subproject 3b97fa826eee4bd1978c4c049038b1e4f201e8f
+Subproject 3c6f0eb95fddb6833820d3a10e80a7a2fb5d016
diff --git a/util/BUILD.gn b/util/BUILD.gn
index 0da1dc8cf3..a1581caacd 100644
--- a/util/BUILD.gn
+++ b/util/BUILD.gn
@@ -65,7 +65,7 @@ if (is_fuchsia) {
"fuchsia/ScenicWindow.cpp",
"fuchsia/ScenicWindow.h",
]
-} else if (use_ozone && !angle_use_x11) {
+} else if (use_ozone && !(angle_use_x11 || angle_use_wayland)) {
# Use X11 impl by default otherwise switch to fake Ozone impl that does not
# seem to do anything real.
# TODO(msisov): probably, we need to have a proper support for different
diff --git a/util/angle_features_autogen.cpp b/util/angle_features_autogen.cpp
index 858a87c62b..0d6cf87900 100644
--- a/util/angle_features_autogen.cpp
+++ b/util/angle_features_autogen.cpp
@@ -55,6 +55,8 @@ constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{
{Feature::ClearToZeroOrOneBroken, "clear_to_zero_or_one_broken"},
{Feature::ClipSrcRegionBlitFramebuffer, "clip_src_region_for_blitframebuffer"},
{Feature::CompressVertexData, "compress_vertex_data"},
+ {Feature::CopyIOSurfaceToNonIOSurfaceForReadOptimization,
+ "copy_iosurface_to_non_iosurface_for_read_optimization"},
{Feature::CreatePipelineDuringLink, "createPipelineDuringLink"},
{Feature::DeferFlushUntilEndRenderPass, "deferFlushUntilEndRenderPass"},
{Feature::DepthClamping, "depth_clamping"},
diff --git a/util/angle_features_autogen.h b/util/angle_features_autogen.h
index 3037c9461a..300b3bff2d 100644
--- a/util/angle_features_autogen.h
+++ b/util/angle_features_autogen.h
@@ -53,6 +53,7 @@ enum class Feature
ClearToZeroOrOneBroken,
ClipSrcRegionBlitFramebuffer,
CompressVertexData,
+ CopyIOSurfaceToNonIOSurfaceForReadOptimization,
CreatePipelineDuringLink,
DeferFlushUntilEndRenderPass,
DepthClamping,