Mesa 3D graphics library
Go to file
Neil Roberts dfc3a7cb3c spirv/nir: handle location decorations on block interface members
Previously the code was taking any location decoration on the block
and using that to calculate the member locations for all of the
members. I think this was assuming that there would only be one
location decoration for the entire block. According to the Vulkan spec
it is possible to add location decorations to individual members:

   “If the structure type is a Block but without a Location, then each
    of its members must have a Location decoration. If it is a Block
    with a Location decoration, then its members are assigned
    consecutive locations in declaration order, starting from the
    first member which is initially the Block. Any member with its own
    Location decoration is assigned that location. Each remaining
    member is assigned the location after the immediately preceding
    member in declaration order.”

This patch makes it instead keep track of which members have been
assigned an explicit location. It also has a space to store the
location for the struct as a whole. Once all the decorations have been
processed it iterates over each member to fill in the missing
locations using the rules described above.

So, this commit is needed to get working a case like this, on both
Vulkan and OpenGL using SPIR-V (ARB_gl_spirv):

     out block {
            layout(location = 2) vec4 c;
            layout(location = 3) vec4 d;
            layout(location = 0) vec4 a;
            layout(location = 1) vec4 b;
     } name;

v2: (changes made by Alejandro Piñeiro)
   * Update after introducing struct member splitting (See commit b0c643d)
   * Update after only exposing interface_type for blocks, not to any struct
   * Update after last changes done for xfb support

v3: use "assign" instead of "add" on the new method added (Tapani)

Signed-off-by: Neil Roberts <nroberts@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2019-01-28 11:42:46 +01:00
bin bin/meson-cmd-extract: Also handle cross and native files 2019-01-18 09:37:01 -08:00
build-support
docs egl: finalize EGL_MESA_query_driver 2019-01-24 14:37:36 +00:00
doxygen
include dri_interface: add put shm image2 (v2) 2019-01-25 04:27:45 +10:00
m4 configure: allow building with python3 2018-10-31 19:15:50 +00:00
scons scons: drop unused HAVE_STDINT_H macro 2018-10-30 18:10:59 +00:00
scripts appveyor: Revert commits adding Cygwin support. 2019-01-25 14:13:26 +00:00
src spirv/nir: handle location decorations on block interface members 2019-01-28 11:42:46 +01:00
.dir-locals.el
.editorconfig editorconfig: Add max_line_length property 2019-01-10 15:50:34 +02:00
.gitattributes
.gitignore
.mailmap mailmap: add various typos of Emil's address from the log 2018-08-16 17:38:04 +01:00
.travis.yml travis: bump libdrm to 2.4.97 2019-01-24 14:50:33 +00:00
Android.common.mk build: stop defining unused VERSION 2018-11-26 22:05:02 +00:00
Android.mk
CleanSpec.mk CleanSpec.mk: Remove HOST_OUT_release 2018-08-02 15:42:40 -06:00
Makefile.am v3d: Switch the vc5 driver to using the finalized V3D UABI. 2018-05-16 21:19:07 +01:00
README.rst README: wording fix for previous commit 2018-06-11 18:34:58 +01:00
REVIEWERS REVIEWERS: add Vulkan reviewer group 2018-11-13 17:25:02 +00:00
SConstruct scons: Require python 2.7 2018-08-16 13:52:56 -07:00
VERSION mesa: bump version to 19.1.0-devel 2018-11-01 18:54:02 +00:00
appveyor.yml appveyor: Revert commits adding Cygwin support. 2019-01-25 14:13:26 +00:00
autogen.sh
common.py scons/svga: remove opt from the list of valid build types 2018-10-26 12:09:00 -06:00
configure.ac winsys/amdgpu: use the new BO list API 2019-01-22 11:59:27 -05:00
install-gallium-links.mk
install-lib-links.mk
meson.build meson: Add warnings and errors when using ICC 2019-01-24 19:14:50 +00:00
meson_options.txt meson: add etnaviv to the tools option 2018-12-18 21:50:58 +01: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 status
------------

Travis:

.. image:: https://travis-ci.org/mesa3d/mesa.svg?branch=master
    :target: https://travis-ci.org/mesa3d/mesa

Appveyor:

.. image:: https://img.shields.io/appveyor/ci/mesa3d/mesa.svg
    :target: https://ci.appveyor.com/project/mesa3d/mesa

Coverity:

.. image:: https://scan.coverity.com/projects/139/badge.svg?flat=1
    :target: https://scan.coverity.com/projects/mesa


Build & install
---------------

You can find more information in our documentation (`docs/install.html
<https://mesa3d.org/install.html>`_), but the recommended way is to use
Meson (`docs/meson.html <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 `Freenode's #dri-devel
<irc://chat.freenode.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.html <https://mesa3d.org/bugs.html>`_).


Contributing
------------

Contributions are welcome, and step-by-step instructions can be found in our
documentation (`docs/submittingpatches.html
<https://mesa3d.org/submittingpatches.html>`_).

Note that Mesa uses email mailing-lists for patches submission, review and
discussions.