Top | ![]() |
![]() |
![]() |
![]() |
Vulkan graphics driver and layer enumerationVulkan graphics driver and layer enumeration — Get information about the system's Vulkan drivers |
gchar * | api-version | Read / Write / Construct Only |
GError * | error | Read / Write / Construct Only |
SrtLoadableIssues | issues | Read / Write / Construct Only |
gchar * | json-path | Read / Write / Construct Only |
gchar * | library-path | Read / Write / Construct Only |
gboolean | portability-driver | Read / Write / Construct Only |
gchar * | resolved-library-path | Read |
gchar * | api-version | Read / Write / Construct Only |
GStrv | component-layers | Read / Write / Construct Only |
gchar * | description | Read / Write / Construct Only |
GError * | error | Read / Write / Construct Only |
gchar * | implementation-version | Read / Write / Construct Only |
SrtLoadableIssues | issues | Read / Write / Construct Only |
gchar * | json-path | Read / Write / Construct Only |
gchar * | library-path | Read / Write / Construct Only |
gchar * | name | Read / Write / Construct Only |
gchar * | type | Read / Write / Construct Only |
SrtVulkanIcd is an opaque object representing the metadata describing
a Vulkan ICD.
This is a reference-counted object: use g_object_ref()
and
g_object_unref()
to manage its lifecycle.
gboolean srt_vulkan_icd_check_error (SrtVulkanIcd *self
,GError **error
);
Check whether we failed to load the JSON describing this Vulkan ICD.
Note that this does not actually
the ICD itself.dlopen()
const gchar *
srt_vulkan_icd_get_api_version (SrtVulkanIcd *self
);
Return the Vulkan API version of this ICD.
If the JSON description for this ICD could not be loaded, return NULL
instead.
const gchar *
srt_vulkan_icd_get_json_path (SrtVulkanIcd *self
);
Return the absolute path to the JSON file representing this ICD.
const gchar *
srt_vulkan_icd_get_library_path (SrtVulkanIcd *self
);
Return the library path for this ICD. It is either an absolute path,
a path relative to srt_vulkan_icd_get_json_path()
containing at least one
directory separator (slash), or a basename to be loaded from the
shared library search path.
If the JSON description for this ICD could not be loaded, return NULL
instead.
SrtLoadableIssues
srt_vulkan_icd_get_issues (SrtVulkanIcd *self
);
Return the problems found when parsing and loading self
.
gchar *
srt_vulkan_icd_resolve_library_path (SrtVulkanIcd *self
);
Return the path that can be passed to
for this ICD.dlopen()
If srt_vulkan_icd_get_library_path()
is a relative path, return the
absolute path that is the result of interpreting it relative to
srt_vulkan_icd_get_json_path()
. Otherwise return a copy of
srt_vulkan_icd_get_library_path()
.
The result is either the basename of a shared library (to be found
relative to some directory listed in $LD_LIBRARY_PATH
, /etc/ld.so.conf
,
/etc/ld.so.conf.d
or the hard-coded library search path), or an
absolute path.
A copy
of “resolved-library-path”. Free with g_free()
.
[transfer full][type filename][nullable]
SrtVulkanIcd * srt_vulkan_icd_new_replace_library_path (SrtVulkanIcd *self
,const char *path
);
Return a copy of self
with the srt_vulkan_icd_get_library_path()
changed to path
. For example, this is useful when setting up a
container where the underlying shared object will be made available
at a different absolute path.
If self
is in an error state, this returns a new reference to self
.
Note that self
issues are copied to the new SrtVulkanIcd copy, including
the eventual SRT_LOADABLE_ISSUES_DUPLICATED
.
gboolean srt_vulkan_icd_write_to_file (SrtVulkanIcd *self
,const char *path
,GError **error
);
Serialize self
to the given JSON file.
gboolean srt_vulkan_layer_check_error (const SrtVulkanLayer *self
,GError **error
);
Check whether we failed to load the JSON describing this Vulkan layer.
Note that this does not actually
the layer itself.dlopen()
const gchar *
srt_vulkan_layer_get_json_path (SrtVulkanLayer *self
);
Return the absolute path to the JSON file representing this layer.
const gchar *
srt_vulkan_layer_get_library_path (SrtVulkanLayer *self
);
Return the library path for this layer. It is either an absolute path,
a path relative to srt_vulkan_layer_get_json_path()
containing at least one
directory separator (slash), or a basename to be loaded from the
shared library search path.
If the JSON description for this layer could not be loaded, or if
“component_layers” is used, return NULL
instead.
const gchar *
srt_vulkan_layer_get_name (SrtVulkanLayer *self
);
Return the name that uniquely identify this layer.
If the JSON description for this layer could not be loaded, return NULL
instead.
const gchar *
srt_vulkan_layer_get_description (SrtVulkanLayer *self
);
Return the description of this layer.
If the JSON description for this layer could not be loaded, return NULL
instead.
const gchar *
srt_vulkan_layer_get_api_version (SrtVulkanLayer *self
);
Return the Vulkan API version of this layer.
If the JSON description for this layer could not be loaded, return NULL
instead.
gchar *
srt_vulkan_layer_resolve_library_path (SrtVulkanLayer *self
);
Return the path that can be passed to
for this layer.dlopen()
If srt_vulkan_layer_get_library_path()
is a relative path, return the
absolute path that is the result of interpreting it relative to
srt_vulkan_layer_get_json_path()
. Otherwise return a copy of
srt_vulkan_layer_get_library_path()
.
The result is either the basename of a shared library (to be found
relative to some directory listed in $LD_LIBRARY_PATH
, /etc/ld.so.conf
,
/etc/ld.so.conf.d
or the hard-coded library search path), or an
absolute path.
The basename of a
shared library or an absolute path. Free with g_free()
.
[transfer full][type filename][nullable]
const gchar *
srt_vulkan_layer_get_type_value (SrtVulkanLayer *self
);
Return the type of this layer. The expected values should be either "GLOBAL" or "INSTANCE".
If the JSON description for this layer could not be loaded, return NULL
instead.
const gchar *
srt_vulkan_layer_get_implementation_version
(SrtVulkanLayer *self
);
Return the version of the implemented layer.
If the JSON description for this layer could not be loaded, return NULL
instead.
const char * const *
srt_vulkan_layer_get_component_layers (SrtVulkanLayer *self
);
Return the component layer names that are part of a meta-layer.
If the JSON description for this layer could not be loaded, or if
“library-path” is used, return NULL
instead.
SrtLoadableIssues
srt_vulkan_layer_get_issues (SrtVulkanLayer *self
);
Return the problems found when parsing and loading self
.
SrtVulkanLayer * srt_vulkan_layer_new_replace_library_path (SrtVulkanLayer *self
,const char *path
);
Return a copy of self
with the srt_vulkan_layer_get_library_path()
changed to path
. For example, this is useful when setting up a
container where the underlying shared object will be made available
at a different absolute path.
If self
does not have “library-path” set, or if it
is in an error state, this returns a new reference to self
.
gboolean srt_vulkan_layer_write_to_file (SrtVulkanLayer *self
,const char *path
,GError **error
);
Serialize self
to the given JSON file.
“api-version”
property“api-version” gchar *
Vulkan API version implemented by this ICD.
Flags: Read / Write / Construct Only
Default value: NULL
“error”
property“error” GError *
GError describing how this ICD failed to load, or NULL.
Flags: Read / Write / Construct Only
“issues”
property“issues” SrtLoadableIssues
Problems with this ICD.
Flags: Read / Write / Construct Only
“json-path”
property“json-path” gchar *
Absolute path to JSON file describing this ICD. If examining a sysroot, this path is set as though the sysroot was the root directory. When constructing the object, a relative path can be given: it will be converted to an absolute path.
Flags: Read / Write / Construct Only
Default value: NULL
“library-path”
property“library-path” gchar *
Library implementing this ICD, expressed as a basename to be searched for in the default library search path (e.g. libvulkan_myvendor.so), a relative path containing '/' to be resolved relative to #SrtVulkanIcd:json-path (e.g. ./libvulkan_myvendor.so), or an absolute path as though the sysroot (if any) was the root (e.g. /opt/vulkan/libvulkan_myvendor.so).
Flags: Read / Write / Construct Only
Default value: NULL
“portability-driver”
property“portability-driver” gboolean
TRUE if the ICD is for a portability driver.
Flags: Read / Write / Construct Only
Default value: FALSE
“resolved-library-path”
property“resolved-library-path” gchar *
Library implementing this ICD, expressed as a basename to be searched for in the default library search path (e.g. libvulkan_myvendor.so) or an absolute path as though the sysroot, if any, was the root (e.g. /opt/vulkan/libvulkan_myvendor.so).
Flags: Read
Default value: NULL
“api-version”
property“api-version” gchar *
The version number of the Vulkan API that the shared library was built against.
Flags: Read / Write / Construct Only
Default value: NULL
“component-layers”
property“component-layers” GStrv
Component layer names that are part of a meta-layer.
Flags: Read / Write / Construct Only
“description”
property“description” gchar *
Brief description of the layer.
Flags: Read / Write / Construct Only
Default value: NULL
“error”
property“error” GError *
GError describing how this layer failed to load, or NULL.
Flags: Read / Write / Construct Only
“implementation-version”
property“implementation-version” gchar *
Version of the implemented layer.
Flags: Read / Write / Construct Only
Default value: NULL
“issues”
property“issues” SrtLoadableIssues
Problems with this layer.
Flags: Read / Write / Construct Only
“json-path”
property“json-path” gchar *
Absolute path to JSON file describing this layer. If examining a sysroot, this path is set as though the sysroot was the root directory. When constructing the object, a relative path can be given: it will be converted to an absolute path.
Flags: Read / Write / Construct Only
Default value: NULL
“library-path”
property“library-path” gchar *
Library implementing this layer, expressed as a basename to be searched for in the default library search path (e.g. vkOverlayLayer.so), a relative path containing '/' to be resolved relative to #SrtVulkanLayer:json-path (e.g. ./vkOverlayLayer.so), or an absolute path as though the sysroot (if any) was the root (e.g. /opt/vulkan/vkOverlayLayer.so).
Flags: Read / Write / Construct Only
Default value: NULL
“name”
property“name” gchar *
The name that uniquely identify this layer to applications.
Flags: Read / Write / Construct Only
Default value: NULL
“type”
property“type” gchar *
The type of this layer. It is expected to be either GLOBAL or INSTANCE.
Flags: Read / Write / Construct Only
Default value: NULL