summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/xa-vmwgfx/vmw_target.c
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2011-07-04 10:21:35 +0200
committerThomas Hellstrom <[email protected]>2011-07-04 10:21:35 +0200
commit424b1210d951c206e7c2fb8f2778acbd384eb247 (patch)
tree964884074e08de8072ef535ff5f2ee5f2c416b61 /src/gallium/targets/xa-vmwgfx/vmw_target.c
parenta221807dc5d69598afd1d0e0a4e715fb82a9f30d (diff)
parentf81ac1840a25ad39a9d7e46e4951e5eb45a05971 (diff)
Merge branch 'xa_branch'
Conflicts: configure.ac Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/gallium/targets/xa-vmwgfx/vmw_target.c')
-rw-r--r--src/gallium/targets/xa-vmwgfx/vmw_target.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/targets/xa-vmwgfx/vmw_target.c b/src/gallium/targets/xa-vmwgfx/vmw_target.c
new file mode 100644
index 00000000000..15089d6db26
--- /dev/null
+++ b/src/gallium/targets/xa-vmwgfx/vmw_target.c
@@ -0,0 +1,26 @@
+
+#include "target-helpers/inline_debug_helper.h"
+#include "state_tracker/drm_driver.h"
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
+
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct svga_winsys_screen *sws;
+ struct pipe_screen *screen;
+
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ screen = svga_screen_create(sws);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+}
+
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)