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

[do not merge] V3.8.1 byd #16376

Closed
wants to merge 4 commits into from
Closed

[do not merge] V3.8.1 byd #16376

wants to merge 4 commits into from

Conversation

star-e
Copy link
Contributor

@star-e star-e commented Oct 9, 2023

Re: #

Changelog


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.

# Conflicts:
#	cocos/rendering/custom/executor.ts
#	cocos/rendering/custom/render-graph.ts
#	cocos/rendering/custom/web-pipeline.ts
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -8822,8 +8822,9 @@
             minDepth: number;
             maxDepth: number;
             constructor(left?: number, top?: number, width?: number, height?: number, minDepth?: number, maxDepth?: number);
             copy(info: Readonly<Viewport>): Viewport;
+            reset(): void;
         }
         export class Color {
             x: number;
             y: number;
@@ -8831,8 +8832,9 @@
             w: number;
             constructor(x?: number, y?: number, z?: number, w?: number);
             copy(info: Readonly<Color>): Color;
             set(x: number, y: number, z: number, w: number): Color;
+            reset(): void;
         }
         export class BindingMappingInfo {
             maxBlockCounts: number[];
             maxSamplerTextureCounts: number[];
@@ -9143,8 +9145,9 @@
         export class DescriptorSetLayoutInfo {
             bindings: DescriptorSetLayoutBinding[];
             constructor(bindings?: DescriptorSetLayoutBinding[]);
             copy(info: Readonly<DescriptorSetLayoutInfo>): DescriptorSetLayoutInfo;
+            reset(): void;
         }
         export class DescriptorSetInfo {
             layout: DescriptorSetLayout;
             constructor(layout?: DescriptorSetLayout);
@@ -35252,8 +35255,9 @@
             DRAW_INSTANCING = 2048,
             DRAW_NON_INSTANCING = 4096,
             REFLECTION_PROBE = 8192,
             GPU_DRIVEN = 16384,
+            NON_BUILTIN = 32768,
             ALL = 4294967295
         }
         export enum LightingMode {
             NONE = 0,
@@ -35275,10 +35279,12 @@
             FLOAT_TYPE = 1,
             INT_TYPE = 2
         }
         export class LightInfo {
-            constructor(light?: renderer.scene.Light | null, level?: number, culledByLight?: boolean);
+            constructor(light?: renderer.scene.Light | null, level?: number, culledByLight?: boolean, probe?: renderer.scene.ReflectionProbe | null);
+            reset(light?: renderer.scene.Light | null, level?: number, culledByLight?: boolean, probe?: renderer.scene.ReflectionProbe | null): void;
             light: renderer.scene.Light | null;
+            probe: renderer.scene.ReflectionProbe | null;
             level: number;
             culledByLight: boolean;
         }
         export enum DescriptorTypeOrder {
@@ -35293,18 +35299,21 @@
             INPUT_ATTACHMENT = 8
         }
         export class Descriptor {
             constructor(type?: gfx.Type);
+            reset(type?: gfx.Type): void;
             type: gfx.Type;
             count: number;
         }
         export class DescriptorBlock {
+            reset(): void;
             readonly descriptors: Map<string, Descriptor>;
             readonly uniformBlocks: Map<string, gfx.UniformBlock>;
             capacity: number;
             count: number;
         }
         export class DescriptorBlockFlattened {
+            reset(): void;
             readonly descriptorNames: string[];
             readonly uniformBlockNames: string[];
             readonly descriptors: Descriptor[];
             readonly uniformBlocks: gfx.UniformBlock[];
@@ -35325,16 +35334,18 @@
             STENCIL = 4
         }
         export class ResolvePair {
             constructor(source?: string, target?: string, resolveFlags?: ResolveFlags, mode?: gfx.ResolveMode, mode1?: gfx.ResolveMode);
+            reset(source?: string, target?: string, resolveFlags?: ResolveFlags, mode?: gfx.ResolveMode, mode1?: gfx.ResolveMode): void;
             source: string;
             target: string;
             resolveFlags: ResolveFlags;
             mode: gfx.ResolveMode;
             mode1: gfx.ResolveMode;
         }
         export class CopyPair {
             constructor(source?: string, target?: string, mipLevels?: number, numSlices?: number, sourceMostDetailedMip?: number, sourceFirstSlice?: number, sourcePlaneSlice?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number);
+            reset(source?: string, target?: string, mipLevels?: number, numSlices?: number, sourceMostDetailedMip?: number, sourceFirstSlice?: number, sourcePlaneSlice?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): void;
             source: string;
             target: string;
             mipLevels: number;
             numSlices: number;
@@ -35346,8 +35357,9 @@
             targetPlaneSlice: number;
         }
         export class UploadPair {
             constructor(source?: Uint8Array, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number);
+            reset(target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): void;
             readonly source: Uint8Array;
             target: string;
             mipLevels: number;
             numSlices: number;
@@ -35356,8 +35368,9 @@
             targetPlaneSlice: number;
         }
         export class MovePair {
             constructor(source?: string, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number);
+            reset(source?: string, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): void;
             source: string;
             target: string;
             mipLevels: number;
             numSlices: number;
@@ -35365,8 +35378,9 @@
             targetFirstSlice: number;
             targetPlaneSlice: number;
         }
         export class PipelineStatistics {
+            reset(): void;
             numRenderPasses: number;
             numManagedTextures: number;
             totalManagedTextures: number;
             numUploadBuffers: number;
@@ -35377,8 +35391,35 @@
             numFreeDescriptorSets: number;
             numInstancingBuffers: number;
             numInstancingUniformBlocks: number;
         }
+        export class RenderCommonObjectPoolSettings {
+            constructor(batchSize: number);
+            lightInfoBatchSize: number;
+            descriptorBatchSize: number;
+            descriptorBlockBatchSize: number;
+            descriptorBlockFlattenedBatchSize: number;
+            descriptorBlockIndexBatchSize: number;
+            resolvePairBatchSize: number;
+            copyPairBatchSize: number;
+            uploadPairBatchSize: number;
+            movePairBatchSize: number;
+            pipelineStatisticsBatchSize: number;
+        }
+        export class RenderCommonObjectPool {
+            constructor(settings: RenderCommonObjectPoolSettings);
+            reset(): void;
+            createLightInfo(light?: renderer.scene.Light | null, level?: number, culledByLight?: boolean, probe?: renderer.scene.ReflectionProbe | null): LightInfo;
+            createDescriptor(type?: gfx.Type): Descriptor;
+            createDescriptorBlock(): DescriptorBlock;
+            createDescriptorBlockFlattened(): DescriptorBlockFlattened;
+            createDescriptorBlockIndex(updateFrequency?: UpdateFrequency, parameterType?: ParameterType, descriptorType?: DescriptorTypeOrder, visibility?: gfx.ShaderStageFlagBit): DescriptorBlockIndex;
+            createResolvePair(source?: string, target?: string, resolveFlags?: ResolveFlags, mode?: gfx.ResolveMode, mode1?: gfx.ResolveMode): ResolvePair;
+            createCopyPair(source?: string, target?: string, mipLevels?: number, numSlices?: number, sourceMostDetailedMip?: number, sourceFirstSlice?: number, sourcePlaneSlice?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): CopyPair;
+            createUploadPair(target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): UploadPair;
+            createMovePair(source?: string, target?: string, mipLevels?: number, numSlices?: number, targetMostDetailedMip?: number, targetFirstSlice?: number, targetPlaneSlice?: number): MovePair;
+            createPipelineStatistics(): PipelineStatistics;
+        }
         /****************************************************************************
          Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd.
         
          http://www.cocos.com
@@ -35618,11 +35659,14 @@
             setBuiltinSphereLightConstants(light: renderer.scene.SphereLight, camera: renderer.scene.Camera): void;
             setBuiltinSpotLightConstants(light: renderer.scene.SpotLight, camera: renderer.scene.Camera): void;
             setBuiltinPointLightConstants(light: renderer.scene.PointLight, camera: renderer.scene.Camera): void;
             setBuiltinRangedDirectionalLightConstants(light: renderer.scene.RangedDirectionalLight, camera: renderer.scene.Camera): void;
-            setBuiltinDirectionalLightViewConstants(light: renderer.scene.DirectionalLight, level?: number): void;
-            setBuiltinSpotLightViewConstants(light: renderer.scene.SpotLight): void;
+            setBuiltinDirectionalLightFrustumConstants(camera: renderer.scene.Camera, light: renderer.scene.DirectionalLight, csmLevel?: number): void;
+            setBuiltinSpotLightFrustumConstants(light: renderer.scene.SpotLight): void;
         }
+        export interface SceneBuilder extends Setter {
+            useLightFrustum(light: renderer.scene.Light, csmLevel?: number, optCamera?: renderer.scene.Camera): void;
+        }
         /**
          * @en Render queue
          * A render queue is an abstraction of graphics commands submission.
          * Only when the graphics commands in a render queue are all submitted,
@@ -35639,11 +35683,9 @@
              * @param light @en Lighting information of the scene @zh 场景光照信息
              * @param sceneFlags @en Rendering flags of the scene @zh 场景渲染标志位
              */
             addSceneOfCamera(camera: renderer.scene.Camera, light: LightInfo, sceneFlags?: SceneFlags): void;
-            addScene(camera: renderer.scene.Camera, sceneFlags: SceneFlags, light?: renderer.scene.Light | null): void;
-            addSceneCulledByDirectionalLight(camera: renderer.scene.Camera, sceneFlags: SceneFlags, light: renderer.scene.DirectionalLight, level: number): void;
-            addSceneCulledBySpotLight(camera: renderer.scene.Camera, sceneFlags: SceneFlags, light: renderer.scene.SpotLight): void;
+            addScene(camera: renderer.scene.Camera, sceneFlags: SceneFlags, light?: renderer.scene.Light): SceneBuilder;
             /**
              * @en Render a full-screen quad.
              * @zh 渲染全屏四边形
              * @param material @en The material used for shading @zh 着色所需材质
@@ -35713,9 +35755,9 @@
              * @param slotName @en name of descriptor in the shader @zh 着色器中描述符的名字
              * @param sampler @en the sampler to use @zh 采样器名字
              * @param plane @en the image plane ID to sample (color|depth|stencil|video) @zh 需要采样的贴图平面(颜色|深度|模板|视频)
              */
-            addTexture(name: string, slotName: string, sampler?: gfx.Sampler | null, plane?: number): void;
+            addTexture(name: string, slotName: string, sampler?: gfx.Sampler, plane?: number): void;
             /**
              * @en Add render queue.
              * Every render queue has a hint type, such as NONE, OPAQUE, MASK or BLEND.
              * User should only add objects of this hint type to the render queue.
@@ -35844,9 +35886,9 @@
             addBuffer(name: string, size: number, flags: ResourceFlags, residency: ResourceResidency): number;
             updateBuffer(name: string, size: number): void;
             addExternalTexture(name: string, texture: gfx.Texture, flags: ResourceFlags): number;
             updateExternalTexture(name: string, texture: gfx.Texture): void;
-            addTexture(name: string, textureType: gfx.TextureType, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount, flags: ResourceFlags, residency: ResourceResidency): number;
+            addTexture(name: string, type: gfx.TextureType, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount, flags: ResourceFlags, residency: ResourceResidency): number;
             updateTexture(name: string, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount): void;
             addResource(name: string, dimension: ResourceDimension, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount, flags: ResourceFlags, residency: ResourceResidency): number;
             updateResource(name: string, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount): void;
             /**
@@ -35894,8 +35936,9 @@
              *
              * @param copyPairs @en Array of copy source and target @zh 拷贝来源与目标的数组
              */
             addCopyPass(copyPairs: CopyPair[]): void;
+            addBuiltinReflectionProbePass(camera: renderer.scene.Camera): void;
         }
         /**
          * @beta Feature is under development
          * @en Render subpass
@@ -35937,9 +35980,9 @@
              * @param slotName @en name of descriptor in the shader @zh 着色器中描述符的名字
              * @param sampler @en the sampler to use @zh 采样器名字
              * @param plane @en the image plane ID to sample (color|depth|stencil|video) @zh 需要采样的贴图平面(颜色|深度|模板|视频)
              */
