Render passes encode render commands directed as one specific render target into an underlying command buffer. More...
#include <render_pass.h>
Public Member Functions | |
| virtual | ~RenderPass () |
| const RenderTarget & | GetRenderTarget () const |
| ISize | GetRenderTargetSize () const |
| virtual bool | IsValid () const =0 |
| void | SetLabel (std::string label) |
| HostBuffer & | GetTransientsBuffer () |
| bool | AddCommand (Command &&command) |
| Record a command for subsequent encoding to the underlying command buffer. No work is encoded into the command buffer at this time. More... | |
| bool | EncodeCommands () const |
| Encode the recorded commands to the underlying command buffer. More... | |
| const std::vector< Command > & | GetCommands () const |
| Accessor for the current Commands. More... | |
Protected Member Functions | |
| RenderPass (std::weak_ptr< const Context > context, const RenderTarget &target) | |
| const std::weak_ptr< const Context > & | GetContext () const |
| virtual void | OnSetLabel (std::string label)=0 |
| virtual bool | OnEncodeCommands (const Context &context) const =0 |
Protected Attributes | |
| const std::weak_ptr< const Context > | context_ |
| const RenderTarget | render_target_ |
| std::shared_ptr< HostBuffer > | transients_buffer_ |
| std::vector< Command > | commands_ |
Render passes encode render commands directed as one specific render target into an underlying command buffer.
Render passes can be obtained from the command buffer in which the pass is meant to encode commands into.
CommandBuffer Definition at line 27 of file render_pass.h.
|
virtual |
|
protected |
| bool impeller::RenderPass::AddCommand | ( | Command && | command | ) |
Record a command for subsequent encoding to the underlying command buffer. No work is encoded into the command buffer at this time.
| [in] | command | The command |
Definition at line 46 of file render_pass.cc.
References commands_, impeller::RenderTarget::GetRenderTargetSize(), render_target_, and VALIDATION_LOG.
Referenced by impeller::scene::EncodeCommand(), ImGui_ImplImpeller_RenderDrawData(), impeller::CheckerboardContents::Render(), impeller::TiledTextureContents::Render(), impeller::RuntimeEffectContents::Render(), impeller::ClipContents::Render(), impeller::SolidRRectBlurContents::Render(), impeller::SolidColorContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::VerticesColorContents::Render(), impeller::AtlasContents::Render(), impeller::ClipRestoreContents::Render(), impeller::VerticesUVContents::Render(), impeller::AtlasTextureContents::Render(), impeller::AtlasColorContents::Render(), and impeller::testing::TEST_P().
| bool impeller::RenderPass::EncodeCommands | ( | ) | const |
Encode the recorded commands to the underlying command buffer.
Definition at line 77 of file render_pass.cc.
References context_, and OnEncodeCommands().
|
inline |
Accessor for the current Commands.
Visible for testing.
Definition at line 65 of file render_pass.h.
References commands_.
|
protected |
| const RenderTarget & impeller::RenderPass::GetRenderTarget | ( | ) | const |
Definition at line 26 of file render_pass.cc.
References render_target_.
Referenced by impeller::EncodeCommandsInReactor(), impeller::scene::Material::GetContextOptions(), and impeller::OptionsFromPass().
| ISize impeller::RenderPass::GetRenderTargetSize | ( | ) | const |
Definition at line 30 of file render_pass.cc.
References impeller::RenderTarget::GetRenderTargetSize(), and render_target_.
Referenced by impeller::ComputeUVGeometryForRect(), impeller::EncodeCommandsInReactor(), impeller::VerticesGeometry::GetPositionBuffer(), impeller::VerticesGeometry::GetPositionColorBuffer(), impeller::VerticesGeometry::GetPositionUVBuffer(), ImGui_ImplImpeller_RenderDrawData(), impeller::SceneContents::Render(), impeller::ClipContents::Render(), impeller::SolidRRectBlurContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::AtlasContents::Render(), impeller::ClipRestoreContents::Render(), impeller::Entity::Render(), impeller::AtlasTextureContents::Render(), impeller::AtlasColorContents::Render(), and impeller::testing::TEST_P().
| HostBuffer & impeller::RenderPass::GetTransientsBuffer | ( | ) |
Definition at line 34 of file render_pass.cc.
References transients_buffer_.
Referenced by impeller::ComputeUVGeometryForRect(), impeller::scene::EncodeCommand(), ImGui_ImplImpeller_RenderDrawData(), impeller::CheckerboardContents::Render(), impeller::TiledTextureContents::Render(), impeller::RuntimeEffectContents::Render(), impeller::ClipContents::Render(), impeller::SolidRRectBlurContents::Render(), impeller::SolidColorContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::VerticesColorContents::Render(), impeller::AtlasContents::Render(), impeller::ClipRestoreContents::Render(), impeller::VerticesUVContents::Render(), impeller::AtlasTextureContents::Render(), impeller::AtlasColorContents::Render(), and impeller::testing::TEST_P().
|
pure virtual |
|
protectedpure virtual |
Referenced by EncodeCommands().
|
protectedpure virtual |
Referenced by SetLabel().
| void impeller::RenderPass::SetLabel | ( | std::string | label | ) |
Definition at line 38 of file render_pass.cc.
References OnSetLabel(), impeller::SPrintF(), and transients_buffer_.
|
protected |
Definition at line 71 of file render_pass.h.
Referenced by AddCommand(), impeller::EncodeCommandsInReactor(), and GetCommands().
|
protected |
Definition at line 68 of file render_pass.h.
Referenced by EncodeCommands(), GetContext(), RenderPass(), and ~RenderPass().
|
protected |
Definition at line 69 of file render_pass.h.
Referenced by AddCommand(), GetRenderTarget(), and GetRenderTargetSize().
|
protected |
Definition at line 70 of file render_pass.h.
Referenced by GetTransientsBuffer(), RenderPass(), SetLabel(), and ~RenderPass().