Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop merge v3.8.2 #16303

Merged
merged 65 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
442f740
macos 10.x -> 11+ api change (#16153)
hana-alice Aug 31, 2023
2b27581
post-final pass keep alpha channel (#16149)
troublemaker52025 Aug 31, 2023
4d21393
fix update widget occur error (#16139)
arsen2010 Aug 31, 2023
2b18d25
Add openharmony CI support (#16151)
dumganhar Aug 31, 2023
772bfce
fix web pipeline framebuffer resize issue. (#16157)
bluesky013 Sep 1, 2023
e2e4ceb
change shader strip (#16167)
star-e Sep 1, 2023
ba70fe1
fix bind cont EventData * bind, modify the address as a reference. (#…
Canvasfull Sep 1, 2023
70b7875
don`t destroy sub com when mask destroy (#16162)
LinYunMo Sep 1, 2023
692d3dc
fix debug view with custom pipeline and revert LDR fog to HDR (#16163)
jk20012001 Sep 1, 2023
eaeab8b
delete rangeddir / point light custom template form components.js (#1…
troublemaker52025 Sep 1, 2023
d2c3429
Refactor Openharmony platform code to support switching between napi …
dumganhar Sep 1, 2023
db10a26
Add openharmony CI support for v3.8.2 branch (#16170)
dumganhar Sep 1, 2023
48a5791
fix format validation. (#16177)
bluesky013 Sep 4, 2023
cdca5b0
Fix orientation does not work normaly on huawei-agc platform (#16180)
bofeng-song Sep 4, 2023
dc933d3
add experimental box2d wasm i18n (#16134)
lealzhan Sep 5, 2023
42ff683
Optimize and add test to Vec2.signedAngle (#16183)
shrinktofit Sep 5, 2023
fbbda83
update gitignore (#16187)
PPpro Sep 5, 2023
a45535e
fix getHDRInputName undefine with cyberpunk (#16192)
troublemaker52025 Sep 6, 2023
51dc67e
Fix an issue where node_modules was not removed when clearing the cac…
VisualSJ Sep 6, 2023
d198a19
[fix] box2d wasm rigid-body destroy() should destroy related shapes a…
lealzhan Sep 6, 2023
fc986c9
fix webgpu crash with normalize zero vector (#16195)
jk20012001 Sep 6, 2023
4b039cd
fixed #16190: Compilation errors if using Clang 15 with c++17 since s…
dumganhar Sep 6, 2023
50c2d70
update native/external-config: [fix] cct scaling causes trigger event…
lealzhan Sep 6, 2023
c6d1782
update world bound when update models (#16189)
moshuying Sep 6, 2023
23a44ed
Modify camera component ortho height's min value to 0 (#16181)
shrinktofit Sep 6, 2023
0b65ab3
add CULL_MESHOPT constant (#16194)
PPpro Sep 7, 2023
2cb1652
Add workflow_dispatch for oh sdk & vulkan sdk (#16204)
dumganhar Sep 7, 2023
2ed62f7
[v3.8.2] Add workflow_dispatch for oh sdk & vulkan sdk (#16206)
dumganhar Sep 7, 2023
7f7de0a
Add dirty flag to edit box (#16209)
LinYunMo Sep 7, 2023
4dbd525
fix sphere 2nd uv (#16210)
jk20012001 Sep 7, 2023
b57d5ab
Resolved error when getting length for Record type (#16213)
troublemaker52025 Sep 8, 2023
3822786
Fix SDL-related issues (#16212)
qiuguohua Sep 8, 2023
b46cba6
Fix/meshopt (#16200)
yiwenxue Sep 8, 2023
4c7d2ce
Fixed the problem of new pipeline don't clear reporting an error (#16…
GengineJS Sep 8, 2023
5545986
Merge branch 'v3.8.1' into v3.8.2-merge-v3.8.1
minggo Sep 8, 2023
3c0aaf5
fix debugView UBO data for native custom pipeline (#16218)
troublemaker52025 Sep 8, 2023
164aa24
[ci skip] Add android ndk cache for CI (#16224)
dumganhar Sep 8, 2023
dee8822
Merge pull request #16223 from minggo/v3.8.2-merge-v3.8.1
minggo Sep 8, 2023
91ce03d
webgpu update (#16184)
hana-alice Sep 8, 2023
df2ce56
cluster lighting logic & pass set update (#16197)
hana-alice Sep 8, 2023
3287aff
Add generate-emsdk-cache.yml (#16229)
dumganhar Sep 8, 2023
322875e
Enable gfx-webgpu ci by default and fix some warnings in gfx-webgpu c…
dumganhar Sep 8, 2023
794b8b3
Revert "Resolved error when getting length for Record type (#16213)" …
troublemaker52025 Sep 8, 2023
d7f90a3
Fix all warnings for gfx-webgpu and add condition control for webgpu …
dumganhar Sep 11, 2023
290746a
Fixed the problem of incorrect display position of the emulator. (#16…
qiuguohua Sep 11, 2023
8a6c212
update web pipeline for webgpu (#16207)
hana-alice Sep 11, 2023
2788ed6
update webgpu external config (#16243)
hana-alice Sep 11, 2023
cc2a1a8
fix recursive call (#16245)
hana-alice Sep 12, 2023
0e53dde
feat: support touch info query in input module (#16235)
PPpro Sep 13, 2023
ea8ca11
replace NodeEventType.SIBLING_ORDER_CHANGED with NodeEventType.CHILDR…
minggo Sep 13, 2023
f4aa7e9
update native/external-config v3.8.2-7 (#16256)
lealzhan Sep 14, 2023
608660a
Fixed multi-threading causing view read failure (#16253)
qiuguohua Sep 15, 2023
59c6afd
Optimize physics unit test (#16262)
shrinktofit Sep 15, 2023
5aecd91
revert invalid optimizations for global patches (#16241)
troublemaker52025 Sep 15, 2023
1ee3a59
skip batch when GFX Texture is null (#16273)
LinYunMo Sep 18, 2023
5682bbf
Use WebAssembly version libraries for unit testing (#16264)
shrinktofit Sep 19, 2023
c58cb54
Fix the issue of sensitive character filtering being fixed still lead…
bofeng-song Sep 19, 2023
dae0f55
fix albedoScaleAndCutOff type mismatch (#16282)
jk20012001 Sep 19, 2023
8366af4
[opt] physx mesh collider shrinkPositions() performance x50 (#16283)
lealzhan Sep 19, 2023
f7cf786
fix: gulp-build-h5-source (#16277)
PPpro Sep 20, 2023
d2d7623
Integration of outline and shadow to label (#16106)
LinYunMo Sep 20, 2023
aa60181
Merge branch 'v3.8.1' into v3.8.2-merge-v3.8.1
minggo Sep 20, 2023
2a44a31
Merge pull request #16290 from minggo/v3.8.2-merge-v3.8.1
minggo Sep 20, 2023
fca089c
Merge branch 'v3.8.2' into develop-merge-v3.8.2
minggo Sep 21, 2023
9c8bf6d
fix compiling error
minggo Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/native-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- name: Generate decorators
run: |
bash ./native/utils/generate_decorators.sh
Expand Down
183 changes: 153 additions & 30 deletions .github/workflows/native-compile-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- uses: actions/setup-java@v3
id: setup-jdk
with:
Expand Down Expand Up @@ -144,6 +145,7 @@ jobs:
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- uses: actions/setup-java@v3
id: setup-jdk
with:
Expand Down Expand Up @@ -206,6 +208,157 @@ jobs:
df -h
echo "Compile Android Debug Done!"

compile_openharmony:
name: "Openharmony"
if:
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download external libraries
shell: bash
run: |
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
- uses: actions/setup-java@v3
id: setup-jdk
with:
distribution: 'zulu'
java-version: '17'
- name: Get oh sdk cache directory path
id: oh-sdk-cache-dir-path
run: |
echo "cache dir: "
echo "dir=$HOME/openharmony" >> $GITHUB_OUTPUT

- name: Output cache dir
run: |
echo "Output cache dir: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}"

- name: Cache OH SDK
id: cache-oh-sdk
uses: actions/cache@v3
env:
cache-name: cache-oh-sdk-9
with:
path: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Add package.json
run: |
echo "{}" > package.json
echo "{\"name\": \"tests\",\"lockfileVersion\": 3,\"requires\": true,\"packages\": {}}" > package-lock.json
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'

- if: ${{ steps.cache-oh-sdk.outputs.cache-hit != 'true' }}
name: No Cache found, install oh sdk
continue-on-error: false
run: |
if [ ! -d "$HOME/openharmony" ]; then
mkdir -p $HOME/openharmony
echo "Download commandline-tools-linux.zip ..."
curl -o commandline-tools-linux.zip "https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/b1/v3/E6zhv5UFQ2-inIwNJhTN6Q/commandline-tools-linux-2.0.0.2.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074401Z&HW-CC-Expire=315360000&HW-CC-Sign=621224257B02079B1E76C0A56FDF21483400B1E3556213F88DC79BC9BE7D595D"
echo "Unzip commandline-tools-linux.zip ..."
unzip commandline-tools-linux.zip -d $HOME/openharmony > /dev/null
cd $HOME/openharmony
ls -l
cd command-line-tools
echo "=============== PATCHING sdkmanager/bin/sdkmgr file ==============="
sed -i "[email protected][email protected]=UTF-8 -Duser.country=CN@g" ./sdkmanager/bin/sdkmgr
cd bin
./sdkmgr list
echo "=============== INSTALL HOS toolchains:9 ==============="
./sdkmgr install toolchains:9 --accept-license > /dev/null
echo "=============== INSTALL OH SDK ets:9 ==============="
./sdkmgr install OpenHarmony/ets:9 --accept-license > /dev/null
echo "=============== INSTALL OH SDK js:9 ==============="
./sdkmgr install OpenHarmony/js:9 --accept-license > /dev/null
echo "=============== INSTALL OH SDK native:9 ==============="
./sdkmgr install OpenHarmony/native:9 --accept-license > /dev/null
echo "=============== INSTALL OH SDK toolchains:9 ==============="
./sdkmgr install OpenHarmony/toolchains:9 --accept-license > /dev/null
echo "=============== INSTALL OH SDK DONE ==============="
./sdkmgr list
fi

- name: Compile for Openharmony
run: |
which node
which npm
which java
node -v
npm -v
java --version
echo "=============== list files in oh sdk ($HOME/openharmony) ==============="
pushd $HOME/openharmony
ls -l
popd

NATIVE_ROOT=$GITHUB_WORKSPACE/native
echo "Compiling Openharmony ... "

cd $GITHUB_WORKSPACE/templates/openharmony

echo "message(STATUS \"hook before \${CC_TARGET_NAME}\")" >> Pre-Sample.cmake
echo "message(STATUS \"hook after \${CC_TARGET_NAME}\")" >> Post-Sample.cmake

mkdir -p build-oh/proj
touch build-oh/proj/cfg.cmake
echo "set(CC_USE_GLES3 ON)" >> build-oh/proj/cfg.cmake
echo "set(CC_USE_VULKAN OFF)" >> build-oh/proj/cfg.cmake
echo "set(CC_USE_GLES2 ON)" >> build-oh/proj/cfg.cmake
echo "set(USE_WEBSOCKET_SERVER OFF)" >> build-oh/proj/cfg.cmake
echo "set(CMAKE_CXX_STANDARD_REQUIRED ON)" >> build-oh/proj/cfg.cmake
echo "set(COCOS_X_PATH $NATIVE_ROOT)" >> build-oh/proj/cfg.cmake
echo "set(CC_EXECUTABLE_NAME \"\")" >> build-oh/proj/cfg.cmake
echo "set(USE_SE_V8 OFF)" >> build-oh/proj/cfg.cmake
echo "set(USE_SE_NAPI ON)" >> build-oh/proj/cfg.cmake

echo "=============== cat build-oh/proj/cfg.cmake ==============="
cat build-oh/proj/cfg.cmake

mkdir -p build-oh/assets

ASSET_DIR=$GITHUB_WORKSPACE/templates/openharmony/build-oh

echo "=============== HACK ./entry/build-profile.json5 ==============="
sed -i "s@[^-]DRES_DIR[^=]@$ASSET_DIR@g" ./entry/build-profile.json5
sed -i "s@[^-]DCOMMON_DIR[^=]@$GITHUB_WORKSPACE/templates/common@g" ./entry/build-profile.json5
# To speedup CI, compile arm64-v8a only
sed -i "s@\"armeabi-v7a\",@@g" ./entry/build-profile.json5

echo "entry/build-profile.json5: "
cat ./entry/build-profile.json5

echo "=============== HACK ./hvigor/hvigor-wrapper.js ==============="
sed -i "s@HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,\[\"install\"\]@HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,\[\"install\", \"--lockfile=false\"\]@g" ./hvigor/hvigor-wrapper.js

echo "=============== SET NPM OH REGISTRY ==============="
echo "@ohos:registry=https://repo.harmonyos.com/npm/" >> ~/.npmrc
npm config get @ohos:registry
npm config get registry

echo "=============== UPDATE local.properties ==============="
echo "nodejs.dir=/usr/bin" >> local.properties
echo "hwsdk.dir=$HOME/openharmony/hwsdk" >> local.properties

echo "=============== UPDATE ./hvigor/hvigor-config.json5 ==============="
echo "{\"hvigorVersion\":\"3.0.2\",\"dependencies\":{\"@ohos/hvigor-ohos-plugin\":\"3.0.2\"}}" > ./hvigor/hvigor-config.json5

echo "=============== Do not import game.ts for cocos_worker.ts ==============="
sed -i '/<% if(!useV8) { %>/,/<% } %>/d' ./entry/src/main/ets/workers/cocos_worker.ts

echo "=============== EXECUTE hvigorw ==============="
./hvigorw clean -i
./hvigorw --stop-daemon -i
./hvigorw assembleHap -p debuggable=true --no-daemon -d
#./hvigorw default@ProcessLibs -p debuggable=true --no-daemon -d
echo "=============== EXECUTE hvigorw DONE ==============="


compile_mac_x86_64:
name: "MacOS x86_64"
if:
Expand Down Expand Up @@ -359,33 +512,3 @@ jobs:
cmake --build . --config Debug -- -jobs $NUM_OF_CORES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
fi
echo "Compile iOS Done!"

compile_wgpu_mac:
name: "Emscripten"
runs-on: macos-latest
if: contains( github.event.pull_request.title, 'WGPU_CI_ON' )
steps:
- uses: actions/checkout@v2
- name: Download external libraries
shell: bash
run: |
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
- name: Setup Emscripten
run: |
NATIVE_ROOT=$GITHUB_WORKSPACE/native
git clone https://github.com/emscripten-core/emsdk.git NATIVE_ROOT/../../emsdk
cd NATIVE_ROOT/../../emsdk
./emsdk install 3.1.17
./emsdk activate 3.1.17
source ./emsdk_env.sh
emcc -v
- name: Compile
env:
COCOS_ENGINE_DEV: 1
run: |
NATIVE_ROOT=$GITHUB_WORKSPACE/native
cd $NATIVE_ROOT/cocos/renderer/gfx-wgpu
$NATIVE_ROOT/../../emsdk/upstream/emscripten/emcmake cmake .
$NATIVE_ROOT/../../emsdk/upstream/emscripten/emmake make
echo "Compile WGPU by ems on MacOS Done!"
66 changes: 66 additions & 0 deletions .github/workflows/native-compile-webgpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: <Native> Compile WebGPU

on:
pull_request:
paths:
- 'native/external-config.json'
- 'native/cocos/base/**'
- 'native/cocos/renderer/gfx-base/**'
- 'native/cocos/renderer/gfx-wgpu/**'
- 'native/cocos/renderer/gfx-validator/**'
- 'native/cocos/renderer/gfx-empty/**'
- '.github/workflows/native-compile-webgpu.yml'

# github.head_ref is only defined on pull_request events
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
compile_wgpu:
if:
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration'))
name: "Emscripten"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Download external libraries
shell: bash
run: |
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external

- name: Setup emsdk
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846
with:
version: 3.1.45
actions-cache-folder: 'emsdk-cache'

- name: Verify
run: |
which emcc
emcc -v

- name: Install ninja
run: |
if ! command -v ninja &> /dev/null; then
echo "Ninja not found, installing..."
# sudo apt update
sudo apt install ninja-build
else
echo "Ninja is already installed."
fi
which ninja

- name: Compile
# env:
# COCOS_ENGINE_DEV: 1
run: |
NATIVE_ROOT=$GITHUB_WORKSPACE/native
cd $NATIVE_ROOT/cocos/renderer/gfx-wgpu
mkdir build
cd build
cmake .. -GNinja -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Debug
ninja
echo "============== Compile WGPU by ems on Ubuntu Done! =============="
1 change: 1 addition & 0 deletions .github/workflows/native-linter-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- name: Get changed files
uses: PatriceJiang/paths-filter@master
id: listchanged
Expand Down
6 changes: 6 additions & 0 deletions cc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,12 @@
"type": "boolean",
"value": false,
"internal": true
},
"CULL_MESHOPT": {
"comment": "An internal constant to indicate whether we cull the meshopt wasm module and asm.js module.",
"type": "boolean",
"value": true,
"internal": true
}
},

Expand Down
14 changes: 7 additions & 7 deletions cocos/2d/assembler/label/letter-font.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { js } from '../../../core';
import { Label, LabelOutline } from '../../components';
import { bmfontUtils } from './bmfontUtils';
import { shareLabelInfo, LetterAtlas, computeHash } from './font-utils';
import { shareLabelInfo, LetterAtlas, computeHash, LetterRenderTexture } from './font-utils';

const _atlasWidth = 1024;
const _atlasHeight = 1024;
Expand All @@ -39,20 +39,20 @@ export const letterFont = js.mixin(bmfontUtils, {
_shareAtlas = new LetterAtlas(_atlasWidth, _atlasHeight);
}

return _shareAtlas.getTexture();
return _shareAtlas.getTexture() as LetterRenderTexture | null;
},

_updateFontFamily (comp) {
shareLabelInfo.fontAtlas = _shareAtlas;
shareLabelInfo.fontFamily = this._getFontFamily(comp);

// outline
const outline = comp.getComponent(LabelOutline);
if (outline && outline.enabled) {
const isOutlined = comp.enableOutline && comp.outlineWidth > 0;
if (isOutlined) {
shareLabelInfo.isOutlined = true;
shareLabelInfo.margin = outline.width;
shareLabelInfo.out = outline.color.clone();
shareLabelInfo.out.a = outline.color.a * comp.color.a / 255.0;
shareLabelInfo.margin = comp.outlineWidth;
shareLabelInfo.out = comp.outlineColor.clone();
shareLabelInfo.out.a = comp.outlineColor.color.a * comp.color.a / 255.0;
} else {
shareLabelInfo.isOutlined = false;
shareLabelInfo.margin = 0;
Expand Down
Loading