Bug 1459785 - Record merge_base_from in cherry_picks.txt. draft
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 07 May 2018 17:37:47 -0700
changeset 798560 33d9049f709a6e95a47798f618e6271e7ee40f73
parent 792270 59005ba3cd3e7b3f9e8804bea881bf4c3a755d7c
child 798561 79db077900205b1afe71086bac85216f5979b1ea
push id110788
push userbmo:jgilbert@mozilla.com
push dateWed, 23 May 2018 01:22:26 +0000
bugs1459785
milestone62.0a1
Bug 1459785 - Record merge_base_from in cherry_picks.txt. Link to ANGLE<->Chrome version mapping page. MozReview-Commit-ID: 8OWSkGigHtE
gfx/angle/cherries.log
gfx/angle/cherry_picks.txt
gfx/angle/update-angle.py
gfx/angle/vendor_from_git.py
deleted file mode 100644
--- a/gfx/angle/cherries.log
+++ /dev/null
@@ -1,98 +0,0 @@
-commit fcbca0e873c3222f13578a07294349c03ce44ab4
-Author: Dzmitry Malyshau <kvark@mozilla.com>
-Date:   Fri Mar 9 16:37:22 2018 -0500
-
-    Update driver constants on program change. Comes with a new SamplerMetadataUpdateOnSetProgram test.
-    
-    This is a fix for a graphics problem we've been seeing for a while with WebRender+Angle on Nvidia/Windows. The sampler metadata doesn't get updated properly for some of the draw calls, since it's not invalidated on program change (this is what the CL is fixing). Extra entries get filled with garbage data because the constant buffer is updated with `MAP_WRITE_DISCARD`, and only those samplers are updated that the current program has. This may generally occur undetected, if not for our `textureSize` calls that appear to go the NV-specific Angle workaround path that ignores our `baseLevel = 0` and instead picks the one from the driver constants (which contains garbage), leading to either zeroes returned or even crashing the driver sometimes...
-    
-    BUG=angleproject:2399
-    
-    Change-Id: Ie2bef32184e2305c7255299933b899eb3fffb7ab
-    Reviewed-on: https://chromium-review.googlesource.com/949412
-    Reviewed-by: Jamie Madill <jmadill@chromium.org>
-    Reviewed-by: Geoff Lang <geofflang@chromium.org>
-    Commit-Queue: Geoff Lang <geofflang@chromium.org>
-
-commit 17c34b476b3a941ee749165b6a360f8a3488960d
-Author: Frank Henigman <fjhenigman@chromium.org>
-Date:   Wed Feb 28 15:47:13 2018 -0500
-
-    Add missing #include.
-    
-    Would not compile locally on Linux without adding #include <algorithm>.
-    
-    BUG=none
-    
-    Change-Id: I2f817faf681234c0e7eeeda0ad837e8285d9071a
-    Reviewed-on: https://chromium-review.googlesource.com/941613
-    Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
-    Reviewed-by: Jamie Madill <jmadill@chromium.org>
-    Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
-    Reviewed-by: Luc Ferron <lucferron@chromium.org>
-
-commit eb0da26df7dc6cd45ee17455633bdec2efbaf322
-Author: Jeff Gilbert <jgilbert@mozilla.com>
-Date:   Thu Mar 1 17:08:35 2018 -0800
-
-    Fix R11F_G11F_B10F/RGB/FLOAT SKIP_PIXELS=1 uploads.
-    
-    Bug: angleproject:2385
-    
-    Change-Id: I555000f23314441084895e275824d2eb48ba7041
-
-commit 7d510ab511cd502220f81507189a2861958e22fd
-Author: Jeff Gilbert <jgilbert@mozilla.com>
-Date:   Mon Feb 26 16:30:06 2018 -0800
-
-    Move constructors may not be marked explicit.
-    
-    BUG=angleproject:2383
-    
-    Change-Id: If22c7f7c15b7bbe89b859281b28c2b9695e34a1d
-
-commit d8e2f9ea469900a51e78b63f06fab52b69e42193
-Author: Jeff Gilbert <jgilbert@mozilla.com>
-Date:   Thu Feb 22 18:20:37 2018 -0800
-
-    Support EGLStream from B8G8R8A8_UNORM D3D11Texture.
-    
-    Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415754
-    
-    BUG=angleproject:2368
-    
-    Change-Id: Ic2c71b36e7b08560e158fd3dbf10b2fe225f1364
-
-Cherries picked
-================================================================================
-Merge base
-
-commit d444255a779bba544cf95516b1efc1b0e6cb0a65
-Author: Jamie Madill <jmadill@chromium.org>
-Date:   Tue Feb 27 22:03:47 2018 -0500
-
-    Refactor signal utils into Observer pattern.
-    
-    These types were over-generalized. All use cases featured
-    arrays of resources attached to single parent resources. The
-    channel ID is sufficient to identify the child resource in the
-    parent, and having variadic template arguments wasn't necessary.
-    
-    Futhermore we can rename these types to use the common Observer
-    pattern. This should make them more readable to new developers.
-    
-    Also update some classes to inherit from Subject instead of
-    having a member Subject. This cleans up the code in a few places.
-    
-    This should lead to a simpler refactor to allow dependent dirty
-    bits notifications in the Vulkan back-end.
-    
-    In the following patch the signal_utils files will be renamed. They
-    are not renamed in this patch to ensure git history is preserved.
-    
-    Bug: angleproject:2372
-    Change-Id: I17a3f2c8d92afd4bb3cba2d378c3a2e8a6d7fb11
-    Reviewed-on: https://chromium-review.googlesource.com/936690
-    Reviewed-by: Luc Ferron <lucferron@chromium.org>
-    Reviewed-by: Jamie Madill <jmadill@chromium.org>
-    Commit-Queue: Jamie Madill <jmadill@chromium.org>
new file mode 100644
--- /dev/null
+++ b/gfx/angle/cherry_picks.txt
@@ -0,0 +1,50 @@
+commit 2426b097472f19c907b3c734d6186d444f9be9ad
+Author: Jeff Gilbert <jgilbert@mozilla.com>
+Date:   Fri May 18 18:32:16 2018 -0700
+
+    Add `formatType` arg to computeSkipBytes.
+    
+    Fix texture upload format tests:
+    - Format tests should definitely run on ES3 also.
+    - Also set filters to NEAREST since some formats aren't filterable.
+    - Fix RGB9_E5 test reference encoding and add a test for it.
+    - True int/uint textures require i/usamplers.
+    
+    Bug: angleproject:2576
+    Change-Id: Ia5bac34cdee6554a88db339de443689a71a0cf70
+
+commit 1c428b64f565ca0305ef875bc1a7d5643c7fb856
+Author: Jeff Gilbert <jgilbert@mozilla.com>
+Date:   Mon May 7 17:23:57 2018 -0700
+
+    Add headers to build file lists.
+    
+    Bug: angleproject:2535
+    Change-Id: If4d3037e43b403683554a710e89a76befd9b354a
+
+Cherries picked
+================================================================================
+Merge base from: origin/chromium/3396
+
+commit 702006f4a07e4f0069f189679f5c84ebda7c5772
+Author: Jamie Madill <jmadill@chromium.org>
+Date:   Fri May 11 16:54:17 2018 -0400
+
+    D3D11: Fix out-of-range access with robust access.
+    
+    When using a vertex buffer with DYNAMIC usage, with robust buffer
+    access enabled, we would sometimes read out-of-bounds when using very
+    large values for the index range. An unchecked signed addition would
+    overflow and lead to reading a negative offset.
+    
+    Fix this problem by keeping the value size_t whenever possible. Also do
+    clamped casts when converting to a smaller values.
+    
+    Also adds a regression test.
+    
+    Also combined with 26b0bfb46: Fix warnings from size_t conversions.
+    
+    Bug: chromium:842028
+    Change-Id: Ie1a8f476f3e97149362eb9855f08450c067ff807
+    Reviewed-on: https://chromium-review.googlesource.com/1064721
+    Reviewed-by: Jamie Madill <jmadill@chromium.org>
--- a/gfx/angle/update-angle.py
+++ b/gfx/angle/update-angle.py
@@ -8,98 +8,78 @@ python3.
 Upstream: https://chromium.googlesource.com/angle/angle
 
 Our repo: https://github.com/mozilla/angle
 It has branches like 'firefox-60' which is the branch we use for pulling into
 Gecko with this script.
 
 This script leaves a record of the merge-base and cherry-picks that we pull into
 Gecko. (gfx/angle/cherries.log)
