Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e committed Sep 20, 2023
1 parent 79b6d86 commit 92be044
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
34 changes: 17 additions & 17 deletions cocos/rendering/custom/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,20 @@ export interface BasicPipeline extends PipelineRuntime {
width: number,
height: number,
format?: Format): void;
addResource (
addBuffer (
name: string,
dimension: ResourceDimension,
size: number,
flags: ResourceFlags,
residency: ResourceResidency): number;
updateBuffer (name: string, size: number): void;
addExternalTexture (
name: string,
texture: Texture,
flags: ResourceFlags): number;
updateExternalTexture (name: string, texture: Texture): void;
addTexture (
name: string,
type: TextureType,
format: Format,
width: number,
height: number,
Expand All @@ -697,7 +708,7 @@ export interface BasicPipeline extends PipelineRuntime {
sampleCount: SampleCount,
flags: ResourceFlags,
residency: ResourceResidency): number;
updateResource (
updateTexture (
name: string,
format: Format,
width: number,
Expand All @@ -706,9 +717,9 @@ export interface BasicPipeline extends PipelineRuntime {
arraySize: number,
mipLevels: number,
sampleCount: SampleCount): void;
addTexture (
addResource (
name: string,
type: TextureType,
dimension: ResourceDimension,
format: Format,
width: number,
height: number,
Expand All @@ -718,7 +729,7 @@ export interface BasicPipeline extends PipelineRuntime {
sampleCount: SampleCount,
flags: ResourceFlags,
residency: ResourceResidency): number;
updateTexture (
updateResource (
name: string,
format: Format,
width: number,
Expand All @@ -727,17 +738,6 @@ export interface BasicPipeline extends PipelineRuntime {
arraySize: number,
mipLevels: number,
sampleCount: SampleCount): void;
addBuffer (
name: string,
size: number,
flags: ResourceFlags,
residency: ResourceResidency): number;
updateBuffer (name: string, size: number): void;
addExternalTexture (
name: string,
texture: Texture,
flags: ResourceFlags): number;
updateExternalTexture (name: string, texture: Texture): void;
/**
* @engineInternal
* @en Begin rendering one frame
Expand Down
8 changes: 4 additions & 4 deletions native/cocos/renderer/pipeline/custom/NativePipelineTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1621,14 +1621,14 @@ class NativePipeline final : public Pipeline {
uint32_t addDepthStencil(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, ResourceResidency residency) override;
void updateRenderTarget(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) override;
void updateDepthStencil(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) override;
uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) override;
void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) override;
uint32_t addTexture(const ccstd::string &name, gfx::TextureType type, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) override;
void updateTexture(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) override;
uint32_t addBuffer(const ccstd::string &name, uint32_t size, ResourceFlags flags, ResourceResidency residency) override;
void updateBuffer(const ccstd::string &name, uint32_t size) override;
uint32_t addExternalTexture(const ccstd::string &name, gfx::Texture *texture, ResourceFlags flags) override;
void updateExternalTexture(const ccstd::string &name, gfx::Texture *texture) override;
uint32_t addTexture(const ccstd::string &name, gfx::TextureType type, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) override;
void updateTexture(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) override;
uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) override;
void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) override;
void beginFrame() override;
void update(const scene::Camera *camera) override;
void endFrame() override;
Expand Down
5 changes: 4 additions & 1 deletion native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,10 @@ void LightResource::clear() {
}

void LightResource::buildLightBuffer(gfx::CommandBuffer* cmdBuffer) const {
cmdBuffer->updateBuffer(lightBuffer, cpuBuffer.data(), lights.size() * elementSize);
cmdBuffer->updateBuffer(
lightBuffer,
cpuBuffer.data(),
static_cast<uint32_t>(lights.size()) * elementSize);
}

void LightResource::tryUpdateRenderSceneLocalDescriptorSet(const SceneCulling& sceneCulling) {
Expand Down
8 changes: 4 additions & 4 deletions native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,14 +786,14 @@ class BasicPipeline : public PipelineRuntime {
* @param format @en Format of the resource @zh 资源的格式
*/
virtual void updateDepthStencil(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) = 0;
virtual uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) = 0;
virtual void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) = 0;
virtual uint32_t addTexture(const ccstd::string &name, gfx::TextureType type, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) = 0;
virtual void updateTexture(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) = 0;
virtual uint32_t addBuffer(const ccstd::string &name, uint32_t size, ResourceFlags flags, ResourceResidency residency) = 0;
virtual void updateBuffer(const ccstd::string &name, uint32_t size) = 0;
virtual uint32_t addExternalTexture(const ccstd::string &name, gfx::Texture *texture, ResourceFlags flags) = 0;
virtual void updateExternalTexture(const ccstd::string &name, gfx::Texture *texture) = 0;
virtual uint32_t addTexture(const ccstd::string &name, gfx::TextureType type, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) = 0;
virtual void updateTexture(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) = 0;
virtual uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) = 0;
virtual void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) = 0;
/**
* @engineInternal
* @en Begin rendering one frame
Expand Down

0 comments on commit 92be044

Please sign in to comment.