[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: Fix Bug 270942 - Direct Rendering is wrongfully
From:       "Kevin Kofler" <kevin.kofler () chello ! at>
Date:       2011-04-26 21:35:17
Message-ID: 20110426213517.14287.37833 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On April 21, 2011, 3:56 a.m., Kevin Kofler wrote:
> > WARNING: At this point, I'm not sure anymore whether this patch is correct:
> > 1. I'm worried that calling DRI2QueryVersion might not be sufficient to check \
> > whether DRI2 is actually being supported by the driver. We might have to check \
> > the returned version numbers in the reply or even to do something more elaborate, \
> > e.g. using DRI2Connect. 2. The right thing to do might actually be something \
> > entirely different than checking for DRI2, see: \
> > https://bugs.kde.org/show_bug.cgi?id=270942#c9
> 
> Thomas Lübking wrote:
> tested prop nvidia driver 270.41.06 which is completely unimpressed by the query \
> and just returns 0 for the DRI2 check. 
> LIBGL_ALWAYS_INDIRECT does NOT fail the check (i guess nvidia simply ignores the \
> value?) but LIBGL_ALWAYS_SOFTWARE does and returns 0 for the nvidia check then. 
> I've also access to a legacy nvidia board (FX chip) but cannot test before \
> <strike>monday</strike> tuesday ;-) 
> Thomas Lübking wrote:
> Ok, tested nVIdia FX chip & nvidia-173xx driver (archlinux) - just as above, \
> completely unimpressed by the query and just returns 0 for the DRI2 check. 
> As a sidenote:
> using that driver/chip combination wasn't much fun - titlebars were translucent and \
> lanczos filter apparently was applied despite kwin claiming glsl unsupported (what \
> makes sense: the chip has 2 shader units and ;-) Afterwards i used the driver with \
> the 7600GT (before changing the packages) and the result wasn't that great either - \
> esp. the xrender backend crashed Xorg. 
> This doesn't have to say much since i didn't really configure the systems and at \
> least using the legacy series with the newer chip is oc. bug prone. Just wanted to \
> mention... (but there seems a glsl/lanczos issue - but lanczos would be unusably \
> slow on the chip anyway) 
> Kevin Kofler wrote:
> Well, it looks like this approach just doesn't work. I'm going to close the review \
> request as rejected. 
> Fedora 15 is now using the 2-line patch from \
> http://sarvatt.com/downloads/patches/kdebase-workspace.patch instead: \
> http://pkgs.fedoraproject.org/gitweb/?p=kdebase-workspace.git;a=commit;h=f9c6236d594f9c40386d2b9c6b0d7ad948e42203
>  
> Thomas Lübking wrote:
> errr... just to make myself really clear: the patch does NOT affect nvidia at all.
> Everything works as it should!
> (just ignore all worries about the 173xx driver in general - that's unrelated, \
> sorry) 
> Kevin Kofler wrote:
> The thing is, the DRI2QueryVersion test should NOT pass for a driver which is not \
> actually a DRI2 driver. 
> What do you actually mean by "just returns 0 for the DRI2 check"? Do you mean the \
> nvidia driver passes that check (which makes it return an exit code of 0, i.e. \
> success)? If it does, chances are the test will ALWAYS pass, which makes it \
> entirely useless.

Oh, and LIBGL_ALWAYS_SOFTWARE only fails the DRI2 check because I explicitly check \
for that environment variable being set, see the code.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101157/#review2785
-----------------------------------------------------------


On April 19, 2011, 8:24 p.m., Kevin Kofler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101157/
> -----------------------------------------------------------
> 
> (Updated April 19, 2011, 8:24 p.m.)
> 
> 
> Review request for kwin.
> 
> 
> Summary
> -------
> 
> Use xcb-dri2 to check for DRI2 availability instead of hackish renderer string \
> parsing. 
> (This was suggested by Eric Anholt from Mesa upstream.)
> 
> 
> This addresses bug 270942.
> http://bugs.kde.org/show_bug.cgi?id=270942
> 
> 
> Diffs
> -----
> 
> kwin/opengltest/CMakeLists.txt 82cae85 
> kwin/opengltest/opengltest.cpp d2d8f70 
> 
> Diff: http://git.reviewboard.kde.org/r/101157/diff
> 
> 
> Testing
> -------
> 
> I verified that this returns 0 (i.e. detects DRI2 correctly) on my primary machine \
> (Mesa DRI R200 (RV280 5964) 20090101  TCL DRI2). 
> I also verfied that this returns 1 as before if LIBGL_ALWAYS_INDIRECT or \
> LIBGL_ALWAYS_SOFTWARE is set. (The latter required an explicit check though.) 
> Unfortunately, I don't have any DRI1 hardware to test with (nor old DRI1 drivers \
> for my current hardware). 
> 
> Thanks,
> 
> Kevin
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101157/">http://git.reviewboard.kde.org/r/101157/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 21st, 2011, 3:56 a.m., <b>Kevin \
Kofler</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">WARNING: At this point, I&#39;m not sure anymore whether this patch is \
correct: 1. I&#39;m worried that calling DRI2QueryVersion might not be sufficient to \
check whether DRI2 is actually being supported by the driver. We might have to check \
the returned version numbers in the reply or even to do something more elaborate, \
e.g. using DRI2Connect. 2. The right thing to do might actually be something entirely \
different than checking for DRI2, see: \
https://bugs.kde.org/show_bug.cgi?id=270942#c9</pre>  </blockquote>




 <p>On April 23rd, 2011, 7:48 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">tested prop nvidia \
driver 270.41.06 which is completely unimpressed by the query and just returns 0 for \
the DRI2 check.

LIBGL_ALWAYS_INDIRECT does NOT fail the check (i guess nvidia simply ignores the \
value?) but LIBGL_ALWAYS_SOFTWARE does and returns 0 for the nvidia check then.

I&#39;ve also access to a legacy nvidia board (FX chip) but cannot test before \
&lt;strike&gt;monday&lt;/strike&gt; tuesday ;-)</pre>  </blockquote>





 <p>On April 26th, 2011, 7:28 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ok, tested nVIdia FX \
chip &amp; nvidia-173xx driver (archlinux) - just as above, completely unimpressed by \
the query and just returns 0 for the DRI2 check.

As a sidenote:
using that driver/chip combination wasn&#39;t much fun - titlebars were translucent \
and lanczos filter apparently was applied despite kwin claiming glsl unsupported \
(what makes sense: the chip has 2 shader units and ;-) Afterwards i used the driver \
with the 7600GT (before changing the packages) and the result wasn&#39;t that great \
either - esp. the xrender backend crashed Xorg.

This doesn&#39;t have to say much since i didn&#39;t really configure the systems and \
at least using the legacy series with the newer chip is oc. bug prone. Just wanted to \
mention... (but there seems a glsl/lanczos issue - but lanczos would be unusably slow \
on the chip anyway)</pre>  </blockquote>





 <p>On April 26th, 2011, 9:08 p.m., <b>Kevin Kofler</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well, it looks like this \
approach just doesn&#39;t work. I&#39;m going to close the review request as \
rejected.

Fedora 15 is now using the 2-line patch from \
http://sarvatt.com/downloads/patches/kdebase-workspace.patch instead: \
http://pkgs.fedoraproject.org/gitweb/?p=kdebase-workspace.git;a=commit;h=f9c6236d594f9c40386d2b9c6b0d7ad948e42203</pre>
  </blockquote>





 <p>On April 26th, 2011, 9:15 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">errr... just to make \
myself really clear: the patch does NOT affect nvidia at all. Everything works as it \
should! (just ignore all worries about the 173xx driver in general - that&#39;s \
unrelated, sorry)</pre>  </blockquote>





 <p>On April 26th, 2011, 9:33 p.m., <b>Kevin Kofler</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The thing is, the \
DRI2QueryVersion test should NOT pass for a driver which is not actually a DRI2 \
driver.

What do you actually mean by &quot;just returns 0 for the DRI2 check&quot;? Do you \
mean the nvidia driver passes that check (which makes it return an exit code of 0, \
i.e. success)? If it does, chances are the test will ALWAYS pass, which makes it \
entirely useless.</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Oh, and \
LIBGL_ALWAYS_SOFTWARE only fails the DRI2 check because I explicitly check for that \
environment variable being set, see the code.</pre> <br />








<p>- Kevin</p>


<br />
<p>On April 19th, 2011, 8:24 p.m., Kevin Kofler wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin.</div>
<div>By Kevin Kofler.</div>


<p style="color: grey;"><i>Updated April 19, 2011, 8:24 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Use xcb-dri2 to check for DRI2 availability instead of hackish renderer \
string parsing.

(This was suggested by Eric Anholt from Mesa upstream.)</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I verified that this returns 0 (i.e. detects DRI2 correctly) on my \
primary machine (Mesa DRI R200 (RV280 5964) 20090101  TCL DRI2).

I also verfied that this returns 1 as before if LIBGL_ALWAYS_INDIRECT or \
LIBGL_ALWAYS_SOFTWARE is set. (The latter required an explicit check though.)

Unfortunately, I don&#39;t have any DRI1 hardware to test with (nor old DRI1 drivers \
for my current hardware).</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=270942">270942</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/opengltest/CMakeLists.txt <span style="color: grey">(82cae85)</span></li>

 <li>kwin/opengltest/opengltest.cpp <span style="color: grey">(d2d8f70)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101157/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic