mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-23 22:58:33 +02:00
read-only mirror of https://gitlab.freedesktop.org/mesa/mesa
There is more to do here. A few things I have noticed.
1. There are cases where the ideal pass cannot make progress, but the
"logic op to predicated move" pass can. Sometimes scheduling can
rearrange this to sequences like:
cmp.nz.f0.0(16) g99<1>F g98<1,1,0>F 0x3f800000F
cmp.g.f0.0(16) null<1>HF g106<16,16,1>HF 0x0000HF
(+f0.0) mov.nz.f0.0(16) null<1>UD g99<8,8,1>UD
We should be able to detect this after scheduling, and eliminate the
mov.nz.
2. We should extend post-scheduling cmod propagation to handle cases
where a predicated CMP is the only use of an ALU result. I have
observed sequences like
and(16) v5200:UD v5048+6.0:UD 134217726u
(+f0.0) cmp.z.f0.0(16) null:D v5200:D 0d
and
or(16) g113<1>UD g112<1,1,0>UD g20<1,1,0>UD
(-f0.0) mov.nz.f0.0(16) null<1>UD g113<8,8,1>UD
v2: Don't allow SEL or CSEL in is_valid_logic_source. No shader-db or
fossil-db changes here, but this prevents problems with (possible)
future commits.
v3: Replace hither and yon with nearer and farther. Find both logic
sources in one loop. Use brw_flags_written. Refactor cmod selection (for
BFN vs all other opcodes) to separate function. Suggested by Caio.
v4: Actually remove flags_written now. Suggested (twice) by Caio.
Require that flags written by the nearer logic source matches the flags
written by the logic operation. This fixes cmp_flag_subreg_mismatch and
mov_flag_subreg_mismatch (added in the next commit). Also
s/inst->src[0]/inst->src[src]/. Noticed by Caio.
v5: flags_read was also unused. Noticed by marge.
shader-db:
Lunar Lake
total instructions in shared programs: 17083282 -> 17072645 (-0.06%)
instructions in affected programs: 2076491 -> 2065854 (-0.51%)
helped: 3952 / HURT: 0
total cycles in shared programs: 887823360 -> 889080938 (0.14%)
cycles in affected programs: 472236518 -> 473494096 (0.27%)
helped: 3156 / HURT: 936
total fills in shared programs: 1778 -> 1778 (0.00%)
fills in affected programs: 286 -> 286 (0.00%)
helped: 2 / HURT: 2
LOST: 27
GAINED: 14
Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19980337 -> 19965369 (-0.07%)
instructions in affected programs: 2406043 -> 2391075 (-0.62%)
helped: 4621 / HURT: 7
total cycles in shared programs: 887416449 -> 887170456 (-0.03%)
cycles in affected programs: 457957623 -> 457711630 (-0.05%)
helped: 3776 / HURT: 1039
total fills in shared programs: 4371 -> 4375 (0.09%)
fills in affected programs: 798 -> 802 (0.50%)
helped: 4 / HURT: 6
LOST: 15
GAINED: 1
Tiger Lake
total instructions in shared programs: 19904512 -> 19889603 (-0.07%)
instructions in affected programs: 2405908 -> 2390999 (-0.62%)
helped: 4616 / HURT: 22
total cycles in shared programs: 864580948 -> 863953289 (-0.07%)
cycles in affected programs: 459500521 -> 458872862 (-0.14%)
helped: 3710 / HURT: 1093
total spills in shared programs: 3467 -> 3472 (0.14%)
spills in affected programs: 15 -> 20 (33.33%)
helped: 0 / HURT: 1
total fills in shared programs: 2059 -> 2069 (0.49%)
fills in affected programs: 47 -> 57 (21.28%)
helped: 0 / HURT: 1
LOST: 11
GAINED: 9
Ice Lake
total instructions in shared programs: 20821682 -> 20806373 (-0.07%)
instructions in affected programs: 2447072 -> 2431763 (-0.63%)
helped: 4741 / HURT: 1
total cycles in shared programs: 876811334 -> 876360389 (-0.05%)
cycles in affected programs: 438363075 -> 437912130 (-0.10%)
helped: 4000 / HURT: 724
total fills in shared programs: 3837 -> 3835 (-0.05%)
fills in affected programs: 302 -> 300 (-0.66%)
helped: 1 / HURT: 0
LOST: 12
GAINED: 9
Skylake
total instructions in shared programs: 19041784 -> 19026462 (-0.08%)
instructions in affected programs: 2397491 -> 2382169 (-0.64%)
helped: 4711 / HURT: 0
total cycles in shared programs: 868019298 -> 867790279 (-0.03%)
cycles in affected programs: 441110462 -> 440881443 (-0.05%)
helped: 3915 / HURT: 788
total fills in shared programs: 3767 -> 3765 (-0.05%)
fills in affected programs: 302 -> 300 (-0.66%)
helped: 1 / HURT: 0
LOST: 4
GAINED: 3
fossil-db:
Lunar Lake
Totals:
Instrs: 924697067 -> 922488661 (-0.24%); split: -0.25%, +0.01%
Subgroup size: 40939424 -> 40939744 (+0.00%)
Cycle count: 106291402322 -> 105964111203 (-0.31%); split: -0.66%, +0.35%
Spill count: 3423988 -> 3421004 (-0.09%); split: -0.34%, +0.25%
Fill count: 4877087 -> 4862981 (-0.29%); split: -1.21%, +0.92%
Max live registers: 193812217 -> 193805296 (-0.00%)
Max dispatch width: 49089184 -> 49085216 (-0.01%); split: +0.01%, -0.02%
Totals from 453746 (22.47% of 2019504) affected shaders:
Instrs: 529674876 -> 527466470 (-0.42%); split: -0.43%, +0.02%
Subgroup size: 320 -> 640 (+100.00%)
Cycle count: 87892218969 -> 87564927850 (-0.37%); split: -0.79%, +0.42%
Spill count: 3302695 -> 3299711 (-0.09%); split: -0.35%, +0.26%
Fill count: 4778154 -> 4764048 (-0.30%); split: -1.23%, +0.94%
Max live registers: 65405449 -> 65398528 (-0.01%)
Max dispatch width: 10793104 -> 10789136 (-0.04%); split: +0.04%, -0.08%
Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 998057341 -> 995683321 (-0.24%); split: -0.25%, +0.01%
Subgroup size: 27545440 -> 27545656 (+0.00%)
Cycle count: 93854696449 -> 93709099572 (-0.16%); split: -0.62%, +0.46%
Spill count: 3709547 -> 3701296 (-0.22%); split: -0.50%, +0.28%
Fill count: 5032889 -> 5014189 (-0.37%); split: -1.28%, +0.91%
Max live registers: 121823974 -> 121810927 (-0.01%)
Max dispatch width: 38021936 -> 38020536 (-0.00%); split: +0.06%, -0.07%
Totals from 505565 (22.13% of 2284025) affected shaders:
Instrs: 549480901 -> 547106881 (-0.43%); split: -0.45%, +0.02%
Subgroup size: 216 -> 432 (+100.00%)
Cycle count: 76260069937 -> 76114473060 (-0.19%); split: -0.76%, +0.57%
Spill count: 3526038 -> 3517787 (-0.23%); split: -0.53%, +0.29%
Fill count: 4844826 -> 4826126 (-0.39%); split: -1.33%, +0.94%
Max live registers: 38085235 -> 38072188 (-0.03%)
Max dispatch width: 8015432 -> 8014032 (-0.02%); split: +0.30%, -0.32%
Tiger Lake
Totals:
Instrs: 1013436935 -> 1011070083 (-0.23%); split: -0.25%, +0.02%
Cycle count: 85763486346 -> 85580242131 (-0.21%); split: -0.68%, +0.47%
Spill count: 3903905 -> 3902350 (-0.04%); split: -0.36%, +0.32%
Fill count: 6801966 -> 6787600 (-0.21%); split: -0.70%, +0.49%
Max live registers: 122298352 -> 122284634 (-0.01%)
Max dispatch width: 37957184 -> 37964608 (+0.02%); split: +0.10%, -0.08%
Totals from 525103 (23.03% of
|
||
|---|---|---|
| .ci-farms | ||
| .ci-farms-disabled | ||
| .github/workflows | ||
| .gitlab | ||
| .gitlab-ci | ||
| .marge/hooks | ||
| android | ||
| bin | ||
| build-support | ||
| docs | ||
| include | ||
| licenses | ||
| 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 | ||
| .mr-label-maker.yml | ||
| .shellcheckrc | ||
| clippy.toml | ||
| CODEOWNERS | ||
| meson.build | ||
| meson.options | ||
| README.rst | ||
| rustfmt.toml | ||
| 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://docs.mesa3d.org/install.html>`_), but the recommended way is to use Meson (`docs/meson.rst <https://docs.mesa3d.org/meson.html>`_): .. code-block:: sh $ meson setup build $ ninja -C build/ $ sudo ninja -C build/ 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://docs.mesa3d.org/bugs.html>`_). Contributing ------------ Contributions are welcome, and step-by-step instructions can be found in our documentation (`docs/submittingpatches.rst <https://docs.mesa3d.org/submittingpatches.html>`_). Note that Mesa uses gitlab for patches submission, review and discussions.