-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Cache RenderPass/Framebuffer objects on the resolve texture sources. #50142
Changes from 1 commit
6bbae13
b3f4b88
a292db7
ffcefd1
4463ab8
43dd21c
216e185
6873355
2b7e44f
c11a0e2
089b9ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,12 +45,29 @@ class TextureVK final : public Texture, public BackendCast<TextureVK, Texture> { | |
| bool IsSwapchainImage() const { return source_->IsSwapchainImage(); } | ||
|
|
||
| // These methods should only be used by render_pass_vk.h | ||
|
|
||
| /// @brief Store the last framebuffer object used with this texture. | ||
| /// | ||
| /// This field is only set if this texture is used as the resolve texture | ||
| /// of a render pass. By construction, this framebuffer should be compatible | ||
| /// with any future render passes. | ||
| void SetFramebuffer(const SharedHandleVK<vk::Framebuffer>& framebuffer); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to save this on the RenderTarget, not the Texture? This isn't applicable to every Texture, right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The RenderTarget itself is const/immutable whereas the Texture is stateful.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not a problem though. We can make the frame buffer and render pass when we create the RenderTarget. We shouldn't ever have a RenderTarget without a render pass and it will never change, right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately that is all constructed above the backend layer, and there are no metal or gles analogs for these objects. |
||
|
|
||
| /// @brief Store the last render pass object used with this texture. | ||
| /// | ||
| /// This field is only set if this texture is used as the resolve texture | ||
| /// of a render pass. By construction, this framebuffer should be compatible | ||
| /// with any future render passes. | ||
| void SetRenderPass(const SharedHandleVK<vk::RenderPass>& renderpass); | ||
|
|
||
| /// @brief Retrieve the last framebuffer object used with this texture. | ||
| /// | ||
| /// May be nullptr if no previous framebuffer existed. | ||
| SharedHandleVK<vk::Framebuffer> GetFramebuffer() const; | ||
|
|
||
| /// @brief Retrieve the last render pass object used with this texture. | ||
|
||
| /// | ||
| /// May be nullptr if no previous render pass existed. | ||
| SharedHandleVK<vk::RenderPass> GetRenderPass() const; | ||
|
|
||
| private: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments look good 👍