Skip to content

Commit f81094f

Browse files
cocos-robotcocos-robot
andauthored
[ci skip][AUTO]: Automated clang-format update: 6c15699 (#293) (#301)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
1 parent 825362f commit f81094f

3 files changed

Lines changed: 35 additions & 37 deletions

File tree

native/cocos/renderer/pipeline/InstancedBuffer.cpp

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424

2525
#include <algorithm>
2626

27-
#include "InstancedBuffer.h"
2827
#include "Define.h"
28+
#include "InstancedBuffer.h"
29+
#include "base/StringUtil.h"
2930
#include "gfx-base/GFXBuffer.h"
3031
#include "gfx-base/GFXCommandBuffer.h"
3132
#include "gfx-base/GFXDescriptorSet.h"
3233
#include "gfx-base/GFXDevice.h"
3334
#include "gfx-base/GFXInputAssembler.h"
34-
#include "base/StringUtil.h"
3535

3636
namespace cc {
3737
namespace pipeline {
@@ -71,8 +71,8 @@ void InstancedBuffer::merge(scene::SubModel *subModel, uint32_t passIdx, gfx::Sh
7171
auto *reflectionProbeCubemap = descriptorSet->getTexture(REFLECTIONPROBECUBEMAP::BINDING);
7272
auto *reflectionProbePlanarMap = descriptorSet->getTexture(REFLECTIONPROBEPLANARMAP::BINDING);
7373
auto *reflectionProbeBlendCubemap = ENABLE_PROBE_BLEND
74-
? descriptorSet->getTexture(REFLECTIONPROBEBLENDCUBEMAP::BINDING)
75-
: nullptr;
74+
? descriptorSet->getTexture(REFLECTIONPROBEBLENDCUBEMAP::BINDING)
75+
: nullptr;
7676
const uint32_t reflectionProbeType = subModel->getReflectionProbeType();
7777
auto *shader = shaderImplant;
7878
if (!shader) {
@@ -117,14 +117,13 @@ void InstancedBuffer::merge(scene::SubModel *subModel, uint32_t passIdx, gfx::Sh
117117
reflectionProbeType,
118118
reflectionProbeCubemap,
119119
reflectionProbePlanarMap,
120-
reflectionProbeBlendCubemap
121-
);
120+
reflectionProbeBlendCubemap);
122121
}
123122

124123
void InstancedBuffer::appendInstance(InstancedItem &instance,
125-
Uint8Array& buffer,
126-
gfx::Shader *shader,
127-
gfx::DescriptorSet *descriptorSet) {
124+
Uint8Array &buffer,
125+
gfx::Shader *shader,
126+
gfx::DescriptorSet *descriptorSet) {
128127
if (instance.drawInfo.instanceCount >= instance.capacity) { // resize buffers
129128
instance.capacity = std::min(instance.capacity << 1, MAX_CAPACITY);
130129
const auto newSize = instance.stride * instance.capacity;
@@ -146,17 +145,17 @@ void InstancedBuffer::appendInstance(InstancedItem &instance,
146145
}
147146

148147
void InstancedBuffer::createInstance(const ccstd::string &key,
149-
gfx::InputAssembler *sourceIA,
150-
const ccstd::vector<gfx::Attribute> &attributes,
151-
Uint8Array &buffer,
152-
uint32_t stride,
153-
gfx::Shader *shader,
154-
gfx::DescriptorSet *descriptorSet,
155-
gfx::Texture *lightingMap,
156-
uint32_t reflectionProbeType,
157-
gfx::Texture *reflectionProbeCubemap,
158-
gfx::Texture *reflectionProbePlanarMap,
159-
gfx::Texture *reflectionProbeBlendCubemap) {
148+
gfx::InputAssembler *sourceIA,
149+
const ccstd::vector<gfx::Attribute> &attributes,
150+
Uint8Array &buffer,
151+
uint32_t stride,
152+
gfx::Shader *shader,
153+
gfx::DescriptorSet *descriptorSet,
154+
gfx::Texture *lightingMap,
155+
uint32_t reflectionProbeType,
156+
gfx::Texture *reflectionProbeCubemap,
157+
gfx::Texture *reflectionProbePlanarMap,
158+
gfx::Texture *reflectionProbeBlendCubemap) {
160159
const auto newSize = stride * INITIAL_CAPACITY;
161160
auto *vb = _device->createBuffer({
162161
gfx::BufferUsageBit::VERTEX | gfx::BufferUsageBit::TRANSFER_DST,

native/cocos/renderer/pipeline/InstancedBuffer.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ class InstancedBuffer : public RefCounted {
7979

8080
private:
8181
void appendInstance(InstancedItem &instance,
82-
Uint8Array &buffer,
83-
gfx::Shader *shader,
84-
gfx::DescriptorSet *descriptorSet);
82+
Uint8Array &buffer,
83+
gfx::Shader *shader,
84+
gfx::DescriptorSet *descriptorSet);
8585
void createInstance(const ccstd::string &key,
86-
gfx::InputAssembler *sourceIA,
87-
const ccstd::vector<gfx::Attribute> &attributes,
88-
Uint8Array &buffer,
89-
uint32_t stride,
90-
gfx::Shader *shader,
91-
gfx::DescriptorSet *descriptorSet,
92-
gfx::Texture *lightingMap,
93-
uint32_t reflectionProbeType,
94-
gfx::Texture *reflectionProbeCubemap,
95-
gfx::Texture *reflectionProbePlanarMap,
96-
gfx::Texture *reflectionProbeBlendCubemap);
86+
gfx::InputAssembler *sourceIA,
87+
const ccstd::vector<gfx::Attribute> &attributes,
88+
Uint8Array &buffer,
89+
uint32_t stride,
90+
gfx::Shader *shader,
91+
gfx::DescriptorSet *descriptorSet,
92+
gfx::Texture *lightingMap,
93+
uint32_t reflectionProbeType,
94+
gfx::Texture *reflectionProbeCubemap,
95+
gfx::Texture *reflectionProbePlanarMap,
96+
gfx::Texture *reflectionProbeBlendCubemap);
9797

9898
// weak reference
9999
const scene::Pass *_pass{nullptr};

native/cocos/renderer/pipeline/custom/NativeExecutor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include "details/GslUtils.h"
4646
#include "details/Range.h"
4747
#if CC_USE_DEBUG_RENDERER
48-
#include "cocos/renderer/pipeline/helper/Utils.h"
48+
#include "cocos/renderer/pipeline/helper/Utils.h"
4949
#endif
5050
#if CC_USE_GEOMETRY_RENDERER
5151
#include "cocos/renderer/pipeline/GeometryRenderer.h"
@@ -796,8 +796,7 @@ struct RenderGraphVisitor : boost::dfs_visitor<> {
796796
}
797797
}
798798
#if CC_USE_DEBUG_RENDERER
799-
if (blit.blitType == BlitType::DRAW_PROFILE)
800-
{
799+
if (blit.blitType == BlitType::DRAW_PROFILE) {
801800
auto* renderPass = ctx.currentPass;
802801
auto* cmdBuff = ctx.cmdBuff;
803802
renderDebugRenderer(renderPass, cmdBuff, ctx.ppl->getPipelineSceneData(), cc::pipeline::profilerCamera);

0 commit comments

Comments
 (0)