0e15d5af81bba7c1e798cf10fc838988c86daafd
The previous code had a number of errors, the most glaring of which was forcing linear when it was one of the possible layouts requested. When modifiers are being used, a list of _acceptable_ modifiers is supplied; it's up to the driver to then make a decision as to which it thinks is most optimal. Normally we would select between linear/tiled/UBWC in ascending order of preference according to what's possible, however we can't use a tiled layout with explicit modifiers as there is no modifier token defined for it. Rewrite the layout-selection mechanism to always try to do the most optimal thing. If the use flags force us to, or we have a shared resource without explicit modifiers, we use linear. Failing that, we use UBWC wherever possible; if this is not possible, we use tiled for internal resources only or linear for shared resources. v2 (Rob): respect FD_FORMAT_MOD_QCOM_TILED; do not print perf warning on user choice of disabling UBWC; v3: fix several issues breaking CI tests: revert removal of using MOD_INVALID in various places, and assume implicit modifiers if present; do not attempt to set UBWC flags when screen->tile_mode(prsc) falls back to LINEAR (e.g. for small mip-maps levels); use TILED for implicit modifier case with non-shared resources v4: fix unintended demotion of UBWC, i.e. only check QCOM_COMPRESSED modifier and demote UBWC to less optimal format when using explicit modifiers Signed-off-by: Daniel Stone <daniels@collabora.com> Tested-by: Heinrich Fink <hfink@snap.com> Signed-off-by: Heinrich Fink <hfink@snap.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12595>
`Mesa <https://mesa3d.org>`_ - The 3D Graphics Library ====================================================== Source ------ This repository lives at https://gitlab.freedesktop.org/mesa/mesa. Other repositories are likely forks, and code found there is not supported. Build & install --------------- You can find more information in our documentation (`docs/install.rst <https://mesa3d.org/install.html>`_), but the recommended way is to use Meson (`docs/meson.rst <https://mesa3d.org/meson.html>`_): .. code-block:: sh $ mkdir build $ cd build $ meson .. $ sudo ninja install Support ------- Many Mesa devs hang on IRC; if you're not sure which channel is appropriate, you should ask your question on `OFTC's #dri-devel <irc://irc.oftc.net/dri-devel>`_, someone will redirect you if necessary. Remember that not everyone is in the same timezone as you, so it might take a while before someone qualified sees your question. To figure out who you're talking to, or which nick to ping for your question, check out `Who's Who on IRC <https://dri.freedesktop.org/wiki/WhosWho/>`_. The next best option is to ask your question in an email to the mailing lists: `mesa-dev\@lists.freedesktop.org <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>`_ Bug reports ----------- If you think something isn't working properly, please file a bug report (`docs/bugs.rst <https://mesa3d.org/bugs.html>`_). Contributing ------------ Contributions are welcome, and step-by-step instructions can be found in our documentation (`docs/submittingpatches.rst <https://mesa3d.org/submittingpatches.html>`_). Note that Mesa uses gitlab for patches submission, review and discussions.
Description
Languages
C
75.5%
C++
17.2%
Python
2.7%
Rust
1.8%
Assembly
1.5%
Other
1%