12 : context_(
std::move(context)),
13 sample_count_(
target.GetSampleCount()),
14 pixel_format_(
target.GetRenderTargetPixelFormat()),
15 has_depth_attachment_(
target.GetDepthAttachment().has_value()),
16 has_stencil_attachment_(
target.GetStencilAttachment().has_value()),
17 render_target_size_(
target.GetRenderTargetSize()),
19 orthographic_(
Matrix::MakeOrthographic(render_target_size_)) {}
60 VALIDATION_LOG <<
"Attempted to add an invalid command to the render pass.";
64 if (
command.scissor.has_value()) {
66 if (!target_rect.Contains(
command.scissor.value())) {
67 VALIDATION_LOG <<
"Cannot apply a scissor that lies outside the bounds "
68 "of the render target.";
73 if (
command.vertex_buffer.vertex_count == 0u ||
99 pending_.label = std::string(label);
134 "Failed to encode command");
150 const std::shared_ptr<const ShaderMetadata>& metadata,
160 std::shared_ptr<const Texture>
texture,
161 const std::unique_ptr<const Sampler>& sampler) {
virtual bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
const bool has_depth_attachment_
virtual bool SetVertexBuffer(VertexBuffer buffer)
Specify the vertex and index buffer to use for this command.
const bool has_stencil_attachment_
virtual void SetStencilReference(uint32_t value)
virtual void SetPipeline(const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline)
The pipeline to use for this command.
const RenderTarget & GetRenderTarget() const
SampleCount GetSampleCount() const
The sample count of the attached render target.
bool AddCommand(Command &&command)
Record a command for subsequent encoding to the underlying command buffer. No work is encoded into th...
const SampleCount sample_count_
virtual void OnSetLabel(std::string label)=0
virtual bool OnEncodeCommands(const Context &context) const =0
virtual void SetScissor(IRect scissor)
PixelFormat GetRenderTargetPixelFormat() const
The pixel format of the attached render target.
const Matrix & GetOrthographicTransform() const
RenderPass(std::shared_ptr< const Context > context, const RenderTarget &target)
std::vector< Command > commands_
const std::shared_ptr< const Context > context_
bool HasStencilAttachment() const
Whether the render target has an stencil attachment.
const Matrix orthographic_
void SetLabel(std::string label)
const ISize render_target_size_
ISize GetRenderTargetSize() const
virtual void SetInstanceCount(size_t count)
virtual fml::Status Draw()
Record the currently pending command.
bool HasDepthAttachment() const
Whether the render target has a depth attachment.
virtual void SetCommandLabel(std::string_view label)
The debugging label to use for the command.
bool EncodeCommands() const
Encode the recorded commands to the underlying command buffer.
const std::shared_ptr< const Context > & GetContext() const
virtual void SetBaseVertex(uint64_t value)
virtual void SetViewport(Viewport viewport)
const RenderTarget render_target_
const PixelFormat pixel_format_
ISize GetRenderTargetSize() const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
An object used to specify work to the GPU along with references to resources the GPU will used when d...
std::shared_ptr< Pipeline< PipelineDescriptor > > pipeline
uint32_t stencil_reference
std::optional< Viewport > viewport
bool BindVertices(VertexBuffer buffer)
Specify the vertex and index buffer to use for this command.
std::optional< IRect > scissor
bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
A 4x4 matrix using column-major storage.
Metadata required to bind a combined texture and sampler.
static constexpr TRect MakeSize(const TSize< U > &size)