-            addTexture(name: string, slotName: string, sampler?: gfx.Sampler | null, plane?: number): void;
+            addTexture(name: string, slotName: string, sampler?: gfx.Sampler, plane?: number): void;
             /**
              * @en Add storage buffer.
              * The buffer must have registered in pipeline.
              * @zh 添加存储缓冲,缓冲必须已注册。
@@ -36059,9 +36102,9 @@
              * @param slotName @en name of descriptor in the shader @zh 着色器中描述符的名字
              * @param sampler @en the sampler to use @zh 采样器名字
              * @param plane @en the image plane ID to sample (color|depth|stencil|video) @zh 需要采样的贴图平面(颜色|深度|模板|视频)
              */
-            addTexture(name: string, slotName: string, sampler?: gfx.Sampler | null, plane?: number): void;
+            addTexture(name: string, slotName: string, sampler?: gfx.Sampler, plane?: number): void;
             /**
              * @en Add storage buffer.
              * The buffer must have registered in pipeline.
              * @zh 添加存储缓冲,缓冲必须已注册。
@@ -36187,9 +36230,9 @@
              * @param slotName @en name of descriptor in the shader @zh 着色器中描述符的名字
              * @param sampler @en the sampler to use @zh 采样器名字
              * @param plane @en the image plane ID to sample (color|depth|stencil|video) @zh 需要采样的贴图平面(颜色|深度|模板|视频)
              */
