Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Dave Airlie b88468f15c radv: return binary code_size not variant code size to cache
The code sizes return here get passed to the cache shader insert function,
which then memcpy from the code ptr, and causes all sorts of valgrind
errors like:
==6755== Invalid read of size 8
==6755==    at 0x4C32FEE: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1021)
==6755==    by 0x2305D4C7: radv_pipeline_cache_insert_shaders (radv_pipeline_cache.c:416)
==6755==    by 0x2305791D: radv_create_shaders (radv_pipeline.c:2158)
==6755==    by 0x2305C523: radv_pipeline_init (radv_pipeline.c:3404)
==6755==    by 0x2305C890: radv_graphics_pipeline_create (radv_pipeline.c:3515)
==6755==    by 0x230188AB: radv_device_init_meta_blit_color (radv_meta_blit.c:871)
==6755==    by 0x2301D50E: radv_device_init_meta_blit_state (radv_meta_blit.c:1278)
==6755==    by 0x23011893: radv_device_init_meta (radv_meta.c:352)
==6755==    by 0x2300744B: radv_CreateDevice (radv_device.c:1576)
==6755==    by 0x5187D0F: ??? (in /usr/lib64/libvulkan.so.1.1.77)
==6755==    by 0x518F6A3: ??? (in /usr/lib64/libvulkan.so.1.1.77)
==6755==    by 0x5192A42: vkCreateDevice (in /usr/lib64/libvulkan.so.1.1.77)
==6755==  Address 0x22a58548 is 4 bytes after a block of size 116 alloc'd
==6755==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==6755==    by 0x23089DC4: ac_elf_read (ac_binary.c:144)
==6755==    by 0x23090A60: ac_compile_module_to_binary (ac_llvm_helper.cpp:162)
==6755==    by 0x23053F06: compile_to_memory_buffer (radv_llvm_helper.cpp:58)
==6755==    by 0x23053F06: radv_compile_to_binary (radv_llvm_helper.cpp:98)
==6755==    by 0x23052769: ac_llvm_compile (radv_nir_to_llvm.c:3394)
==6755==    by 0x23052823: ac_compile_llvm_module (radv_nir_to_llvm.c:3418)
==6755==    by 0x23053C05: radv_compile_nir_shader (radv_nir_to_llvm.c:3542)
==6755==    by 0x23061B4E: shader_variant_create (radv_shader.c:580)
==6755==    by 0x23061CFD: radv_shader_variant_create (radv_shader.c:634)
==6755==    by 0x23057765: radv_create_shaders (radv_pipeline.c:2123)
==6755==    by 0x2305C523: radv_pipeline_init (radv_pipeline.c:3404)
==6755==    by 0x2305C890: radv_graphics_pipeline_create (radv_pipeline.c:3515)

Since we are just inserting the code into the cache, we can avoid these
bad reads and data in the cache by just using the binary code size here.

Fixes: 939e5a382 (radv: add padding for the UMR disassembler)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-28 06:20:20 +10:00
bin bin/get-pick-listh.sh: force git --pretty=medium 2018-05-23 09:54:17 -07:00
build-support configure: commit test files 2017-10-16 16:32:43 -07:00
docs mesa: GL_MESA_framebuffer_flip_y extension [v4] 2018-07-27 12:32:25 -07:00
doxygen doxygen: Plumb through gallium/ to automated documentation 2016-05-30 17:53:45 +01:00
include mesa: GL_MESA_framebuffer_flip_y extension [v4] 2018-07-27 12:32:25 -07:00
m4 m4: Use older autoconf 2.63 compatible ax_check_compile_flag. 2017-09-01 16:30:40 -07:00
scons mesa: Unconditionally enable floating-point textures 2018-06-18 09:29:38 +10:00
scripts get_reviewer.pl: fix mesa check 2016-08-30 16:44:00 -04:00
src radv: return binary code_size not variant code size to cache 2018-07-28 06:20:20 +10:00
.dir-locals.el dir-locals.el: Adds White Space support 2016-11-14 19:17:49 +02:00
.editorconfig editorconfig: Add meson configuration 2017-10-09 13:40:50 -07:00
.gitattributes
.gitignore .gitignore: list *.orig and *.rej 2017-09-06 17:48:50 +01:00
.mailmap mailmap: Use Eric Engestrom's personal email address 2018-03-15 12:03:41 +00:00
.travis.yml travis: manually generate sys/syscall.h 2018-07-24 19:52:11 +03:00
Android.common.mk android: util/disk_cache: fix building errors in gallium drivers 2018-07-21 12:06:38 +02:00
Android.mk dri drivers: Always add the sha1 build-id 2017-10-31 23:36:54 -07:00
CleanSpec.mk android: Depend on gallium_dri from EGL, instead of linking in gallium. 2015-06-09 11:38:45 -07: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 root meson.build to the Meson reviewers group 2018-06-01 17:53:06 +01:00
SConstruct scons: use python3-compatible lists 2017-09-25 12:05:44 +01:00
VERSION Bump version after 18.1 2018-04-22 09:35:56 -07:00
appveyor.yml appveyor: Consume LLVM 5.0.1. 2018-06-16 18:09:20 +01:00
autogen.sh autogen.sh: pass --force to autoreconf, quote ORIGDIR 2015-03-11 23:28:26 +00:00
common.py scons: Recognize LLVM_CONFIG environment variable. 2016-11-24 13:37:33 -08:00
configure.ac util/disk_cache: Fix disk_cache_get_function_timestamp with disabled cache. 2018-07-20 12:09:19 +02:00
install-gallium-links.mk gallium: Fix install-gallium-links.mk on non-bash /bin/sh 2016-10-10 08:56:12 -07:00
install-lib-links.mk
meson.build util/disk_cache: Fix disk_cache_get_function_timestamp with disabled cache. 2018-07-20 12:09:19 +02:00
meson_options.txt meson: Move xvmc test tools from unit tests to installed tools. 2018-07-13 13:29:29 -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 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.