Bug 81

Summary: XRenderQueryExtension
Product: xorg Reporter: Morten Welinder <mortenw>
Component: Lib/XrenderAssignee: Keith Packard <keithp>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: high CC: alan.coopersmith
Version: unspecifiedKeywords: patch
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Check depth support before reporting Render support none

Description Morten Welinder 2003-05-01 06:17:28 UTC
Sun claims RENDER support even though the display might not have all depths needed.

I suggest that XRenderQueryExtension be extended to test for this so "gnome & xft
is buggy" can be redirected as "Sun's RENDER is buggy" bugs.

The relevant code is in gtk+/gdk/x11/gdkdrawable-x11.c (search for buggy) and I
will be happy to X11 license that part too.  (==I wrote it.)
Comment 1 Keith Packard 2003-05-08 07:36:48 UTC
Can someone with Sun's putative Render extension figure out what to check and
make sure it works?
Comment 2 Morten Welinder 2003-05-08 07:49:45 UTC
That's what I did.  Here's code that seems to work:

        {
          /*
           * Sun advertises RENDER, but fails to support 32-bit pixmaps.
           * That is just no good.  Therefore, we check all screens
           * for proper support.
           */

          int screen;
          for (screen = 0; screen < ScreenCount (xdisplay); screen++)
            {
              int count;
              int *depths = XListDepths (xdisplay, screen, &count);
              gboolean has_8 = FALSE, has_32 = FALSE;

              if (depths)
                {
                  int i;

                  for (i = 0; i < count; i++)
                    {
                      if (depths[i] == 8)
                        has_8 = TRUE;
                      else if (depths[i] == 32)
                        has_32 = TRUE;
                    }
                  XFree (depths);
                }

              if (!(has_8 && has_32))
                {
                  g_warning ("The X server advertises that RENDER support is
present,\n"
                             "but fails to supply the necessary pixmap support.
 In\n"
                             "other words, it is buggy.");
                  x11display->have_render = GDK_NO;
                  break;
                }
            }
        }
Comment 3 Keith Packard 2003-05-08 08:31:42 UTC
Can you test with the attached patch?
Comment 4 Keith Packard 2003-05-08 08:32:28 UTC
Created attachment 44 [details] [review]
Check depth support before reporting Render support
Comment 5 Bugzilla Administrator 2003-05-16 19:30:49 UTC
I think the patch will work; synthetic testing appears to succeed.
Comment 6 Morten Welinder 2003-07-23 13:16:24 UTC
Docs could be made to refer to Sun patch:

Patch-ID# 113098-04
Keywords: X11 Xrender
4770510 RENDER should not be advertised unless required depths are supported
Comment 7 Corbin Simpson 2010-03-27 03:43:59 UTC
Since the patch appears to have survived the past 7 years in libXrender, the reporter hasn't needed to follow up, and nobody's complained, I'm closing this as FIXED.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.