michael@0: This is the ANGLE project, from http://code.google.com/p/angleproject/ michael@0: michael@0: Current revision: f3fc6571dca9832876e09c63b0958d413737757b michael@0: Date of revision: 2013-08-02 michael@0: michael@0: == Applied local patches == michael@0: In this order: michael@0: angle-build-stdcall-alias.patch: michael@0: Fix an issue GCC has with linking to undecorated stdcalls. michael@0: michael@0: angle-build-dedupe-debug-cpp-h.patch: michael@0: Rename: "src/compiler/debug.{cpp,h}" michael@0: To: "src/compiler/compiler_debug.{cpp,h}" michael@0: Repair includes accordingly. michael@0: michael@0: angle-build-d3dcompiler-list.patch: michael@0: Move `ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES` define from make files to michael@0: Renderer.cpp, where it's used. michael@0: michael@0: angle-build-khrplatform-h-path.patch: michael@0: Fix include path for khrplatform.h. michael@0: michael@0: angle-build-case-sensitive.patch michael@0: Fixes cross compilation on case sensitive OSes. michael@0: michael@0: angle-build-dedupe-uniform-cpp-h.patch: michael@0: Rename: "src/compiler/Uniform.{cpp,h}" michael@0: To: "src/compiler/CompilerUniform.{cpp,h}" michael@0: Repair includes accordingly. michael@0: michael@0: angle-build-ttype.patch: michael@0: Remove bit-field markings for TType, since GCC4.7 emits a default michael@0: copy constructor which fails to compile. michael@0: michael@0: angle-long-ident-hash.patch: michael@0: Use MurmurHash3 for long identifier hashing. See bug 676071, where we used michael@0: Spooky Hash, before ANGLE came with MurmurHash3. michael@0: michael@0: angle-faceforward-emu.patch: michael@0: Adds emulation for faceforward(float,float,float), which is needed to michael@0: prevent crashing on Mac+Intel. See bug 771406. michael@0: michael@0: angle-default-clamp-strat.patch: michael@0: Fixes TCompiler::Init to treat `resources.ArrayIndexClampingStrategy` michael@0: as a request for the default strategy. michael@0: michael@0: angle-tex-pool-default.patch: michael@0: Don't use D3DPOOL_MANAGED on D3D9. Just use D3DPOOL_DEFAULT. michael@0: michael@0: angle-build-unified.patch: michael@0: Fixes required to make angle compile in unified mode michael@0: Note that a different version of this patch was upstreamed, so the next time that michael@0: Angle is updated this patch can be discarded. See: michael@0: https://chromium.googlesource.com/angle/angle/+/0dd3b3ff66cdc50882125d21e60112d5161279b4 michael@0: https://chromium.googlesource.com/angle/angle/+/0685fbde65a3e90d8d4d4a6c72f2cc1771617fd0 michael@0: michael@0: angle-fix-vc12.patch: michael@0: Fixes angle to build on Visual Studio 2013 michael@0: michael@0: angle-d3dcc47.patch: michael@0: Tell ANGLE about d3dcompiler_47.dll from WinSDK 8.1. michael@0: michael@0: angle-fix-issue-651.patch: michael@0: Fixes crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9 michael@0: michael@0: In addition to these patches, the Makefile.in and moz.build build files are ours, michael@0: they're not present in upsteam ANGLE. Therefore, changes made to the build files michael@0: should not be stored in the local .patch files. michael@0: michael@0: michael@0: == How to do a clean-slate upgrade == michael@0: 1. Backup our moz-specific files: michael@0: README.mozilla michael@0: Makefile.in michael@0: moz.build michael@0: *.patch michael@0: src/libEGL/Makefile.in michael@0: src/libEGL/moz.build michael@0: src/libGLESv2/Makefile.in michael@0: src/libGLESv2/moz.build michael@0: michael@0: 2. $ rm -rf gfx/angle michael@0: michael@0: 3. Copy the folder containing the angle rev you want onto gfx/angle. michael@0: $ svn export -r /gfx/angle michael@0: Or: michael@0: $ git checkout-index --prefix /gfx/angle/ -a michael@0: michael@0: 4. Fold our moz-specific files into this new angle folder. (Makefiles, README) michael@0: 4a. Remove the unused files. (test/, samples/, msvc files) michael@0: michael@0: 5. Clear out the "Applied Local Patches" section above, since we're going to michael@0: repopulate it. michael@0: michael@0: 6. Re-apply the angle-build-*.patch files and record them above. michael@0: michael@0: 7. Update the Makefile.in files with the current deps from the .gyp(i) files. michael@0: michael@0: 8. Build. Fix things until it builds. michael@0: michael@0: 9. Reapply the rest of the .patch files and record them above. michael@0: michael@0: 10. Try runs and reviews! michael@0: michael@0: michael@0: == Applying Diffs == michael@0: In general: michael@0: $ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch michael@0: michael@0: SVN diffs however can be iffy. They don't seem to be completely compatible michael@0: with `patch`. Be aware that you'll likely get rejects whenever a file is michael@0: removed. michael@0: michael@0: michael@0: michael@0: == How to do an incremental update == michael@0: Same general idea here, but instead of nuking the ANGLE dir, we're going to michael@0: have to get a diff between revs from SVN, and deal with applying that. We michael@0: also naturally have to peel off our local patches before we can apply a diff michael@0: from upstream. michael@0: michael@0: 1. Unapply patches michael@0: michael@0: Unapply them in reverse order, so iterate over the above list of applied patch michael@0: starting from the bottom. You most likely want to record these patch-unapply michael@0: operations as individual patches themselves, in order to re-apply patches later. michael@0: michael@0: $ cd /path/to/mozilla-central michael@0: michael@0: $ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch michael@0: $ hg qnew unapply-angle-some-bug-fix.patch michael@0: michael@0: 2. Apply diff with new ANGLE version michael@0: michael@0: Check at the top of this file what ANGLE revision we currently have. Let's say it's michael@0: r123. Check at the ANGLE Web site what recent revisions look like to figure what michael@0: revision seems safe. Let's say we want r456. michael@0: michael@0: $ cd michael@0: $ svn checkout http://angleproject.googlecode.com/svn/trunk/ angleproject michael@0: $ cd angleproject michael@0: $ svn diff -r 123:456 > ~/angle-diff-from-123-to-456 michael@0: $ cd /path/to/mozilla-central michael@0: $ cd gfx/angle michael@0: $ patch -p0 < ~/angle-diff-from-123-to-456 michael@0: $ cd ../.. michael@0: $ hg status michael@0: # hg add any new ANGLE files under gfx/angle michael@0: $ hg qnew angle-diff-from-123-to-456 michael@0: michael@0: 3. Reapply patches michael@0: michael@0: You may have to skip reapplying certain patches there, for example if they have michael@0: been integrated into ANGLE since our last update. The short patch descriptions above michael@0: in this file should help you make that decision. michael@0: michael@0: If you have recorded the individual patch unapply operations in step 1 as separate michael@0: Mercurial patches, this will be easy, just apply the inverse patches now, in reverse michael@0: order: michael@0: michael@0: $ patch -p1 -R < .hg/patches/unapply-angle-some-bug-fix.patch michael@0: $ hg status michael@0: # hg add any new ANGLE files under gfx/angle michael@0: $ hg qnew angle-some-bug-fix.patch michael@0: michael@0: Note that here you need to proceed in the reverse order of what you did in step 1. michael@0: michael@0: 4. Update our Makefiles michael@0: michael@0: Open your ANGLE diff file (~/angle-diff-from-123-to-456), search for GYP files michael@0: (e.g. build_angle.gyp), it's easy-to-read JSON. It may list additions of new files, michael@0: or removal of old files. You have to reflect this in our Makefiles: michael@0: michael@0: gfx/angle/Makefile.in michael@0: gfx/angle/src/libEGL/Makefile.in michael@0: gfx/angle/src/libGLESv2/Makefile.in michael@0: michael@0: The first one is our main Makefile. It has basically the ANGLE shader compiler. michael@0: Changes there will typically have to be applied also to the two other Makefiles. michael@0: These two other Makefiles are Windows-only and build the ANGLE GLES2-on-top-of-D3D michael@0: implementation. michael@0: michael@0: 5. Update patch files michael@0: michael@0: Something like: michael@0: michael@0: $ cp .hg/patches/angle-some-bug-fix.patch gfx/angle michael@0: michael@0: For each patch that you reapplied. michael@0: michael@0: If a patch was removed (not reapplied), remove the corresponding patch file. michael@0: michael@0: 6. Update this README.mozilla michael@0: michael@0: You'll have to update at least the ANGLE revision number and probably the patch michael@0: list as well. michael@0: michael@0: 7. Push to Try michael@0: michael@0: Make sure to test both Windows and non-Windows, and enable mochitest-1 in your michael@0: Try options. You may want reftest as well, as we have WebGL reftests. michael@0: michael@0: 8. Get reviews. michael@0: michael@0: Typically, you would get review on your Makefiles patch, and any michael@0: new patches that you need to add to get this update to work. michael@0: michael@0: You do not need a review for the ANGLE diff itself and for trivial updates of michael@0: existing patches. michael@0: michael@0: michael@0: == Visual Studio Solution Files == michael@0: Ignore these. We don't use them anymore. We use custom Makefiles. michael@0: michael@0: michael@0: == Generated parser code== michael@0: Don't bother about that anymore. The parser is now generated and included in the ANGLE svn repo.