<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - i915/DRM Gallium driver apparently not usable without DRM pipe loader"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75453">75453</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>i915/DRM Gallium driver apparently not usable without DRM pipe loader
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>christian.prochaska@genode-labs.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/i915g
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>(git master 73b46136b0ba20f7f84abdadad895111a4c37166)

I've built Mesa with the following configuration:

./autogen.sh --enable-gles2 --disable-glx --with-dri-drivers=
--enable-gallium-egl --with-egl-platforms=drm --with-gallium-drivers=i915

With this configuration, both a DRI driver and a Gallium driver get built,
despite the --with-dri-drivers= configure option (bug or intended?).

Then I've built the 'es2gears' demo as follows:

gcc -g -O0 -DMESA_EGL_NO_X11_HEADERS -o es2gears es2gears.c
../eglut/eglut_screen.c ../eglut/eglut.c -I../eglut -lGLESv2 -lEGL -lm

When I tried to run it on an IBM T60 notebook (Debian testing), at first <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Use of uninitialized pointer in 'gallium_screen_create()'"
   href="show_bug.cgi?id=75335">bug
75335</a> triggered. Now that this bug has been resolved, the following error
occured:

-----
EGL_VERSION = 1.4 (DRI2)
EGLUT: failed to choose a config
-----

When I deleted the DRI driver, the following error occured:

-----
gbm: failed to open any driver (search paths /usr/local/lib/dri)failed to load
driver: i915
gbm: failed to open any driver (search paths /usr/local/lib/dri)failed to load
driver: i915
gbm: failed to open any driver (search paths /usr/local/lib/dri)failed to load
driver: i915
EGLUT: failed to initialize EGL display
-----

Apparently, the Gallium driver was not usable, too. Since <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Use of uninitialized pointer in 'gallium_screen_create()'"
   href="show_bug.cgi?id=75335">bug 75335</a> got
triggered by the missing DRM pipe loader, I tried to enable it with the
following modification of configure.ac:

-----
index ba158e8..feb025f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1748,6 +1748,7 @@ if test "x$with_gallium_drivers" != x; then
         xi915)
             HAVE_GALLIUM_I915=yes
             PKG_CHECK_MODULES([INTEL], [libdrm_intel >=
$LIBDRM_INTEL_REQUIRED])
+            gallium_require_drm_loader
             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 softpipe"
             if test "x$MESA_LLVM" = x1; then
                 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
-----

With that, the demo finally worked:

-----
EGL_VERSION = 1.4 (Gallium)
Found 6 modes:
  0: 1400 x 1050
  1: 1400 x 1050
  2: 1280 x 1024
  3: 1024 x 768
  4: 800 x 600
  5: 640 x 480
Will use screen size: 1400 x 1050
vertex shader info: 
fragment shader info: 
info: 
724 frames in 5.0 seconds = 144.713 FPS
-----

So it seems that the DRM pipe loader should get enabled by default for the
i915/DRM Gallium configuration, but I'm not sure if the modification I made
would break some other configuration.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>