-            addTexture(name: string, slotName: string, sampler?: gfx.Sampler | null, plane?: number): void;
+            addTexture(name: string, slotName: string, sampler?: gfx.Sampler, plane?: number): void;
             /**
              * @en Add storage buffer.
              * The buffer must have registered in pipeline.
              * @zh 添加存储缓冲,缓冲必须已注册。
@@ -36359,9 +36402,9 @@
              *
              * @param movePairs @en Array of move source and target @zh 移动来源与目标的数组
              */
             addMovePass(movePairs: MovePair[]): void;
-            addBuiltinGpuCullingPass(camera: renderer.scene.Camera, hzbName?: string, light?: renderer.scene.Light | null): void;
+            addBuiltinGpuCullingPass(camera: renderer.scene.Camera, hzbName?: string, light?: renderer.scene.Light): void;
             addBuiltinHzbGenerationPass(sourceDepthStencilName: string, targetHzbName: string): void;
             /**
              * @experimental
              */
@@ -36481,9 +36524,9 @@
         }
         export function getRTFormatBeforeToneMapping(ppl: rendering.BasicPipeline): gfx.Format;
         export function forceEnableFloatOutput(ppl: __private._cocos_rendering_custom_pipeline__PipelineRuntime): boolean;
         export function disablePostProcessForDebugView(): boolean;
