EGL graphics driver enumeration

EGL graphics driver enumeration — Get information about the system's EGL drivers

Functions

Object Hierarchy

    GObject
    ╰── SrtBaseGraphicsModule
        ╰── SrtBaseJsonGraphicsModule
            ├── SrtEglExternalPlatform
            ╰── SrtEglIcd

Includes

#include <steam-runtime-tools/steam-runtime-tools.h>

Description

SrtEglIcd is an opaque object representing the metadata describing an EGL ICD. This is a reference-counted object: use g_object_ref() and g_object_unref() to manage its lifecycle.

Similarly, SrtEglExternalPlatform is an opaque object representing an EGL external platform module, as used with the NVIDIA proprietary driver.

Functions

srt_egl_external_platform_check_error ()

gboolean
srt_egl_external_platform_check_error (SrtEglExternalPlatform *self,
                                       GError **error);

Check whether we failed to load the JSON describing this EGL external platform module. Note that this does not actually dlopen() the module itself.

Parameters

self

The module

 

error

Used to return “error” if the module description could not be loaded

 

Returns

TRUE if the JSON was loaded successfully


srt_egl_external_platform_get_json_path ()

const gchar *
srt_egl_external_platform_get_json_path
                               (SrtEglExternalPlatform *self);

Return the absolute path to the JSON file representing this module.

Parameters

self

The module

 

Returns

“json-path”.

[type filename][transfer none]


srt_egl_external_platform_get_library_path ()

const gchar *
srt_egl_external_platform_get_library_path
                               (SrtEglExternalPlatform *self);

Return the library path for this module. It is either an absolute path, a path relative to srt_egl_external_platform_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 module could not be loaded, return NULL instead.

Parameters

self

The module

 

Returns

“library-path”.

[type filename][transfer none][nullable]


srt_egl_external_platform_get_issues ()

SrtLoadableIssues
srt_egl_external_platform_get_issues (SrtEglExternalPlatform *self);

Return the problems found when parsing and loading self .

Parameters

self

The module

 

Returns

A bitfield containing problems, or SRT_LOADABLE_ISSUES_NONE if no problems were found


srt_egl_external_platform_resolve_library_path ()

gchar *
srt_egl_external_platform_resolve_library_path
                               (SrtEglExternalPlatform *self);

Return the path that can be passed to dlopen() for this module.

If srt_egl_external_platform_get_library_path() is a relative path, return the absolute path that is the result of interpreting it relative to an appropriate location (the exact interpretation is subject to change, depending on upstream decisions).

Otherwise return a copy of srt_egl_external_platform_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.

Parameters

self

A module

 

Returns

A copy of “resolved-library-path”. Free with g_free().

[transfer full][type filename][nullable]


srt_egl_external_platform_new_replace_library_path ()

SrtEglExternalPlatform *
srt_egl_external_platform_new_replace_library_path
                               (SrtEglExternalPlatform *self,
                                const char *path);

Return a copy of self with the srt_egl_external_platform_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 .

Parameters

self

A module

 

path

A path.

[type filename][transfer none]

Returns

A new reference to a SrtEglExternalPlatform. Free with g_object_unref().

[transfer full]


srt_egl_external_platform_write_to_file ()

gboolean
srt_egl_external_platform_write_to_file
                               (SrtEglExternalPlatform *self,
                                const char *path,
                                GError **error);

Serialize self to the given JSON file.

Parameters

self

A module

 

path

A filename.

[type filename]

error

Used to describe the error on failure

 

Returns

TRUE on success


srt_egl_icd_check_error ()

gboolean
srt_egl_icd_check_error (SrtEglIcd *self,
                         GError **error);

Check whether we failed to load the JSON describing this EGL ICD. Note that this does not actually dlopen() the ICD itself.

Parameters

self

The ICD

 

error

Used to return “error” if the ICD description could not be loaded

 

Returns

TRUE if the JSON was loaded successfully


srt_egl_icd_get_json_path ()

const gchar *
srt_egl_icd_get_json_path (SrtEglIcd *self);

Return the absolute path to the JSON file representing this ICD.

Parameters

self

The ICD

 

Returns

“json-path”.

[type filename][transfer none]


srt_egl_icd_get_library_path ()

const gchar *
srt_egl_icd_get_library_path (SrtEglIcd *self);

Return the library path for this ICD. It is either an absolute path, a path relative to srt_egl_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.

Parameters

self

The ICD

 

Returns

“library-path”.

[type filename][transfer none][nullable]


srt_egl_icd_get_issues ()

SrtLoadableIssues
srt_egl_icd_get_issues (SrtEglIcd *self);

Return the problems found when parsing and loading self .

Parameters

self

The ICD

 

Returns

A bitfield containing problems, or SRT_LOADABLE_ISSUES_NONE if no problems were found


srt_egl_icd_resolve_library_path ()

gchar *
srt_egl_icd_resolve_library_path (SrtEglIcd *self);

Return the path that can be passed to dlopen() for this ICD.

If srt_egl_icd_get_library_path() is a relative path, return the absolute path that is the result of interpreting it relative to an appropriate location (the exact interpretation is subject to change, depending on upstream decisions).

Otherwise return a copy of srt_egl_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.

Parameters

self

An ICD

 

Returns

A copy of “resolved-library-path”. Free with g_free().

[transfer full][type filename][nullable]


srt_egl_icd_new_replace_library_path ()

SrtEglIcd *
srt_egl_icd_new_replace_library_path (SrtEglIcd *self,
                                      const char *path);

Return a copy of self with the srt_egl_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 .

Parameters

self

An ICD

 

path

A path.

[type filename][transfer none]

Returns

A new reference to a SrtEglIcd. Free with g_object_unref().

[transfer full]


srt_egl_icd_write_to_file ()

gboolean
srt_egl_icd_write_to_file (SrtEglIcd *self,
                           const char *path,
                           GError **error);

Serialize self to the given JSON file.

Parameters

self

An ICD

 

path

A filename.

[type filename]

error

Used to describe the error on failure

 

Returns

TRUE on success