Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a few errors in VKCommands.cpp #16732

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions native/cocos/renderer/gfx-vulkan/VKCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ struct SubpassDependencyManager final {
ccstd::unordered_set<VkSubpassDependency2, DependencyHasher, DependencyComparer> _hashes;
};

std::pair<VkImageLayout, VkImageLayout> getInitialFinalLayout(CCVKDevice *device, CCVKGeneralBarrier *barrier, bool depthSetncil) {
const auto *gpuBarrier = barrier ? barrier->gpuBarrier() : (depthSetncil ? &device->gpuDevice()->defaultDepthStencilBarrier : &device->gpuDevice()->defaultColorBarrier);
std::pair<VkImageLayout, VkImageLayout> getInitialFinalLayout(CCVKDevice *device, CCVKGeneralBarrier *barrier, bool depthStencil) {
const auto *gpuBarrier = barrier ? barrier->gpuBarrier() : (depthStencil ? &device->gpuDevice()->defaultDepthStencilBarrier : &device->gpuDevice()->defaultColorBarrier);

ThsvsImageBarrier imageBarrier = {};
imageBarrier.prevAccessCount = utils::toUint(gpuBarrier->prevAccesses.size());
Expand Down Expand Up @@ -593,8 +593,6 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende
manuallyDeduce = dependencyCount == 0;
}
if (!manuallyDeduce) {
// offset = 0U;
ccstd::unordered_set<const GFXObject *> subpassExternalFilter;
for (uint32_t i = 0U; i < dependencyCount; ++i) {
const auto &dependency{gpuRenderPass->dependencies[i]};
VkSubpassDependency2 vkDependency{VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2};
Expand Down
Loading