diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2009-12-12 18:30:56 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2009-12-12 18:37:16 +0100 |
commit | 49e4b624e5f4a68d51eb9681dbd2218aea0645fa (patch) | |
tree | 8aea3badd804aafc3d18e62b0e7df56c0e89f322 /src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c | |
parent | 8413a3aefaf4968f8b17263826b34baa99c2a907 (diff) |
vmwgfx/core: Check for 3D via the get param ioctl
Diffstat (limited to 'src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c')
-rw-r--r-- | src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c b/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c index 51e455f925..ccd0b418a1 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c @@ -468,6 +468,15 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) VMW_FUNC; memset(&gp_arg, 0, sizeof(gp_arg)); + gp_arg.param = DRM_VMW_PARAM_3D; + ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, + &gp_arg, sizeof(gp_arg)); + if (ret || gp_arg.value == 0) { + debug_printf("No 3D enabled (%i, %s)\n", ret, strerror(-ret)); + goto out_err1; + } + + memset(&gp_arg, 0, sizeof(gp_arg)); gp_arg.param = DRM_VMW_PARAM_FIFO_OFFSET; ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, &gp_arg, sizeof(gp_arg)); |