From ad0e1c358b3086d4bc35490671d9dd865da82a51 Mon Sep 17 00:00:00 2001 From: Zeqiang Li Date: Fri, 8 Sep 2023 15:54:46 +0800 Subject: [PATCH] potential fix --- native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp b/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp index 9aaff004388..a2000ebd88d 100644 --- a/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp @@ -61,13 +61,7 @@ void DescriptorSet::destroy() { } void DescriptorSet::bindBuffer(uint32_t binding, Buffer *buffer, uint32_t index) { - const uint32_t descriptorIndex = _layout->getDescriptorIndices()[binding] + index; - const uint32_t newId = getObjectID(buffer); - if (_buffers[descriptorIndex].id != newId) { - _buffers[descriptorIndex].ptr = buffer; - _buffers[descriptorIndex].id = newId; - _isDirty = true; - } + bindBuffer(binding, buffer, index, AccessFlagBit::NONE); } void DescriptorSet::bindTexture(uint32_t binding, Texture *texture, uint32_t index) {