mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
read-only mirror of https://gitlab.freedesktop.org/mesa/mesa
Many fragment shaders do a discard using relatively little information but still put the discard fairly far down in the shader for no good reason. If the discard is moved higher up, we can possibly avoid doing some or almost all of the work in the shader. When this lets us skip texturing operations, it's an especially high win. One of the biggest offenders here is DXVK. The D3D APIs have different rules for discards than OpenGL and Vulkan. One effective way (which is what DXVK uses) to implement DX behavior on top of GL or Vulkan is to wait until the very end of the shader to discard. This ends up in the pessimal case where we always do all of the work before discarding. This pass helps some DXVK shaders significantly. v2 (Jason Ekstrand): - Fix a couple of typos (Grazvydas, Ian) - Use the new nir_instr_move helper - Find all movable discards before moving anything so we don't accidentally re-order anything and break dependencies v3 (Pierre-Eric): remove the call to nir_opt_conditional_discard based on Daniel Schürmann comment. v4 (Pierre-Eric): - handle demote intrinsics and drop derivatives_safe_after_discard - add early return if discards/demotes aren't used v5 (Pierre-Eric): - use pass_flags instead of instr set (Daniel Schürmann) v6 (Daniel Schürmann): - cleanup and fix pass_flags handling Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10522> |
||
|---|---|---|
| .gitlab/issue_templates | ||
| .gitlab-ci | ||
| bin | ||
| build-support | ||
| docs | ||
| include | ||
| src | ||
| subprojects | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mailmap | ||
| .travis.yml | ||
| Android.common.mk | ||
| Android.mk | ||
| CleanSpec.mk | ||
| meson.build | ||
| meson_options.txt | ||
| README.rst | ||
| REVIEWERS | ||
| VERSION | ||
`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 `Freenode's #dri-devel <irc://chat.freenode.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.