From f7535d9f7d62fcc6732344d2e39d6c050facbaf5 Mon Sep 17 00:00:00 2001 From: stanleyljl <798080536@qq.com> Date: Mon, 9 Oct 2023 10:56:51 +0800 Subject: [PATCH] fix clang tidy error --- native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp | 2 +- native/cocos/scene/gpu-scene/GPUBatchPool.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp index 801a22cc179..14af4621447 100644 --- a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp +++ b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp @@ -1602,7 +1602,7 @@ constexpr gfx::AccessFlags allStageReadAccess(const ResourceDesc& desc) { if ((flags & ResourceFlags::STORAGE) != ResourceFlags::NONE) { ret = gfx::AccessFlags::COMPUTE_SHADER_READ_OTHER | gfx::AccessFlags::FRAGMENT_SHADER_READ_OTHER | gfx::AccessFlags::VERTEX_SHADER_READ_OTHER; } else if (isBuffer) { // NOLINT(misc-redundant-expression) - ret = gfx::AccessFlags::COMPUTE_SHADER_READ_UNIFORM_BUFFER | gfx::AccessFlags::COMPUTE_SHADER_READ_UNIFORM_BUFFER | gfx::AccessFlags::VERTEX_SHADER_READ_UNIFORM_BUFFER; + ret = gfx::AccessFlags::COMPUTE_SHADER_READ_UNIFORM_BUFFER | gfx::AccessFlags::FRAGMENT_SHADER_READ_UNIFORM_BUFFER | gfx::AccessFlags::VERTEX_SHADER_READ_UNIFORM_BUFFER; } else { ret = gfx::AccessFlags::COMPUTE_SHADER_READ_TEXTURE | gfx::AccessFlags::FRAGMENT_SHADER_READ_TEXTURE | gfx::AccessFlags::VERTEX_SHADER_READ_TEXTURE; } diff --git a/native/cocos/scene/gpu-scene/GPUBatchPool.cpp b/native/cocos/scene/gpu-scene/GPUBatchPool.cpp index 991f12911b1..e161f0346e9 100644 --- a/native/cocos/scene/gpu-scene/GPUBatchPool.cpp +++ b/native/cocos/scene/gpu-scene/GPUBatchPool.cpp @@ -173,7 +173,7 @@ void GPUBatchPool::update(uint32_t stamp) { const auto &meshPool = _gpuScene->getMeshPool(); for (auto &batch : _batches) { - auto *pass = batch.second->getPass(); + const auto *pass = batch.second->getPass(); const auto phaseId = pass->getPhaseID(); auto &items = batch.second->getItems();