Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2ae9b41
update effect meta files to 1.7.0
hana-alice Apr 10, 2023
456da50
Merge branch 'v3.7.3' of github.com:cocos/cocos-engine into __editor__
hana-alice Apr 13, 2023
6ae5f1e
status logic
hana-alice Apr 13, 2023
7de2f9d
subpass status
hana-alice Apr 13, 2023
5e6092e
Merge branch 'v3.7.3' of github.com:cocos/cocos-engine into __editor__
hana-alice Apr 14, 2023
0997e32
addRenderTexture support for offscr-imported texture
hana-alice Apr 17, 2023
9ea3d70
subpass
hana-alice Apr 18, 2023
57cc34a
subpass deps
Apr 18, 2023
1f20550
subpass
hana-alice Apr 20, 2023
3242559
subpass
hana-alice Apr 21, 2023
68370c4
subpass
Apr 22, 2023
c0dfb37
inst offset
hana-alice Apr 23, 2023
697be2d
layout
hana-alice Apr 23, 2023
4996d65
webgl inst offset
hana-alice Apr 24, 2023
365195a
Revert "webgl inst offset"
hana-alice Apr 25, 2023
8d51f96
Revert "inst offset"
hana-alice Apr 25, 2023
6b082ea
subpass on cyberpunk
hana-alice Apr 25, 2023
095f7dc
Merge branch 'v3.7.3' of github.com:cocos/cocos-engine into __editor__
hana-alice Apr 25, 2023
6d010d8
remove dbg code
hana-alice Apr 25, 2023
8b34ea4
Update run_test_cases.yml (#14893)
shaoqiangcai Apr 25, 2023
c5a2900
fix latest
hana-alice Apr 25, 2023
efd402f
fix initial layout(WIP)
Apr 25, 2023
72df2f8
Merge branch 'v3.7.3_subpass' into v3.7.3-pipeline
hana-alice Apr 26, 2023
1ee1b0c
[Bug] store editing-material data add fault-tolerant (#14921)
arsen2010 Apr 26, 2023
db0122c
revert change from last PR in asset.js (#14923)
arsen2010 Apr 26, 2023
b6921fb
fix all the layout issue
hana-alice Apr 26, 2023
0993676
fix passIdx warn message (#14934)
jk20012001 Apr 27, 2023
16e0f7a
fix high frameRate screen use 60 framerate and refine logic (#14894)
novain1102 Apr 27, 2023
bd43f18
fix:webxr camera's position not need tracking when choose rotation on…
oahc09 Apr 27, 2023
450a1c4
fix planar shadow missing with instancing (#14941)
troublemaker52025 Apr 27, 2023
ea55e3e
hide misleading webgl error messages (#14940)
hana-alice Apr 27, 2023
4a183b1
Fix exception in material uniform animation binding (#14764)
shrinktofit Apr 28, 2023
e07e28d
Combine multiple passes in CMS into a single pass. (#120)
GengineJS Apr 28, 2023
5b87103
refactoring pipeline
star-e Apr 28, 2023
e9ce37c
Setter add set camera
star-e Apr 28, 2023
ffc5285
Merge branch 'v3.7.3' into v3.7.3-pipeline
star-e Apr 28, 2023
75380b7
refactor interface
star-e Apr 28, 2023
0ba1ac6
shader subpass input index
May 1, 2023
aff5a54
remove implicit aliasing
May 2, 2023
d827a86
lint
hana-alice May 4, 2023
c7d05d8
gl compile fix
hana-alice May 4, 2023
881e8dd
add covariant
star-e May 4, 2023
df41b93
refactor clear value type
star-e May 4, 2023
54481df
metal subpass intel & apple gpu
hana-alice May 4, 2023
e1288b0
addStorageBuffer updated
star-e May 5, 2023
7af2a24
remove scene transversal
star-e May 5, 2023
5b189ae
fix lint
star-e May 5, 2023
b5251d2
fix copy
star-e May 5, 2023
ee08cf1
simplify web pipeline
star-e May 5, 2023
4707c21
add pipeline type
star-e May 5, 2023
715c217
fix gl
hana-alice May 5, 2023
c27e880
Merge branch 'v3.7.3-pipeline' of github.com:star-e/cocos-engine into…
hana-alice May 5, 2023
7e67fb0
fix unit test
May 5, 2023
ac00de7
Merge branch 'v3.7.3-pipeline' of github.com:star-e/cocos-engine into…
May 5, 2023
df50341
missing sync
May 5, 2023
52f0c9b
zero-length array reduce protect
May 5, 2023
310ab69
Merge branch 'v3.7.3-pipeline_subpass' of github.com:hana-alice/engin…
hana-alice May 6, 2023
57c6211
lint
hana-alice May 6, 2023
c4d2001
Merge remote-tracking branch 'lz/v3.7.3-hw' into v3.7.3-pipeline_subpass
hana-alice May 6, 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
65 changes: 48 additions & 17 deletions .github/workflows/run_test_cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ jobs:
shell: bash
run: |
set -x
AUTOTEST_VERSION="v3.7"
TEST_PROJECTS_EXTERNAL="../../cocos-test-projects"
CCTEST_PLUGINS="../../TestAction"
AUTOTEST_VERSION=`echo ${{ steps.parse_pr.outputs.pr_base_ref }} | cut -b -4`
TEST_PROJECTS_EXTERNAL="E:/pr-test/cocos-test-projects"
CCTEST_PLUGINS="E:/pr-test/TestPlugin"
if [ ! -d $TEST_PROJECTS_EXTERNAL ]; then
mkdir -p $TEST_PROJECTS_EXTERNAL
git clone https://github.com/cocos/cocos-test-projects.git $TEST_PROJECTS_EXTERNAL
Expand All @@ -118,9 +118,7 @@ jobs:
git -C $TEST_PROJECTS_EXTERNAL checkout origin/$AUTOTEST_VERSION
git -C $TEST_PROJECTS_EXTERNAL pull origin $AUTOTEST_VERSION --allow-unrelated-histories
rm -rf $TEST_PROJECTS_EXTERNAL/extensions/automation-framework
7z x -y $CCTEST_PLUGINS/*.zip -o $TEST_PROJECTS_EXTERNAL/extensions/automation-framework


7z x -y $CCTEST_PLUGINS/*.zip -o$TEST_PROJECTS_EXTERNAL/extensions/automation-framework
macOS-RunTestCases:
if: |
contains(github.event.pull_request.body, '[X] needs automatic test cases check') ||
Expand Down Expand Up @@ -166,7 +164,6 @@ jobs:
echo "${{ steps.parse_pr.outputs.pr_head_sha }}"
echo "${{ steps.parse_pr.outputs.pr_base_ref }}"
echo "${{ steps.parse_pr.outputs.pr_base_sha }}"

- name: Checkout engine
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -218,9 +215,9 @@ jobs:
shell: bash
run: |
set -x
AUTOTEST_VERSION="v3.7"
AUTOTEST_VERSION=`echo ${{ steps.parse_pr.outputs.pr_base_ref }} | cut -b -4`
TEST_PROJECTS_EXTERNAL="../../cocos-test-projects"
CCTEST_PLUGINS="../../TestAction"
CCTEST_PLUGINS="../../TestPlugin"
if [ ! -d $TEST_PROJECTS_EXTERNAL ]; then
mkdir -p $TEST_PROJECTS_EXTERNAL
git clone https://github.com/cocos/cocos-test-projects.git $TEST_PROJECTS_EXTERNAL
Expand All @@ -233,21 +230,55 @@ jobs:
git -C $TEST_PROJECTS_EXTERNAL pull origin $AUTOTEST_VERSION --allow-unrelated-histories
rm -rf $TEST_PROJECTS_EXTERNAL/extensions/automation-framework
unzip -oq $CCTEST_PLUGINS/*.zip -d $TEST_PROJECTS_EXTERNAL/extensions/automation-framework

Creator-PR-RunTestCases:
runs-on: self-hosted-mac
needs: [macOS-RunTestCases, Win-RunTestCases]
steps:
- name: Get PR Number
id: get_pr
shell: pwsh
run: |
if ("${{ github.event_name }}" -eq "issue_comment") {
Write-Host "::set-output name=pr_number::${{ github.event.issue.number }}"
}
else {
Write-Host "::set-output name=pr_number::${{ github.event.pull_request.number }}"
}
- name: Get PR Details
id: pr_deatils
uses: octokit/[email protected]
with:
route: GET /repos/cocos/cocos-engine/pulls/${{ steps.get_pr.outputs.pr_number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Parse Pull Request
id: parse_pr
shell: pwsh
run: |
$pull_request = @"
${{ steps.pr_deatils.outputs.data }}
"@ | ConvertFrom-Json
Write-Host $pull_request
Write-Host "::set-output name=pr_html_url::$($pull_request.html_url)"
Write-Host "::set-output name=pr_author::$($pull_request.user.login)"
Write-Host "::set-output name=pr_head_ref::$($pull_request.head.ref)"
Write-Host "::set-output name=pr_head_sha::$($pull_request.head.sha)"
Write-Host "::set-output name=pr_base_ref::$($pull_request.base.ref)"
Write-Host "::set-output name=pr_base_sha::$($pull_request.base.sha)"
- name: Check Job Parameter
run: |
echo "${{ steps.parse_pr.outputs.pr_head_ref }}"
echo "${{ steps.parse_pr.outputs.pr_head_sha }}"
echo "${{ steps.parse_pr.outputs.pr_base_ref }}"
echo "${{ steps.parse_pr.outputs.pr_base_sha }}"
- name: Run test cases
timeout-minutes: 90
id: run_test_cases
run: |
sed -x
node ../../test-projects/extensions/automation-framework/node_modules/@cctest/scheduler/dist/cli.js cicd -p PR-TEST -v ${{ steps.parse_pr.outputs.pr_base_ref }} -r test-cctest.cocos.org
JOBID='cat ../../test-projects/extensions/automation-framework/node_modules/@cctest/scheduler/logs/PR-TEST/nowJobId.log'
scheduler cicd -p PR-TEST -v ${{ steps.parse_pr.outputs.pr_base_ref }} -g PR-TEST -r cctest.cocos.org
JOBID=`cat /usr/local/lib/node_modules/@cctest/scheduler/logs/PR-TEST/nowJobId.log`
cd ..
python3 -u ./python/main.py -target=job_result --jobid=$JOBID

python3 -u ./python/main.py --target=job_editor --jobid=$JOBID
- name: Update Comment
uses: peter-evans/create-or-update-comment@v1
with:
Expand All @@ -256,8 +287,8 @@ jobs:
@${{ steps.parse_pr.outputs.pr_author }}, Please check the result of `run test cases`:
- Test Platform: PR-Test
- Editor Version: ${{ steps.run_test_cases.outputs.editor }}
# - Task Result: ${{ steps.run_test_cases.outputs.task }}
# - Task URL: ${{ steps.run_test_cases.outputs.url }}
- Task Result: ${{ steps.run_test_cases.outputs.status }}
- Task URL: http://cctest.cocos.org/#/reportview/PR-TEST/${{ steps.run_test_cases.outputs.jobid }}/-1
- GitHub Action: https://github.com/cocos/cocos-engine/actions/runs/${{ github.run_id }}
## Task Details
${{ steps.run_test_cases.outputs.report }}
16 changes: 16 additions & 0 deletions EngineErrorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,22 @@ Previous error occurred when instantiating animation clip %s on node %s.

'%s' is not found from '%s'. It's specified as the root node to play animation clip '%s'.

### 3940

Error when animation attempted to bind material uniform target: target %s is not a material.

### 3941

Error when animation attempted to bind material uniform target: material %s has no recorded pass %s.

### 3942

Error when animation attempted to bind material uniform target: material %s at pass %s has no recorded uniform %s.

### 3943

Error when animation attempted to bind material uniform target: material %s at pass %s's uniform %s has no recorded channel %s.

### 4000

<!-- DEPRECATED -->
Expand Down
3 changes: 3 additions & 0 deletions cocos/animation/tracks/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ export class TrackBinding {
return null;
}
const runtimeProxy = proxy.forTarget(resultTarget);
if (!runtimeProxy) {
return null;
}
const binding: RuntimeBinding = {
setValue: (value) => {
runtimeProxy.set(value);
Expand Down
37 changes: 28 additions & 9 deletions cocos/animation/value-proxy-factories/uniform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { deviceManager, Type } from '../../gfx';
import { Pass } from '../../render-scene/core/pass';
import { getDefaultFromType, getStringFromType } from '../../render-scene/core/pass-utils';
import { IValueProxy, IValueProxyFactory } from '../value-proxy';
import { warn } from '../../core';
import { warn, warnID } from '../../core';

/**
* @en
Expand Down Expand Up @@ -73,19 +73,38 @@ export class UniformProxyFactory implements IValueProxyFactory {
this.uniformName = uniformName || '';
}

public forTarget (target: Material): IValueProxy {
const pass = target.passes[this.passIndex];
const handle = pass.getHandle(this.uniformName);
public forTarget (target: unknown): IValueProxy | undefined {
if (!(target instanceof Material)) {
warnID(3940, target);
return undefined;
}

const {
passIndex,
uniformName,
channelIndex,
} = this;

if (passIndex < 0 || passIndex >= target.passes.length) {
warnID(3941, target.name, passIndex);
return undefined;
}

const pass = target.passes[passIndex];
const handle = pass.getHandle(uniformName);
if (!handle) {
throw new Error(`Material "${target.name}" has no uniform "${this.uniformName}"`);
warnID(3942, target.name, passIndex, uniformName);
return undefined;
}

const type = Pass.getTypeFromHandle(handle);
if (type < Type.SAMPLER1D) {
const realHandle = this.channelIndex === undefined ? handle : pass.getHandle(this.uniformName, this.channelIndex, Type.FLOAT);
const realHandle = channelIndex === undefined ? handle : pass.getHandle(uniformName, channelIndex, Type.FLOAT);
if (!realHandle) {
throw new Error(`Uniform "${this.uniformName} (in material ${target.name}) has no channel ${this.channelIndex!}"`);
warnID(3943, target.name, passIndex, uniformName, channelIndex);
return undefined;
}
if (isUniformArray(pass, this.uniformName)) {
if (isUniformArray(pass, uniformName)) {
return {
set: (value: any) => {
pass.setUniformArray(realHandle, value);
Expand All @@ -99,7 +118,7 @@ export class UniformProxyFactory implements IValueProxyFactory {
};
} else {
const binding = Pass.getBindingFromHandle(handle);
const prop = pass.properties[this.uniformName];
const prop = pass.properties[uniformName];
const texName = prop && prop.value ? `${prop.value as string}${getStringFromType(prop.type)}` : getDefaultFromType(prop.type) as string;
let dftTex = builtinResMgr.get<TextureBase>(texName);
if (!dftTex) {
Expand Down
4 changes: 3 additions & 1 deletion cocos/animation/value-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export interface IValueProxyFactory {
* @zh
* 返回指定目标的曲线值代理。
* @param target The target acquiring the value proxy.
* @returns The value proxy, or undefined if the proxy could not be created.
* In later case, a warn should be given before returning.
*/
forTarget (target: any): IValueProxy;
forTarget (target: any): IValueProxy | undefined;
}
2 changes: 1 addition & 1 deletion cocos/asset/assets/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export class Material extends Asset {
if (name in props) { return props[name]; }
}
} else {
if (passIdx >= this._props.length) { console.warn(`illegal pass index: ${passIdx}.`); return null; }
if (passIdx >= this._passes.length) { console.warn(`illegal pass index: ${passIdx}.`); return null; }
const props = this._props[this._passes[passIdx].propertyIndex];
if (name in props) { return props[name]; }
}
Expand Down
16 changes: 4 additions & 12 deletions cocos/gfx/base/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1581,24 +1581,16 @@ export class SubpassDependency {
public srcSubpass: number = 0,
public dstSubpass: number = 0,
public generalBarrier: GeneralBarrier = null!,
public bufferBarriers: BufferBarrier = null!,
public buffers: Buffer = null!,
public bufferBarrierCount: number = 0,
public textureBarriers: TextureBarrier = null!,
public textures: Texture = null!,
public textureBarrierCount: number = 0,
public prevAccesses: AccessFlags[] = [AccessFlagBit.NONE],
public nextAccesses: AccessFlags[] = [AccessFlagBit.NONE],
) {}

public copy (info: Readonly<SubpassDependency>) {
this.srcSubpass = info.srcSubpass;
this.dstSubpass = info.dstSubpass;
this.generalBarrier = info.generalBarrier;
this.bufferBarriers = info.bufferBarriers;
this.buffers = info.buffers;
this.bufferBarrierCount = info.bufferBarrierCount;
this.textureBarriers = info.textureBarriers;
this.textures = info.textures;
this.textureBarrierCount = info.textureBarrierCount;
this.prevAccesses = info.prevAccesses.slice();
this.nextAccesses = info.nextAccesses.slice();
return this;
}
}
Expand Down
4 changes: 2 additions & 2 deletions cocos/gfx/webgl/webgl-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ export function WebGLCmdFuncBindStates (
}

if (!vf32) {
error(`Buffer binding '${glBlock.name}' at set ${glBlock.set} binding ${glBlock.binding} is not bounded`);
// error(`Buffer binding '${glBlock.name}' at set ${glBlock.set} binding ${glBlock.binding} is not bounded`);
continue;
}

Expand Down Expand Up @@ -2274,7 +2274,7 @@ export function WebGLCmdFuncBindStates (
const texUnit = glSampler.units[l];

if (!gpuDescriptor || !gpuDescriptor.gpuSampler) {
error(`Sampler binding '${glSampler.name}' at set ${glSampler.set} binding ${glSampler.binding} index ${l} is not bounded`);
// error(`Sampler binding '${glSampler.name}' at set ${glSampler.set} binding ${glSampler.binding} index ${l} is not bounded`);
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions cocos/gfx/webgl2/webgl2-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ export function WebGL2CmdFuncBindStates (
const gpuDescriptor = descriptorIndex >= 0 && gpuDescriptorSet.gpuDescriptors[descriptorIndex];

if (!gpuDescriptor || !gpuDescriptor.gpuBuffer) {
error(`Buffer binding '${glBlock.name}' at set ${glBlock.set} binding ${glBlock.binding} is not bounded`);
// error(`Buffer binding '${glBlock.name}' at set ${glBlock.set} binding ${glBlock.binding} is not bounded`);
continue;
}

Expand Down Expand Up @@ -2395,7 +2395,7 @@ export function WebGL2CmdFuncBindStates (
const glTexUnit = cache.glTexUnits[texUnit];

if (!gpuDescriptor || !gpuDescriptor.gpuTextureView || !gpuDescriptor.gpuTextureView.gpuTexture || !gpuDescriptor.gpuSampler) {
error(`Sampler binding '${glSampler.name}' at set ${glSampler.set} binding ${glSampler.binding} index ${l} is not bounded`);
// error(`Sampler binding '${glSampler.name}' at set ${glSampler.set} binding ${glSampler.binding} index ${l} is not bounded`);
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions cocos/rendering/custom/builtin-pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

import { EDITOR } from 'internal:constants';
import { Camera, CameraUsage } from '../../render-scene/scene';
import { Pipeline, PipelineBuilder } from './pipeline';
import { BasicPipeline, PipelineBuilder } from './pipeline';
import { buildForwardPass, buildGBufferPass, buildLightingPass, buildPostprocessPass,
buildReflectionProbePasss, buildUIPass } from './define';
import { isUICamera } from './utils';

export class ForwardPipelineBuilder implements PipelineBuilder {
public setup (cameras: Camera[], ppl: Pipeline): void {
public setup (cameras: Camera[], ppl: BasicPipeline): void {
for (let i = 0; i < cameras.length; i++) {
const camera = cameras[i];
if (camera.scene === null) {
Expand All @@ -46,7 +46,7 @@ export class ForwardPipelineBuilder implements PipelineBuilder {
}

export class DeferredPipelineBuilder implements PipelineBuilder {
public setup (cameras: Camera[], ppl: Pipeline): void {
public setup (cameras: Camera[], ppl: BasicPipeline): void {
for (let i = 0; i < cameras.length; ++i) {
const camera = cameras[i];
if (!camera.scene) {
Expand Down
11 changes: 7 additions & 4 deletions cocos/rendering/custom/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { assert, warn } from '../../core';
import { VectorGraphColorMap } from './effect';
import { DefaultVisitor, depthFirstSearch, ReferenceGraphView } from './graph';
import { LayoutGraphData } from './layout-graph';
import { Pipeline } from './pipeline';
import { BasicPipeline } from './pipeline';
import { Blit, ClearView, ComputePass, ComputeSubpass, CopyPass, Dispatch, ManagedBuffer, ManagedResource, ManagedTexture, MovePass,
RasterPass, RasterSubpass, RaytracePass, RenderGraph, RenderGraphVisitor,
RenderQueue, RenderSwapchain, ResourceGraph, ResourceGraphObject, ResourceGraphVisitor, ResourceTraits, SceneData } from './render-graph';
Expand Down Expand Up @@ -287,7 +287,7 @@ class ResourceUseContext {
computes: Map<number, [ComputeView[]]> = new Map<number, [ComputeView[]]>();
}
class CompilerContext {
set (pipeline: Pipeline,
set (pipeline: BasicPipeline,
resGraph: ResourceGraph,
renderGraph: RenderGraph,
layoutGraph: LayoutGraphData) {
Expand All @@ -309,9 +309,9 @@ class CompilerContext {

export class Compiler {
private _resourceGraph: ResourceGraph;
private _pipeline: Pipeline;
private _pipeline: BasicPipeline;
private _layoutGraph: LayoutGraphData;
constructor (pipeline: Pipeline,
constructor (pipeline: BasicPipeline,
resGraph: ResourceGraph,
layoutGraph: LayoutGraphData) {
this._pipeline = pipeline;
Expand All @@ -328,6 +328,9 @@ export class Compiler {
const resId = this._resourceGraph.vertex(name);
const trait = this._resourceGraph.getTraits(resId);
const rasterArr: number[] = Array.from(use.rasters.keys());
if (!rasterArr.length) {
continue;
}

const min = rasterArr.reduce((prev, current) => (prev < current ? prev : current));
const firstRaster = use.rasters.get(min)!;
Expand Down
Loading