class IcdComponent

Defined at line 25 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

This class represents a single CFv2 component that provides a Vulkan ICD. See

the accompanying README.md for a description of what the component must

provide.

Public Methods

std::shared_ptr<IcdComponent> Create (LoaderApp * app, fidl::ClientEnd<fuchsia_component::Realm> realm, inspect::Node * parent_node, std::string component_url)

Defined at line 29 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

std::string library_path ()

library_path is essentially an arbitrary string given by `library_path` from the ICD.

Defined at line 61 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

LookupStages stage ()

Defined at line 68 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

void IcdComponent (LoaderApp * app, fidl::ClientEnd<fuchsia_component::Realm> realm, std::string component_url)

Defined at line 73 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

std::optional<std::string> GetManifestFileName ()

Defined at line 73 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

void ~IcdComponent ()

Defined at line 79 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

const std::string & child_instance_name ()

Defined at line 82 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

const std::string & component_url ()

Defined at line 83 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

fbl::RefPtr<fs::PseudoFile> manifest_file ()

Defined at line 85 of file ../../src/graphics/bin/vulkan_loader/icd_component.h

void Initialize (inspect::Node * parent_node)

Defined at line 112 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

std::optional<std::string> ReadManifest (int contents_dir_fd, const std::string & manifest_path)

Attempts to read and store manifest.json. Returns the library path if available.

Defined at line 199 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

bool ValidateMetadataJson (const std::string & component_url, const rapidjson::GenericDocument<rapidjson::UTF8<>> & doc)

Validate that the metadata json matches the schema. |component_url| is used

only when logging errors.

Defined at line 235 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

bool ValidateManifestJson (const std::string & component_url, const rapidjson::GenericDocument<rapidjson::UTF8<>> & doc)

Validate that the manifest json matches the schema. |component_url| is used

only when logging errors.

Defined at line 252 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

zx::result<zx::vmo> CloneVmo ()

Defined at line 270 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

void AddManifestToFs ()

Defined at line 96 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

void RemoveManifestFromFs ()

Defined at line 103 of file ../../src/graphics/bin/vulkan_loader/icd_component.cc

Enumerations

enum LookupStages
Name Value
kStarted 0
kFailed 1
kFinished 2

Defined at line 27 of file ../../src/graphics/bin/vulkan_loader/icd_component.h