[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'upstream-experimental'



Rebased ref, commits from common ancestor:
commit 9a56e7d25becff637e5dfcadac9b6490f1ba4001
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 18:51:53 2016 +0100

    Update version to 12.0.0-rc1
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/VERSION b/VERSION
index 677ed99..cbc76f5 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-11.3.0-devel
+12.0.0-rc1

commit 7ad2cb6f08bf318219ceb02d297f794db9221efa
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 18:50:17 2016 +0100

    docs: rename release notes to 12.0.0
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/docs/relnotes/11.3.0.html b/docs/relnotes/11.3.0.html
deleted file mode 100644
index a19f284..0000000
--- a/docs/relnotes/11.3.0.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
-<html lang="en">
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8">
-  <title>Mesa Release Notes</title>
-  <link rel="stylesheet" type="text/css" href="../mesa.css">
-</head>
-<body>
-
-<div class="header">
-  <h1>The Mesa 3D Graphics Library</h1>
-</div>
-
-<iframe src="../contents.html"></iframe>
-<div class="content">
-
-<h1>Mesa 11.3.0 Release Notes / TBD</h1>
-
-<p>
-Mesa 11.3.0 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 11.3.1.
-</p>
-<p>
-Mesa 11.3.0 implements the OpenGL 4.3 API, but the version reported by
-glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
-glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 4.3.  OpenGL
-4.3 is <strong>only</strong> available if requested at context creation
-because compatibility contexts are not supported.
-</p>
-
-
-<h2>SHA256 checksums</h2>
-<pre>
-TBD.
-</pre>
-
-
-<h2>New features</h2>
-
-<p>
-Note: some of the new features are only available with certain drivers.
-</p>
-
-<ul>
-<li>OpenGL 4.3 on nvc0, radeonsi, i965 (Gen8+)</li>
-<li>OpenGL ES 3.1 on nvc0, radeonsi</li>
-<li>GL_ARB_ES3_1_compatibility on nvc0, radeonsi</li>
-<li>GL_ARB_compute_shader on nvc0, radeonsi, softpipe</li>
-<li>GL_ARB_cull_distance on i965/gen6+, nv50, nvc0, llvmpipe, softpipe</li>
-<li>GL_ARB_framebuffer_no_attachments on nvc0, r600, radeonsi, softpipe</li>
-<li>GL_ARB_internalformat_query2 on all drivers</li>
-<li>GL_ARB_query_buffer_object on i965/hsw+</li>
-<li>GL_ARB_robust_buffer_access_behavior on i965, nvc0, radeonsi</li>
-<li>GL_ARB_shader_atomic_counters on radeonsi, softpipe</li>
-<li>GL_ARB_shader_atomic_counter_ops on nvc0, radeonsi, softpipe</li>
-<li>GL_ARB_shader_image_load_store on nvc0, radeonsi, softpipe</li>
-<li>GL_ARB_shader_image_size on nvc0, radeonsi, softpipe</li>
-<li>GL_ARB_shader_storage_buffer_objects on radeonsi, softpipe</li>
-<li>GL_ATI_fragment_shader on all Gallium drivers</li>
-<li>GL_EXT_base_instance on all drivers that support GL_ARB_base_instance</li>
-<li>GL_EXT_clip_cull_distance on all drivers that support GL_ARB_cull_distance</li>
-<li>GL_KHR_robustness on i965</li>
-<li>GL_OES_copy_image on i965 (Baytrail and Gen8+)</li>
-<li>GL_OES_draw_buffers_indexed and GL_EXT_draw_buffers_indexed on all drivers that support GL_ARB_draw_buffers_blend</li>
-<li>GL_OES_gpu_shader5 and GL_EXT_gpu_shader5 on all drivers that support GL_ARB_gpu_shader5</li>
-<li>GL_OES_sample_shading on i965, nvc0, r600, radeonsi</li>
-<li>GL_OES_sample_variables on i965, nvc0, r600, radeonsi</li>
-<li>GL_OES_shader_image_atomic on all drivers that support GL_ARB_shader_image_load_store</li>
-<li>GL_OES_shader_io_blocks on i965, nvc0, radeonsi</li>
-<li>GL_OES_shader_multisample_interpolation on i965, nvc0, r600, radeonsi</li>
-<li>GL_OES_texture_border_clamp and GL_EXT_texture_border_clamp on all drivers that support GL_ARB_texture_border_clamp</li>
-<li>GL_OES_texture_buffer and GL_EXT_texture_buffer on i965, nvc0, radeonsi</li>
-<li>EGL_KHR_reusable_sync on all drivers</li>
-<li>GL_ARB_stencil_texture8 and GL_OES_stencil_texture8 on i965/gen8+</li>
-</ul>
-
-<h2>Bug fixes</h2>
-
-TBD.
-
-<h2>Changes</h2>
-
-TBD.
-
-</div>
-</body>
-</html>
diff --git a/docs/relnotes/12.0.0.html b/docs/relnotes/12.0.0.html
new file mode 100644
index 0000000..25b9b68
--- /dev/null
+++ b/docs/relnotes/12.0.0.html
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>Mesa Release Notes</title>
+  <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+  <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 12.0.0 Release Notes / TBD</h1>
+
+<p>
+Mesa 12.0.0 is a new development release.
+People who are concerned with stability and reliability should stick
+with a previous release or wait for Mesa 12.0.1.
+</p>
+<p>
+Mesa 12.0.0 implements the OpenGL 4.3 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 4.3.  OpenGL
+4.3 is <strong>only</strong> available if requested at context creation
+because compatibility contexts are not supported.
+</p>
+
+
+<h2>SHA256 checksums</h2>
+<pre>
+TBD.
+</pre>
+
+
+<h2>New features</h2>
+
+<p>
+Note: some of the new features are only available with certain drivers.
+</p>
+
+<ul>
+<li>OpenGL 4.3 on nvc0, radeonsi, i965 (Gen8+)</li>
+<li>OpenGL ES 3.1 on nvc0, radeonsi</li>
+<li>GL_ARB_ES3_1_compatibility on nvc0, radeonsi</li>
+<li>GL_ARB_compute_shader on nvc0, radeonsi, softpipe</li>
+<li>GL_ARB_cull_distance on i965/gen6+, nv50, nvc0, llvmpipe, softpipe</li>
+<li>GL_ARB_framebuffer_no_attachments on nvc0, r600, radeonsi, softpipe</li>
+<li>GL_ARB_internalformat_query2 on all drivers</li>
+<li>GL_ARB_query_buffer_object on i965/hsw+</li>
+<li>GL_ARB_robust_buffer_access_behavior on i965, nvc0, radeonsi</li>
+<li>GL_ARB_shader_atomic_counters on radeonsi, softpipe</li>
+<li>GL_ARB_shader_atomic_counter_ops on nvc0, radeonsi, softpipe</li>
+<li>GL_ARB_shader_image_load_store on nvc0, radeonsi, softpipe</li>
+<li>GL_ARB_shader_image_size on nvc0, radeonsi, softpipe</li>
+<li>GL_ARB_shader_storage_buffer_objects on radeonsi, softpipe</li>
+<li>GL_ATI_fragment_shader on all Gallium drivers</li>
+<li>GL_EXT_base_instance on all drivers that support GL_ARB_base_instance</li>
+<li>GL_EXT_clip_cull_distance on all drivers that support GL_ARB_cull_distance</li>
+<li>GL_KHR_robustness on i965</li>
+<li>GL_OES_copy_image on i965 (Baytrail and Gen8+)</li>
+<li>GL_OES_draw_buffers_indexed and GL_EXT_draw_buffers_indexed on all drivers that support GL_ARB_draw_buffers_blend</li>
+<li>GL_OES_gpu_shader5 and GL_EXT_gpu_shader5 on all drivers that support GL_ARB_gpu_shader5</li>
+<li>GL_OES_sample_shading on i965, nvc0, r600, radeonsi</li>
+<li>GL_OES_sample_variables on i965, nvc0, r600, radeonsi</li>
+<li>GL_OES_shader_image_atomic on all drivers that support GL_ARB_shader_image_load_store</li>
+<li>GL_OES_shader_io_blocks on i965, nvc0, radeonsi</li>
+<li>GL_OES_shader_multisample_interpolation on i965, nvc0, r600, radeonsi</li>
+<li>GL_OES_texture_border_clamp and GL_EXT_texture_border_clamp on all drivers that support GL_ARB_texture_border_clamp</li>
+<li>GL_OES_texture_buffer and GL_EXT_texture_buffer on i965, nvc0, radeonsi</li>
+<li>EGL_KHR_reusable_sync on all drivers</li>
+<li>GL_ARB_stencil_texture8 and GL_OES_stencil_texture8 on i965/gen8+</li>
+</ul>
+
+<h2>Bug fixes</h2>
+
+TBD.
+
+<h2>Changes</h2>
+
+TBD.
+
+</div>
+</body>
+</html>

commit a43a3684577d20424e4503d1c62bedf86b4700d1
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 18:57:09 2016 +0100

    nir: add the SConscript.nir to the tarball
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 922b471777c524f497fb8eda97153a898900f223)

