fixed 3d-tasks/18423: Rendering is not correct on VK backend.
Async tasks must be executed after present.
Re: https://github.com/cocos/3d-tasks/issues/18423
Changelog
Continuous Integration
This pull request:
- [ ] needs automatic test cases check.
Manual trigger with
@cocos-robot run test casesafterward. - [ ] does not change any runtime related code or build configuration
If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.
Compatibility Check
This pull request:
- [ ] changes public API, and have ensured backward compatibility with deprecated features.
- [ ] affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
- [ ] affects file structure of the build package or build configuration which requires user project upgrade.
- [ ] introduces breaking changes, please list all changes, affected features and the scope of violation.
Greptile Summary
The changes in this pull request address rendering issues on the Vulkan backend by ensuring that asynchronous tasks are executed after the present operation.
- Added
cc::Root::AfterPresentevent in/native/cocos/core/Root.h. - Emitted
AfterPresentevent after_device->present();in/native/cocos/core/Root.cpp. - Added
AfterPresentevent listener injs_root_registerListenersfunction in/native/cocos/bindings/manual/jsb_scene_manual.cpp.
Interface Check Report
This pull request does not change any public interfaces !
@cocos-robot run test cases
@dumganhar, Please check the result of run test cases:
- Test Platform: PR-Test
- Editor Version: v3.8.4
- Task Result: PASS
- Task URL: https://cctest.cocos.org/#/reportview/PR-TEST/4da92f76-9b88-41fa-8cb7-b2e2b9720f28/-1
- GitHub Action: https://github.com/cocos/cocos-engine/actions/runs/10346478389
Task Details
@dumganhar, Please check the result of run test cases:
- Test Platform: PR-Test
- Editor Version: v3.8.4
- Task Result: PASS
- Task URL: https://cctest.cocos.org/#/reportview/PR-TEST/4010c5ba-ce5a-4e80-bec3-d9f62ffb1b9b/-1
- GitHub Action: https://github.com/cocos/cocos-engine/actions/runs/10346478389