Skip to content

Commit

Permalink
igl | vulkan | Don't create temporary smartpointers
Browse files Browse the repository at this point in the history
Summary: Don't create temporary smartpointers.

Differential Revision: D49976472

fbshipit-source-id: c797b8592060df0b333a120b84644d0a33612d22
  • Loading branch information
corporateshark authored and facebook-github-bot committed Oct 7, 2023
1 parent 1ced71b commit e3437b8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/igl/vulkan/CommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ std::unique_ptr<IRenderCommandEncoder> CommandBuffer::createRenderCommandEncoder
// prepare all the color attachments
const auto& indices = framebuffer->getColorAttachmentIndices();
for (auto i : indices) {
const auto colorTex = framebuffer->getColorAttachment(i);
transitionToColorAttachment(wrapper_.cmdBuf_, colorTex.get());
ITexture* colorTex = framebuffer->getColorAttachment(i).get();
transitionToColorAttachment(wrapper_.cmdBuf_, colorTex);
// handle MSAA
const auto colorResolveTex = framebuffer->getResolveColorAttachment(i);
if (colorResolveTex) {
transitionToColorAttachment(wrapper_.cmdBuf_, colorResolveTex.get());
}
ITexture* colorResolveTex = framebuffer->getResolveColorAttachment(i).get();
transitionToColorAttachment(wrapper_.cmdBuf_, colorResolveTex);
}

// prepare depth attachment
Expand Down

0 comments on commit e3437b8

Please sign in to comment.