diff --git a/src/compiler/Makefile.nir.am b/src/compiler/Makefile.nir.am
index 08713a8..9aac214 100644
--- a/src/compiler/Makefile.nir.am
+++ b/src/compiler/Makefile.nir.am
@@ -86,4 +86,5 @@ EXTRA_DIST += \
 	nir/nir_opcodes_c.py				\
 	nir/nir_opcodes_h.py				\
 	nir/nir_opt_algebraic.py			\
-	nir/tests
+	nir/tests \
+	SConscript.nir

commit f25fdf21e74416e11bc13973d7ec8d022e93c6e2
Author: Rhys Kidd <rhyskidd@gmail.com>
Date:   Wed May 25 17:10:46 2016 -0400

    vc4: Fix doxygen warnings
    
    Now that vc4 automated code documentation can be generated with
    doxygen, fix the warnings issued by Doxygen 1.8.11.
    
    Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/src/gallium/drivers/vc4/vc4_qir_schedule.c b/src/gallium/drivers/vc4/vc4_qir_schedule.c
index 8b843a3..4a1283c 100644
--- a/src/gallium/drivers/vc4/vc4_qir_schedule.c
+++ b/src/gallium/drivers/vc4/vc4_qir_schedule.c
@@ -80,8 +80,8 @@ struct schedule_state {
 enum direction { F, R };
 
 /**
- * Marks a dependency between two intructions, that @after must appear after
- * @before.
+ * Marks a dependency between two intructions, that \p after must appear after
+ * \p before.
  *
  * Our dependencies are tracked as a DAG.  Since we're scheduling bottom-up,
  * the latest instructions with nothing left to schedule are the DAG heads,
diff --git a/src/gallium/drivers/vc4/vc4_tiling.c b/src/gallium/drivers/vc4/vc4_tiling.c
index 2a803ab..4bcb85b 100644
--- a/src/gallium/drivers/vc4/vc4_tiling.c
+++ b/src/gallium/drivers/vc4/vc4_tiling.c
@@ -269,8 +269,8 @@ vc4_store_t_image(void *dst, uint32_t dst_stride,
 }
 
 /**
- * Loads pixel data from the start (microtile-aligned) box in @src to the
- * start of @dst according to the given tiling format.
+ * Loads pixel data from the start (microtile-aligned) box in \p src to the
+ * start of \p dst according to the given tiling format.
  */
 void
 vc4_load_tiled_image(void *dst, uint32_t dst_stride,
@@ -293,8 +293,8 @@ vc4_load_tiled_image(void *dst, uint32_t dst_stride,
 }
 
 /**
- * Stores pixel data from the start of @src into a (microtile-aligned) box in
- * @dst according to the given tiling format.
+ * Stores pixel data from the start of \p src into a (microtile-aligned) box in
+ * \p dst according to the given tiling format.
  */
 void
 vc4_store_tiled_image(void *dst, uint32_t dst_stride,

commit db975fa86c6075e05a5c5e0ed5c82ecbb61a5f66
Author: Rhys Kidd <rhyskidd@gmail.com>
Date:   Wed May 25 17:10:45 2016 -0400

    doxygen: Plumb through gallium/ to automated documentation
    
    Add Gallium and the Gallium-based drivers to doxygen's automated
    code documentation infrastructure.
    
    Can be individually created with:
    
      cd $MESA_TOP_LEVEL/
      make -C doxygen/ gallium.tag
    
    Benefits from the existing doxygen Makefile runners to clean up
    afterwards with 'make clean'.
    
    Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/doxygen/Makefile b/doxygen/Makefile
index 6685b99..e5fac32 100644
--- a/doxygen/Makefile
+++ b/doxygen/Makefile
@@ -25,7 +25,8 @@ full: $(FULL:.doxy=.tag)
 
 SUBSET = \
 	main.doxy \
-	math.doxy
+	math.doxy \
+	gallium.doxy
 
 subset: $(SUBSET:.doxy=.tag)
 	$(foreach FILE,$(SUBSET),doxygen $(FILE);)

commit 26f4638684b8b40751063d8e33dc1c4da298fe0e
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon May 30 17:11:16 2016 +0100

    Revert "osmesa: don't try to bundle osmesa.def SConscript"
    
    This reverts commit c07df0f2014636b601cdbaff63214296599b1ad5.
    
    Now that the SCons build is back we need to include the files in the
    tarball.

diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
index 46332e1..5525687 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -21,6 +21,8 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
+EXTRA_DIST = osmesa.def SConscript
+
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src \

commit 9601815b4be886f4d92bf74916de98f3bdb7275c
Author: Andreas Fänger <a.faenger@e-sign.com>
Date:   Tue Mar 8 11:04:00 2016 +0000

    scons: build osmesa swrast and gallium
    
    This patch makes it possible to build classic osmesa/swrast on windows
    again. It was removed in commit 69db422218b0264b5b8eef45bd003a2544e9cbd6.
    Although there is a gallium version of osmesa now, the swrast version
    still has more features lacking in llvmpipe, e.g. anisotropic filtering.
    
    Tested-by: Brian Paul <brianp@vmware.com>
    Reviewed-by: Brian Paul <brianp@vmware.com>
    [Emil Velikov: remove trailing whitespace]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
index 5d654f5..476425b 100644
--- a/src/mesa/drivers/SConscript
+++ b/src/mesa/drivers/SConscript
@@ -1,5 +1,7 @@
 Import('*')
 
+SConscript('osmesa/SConscript')
+
 if env['x11']:
     SConscript('x11/SConscript')
 
diff --git a/src/mesa/drivers/osmesa/SConscript b/src/mesa/drivers/osmesa/SConscript
new file mode 100644
index 0000000..7280314
--- /dev/null
+++ b/src/mesa/drivers/osmesa/SConscript
@@ -0,0 +1,40 @@
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+    '#src',
+    '#src/mapi',
+    '#src/mesa',
+    Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
+])
+
+env.Prepend(LIBS = [
+    mesautil,
+    glapi,
+    compiler,
+    mesa,
+    glsl,
+])
+
+sources = [
+    'osmesa.c',
+]
+
+if env['platform'] == 'windows':
+    env.AppendUnique(CPPDEFINES = [
+        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
+        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+    ])
+    if not env['gles']:
+        # prevent _glapi_* from being declared __declspec(dllimport)
+        env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
+
+    sources += ['osmesa.def']
+
+osmesa = env.SharedLibrary(
+    target ='osmesa',
+    source = sources,
+)
+
+env.Alias('osmesa', osmesa)
diff --git a/src/mesa/drivers/osmesa/osmesa.def b/src/mesa/drivers/osmesa/osmesa.def
new file mode 100644
index 0000000..06afab7
--- /dev/null
+++ b/src/mesa/drivers/osmesa/osmesa.def
@@ -0,0 +1,15 @@
+;DESCRIPTION 'Mesa OSMesa lib for Win32'
+VERSION 4.1
+
+EXPORTS
+	OSMesaColorClamp
+	OSMesaCreateContext
+	OSMesaCreateContextExt
+	OSMesaDestroyContext
+	OSMesaMakeCurrent
+	OSMesaGetCurrentContext
+	OSMesaPixelStore
+	OSMesaGetIntegerv
+	OSMesaGetDepthBuffer
+	OSMesaGetColorBuffer
+	OSMesaGetProcAddress

commit 3689ef32afdafbb030069e560aac0e563fc29048
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 12:32:05 2016 +0100

    automake: rework the git_sha1.h rule, include in tarball
    
    As we'll need the file in the release tarball, rework the rule so that
    the file is regenerated _only_ if we're in a git repository.
    
    With this in place we can build vulkan (anv) from a release tarball.
    
    Cc: Jason Ekstrand <jason.ekstrand@intel.com>
    Cc: Kristian Høgsberg Kristensen <krh@bitplanet.net>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/.gitignore b/.gitignore
index f42ca7f..90abe10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,4 +49,3 @@ Makefile.in
 .install-mesa-links
 .install-gallium-links
 /src/git_sha1.h
-/src/git_sha1.h.tmp
diff --git a/src/Makefile.am b/src/Makefile.am
index d142aea..f5c0773 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,30 +19,16 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-.PHONY: git_sha1.h.tmp
-git_sha1.h.tmp:
-	@# Don't assume that $(top_srcdir)/.git is a directory. It may be
-	@# a gitlink file if $(top_srcdir) is a submodule checkout or a linked
-	@# worktree.
-	@touch git_sha1.h.tmp
+git_sha1.h:
 	@if test -e $(top_srcdir)/.git; then \
 		if which git > /dev/null; then \
 		    git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
 			sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
-			> git_sha1.h.tmp ; \
+			> git_sha1.h ; \
 		fi \
 	fi
 
-git_sha1.h: git_sha1.h.tmp
-	@echo "updating git_sha1.h"
-	@if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
-		mv git_sha1.h.tmp git_sha1.h ;\
-	else \
-		rm git_sha1.h.tmp ;\
-	fi
-
 BUILT_SOURCES = git_sha1.h
-CLEANFILES = $(BUILT_SOURCES)
 
 SUBDIRS = . gtest util mapi/glapi/gen mapi
 
@@ -92,7 +78,7 @@ SUBDIRS += gallium
 endif
 
 EXTRA_DIST = \
-	getopt hgl SConscript
+	getopt hgl SConscript git_sha1.h
 
 AM_CFLAGS = $(VISIBILITY_CFLAGS)
 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)

