if (!tr_api)
goto error;
+ tr_api->base.driver_name = api->driver_name;
tr_api->base.create_screen = trace_drm_create_screen;
tr_api->base.create_context = trace_drm_create_context;
tr_api->base.texture_from_shared_handle = trace_drm_texture_from_shared_handle;
struct drm_api
{
+ /**
+ * Kernel driver name, as accepted by drmOpenByName.
+ */
+ const char *driver_name;
+
/**
* Special buffer functions
*/
struct drm_api intel_drm_api =
{
+ .driver_name = "i915",
.create_context = intel_drm_create_context,
.create_screen = intel_drm_create_screen,
.texture_from_shared_handle = intel_drm_texture_from_shared_handle,
}
struct drm_api drm_api_hooks = {
+ .driver_name = "nouveau",
.create_screen = nouveau_drm_create_screen,
.create_context = nouveau_drm_create_context,
.texture_from_shared_handle = nouveau_drm_pt_from_name,
}
struct drm_api drm_api_hooks = {
+ .driver_name = "radeon",
.create_screen = radeon_create_screen,
.create_context = radeon_create_context,
.texture_from_shared_handle = radeon_texture_from_shared_handle,
};
static struct drm_api vmw_drm_api_hooks = {
+ .driver_name = "vmwgfx",
.create_screen = vmw_drm_create_screen,
.create_context = vmw_drm_create_context,
.texture_from_shared_handle = vmw_drm_texture_from_handle,