diff options
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/dmx/dmx_glxvisuals.c | 7 | ||||
-rw-r--r-- | xorg-server/hw/dmx/glxProxy/glxcmds.c | 42 | ||||
-rw-r--r-- | xorg-server/hw/dmx/input/dmxevents.c | 3 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kinput.c | 11 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Bus.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Module.h | 6 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86platformBus.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dixmods/glxmodule.c | 3 | ||||
-rw-r--r-- | xorg-server/hw/xwin/glx/glwrap.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xwin/glx/indirect.c | 11 | ||||
-rw-r--r-- | xorg-server/hw/xwin/swrastwgl_dri/glwrap.c | 2 |
12 files changed, 66 insertions, 32 deletions
diff --git a/xorg-server/hw/dmx/dmx_glxvisuals.c b/xorg-server/hw/dmx/dmx_glxvisuals.c index 56bd67b6e..b3bd3b79f 100644 --- a/xorg-server/hw/dmx/dmx_glxvisuals.c +++ b/xorg-server/hw/dmx/dmx_glxvisuals.c @@ -448,7 +448,12 @@ GetGLXFBConfigs(Display * dpy, int glxMajorOpcode, int *nconfigs) /* Fill in derived values */ config->screen = screen; - config->rgbMode = config->renderType & GLX_RGBA_BIT; + /* The rgbMode should be true for any mode which has distinguishible + * R, G and B components + */ + config->rgbMode = (config->renderType + & (GLX_RGBA_BIT | GLX_RGBA_FLOAT_BIT_ARB + | GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)) != 0; config->colorIndexMode = !config->rgbMode; config->haveAccumBuffer = diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c index 335da37ac..190eeefe2 100644 --- a/xorg-server/hw/dmx/glxProxy/glxcmds.c +++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c @@ -123,6 +123,28 @@ GetBackEndDisplay(__GLXclientState * cl, int s) return cl->be_displays[s]; } +/** + * Convert the render type bits from fbconfig into context render type. + */ +static int +renderTypeBitsToRenderTypeEnum(int fbRenderType) +{ + if (fbRenderType & GLX_RGBA_BIT) + return GLX_RGBA_TYPE; + + if (fbRenderType & GLX_COLOR_INDEX_BIT) + return GLX_COLOR_INDEX_TYPE; + + if (fbRenderType & GLX_RGBA_FLOAT_BIT_ARB) + return GLX_RGBA_FLOAT_TYPE_ARB; + + if (fbRenderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) + return GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT; + + /* There's no recognized renderType in the config */ + return GLX_RGBA_TYPE; +} + /* ** Create a GL context with the given properties. */ @@ -308,12 +330,14 @@ CreateContext(__GLXclientState * cl, /* send the create context request to the back-end server */ dpy = GetBackEndDisplay(cl, screen); if (glxc->pFBConfig) { - /*Since for a certain visual both RGB and COLOR INDEX - *can be on then the only parmeter to choose the renderType - * should be the class of the colormap since all 4 first - * classes does not support RGB mode only COLOR INDEX , - * and so TrueColor and DirectColor does not support COLOR INDEX*/ - int renderType = glxc->pFBConfig->renderType; + /* For a specific visual, multiple render types (i.e., both RGB + * and COLOR INDEX) can be accessible. The only parameter to + * choose the renderType should be the class of the colormap, + * since the first classes do not support RGB mode (only COLOR + * INDEX), and TrueColor and DirectColor do not support COLOR + * INDEX. + */ + int renderType = GLX_RGBA_TYPE; if (pVisual) { switch (pVisual->class) { @@ -329,7 +353,11 @@ CreateContext(__GLXclientState * cl, renderType = GLX_RGBA_TYPE; break; } + } else { + renderType = + renderTypeBitsToRenderTypeEnum(glxc->pFBConfig->renderType); } + if (__GLX_IS_VERSION_SUPPORTED(1, 3)) { LockDisplay(dpy); GetReq(GLXCreateNewContext, be_new_req); @@ -3210,7 +3238,7 @@ __glXQueryContext(__GLXclientState * cl, GLbyte * pc) *pSendBuf++ = GLX_FBCONFIG_ID; *pSendBuf++ = (int) (ctx->pFBConfig->id); *pSendBuf++ = GLX_RENDER_TYPE; - *pSendBuf++ = (int) (ctx->pFBConfig->renderType); + *pSendBuf++ = renderTypeBitsToRenderTypeEnum(ctx->pFBConfig->renderType); *pSendBuf++ = GLX_SCREEN; *pSendBuf++ = (int) (ctx->pScreen->myNum); diff --git a/xorg-server/hw/dmx/input/dmxevents.c b/xorg-server/hw/dmx/input/dmxevents.c index 28756203b..bcb5c2ed8 100644 --- a/xorg-server/hw/dmx/input/dmxevents.c +++ b/xorg-server/hw/dmx/input/dmxevents.c @@ -726,8 +726,7 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, case ButtonRelease: detail = dmxGetButtonMapping(dmxLocal, detail); valuator_mask_zero(&mask); - QueuePointerEvents(p, type, detail, - POINTER_ABSOLUTE | POINTER_SCREEN, &mask); + QueuePointerEvents(p, type, detail, 0, &mask); return; case MotionNotify: diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index 5a62402f3..08ec5d751 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -735,8 +735,6 @@ ephyrScreenFini(KdScreenInfo * screen) if (scrpriv->shadow) { KdShadowFbFree(screen); } - free(screen->driver); - screen->driver = NULL; } /* diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index 0c6ce1936..7f47a1da5 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -328,21 +328,22 @@ KdEnableInput(void) kdInputEnabled = TRUE; + ev.any.time = GetTimeInMillis(); + for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->driver && ki->driver->Enable) (*ki->driver->Enable) (ki); + /* reset screen saver */ + NoticeEventTime (&ev, ki->dixdev); } for (pi = kdPointers; pi; pi = pi->next) { if (pi->driver && pi->driver->Enable) (*pi->driver->Enable) (pi); + /* reset screen saver */ + NoticeEventTime (&ev, pi->dixdev); } - /* reset screen saver */ - ev.any.time = GetTimeInMillis(); - NoticeEventTime(&ev, pi->dixdev); - NoticeEventTime(&ev, ki->dixdev); - OsReleaseSIGIO(); } diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index e1015379b..329d0b3d5 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -266,7 +266,9 @@ xf86IsEntityPrimary(int entityIndex) { EntityPtr pEnt = xf86Entities[entityIndex]; - if (primaryBus.type != pEnt->bus.type) + if (primaryBus.type == BUS_PLATFORM && pEnt->bus.type == BUS_PCI) + return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev); + else if (primaryBus.type != pEnt->bus.type) return FALSE; switch (pEnt->bus.type) { diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index e0cec05b8..265b55348 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -80,9 +80,9 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 2) -#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(15, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(20, 0) +#define ABI_EXTENSION_VERSION SET_ABI_VERSION(8, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) #define MODINFOSTRING1 0xef23fdc5 diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c index e368deeb8..33b2b7dd8 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.c +++ b/xorg-server/hw/xfree86/common/xf86platformBus.c @@ -466,6 +466,9 @@ xf86platformAddDevice(int index) /* attach unbound to 0 protocol screen */ AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); + RRResourcesChanged(xf86Screens[0]->pScreen); + RRTellChanged(xf86Screens[0]->pScreen); + return 0; } @@ -508,6 +511,8 @@ xf86platformRemoveDevice(int index) xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); xf86_remove_platform_device(index); + + RRResourcesChanged(xf86Screens[0]->pScreen); RRTellChanged(xf86Screens[0]->pScreen); out: return; diff --git a/xorg-server/hw/xfree86/dixmods/glxmodule.c b/xorg-server/hw/xfree86/dixmods/glxmodule.c index e6bb73673..133a2a65d 100644 --- a/xorg-server/hw/xfree86/dixmods/glxmodule.c +++ b/xorg-server/hw/xfree86/dixmods/glxmodule.c @@ -85,9 +85,6 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) xf86Msg(xf86Info.aiglxFrom, "AIGLX %s\n", xf86Info.aiglx ? "enabled" : "disabled"); if (xf86Info.aiglx) { - provider = LoaderSymbol("__glXDRIProvider"); - if (provider) - GlxPushProvider(provider); provider = LoaderSymbol("__glXDRI2Provider"); if (provider) GlxPushProvider(provider); diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c index 9733e7526..4d2b77343 100644 --- a/xorg-server/hw/xwin/glx/glwrap.c +++ b/xorg-server/hw/xwin/glx/glwrap.c @@ -42,8 +42,6 @@ #include <glx/glheader.h> #include <glx/glxserver.h> #include <glx/glxext.h> -#include <glx/glapi.h> -#include <glx/dispatch.h> #include <glwindows.h> #include <winmsg.h> diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 1179dc248..85977cc70 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -83,9 +83,8 @@ #include <glx/glxserver.h> #include <glx/glxutil.h> #include <glx/extension_string.h> +#include <glx/glxext.h> #include <GL/glxtokens.h> -#include <glx/glapitable.h> -#include <glx/glapi.h> #include <winpriv.h> #include <wgl_ext_api.h> @@ -420,7 +419,9 @@ fbConfigsDump(unsigned int n, __GLXconfig * c) c->accumAlphaBits, c->sampleBuffers, c->samples, (c->drawableType & GLX_WINDOW_BIT) ? "y" : ".", (c->drawableType & GLX_PIXMAP_BIT) ? "y" : ".", - (c->drawableType & GLX_PBUFFER_BIT) ? "y" : ".", ".", + (c->drawableType & GLX_PBUFFER_BIT) ? "y" : ".", + (c->renderType & (GLX_RGBA_FLOAT_BIT_ARB | + GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)) ? "y" : ".", (c->transparentPixel != GLX_NONE_EXT) ? "y" : ".", c->visualSelectGroup, (c->visualRating == GLX_SLOW_VISUAL_EXT) ? "*" : " "); @@ -1706,7 +1707,7 @@ glxWinContextLoseCurrent(__GLXcontext * base) return FALSE; } - base->isCurrent=FALSE; /* It looks like glx is not doing this */ + base->currentClient=NULL; /* It looks like glx is not doing this */ _glapi_set_dispatch(NULL); return ret; @@ -1799,8 +1800,10 @@ glxWinCreateContext(__GLXscreen * screen, //context->ctx = NULL; already done with memset context->shareContext = shareContext; +/* TODO how to handle the unknown type glapi_table??? context->Dispatch=calloc(sizeof(void*), (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)); _glapi_set_dispatch(context->Dispatch); +*/ glWinSetupDispatchTable(); diff --git a/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c b/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c index 6d794b671..3f8e2091b 100644 --- a/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c +++ b/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c @@ -42,8 +42,6 @@ #include <glx/glheader.h> #include <glx/glxserver.h> #include <glx/glxext.h> -#include <glx/glapi.h> -#include <glx/dispatch.h> #include <glwindows.h> #include <winmsg.h> |