summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-05-10 16:36:35 +0100
committerJosé Fonseca <[email protected]>2011-05-10 16:36:35 +0100
commit2812b60a84a2992516db28b37b305c2a7eb5f424 (patch)
tree4ddb3c4df998107f61a4e79d85eaa7ae393f9d02 /src/gallium
parenta67ecfeebc522bd2021160ba68cf59299cd4d9de (diff)
svga/drm: Implement svga_winsys_screen::get_hw_version.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_svga.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c
index d96b2b97427..c362aa39938 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c
@@ -201,6 +201,19 @@ vmw_svga_winsys_destroy(struct svga_winsys_screen *sws)
}
+static SVGA3dHardwareVersion
+vmw_svga_winsys_get_hw_version(struct svga_winsys_screen *sws)
+{
+ struct vmw_winsys_screen *vws = vmw_winsys_screen(sws);
+
+ if (!vws->ioctl.fifo_map) {
+ return 0;
+ }
+
+ return vws->ioctl.fifo_map[SVGA_FIFO_3D_HWVERSION];
+}
+
+
static boolean
vmw_svga_winsys_get_cap(struct svga_winsys_screen *sws,
SVGA3dDevCapIndex index,
@@ -276,6 +289,7 @@ boolean
vmw_winsys_screen_init_svga(struct vmw_winsys_screen *vws)
{
vws->base.destroy = vmw_svga_winsys_destroy;
+ vws->base.get_hw_version = vmw_svga_winsys_get_hw_version;
vws->base.get_cap = vmw_svga_winsys_get_cap;
vws->base.context_create = vmw_svga_winsys_context_create;
vws->base.surface_create = vmw_svga_winsys_surface_create;