<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - kwin_x11 disabling compositing with mesa 17"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99604#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - kwin_x11 disabling compositing with mesa 17"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99604">bug 99604</a>
              from <span class="vcard"><a class="email" href="mailto:kenneth@whitecape.org" title="Kenneth Graunke <kenneth@whitecape.org>"> <span class="fn">Kenneth Graunke</span></a>
</span></b>
        <pre>This makes no sense to me.  The requirement for #version being at the top has
existed for years.  We changed our handling of #version slightly, but it should
not have affected this.

It could be that KWin changed their shaders...but that also seems unlikely. 
It's a pretty catastrophic failure, and I've been using KWin every day and I've
never hit this issue.  Admittedly, I usually use OpenGL 3.1 mode, not GL 2.0
(in settings -> display -> compositor).  I just tried both with KWin 5.9.2 and
they both seem to work fine.  Maybe we have different plugins/effects enabled?

If your Mesa is built with debugging symbols, you can obtain the broken shader
by doing:
<ssh in - don't do this from X>
$ DISPLAY=:0 gdb --args kwin_x11 --replace
(gdb) break glcpp_error
(gdb) run
Breakpoint 1, glcpp_error (locp=0x7fffffffc228, parser=0x77cc40,
(gdb) up
#1  0x00007ffff10e1251 in glcpp_parser_parse (parser=0x77cc40)
(gdb) up
#2  0x00007ffff1220036 in glcpp_preprocess (ralloc_ctx=0x77af90, 
(gdb) printf "%s", *shader</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>