Bug 81 - XRenderQueryExtension
Summary: XRenderQueryExtension
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xrender (show other bugs)
Version: unspecified
Hardware: SPARC Solaris
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2003-05-01 06:17 UTC by Morten Welinder
Modified: 2011-10-15 17:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Check depth support before reporting Render support (1.58 KB, patch)
2003-05-08 08:32 UTC, Keith Packard
no flags Details | Splinter Review

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.