Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Kenneth Graunke 64b73b770b iris: Fix bad external BO hash table and zombie list interactions
A while ago, we started deferring GEM object closure and VMA release
until buffers were idle.  This had some unforeseen interactions with
external buffers.

We keep imported buffers in hash tables, so if we have repeated imports
of the same GEM object, we map those to the same iris_bo structure.
This is critical for several reasons.  Unfortunately, we broke this
assumption.  When freeing a non-idle external buffer, we would drop it
from the hash tables, then move it to the zombie list.  If someone
reimported the same GEM object, we would not find it in the hash tables,
and go ahead and make a second iris_bo for that GEM object.  But the old
iris_bo would still be in the zombie list, and so we would eventually
call GEM_CLOSE on it - closing a BO that should have still been live.

To work around this, we defer removing a BO from the hash tables until
it's actually fully closed.  This has the strange effect that an
external BO may be on the zombie list, and yet be resurrected before
it can be properly cleaned up.  In this case, we remove it from the
list so it won't be freed.

Fixes severe instability in Weston, which was hitting EINVALs and
ENOENTs from execbuf2, due to batches referring to a GEM object that
had been closed, or at least had its VMA torched.

Fixes: 457a55716e ("iris: Defer closing and freeing VMA until buffers are idle.")
2019-08-05 08:53:41 -07:00
.gitlab-ci gitlab-ci: don't remove a package we don't install anymore 2019-08-05 15:43:26 +01:00
bin symbols-check: fix `nm` invocation on MacOS 2019-08-04 11:06:27 +01:00
build-support configure: commit test files 2017-10-16 16:32:43 -07:00
docs docs: fix "empty array" meson syntax 2019-08-04 12:21:19 +01:00
doxygen
include introduce c11_compat.h to provide C11 things in C99 2019-08-04 11:14:25 +01:00
scons gallium/utils: drop PIPE_SUBSYSTEM_WINDOWS_USER 2019-08-02 18:38:52 +01:00
scripts get_reviewer.pl: improve portability 2019-05-03 14:32:44 +01:00
src iris: Fix bad external BO hash table and zombie list interactions 2019-08-05 08:53:41 -07:00
.dir-locals.el dir-locals.el: Adds White Space support 2016-11-14 19:17:49 +02:00
.editorconfig editorconfig: Fix meson style 2019-05-24 18:44:18 +00:00
.gitattributes
.gitignore intel/tools: Add unit tests for assembler 2019-05-07 14:33:48 -07:00
.gitlab-ci.yml gitlab-ci: just build all the tools 2019-08-02 16:41:19 +01:00
.mailmap .mailmap: Add a few more alises for myself 2019-02-13 12:03:41 -08:00
.travis.yml travis: add MacOS Scons build 2019-08-04 11:11:32 +01:00
Android.common.mk mesa: Enable asm unconditionally, now that gen_matypes is gone. 2019-07-01 11:14:10 -07:00
Android.mk mesa: Enable asm unconditionally, now that gen_matypes is gone. 2019-07-01 11:14:10 -07:00
CleanSpec.mk CleanSpec.mk: Remove HOST_OUT_release 2018-08-02 15:42:40 -06:00
README.rst README: Drop the badges from the readme 2019-02-07 12:46:17 -06:00
REVIEWERS docs: drop most autoconf references 2019-04-15 13:44:34 -07:00
SConstruct scons: Require python 2.7 2018-08-16 13:52:56 -07:00
VERSION Bump version for 19.1 branch 2019-05-07 16:02:34 +00:00
appveyor.yml appveyor: Revert commits adding Cygwin support. 2019-01-25 14:13:26 +00:00
common.py scons/svga: remove opt from the list of valid build types 2018-10-26 12:09:00 -06:00
meson.build mesa: Rename GLX_USE_TLS to USE_ELF_TLS. 2019-08-03 20:18:17 +02:00
meson_options.txt v3d: Introduce a DRM shim for calling out to the simulator. 2019-07-25 08:56:19 -07: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.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.