diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-02-06 01:21:36 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2010-02-06 03:36:47 +0100 |
commit | 6ffb6318a05f0e6405645a155cd32e5cfbdbc2ff (patch) | |
tree | f5cc6f1acf8b0a442bb44daace1eb7b5e4f3f75f /src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c | |
parent | a9d61c286d27733d347f81ac7cfae3665accae92 (diff) |
vmware/core: Handle new scanout field
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 | 18 |
1 files changed, 17 insertions, 1 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 ccd0b418a1..f2de2c333f 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c @@ -57,6 +57,12 @@ struct vmw_region uint32_t size; }; +/* XXX: This isn't a real hardware flag, but just a hack for kernel to + * know about primary surfaces. In newer versions of the kernel + * interface the driver uses a special field. + */ +#define SVGA3D_SURFACE_HINT_SCANOUT (1 << 9) + static void vmw_check_last_cmd(struct vmw_winsys_screen *vws) { @@ -169,7 +175,17 @@ vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, vmw_printf("%s flags %d format %d\n", __FUNCTION__, flags, format); memset(&s_arg, 0, sizeof(s_arg)); - req->flags = (uint32_t) flags; + if (vws->use_old_scanout_flag && + (req->flags & SVGA3D_SURFACE_HINT_SCANOUT)) { + req->flags = (uint32_t) (flags & ~SVGA3D_SURFACE_HINT_SCANOUT); + req->scanout = false; + } else if (req->flags & SVGA3D_SURFACE_HINT_SCANOUT) { + req->flags = (uint32_t) (flags & ~SVGA3D_SURFACE_HINT_SCANOUT); + req->scanout = false; + } else { + req->flags = (uint32_t) flags; + req->scanout = false; + } req->format = (uint32_t) format; req->shareable = 1; |