mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
read-only mirror of https://gitlab.freedesktop.org/mesa/mesa
Right now, spirv_to_nir places all constants at the top of the function and has a hash table to de-duplicate them. This change drops the hash table and starts re-emitting constants more-or-less at their uses. This is more consistent with what we do in GLSL -> NIR translation. It is, however, a change to SPIR-V -> NIR translation which will likely affect other optimizations in unexpected ways so it should be evaluated separately. This gives some good saves for spills/fills for Intel, without causing any significant regressions on RADV, because it is using the nir_opt_reuse_constants() pass. In the long run that should be superseded by some form of GCM. ``` Intel TGL results for Intel fossils: Totals: Instrs: 183287977 -> 183269431 (-0.01%); split: -0.07%, +0.06% Cycles: 18224600804 -> 18223114114 (-0.01%); split: -0.16%, +0.15% Spill count: 111031 -> 108377 (-2.39%); split: -2.45%, +0.06% Fill count: 221781 -> 216479 (-2.39%); split: -2.39%, +0.00% Scratch Memory Size: 4355072 -> 4180992 (-4.00%); split: -5.31%, +1.32% Totals from 43684 (6.54% of 667704) affected shaders: Instrs: 38289482 -> 38270936 (-0.05%); split: -0.33%, +0.28% Cycles: 7166415272 -> 7164928582 (-0.02%); split: -0.40%, +0.38% Spill count: 93747 -> 91093 (-2.83%); split: -2.90%, +0.07% Fill count: 190943 -> 185641 (-2.78%); split: -2.78%, +0.00% Scratch Memory Size: 3127296 -> 2953216 (-5.57%); split: -7.40%, +1.83% ``` ``` RADV GFX1100 results for radv fossils: Totals: Instrs: 71623708 -> 71624667 (+0.00%); split: -0.00%, +0.01% CodeSize: 369324312 -> 369334744 (+0.00%); split: -0.00%, +0.01% SpillSGPRs: 13586 -> 13582 (-0.03%) SpillVGPRs: 911 -> 910 (-0.11%); split: -0.55%, +0.44% Latency: 632887831 -> 632880378 (-0.00%); split: -0.00%, +0.00% InvThroughput: 81674859 -> 81676684 (+0.00%); split: -0.00%, +0.01% VClause: 1273752 -> 1273727 (-0.00%); split: -0.00%, +0.00% SClause: 2409593 -> 2409078 (-0.02%); split: -0.02%, +0.00% Copies: 4063579 -> 4064425 (+0.02%); split: -0.05%, +0.07% Branches: 1196723 -> 1196720 (-0.00%); split: -0.00%, +0.00% Totals from 16244 (12.17% of 133461) affected shaders: Instrs: 31116807 -> 31117766 (+0.00%); split: -0.01%, +0.01% CodeSize: 160316656 -> 160327088 (+0.01%); split: -0.01%, +0.01% SpillSGPRs: 12270 -> 12266 (-0.03%) SpillVGPRs: 835 -> 834 (-0.12%); split: -0.60%, +0.48% Latency: 344388549 -> 344381096 (-0.00%); split: -0.01%, +0.00% InvThroughput: 43043761 -> 43045586 (+0.00%); split: -0.01%, +0.01% VClause: 433221 -> 433196 (-0.01%); split: -0.01%, +0.00% SClause: 900825 -> 900310 (-0.06%); split: -0.06%, +0.00% Copies: 1989000 -> 1989846 (+0.04%); split: -0.11%, +0.15% Branches: 676625 -> 676622 (-0.00%); split: -0.00%, +0.00% ``` Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5282> |
||
|---|---|---|
| .ci-farms | ||
| .ci-farms-disabled | ||
| .github/workflows | ||
| .gitlab | ||
| .gitlab-ci | ||
| android | ||
| bin | ||
| build-support | ||
| docs | ||
| include | ||
| src | ||
| subprojects | ||
| .clang-format | ||
| .clang-format-ignore | ||
| .clang-format-include | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .graphqlrc.yml | ||
| .mailmap | ||
| CODEOWNERS | ||
| meson.build | ||
| meson_options.txt | ||
| README.rst | ||
| 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 `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.