diff options
Diffstat (limited to 'hw/kdrive')
32 files changed, 320 insertions, 625 deletions
diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index 5803644d5..767e1c40d 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -1,10 +1,10 @@ if KDRIVEVESA -VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \ +VESA_SUBDIRS = vesa ati chips i810 mach64 mga nvidia pm2 r128 \ smi via endif if BUILD_KDRIVEFBDEVLIB -FBDEV_SUBDIRS = fbdev +FBDEV_SUBDIRS = fbdev epson endif if XFAKESERVER diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am index 8429250f3..31462bb04 100644 --- a/hw/kdrive/ati/Makefile.am +++ b/hw/kdrive/ati/Makefile.am @@ -58,6 +58,10 @@ ATI_LIBS = \ $(DRI_LIBS) \ @KDRIVE_LIBS@ +if GLX +Xati_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xati_LDADD = \ $(ATI_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index 51b0edf31..46e176051 100644 --- a/hw/kdrive/chips/Makefile.am +++ b/hw/kdrive/chips/Makefile.am @@ -20,6 +20,10 @@ CHIPS_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xchips_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xchips_LDADD = \ $(CHIPS_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/ephyr/GL/internal/dri_interface.h b/hw/kdrive/ephyr/GL/internal/dri_interface.h deleted file mode 100644 index 8d24e311f..000000000 --- a/hw/kdrive/ephyr/GL/internal/dri_interface.h +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * 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 - * on 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: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * 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. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR 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. - */ - -/** - * \file dri_interface.h - * - * This file contains all the types and functions that define the interface - * between a DRI driver and driver loader. Currently, the most common driver - * loader is the XFree86 libGL.so. However, other loaders do exist, and in - * the future the server-side libglx.a will also be a loader. - * - * \author Kevin E. Martin <kevin@precisioninsight.com> - * \author Ian Romanick <idr@us.ibm.com> - */ - -#ifndef DRI_INTERFACE_H -#define DRI_INTERFACE_H - -#include <GL/internal/glcore.h> -#include <drm.h> - -/** - * \name DRI interface structures - * - * The following structures define the interface between the GLX client - * side library and the DRI (direct rendering infrastructure). - */ -/*@{*/ -typedef struct __DRIdisplayRec __DRIdisplay; -typedef struct __DRIscreenRec __DRIscreen; -typedef struct __DRIcontextRec __DRIcontext; -typedef struct __DRIdrawableRec __DRIdrawable; -typedef struct __DRIdriverRec __DRIdriver; -typedef struct __DRIframebufferRec __DRIframebuffer; -typedef struct __DRIversionRec __DRIversion; -typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods; -typedef unsigned long __DRIid; -typedef void __DRInativeDisplay; -/*@}*/ - - -/** - * \name Functions provided by the driver loader. - */ -/*@{*/ -/** - * Type of a pointer to \c glXGetScreenDriver, as returned by - * \c glXGetProcAddress. This function is used to get the name of the DRI - * driver for the specified screen of the specified display. The driver - * name is typically used with \c glXGetDriverConfig. - * - * \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig - */ -typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum); - -/** - * Type of a pointer to \c glXGetDriverConfig, as returned by - * \c glXGetProcAddress. This function is used to get the XML document - * describing the configuration options available for the specified driver. - * - * \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver - */ -typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName); - -/** - * Type of a pointer to \c glxEnableExtension, as returned by - * \c __DRIinterfaceMethods::getProcAddress. This function is used to enable - * a GLX extension on the specified screen. - */ -typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name ); -/*@}*/ - - -/** - * \name Functions and data provided by the driver. - */ -/*@{*/ - -typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn, - __DRIscreen *psc, const __GLcontextModes * modes, - const __DRIversion * ddx_version, const __DRIversion * dri_version, - const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, - void * pSAREA, int fd, int internal_api_version, - const __DRIinterfaceMethods * interface, - __GLcontextModes ** driver_modes); -typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC; -extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727; - - -/** - * XML document describing the configuration options supported by the - * driver. - */ -extern const char __driConfigOptions[]; - -/*@}*/ - - -/** - * Stored version of some component (i.e., server-side DRI module, kernel-side - * DRM, etc.). - * - * \todo - * There are several data structures that explicitly store a major version, - * minor version, and patch level. These structures should be modified to - * have a \c __DRIversionRec instead. - */ -struct __DRIversionRec { - int major; /**< Major version number. */ - int minor; /**< Minor version number. */ - int patch; /**< Patch-level. */ -}; - - -typedef void (*__DRIfuncPtr)(void); - -struct __DRIinterfaceMethodsRec { - /** - * Get pointer to named function. - */ - __DRIfuncPtr (*getProcAddress)( const char * proc_name ); - - /** - * Create a list of \c __GLcontextModes structures. - */ - __GLcontextModes * (*createContextModes)(unsigned count, - size_t minimum_bytes_per_struct); - - /** - * Destroy a list of \c __GLcontextModes structures. - * - * \todo - * Determine if the drivers actually need to call this. - */ - void (*destroyContextModes)( __GLcontextModes * modes ); - - /** - * Get the \c __DRIscreen for a given display and screen number. - */ - __DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum); - - - /** - * \name Client/server protocol functions. - * - * These functions implement the DRI client/server protocol for - * context and drawable operations. Platforms that do not implement - * the wire protocol (e.g., EGL) will implement glorified no-op functions. - */ - /*@{*/ - /** - * Determine if the specified window ID still exists. - * - * \note - * Implementations may assume that the driver will only pass an ID into - * this function that actually corresponds to a window. On - * implementations where windows can only be destroyed by the DRI driver - * (e.g., EGL), this function is allowed to always return \c GL_TRUE. - */ - GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw); - - /** - * Create the server-side portion of the GL context. - */ - GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum, - int configID, void * contextID, drm_context_t * hw_context ); - - /** - * Destroy the server-side portion of the GL context. - */ - GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum, - __DRIid context ); - - /** - * Create the server-side portion of the drawable. - */ - GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable, drm_drawable_t * hHWDrawable ); - - /** - * Destroy the server-side portion of the drawable. - */ - GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable ); - - /** - * This function is used to get information about the position, size, and - * clip rects of a drawable. - */ - GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn, - __DRIid draw, unsigned int * index, unsigned int * stamp, - int * x, int * y, int * width, int * height, - int * numClipRects, drm_clip_rect_t ** pClipRects, - int * backX, int * backY, - int * numBackClipRects, drm_clip_rect_t ** pBackClipRects ); - /*@}*/ - - - /** - * \name Timing related functions. - */ - /*@{*/ - /** - * Get the 64-bit unadjusted system time (UST). - */ - int (*getUST)(int64_t * ust); - - /** - * Get the media stream counter (MSC) rate. - * - * Matching the definition in GLX_OML_sync_control, this function returns - * the rate of the "media stream counter". In practical terms, this is - * the frame refresh rate of the display. - */ - GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable, - int32_t * numerator, int32_t * denominator); - /*@}*/ - - /** - * Reports areas of the given drawable which have been modified by the - * driver. - * - * \param drawable which the drawing was done to. - * \param rects rectangles affected, with the drawable origin as the - * origin. - * \param x X offset of the drawable within the screen (used in the - * front_buffer case) - * \param y Y offset of the drawable within the screen. - * \param front_buffer boolean flag for whether the drawing to the - * drawable was actually done directly to the front buffer (instead - * of backing storage, for example) - */ - void (*reportDamage)(__DRInativeDisplay * dpy, int screen, - __DRIid drawable, - int x, int y, - drm_clip_rect_t *rects, int num_rects, - int front_buffer); -}; - - -/** - * Framebuffer information record. Used by libGL to communicate information - * about the framebuffer to the driver's \c __driCreateNewScreen function. - * - * In XFree86, most of this information is derrived from data returned by - * calling \c XF86DRIGetDeviceInfo. - * - * \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen - * __driUtilCreateNewScreen CallCreateNewScreen - * - * \bug This structure could be better named. - */ -struct __DRIframebufferRec { - unsigned char *base; /**< Framebuffer base address in the CPU's - * address space. This value is calculated by - * calling \c drmMap on the framebuffer handle - * returned by \c XF86DRIGetDeviceInfo (or a - * similar function). - */ - int size; /**< Framebuffer size, in bytes. */ - int stride; /**< Number of bytes from one line to the next. */ - int width; /**< Pixel width of the framebuffer. */ - int height; /**< Pixel height of the framebuffer. */ - int dev_priv_size; /**< Size of the driver's dev-priv structure. */ - void *dev_priv; /**< Pointer to the driver's dev-priv structure. */ -}; - - -/** - * Screen dependent methods. This structure is initialized during the - * \c __DRIdisplayRec::createScreen call. - */ -struct __DRIscreenRec { - /** - * Method to destroy the private DRI screen data. - */ - void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate); - - /** - * Method to create the private DRI drawable data and initialize the - * drawable dependent methods. - */ - void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - __DRIid draw, __DRIdrawable *pdraw, - int renderType, const int *attrs); - - /** - * Method to return a pointer to the DRI drawable data. - */ - __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw, - void *drawablePrivate); - - /** - * Opaque pointer to private per screen direct rendering data. \c NULL - * if direct rendering is not supported on this screen. Never - * dereferenced in libGL. - */ - void *private; - - /** - * Get the number of vertical refreshes since some point in time before - * this function was first called (i.e., system start up). - * - * \since Internal API version 20030317. - */ - int (*getMSC)( void *screenPrivate, int64_t *msc ); - - /** - * Opaque pointer that points back to the containing - * \c __GLXscreenConfigs. This data structure is shared with DRI drivers - * but \c __GLXscreenConfigs is not. However, they are needed by some GLX - * functions called by DRI drivers. - * - * \since Internal API version 20030813. - */ - void *screenConfigs; - - /** - * Functions associated with MESA_allocate_memory. - * - * \since Internal API version 20030815. - */ - /*@{*/ - void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size, - GLfloat readfreq, GLfloat writefreq, - GLfloat priority); - - void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer); - - GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer); - /*@}*/ - - /** - * Method to create the private DRI context data and initialize the - * context dependent methods. - * - * \since Internal API version 20031201. - */ - void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, - int render_type, - void *sharedPrivate, __DRIcontext *pctx); - - /** - * Method to override base texture image with a driver specific 'offset'. - * The depth passed in allows e.g. to ignore the alpha channel of texture - * images where the non-alpha components don't occupy a whole texel. - * - * For GLX_EXT_texture_from_pixmap with AIGLX. - * - * \since Internal API version 20070121. - */ - void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname, - unsigned long long offset, GLint depth, GLuint pitch); -}; - -/** - * Context dependent methods. This structure is initialized during the - * \c __DRIscreenRec::createContext call. - */ -struct __DRIcontextRec { - /** - * Method to destroy the private DRI context data. - */ - void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate); - - /** - * Opaque pointer to private per context direct rendering data. - * \c NULL if direct rendering is not supported on the display or - * screen used to create this context. Never dereferenced in libGL. - */ - void *private; - - /** - * Pointer to the mode used to create this context. - * - * \since Internal API version 20040317. - */ - const __GLcontextModes * mode; - - /** - * Method to bind a DRI drawable to a DRI graphics context. - * - * \since Internal API version 20050727. - */ - GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); - - /** - * Method to unbind a DRI drawable from a DRI graphics context. - * - * \since Internal API version 20050727. - */ - GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); -}; - -/** - * Drawable dependent methods. This structure is initialized during the - * \c __DRIscreenRec::createDrawable call. \c createDrawable is not called - * by libGL at this time. It's currently used via the dri_util.c utility code - * instead. - */ -struct __DRIdrawableRec { - /** - * Method to destroy the private DRI drawable data. - */ - void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate); - - /** - * Method to swap the front and back buffers. - */ - void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate); - - /** - * Opaque pointer to private per drawable direct rendering data. - * \c NULL if direct rendering is not supported on the display or - * screen used to create this drawable. Never dereferenced in libGL. - */ - void *private; - - /** - * Get the number of completed swap buffers for this drawable. - * - * \since Internal API version 20030317. - */ - int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ); - - /** - * Wait for the SBC to be greater than or equal target_sbc. - * - * \since Internal API version 20030317. - */ - int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_sbc, - int64_t * msc, int64_t * sbc ); - - /** - * Wait for the MSC to equal target_msc, or, if that has already passed, - * the next time (MSC % divisor) is equal to remainder. If divisor is - * zero, the function will return as soon as MSC is greater than or equal - * to target_msc. - * - * \since Internal API version 20030317. - */ - int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv, - int64_t target_msc, int64_t divisor, int64_t remainder, - int64_t * msc, int64_t * sbc ); - - /** - * Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once - * rendering is complete, waits until MSC is equal to target_msc, or - * if that has already passed, waits until (MSC % divisor) is equal - * to remainder. If divisor is zero, the swap will happen as soon as - * MSC is greater than or equal to target_msc. - * - * \since Internal API version 20030317. - */ - int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate, - int64_t target_msc, - int64_t divisor, int64_t remainder); - - /** - * Enable or disable frame usage tracking. - * - * \since Internal API version 20030317. - */ - int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable); - - /** - * Retrieve frame usage information. - * - * \since Internal API version 20030317. - */ - int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, - int64_t * sbc, int64_t * missedFrames, - float * lastMissedUsage, float * usage ); - - /** - * Used by drivers that implement the GLX_SGI_swap_control or - * GLX_MESA_swap_control extension. - * - * \since Internal API version 20030317. - */ - unsigned swap_interval; - - /** - * Used by drivers that implement the GLX_MESA_copy_sub_buffer extension. - * - * \since Internal API version 20060314. - */ - void (*copySubBuffer)(__DRInativeDisplay *dpy, void *drawablePrivate, - int x, int y, int w, int h); -}; - -#endif diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index 81d3d69ea..526987672 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -1,89 +1,90 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - @KDRIVE_CFLAGS@ \ - -I$(srcdir)/../../../exa +INCLUDES = \ + @KDRIVE_INCS@ \ + @KDRIVE_CFLAGS@ \ + @XEPHYR_INCS@ \ + @XEPHYR_CFLAGS@ \ + @DRIPROTO_CFLAGS@ \ + -I$(top_srcdir) \ + -I$(top_srcdir)/exa if XV - LIBXEPHYR_HOSTXV=libxephyr-hostxv.a -else - LIBXEPHYR_HOSTXV= +LIBXEPHYR_HOSTXV=libxephyr-hostxv.a endif -if XEPHYR_HAS_DRI - LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a -else - LIBXEPHYR_HOSTDRI= +if DRI +LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a endif noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a bin_PROGRAMS = Xephyr -libxephyr_hostx_a_SOURCES = \ - hostx.c \ +HOSTX_SRCS = \ + hostx.c \ hostx.h -libxephyr_hostxv_a_INCLUDES = @XEPHYR_INCS@ - -if XV -libxephyr_hostxv_a_SOURCES= \ - ephyrhostvideo.c \ +HOSTVIDEO_SRCS = \ + ephyrvideo.c \ + ephyrhostvideo.c \ ephyrhostvideo.h -endif - -if XEPHYR_HAS_DRI - -libxephyr_hostdri_a_SOURCES= \ -ephyrdriext.c \ -ephyrdriext.h \ -ephyrdri.c \ -ephyrdri.h \ -XF86dri.c \ -ephyrglxext.c \ -ephyrglxext.h \ -ephyrhostglx.c \ -ephyrhostglx.h -libxephyr_hostdri_a_CFLAGS= \ --I$(top_srcdir) \ -@LIBDRM_CFLAGS@ \ -@DRIPROTO_CFLAGS@ +HOSTDRI_SRCS = \ + ephyrdriext.c \ + ephyrdriext.h \ + ephyrdri.c \ + ephyrdri.h \ + XF86dri.c \ + xf86dri.h \ + ephyrglxext.c \ + ephyrglxext.h \ + ephyrhostglx.c \ + ephyrhostglx.h + +XEPHYR_SRCS = \ + ephyr.c \ + ephyr.h \ + ephyrlog.h \ + ephyr_draw.c \ + os.c + +libxephyr_hostx_a_SOURCES = $(HOSTX_SRCS) +if XV +libxephyr_hostxv_a_SOURCES = $(HOSTVIDEO_SRCS) endif -libxephyr_a_SOURCES = \ - ephyr.c \ - ephyr_draw.c \ - ephyrvideo.c \ - os.c \ - hostx.h \ - ephyr.h \ - ephyrlog.h +if DRI +libxephyr_hostdri_a_SOURCES = $(HOSTDRI_SRCS) +endif -libxephyr_a_CFLAGS = \ --I$(top_srcdir) \ -@LIBDRM_CFLAGS@ +libxephyr_a_SOURCES = $(XEPHYR_SRCS) Xephyr_SOURCES = \ ephyrinit.c +if GLX +Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xephyr_LDADD = \ libxephyr.a \ - libxephyr-hostx.a \ + libxephyr-hostx.a \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ - ../../../exa/libexa.la \ + $(top_builddir)/exa/libexa.la \ @KDRIVE_LIBS@ \ - @XEPHYR_LIBS@ \ - @LIBDRM_LIBS@ \ - @XEPHYR_DRI_LIBS@ + @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = \ libxephyr.a \ - libxephyr-hostx.a \ + libxephyr-hostx.a \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ @KDRIVE_LOCAL_LIBS@ relink: rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) + +EXTRA_DIST = \ + $(HOSTVIDEO_SRCS) \ + $(HOSTDRI_SRCS) diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c index e656ff5a0..be65edf5b 100644 --- a/hw/kdrive/ephyr/XF86dri.c +++ b/hw/kdrive/ephyr/XF86dri.c @@ -46,8 +46,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdrive-config.h> #endif -#ifdef XEPHYR_DRI - /* THIS IS NOT AN X CONSORTIUM STANDARD */ #define NEED_REPLIES @@ -55,9 +53,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> #include <GL/glx.h> -#include <X11/dri/xf86dri.h> +#include "xf86dri.h" #include <X11/dri/xf86dristr.h> -#include "GL/internal/dri_interface.h" static XExtensionInfo _xf86dri_info_data; static XExtensionInfo *xf86dri_info = &_xf86dri_info_data; @@ -640,5 +637,3 @@ XF86DRICloseFullScreen(Display *dpy, int screen, Drawable drawable) (void) drawable; return True; } -#endif /*EPHYR_DRI*/ - diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index b02f9903c..3989d0d9f 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -32,11 +32,11 @@ #include "scrnintstr.h" #include "ephyrlog.h" -#ifdef XEPHYR_DRI +#ifdef XF86DRI #include "ephyrdri.h" #include "ephyrdriext.h" #include "ephyrglxext.h" -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ extern int KdTsPhyScreen; #ifdef GLXEXT @@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv) screen->fb[0].depth = 16; screen->fb[0].bitsPerPixel = 16; } - else + else if (screen->fb[0].depth <= 24) { screen->fb[0].depth = 24; screen->fb[0].bitsPerPixel = 32; } + else if (screen->fb[0].depth <= 30) + { + screen->fb[0].depth = 30; + screen->fb[0].bitsPerPixel = 32; + } + else + { + ErrorF("\nXephyr: Unsupported screen depth %d\n", + screen->fb[0].depth); + return FALSE; + } hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask); @@ -631,7 +642,7 @@ ephyrInitScreen (ScreenPtr pScreen) } #endif /*XV*/ -#ifdef XEPHYR_DRI +#ifdef XF86DRI if (!ephyrNoDRI && !hostx_has_dri ()) { EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ; ephyrNoDRI = TRUE ; @@ -841,7 +852,7 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = ephyrWarpCursor }; -#ifdef XEPHYR_DRI +#ifdef XF86DRI /** * find if the remote window denoted by a_remote * is paired with an internal Window within the Xephyr server. @@ -873,7 +884,7 @@ ephyrExposePairedWindow (int a_remote) screen->WindowExposures (pair->local, ®, NullRegion); REGION_UNINIT (screen, ®); } -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ void ephyrPoll(void) @@ -908,14 +919,14 @@ ephyrPoll(void) else { int x=0, y=0; -#ifdef XEPHYR_DRI +#ifdef XF86DRI EphyrWindowPair *pair = NULL; #endif EPHYR_LOG ("enqueuing mouse motion:%d\n", ephyrCurScreen) ; x = ev.data.mouse_motion.x; y = ev.data.mouse_motion.y; EPHYR_LOG ("initial (x,y):(%d,%d)\n", x, y) ; -#ifdef XEPHYR_DRI +#ifdef XF86DRI EPHYR_LOG ("is this window peered by a gl drawable ?\n") ; if (findWindowPairFromRemote (ev.data.mouse_motion.window, &pair)) @@ -972,7 +983,7 @@ ephyrPoll(void) KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; -#ifdef XEPHYR_DRI +#ifdef XF86DRI case EPHYR_EV_EXPOSE: /* * We only receive expose events when the expose event have @@ -982,7 +993,7 @@ ephyrPoll(void) */ ephyrExposePairedWindow (ev.data.expose.window); break; -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ default: break; diff --git a/hw/kdrive/ephyr/ephyrdri.c b/hw/kdrive/ephyr/ephyrdri.c index 53a96ba11..9aa68b126 100644 --- a/hw/kdrive/ephyr/ephyrdri.c +++ b/hw/kdrive/ephyr/ephyrdri.c @@ -29,13 +29,10 @@ #include <kdrive-config.h> #endif -#ifdef XEPHYR_DRI - #include <X11/Xutil.h> #include <X11/Xlibint.h> -/*#define _XF86DRI_SERVER_*/ #include <GL/glx.h> -#include <X11/dri/xf86dri.h> +#include "xf86dri.h" #include "hostx.h" #include "ephyrdri.h" #define _HAVE_XALLOC_DECLS @@ -287,5 +284,3 @@ ephyrDRIGetDeviceInfo (int a_screen, EPHYR_LOG ("leave:%d\n", is_ok) ; return is_ok ; } -#endif /*EPHYR_DRI*/ - diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index fafe56d1f..883e3309d 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -32,8 +32,6 @@ #include <kdrive-config.h> #endif -#ifdef XEPHYR_DRI - #include <string.h> #define NEED_REPLIES @@ -1439,5 +1437,3 @@ SProcXF86DRIDispatch (register ClientPtr client) } } } - -#endif /*XEPHYR_DRI*/ diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c index 43a634d24..2e08e392c 100644 --- a/hw/kdrive/ephyr/ephyrglxext.c +++ b/hw/kdrive/ephyr/ephyrglxext.c @@ -42,8 +42,6 @@ #include "hostx.h" -#ifdef XEPHYR_DRI - #ifndef TRUE #define TRUE 1 #endif @@ -727,6 +725,3 @@ ephyrGLXIsDirectSwap (__GLXclientState *a_cl, GLbyte *a_pc) { return ephyrGLXIsDirectReal (a_cl, a_pc, TRUE) ; } - -#endif /*XEPHYR_DRI*/ - diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index f5db5be16..6d783d279 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -41,7 +41,6 @@ #include "ephyrlog.h" #include "hostx.h" -#ifdef XEPHYR_DRI enum VisualConfRequestType { EPHYR_GET_FB_CONFIG, EPHYR_VENDOR_PRIV_GET_FB_CONFIG_SGIX, @@ -687,6 +686,3 @@ out: EPHYR_LOG ("leave\n") ; return is_ok ; } - -#endif /*XEPHYR_DRI*/ - diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 1a71d0641..74f9f1628 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -45,12 +45,12 @@ #include <X11/keysym.h> #include <X11/extensions/XShm.h> #include <X11/extensions/shape.h> -#ifdef XEPHYR_DRI +#ifdef XF86DRI #include <GL/glx.h> -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ #include "ephyrlog.h" -#ifdef XEPHYR_DRI +#ifdef XF86DRI extern Bool XF86DRIQueryExtension (Display *dpy, int *event_basep, int *error_basep); @@ -1315,7 +1315,7 @@ hostx_has_xshape (void) return TRUE; } -#ifdef XEPHYR_DRI +#ifdef XF86DRI typedef struct { int is_valid ; int local_id ; @@ -1418,5 +1418,4 @@ hostx_has_glx (void) return TRUE ; } -#endif /*XEPHYR_DRI*/ - +#endif /* XF86DRI */ diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 47ba61b5b..c1b1958de 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -244,7 +244,7 @@ int hostx_set_window_clipping_rectangles (int a_window, int a_num_rects) ; int hostx_has_xshape (void) ; -#ifdef XEPHYR_DRI +#ifdef XF86DRI int hostx_lookup_peer_window (void *a_local_window, int *a_host_peer /*out parameter*/) ; int @@ -256,6 +256,6 @@ hostx_get_resource_id_peer (int a_local_resource_id, int hostx_has_dri (void) ; int hostx_has_glx (void) ; -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ #endif /*_XLIBS_STUFF_H_*/ diff --git a/hw/kdrive/ephyr/xf86dri.h b/hw/kdrive/ephyr/xf86dri.h new file mode 100644 index 000000000..cd650b582 --- /dev/null +++ b/hw/kdrive/ephyr/xf86dri.h @@ -0,0 +1,120 @@ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +All Rights Reserved. + +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: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +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. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +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. + +**************************************************************************/ + +/** + * \file xf86dri.h + * Protocol numbers and function prototypes for DRI X protocol. + * + * \author Kevin E. Martin <martin@valinux.com> + * \author Jens Owen <jens@tungstengraphics.com> + * \author Rickard E. (Rik) Faith <faith@valinux.com> + */ + +#ifndef _XF86DRI_H_ +#define _XF86DRI_H_ + +#include <X11/Xfuncproto.h> +#include <xf86drm.h> + +#define X_XF86DRIQueryVersion 0 +#define X_XF86DRIQueryDirectRenderingCapable 1 +#define X_XF86DRIOpenConnection 2 +#define X_XF86DRICloseConnection 3 +#define X_XF86DRIGetClientDriverName 4 +#define X_XF86DRICreateContext 5 +#define X_XF86DRIDestroyContext 6 +#define X_XF86DRICreateDrawable 7 +#define X_XF86DRIDestroyDrawable 8 +#define X_XF86DRIGetDrawableInfo 9 +#define X_XF86DRIGetDeviceInfo 10 +#define X_XF86DRIAuthConnection 11 +#define X_XF86DRIOpenFullScreen 12 /* Deprecated */ +#define X_XF86DRICloseFullScreen 13 /* Deprecated */ + +#define XF86DRINumberEvents 0 + +#define XF86DRIClientNotLocal 0 +#define XF86DRIOperationNotSupported 1 +#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1) + +#ifndef _XF86DRI_SERVER_ + +_XFUNCPROTOBEGIN + +Bool XF86DRIQueryExtension( Display *dpy, int *event_base, int *error_base ); + +Bool XF86DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion, + int *patchVersion ); + +Bool XF86DRIQueryDirectRenderingCapable( Display *dpy, int screen, + Bool *isCapable ); + +Bool XF86DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA, + char **busIDString ); + +Bool XF86DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic ); + +Bool XF86DRICloseConnection( Display *dpy, int screen ); + +Bool XF86DRIGetClientDriverName( Display *dpy, int screen, + int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, char **clientDriverName ); + +Bool XF86DRICreateContext( Display *dpy, int screen, Visual *visual, + XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); + +Bool XF86DRICreateContextWithConfig( Display *dpy, int screen, int configID, + XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); + +extern GLboolean XF86DRIDestroyContext( Display *dpy, int screen, + XID context_id ); + +extern GLboolean XF86DRICreateDrawable( Display *dpy, int screen, + XID drawable, drm_drawable_t *hHWDrawable ); + +extern GLboolean XF86DRIDestroyDrawable( Display *dpy, int screen, + XID drawable); + +Bool XF86DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable, + unsigned int *index, unsigned int *stamp, + int *X, int *Y, int *W, int *H, + int *numClipRects, drm_clip_rect_t ** pClipRects, + int *backX, int *backY, + int *numBackClipRects, drm_clip_rect_t **pBackClipRects ); + +Bool XF86DRIGetDeviceInfo( Display *dpy, int screen, + drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize, + int *fbStride, int *devPrivateSize, void **pDevPrivate ); + +_XFUNCPROTOEND + +#endif /* _XF86DRI_SERVER_ */ + +#endif /* _XF86DRI_H_ */ + diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index 2a440149d..14bb04996 100644 --- a/hw/kdrive/epson/Makefile.am +++ b/hw/kdrive/epson/Makefile.am @@ -20,6 +20,10 @@ EPSON_LIBS = \ libepson.a \ @KDRIVE_LIBS@ +if GLX +Xepson_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xepson_LDADD = \ $(EPSON_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am index 09d179eb0..0f8865699 100644 --- a/hw/kdrive/fake/Makefile.am +++ b/hw/kdrive/fake/Makefile.am @@ -16,6 +16,10 @@ libfake_a_SOURCES = \ Xfake_SOURCES = \ fakeinit.c +if GLX +Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xfake_LDADD = \ libfake.a \ @KDRIVE_LIBS@ \ diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index 420855b8d..c77f146ee 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -14,6 +14,10 @@ bin_PROGRAMS = Xfbdev Xfbdev_SOURCES = \ fbinit.c +if GLX +Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xfbdev_LDADD = \ libfbdev.a \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 177be0bdc..7721e608a 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -179,16 +179,24 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv) screen->rate = 103; /* FIXME: should get proper value from fb driver */ } if (!screen->fb[0].depth) - screen->fb[0].depth = 16; - - t = KdFindMode (screen, fbdevModeSupported); - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; + { + if (k >= 0) + screen->fb[0].depth = var.bits_per_pixel; + else + screen->fb[0].depth = 16; + } - /* Now try setting the mode */ - if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres)) - fbdevConvertMonitorTiming (t, &var); + if ((screen->width != var.xres) || (screen->height != var.yres)) + { + t = KdFindMode (screen, fbdevModeSupported); + screen->rate = t->rate; + screen->width = t->horizontal; + screen->height = t->vertical; + + /* Now try setting the mode */ + if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres)) + fbdevConvertMonitorTiming (t, &var); + } var.activate = FB_ACTIVATE_NOW; var.bits_per_pixel = screen->fb[0].depth; diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index ea02cb67d..30919fad9 100644 --- a/hw/kdrive/i810/Makefile.am +++ b/hw/kdrive/i810/Makefile.am @@ -23,6 +23,10 @@ I810_LIBS = \ libi810.a \ @KDRIVE_LIBS@ +if GLX +Xi810_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xi810_LDADD = \ $(I810_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index 3193ab761..ae981b776 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -42,6 +42,8 @@ #include <sys/ioctl.h> extern int LinuxConsoleFd; +static unsigned char mediumraw_data, mediumraw_up; +static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT; static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -701,7 +703,29 @@ LinuxKeyboardRead (int fd, void *closure) else #endif scancode = b[0] & 0x7f; - KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); + /* This is extended medium raw mode interpreter + see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */ + switch (mediumraw_state) + { + case DEFAULT: + if (scancode == 0) + { + mediumraw_state = EXTBYTE1; + mediumraw_up = b[0] & 0x80; + } + else + KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); + break; + case EXTBYTE1: + mediumraw_data = scancode; + mediumraw_state = EXTBYTE2; + break; + case EXTBYTE2: + /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */ + KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up); + mediumraw_state = DEFAULT; + break; + } b++; } } diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c index 371aeced9..50cd7cbd2 100644 --- a/hw/kdrive/linux/tslib.c +++ b/hw/kdrive/linux/tslib.c @@ -114,6 +114,10 @@ TslibEnable (KdPointerInfo *pi) private->raw_event_hook = NULL; private->raw_event_closure = NULL; + if (!pi->path) { + pi->path = "/dev/input/touchscreen0"; + ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path); + } private->tsDev = ts_open(pi->path, 0); private->fd = ts_fd(private->tsDev); if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) { diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am index 746ffff8f..6ca376ab2 100644 --- a/hw/kdrive/mach64/Makefile.am +++ b/hw/kdrive/mach64/Makefile.am @@ -27,6 +27,10 @@ MACH64_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a +if GLX +Xmach64_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xmach64_LDADD = \ $(MACH64_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 37bc50cf2..a7dd2cbf6 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -22,6 +22,10 @@ MGA_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xmga_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xmga_LDADD = \ $(MGA_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index 95f0e1eaa..b449c37c5 100644 --- a/hw/kdrive/neomagic/Makefile.am +++ b/hw/kdrive/neomagic/Makefile.am @@ -32,6 +32,10 @@ NEOMAGIC_LIBS = \ ${VESA_LIBS} \ @KDRIVE_LIBS@ +if GLX +Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xneomagic_LDADD = \ $(NEOMAGIC_LIBS) \ @KDRIVE_LIBS@ \ diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index b380e44ee..81736c311 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -23,6 +23,10 @@ NVIDIA_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xnvidia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xnvidia_LDADD = \ $(NVIDIA_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index 208d0319e..cb28de6cb 100644 --- a/hw/kdrive/pm2/Makefile.am +++ b/hw/kdrive/pm2/Makefile.am @@ -21,6 +21,10 @@ PM2_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xpm2_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xpm2_LDADD = \ $(PM2_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index 62c1fcfa3..344fbebf7 100644 --- a/hw/kdrive/r128/Makefile.am +++ b/hw/kdrive/r128/Makefile.am @@ -20,6 +20,10 @@ R128_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xr128_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xr128_LDADD = \ $(R128_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index fe9309e46..a70d147de 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -7,6 +7,10 @@ bin_PROGRAMS = Xsdl Xsdl_SOURCES = sdl.c +if GLX +Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xsdl_LDADD = \ @KDRIVE_LIBS@ \ @XSDL_LIBS@ diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am index 3e8ce90b7..af2500aee 100644 --- a/hw/kdrive/sis300/Makefile.am +++ b/hw/kdrive/sis300/Makefile.am @@ -34,6 +34,10 @@ SIS_LIBS = \ $(VESA_LIBS) \ @KDRIVE_LIBS@ +if GLX +Xsis_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xsis_LDADD = \ $(SIS_LIBS) \ @KDRIVE_LIBS@ \ diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index a4d6624c5..bd7077c56 100644 --- a/hw/kdrive/smi/Makefile.am +++ b/hw/kdrive/smi/Makefile.am @@ -25,6 +25,10 @@ SMI_LIBS = \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ +if GLX +Xsmi_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xsmi_LDADD = \ $(SMI_LIBS) \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index ac50d2bf5..ec35c1e2b 100644 --- a/hw/kdrive/vesa/Makefile.am +++ b/hw/kdrive/vesa/Makefile.am @@ -19,6 +19,10 @@ libvesa_a_SOURCES = \ Xvesa_SOURCES = \ vesainit.c +if GLX +Xvesa_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xvesa_LDADD = \ libvesa.a \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am index 249b3f31e..c659379f0 100644 --- a/hw/kdrive/via/Makefile.am +++ b/hw/kdrive/via/Makefile.am @@ -21,6 +21,10 @@ VIA_LIBS = \ libvia.a \ $(top_builddir)/hw/kdrive/vesa/libvesa.a +if GLX +Xvia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +endif + Xvia_LDADD = \ $(VIA_LIBS) \ @KDRIVE_LIBS@ |