commit 4cd9cd6abc772388b41ca6e7d85f62e32014120f
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 12:09:04 2016 +0100

    automake: move the git_sha1.h rule a level up
    
    This way we can reuse the header from other places like -
    src/intel/vulkan and src/gallium. Only the former is hooked up atm.
    
    Make sure .gitignore is updated, as well as all the users (the mesa
    code does not need any changes).
    
    Also ensure that the file is always created by adding it to the
    BUILT_SOURCES target.
    
    Cc: Jason Ekstrand <jason.ekstrand@intel.com>
    Cc: Kristian Høgsberg Kristensen <krh@bitplanet.net>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/.gitignore b/.gitignore
index 7db5639..f42ca7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,5 @@ Makefile
 Makefile.in
 .install-mesa-links
 .install-gallium-links
+/src/git_sha1.h
+/src/git_sha1.h.tmp
diff --git a/src/Makefile.am b/src/Makefile.am
index 6ce5791..d142aea 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,6 +19,31 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
+.PHONY: git_sha1.h.tmp
+git_sha1.h.tmp:
+	@# Don't assume that $(top_srcdir)/.git is a directory. It may be
+	@# a gitlink file if $(top_srcdir) is a submodule checkout or a linked
+	@# worktree.
+	@touch git_sha1.h.tmp
+	@if test -e $(top_srcdir)/.git; then \
+		if which git > /dev/null; then \
+		    git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
+			sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
+			> git_sha1.h.tmp ; \
+		fi \
+	fi
+
+git_sha1.h: git_sha1.h.tmp
+	@echo "updating git_sha1.h"
+	@if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
+		mv git_sha1.h.tmp git_sha1.h ;\
+	else \
+		rm git_sha1.h.tmp ;\
+	fi
+
+BUILT_SOURCES = git_sha1.h
+CLEANFILES = $(BUILT_SOURCES)
+
 SUBDIRS = . gtest util mapi/glapi/gen mapi
 
 # include only conditionally ?
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 046777d..c169d73 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -28,7 +28,7 @@
 #include <fcntl.h>
 
 #include "anv_private.h"
