Flutter Engine
The Flutter Engine
|
#include <render_pass_vk.h>
Public Member Functions | |
~RenderPassVK () override | |
Public Member Functions inherited from impeller::RenderPass | |
virtual | ~RenderPass () |
const std::shared_ptr< const Context > & | GetContext () const |
const RenderTarget & | GetRenderTarget () const |
ISize | GetRenderTargetSize () const |
const Matrix & | GetOrthographicTransform () const |
void | SetLabel (std::string label) |
bool | EncodeCommands () const |
Encode the recorded commands to the underlying command buffer. | |
virtual const std::vector< Command > & | GetCommands () const |
Accessor for the current Commands. | |
SampleCount | GetSampleCount () const |
The sample count of the attached render target. | |
PixelFormat | GetRenderTargetPixelFormat () const |
The pixel format of the attached render target. | |
bool | HasDepthAttachment () const |
Whether the render target has a depth attachment. | |
bool | HasStencilAttachment () const |
Whether the render target has an stencil attachment. | |
Public Member Functions inherited from impeller::ResourceBinder | |
virtual | ~ResourceBinder ()=default |
Private Member Functions | |
void | SetPipeline (const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline) override |
The pipeline to use for this command. | |
void | SetCommandLabel (std::string_view label) override |
The debugging label to use for the command. | |
void | SetStencilReference (uint32_t value) override |
void | SetBaseVertex (uint64_t value) override |
void | SetViewport (Viewport viewport) override |
void | SetScissor (IRect scissor) override |
void | SetInstanceCount (size_t count) override |
bool | SetVertexBuffer (VertexBuffer buffer) override |
Specify the vertex and index buffer to use for this command. | |
fml::Status | Draw () override |
Record the currently pending command. | |
void | ReserveCommands (size_t command_count) override |
Reserve [command_count] commands in the HAL command buffer. | |
bool | BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override |
bool | BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const std::shared_ptr< const ShaderMetadata > &metadata, BufferView view) override |
bool | BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler) override |
bool | IsValid () const override |
void | OnSetLabel (std::string label) override |
bool | OnEncodeCommands (const Context &context) const override |
Friends | |
class | CommandBufferVK |
Additional Inherited Members | |
Protected Member Functions inherited from impeller::RenderPass | |
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. | |
RenderPass (std::shared_ptr< const Context > context, const RenderTarget &target) | |
Protected Attributes inherited from impeller::RenderPass | |
const std::shared_ptr< const Context > | context_ |
const SampleCount | sample_count_ |
const PixelFormat | pixel_format_ |
const bool | has_depth_attachment_ |
const bool | has_stencil_attachment_ |
const ISize | render_target_size_ |
const RenderTarget | render_target_ |
std::vector< Command > | commands_ |
const Matrix | orthographic_ |
Definition at line 22 of file render_pass_vk.h.
|
overridedefault |
|
overrideprivatevirtual |
Reimplemented from impeller::RenderPass.
Definition at line 585 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Reimplemented from impeller::RenderPass.
Definition at line 533 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Reimplemented from impeller::RenderPass.
Definition at line 541 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Record the currently pending command.
If there are immutable samplers referenced in the render pass, the base pipeline variant is no longer valid and needs to be re-constructed to reference the samplers.
This is an instance of JIT creation of PSOs that can cause jank. It is unavoidable because it isn't possible to know all possible combinations of target YUV conversions. Fortunately, this will only ever happen when rendering to external textures. Like Android Hardware Buffers on Android.
Even when JIT creation is unavoidable, pipelines will cache their variants when able and all pipeline creation will happen via a base pipeline cache anyway. So the jank can be mostly entirely ameliorated and it should only ever happen when the first unknown YUV conversion is encountered.
Jank can be completely eliminated by pre-populating known YUV conversion pipelines.
Reimplemented from impeller::RenderPass.
Definition at line 425 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Implements impeller::RenderPass.
Definition at line 237 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Implements impeller::RenderPass.
Definition at line 624 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Implements impeller::RenderPass.
Definition at line 241 of file render_pass_vk.cc.
|
inlineoverrideprivatevirtual |
Reserve [command_count] commands in the HAL command buffer.
Note: this is not the native command buffer.
Reimplemented from impeller::RenderPass.
Definition at line 89 of file render_pass_vk.h.
|
overrideprivatevirtual |
Reimplemented from impeller::RenderPass.
Definition at line 344 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The debugging label to use for the command.
Reimplemented from impeller::RenderPass.
Definition at line 330 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The number of instances of the given set of vertices to render. Not all backends support rendering more than one instance at a time.
Reimplemented from impeller::RenderPass.
Definition at line 369 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The pipeline to use for this command.
Reimplemented from impeller::RenderPass.
Definition at line 298 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The scissor rect to use for clipping writes to the render target. The scissor rect must lie entirely within the render target. If unset, no scissor is applied.
Reimplemented from impeller::RenderPass.
Definition at line 360 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The reference value to use in stenciling operations. Stencil configuration is part of pipeline setup and can be read from the pipelines descriptor.
Pipeline
PipelineDescriptor
Reimplemented from impeller::RenderPass.
Definition at line 338 of file render_pass_vk.cc.
|
overrideprivatevirtual |
Specify the vertex and index buffer to use for this command.
[in] | buffer | The vertex and index buffer definition. If possible, this value should be moved and not copied. |
Reimplemented from impeller::RenderPass.
Definition at line 374 of file render_pass_vk.cc.
|
overrideprivatevirtual |
The viewport coordinates that the rasterizer linearly maps normalized device coordinates to. If unset, the viewport is the size of the render target with a zero origin, znear=0, and zfar=1.
Reimplemented from impeller::RenderPass.
Definition at line 349 of file render_pass_vk.cc.
|
friend |
Definition at line 28 of file render_pass_vk.h.