winsys/drm: Add name field to drm_api.
authorChia-I Wu <olvaffe@gmail.com>
Sat, 2 Jan 2010 14:06:42 +0000 (22:06 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Tue, 12 Jan 2010 02:55:36 +0000 (10:55 +0800)
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>
src/gallium/include/state_tracker/drm_api.h
src/gallium/winsys/drm/i965/gem/i965_drm_api.c
src/gallium/winsys/drm/intel/gem/intel_drm_api.c
src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
src/gallium/winsys/drm/radeon/core/radeon_drm.c
src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c

index 4d1259e1ee727baf08769746b485c0a5d3d7b649..bb928928c9076e63d130d240a7803a116e8f03c8 100644 (file)
@@ -28,6 +28,8 @@ struct drm_create_screen_arg {
 
 struct drm_api
 {
+        const char *name;
+
        /**
         * Special buffer functions
         */
index fc9678d2b628a7583fcf8eceade062edb2c730e8..9a2203fc6d732dd9ffe799f823afec7988d2fc70 100644 (file)
@@ -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,
index 5ed2a10af1cee27cdc7ccac70f387a849e1ba876..450ae09b345225fd48afa84ec82d34453db751dc 100644 (file)
@@ -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,
index e5912ef77fe96ff585933368dddc732ec7a632e5..4b2c6a1025edda4df54f7249657827888bd19f40 100644 (file)
@@ -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,
index 05194fc52a2d1ad7371515ae349c545ef3eb44c0..851c22369796436c19954c3426ba1473d7b042ff 100644 (file)
@@ -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,
index 5995eee34bae1766901eca9d9eebeff29ba07dc2..4f5ccea4677124fb08b348b5ce1fcd05601c6fca 100644 (file)
@@ -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,