2009-10-02 03:16:10 +01:00
|
|
|
/**************************************************************************
|
2009-11-03 01:32:58 +00:00
|
|
|
*
|
2009-10-02 03:16:10 +01:00
|
|
|
* Copyright 2009 Younes Manton.
|
|
|
|
* All Rights Reserved.
|
2009-11-03 01:32:58 +00:00
|
|
|
*
|
2009-10-02 03:16:10 +01:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
2009-11-03 01:32:58 +00:00
|
|
|
*
|
2009-10-02 03:16:10 +01:00
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
2009-11-03 01:32:58 +00:00
|
|
|
*
|
2009-10-02 03:16:10 +01:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
|
2009-10-02 03:16:10 +01:00
|
|
|
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2009-11-03 01:32:58 +00:00
|
|
|
*
|
2009-10-02 03:16:10 +01:00
|
|
|
**************************************************************************/
|
|
|
|
|
2012-03-26 18:40:42 +01:00
|
|
|
/*
|
2014-02-11 10:55:47 +00:00
|
|
|
* Target makefiles directly refer to vl_winsys_dri.c to avoid DRI dependency
|
2012-03-26 18:40:42 +01:00
|
|
|
*/
|
|
|
|
|
2008-07-23 03:26:26 +01:00
|
|
|
#ifndef vl_winsys_h
|
|
|
|
#define vl_winsys_h
|
|
|
|
|
2017-05-02 17:53:17 +01:00
|
|
|
#ifdef HAVE_X11_PLATFORM
|
2008-07-23 03:26:26 +01:00
|
|
|
#include <X11/Xlib.h>
|
2017-05-02 17:53:17 +01:00
|
|
|
#endif
|
2011-08-27 16:51:59 +01:00
|
|
|
#include "pipe/p_defines.h"
|
|
|
|
#include "pipe/p_format.h"
|
2008-07-23 03:26:26 +01:00
|
|
|
|
2009-09-28 01:18:02 +01:00
|
|
|
struct pipe_screen;
|
2010-06-06 16:48:47 +01:00
|
|
|
struct pipe_surface;
|
2014-06-12 15:41:29 +01:00
|
|
|
struct pipe_loader_device;
|
2008-07-23 03:26:26 +01:00
|
|
|
|
2009-11-03 01:32:58 +00:00
|
|
|
struct vl_screen
|
|
|
|
{
|
2015-11-06 22:34:01 +00:00
|
|
|
void (*destroy)(struct vl_screen *vscreen);
|
|
|
|
|
|
|
|
struct pipe_resource *
|
|
|
|
(*texture_from_drawable)(struct vl_screen *vscreen, void *drawable);
|
|
|
|
|
|
|
|
struct u_rect *
|
|
|
|
(*get_dirty_area)(struct vl_screen *vscreen);
|
|
|
|
|
|
|
|
uint64_t
|
|
|
|
(*get_timestamp)(struct vl_screen *vscreen, void *drawable);
|
|
|
|
|
|
|
|
void
|
|
|
|
(*set_next_timestamp)(struct vl_screen *vscreen, uint64_t stamp);
|
|
|
|
|
|
|
|
void *
|
|
|
|
(*get_private)(struct vl_screen *vscreen);
|
|
|
|
|
2017-01-11 16:57:13 +00:00
|
|
|
void
|
|
|
|
(*set_back_texture_from_output)(struct vl_screen *vscreen,
|
|
|
|
struct pipe_resource *buffer,
|
|
|
|
uint32_t width, uint32_t height);
|
|
|
|
|
2009-11-03 01:32:58 +00:00
|
|
|
struct pipe_screen *pscreen;
|
2014-06-12 15:41:29 +01:00
|
|
|
struct pipe_loader_device *dev;
|
2018-09-07 20:17:31 +01:00
|
|
|
|
|
|
|
void *xcb_screen;
|
2018-09-10 21:02:29 +01:00
|
|
|
uint32_t color_depth;
|
2009-11-03 01:32:58 +00:00
|
|
|
};
|
|
|
|
|
2017-05-02 17:53:17 +01:00
|
|
|
#ifdef HAVE_X11_PLATFORM
|
2018-09-07 20:17:31 +01:00
|
|
|
uint32_t
|
|
|
|
vl_dri2_format_for_depth(struct vl_screen *vscreen, int depth);
|
|
|
|
|
2015-11-06 23:39:01 +00:00
|
|
|
struct vl_screen *
|
2015-11-09 11:17:07 +00:00
|
|
|
vl_dri2_screen_create(Display *display, int screen);
|
2017-05-02 17:53:17 +01:00
|
|
|
#else
|
|
|
|
static inline struct vl_screen *
|
|
|
|
vl_dri2_screen_create(void *display, int screen) { return NULL; };
|
|
|
|
#endif
|
2015-11-09 11:17:07 +00:00
|
|
|
|
2017-05-02 17:53:17 +01:00
|
|
|
#if defined(HAVE_X11_PLATFORM) && defined(HAVE_DRI3)
|
2015-11-09 11:17:07 +00:00
|
|
|
struct vl_screen *
|
2017-05-02 17:53:17 +01:00
|
|
|
vl_dri3_screen_create(Display *display, int screen);
|
|
|
|
#else
|
|
|
|
static inline struct vl_screen *
|
|
|
|
vl_dri3_screen_create(void *display, int screen) { return NULL; };
|
|
|
|
#endif
|
2015-11-04 21:24:26 +00:00
|
|
|
|
2019-06-05 13:34:23 +01:00
|
|
|
/* Always enable the DRM vl winsys */
|
2016-03-07 19:51:32 +00:00
|
|
|
struct vl_screen *
|
2017-05-02 17:53:17 +01:00
|
|
|
vl_drm_screen_create(int fd);
|
2016-03-07 19:51:32 +00:00
|
|
|
|
2022-05-02 17:25:56 +01:00
|
|
|
#ifdef USE_XSHM
|
|
|
|
struct vl_screen *
|
|
|
|
vl_xlib_swrast_screen_create(Display *display, int screen);
|
|
|
|
static inline struct vl_screen *
|
|
|
|
vl_vgem_drm_screen_create(int fd) { return NULL; }
|
|
|
|
#else
|
|
|
|
struct vl_screen *
|
|
|
|
vl_vgem_drm_screen_create(int fd);
|
|
|
|
static inline struct vl_screen *
|
2022-05-19 14:43:33 +01:00
|
|
|
vl_xlib_swrast_screen_create(void *display, int screen) { return NULL; }
|
2022-05-02 17:25:56 +01:00
|
|
|
#endif
|
|
|
|
|
2009-09-28 01:18:02 +01:00
|
|
|
#endif
|