Enumerations
enum SearchProp
| Name | Value |
|---|---|
| INSTANCE_EXT_PROP | 0 |
| INSTANCE_LAYER_PROP | 1 |
| PHYS_DEVICE_EXT_PROP | 2 |
Defined at line 56 of file ../../src/graphics/examples/vkproto/common/utils.h
Records
-
class CommandBuffers -
class CommandPool -
class DebugUtilsMessenger -
class Device -
class FixedFunctions -
class Framebuffers -
class FuchsiaSurface -
class GraphicsPipeline -
class ImageView -
class Instance -
class PhysicalDevice -
class PhysicalDeviceProperties -
class RenderPass -
class Shader -
class Surface -
class Swapchain
Functions
-
std::optional<uint32_t> GetGpuVendorId ()This is a default implementation that returns no value. It's weak and can be overridden by
config_query.cc or other implementations.
Defined at line 57 of file ../../src/graphics/examples/vkproto/common/physical_device.cc
-
std::optional<vk::UniqueDeviceMemory> TransitionToHostVisibleImage (const vk::PhysicalDevice &physical_device,const vk::Device &device,const vk::Image &src_image,const vk::Extent2D &extent,const vk::CommandPool &command_pool,const vk::Queue &queue,vk::SubresourceLayout *host_image_layout)TransitionToHostVisibleImage
Creates a host visible destination image and transitions |src_image| to it.
|src_image| layout must be vk::ImageLayout::eTransferSrcOptimal prior to
calling this function. Transition command submission is synchronous.
Returns the device memory of the newly created host image and populates
|host_image_layout| upon success.
Defined at line 13 of file ../../src/graphics/examples/vkproto/common/readback.cc
-
bool ReadPixels (const vk::PhysicalDevice &physical_device,const vk::Device &device,const vk::Image &src_image,const vk::Extent2D &src_image_size,const vk::CommandPool &command_pool,const vk::Queue &queue,const vk::Extent2D &size,const vk::Offset2D &offset,std::vector<uint32_t> *pixels)ReadPixels
Transitions |src_image| into a host-visible, R8G8B8A8Unorm linear image that can be mapped
and read. Copies the rectangle of pixels defined by |size| at |offset| pixels from the
host image buffer into |pixels|. Unmaps the host image memory before returning.
Resizes |pixels| if |pixels->size()| isn't large enough to accommodate the copied pixels.
Defined at line 137 of file ../../src/graphics/examples/vkproto/common/readback.cc
-
bool FindRequiredProperties (const std::vector<const char *> &required_props,SearchPropsearch_prop,const char *layer,vk::PhysicalDevicephysical_device,std::vector<std::string> *missing_props_out)Using the vkEnumerate* entrypoints, search for all elements of
|required_props| to look for a match. If all elements are found,
return true. If any are missing, return false and populate
|missing_props_out| with the missing properties. If nullptr is
passed for |missing_props_out|, it will be ignored.
If |layer| is not nullptr, constrain the property search to the
specified layer only.
The type of enumeration entrypoint used is selected using the
|search_prop| parameter. Those 3 selectable entrypoints are:
vk::enumerateInstanceExtensionProperties
vk::enumerateInstanceLayerProperties
physical_device::enumerateDeviceExtensionProperties
|physical_device| must be specified for PHYS_DEVICE_EXT_PROP,
otherwise it should be nullptr.
Defined at line 83 of file ../../src/graphics/examples/vkproto/common/utils.cc
-
bool FindQueueFamilyIndex (vk::PhysicalDevicephys_device,VkSurfaceKHRsurface,vk::QueueFlagsqueue_flags,uint32_t *queue_family_index)Find queue family index from physical device. If |surface| is not nullptr,
succeed only if queue family has present support. If |queue_family_index| is
not nullptr, store the queue family index into it if found.
Defined at line 140 of file ../../src/graphics/examples/vkproto/common/utils.cc
-
vk::Result FindMemoryIndex (const vk::PhysicalDevice &phys_dev,uint32_tmemory_type_bits,const vk::MemoryPropertyFlags &memory_prop_flags,uint32_t *memory_type_index)Find physical device memory property index for |properties|. Returns
vk::Result::eErrorFormatNotSupported if a matching memory type is not found.
Defined at line 162 of file ../../src/graphics/examples/vkproto/common/utils.cc
-
void LogMemoryProperties (const vk::PhysicalDevice & phys_dev)Log physical device memory properties.
Defined at line 180 of file ../../src/graphics/examples/vkproto/common/utils.cc