+
+ANGLE<->Chrome version mappings are here: https://omahaproxy.appspot.com/
+An easy choice is to grab Chrome's Beta's ANGLE branch.
 '''
 
 import json
 import os
 from pathlib import *
 import re
 import shutil
 import subprocess
 import sys
 
+from vendor_from_git import *
+
 REPO_DIR = Path.cwd()
 GECKO_ANGLE_DIR = Path(__file__).parent
 GECKO_DIR = GECKO_ANGLE_DIR.parent.parent
 
 OUT_DIR = 'out'
 
 COMMON_HEADER = [
     '# Generated by update-angle.py',
     '',
     "include('../../moz.build.common')",
 ]
 
 # --
 
-def print_now(*args):
-    print(*args)
-    sys.stdout.flush()
-
-
-def run_checked(*args, **kwargs):
-    print_now(' ', args)
-    return subprocess.run(args, check=True, shell=True, **kwargs)
-
-
 def sorted_items(x):
     for k in sorted(x.keys()):
         yield (k, x[k])
 
 # --
 
-CHERRIES_PATH = Path(GECKO_ANGLE_DIR, 'cherries.log')
-print_now('Logging cherries ({})'.format(CHERRIES_PATH))
-
 MERGE_BASE = sys.argv[1]
-MERGE_BASE = run_checked('git', 'merge-base', 'HEAD', MERGE_BASE,
-                         stdout=subprocess.PIPE).stdout.decode().strip()
-
-mb_info = run_checked('git', 'log', '{}~1..{}'.format(MERGE_BASE, MERGE_BASE),
-                      stdout=subprocess.PIPE).stdout
-cherries = run_checked('git', 'log', MERGE_BASE + '..', stdout=subprocess.PIPE).stdout
-
-with open(CHERRIES_PATH, 'wb') as f:
-    f.write(cherries)
-    f.write(b'\nCherries picked')
-    f.write(b'\n' + (b'=' * 80))
-    f.write(b'\nMerge base')
-    f.write(b'\n\n')
-    f.write(mb_info)
+record_cherry_picks(GECKO_ANGLE_DIR, MERGE_BASE)
 
 # --
 
 print_now('Importing graph')
 
 shutil.rmtree(OUT_DIR, True)
 
-run_checked('gn', 'gen', OUT_DIR)
+run_checked('gn', 'gen', OUT_DIR, shell=True)
 
 GN_ARGS = '''
 # Build arguments go here.
 # See "gn args <out_dir> --list" for available build arguments.
 is_clang = false
 angle_enable_gl = false
 angle_enable_gl_null = false
 angle_enable_null = false
 angle_enable_vulkan = false
 '''[1:]
 with open(OUT_DIR + '/args.gn', 'wb') as f:
     f.write(GN_ARGS.encode())
 
 # --
 
-p = run_checked('gn', 'desc', '--format=json', OUT_DIR, '*', stdout=subprocess.PIPE)
+p = run_checked('gn', 'desc', '--format=json', OUT_DIR, '*', stdout=subprocess.PIPE,
+                shell=True)
 
 print_now('Processing graph')
 descs = json.loads(p.stdout.decode())
 
 # HACKHACKHACK
 common = descs['//:angle_common']
 common['sources'] += [
     '//src/common/system_utils_linux.cpp',
--- a/gfx/angle/vendor_from_git.py
+++ b/gfx/angle/vendor_from_git.py
@@ -38,11 +38,11 @@ def record_cherry_picks(dir_in_gecko, me
     mb_info = run_checked('git', 'log', '{}~1..{}'.format(merge_base, merge_base),
                           stdout=subprocess.PIPE).stdout
     cherries = run_checked('git', 'log', merge_base + '..', stdout=subprocess.PIPE).stdout
 
     with open(log_path, 'wb') as f:
         f.write(cherries)
         f.write(b'\nCherries picked')
         f.write(b'\n' + (b'=' * 80))
-        f.write(b'\nMerge base')
+        f.write(b'\nMerge base from: ' + merge_base_from.encode())
         f.write(b'\n\n')
         f.write(mb_info)