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();