mesa/docs
Ben Widawsky e206785b57 i965: implement ARB_pipeline_statistics_query
NOTE: The implementation was initially one patch, this. All the history is kept
here, even though all the core mesa changes were moved to the parent of this
patch.

This patch implements ARB_pipeline_statistics_query. This addition to GL does
not add a new API. Instead, it adds new tokens to the existing query APIs. The
work to hook up the new tokens is trivial due to it's similarity to the previous
work done for the query APIs. I've implemented all the new tokens to some
degree, but have stubbed out the untested ones at the entry point for Begin().
Doing this should allow the remainder of the code to be left in.

The new tokens give GL clients a way to obtain stats about the GL pipeline.
Generally, you get the number of things going in, invocations, and number of
things coming out, primitives, of the various stages. There are two immediate
uses for this, performance information, and debugging various types of
misrendering. I doubt one can use these for debugging very complex applications,
but for piglit tests, it should be quite useful.

Tessellation shaders, and compute shaders are not addressed in this patch
because there is no upstream implementation. I've implemented how I believe
tessellation shader stats will work for Intel hardware (though there is a bit of
ambiguity). Compute shaders are a bit more interesting though, and I don't yet
know what we'll do there.

For the lazy, here is a link to the relevant part of the spec:
https://www.opengl.org/registry/specs/ARB/pipeline_statistics_query.txt

