diff options
author | marha <marha@users.sourceforge.net> | 2013-10-31 08:40:01 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-31 08:40:01 +0100 |
commit | e4ef724e06621be9325fc41ed886fd404467fdc0 (patch) | |
tree | be445314647f682fbb4a1e8b94aeb6ee79cede5f /xorg-server/hw/dmx | |
parent | 270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a (diff) | |
download | vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.gz vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.bz2 vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.zip |
fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013
xserver commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa
xkeyboard-config commit 70bbf18d6cddb7271db1b2e042765ace3c4ac485
libX11 commit 6cb02b166361200da35ba14f52cd9aaa493eb0ea
glproto commit aacc7a51b6161c765b04524e0d2ab31e5e586834
fontconfig commit 525a135ccf53e4bf3363c3143d9cfdf15fba55ab
mesa commit b16b3c8703f198ca0f025b730d582600df79c19c
Diffstat (limited to 'xorg-server/hw/dmx')
-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 |
3 files changed, 42 insertions, 10 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: |