Skip to content

Commit

Permalink
Move classes from interface to implementation (#18091)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e authored Dec 30, 2024
1 parent 7783dc5 commit f3ee5c8
Show file tree
Hide file tree
Showing 20 changed files with 1,110 additions and 563 deletions.
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

0 comments on commit f3ee5c8

Please sign in to comment.