Running the piglit tests
http://lists.freedesktop.org/archives/piglit/2014-November/013321.html
(http://cgit.freedesktop.org/~bwidawsk/piglit/log/?h=pipe_stats)
yield the following results:

> piglit-run.py -t stats tests/all.py output/pipeline_stats
> [5/5] pass: 5 Running Test(s): 5

v2:
- Don't allow pipeline_stats to be per stream (Ilia). This may (not sure) be
  needed for AMD_transform_feedback4, which we do not support.
   > If AMD_transform_feedback4 is supported then GEOMETRY_SHADER_PRIMITIVES_-
   > EMITTED_ARB counts primitives emitted to any of the vertex streams for
   > which STREAM_RASTERIZATION_AMD is enabled.
- Remove comment from GL3.txt because it is only used for extensions that are
  part of required versions (Ilia)
- Move the new tokens to a new XML doc instead of using the main GL4x.xml (Ilia)
- Add a fallthrough comment (Ilia)
- Only divide PS invocations by 4 on HSW+ (Ben)

v3:
- Add ARB_pipeline_statistics_query to relnotes.html
- Add ARB_pipeline_statistics_query.xml to the Makefile.am, and master XML (Ilia)
- Correct extension number (Ilia)
- Add link to xml in the main GL API xml (Ilia)
- remove special GS case from gen6_end_query (Ian)
- Make lookup table static so gcc doesn't initialized it on every call (Ian)
- Use if (_mesa_has_geometry_shaders(ctx)) instead of explicit checks (Ian)
- Core mesa parts moved into a prep patch (Ilia)

v4:
- Change to 10.6 relnotes since we missed 10.5 window
- Moved compute shader stuff into the switch statement (Jordan)
- Jordan: Add compute shader support

v5:
- Fixed relnote style (Ilia)

v6:
- Rebased on master which beat me to adding the first relnotes - essentially
  this undoes v5 (which had a typo anyway)
- Some code style fixes (Ken)
- Remove some excess comments (Ken)
- Unify tessellation failure style - unreachable (Ken)
- Fix workaround comment for PS invocations (Ken)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-17 23:01:12 -08:00
..
relnotes i965: implement ARB_pipeline_statistics_query 2015-02-17 23:01:12 -08:00
specs Add the EGL_MESA_configless_context extension 2014-03-12 14:40:47 -07:00
application-issues.html docs: add a new page documenting known application issues 2013-04-01 08:40:35 -06:00
ARB_color_buffer_float.txt mesa: implement clamping controls (ARB_color_buffer_float) 2011-03-29 12:04:55 +02:00
autoconf.html docs/autoconf: explicitly mention PKG_CONFIG_PATH for cross/multilib builds 2014-08-15 18:00:37 +01:00
bugs.html docs: remove obsolete target attribute 2012-09-19 17:15:48 +02:00
conform.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
contents.html docs: add a new page documenting known application issues 2013-04-01 08:40:35 -06:00
COPYING clarified what this file covers 1999-07-20 00:35:22 +00:00
debugging.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
developers.html docs: remove obsolete target attribute 2012-09-19 17:15:48 +02:00
devinfo.html docs: Update instructions for creating a release 2014-08-21 10:46:02 -07:00
dispatch.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
download.html docs: remove obsolete target attribute 2012-09-19 17:15:48 +02:00
egl.html configure.ac: remove enable flags for EGL and GBM Gallium state trackers 2014-11-14 16:16:12 +01:00
envvars.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
extensions.html mesa: Remove GL_MESA_resize_buffers 2013-06-28 13:35:21 -07:00
faq.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
gears.png docs: improve quality of gears.png 2012-09-20 20:00:36 +02:00
GL3.txt docs: add ARB_draw_indirect to ES 3.1 list 2015-02-12 11:12:29 -05:00
helpwanted.html docs/helpwanted: cleanup todo list links 2012-10-02 15:44:34 +02:00
index.html docs: add news item and link release notes for mesa 10.4.4 2015-02-07 00:51:08 +00:00
install.html configure: require python mako module 2015-01-12 11:20:28 +01:00
intro.html docs: remove obsolete target attribute 2012-09-19 17:15:48 +02:00
libGL.txt dri: Remove all DRI1 drivers 2011-08-26 23:31:22 -07:00
license.html c11: Update docs/license.html and include verbatim copy of Boost license. 2014-01-23 12:55:55 +00:00
lists.html docs: add IRC info 2012-09-20 20:00:36 +02:00
llvmpipe.html docs: Update minimum required LLVM version. 2014-11-07 21:00:06 +00:00
mangling.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
mesa.css docs: add new iframe layout 2012-09-19 17:15:47 +02:00
opengles.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
openvg.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
osmesa.html docs: rewrite the OSMesa info / instructions 2013-03-12 19:04:43 -06:00
patents.txt docs: Reapply some of Marek's typo fixes. 2011-04-16 11:15:29 +01:00
perf.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
postprocess.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
precompiled.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
README.UVD radeon: update legal notes on UVD 2014-02-06 16:15:58 +01:00
README.VCE radeon/winsys: add VCE support v4 2014-02-13 11:11:24 +01:00
README.WIN32 mapi/glapi: Use ElementTree instead of libxml2. 2014-03-26 13:51:32 +00:00
relnotes.html docs: add news item and link release notes for mesa 10.4.4 2015-02-07 00:51:08 +00:00
repository.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
shading.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
sourcedocs.html docs: replace CVS with git 2013-02-11 10:58:33 +01:00
sourcetree.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
systems.html docs: mention some other supported APIs 2013-02-11 10:58:33 +01:00
thanks.html docs: fix misspellings 2014-01-06 09:55:38 -07:00
utilities.html docs: remove obsolete target attribute 2012-09-19 17:15:48 +02:00
VERSIONS fix Xlib driver mem leaks 2006-08-30 22:04:09 +00:00
versions.html docs: restructure release notes into separate folder 2013-04-17 08:48:14 -06:00
viewperf.html docs: document issue with Viewperf proe-05 test 6 2013-04-23 21:09:17 -06:00
vmware-guest.html docs: minor updates to VMware SVGA3D driver page 2014-01-09 11:35:50 -07:00
webmaster.html docs: add new iframe layout 2012-09-19 17:15:47 +02:00
xlibdriver.html docs: fix misspellings 2014-01-06 09:55:38 -07:00

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 osmesa mesagdi

to build classic mesa Windows GDI drivers; or

  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.