2af6e4beeb394a3f8ac22b890a428b63826fd9a1

load_vertex_id_zero_base() is supposed to return the zero-based vertex ID, which is then offset by load_first_vertex() to get an absolute vertex ID. At the same time, when we're in a Vulkan environment, load_first_vertex() also encodes the vertexOffset passed to the indexed draw. Midgard/Bifrost have a sligtly different semantics, where load_first_vertex() returns vertexOffset + minVertexIdInIndexRange, and load_vertex_id_zero_base() returns an ID that needs to be offset by this vertexOffset + minVertexIdInIndexRange to get the absolute vertex ID. Everything works fine as long as all the load_first_vertex() and load_vertex_id_zero_base() calls are coming from the load_vertex_id() lowering. But as mentioned above, that's no longer the case in Vulkan, where gl_BaseVertexARB will be turned into load_first_vertex() and expect a value of vertexOffset in an indexed draw context. We thus need to fix the mismatch by introducing two new panfrost-specific intrinsic so we can stop abusing load_first_vertex() and load_vertex_id_zero_base(). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
`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.
Description
Languages
C
75.3%
C++
18.2%
Python
2.7%
Assembly
1.5%
Rust
1.2%
Other
0.9%