-#include "mesa/main/git_sha1.h"
+#include "git_sha1.h"
 #include "util/strtod.h"
 #include "util/debug.h"
 
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 2c77fa8..6d7a3cc 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -36,28 +36,6 @@ endif
 gldir = $(includedir)/GL
 gl_HEADERS = $(top_srcdir)/include/GL/*.h
 
-.PHONY: main/git_sha1.h.tmp
-main/git_sha1.h.tmp:
-	@# Don't assume that $(top_srcdir)/.git is a directory. It may be
-	@# a gitlink file if $(top_srcdir) is a submodule checkout or a linked
-	@# worktree.
-	@touch main/git_sha1.h.tmp
-	@if test -e $(top_srcdir)/.git; then \
-		if which git > /dev/null; then \
-		    git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
-			sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
-			> main/git_sha1.h.tmp ; \
-		fi \
-	fi
-
-main/git_sha1.h: main/git_sha1.h.tmp
-	@echo "updating main/git_sha1.h"
-	@if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \
-		mv main/git_sha1.h.tmp main/git_sha1.h ;\
-	else \
-		rm main/git_sha1.h.tmp ;\
-	fi
-
 include Makefile.sources
 
 EXTRA_DIST = \
@@ -80,15 +58,13 @@ EXTRA_DIST = \
 BUILT_SOURCES = \
 	main/get_hash.h \
 	main/format_info.h \
-	main/git_sha1.h \
 	main/format_pack.c \
 	main/format_unpack.c \
 	program/program_parse.tab.c \
 	program/lex.yy.c
 CLEANFILES = \
 	$(BUILT_SOURCES) \
-	program/program_parse.tab.h \
-	main/git_sha1.h.tmp
+	program/program_parse.tab.h
 
 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
 
diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
index 5f7f46d..84db5a8 100644
--- a/src/mesa/Makefile.sources
+++ b/src/mesa/Makefile.sources
@@ -642,6 +642,7 @@ MESA_GALLIUM_FILES = \
 
 INCLUDE_DIRS = \
 	-I$(top_srcdir)/include \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_builddir)/src/compiler/nir \
 	-I$(top_srcdir)/src/mesa \
diff --git a/src/mesa/main/.gitignore b/src/mesa/main/.gitignore
index 355b426..a4da567 100644
--- a/src/mesa/main/.gitignore
+++ b/src/mesa/main/.gitignore
@@ -1,8 +1,6 @@
 api_exec.c
 dispatch.h
 enums.c
-git_sha1.h
-git_sha1.h.tmp
 remap_helper.h
 get_hash.h
 get_hash.h.tmp

commit 13faddb6b8e30ff0e81e62fb863304a57c712aae
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon May 30 10:56:33 2016 +0100

    mesa_glinterop: remove mesa_glinterop typedefs
    
    As is there are two places that do the typedefs - dri_interface.h and
    this header. As we cannot include the former in here, just drop the
    typedefs and use the struct directly (as needed).
    
    This is required because typedef redefinition is C11 feature which is
    not supported on all the versions of GCC used to build mesa.
    
    v2: Kill the typedef alltogether, as per Marek.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236
    Cc: Vinson Lee <vlee@freedesktop.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index f80233b..1c73cce 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -401,21 +401,21 @@ struct __DRI2fenceExtensionRec {
 #define __DRI2_INTEROP "DRI2_Interop"
 #define __DRI2_INTEROP_VERSION 1
 
-typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info;
-typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in;
-typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out;
+struct mesa_glinterop_device_info;
+struct mesa_glinterop_export_in;
+struct mesa_glinterop_export_out;
 
 struct __DRI2interopExtensionRec {
    __DRIextension base;
 
    /** Same as MesaGLInterop*QueryDeviceInfo. */
    int (*query_device_info)(__DRIcontext *ctx,
-                            mesa_glinterop_device_info *out);
+                            struct mesa_glinterop_device_info *out);
 
    /** Same as MesaGLInterop*ExportObject. */
    int (*export_object)(__DRIcontext *ctx,
-                        mesa_glinterop_export_in *in,
-                        mesa_glinterop_export_out *out);
+                        struct mesa_glinterop_export_in *in,
+                        struct mesa_glinterop_export_out *out);
 };
 
 /*@}*/
diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index b805d63..c0c20d6 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -92,7 +92,7 @@ enum {
 /**
  * Device information returned by Mesa.
  */
-typedef struct _mesa_glinterop_device_info {
+struct mesa_glinterop_device_info {
    /* The caller should set this to the version of the struct they support */
    /* The callee will overwrite it if it supports a lower version.
     *
@@ -113,14 +113,14 @@ typedef struct _mesa_glinterop_device_info {
    uint32_t device_id;
 
    /* Structure version 1 ends here. */
-} mesa_glinterop_device_info;
+};
 
 #define MESA_GLINTEROP_EXPORT_IN_VERSION 1
 
 /**
  * Input parameters to Mesa interop export functions.
  */
-typedef struct _mesa_glinterop_export_in {
+struct mesa_glinterop_export_in {
    /* The caller should set this to the version of the struct they support */
    /* The callee will overwrite it if it supports a lower version.
     *
@@ -178,14 +178,14 @@ typedef struct _mesa_glinterop_export_in {
     */
    void *out_driver_data;
    /* Structure version 1 ends here. */
-} mesa_glinterop_export_in;
+};
 
 #define MESA_GLINTEROP_EXPORT_OUT_VERSION 1
 
 /**
  * Outputs of Mesa interop export functions.
  */
-typedef struct _mesa_glinterop_export_out {
+struct mesa_glinterop_export_out {
    /* The caller should set this to the version of the struct they support */
    /* The callee will overwrite it if it supports a lower version.
     *
@@ -233,7 +233,7 @@ typedef struct _mesa_glinterop_export_out {
    /* The number of bytes written to out_driver_data. */
    uint32_t out_driver_data_written;
    /* Structure version 1 ends here. */
-} mesa_glinterop_export_out;
+};
 
 
 /**
@@ -247,7 +247,7 @@ typedef struct _mesa_glinterop_export_out {
  */
 int
 MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
-                                mesa_glinterop_device_info *out);
+                                struct mesa_glinterop_device_info *out);
 
 
 /**
@@ -256,7 +256,7 @@ MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
  */
 int
 MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
