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

Gpu driven 3rd #16400

Merged
merged 16 commits into from
Oct 11, 2023
Merged

Gpu driven 3rd #16400

merged 16 commits into from
Oct 11, 2023

Conversation

stanleyljl
Copy link
Contributor

@stanleyljl stanleyljl commented Oct 10, 2023

Re: #

Changelog

  • The 3rd stage of gpu driven

Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • 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.

stanleyljl and others added 15 commits October 10, 2023 16:49
* indirect barrier
* fg move

* remove dbg code

* indirect barrier

* remove dbg code

* first meet logic

* fix depth resource residency

* clear first hzb
* fix undefined
…ct buffer (#19)

* fg move

* remove dbg code

* indirect barrier

* remove dbg code

* first meet logic

* fix depth resource residency

* clear first hzb

* fix undefined

* explicit move access

* rg use access

* update rendergraph interface

* fix macro

* revert useResource interface

* compile issue & lint
@stanleyljl
Copy link
Contributor Author

@cocos-robot run test cases

@github-actions
Copy link

github-actions bot commented Oct 10, 2023

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -4578,8 +4578,9 @@
          * @zh 全局光照烘焙的配置,以前名称为lightmapSettings
          */
         bakeSettings: __private._cocos_3d_framework_mesh_renderer__ModelBakeSettings;
         protected _mesh: Mesh | null;
+        protected _gpuDrivenEnabled: boolean;
         protected _shadowCastingMode: number;
         protected _shadowReceivingMode: number;
         protected _shadowBias: number;
         protected _shadowNormalBias: number;
@@ -4630,8 +4631,14 @@
          */
         get mesh(): Mesh | null;
         set mesh(val: Mesh | null);
         /**
+         * @en Whether to enable GPU Driven.
+         * @zh 是否开启 GPU Driven 。
+         */
+        get gpuDrivenEnabled(): boolean;
+        set gpuDrivenEnabled(val: boolean);
+        /**
          * @en Gets the model in [[RenderScene]].
          * @zh 获取渲染场景 [[RenderScene]] 中对应的模型。
          */
         get model(): renderer.scene.Model | null;
@@ -4768,8 +4775,9 @@
         protected _updateShadowBias(): void;
         protected _updateShadowNormalBias(): void;
         protected _updateCastShadow(): void;
         protected _updateReceiveShadow(): void;
+        protected _updateGPUDrivenEnabled(): void;
         protected onMobilityChanged(): void;
         protected onLightProbeBakingChanged(): void;
         protected onUseLightProbeChanged(): void;
         protected onReflectionProbeChanged(): void;
@@ -11178,8 +11186,14 @@
                  */
                 get reflectionProbeBlendWeight(): number;
                 set reflectionProbeBlendWeight(val: number);
                 /**
+                 * @en Whether to enable GPU Driven.
+                 * @zh 是否开启 GPU Driven 。
+                 */
+                get gpuDrivenEnabled(): boolean;
+                set gpuDrivenEnabled(val: boolean);
+                /**
                  * @en The type of the model
                  * @zh 模型类型
                  */
                 type: ModelType;
@@ -11329,8 +11343,13 @@
                  * @zh 反射探针类型。
                  */
                 protected _reflectionProbeType: ReflectionProbeType;
                 /**
+                 * @en Whether to enable GPU Driven.
+                 * @zh 是否开启 GPU Driven 。
+                 */
+                protected _gpuDrivenEnabled: boolean;
+                /**
                  * @internal
                  * @en native object
                  * @zh 原生对象
                  */
@@ -13645,14 +13664,8 @@
              * @zh 删除所有模型。
              */
             removeModels(): void;
             /**
-             * Add a mesh to GPUScene.
-             * Only support in native.
-             * @internal
-             */
-            addGPUMesh(m: Mesh): void;
-            /**
              * @en Add a GPU Driven model, all models attached to the render scene will be submitted for rendering.
              * @zh 增加一个 GPU Driven 模型,渲染场景上挂载的所有模型都会被提交渲染。
              * @param m The model.
              */
@@ -35628,16 +35641,17 @@
             targetFirstSlice: number;
             targetPlaneSlice: number;
         }
         export class MovePair {
-            constructor(source?: string, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number);
+            constructor(source?: string, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number, possibleUsage?: gfx.AccessFlagBit);
             source: string;
             target: string;
             mipLevels: number;
             numSlices: number;
             targetMostDetailedMip: number;
             targetFirstSlice: number;
             targetPlaneSlice: number;
+            possibleUsage: gfx.AccessFlagBit;
         }
         export class PipelineStatistics {
             numRenderPasses: number;
             numManagedTextures: number;
@@ -36646,9 +36660,9 @@
              * @param camera @en camera of the culling pass @zh 剔除通道的摄像机
              * @param hzbName @en name of hierarchical z buffer @zh 层次深度缓存的名字
              * @param light @en light of the culling pass @zh 剔除通道的灯光
              */
-            addBuiltinGpuCullingPass(cullingID: number, camera: renderer.scene.Camera, hzbName?: string, light?: renderer.scene.Light | null, bMainPass?: boolean): void;
+            addBuiltinGpuCullingPass(cullingID: number, camera: renderer.scene.Camera, layoutPath?: string, hzbName?: string, light?: renderer.scene.Light | null, level?: number, bMainPass?: boolean): void;
             /**
              * @en Add hierarchical z buffer generation pass
              * @zh 添加层次化深度缓存生成通道
              * @param sourceDepthStencilName @en name of source depth buffer @zh 来源深度缓存名字

@github-actions
Copy link

@stanleyljl, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
ios PASS PASS FAIL
mac PASS PASS FAIL object-group-image,puzzle,shield-node

@github-actions
Copy link

@stanleyljl, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS PASS
windows PASS PASS FAIL label-cacheMode,label-align,ttf-font
android PASS PASS PASS

@stanleyljl stanleyljl requested review from bluesky013, star-e and jk20012001 and removed request for bluesky013 October 10, 2023 13:37
@stanleyljl stanleyljl merged commit 4053bad into cocos:develop Oct 11, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants