src/common/angle_version_info.h


Log

Author Commit Date CI Message
Yuxin Hu e1bd0415 2023-02-03T16:58:21 Revert "Re-land fixing of commit ID for Android builds." This reverts commit e6662832af3c6394d0a0bbecd1e7a52581e88b12. After the commit https://github.com/google/angle/commit/61728827d2e5ecce685578bc54bb2c744b65fc9a, we no longer depends on git hash to determine if the program binary cache is valid. The reverted commit was added to handle unknown git hash. Android build infra does not guarantee access to git, and we needed GetANGLEHasBinaryLoading() check because we can't tell if ANGLE program changed if git hash remains "unknown" across different builds. Now that we used a different hash ANGLE_PROGRAM_VERSION as the cache key, which generates from a list of code files that affect program binary content and it won't be unknown on Android build, we can revert the commit and rely on ANGLE_PROGRAM_VERSION to reject invalid program binary cache. This fixes the dEQP test dEQP-GLES3.functional.shader_api.program_binary. simple.uniform_reset_on_binary_load, which failed because the GetANGLEHasBinaryLoading() is stopping Program::loadBinary() due to "unknown" git hash on Android build. This CL reverts most of the original commit, cleans up unused macros and variables, and reserves the change in program::loadBinary() that returns incomplete if binary format is not GL_PROGRAM_BINARY_ANGLE. This CL also reserves the changes in https://github.com/google/angle/commit/dd8021d98cd2909dfb85012f9b25010bd3ce2536 in case Sumsung parter still needs them. Bug: b/258445879 Change-Id: Ia4380de9362f7b8bed6de6a54943bec6600cb76b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4219368 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Yuxin Hu 82826be0 2023-01-06T11:20:14 Reland "Make ANGLE program version only dependent on data that matters" This is a reland of commit 61728827d2e5ecce685578bc54bb2c744b65fc9a Changes made on top of previous commit 1. In src/program_serialize_data_version.py, fix the script error on Windows: anglebug.com/7918. 2. In BUILD.gn, replace the 'write_file' with 'response_file_content'. See https://gn.googlesource.com/gn/+/main/docs/reference.md#var_response_file_contents 3. In scripts/generate_android.bp.py, add code to handle the special GN build flag {{response_file_name}}. The code writes the list defined in srcs (identified by $(in) in Android blueprint) into a temp file named 'gn_response_file', and replaces the {{response_file_name}} with 'gn_response_file'. Original change's description > Changes made on top of original commit > 1. Enable execution permission on python script > program_serialize_data_version.py > 2. Remove unused list in libGLESv2.gni > 3. In angle/BUILD.gn, change file path from > "relative to angle_root", to "relative to root_build_dir", > so that inside the script program_serialize_data_version.py, > we don't have to find the absolute path of the code files for > hashing. > Original change's description > > This change introduces a new variable ANGLE_PROGRAM_VERSION > > to track the version of ANGLE source files that affect shader > > program serialization/deserialization. This change include more > > source files than necessary, to serve the purpose of a conservative > > jumping off point. We will narrow down the list of files for > > ANGLE_PROGRAM_VERSION hash generation in the future. > > Add a new script program_serialize_data_version.py that will > > be triggered during the build when the related source files changed. > > The script will generate a hash and the hash size from the related > > source files. In program serialization/deserialization and cache > > key generation, we will use this hash value instead of the entire > > ANGLE git hash. When the hash value changed, we know that the > > related source files changed, and we should invalidate the program > > cache and re-generate the blob cache / program binary. > > Bug: angleproject:4981 > > Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215 > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Yuxin Hu <yuxinhu@google.com> > Bug: angleproject:4981 > Change-Id: Iaa9eb0ab33439197bc30d03064fc245ea7ef1ea8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113445 > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bug: angleproject:4981 Change-Id: Ib5bba199be6d08a1e19807026df0e7b747dbc8a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4144078 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Yuxin Hu c4b95929 2023-01-05T19:59:07 Revert "Reland "Make ANGLE program version only dependent on data that matters"" This reverts commit 61728827d2e5ecce685578bc54bb2c744b65fc9a. Reason for revert: it breaks aosp build: https://android-review.git.corp.google.com/c/platform/external/angle/+/2374971. Build error: `FileNotFoundError: [Errno 2] No such file or directory: 'angle_code_affecting_program_serialize'` Original change's description: > Reland "Make ANGLE program version only dependent on data that matters" > > This is a reland of commit c303758fbc8d23266be578fae246e5687656b4c6 > > Changes made on top of original commit > 1. Enable execution permission on python script > program_serialize_data_version.py > 2. Remove unused list in libGLESv2.gni > 3. In angle/BUILD.gn, change file path from > "relative to angle_root", to "relative to root_build_dir", > so that inside the script program_serialize_data_version.py, > we don't have to find the absolute path of the code files for > hashing. > > Original change's description > > > This change introduces a new variable ANGLE_PROGRAM_VERSION > > to track the version of ANGLE source files that affect shader > > program serialization/deserialization. This change include more > > source files than necessary, to serve the purpose of a conservative > > jumping off point. We will narrow down the list of files for > > ANGLE_PROGRAM_VERSION hash generation in the future. > > > Add a new script program_serialize_data_version.py that will > > be triggered during the build when the related source files changed. > > The script will generate a hash and the hash size from the related > > source files. In program serialization/deserialization and cache > > key generation, we will use this hash value instead of the entire > > ANGLE git hash. When the hash value changed, we know that the > > related source files changed, and we should invalidate the program > > cache and re-generate the blob cache / program binary. > > > Bug: angleproject:4981 > > Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215 > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Yuxin Hu <yuxinhu@google.com> > > Bug: angleproject:4981 > Change-Id: Iaa9eb0ab33439197bc30d03064fc245ea7ef1ea8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113445 > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bug: angleproject:4981 Change-Id: If7d3779c8f40dafa9a9c057f669ab53d0494526e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140138 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu 61728827 2022-12-14T15:29:15 Reland "Make ANGLE program version only dependent on data that matters" This is a reland of commit c303758fbc8d23266be578fae246e5687656b4c6 Changes made on top of original commit 1. Enable execution permission on python script program_serialize_data_version.py 2. Remove unused list in libGLESv2.gni 3. In angle/BUILD.gn, change file path from "relative to angle_root", to "relative to root_build_dir", so that inside the script program_serialize_data_version.py, we don't have to find the absolute path of the code files for hashing. Original change's description > This change introduces a new variable ANGLE_PROGRAM_VERSION > to track the version of ANGLE source files that affect shader > program serialization/deserialization. This change include more > source files than necessary, to serve the purpose of a conservative > jumping off point. We will narrow down the list of files for > ANGLE_PROGRAM_VERSION hash generation in the future. > Add a new script program_serialize_data_version.py that will > be triggered during the build when the related source files changed. > The script will generate a hash and the hash size from the related > source files. In program serialization/deserialization and cache > key generation, we will use this hash value instead of the entire > ANGLE git hash. When the hash value changed, we know that the > related source files changed, and we should invalidate the program > cache and re-generate the blob cache / program binary. > Bug: angleproject:4981 > Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bug: angleproject:4981 Change-Id: Iaa9eb0ab33439197bc30d03064fc245ea7ef1ea8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113445 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu 25ce2e23 2022-12-16T18:16:32 Revert "Make ANGLE program version only dependent on data that matters" This reverts commit c303758fbc8d23266be578fae246e5687656b4c6. Reason for revert: This is causing the Android roller fail: https://crrev.com/c/4072215/comments/6918d7f6_8100d66b?tab=comments Original change's description: > Make ANGLE program version only dependent on data that matters > > This change introduces a new variable ANGLE_PROGRAM_VERSION > to track the version of ANGLE source files that affect shader > program serialization/deserialization. This change include more > source files than necessary, to serve the purpose of a conservative > jumping off point. We will narrow down the list of files for > ANGLE_PROGRAM_VERSION hash generation in the future. > > Add a new script program_serialize_data_version.py that will > be triggered during the build when the related source files changed. > The script will generate a hash and the hash size from the related > source files. In program serialization/deserialization and cache > key generation, we will use this hash value instead of the entire > ANGLE git hash. When the hash value changed, we know that the > related source files changed, and we should invalidate the program > cache and re-generate the blob cache / program binary. > > Bug: angleproject:4981 > Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bug: angleproject:4981 Change-Id: Ib235d85c79ed54110696ac5413571934890fdc98 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114274 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu c303758f 2022-12-14T15:29:15 Make ANGLE program version only dependent on data that matters This change introduces a new variable ANGLE_PROGRAM_VERSION to track the version of ANGLE source files that affect shader program serialization/deserialization. This change include more source files than necessary, to serve the purpose of a conservative jumping off point. We will narrow down the list of files for ANGLE_PROGRAM_VERSION hash generation in the future. Add a new script program_serialize_data_version.py that will be triggered during the build when the related source files changed. The script will generate a hash and the hash size from the related source files. In program serialization/deserialization and cache key generation, we will use this hash value instead of the entire ANGLE git hash. When the hash value changed, we know that the related source files changed, and we should invalidate the program cache and re-generate the blob cache / program binary. Bug: angleproject:4981 Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Kimmo Kinnunen 08d3be38 2022-09-12T15:42:35 Rename include guards for angle_version_info.h, angle_version.h Patch by David Kilzer <ddkilzer@apple.com>. They have the same include guard and it does not match the filename. Bug: angleproject:7650 Change-Id: I8f6c035e5f397a36744d22a2f4b58063e241b8b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891372 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Doug Horn e6662832 2022-04-28T17:30:41 Re-land fixing of commit ID for Android builds. Android infra does not store the .git directory alongside the checked out code, instead using a gitdir directive to point elsewhere. This caused the commit_id script to fail, which could cause issues with disk-backed program caches on updates when the serialization format changes. Tested: 1) Verified that cached binaries do not load when the ANGLE hash is "unknown hash". This fixes a bug where the serialization format could change but we are unaware of a change because the hash is technically the same. 2) Verified that Android infra correctly generates the git hash. Bug: b/206109660 Test: Run script on Android infra, verify hash is gathered properly. Change-Id: I114fc8edb9459592cab45c6726f9d946cf6d17d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615014 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Doug Horn <doughorn@google.com>
Jamie Madill f9729598 2022-04-28T16:36:50 Revert "Fix commit ID gathering on Android builds." This reverts commit 1835e5d895f7f75435c2eddf3f87a88ef534c237. Reason for revert: Breaks Skia integration in linkImpl. Original change's description: > Fix commit ID gathering on Android builds. > > Android infra does not store the .git directory alongside the > checked out code, instead using a gitdir directive to point > elsewhere. This caused the commit_id script to fail, which > could cause issues with disk-backed program caches on updates > when the serialization format changes. > > This CL also makes it a build failure to fail to get the commit id, > and removes the ANGLE_DISABLE_PROGRAM_BINARY_LOAD fallback (which > was broken anyway due to not being used anywhere). > > Bug: b/206109660 > Test: Run script on Android infra, verify hash is gathered properly. > Change-Id: Ie28dc9278b6fbd3dd4f09232c0a88d602fca6980 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3604710 > Commit-Queue: Doug Horn <doughorn@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: b/206109660 Change-Id: I64ac0831a46b9e1ff2e2738624650d67d0609f3c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615009 Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Doug Horn <doughorn@google.com>
Doug Horn 1835e5d8 2022-04-25T14:42:31 Fix commit ID gathering on Android builds. Android infra does not store the .git directory alongside the checked out code, instead using a gitdir directive to point elsewhere. This caused the commit_id script to fail, which could cause issues with disk-backed program caches on updates when the serialization format changes. This CL also makes it a build failure to fail to get the commit id, and removes the ANGLE_DISABLE_PROGRAM_BINARY_LOAD fallback (which was broken anyway due to not being used anywhere). Bug: b/206109660 Test: Run script on Android infra, verify hash is gathered properly. Change-Id: Ie28dc9278b6fbd3dd4f09232c0a88d602fca6980 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3604710 Commit-Queue: Doug Horn <doughorn@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d8c18ac6 2021-10-08T13:00:19 Re-land: "Isolate commit_id.h from other code." Re-land limits the angle_version deps to Windows to fix an iOS visibility rule violation in GN. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I033f00ec7afe4bfd01e29e0eea8848eea27747a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233899 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7defdb60 2021-10-19T14:07:07 Revert "Isolate commit_id.h from other code." This reverts commit 6d7ebf656d06f1152967aa5f4457d3787a24732c. Reason for revert: Suspected reason for failing ANGLE roll into Chromium Original change's description: > Isolate commit_id.h from other code. > > Instead of recompiling multiple source files, we can seal off the > files that include commit_id to prevent recompilations when the > commit changes and source files don't change. > > Bug: angleproject:2551 > Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: angleproject:2551 Bug: angleproject:6588 Change-Id: I19f41141f57d0683efb9a4ec043e078a9f7dc925 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226056 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 6d7ebf65 2021-10-08T13:00:19 Isolate commit_id.h from other code. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>