mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 05:20:23 +01:00
winsys/drm: Add name field to drm_api.
The name can be used for driver selection. It has the same name as the DRI driver does right now. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
parent
39790cab13
commit
6dafd61ab2
6 changed files with 7 additions and 0 deletions
|
|
@ -28,6 +28,8 @@ struct drm_create_screen_arg {
|
|||
|
||||
struct drm_api
|
||||
{
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
* Special buffer functions
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ destroy(struct drm_api *api)
|
|||
|
||||
struct drm_api i965_libdrm_api =
|
||||
{
|
||||
.name = "i965",
|
||||
.create_context = i965_libdrm_create_context,
|
||||
.create_screen = i965_libdrm_create_screen,
|
||||
.texture_from_shared_handle = i965_libdrm_texture_from_shared_handle,
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ destroy(struct drm_api *api)
|
|||
|
||||
struct drm_api intel_drm_api =
|
||||
{
|
||||
.name = "i915",
|
||||
.create_context = intel_drm_create_context,
|
||||
.create_screen = intel_drm_create_screen,
|
||||
.texture_from_shared_handle = intel_drm_texture_from_shared_handle,
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ nouveau_drm_handle_from_pt(struct drm_api *api, struct pipe_screen *pscreen,
|
|||
}
|
||||
|
||||
struct drm_api drm_api_hooks = {
|
||||
.name = "nouveau",
|
||||
.create_screen = nouveau_drm_create_screen,
|
||||
.create_context = nouveau_drm_create_context,
|
||||
.texture_from_shared_handle = nouveau_drm_pt_from_name,
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ static boolean radeon_local_handle_from_texture(struct drm_api *api,
|
|||
}
|
||||
|
||||
struct drm_api drm_api_hooks = {
|
||||
.name = "radeon",
|
||||
.create_screen = radeon_create_screen,
|
||||
.create_context = radeon_create_context,
|
||||
.texture_from_shared_handle = radeon_texture_from_shared_handle,
|
||||
|
|
|
|||
|
|
@ -358,6 +358,7 @@ static struct dri1_api dri1_api_hooks = {
|
|||
};
|
||||
|
||||
static struct drm_api vmw_drm_api_hooks = {
|
||||
.name = "vmwgfx",
|
||||
.create_screen = vmw_drm_create_screen,
|
||||
.create_context = vmw_drm_create_context,
|
||||
.texture_from_shared_handle = vmw_drm_texture_from_handle,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue