rebase and fix merge conflicts
This commit is contained in:
@@ -75,6 +75,12 @@ from the X Consortium.
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#endif /* HAS_SHM */
|
||||
#ifdef MITSHM
|
||||
#include "shmint.h"
|
||||
#endif
|
||||
#ifdef HAVE_XSHMFENCE
|
||||
#include <misyncshm.h>
|
||||
#endif
|
||||
#include "dix.h"
|
||||
#include "os.h"
|
||||
#include "miline.h"
|
||||
@@ -90,7 +96,7 @@ from the X Consortium.
|
||||
#include "version-config.h"
|
||||
#include "site.h"
|
||||
|
||||
#define XVNCVERSION "KasmVNC 0.9"
|
||||
#define XVNCVERSION "KasmVNC 1.1.0"
|
||||
#define XVNCCOPYRIGHT ("Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)\n" \
|
||||
"See http://kasmweb.com for information on KasmVNC.\n")
|
||||
|
||||
@@ -152,6 +158,8 @@ typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB } fbMemType;
|
||||
static fbMemType fbmemtype = NORMAL_MEMORY_FB;
|
||||
static int lastScreen = -1;
|
||||
static Bool Render = TRUE;
|
||||
static Bool hw3d = FALSE;
|
||||
const char *driNode = NULL;
|
||||
|
||||
static Bool displaySpecified = FALSE;
|
||||
static char displayNumStr[16];
|
||||
@@ -420,6 +428,8 @@ void ddxUseMsg(void)
|
||||
ErrorF("+/-render turn on/off RENDER extension support"
|
||||
"(default on)\n");
|
||||
#endif
|
||||
ErrorF("-hw3d enable hardware 3d acceleration\n");
|
||||
ErrorF("-drinode path use another card than /dev/dri/renderD128\n");
|
||||
ErrorF("-linebias n adjust thin line pixelization\n");
|
||||
ErrorF("-blackpixel n pixel value for black\n");
|
||||
ErrorF("-whitepixel n pixel value for white\n");
|
||||
@@ -560,6 +570,20 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp (argv[i], "-hw3d") == 0)
|
||||
{
|
||||
hw3d = TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp (argv[i], "-drinode") == 0)
|
||||
{
|
||||
fail_unless_args(argc, i, 1);
|
||||
++i;
|
||||
driNode = argv[i];
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */
|
||||
{
|
||||
Pixel pix;
|
||||
@@ -1563,7 +1587,7 @@ int vncRandRCreateScreenOutputs(int scrIdx, int extraOutputs)
|
||||
|
||||
/* Creating and modifying modes, used by XserverDesktop and init here */
|
||||
|
||||
int vncRandRCanCreateModes()
|
||||
int vncRandRCanCreateModes(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -1772,6 +1796,15 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||
ret = fbPictureInit (pScreen, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef MITSHM
|
||||
ShmRegisterFbFuncs(pScreen);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XSHMFENCE
|
||||
if (!miSyncShmScreenInit(pScreen))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
if (!ret) return FALSE;
|
||||
|
||||
#if XORG < 110
|
||||
@@ -1871,8 +1904,8 @@ static void vfbClientStateChange(CallbackListPtr *a, void *b, void *c) {
|
||||
dispatchException &= ~DE_RESET;
|
||||
}
|
||||
}
|
||||
|
||||
#if XORG >= 113
|
||||
|
||||
#if XORG >= 113 && XORG < 120
|
||||
#ifdef GLXEXT
|
||||
extern void GlxExtensionInit(void);
|
||||
|
||||
@@ -1884,6 +1917,10 @@ static ExtensionModule glxExt = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DRI3
|
||||
extern void xvnc_init_dri3(void);
|
||||
#endif
|
||||
|
||||
void
|
||||
InitOutput(ScreenInfo *scrInfo, int argc, char **argv)
|
||||
{
|
||||
@@ -1960,6 +1997,14 @@ InitOutput(ScreenInfo *scrInfo, int argc, char **argv)
|
||||
if (!AddCallback(&ClientStateCallback, vfbClientStateChange, 0)) {
|
||||
FatalError("AddCallback failed\n");
|
||||
}
|
||||
|
||||
if (hw3d) {
|
||||
#ifdef DRI3
|
||||
xvnc_init_dri3();
|
||||
#else
|
||||
FatalError("DRI3 disabled at compile time\n");
|
||||
#endif
|
||||
}
|
||||
} /* end InitOutput */
|
||||
|
||||
/* this is just to get the server to link on AIX */
|
||||
|
||||
Reference in New Issue
Block a user