5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_VK_H_
15#include "vulkan/vulkan_handles.hpp"
30 std::shared_ptr<CommandBufferVK> command_buffer_;
31 std::string debug_label_;
33 bool is_valid_ =
false;
35 vk::CommandBuffer command_buffer_vk_;
36 std::shared_ptr<Texture> color_image_vk_;
37 std::shared_ptr<Texture> resolve_image_vk_;
40 std::array<vk::DescriptorImageInfo, kMaxBindings> image_workspace_;
41 std::array<vk::DescriptorBufferInfo, kMaxBindings> buffer_workspace_;
42 std::array<vk::WriteDescriptorSet, kMaxBindings + kMaxBindings>
44 size_t bound_image_offset_ = 0u;
45 size_t bound_buffer_offset_ = 0u;
46 size_t descriptor_write_offset_ = 0u;
47 size_t instance_count_ = 1u;
48 size_t base_vertex_ = 0u;
49 size_t vertex_count_ = 0u;
50 bool has_index_buffer_ =
false;
51 bool has_label_ =
false;
53 bool pipeline_uses_input_attachments_ =
false;
54 std::shared_ptr<SamplerVK> immutable_sampler_;
56 RenderPassVK(
const std::shared_ptr<const Context>& context,
58 std::shared_ptr<CommandBufferVK> command_buffer);
102 const std::shared_ptr<const ShaderMetadata>& metadata,
110 std::shared_ptr<const Texture>
texture,
111 const std::unique_ptr<const Sampler>& sampler)
override;
129 const std::shared_ptr<CommandBufferVK>& command_buffer)
const;
133 const vk::RenderPass& pass)
const;
To do anything rendering related with Impeller, you need a context.
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
bool IsValid() const override
bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
void SetCommandLabel(std::string_view label) override
The debugging label to use for the command.
void ReserveCommands(size_t command_count) override
Reserve [command_count] commands in the HAL command buffer.
void SetViewport(Viewport viewport) override
void SetBaseVertex(uint64_t value) override
bool SetVertexBuffer(VertexBuffer buffer) override
Specify the vertex and index buffer to use for this command.
void SetScissor(IRect scissor) override
void SetPipeline(const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline) override
The pipeline to use for this command.
void SetInstanceCount(size_t count) override
void OnSetLabel(std::string label) override
void SetStencilReference(uint32_t value) override
fml::Status Draw() override
Record the currently pending command.
bool OnEncodeCommands(const Context &context) const override
Render passes encode render commands directed as one specific render target into an underlying comman...
static const uint8_t buffer[]
std::shared_ptr< SharedObjectVKT< T > > SharedHandleVK
Metadata required to bind a combined texture and sampler.