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

Move classes from interface to implementation #18091

Merged
merged 4 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 17 additions & 3 deletions cocos/rendering/custom/layout-graph-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,24 @@ import { EffectAsset } from '../../asset/assets';
import { assert, error, warn } from '../../core';
import { ShaderStageFlagBit, Type, Uniform, UniformBlock } from '../../gfx';
import { DefaultVisitor, depthFirstSearch, GraphColor, MutableVertexPropertyMap } from './graph';
import { DescriptorBlockData, DescriptorData, DescriptorDB, DescriptorSetData, LayoutGraph, LayoutGraphData, LayoutGraphDataValue, LayoutGraphValue, PipelineLayoutData, RenderPassType, RenderPhase, RenderPhaseData, RenderStageData, ShaderProgramData } from './layout-graph';
import {
Descriptor,
DescriptorBlock,
DescriptorBlockData,
DescriptorBlockFlattened,
DescriptorBlockIndex,
DescriptorData, DescriptorDB, DescriptorSetData,
DescriptorTypeOrder,
LayoutGraph, LayoutGraphData, LayoutGraphDataValue, LayoutGraphValue,
PipelineLayoutData, RenderPassType, RenderPhase, RenderPhaseData,
RenderStageData, ShaderProgramData,
} from './layout-graph';
import { getDescriptorTypeOrderName } from './layout-graph-names';
import { ENABLE_SUBPASS, getOrCreateDescriptorID, sortDescriptorBlocks } from './layout-graph-utils';
import { UpdateFrequency, Descriptor, DescriptorBlock, DescriptorBlockFlattened, DescriptorBlockIndex, DescriptorTypeOrder, ParameterType } from './types';
import { getUpdateFrequencyName, getDescriptorTypeOrderName } from './types-names';
import {
ParameterType, UpdateFrequency,
} from './types';
import { getUpdateFrequencyName } from './types-names';

export function getLayoutGraphDataVersion (): number {
return 0;
Expand Down
26 changes: 26 additions & 0 deletions cocos/rendering/custom/layout-graph-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,29 @@
* The following section is auto-generated.
* ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! =========================
*/
import { DescriptorTypeOrder } from './layout-graph';

export function getDescriptorTypeOrderName (e: DescriptorTypeOrder): string {
switch (e) {
case DescriptorTypeOrder.UNIFORM_BUFFER:
return 'UNIFORM_BUFFER';
case DescriptorTypeOrder.DYNAMIC_UNIFORM_BUFFER:
return 'DYNAMIC_UNIFORM_BUFFER';
case DescriptorTypeOrder.SAMPLER_TEXTURE:
return 'SAMPLER_TEXTURE';
case DescriptorTypeOrder.SAMPLER:
return 'SAMPLER';
case DescriptorTypeOrder.TEXTURE:
return 'TEXTURE';
case DescriptorTypeOrder.STORAGE_BUFFER:
return 'STORAGE_BUFFER';
case DescriptorTypeOrder.DYNAMIC_STORAGE_BUFFER:
return 'DYNAMIC_STORAGE_BUFFER';
case DescriptorTypeOrder.STORAGE_IMAGE:
return 'STORAGE_IMAGE';
case DescriptorTypeOrder.INPUT_ATTACHMENT:
return 'INPUT_ATTACHMENT';
default:
return '';
}
}
20 changes: 16 additions & 4 deletions cocos/rendering/custom/layout-graph-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@
****************************************************************************/

/* eslint-disable max-len */
import type { LayoutGraphData, PipelineLayoutData, RenderPhaseData } from './layout-graph';
import { DescriptorBlockData, DescriptorData, DescriptorSetLayoutData, LayoutGraphDataValue } from './layout-graph';
import { EffectAsset } from '../../asset/assets';
import { assert, error, warn } from '../../core';
import { DescriptorSetInfo, DescriptorSetLayout, DescriptorSetLayoutBinding, DescriptorSetLayoutInfo, DescriptorType, Device, Feature, Format, FormatFeatureBit, GetTypeSize, PipelineLayout, PipelineLayoutInfo, ShaderStageFlagBit, Type, Uniform, UniformBlock } from '../../gfx';
import { UBOForwardLight, UBOForwardLightEnum, UBOSkinning } from '../define';
import { UpdateFrequency, DescriptorBlockIndex, DescriptorTypeOrder, ParameterType } from './types';
import { UBOForwardLightEnum, UBOSkinning } from '../define';
import type {
LayoutGraphData,
PipelineLayoutData, RenderPhaseData,
} from './layout-graph';
import {
DescriptorBlockData,
DescriptorBlockIndex,
DescriptorData,
DescriptorSetLayoutData,
DescriptorTypeOrder,
LayoutGraphDataValue,
} from './layout-graph';
import {
ParameterType, UpdateFrequency,
} from './types';

export const INVALID_ID = 0xFFFFFFFF;
export const ENABLE_SUBPASS = true;
Expand Down
Loading
Loading