mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
read-only mirror of https://gitlab.freedesktop.org/mesa/mesa
The normal encode pass writes batches to a section in build scratch memory. Those batches contain information about the internal node and the primitive nodes. The encoder is split to avoid the register pressure of the compressor and maximize occupancy. The compressor works in two passes because one pass can not guarantee that every primitive node (except) has at least two triangles. This guarantee is used to advertise a smaller acceleration structure size to the application. During compression, every invocation processes at most two triangles. Groups of 8 invocations are used to support the maximum triangle count of 16 that the hardware supports. The first step of compression is loading the triangle(s). Shared vertices are deduplicated early to avoid doing it in the compression loop. The compression loop tries to add triangles to a list of triangles until the computed node size needed for storing the triangles reaches the hardware node size. For this, each invocation first deduplicates vertices with the triangles that have already been picked. It then computes the node size of the picked triangles plus the candidate triangles of the current invocation. The invocation that computed the smallest size is added to the list. Because it may not be possible to fit every triangle into the same node, there can be multiple hardware nodes which are written in parallel for optimal performance. If there are no nodes with only one triangle, all nodes are written. If there is, compression of the batch is aborted and the index of the batch is written to build scratch memory. The second compression pass will repeat the steps above but only for those aborted batches. The nodes with only one triangle can and are now merged. It can not be determined during box node encode which triangles will be compressed together so the encoder also has to fix up the parent box node's child infos. Reviewed-by: Natalie Vock <natalie.vock@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965> |
||
|---|---|---|
| .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 | ||
| 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.