[Mesa-dev] [Bug 92687] Add support for ARB_internalformat_query2

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 23 05:11:55 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=92687

--- Comment #1 from Eduardo Lima Mitev <elima at igalia.com> ---
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: https://github.com/Igalia/mesa/tree/internalformat-query2-rfc
Piglit: https://github.com/Igalia/piglit/tree/internalformat-query2-rfc

>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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151223/e1151329/attachment.html>


More information about the mesa-dev mailing list