Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Jason Ekstrand f752effa08 nir/nir: Use a linked list instead of a hash set for use/def sets
This commit switches us from the current setup of using hash sets for
use/def sets to using linked lists.  Doing so should save us quite a bit of
memory because we aren't carrying around 3 hash sets per register and 2 per
SSA value.  It should also save us CPU time because adding/removing things
from use/def sets is 4 pointer manipulations instead of a hash lookup.

Running shader-db 50 times with USE_NIR=0, NIR, and NIR + use/def lists:

   GLSL IR Only:        586.4 +/- 1.653833
   NIR with hash sets:  675.4 +/- 2.502108
   NIR + use/def lists: 641.2 +/- 1.557043

I also ran a memory usage experiment with Ken's patch to delete GLSL IR and
keep NIR.  This patch cuts an aditional 42.9 MiB of ralloc'd memory over
and above what we gained by deleting the GLSL IR on the same dota trace.

On the code complexity side of things, some things are now much easier and
others are a bit harder.  One of the operations we perform constantly in
optimization passes is to replace one source with another.  Due to the fact
that an instruction can use the same SSA value multiple times, we had to
iterate through the sources of the instruction and determine if the use we
were replacing was the only one before removing it from the set of uses.
With this patch, uses are per-source not per-instruction so we can just
remove it safely.  On the other hand, trying to iterate over all of the
instructions that use a given value is more difficult.  Fortunately, the
two places we do that are the ffma peephole where it doesn't matter and GCM
where we already gracefully handle duplicates visits to an instruction.

Another aspect here is that using linked lists in this way can be tricky to
get right.  With sets, things were quite forgiving and the worst that
happened if you didn't properly remove a use was that it would get caught
in the validator.  With linked lists, it can lead to linked list corruption
which can be harder to track.  However, we do just as much validation of
the linked lists as we did of the sets so the validator should still catch
these problems.  While working on this series, the vast majority of the
bugs I had to fix were caught by assertions.  I don't think the lists are
going to be that much worse than the sets.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-05-08 17:16:13 -07:00
bin get-pick-list: Allow for non-whitespace between "CC:" and "mesa-stable" 2013-07-31 15:49:48 -07:00
docs docs: Update the ARB_direct_state_access status 2015-05-08 15:31:04 +02:00
doxygen mesa: remove empty glthread.h file 2014-03-03 13:08:59 -07:00
include egl: image_dma_buf_export - use KHR 64-bit type 2015-05-05 12:19:40 +10:00
m4 configure.ac: move AC_MSG_RESULT reporting back into the m4 macro 2015-03-24 20:49:32 +00:00
scons scons: Support LLVM 3.5 and 3.6 on windows. 2015-04-27 21:47:27 +01:00
src nir/nir: Use a linked list instead of a hash set for use/def sets 2015-05-08 17:16:13 -07:00
.dir-locals.el dir-locals.el: Don't set variables for non-programming modes 2015-02-02 12:02:55 +00:00
.gitattributes Disable autocrlf for Visual Studio project files. 2008-02-28 12:34:01 +09:00
.gitignore mesa: add .mesa-install-links files to gitignore 2015-04-17 15:24:14 -04:00
Android.common.mk android: fix building issues of host binaries 2015-04-22 15:53:35 +01:00
Android.mk android: fix the building rules for Android 5.0 2015-04-22 15:53:35 +01:00
CleanSpec.mk android: re-build all mesa binaries properly 2015-04-22 15:57:00 +01:00
Makefile.am makefile: add all headers to the tarball 2015-03-24 20:49:31 +00:00
SConstruct scons: Don't use bundled C99 headers for VS 2013. 2014-05-02 22:04:46 +01:00
VERSION Post-branch version bump to 10.6.0-devel, add release notes template 2015-02-07 19:12:20 +00:00
autogen.sh autogen.sh: pass --force to autoreconf, quote ORIGDIR 2015-03-11 23:28:26 +00:00
common.py common.py: Fix PEP 8 issues. 2015-03-16 22:55:08 -07:00
configure.ac clover: make llvm >= 3.5.0 and c++11 mandatory 2015-04-20 18:10:29 +00:00
install-gallium-links.mk targets/radeonsi/vdpau: convert to static/shared pipe-drivers 2014-06-22 23:06:01 +01:00
install-lib-links.mk install-lib-links: remove the .install-lib-links file 2015-02-24 15:33:25 +00:00

docs/README.WIN32

File: docs/README.WIN32

Last updated: 21 June 2013


Quick Start
----- -----

Windows drivers are build with SCons.  Makefiles or Visual Studio projects are
no longer shipped or supported.

Run

  scons libgl-gdi

to build gallium based GDI driver.

This will work both with MSVS or Mingw.


Windows Drivers
------- -------

At this time, only the gallium GDI driver is known to work.

Source code also exists in the tree for other drivers in
src/mesa/drivers/windows, but the status of this code is unknown.

Recipe
------

Building on windows requires several open-source packages. These are
steps that work as of this writing.

- install python 2.7
- install scons (latest)
- install mingw, flex, and bison
- install pywin32 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
  get pywin32-218.4.win-amd64-py2.7.exe
- install git
- download mesa from git
  see http://www.mesa3d.org/repository.html
- run scons

General
-------

After building, you can copy the above DLL files to a place in your
PATH such as $SystemRoot/SYSTEM32.  If you don't like putting things
in a system directory, place them in the same directory as the
executable(s).  Be careful about accidentially overwriting files of
the same name in the SYSTEM32 directory.

The DLL files are built so that the external entry points use the
stdcall calling convention.

Static LIB files are not built.  The LIB files that are built with are
the linker import files associated with the DLL files.

The si-glu sources are used to build the GLU libs.  This was done
mainly to get the better tessellator code.

If you have a Windows-related build problem or question, please post
to the mesa-dev or mesa-users list.