8bd4976d981a9a98ce7e419b25c05d38ccac027b
This is counter-intuitive, but required for correct operation when CSEL.i32 takes a 1-bit (stored 16-bit) boolean argument. The impedance mismatch ultimately is between CSEL.b32 (nir's bcsel, nonexistant in the hardware) and the lowering CSEL.i32. However, a similar problem exists even with MUX.i32 which lacks a good way of zero/sign-extending booleans. Cherry-picked from my Valhall branch though the issue also affects Bifrost. Fixes piglit shaders@glsl-vs-if-bool on Bifrost. Unfortunately, shader-db is quite unhappy :-( The proper fix is to use lower_bool_to_bitsize, but that can't be backported to mesa-stable. total instructions in shared programs: 157539 -> 158953 (0.90%) instructions in affected programs: 55621 -> 57035 (2.54%) helped: 2 HURT: 259 helped stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2 helped stats (rel) min: 2.11% max: 2.67% x̄: 2.39% x̃: 2.39% HURT stats (abs) min: 1.0 max: 40.0 x̄: 5.47 x̃: 2 HURT stats (rel) min: 0.36% max: 16.13% x̄: 2.55% x̃: 1.59% 95% mean confidence interval for instructions value: 4.44 6.40 95% mean confidence interval for instructions %-change: 2.21% 2.82% Instructions are HURT. total tuples in shared programs: 132322 -> 132907 (0.44%) tuples in affected programs: 31806 -> 32391 (1.84%) helped: 5 HURT: 152 helped stats (abs) min: 1.0 max: 2.0 x̄: 1.40 x̃: 1 helped stats (rel) min: 0.39% max: 3.03% x̄: 1.70% x̃: 1.61% HURT stats (abs) min: 1.0 max: 42.0 x̄: 3.89 x̃: 2 HURT stats (rel) min: 0.29% max: 18.18% x̄: 2.50% x̃: 1.79% 95% mean confidence interval for tuples value: 2.88 4.58 95% mean confidence interval for tuples %-change: 1.87% 2.85% Tuples are HURT. total clauses in shared programs: 28672 -> 28698 (0.09%) clauses in affected programs: 869 -> 895 (2.99%) helped: 1 HURT: 24 helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 helped stats (rel) min: 5.88% max: 5.88% x̄: 5.88% x̃: 5.88% HURT stats (abs) min: 1.0 max: 2.0 x̄: 1.12 x̃: 1 HURT stats (rel) min: 0.49% max: 33.33% x̄: 8.46% x̃: 3.59% 95% mean confidence interval for clauses value: 0.82 1.26 95% mean confidence interval for clauses %-change: 3.84% 11.93% Clauses are HURT. total cycles in shared programs: 15119.04 -> 15137.88 (0.12%) cycles in affected programs: 922.87 -> 941.71 (2.04%) helped: 4 HURT: 79 helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.05 x̃: 0 helped stats (rel) min: 0.40% max: 3.17% x̄: 1.57% x̃: 1.35% HURT stats (abs) min: 0.041665999999999315 max: 1.75 x̄: 0.24 x̃: 0 HURT stats (rel) min: 0.30% max: 20.00% x̄: 2.83% x̃: 2.12% 95% mean confidence interval for cycles value: 0.17 0.29 95% mean confidence interval for cycles %-change: 1.86% 3.37% Cycles are HURT. total arith in shared programs: 4922.71 -> 4947.71 (0.51%) arith in affected programs: 1423.79 -> 1448.79 (1.76%) helped: 5 HURT: 177 helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.06 x̃: 0 helped stats (rel) min: 0.40% max: 3.17% x̄: 1.82% x̃: 1.67% HURT stats (abs) min: 0.041665999999999315 max: 1.75 x̄: 0.14 x̃: 0 HURT stats (rel) min: 0.30% max: 22.22% x̄: 2.50% x̃: 1.52% 95% mean confidence interval for arith value: 0.11 0.17 95% mean confidence interval for arith %-change: 1.86% 2.90% Arith are HURT. total quadwords in shared programs: 120605 -> 120956 (0.29%) quadwords in affected programs: 26535 -> 26886 (1.32%) helped: 6 HURT: 143 helped stats (abs) min: 1.0 max: 7.0 x̄: 2.83 x̃: 1 helped stats (rel) min: 0.93% max: 6.33% x̄: 2.29% x̃: 1.71% HURT stats (abs) min: 1.0 max: 21.0 x̄: 2.57 x̃: 2 HURT stats (rel) min: 0.34% max: 13.79% x̄: 2.02% x̃: 1.22% 95% mean confidence interval for quadwords value: 1.86 2.86 95% mean confidence interval for quadwords %-change: 1.45% 2.24% Quadwords are HURT. total threads in shared programs: 4670 -> 4669 (-0.02%) threads in affected programs: 2 -> 1 (-50.00%) helped: 0 HURT: 1 Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14576>
`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%