<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Add support for ARB_internalformat_query2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92687#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Add support for ARB_internalformat_query2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92687">bug 92687</a>
              from <span class="vcard"><a class="email" href="mailto:elima@igalia.com" title="Eduardo Lima Mitev <elima@igalia.com>"> <span class="fn">Eduardo Lima Mitev</span></a>
</span></b>
        <pre>About time for an update! The "we" below refers to Antía, Alejandro and I, as
the team working primarily on this extension for almost 2 months now.

>From a high level point of view, we have completed more or less all the
implementation bits. This means that all the code-flow and plumbery is already
in place, but we still need to iterate on the implementation of specific
queries. There are some queries for which we have doubts related to the wording
in the spec, others about what the correct answer from Mesa should be, etc. We
will post these issues/questions separately, in another update.

The current code can be checked at:

Mesa: <a href="https://github.com/Igalia/mesa/tree/internalformat-query2-rfc">https://github.com/Igalia/mesa/tree/internalformat-query2-rfc</a>
Piglit: <a href="https://github.com/Igalia/piglit/tree/internalformat-query2-rfc">https://github.com/Igalia/piglit/tree/internalformat-query2-rfc</a>

>From a high level point of view, the structure and changes are:

* All the extension's frontend code is in main/formatquery.c, as it was before
for query1. Only that it also handles query2 now.

* A new driver hook 'QueryInternalFormat' was added, replacing the previous one
'QuerySamplesForFormat'. The first commits in the branch make this change,
preparing the stage for the query2 specific stuff that come after.

* A fallback, generic function _mesa_query_internal_format_default() provides
generic implementation and sensible defaults for all queries, for drivers not
implementing query2. Backends that only care about answering some queries, can
call back this function for the other queries where a generic answer is ok.

* For all pnames, the frontend code will do generic validation as per the spec:
check GL profile, version, extensions.
  - If the frontend fails basic validation, it will give the corresponding
negative answer, depending on the pname, without going to the driver.
  - If the frontend is fully qualified to provide an answer, it will (i.e,
MAX_WIDTH, COLOR_COMPONENTS, etc). Otherwise it will call the driver hook (i.e,
INTERNALFORMAT_PREFERRED).
  - For the cases where the query must return full support, caveat support, or
no support; Mesa/main will always call the driver to decide between full or
caveat support (and only answer directly in the case of no-support).

* The last patches in the branch enable support for this extension in i965
backend (drivers/dri/i965/brw_formatquery.c). The backend code only handle
queries where the answer is affected by driver-specific stuff. But by default,
it calls back the frontend function with the default implementations.

The piglit branch adds basic tests that cover all queries. We could write more
test cases and improve the coverage for more corner cases, but at this point we
think an RFC round is needed to give us focus on this front too.

Not all piglit tests pass with our Mesa branch due to some issues that we will
post soon. To run query2 tests only, the filter "-t internalformat_query2" can
be used.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>