-        export function getShadowMapSampler(): gfx.Sampler | null;
+        export function getShadowMapSampler(): gfx.Sampler | undefined;
         export abstract class BasePass {
             abstract name: string;
             effectName: string;
             _id: number;
@@ -64515,9 +64558,9 @@
             getMaterialDescriptorSetLayout(device: gfx.Device, phaseID: number, programName: string): gfx.DescriptorSetLayout;
             getLocalDescriptorSetLayout(device: gfx.Device, phaseID: number, programName: string): gfx.DescriptorSetLayout;
             getProgramInfo(phaseID: number, programName: string): renderer.IProgramInfo;
             getShaderInfo(phaseID: number, programName: string): gfx.ShaderInfo;
-            getProgramVariant(device: gfx.Device, phaseID: number, name: string, defines: renderer.MacroRecord, key?: string | null): _cocos_rendering_custom_private__ProgramProxy | null;
+            getProgramVariant(device: gfx.Device, phaseID: number, name: string, defines: renderer.MacroRecord, key?: string): _cocos_rendering_custom_private__ProgramProxy | null;
             getBlockSizes(phaseID: number, programName: string): number[];
             getHandleMap(phaseID: number, programName: string): Record<string, number>;
             getProgramID(phaseID: number, programName: string): number;
             getDescriptorNameID(name: string): number;

@star-e star-e closed this Nov 29, 2023
@star-e star-e deleted the v3.8.1-byd branch October 14, 2024 02:42
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.

1 participant