-                                mesa_glinterop_device_info *out);
+                                struct mesa_glinterop_device_info *out);
 
 
 /**
@@ -272,8 +272,8 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
  */
 int
 MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
-                             mesa_glinterop_export_in *in,
-                             mesa_glinterop_export_out *out);
+                             struct mesa_glinterop_export_in *in,
+                             struct mesa_glinterop_export_out *out);
 
 
 /**
@@ -282,20 +282,20 @@ MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
  */
 int
 MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
-                             mesa_glinterop_export_in *in,
-                             mesa_glinterop_export_out *out);
+                             struct mesa_glinterop_export_in *in,
+                             struct mesa_glinterop_export_out *out);
 
 
 typedef int (PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(Display *dpy, GLXContext context,
-                                                     mesa_glinterop_device_info *out);
+                                                     struct mesa_glinterop_device_info *out);
 typedef int (PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC)(EGLDisplay dpy, EGLContext context,
-                                                     mesa_glinterop_device_info *out);
+                                                     struct mesa_glinterop_device_info *out);
 typedef int (PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(Display *dpy, GLXContext context,
-                                                  mesa_glinterop_export_in *in,
-                                                  mesa_glinterop_export_out *out);
+                                                  struct mesa_glinterop_export_in *in,
+                                                  struct mesa_glinterop_export_out *out);
 typedef int (PFNMESAGLINTEROPEGLEXPORTOBJECTPROC)(EGLDisplay dpy, EGLContext context,
-                                                  mesa_glinterop_export_in *in,
-                                                  mesa_glinterop_export_out *out);
+                                                  struct mesa_glinterop_export_in *in,
+                                                  struct mesa_glinterop_export_out *out);
 
 #ifdef __cplusplus
 }
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f954cd5..bfde640 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2690,7 +2690,7 @@ dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
 
 static int
 dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
