Find a file
Ian Romanick 4c82d426bd nir/algebraic: Mark other comparison exact when removing a == a
This prevents some additional optimizations that would change the
original result.  This includes things like (b < a && b < c) => b <
min(a, c) and !(a < b) => b >= a.  Both of these optimizations were
specifically observed in the piglit tests added in piglit!160.

This was discovered while investigating
https://gitlab.freedesktop.org/mesa/mesa/issues/1958.  However, the
problem in that issue was Chrome or Angle is replacing calls to isnan()
with some stuff that we (correctly) optimize to false.  If they had left
the calls to isnan() alone, everything would have just worked.

No shader-db changes on any Intel platform.

I also tried marking the comparison generated by the isnan() function
precise.  The precise marker "infects" every computation involved in
calculating the parameter to the isnan() function, and this severely
hurt all of the (few) shaders in shader-db that use isnan().

I also considered adding a new ir_unop_isnan opcode that would implement
the functionality.  During GLSL IR-to-NIR translation, the resulting
comparison operation would be marked exact (and the samething would need
to happen in SPIR-V translation).

This approach taken by this patch seemed easier, but we may want to do
the ir_unop_isnan thing anyway.

Fixes: d55835b8bd ("nir/algebraic: Add optimizations for "a == a && a CMP b"")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
(cherry picked from commit 9be4a422a0)
2019-11-19 16:56:00 -08:00
.gitlab-ci gitlab-ci: Enable the GLES2/3 CTS on softpipe. 2019-08-20 13:31:13 -07:00
bin cherry-ignore: Update for 19.2.4 cycle 2019-11-19 16:56:00 -08:00
build-support configure: commit test files 2017-10-16 16:32:43 -07:00
docs docs: Add SHA256 sum for for 19.2.4 2019-11-13 11:09:32 -08:00
doxygen doxygen: Plumb through gallium/ to automated documentation 2016-05-30 17:53:45 +01:00
include c99_compat.h: Don't try to use 'restrict' in C++ code 2019-10-17 09:07:00 -07:00
scons scons/windows: Support build with LLVM 9. 2019-09-30 09:10:21 -07:00
scripts get_reviewer.pl: improve portability 2019-05-03 14:32:44 +01:00
src nir/algebraic: Mark other comparison exact when removing a == a 2019-11-19 16:56:00 -08: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 Disable autocrlf for Visual Studio project files. 2008-02-28 12:34:01 +09:00
.gitignore intel/tools: Add unit tests for assembler 2019-05-07 14:33:48 -07:00
.gitlab-ci.yml gitlab-ci: Enable the GLES2/3 CTS on softpipe. 2019-08-20 13:31:13 -07:00
.mailmap .mailmap: Add a few more alises for myself 2019-02-13 12:03:41 -08:00
.travis.yml travis: Fail build if any command in if statement fails. 2019-09-04 16:13:52 -07:00
Android.common.mk android: mesa: revert "Enable asm unconditionally" 2019-09-24 08:25:27 -07:00
Android.mk android: mesa: revert "Enable asm unconditionally" 2019-09-24 08:25:27 -07:00
appveyor.yml appveyor: Revert commits adding Cygwin support. 2019-01-25 14:13:26 +00:00
CleanSpec.mk CleanSpec.mk: Remove HOST_OUT_release 2018-08-02 15:42:40 -06:00
common.py scons/MSYS2-MinGW-W64: Fix build options defaults 2019-10-07 10:49:04 -07:00
meson.build meson: recognize "sunos" as the system name for Solaris 2019-10-17 09:08:50 -07: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 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 docs: Update bug report URLs for the gitlab migration 2019-09-23 11:11:59 -07:00
VERSION VERSION: bump to 19.2.4 2019-11-13 10:38:55 -08:00

`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.