}
+static int
+svga_screen_get_fd( struct pipe_screen *screen )
+{
+ struct svga_winsys_screen *sws = svga_screen(screen)->sws;
+
+ return sws->get_fd(sws);
+}
+
+
/**
* Create a new svga_screen object
*/
screen->get_name = svga_get_name;
screen->get_vendor = svga_get_vendor;
screen->get_device_vendor = svga_get_vendor; // TODO actual device vendor
+ screen->get_screen_fd = svga_screen_get_fd;
screen->get_param = svga_get_param;
screen->get_shader_param = svga_get_shader_param;
screen->get_compiler_options = svga_get_compiler_options;
SVGA3dHardwareVersion
(*get_hw_version)(struct svga_winsys_screen *sws);
+ int
+ (*get_fd)(struct svga_winsys_screen *sws);
+
boolean
(*get_cap)(struct svga_winsys_screen *sws,
SVGA3dDevCapIndex index,
/* noop */
}
+static int
+vmw_svga_winsys_get_fd(struct svga_winsys_screen *sws)
+{
+ struct vmw_winsys_screen *const vws = vmw_winsys_screen(sws);
+
+ return vws->ioctl.drm_fd;
+}
+
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_fd = vmw_svga_winsys_get_fd;
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;