<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 --- - gbm_dri_bo_create fails to initialize bo->base.base.format"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=60143">60143</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>gbm_dri_bo_create fails to initialize bo->base.base.format
          </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>daniel.van.vugt@canonical.com
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Calling gbm_bo_create() with format == GBM_BO_FORMAT_ARGB8888 completes
successfully. However reading back the format via gbm_bo_get_format() returns
GBM_BO_FORMAT_XRGB8888.

The problem seems to be that the bo internal structure is initialized to zero
by calloc, but the format field is never set by gbm_dri_bo_create, so it stays
zero (GBM_BO_FORMAT_XRGB8888) even when the real image format is something
different.

Should be a simple fix in gbm_dri_bo_create(). Just add:
  bo->base.base.format = gbm_dri_to_gbm_format(dri_format);</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>