-                               mesa_glinterop_device_info *out)
+                               struct mesa_glinterop_device_info *out)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
    struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
@@ -2703,8 +2703,8 @@ dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
 
 static int
 dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx,
-                           mesa_glinterop_export_in *in,
-                           mesa_glinterop_export_out *out)
+                           struct mesa_glinterop_export_in *in,
+                           struct mesa_glinterop_export_out *out)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
    struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 098bed0..4700dbe 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1939,7 +1939,7 @@ _eglLockDisplayInterop(EGLDisplay dpy, EGLContext context,
 
 int
 MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
-                                mesa_glinterop_device_info *out)
+                                struct mesa_glinterop_device_info *out)
 {
    _EGLDisplay *disp;
    _EGLDriver *drv;
@@ -1961,8 +1961,8 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
 
 int
 MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
-                             mesa_glinterop_export_in *in,
-                             mesa_glinterop_export_out *out)
+                             struct mesa_glinterop_export_in *in,
+                             struct mesa_glinterop_export_out *out)
 {
    _EGLDisplay *disp;
    _EGLDriver *drv;
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 4df17c0..2d6a24f 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -42,9 +42,9 @@ extern "C" {
 typedef void (*_EGLProc)(void);
 
 struct wl_display;
-typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info;
-typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in;
-typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out;
+struct mesa_glinterop_device_info;
+struct mesa_glinterop_export_in;
+struct mesa_glinterop_export_out;
 
 /**
  * The API dispatcher jumps through these functions
@@ -193,10 +193,10 @@ struct _egl_api
                                        EGLint *strides, EGLint *offsets);
 
    int (*GLInteropQueryDeviceInfo)(_EGLDisplay *dpy, _EGLContext *ctx,
-                                   mesa_glinterop_device_info *out);
+                                   struct mesa_glinterop_device_info *out);
    int (*GLInteropExportObject)(_EGLDisplay *dpy, _EGLContext *ctx,
-                                mesa_glinterop_export_in *in,
-                                mesa_glinterop_export_out *out);
+                                struct mesa_glinterop_export_in *in,
+                                struct mesa_glinterop_export_out *out);
 };
 
 
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 8dea671..28f8078 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1488,7 +1488,7 @@ static const __DRIrobustnessExtension dri2Robustness = {
 
 static int
 dri2_interop_query_device_info(__DRIcontext *_ctx,
-                               mesa_glinterop_device_info *out)
+                               struct mesa_glinterop_device_info *out)
 {
    struct pipe_screen *screen = dri_context(_ctx)->st->pipe->screen;
 
@@ -1512,8 +1512,8 @@ dri2_interop_query_device_info(__DRIcontext *_ctx,
 
 static int
 dri2_interop_export_object(__DRIcontext *_ctx,
-                           mesa_glinterop_export_in *in,
-                           mesa_glinterop_export_out *out)
+                           struct mesa_glinterop_export_in *in,
+                           struct mesa_glinterop_export_out *out)
 {
    struct st_context_iface *st = dri_context(_ctx)->st;
    struct pipe_screen *screen = st->pipe->screen;
diff --git a/src/glx/dri2_priv.h b/src/glx/dri2_priv.h
index edba31e..30ab2cd 100644
--- a/src/glx/dri2_priv.h
+++ b/src/glx/dri2_priv.h
@@ -72,12 +72,12 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
 
 _X_HIDDEN int
 dri2_interop_query_device_info(struct glx_context *ctx,
-                               mesa_glinterop_device_info *out);
+                               struct mesa_glinterop_device_info *out);
 
 _X_HIDDEN int
 dri2_interop_export_object(struct glx_context *ctx,
-                           mesa_glinterop_export_in *in,
-                           mesa_glinterop_export_out *out);
+                           struct mesa_glinterop_export_in *in,
+                           struct mesa_glinterop_export_out *out);
 
 #ifdef __cplusplus
 }
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index 86ad17c..0822377 100644
--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -135,9 +135,9 @@ dri3_query_renderer_string(struct glx_screen *base, int attribute,
 
 _X_HIDDEN int
 dri3_interop_query_device_info(struct glx_context *ctx,
-                               mesa_glinterop_device_info *out);
+                               struct mesa_glinterop_device_info *out);
 
 _X_HIDDEN int
 dri3_interop_export_object(struct glx_context *ctx,
-                           mesa_glinterop_export_in *in,
-                           mesa_glinterop_export_out *out);
+                           struct mesa_glinterop_export_in *in,
+                           struct mesa_glinterop_export_out *out);
diff --git a/src/glx/dri_common_interop.c b/src/glx/dri_common_interop.c
index 215aac4..85538c6 100644
--- a/src/glx/dri_common_interop.c
+++ b/src/glx/dri_common_interop.c
@@ -34,7 +34,7 @@
 
 _X_HIDDEN int
 dri2_interop_query_device_info(struct glx_context *ctx,
-                               mesa_glinterop_device_info *out)
+                               struct mesa_glinterop_device_info *out)
 {
    struct dri2_screen *psc = (struct dri2_screen*)ctx->psc;
    struct dri2_context *drictx = (struct dri2_context*)ctx;
@@ -47,8 +47,8 @@ dri2_interop_query_device_info(struct glx_context *ctx,
 
 _X_HIDDEN int
 dri2_interop_export_object(struct glx_context *ctx,
-                           mesa_glinterop_export_in *in,
-                           mesa_glinterop_export_out *out)
+                           struct mesa_glinterop_export_in *in,
+                           struct mesa_glinterop_export_out *out)
 {


Reply to: