Skip to content

Commit

Permalink
potential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hana-alice committed Sep 8, 2023
1 parent e21032b commit ad0e1c3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ad0e1c3

Please sign in to comment.