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 |
gchar * | library-arch | Read / Write / Construct Only |
gboolean | portability-driver | Read / Write / Construct Only |
gchar * | api-version | Read / Write / Construct Only |
GStrv | component-layers | Read / Write / Construct Only |
gchar * | description | Read / Write / Construct Only |
gchar * | implementation-version | Read / Write / Construct Only |
gchar * | library-arch | Read / Write / Construct Only |
gchar * | name | Read / Write / Construct Only |
gchar * | type | Read / Write / Construct Only |
GObject ╰── SrtBaseGraphicsModule ╰── SrtBaseJsonGraphicsModule ├── SrtVulkanIcd ╰── SrtVulkanLayer
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.
const gchar *
srt_vulkan_icd_get_library_arch (SrtVulkanIcd *self
);
Return a string that describes the architecture of this ICD.
The values allowed by the Vulkan specification are 32
and 64
,
indicating the size of a pointer, but the reference Vulkan-Loader
accepts any value (and therefore so does steam-runtime-tools).
This is an optional field, so if it was not available in the JSON,
or if the ICD could not be loaded, NULL
will be returned.
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_library_arch (SrtVulkanLayer *self
);
Return a string that describes the architecture of the binary
associated with “library-path”.
The meaning is the same as for srt_vulkan_icd_get_library_arch()
.
This is an optional field, so if it was not available in the JSON,
or if the layer description could not be loaded, NULL
will be returned.
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
“library-arch”
property“library-arch” gchar *
Architecture of the library implementing this ICD. The values allowed by the specification are "32" and "64", but other values are possible.
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
“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
“implementation-version”
property“implementation-version” gchar *
Version of the implemented layer.
Flags: Read / Write / Construct Only
Default value: NULL
“library-arch”
property“library-arch” gchar *
Architecture of the library binary that implements this layer. The values allowed by the specification are "32" and "64", but other values are possible.
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