[Mesa-dev] [PATCH] drisw: Fix drawable creation against non-default screens
There's no reason to only force the visual to be on the default screen, and in fact good reason not to. Signed-off-by: Adam Jackson --- src/glx/drisw_glx.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 2d83a50..833ea7d 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -87,9 +87,8 @@ XCreateDrawable(struct drisw_drawable * pdp, XChangeGC(dpy, pdp->swapgc, GCGraphicsExposures, &gcvalues); /* visual */ - visTemp.screen = DefaultScreen(dpy); visTemp.visualid = visualid; - visMask = (VisualScreenMask | VisualIDMask); + visMask = VisualIDMask; pdp->visinfo = XGetVisualInfo(dpy, visMask, &visTemp, &num_visuals); /* create XImage */ -- 1.7.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] drisw: Fix drawable creation against non-default screens
On 01/03/2012 11:40 AM, Adam Jackson wrote: There's no reason to only force the visual to be on the default screen, and in fact good reason not to. Is the visual ID enough information to uniquely identify it? I may be mistaken (and horribly ignorant in this area), but I thought the visual ID namespace was per-screen, not per-display. Signed-off-by: Adam Jackson --- src/glx/drisw_glx.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 2d83a50..833ea7d 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -87,9 +87,8 @@ XCreateDrawable(struct drisw_drawable * pdp, XChangeGC(dpy, pdp->swapgc, GCGraphicsExposures,&gcvalues); /* visual */ - visTemp.screen = DefaultScreen(dpy); visTemp.visualid = visualid; - visMask = (VisualScreenMask | VisualIDMask); + visMask = VisualIDMask; pdp->visinfo = XGetVisualInfo(dpy, visMask,&visTemp,&num_visuals); /* create XImage */ ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] drisw: Fix drawable creation against non-default screens
On 1/3/12 3:48 PM, Ian Romanick wrote: On 01/03/2012 11:40 AM, Adam Jackson wrote: There's no reason to only force the visual to be on the default screen, and in fact good reason not to. Is the visual ID enough information to uniquely identify it? I may be mistaken (and horribly ignorant in this area), but I thought the visual ID namespace was per-screen, not per-display. Practically, yes. VIDs and XIDs happen to use the same allocator in the sample implementation (and every vendor server I've seen) which means they're unique and not namespaced by screen. According to the protocol spec, visuals may be listed for more than one depth or [1] more than one screen. But that's fine: the visual ID will uniquely identify the capabilities of a given visual, and if it happens to be valid for multiple screens, awesome. The requirement then is that visuals present on multiple screens actually _be_ compatible, but that's a server issue. [1] - this is just "or" in the spec; it's not clear whether it's meant to be ^^ or ||, but || is probably the conservative interpretation. - ajax ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] drisw: Fix drawable creation against non-default screens
On 01/03/2012 04:33 PM, Adam Jackson wrote: On 1/3/12 3:48 PM, Ian Romanick wrote: On 01/03/2012 11:40 AM, Adam Jackson wrote: There's no reason to only force the visual to be on the default screen, and in fact good reason not to. Is the visual ID enough information to uniquely identify it? I may be mistaken (and horribly ignorant in this area), but I thought the visual ID namespace was per-screen, not per-display. Practically, yes. VIDs and XIDs happen to use the same allocator in the sample implementation (and every vendor server I've seen) which means they're unique and not namespaced by screen. According to the protocol spec, visuals may be listed for more than one depth or [1] more than one screen. But that's fine: the visual ID will uniquely identify the capabilities of a given visual, and if it happens to be valid for multiple screens, awesome. The requirement then is that visuals present on multiple screens actually _be_ compatible, but that's a server issue. [1] - this is just "or" in the spec; it's not clear whether it's meant to be ^^ or ||, but || is probably the conservative interpretation. Okay. If some of that gets captured in the commit message, the change is Reviewed-by: Ian Romanick ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] drisw: Fix drawable creation against non-default screens
On Tue, 2012-01-03 at 19:14 -0800, Ian Romanick wrote: > Okay. If some of that gets captured in the commit message, the change is > > Reviewed-by: Ian Romanick Pushed with better commit message, thanks. - ajax signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev