Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Timur Kristóf 09f89d15e4 ac/nir/nggc: Don't reuse uniform values from divergent control flow.
With NGG culling, the shaders are split into two parts:
the top part that computes just the position output,
and the bottom part which produces the other outputs.

To reduce redundancy between the two, I added some code
to reuse uniform variables between them. However, there is
an edge case I didn't think about: because of vertex repacking,
it is possible for the bottom part to process a different vertex.
Therefore it can take a different divergent code path
(though it must still take the same uniform code path).
Due to this, when a uniform value comes from divergent control
flow, this may be undefined in the bottom part.

This commit stops reusing uniform variables from
divergent control flow, to fix issues that arise from this.

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 1723 (1.34% of 128647) affected shaders:
VGPRs: 89312 -> 89184 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 4575 -> 120 (-97.38%)
CodeSize: 10846424 -> 10873836 (+0.25%); split: -0.68%, +0.93%
MaxWaves: 34582 -> 34602 (+0.06%); split: +0.06%, -0.01%
Instrs: 2124471 -> 2128835 (+0.21%); split: -0.51%, +0.72%
Latency: 7274569 -> 7293899 (+0.27%); split: -0.22%, +0.48%
InvThroughput: 1637130 -> 1635490 (-0.10%); split: -0.17%, +0.07%
VClause: 25141 -> 25414 (+1.09%); split: -0.02%, +1.10%
SClause: 56367 -> 59503 (+5.56%); split: -1.36%, +6.93%
Copies: 230704 -> 219313 (-4.94%); split: -5.49%, +0.55%
Branches: 72781 -> 72681 (-0.14%); split: -0.21%, +0.07%
PreSGPRs: 118766 -> 100176 (-15.65%); split: -15.70%, +0.05%
PreVGPRs: 76876 -> 76833 (-0.06%)

Fixes: 0bb543bb60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001>
2021-09-24 17:32:53 +00:00
.gitlab/issue_templates issue_templates/Bug Report: Rename master branch to main 2021-05-05 12:20:11 -07:00
.gitlab-ci ci/baremetal: Retry if our network device spontaneously fails. 2021-09-20 19:55:55 +00:00
android AOSP: Add panfrost vulkan library suffix 2021-08-16 09:18:46 +00:00
bin bin/khronos-update.py: add upstream for vulkan_directfb.h & vulkan_screen.h 2021-09-19 11:00:32 +01:00
build-support
docs venus: amend supported extensions list 2021-09-22 19:34:48 +00:00
include egl/dri2: seperate EGLImage validate and lookup 2021-09-09 01:42:39 +00:00
src ac/nir/nggc: Don't reuse uniform values from divergent control flow. 2021-09-24 17:32:53 +00:00
subprojects util: Perfetto SDK v15.0 2021-05-07 13:41:38 +00:00
.dir-locals.el
.editorconfig editorconfig: Use 3-space tabs for .rst 2021-06-22 17:37:55 +00:00
.gitignore intel/tools: Add unit tests for assembler 2019-05-07 14:33:48 -07:00
.gitlab-ci.yml ci/bare-metal: add etnaviv 2021-09-17 17:54:39 +00:00
.mailmap mailmap: Add two more lines for Alyssa Rosenzweig 2021-07-12 23:45:34 +00:00
.travis.yml travis: Download XQuartz from GitHub. 2021-05-29 10:25:16 +00:00
README.rst docs: promote #dri-devel on oftc over freenode 2021-05-24 09:21:48 +00:00
REVIEWERS Fix up leftover "state_trackers" references to "frontends" 2021-07-02 07:35:05 +00:00
VERSION VERSION: bump version for 21.3 development cycle 2021-07-14 10:22:12 -07:00
meson.build meson: introduce option vmware-mks-stats controlling the instrumentations of gallium svga driver 2021-09-21 00:07:40 +00:00
meson_options.txt meson: introduce option vmware-mks-stats controlling the instrumentations of gallium svga driver 2021-09-21 00:07:40 +00:00

README.rst

`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.