Skip to content

Commit

Permalink
fix shader block memory overwrite issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesky013 committed Jul 31, 2023
1 parent f09dec8 commit 157526d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions native/cocos/scene/Pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,8 @@ void Pass::resetUBOs() {
ofs += size;
}
};
auto *programLib = render::getProgramLibrary();
if (programLib) {
const auto &set = _shaderInfo->descriptors.at(
static_cast<size_t>(pipeline::SetIndex::MATERIAL));
for (const auto &block : set.blocks) {
updateBuffer(block);
}
} else {
for (const auto &u : _shaderInfo->blocks) {
updateBuffer(u);
}
for (const auto &u : _shaderInfo->blocks) {
updateBuffer(u);
}
_rootBufferDirty = true;
}
Expand Down

0 comments on commit 157526d

Please sign in to comment.