svga: sync with upstream changes to surface flags
[mesa.git] / src / gallium / winsys / svga / drm / vmw_screen_svga.c
index 27a8b07016613b7e0875c438967b2fbdb2722720..9decf0c70530b9f689ee8ee6b90fae7853a05cf1 100644 (file)
@@ -170,7 +170,7 @@ vmw_svga_winsys_fence_server_sync(struct svga_winsys_screen *sws,
 
 static struct svga_winsys_surface *
 vmw_svga_winsys_surface_create(struct svga_winsys_screen *sws,
-                               SVGA3dSurfaceFlags flags,
+                               SVGA3dSurfaceAllFlags allflags,
                                SVGA3dSurfaceFormat format,
                                unsigned usage,
                                SVGA3dSize size,
@@ -184,6 +184,11 @@ vmw_svga_winsys_surface_create(struct svga_winsys_screen *sws,
    struct pb_manager *provider;
    uint32_t buffer_size;
 
+   /* Until the kernel supports 64 bits surface flag, the linux driver
+    * only honors the lower 32 bits of the surface flag.
+    */
+   SVGA3dSurface1Flags flags = (SVGA3dSurface1Flags)allflags;
+
    memset(&desc, 0, sizeof(desc));
    surface = CALLOC_STRUCT(vmw_svga_winsys_surface);
    if(!surface)