class Escher
Defined at line 30 of file ../../src/ui/lib/escher/escher.h
Escher is the primary class used by clients of the Escher library.
Escher is currently not thread-safe; it (and all objects obtained from it)
must be used from a single thread.
Public Methods
EscherWeakPtr GetWeakPtr ()
Defined at line 41 of file ../../src/ui/lib/escher/escher.h
void Escher (VulkanDeviceQueuesPtr device)
Escher does not take ownership of the objects in the Vulkan context. It is
up to the application to eventually destroy them, and also to ensure that
they outlive the Escher instance.
Defined at line 78 of file ../../src/ui/lib/escher/escher.cc
void Escher (VulkanDeviceQueuesPtr device, HackFilesystemPtr filesystem, std::shared_ptr<GpuAllocator> gpu_allocator)
If |gpu_allocator| is nullptr, a default allocator will be created.
Defined at line 87 of file ../../src/ui/lib/escher/escher.cc
VulkanDeviceQueues * device ()
Defined at line 116 of file ../../src/ui/lib/escher/escher.h
vk::Device vk_device ()
Defined at line 117 of file ../../src/ui/lib/escher/escher.h
vk::PhysicalDevice vk_physical_device ()
Defined at line 118 of file ../../src/ui/lib/escher/escher.h
const VulkanContext & vulkan_context ()
Defined at line 119 of file ../../src/ui/lib/escher/escher.h
ResourceRecycler * resource_recycler ()
Defined at line 121 of file ../../src/ui/lib/escher/escher.h
GpuAllocator * gpu_allocator ()
Defined at line 122 of file ../../src/ui/lib/escher/escher.h
impl::CommandBufferSequencer * command_buffer_sequencer ()
Defined at line 123 of file ../../src/ui/lib/escher/escher.h
shaderc::Compiler * shaderc_compiler ()
Defined at line 128 of file ../../src/ui/lib/escher/escher.h
ImageFactory * image_cache ()
Defined at line 131 of file ../../src/ui/lib/escher/escher.h
BufferCache * buffer_cache ()
Defined at line 132 of file ../../src/ui/lib/escher/escher.h
SamplerCache * sampler_cache ()
Defined at line 133 of file ../../src/ui/lib/escher/escher.h
impl::MeshManager * mesh_manager ()
Defined at line 134 of file ../../src/ui/lib/escher/escher.h
impl::PipelineLayoutCache * pipeline_layout_cache ()
Defined at line 135 of file ../../src/ui/lib/escher/escher.h
impl::DescriptorSetAllocatorCache * descriptor_set_allocator_cache ()
Defined at line 136 of file ../../src/ui/lib/escher/escher.h
impl::RenderPassCache * render_pass_cache ()
Defined at line 139 of file ../../src/ui/lib/escher/escher.h
void ~Escher ()
Defined at line 139 of file ../../src/ui/lib/escher/escher.cc
impl::FramebufferAllocator * framebuffer_allocator ()
Defined at line 140 of file ../../src/ui/lib/escher/escher.h
ImageViewAllocator * image_view_allocator ()
Defined at line 141 of file ../../src/ui/lib/escher/escher.h
ChainedSemaphoreGenerator * semaphore_chain ()
Defined at line 142 of file ../../src/ui/lib/escher/escher.h
impl::CommandBufferPool * command_buffer_pool ()
Pool for CommandBuffers submitted on the main queue.
Defined at line 145 of file ../../src/ui/lib/escher/escher.h
impl::CommandBufferPool * transfer_command_buffer_pool ()
Pool for CommandBuffers submitted on the transfer queue (if one exists).
Defined at line 147 of file ../../src/ui/lib/escher/escher.h
DefaultShaderProgramFactory * shader_program_factory ()
Defined at line 153 of file ../../src/ui/lib/escher/escher.h
PipelineBuilder * pipeline_builder ()
Defined at line 155 of file ../../src/ui/lib/escher/escher.h
bool supports_timer_queries ()
Check if GPU performance profiling is supported.
Defined at line 158 of file ../../src/ui/lib/escher/escher.h
float timestamp_period ()
Defined at line 159 of file ../../src/ui/lib/escher/escher.h
bool supports_wireframe ()
Defined at line 160 of file ../../src/ui/lib/escher/escher.h
bool allow_protected_memory ()
Defined at line 161 of file ../../src/ui/lib/escher/escher.h
bool allow_ycbcr ()
Defined at line 162 of file ../../src/ui/lib/escher/escher.h
MeshBuilderPtr NewMeshBuilder (BatchGpuUploader * gpu_uploader, const MeshSpec & spec, size_t max_vertex_count, size_t max_index_count)
Implement MeshBuilderFactory interface.
Defined at line 191 of file ../../src/ui/lib/escher/escher.cc
ImagePtr NewRgbaImage (BatchGpuUploader * gpu_uploader, uint32_t width, uint32_t height, const uint8_t * bytes)
Return new Image containing the provided pixels.
Defined at line 196 of file ../../src/ui/lib/escher/escher.cc
ImagePtr NewCheckerboardImage (BatchGpuUploader * gpu_uploader, uint32_t width, uint32_t height)
Returns RGBA image.
Defined at line 201 of file ../../src/ui/lib/escher/escher.cc
ImagePtr NewGradientImage (BatchGpuUploader * gpu_uploader, uint32_t width, uint32_t height)
Returns RGBA image.
Defined at line 206 of file ../../src/ui/lib/escher/escher.cc
ImagePtr NewNoiseImage (BatchGpuUploader * gpu_uploader, uint32_t width, uint32_t height)
Returns single-channel luminance image.
Defined at line 210 of file ../../src/ui/lib/escher/escher.cc
FramePtr NewFrame (const char * trace_literal, uint64_t frame_number, bool enable_gpu_logging, escher::CommandBuffer::Type requested_type, bool use_protected_memory)
Return a new Frame, which is passed to Renderers to obtain and submit
command buffers, to add timestamps for GPU profiling, etc. If
|enable_gpu_logging| is true, GPU profiling timestamps will be logged via
FX_LOGS().
Defined at line 264 of file ../../src/ui/lib/escher/escher.cc
TexturePtr NewTexture (ImagePtr image, vk::Filter filter, vk::ImageAspectFlags aspect_mask, bool use_unnormalized_coordinates)
Construct a new Texture, which encapsulates a newly-created VkImageView and
VkSampler. |aspect_mask| is used to create the VkImageView, and |filter|
and |use_unnormalized_coordinates| are used to create the VkSampler.
Defined at line 214 of file ../../src/ui/lib/escher/escher.cc
TexturePtr NewTexture (vk::Format format, uint32_t width, uint32_t height, uint32_t sample_count, vk::ImageUsageFlags usage_flags, vk::Filter filter, vk::ImageAspectFlags aspect_flags, bool use_unnormalized_coordinates, vk::MemoryPropertyFlags memory_flags)
Construct a new Texture, which encapsulates a newly-created VkImage,
VkImageView and VkSampler. |aspect_mask| is used to create the
VkImageView, and |filter| and |use_unnormalized_coordinates| are used to
create the VkSampler.
Defined at line 228 of file ../../src/ui/lib/escher/escher.cc
BufferPtr NewBuffer (vk::DeviceSize size, vk::BufferUsageFlags usage_flags, vk::MemoryPropertyFlags memory_property_flags)
Construct a new Buffer, which encapsulates a newly-created VkBuffer.
|usage_flags| defines whether it is to be used as e.g. a uniform and/or a
vertex buffer, and |memory_property_flags| is used to select the heap that
the buffer's backing VkDeviceMemory is allocated from.
Defined at line 221 of file ../../src/ui/lib/escher/escher.cc
TexturePtr NewAttachmentTexture (vk::Format format, uint32_t width, uint32_t height, uint32_t sample_count, vk::Filter filter, vk::ImageUsageFlags additional_usage_flags, bool use_unnormalized_coordinates, vk::MemoryPropertyFlags memory_flags)
Same as the NewTexture() variant that creates the image, except that it
automatically sets up the vk::ImageAspectFlags, and adds the following to
|additional_usage_flags|:
- either eColorAttachment or eDepthAttachment, depending on |format|
- optionally eTransientAttachment, depending on |is_transient|
- optionally eInputAttachment, depending on |is_input|
Defined at line 246 of file ../../src/ui/lib/escher/escher.cc
uint64_t GetNumGpuBytesAllocated ()
Defined at line 289 of file ../../src/ui/lib/escher/escher.cc
bool Cleanup ()
Do periodic housekeeping. This is called by Renderer::EndFrame(), so you
don't need to call it if your application is constantly rendering.
However, if your app enters a "quiet period" then you might want to
arrange to call Cleanup() after the last frame has finished rendering.
Return true if cleanup was complete, and false if more cleanup remains
(in that case, the app should wait a moment before calling Cleanup()
again).
Defined at line 165 of file ../../src/ui/lib/escher/escher.cc
void set_pipeline_builder (std::unique_ptr<PipelineBuilder> pipeline_builder)
Allow clients to set the pipeline builder; if this isn't called then Escher will use a
default builder.
Defined at line 179 of file ../../src/ui/lib/escher/escher.cc
impl::CommandBufferPool * protected_command_buffer_pool ()
Pool for CommandBuffers submitted in a protected context.
Defined at line 183 of file ../../src/ui/lib/escher/escher.cc