#include <render_target.h>
Classes | |
| struct | AttachmentConfig |
| struct | AttachmentConfigMSAA |
Public Member Functions | |
| RenderTarget () | |
| ~RenderTarget () | |
| bool | IsValid () const |
| void | SetupStencilAttachment (const Context &context, RenderTargetAllocator &allocator, ISize size, bool msaa, const std::string &label="Offscreen", AttachmentConfig stencil_attachment_config=kDefaultStencilAttachmentConfig) |
| SampleCount | GetSampleCount () const |
| bool | HasColorAttachment (size_t index) const |
| ISize | GetRenderTargetSize () const |
| std::shared_ptr< Texture > | GetRenderTargetTexture () const |
| PixelFormat | GetRenderTargetPixelFormat () const |
| std::optional< ISize > | GetColorAttachmentSize (size_t index) const |
| RenderTarget & | SetColorAttachment (const ColorAttachment &attachment, size_t index) |
| RenderTarget & | SetDepthAttachment (std::optional< DepthAttachment > attachment) |
| RenderTarget & | SetStencilAttachment (std::optional< StencilAttachment > attachment) |
| size_t | GetMaxColorAttacmentBindIndex () const |
| const std::map< size_t, ColorAttachment > & | GetColorAttachments () const |
| const std::optional< DepthAttachment > & | GetDepthAttachment () const |
| const std::optional< StencilAttachment > & | GetStencilAttachment () const |
| size_t | GetTotalAttachmentCount () const |
| void | IterateAllAttachments (const std::function< bool(const Attachment &attachment)> &iterator) const |
| std::string | ToString () const |
Static Public Member Functions | |
| static RenderTarget | CreateOffscreen (const Context &context, RenderTargetAllocator &allocator, ISize size, const std::string &label="Offscreen", AttachmentConfig color_attachment_config=kDefaultColorAttachmentConfig, std::optional< AttachmentConfig > stencil_attachment_config=kDefaultStencilAttachmentConfig) |
| static RenderTarget | CreateOffscreenMSAA (const Context &context, RenderTargetAllocator &allocator, ISize size, const std::string &label="Offscreen MSAA", AttachmentConfigMSAA color_attachment_config=kDefaultColorAttachmentConfigMSAA, std::optional< AttachmentConfig > stencil_attachment_config=kDefaultStencilAttachmentConfig) |
Static Public Attributes | |
| static constexpr AttachmentConfig | kDefaultColorAttachmentConfig |
| static constexpr AttachmentConfigMSAA | kDefaultColorAttachmentConfigMSAA |
| static constexpr AttachmentConfig | kDefaultStencilAttachmentConfig |
Definition at line 48 of file render_target.h.
|
default |
|
default |
|
static |
Definition at line 223 of file render_target.cc.
References impeller::RenderTarget::AttachmentConfig::clear_color, impeller::ColorAttachment::clear_color, impeller::RenderTargetAllocator::CreateTexture(), impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::TSize< T >::IsEmpty(), impeller::kRenderTarget, impeller::kShaderRead, impeller::RenderTarget::AttachmentConfig::load_action, impeller::Attachment::load_action, SetColorAttachment(), SetStencilAttachment(), SetupStencilAttachment(), impeller::TextureDescriptor::size, impeller::SPrintF(), impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfig::storage_mode, impeller::RenderTarget::AttachmentConfig::store_action, impeller::Attachment::store_action, impeller::Attachment::texture, and impeller::TextureDescriptor::usage.
Referenced by impeller::CreateRenderTarget(), impeller::ContentContext::MakeSubpass(), and impeller::testing::TEST_P().
|
static |
Definition at line 270 of file render_target.cc.
References impeller::RenderTarget::AttachmentConfigMSAA::clear_color, impeller::ColorAttachment::clear_color, impeller::TextureDescriptor::compression_type, impeller::RenderTargetAllocator::CreateTexture(), impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::TSize< T >::IsEmpty(), impeller::kCount4, impeller::kLossy, impeller::kRenderTarget, impeller::kShaderRead, impeller::kTexture2DMultisample, impeller::RenderTarget::AttachmentConfigMSAA::load_action, impeller::Attachment::load_action, impeller::RenderTarget::AttachmentConfigMSAA::resolve_storage_mode, impeller::Attachment::resolve_texture, impeller::TextureDescriptor::sample_count, SetColorAttachment(), SetStencilAttachment(), SetupStencilAttachment(), impeller::TextureDescriptor::size, impeller::SPrintF(), impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfigMSAA::storage_mode, impeller::RenderTarget::AttachmentConfigMSAA::store_action, impeller::Attachment::store_action, impeller::Attachment::texture, impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, and VALIDATION_LOG.
Referenced by impeller::CreateRenderTarget(), impeller::ContentContext::MakeSubpass(), and impeller::SceneContents::Render().
| const std::map< size_t, ColorAttachment > & impeller::RenderTarget::GetColorAttachments | ( | ) | const |
Definition at line 209 of file render_target.cc.
Referenced by impeller::EntityPassTarget::Flip(), impeller::InlinePassContext::GetRenderPass(), impeller::GetVKClearValues(), and impeller::ToMTLRenderPassDescriptor().
| std::optional< ISize > impeller::RenderTarget::GetColorAttachmentSize | ( | size_t | index | ) | const |
Definition at line 140 of file render_target.cc.
Referenced by GetRenderTargetSize(), and impeller::Surface::Surface().
| const std::optional< DepthAttachment > & impeller::RenderTarget::GetDepthAttachment | ( | ) | const |
Definition at line 214 of file render_target.cc.
Referenced by impeller::GetVKClearValues(), and impeller::ToMTLRenderPassDescriptor().
| size_t impeller::RenderTarget::GetMaxColorAttacmentBindIndex | ( | ) | const |
Definition at line 172 of file render_target.cc.
| PixelFormat impeller::RenderTarget::GetRenderTargetPixelFormat | ( | ) | const |
Definition at line 164 of file render_target.cc.
References GetRenderTargetTexture(), and impeller::kUnknown.
Referenced by impeller::OptionsFromPass().
| ISize impeller::RenderTarget::GetRenderTargetSize | ( | ) | const |
Definition at line 150 of file render_target.cc.
References GetColorAttachmentSize().
Referenced by impeller::RenderPass::AddCommand(), impeller::RenderPass::GetRenderTargetSize(), and impeller::scene::Scene::Render().
| std::shared_ptr< Texture > impeller::RenderTarget::GetRenderTargetTexture | ( | ) | const |
Definition at line 155 of file render_target.cc.
Referenced by GetRenderTargetPixelFormat(), impeller::InlinePassContext::GetTexture(), impeller::ContentContext::MakeSubpass(), and impeller::SceneContents::Render().
| SampleCount impeller::RenderTarget::GetSampleCount | ( | ) | const |
Definition at line 126 of file render_target.cc.
References impeller::kCount1.
Referenced by impeller::scene::Material::GetContextOptions(), and impeller::OptionsFromPass().
| const std::optional< StencilAttachment > & impeller::RenderTarget::GetStencilAttachment | ( | ) | const |
Definition at line 218 of file render_target.cc.
Referenced by impeller::InlinePassContext::GetRenderPass(), impeller::GetVKClearValues(), impeller::OptionsFromPass(), and impeller::ToMTLRenderPassDescriptor().
| size_t impeller::RenderTarget::GetTotalAttachmentCount | ( | ) | const |
Definition at line 380 of file render_target.cc.
| bool impeller::RenderTarget::HasColorAttachment | ( | size_t | index | ) | const |
| bool impeller::RenderTarget::IsValid | ( | ) | const |
Definition at line 34 of file render_target.cc.
References HasColorAttachment(), IterateAllAttachments(), impeller::TextureTypeToString(), ToString(), and VALIDATION_LOG.
Referenced by impeller::EntityPassTarget::IsValid(), and impeller::SceneContents::Render().
| void impeller::RenderTarget::IterateAllAttachments | ( | const std::function< bool(const Attachment &attachment)> & | iterator | ) | const |
| RenderTarget & impeller::RenderTarget::SetColorAttachment | ( | const ColorAttachment & | attachment, |
| size_t | index | ||
| ) |
Definition at line 180 of file render_target.cc.
References impeller::Attachment::IsValid().
Referenced by CreateOffscreen(), CreateOffscreenMSAA(), impeller::EntityPassTarget::Flip(), impeller::InlinePassContext::GetRenderPass(), impeller::testing::TEST_P(), impeller::SurfaceGLES::WrapFBO(), and impeller::SurfaceVK::WrapSwapchainImage().
| RenderTarget & impeller::RenderTarget::SetDepthAttachment | ( | std::optional< DepthAttachment > | attachment | ) |
Definition at line 189 of file render_target.cc.
| RenderTarget & impeller::RenderTarget::SetStencilAttachment | ( | std::optional< StencilAttachment > | attachment | ) |
Definition at line 199 of file render_target.cc.
Referenced by CreateOffscreen(), CreateOffscreenMSAA(), impeller::InlinePassContext::GetRenderPass(), SetupStencilAttachment(), impeller::testing::TEST_P(), and impeller::SurfaceGLES::WrapFBO().
| void impeller::RenderTarget::SetupStencilAttachment | ( | const Context & | context, |
| RenderTargetAllocator & | allocator, | ||
| ISize | size, | ||
| bool | msaa, | ||
| const std::string & | label = "Offscreen", |
||
| AttachmentConfig | stencil_attachment_config = kDefaultStencilAttachmentConfig |
||
| ) |
Definition at line 349 of file render_target.cc.
References impeller::StencilAttachment::clear_stencil, impeller::RenderTargetAllocator::CreateTexture(), impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::kCount4, impeller::kRenderTarget, impeller::kTexture2DMultisample, impeller::RenderTarget::AttachmentConfig::load_action, impeller::Attachment::load_action, impeller::TextureDescriptor::sample_count, SetStencilAttachment(), impeller::TextureDescriptor::size, impeller::SPrintF(), impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfig::storage_mode, impeller::RenderTarget::AttachmentConfig::store_action, impeller::Attachment::store_action, impeller::Attachment::texture, impeller::TextureDescriptor::type, and impeller::TextureDescriptor::usage.
Referenced by CreateOffscreen(), and CreateOffscreenMSAA().
| std::string impeller::RenderTarget::ToString | ( | ) | const |
Definition at line 399 of file render_target.cc.
References impeller::ColorAttachmentToString(), impeller::DepthAttachmentToString(), impeller::SPrintF(), and impeller::StencilAttachmentToString().
Referenced by IsValid().
|
staticconstexpr |
Definition at line 65 of file render_target.h.
Referenced by impeller::ContentContext::MakeSubpass(), and impeller::testing::TEST_P().
|
staticconstexpr |
Definition at line 71 of file render_target.h.
Referenced by impeller::ContentContext::MakeSubpass().
|
staticconstexpr |
Definition at line 78 of file render_target.h.