diff --git a/.github/actions/get-commit-msg/action.yml b/.github/actions/get-commit-msg/action.yml index 6aa41c8ea5..88e20ec84d 100644 --- a/.github/actions/get-commit-msg/action.yml +++ b/.github/actions/get-commit-msg/action.yml @@ -1,43 +1,53 @@ +# This action retrieves the latest commit message from a push or pull_request event +# and makes it available as an output variable named 'msg'. name: 'Get commit message' outputs: msg: value: ${{ steps.action_output.outputs.msg }} + hash: + value: ${{ steps.action_output.outputs.hash }} runs: using: "composite" steps: - name: Find commit message (on push) if: github.event_name == 'push' shell: bash + env: + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: | AUTHOR_NAME="${{ github.event.head_commit.author.name }}" AUTHOR_EMAIL="${{ github.event.head_commit.author.email }}" TSTAMP="${{ github.event.head_commit.timestamp }}" - echo "commit ${{ github.event.head_commit.id }}" >> /tmp/commit_msg.txt + HASH="${{ github.event.head_commit.id }}" + echo "commit $HASH" >> /tmp/commit_msg.txt echo "Author: ${AUTHOR_NAME}<${AUTHOR_EMAIL}>" >> /tmp/commit_msg.txt echo "Date: ${TSTAMP}" >> /tmp/commit_msg.txt echo "" >> /tmp/commit_msg.txt - echo "${{ github.event.head_commit.message }}" >> /tmp/commit_msg.txt + echo "$COMMIT_MESSAGE" >> /tmp/commit_msg.txt + echo "$HASH" > /tmp/commit_hash.txt - name: Find commit message (PR) shell: bash id: checkout_code if: github.event_name == 'pull_request' run: | - echo "+++++ head commit message +++++" - echo "$(git log -1 --no-merges)" - echo "+++++++++++++++++++++++++++++++" - echo "hash=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - git checkout ${{ github.event.pull_request.head.sha }} - echo "$(git log -1 --no-merges)" >> /tmp/commit_msg.txt + BEFORE_HASH=$(git rev-parse HEAD) + echo "hash=$BEFORE_HASH" >> "$GITHUB_OUTPUT" + # Next we will checkout the actual head (not the merge commits) of the PR + AFTER_HASH="${{ github.event.pull_request.head.sha }}" + git checkout $AFTER_HASH + COMMIT_MESSAGE=$(git log -1 --no-merges) + echo "$COMMIT_MESSAGE" > /tmp/commit_msg.txt + echo "$AFTER_HASH" > /tmp/commit_hash.txt - shell: bash id: action_output run: | + # Get the commit message DELIMITER="EOF_FILE_CONTENT_$(date +%s)" # Using timestamp to make it more unique echo "msg<<$DELIMITER" >> "$GITHUB_OUTPUT" cat /tmp/commit_msg.txt >> "$GITHUB_OUTPUT" echo "$DELIMITER" >> "$GITHUB_OUTPUT" - echo "----- got commit message ---" - cat /tmp/commit_msg.txt - echo "----------------------------" + # Get the commit hash + echo "hash=$(cat /tmp/commit_hash.txt)" >> "$GITHUB_OUTPUT" - name: Cleanup Find commit message (PR) shell: bash if: github.event_name == 'pull_request' diff --git a/.github/workflows/postsubmit.yml b/.github/workflows/postsubmit.yml index 9b1f02aa14..e3e4c36d89 100644 --- a/.github/workflows/postsubmit.yml +++ b/.github/workflows/postsubmit.yml @@ -23,7 +23,7 @@ jobs: GH_TOKEN: ${{ secrets.FILAMENTBOT_TOKEN }} run: | GOLDEN_BRANCH=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | python3 test/renderdiff/src/commit_msg.py) - COMMIT_HASH=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | head -n 1 | sed "s/commit //g") + COMMIT_HASH="${{ steps.get_commit_msg.outputs.hash }}" if [[ "${GOLDEN_BRANCH}" != "main" ]]; then git config --global user.email "filament.bot@gmail.com" git config --global user.name "Filament Bot" @@ -51,7 +51,7 @@ jobs: GH_TOKEN: ${{ secrets.FILAMENTBOT_TOKEN }} run: | bash docs_src/build/install_mdbook.sh && source ~/.bashrc - COMMIT_HASH=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | head -n 1 | sed "s/commit //g") + COMMIT_HASH="${{ steps.get_commit_msg.outputs.hash }}" git config --global user.email "filament.bot@gmail.com" git config --global user.name "Filament Bot" git config --global credential.helper cache diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 1d9b8df741..79a29fcbaf 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -108,8 +108,7 @@ jobs: uses: ./.github/actions/get-commit-msg - name: Check for manual edits to /docs run: | - COMMIT_ID=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | head -n 1 | sed "s/commit //g") - bash docs_src/build/presubmit_check.sh ${COMMIT_ID} + bash docs_src/build/presubmit_check.sh ${{ steps.get_commit_msg.outputs.hash }} test-renderdiff: name: test-renderdiff @@ -121,7 +120,7 @@ jobs: - uses: ./.github/actions/mac-prereq - uses: ./.github/actions/get-gltf-assets - uses: ./.github/actions/get-mesa - - uses: ./.github/actions/get-vulkan-sdk + - uses: ./.github/actions/get-vulkan-sdk - id: get_commit_msg uses: ./.github/actions/get-commit-msg - name: Prerequisites @@ -132,12 +131,14 @@ jobs: shell: bash - name: Render and compare id: render_compare + env: + COMMIT_MESSAGE: ${{ steps.get_commit_msg.outputs.msg }} run: | ls ./gltf/Models TEST_DIR=test/renderdiff source ${TEST_DIR}/src/preamble.sh start_ - GOLDEN_BRANCH=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | python3 ${TEST_DIR}/src/commit_msg.py) + GOLDEN_BRANCH=$(echo "${COMMIT_MESSAGE}" | python3 ${TEST_DIR}/src/commit_msg.py) bash ${TEST_DIR}/generate.sh && \ python3 ${TEST_DIR}/src/golden_manager.py \ --branch=${GOLDEN_BRANCH} \ diff --git a/BUILDING.md b/BUILDING.md index 5350cf65da..86d64decf1 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -391,7 +391,7 @@ Alternatively, if you have node installed you can use the [live-server](https://www.npmjs.com/package/live-server) package, which automatically refreshes the web page when it detects a change. -Each sample app has its own handwritten html file. Additionally the server folder contains assets +Each sample app has its own handwritten html file. Additionally, the server folder contains assets such as meshes, textures, and materials. ## Running the native samples diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index f3e3dab315..f408ba3462 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -5,8 +5,4 @@ **If you are cherry-picking a commit into an rc/ branch**: add the release note under the appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). -- filamat: Removed a dependency on Glslang's deprecated SPIR-V remapper. - The functionality is already implemented by calling the CanonicalizeIds pass - in the SPIRV-Tools, and should be a non-functional change. - ## Release notes for next branch cut diff --git a/README.md b/README.md index 8f513f40f8..863723398f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation 'com.google.android.filament:filament-android:1.65.4' + implementation 'com.google.android.filament:filament-android:1.66.0' } ``` @@ -51,7 +51,7 @@ Here are all the libraries available in the group `com.google.android.filament`: iOS projects can use CocoaPods to install the latest release: ```shell -pod 'Filament', '~> 1.65.4' +pod 'Filament', '~> 1.66.0' ``` ## Documentation diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index af744d87cc..d5d43bb775 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,12 @@ A new header is inserted each time a *tag* is created. Instead, if you are authoring a PR for the main branch, add your release note to [NEW_RELEASE_NOTES.md](./NEW_RELEASE_NOTES.md). +## v1.66.1 + +- filamat: Removed a dependency on Glslang's deprecated SPIR-V remapper. + The functionality is already implemented by calling the CanonicalizeIds pass + in the SPIRV-Tools, and should be a non-functional change. + ## v1.66.0 - materials: include default values of spec constants in material metadata [⚠️ **Recompile Materials**] diff --git a/android/filament-android/src/main/cpp/Renderer.cpp b/android/filament-android/src/main/cpp/Renderer.cpp index 93b685427d..2a2659cece 100644 --- a/android/filament-android/src/main/cpp/Renderer.cpp +++ b/android/filament-android/src/main/cpp/Renderer.cpp @@ -208,3 +208,19 @@ Java_com_google_android_filament_Renderer_nSetVsyncTime(JNIEnv *, jclass, Renderer *renderer = (Renderer *) nativeRenderer; renderer->setVsyncTime(steadyClockTimeNano); } + +extern "C" +JNIEXPORT void JNICALL +Java_com_google_android_filament_Renderer_nSkipNextFrames(JNIEnv *, jclass , + jlong nativeRenderer, jint frameCount) { + Renderer *renderer = (Renderer *) nativeRenderer; + renderer->skipNextFrames(frameCount); +} + +extern "C" +JNIEXPORT jint JNICALL +Java_com_google_android_filament_Renderer_nGetFrameToSkipCount(JNIEnv *, jclass , + jlong nativeRenderer) { + Renderer *renderer = (Renderer *) nativeRenderer; + return renderer->getFrameToSkipCount(); +} diff --git a/android/filament-android/src/main/java/com/google/android/filament/Renderer.java b/android/filament-android/src/main/java/com/google/android/filament/Renderer.java index 3f2821794e..2424b7b852 100644 --- a/android/filament-android/src/main/java/com/google/android/filament/Renderer.java +++ b/android/filament-android/src/main/java/com/google/android/filament/Renderer.java @@ -732,6 +732,22 @@ public class Renderer { nResetUserTime(getNativeObject()); } + /** + * Requests the next frameCount frames to be skipped. For Debugging. + * @param frameCount number of frames to skip. + */ + public void skipNextFrames(int frameCount) { + nSkipNextFrames(getNativeObject(), frameCount); + } + + /** + * Remainder count of frame to be skipped + * @return remaining frames to be skipped + */ + public int getFrameToSkipCount() { + return nGetFrameToSkipCount(getNativeObject()); + } + public long getNativeObject() { if (mNativeObject == 0) { throw new IllegalStateException("Calling method on destroyed Renderer"); @@ -773,4 +789,7 @@ public class Renderer { float interval, float headRoomRatio, float scaleRate, int history); private static native void nSetClearOptions(long nativeRenderer, float r, float g, float b, float a, boolean clear, boolean discard); + + private static native void nSkipNextFrames(long nativeObject, int frameCount); + private static native int nGetFrameToSkipCount(long nativeObject); } diff --git a/android/gradle.properties b/android/gradle.properties index 19dff5b6e0..e1df6f0717 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.google.android.filament -VERSION_NAME=1.65.4 +VERSION_NAME=1.66.0 POM_DESCRIPTION=Real-time physically based rendering engine for Android. diff --git a/docs/dup/building.html b/docs/dup/building.html index c1b4074d14..cfcd89a1c2 100644 --- a/docs/dup/building.html +++ b/docs/dup/building.html @@ -434,7 +434,7 @@ to create a quick localhost server:

Alternatively, if you have node installed you can use the live-server package, which automatically refreshes the web page when it detects a change.

-

Each sample app has its own handwritten html file. Additionally the server folder contains assets +

Each sample app has its own handwritten html file. Additionally, the server folder contains assets such as meshes, textures, and materials.

Running the native samples

The samples/ directory contains several examples of how to use Filament with SDL2.

diff --git a/docs/dup/intro.html b/docs/dup/intro.html index 51847f6a61..6488020b70 100644 --- a/docs/dup/intro.html +++ b/docs/dup/intro.html @@ -181,7 +181,7 @@ important for matc (material compiler).

} dependencies { - implementation 'com.google.android.filament:filament-android:1.65.4' + implementation 'com.google.android.filament:filament-android:1.66.0' }

Here are all the libraries available in the group com.google.android.filament:

@@ -196,7 +196,7 @@ dependencies {

iOS

iOS projects can use CocoaPods to install the latest release:

-
pod 'Filament', '~> 1.65.4'
+
pod 'Filament', '~> 1.66.0'
 

Documentation