class VulkanExtensionTest

Defined at line 28 of file ../../src/graphics/tests/vkext/vulkan_extension_test.h

Protected Members

bool is_initialized_
bool use_protected_memory_
bool device_supports_protected_memory_
unique_ptr ctx_
SynchronousInterfacePtr sysmem_allocator_
UniqueHandle vk_image_
UniqueHandle vk_buffer_
UniqueHandle vk_device_memory_
vk::DeviceSize vk_device_memory_size_
DispatchLoaderDynamic loader_

Public Methods

void set_use_protected_memory (bool use)

Defined at line 38 of file ../../src/graphics/tests/vkext/vulkan_extension_test.h

bool device_supports_protected_memory ()

Defined at line 39 of file ../../src/graphics/tests/vkext/vulkan_extension_test.h

VulkanContext & vulkan_context ()

Defined at line 41 of file ../../src/graphics/tests/vkext/vulkan_extension_test.h

void ~VulkanExtensionTest ()

Defined at line 73 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool Initialize ()

Defined at line 75 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool Exec (VkFormat format, uint32_t width, uint32_t height, bool linear, bool repeat_constraints_as_non_protected, const std::vector<fuchsia::sysmem2::ImageFormatConstraints> & format_constraints)

Defined at line 393 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool ExecBuffer (uint32_t size)

Defined at line 463 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool IsMemoryTypeCoherent (uint32_t memoryTypeIndex)

Defined at line 546 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

void WriteImage (vk::DeviceMemory memory, bool is_coherent, VkDeviceSize size_in_bytes, uint32_t fill)

Defined at line 553 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

void WriteLinearColorImageComplete (vk::DeviceMemory memory, vk::Image image, bool is_coherent, uint32_t width, uint32_t height, uint32_t fill)

Completely fill miplevel 0, array layer 0 of a 4 byte-per-pixel color image.

Defined at line 575 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

void CheckLinearImage (vk::Image image, vk::DeviceMemory memory, bool is_coherent, uint32_t width, uint32_t height, uint32_t fill)

Defined at line 602 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

Protected Methods

template <uint32_t token_count>
std::array<fuchsia::sysmem2::BufferCollectionTokenSyncPtr, token_count> MakeSharedCollection ()

Defined at line 61 of file ../../src/graphics/tests/vkext/vulkan_extension_test.h

bool InitVulkan ()

Defined at line 93 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool InitSysmemAllocator ()

Defined at line 149 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

std::vector<fuchsia::sysmem2::BufferCollectionTokenSyncPtr> MakeSharedCollection (uint32_t token_count)

Defined at line 166 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

UniqueBufferCollection CreateVkBufferCollectionForImage (fuchsia::sysmem2::BufferCollectionTokenSyncPtr token, const vk::ImageFormatConstraintsInfoFUCHSIA constraints, vk::ImageConstraintsInfoFlagsFUCHSIA flags)

Defined at line 370 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

fuchsia::sysmem2::BufferCollectionInfo AllocateSysmemCollection (std::optional<fuchsia::sysmem2::BufferCollectionConstraints> constraints, fuchsia::sysmem2::BufferCollectionTokenSyncPtr token)

Defined at line 285 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

bool InitializeDirectImage (vk::BufferCollectionFUCHSIA collection, vk::ImageCreateInfo image_create_info)

Defined at line 312 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

std::optional<uint32_t> InitializeDirectImageMemory (vk::BufferCollectionFUCHSIA collection, uint32_t expected_count)

Returns the memory type index if it succeeds; otherwise returns std::nullopt.

Defined at line 337 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

void CheckLinearSubresourceLayout (VkFormat format, uint32_t width)

Defined at line 193 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc

void ValidateBufferProperties (const VkMemoryRequirements & requirements, const vk::BufferCollectionFUCHSIA collection, uint32_t expected_count, uint32_t * memory_type_out)

Defined at line 249 of file ../../src/graphics/tests/vkext/vulkan_extension_test.cc