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

mesa: Changes to 'upstream-experimental'



Rebased ref, commits from common ancestor:
commit e45c4586c275b6d47e1c51cb568db644c7c55f61
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Oct 19 18:40:40 2016 +0100

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

diff --git a/VERSION b/VERSION
index 9637d43..0ee82ac 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.1.0-devel
+13.0.0-rc1

commit 2ced8eb136528914e1bf4e000dea06a9d53c7e04
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Oct 19 17:36:17 2016 +0100

    Revert Use absolute path in intel_icd.json and related patches.
    
    This commit effectively reverts the following commits:
    
    This reverts commit 0b6837a643bbbf3c57c5cc5030279fb4389b23b7.
    This reverts commit 05f36435ef117e48f457b44877d04dd6249b3bb7.
    This reverts commit a2ae67aa47df6dd41802462105dac7ce5ab676a2.
    
    While the feature introduced is convinient for development it is not as
    useful for distributions. Furthermore it even breaks things as one
    wishes to have both 32 and 64 bit package installed on the same system.
    
    Keep the functionality in development branch(es) and drop it from
    distribution packages to avoid confusion and misuse.
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/configure.ac b/configure.ac
index 7e63bfa..d215b63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1667,13 +1667,6 @@ AC_ARG_WITH([vulkan-icddir],
     [VULKAN_ICD_INSTALL_DIR='${datarootdir}/vulkan/icd.d'])
 AC_SUBST([VULKAN_ICD_INSTALL_DIR])
 
-AC_ARG_ENABLE([vulkan-icd-full-driver-path],
-   [AS_HELP_STRING([--disable-vulkan-icd-full-driver-path],
-                   [create Vulkan ICD files with just a .so name and no path])],
-   [vulkan_icd_driver_path="$enableval"],
-   [vulkan_icd_driver_path="yes"])
-AM_CONDITIONAL(VULKAN_ICD_DRIVER_PATH, test "x$vulkan_icd_driver_path" = xyes)
-
 if test -n "$with_vulkan_drivers"; then
     VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers`
     for driver in $VULKAN_DRIVERS; do
diff --git a/src/intel/vulkan/.gitignore b/src/intel/vulkan/.gitignore
index a099ff6..bde5cd8 100644
--- a/src/intel/vulkan/.gitignore
+++ b/src/intel/vulkan/.gitignore
@@ -3,4 +3,3 @@
 /anv_entrypoints.h
 /anv_timestamp.h
 /dev_icd.json
-/intel_icd.json
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 5d2b3a5..6e17188 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -147,12 +147,11 @@ anv_timestamp.h:
 	$(AM_V_GEN) echo "#define ANV_TIMESTAMP \"$(TIMESTAMP_CMD)\"" > $@
 
 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
-CLEANFILES = $(BUILT_SOURCES) dev_icd.json intel_icd.json
+CLEANFILES = $(BUILT_SOURCES) dev_icd.json
 EXTRA_DIST = \
 	$(top_srcdir)/include/vulkan/vk_icd.h \
 	anv_entrypoints_gen.py \
 	dev_icd.json.in \
-	intel_icd.json.in \
 	intel_icd.json
 
 libvulkan_intel_la_LIBADD = $(VULKAN_LIB_DEPS)
@@ -177,17 +176,6 @@ dev_icd.json : dev_icd.json.in
 		-e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
 		< $(srcdir)/dev_icd.json.in > $@
 
-if VULKAN_ICD_DRIVER_PATH
-ICD_DRIVER_PATH="${libdir}/libvulkan_intel.so"
-else
-ICD_DRIVER_PATH="libvulkan_intel.so"
-endif
-
-intel_icd.json : intel_icd.json.in
-	$(AM_V_GEN) $(SED) \
-		-e "s#@ICD_DRIVER_PATH@#${ICD_DRIVER_PATH}#" \
-		< $(srcdir)/intel_icd.json.in > $@
-
 # Libvulkan with dummy gem. Used for unit tests.
 libvulkan_test_la_SOURCES = $(VULKAN_GEM_STUB_FILES)
 libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS)
diff --git a/src/intel/vulkan/intel_icd.json b/src/intel/vulkan/intel_icd.json
new file mode 100644
index 0000000..277c14e
--- /dev/null
+++ b/src/intel/vulkan/intel_icd.json
@@ -0,0 +1,7 @@
+{
+    "file_format_version": "1.0.0",
+    "ICD": {
+        "library_path": "libvulkan_intel.so",
+        "abi_versions": "1.0.3"
+    }
+}
diff --git a/src/intel/vulkan/intel_icd.json.in b/src/intel/vulkan/intel_icd.json.in
deleted file mode 100644
index 4f50866..0000000
--- a/src/intel/vulkan/intel_icd.json.in
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "file_format_version": "1.0.0",
-    "ICD": {
-        "library_path": "@ICD_DRIVER_PATH@",
-        "abi_versions": "1.0.3"
-    }
-}

commit 3ef8d4288aa4e5711f4445f1cacdcf5f65f51ddf
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Oct 19 17:33:38 2016 +0100

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

diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html
deleted file mode 100644
index c7e4d01..0000000
--- a/docs/relnotes/12.1.0.html
+++ /dev/null
@@ -1,85 +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 12.1.0 Release Notes / TBD</h1>
-
-<p>
-Mesa 12.1.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.1.1.
-</p>
-<p>
-Mesa 12.1.0 implements the OpenGL 4.4 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.4.  OpenGL
-4.4 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 ES 3.1 on i965/hsw</li>
-<li>OpenGL ES 3.2 on i965/gen9+ (Skylake and later)</li>
-<li>GL_ARB_ES3_1_compatibility on i965</li>
-<li>GL_ARB_ES3_2_compatibility on i965/gen8+</li>
-<li>GL_ARB_clear_texture on r600, radeonsi</li>
-<li>GL_ARB_compute_variable_group_size on nvc0, radeonsi</li>
-<li>GL_ARB_cull_distance on radeonsi</li>
-<li>GL_ARB_enhanced_layouts on i965, nv50, nvc0, radeonsi, llvmpipe, softpipe</li>
-<li>GL_ARB_indirect_parameters on radeonsi</li>
-<li>GL_ARB_query_buffer_object on radeonsi</li>
-<li>GL_ARB_shader_draw_parameters on radeonsi</li>
-<li>GL_ARB_shader_group_vote on nvc0</li>
-<li>GL_ARB_shader_viewport_layer_array on i965/gen6+</li>
-<li>GL_ARB_stencil_texturing on i965/hsw</li>
-<li>GL_ARB_texture_stencil8 on i965/hsw</li>
-<li>GL_EXT_window_rectangles on nv50, nvc0</li>
-<li>GL_KHR_blend_equation_advanced on i965</li>
-<li>GL_KHR_robustness on nvc0, radeonsi</li>
-<li>GL_KHR_texture_compression_astc_sliced_3d on i965</li>
-<li>GL_OES_copy_image on nv50, nvc0, r600, radeonsi, softpipe, llvmpipe</li>
-<li>GL_OES_geometry_shader on i965/gen8+, nvc0, radeonsi</li>
-<li>GL_OES_primitive_bounding_box on i965/gen7+, nvc0, radeonsi</li>
-<li>GL_OES_texture_cube_map_array on i965/gen8+, nvc0, radeonsi</li>
-<li>GL_OES_tessellation_shader on i965/gen7+, nvc0, radeonsi</li>
-<li>GL_OES_viewport_array on nvc0, radeonsi</li>
-<li>GL_ANDROID_extension_pack_es31a on i965/gen9+</li>
-</ul>
-
-<h2>Bug fixes</h2>
-
-TBD.
-
-<h2>Changes</h2>
-
-TBD.
-
-</div>
-</body>
-</html>
diff --git a/docs/relnotes/13.0.0.html b/docs/relnotes/13.0.0.html
new file mode 100644
index 0000000..6a6d38f
--- /dev/null
+++ b/docs/relnotes/13.0.0.html
@@ -0,0 +1,85 @@
+<!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 13.0.0 Release Notes / TBD</h1>
+
+<p>
+Mesa 13.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 13.0.1.
+</p>
+<p>
+Mesa 13.0.0 implements the OpenGL 4.4 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.4.  OpenGL
+4.4 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 ES 3.1 on i965/hsw</li>
+<li>OpenGL ES 3.2 on i965/gen9+ (Skylake and later)</li>
+<li>GL_ARB_ES3_1_compatibility on i965</li>
+<li>GL_ARB_ES3_2_compatibility on i965/gen8+</li>
+<li>GL_ARB_clear_texture on r600, radeonsi</li>
+<li>GL_ARB_compute_variable_group_size on nvc0, radeonsi</li>
+<li>GL_ARB_cull_distance on radeonsi</li>
+<li>GL_ARB_enhanced_layouts on i965, nv50, nvc0, radeonsi, llvmpipe, softpipe</li>
+<li>GL_ARB_indirect_parameters on radeonsi</li>
+<li>GL_ARB_query_buffer_object on radeonsi</li>
+<li>GL_ARB_shader_draw_parameters on radeonsi</li>
+<li>GL_ARB_shader_group_vote on nvc0</li>
+<li>GL_ARB_shader_viewport_layer_array on i965/gen6+</li>
+<li>GL_ARB_stencil_texturing on i965/hsw</li>
+<li>GL_ARB_texture_stencil8 on i965/hsw</li>
+<li>GL_EXT_window_rectangles on nv50, nvc0</li>
+<li>GL_KHR_blend_equation_advanced on i965</li>
+<li>GL_KHR_robustness on nvc0, radeonsi</li>
+<li>GL_KHR_texture_compression_astc_sliced_3d on i965</li>
+<li>GL_OES_copy_image on nv50, nvc0, r600, radeonsi, softpipe, llvmpipe</li>
+<li>GL_OES_geometry_shader on i965/gen8+, nvc0, radeonsi</li>
+<li>GL_OES_primitive_bounding_box on i965/gen7+, nvc0, radeonsi</li>
+<li>GL_OES_texture_cube_map_array on i965/gen8+, nvc0, radeonsi</li>
+<li>GL_OES_tessellation_shader on i965/gen7+, nvc0, radeonsi</li>
+<li>GL_OES_viewport_array on nvc0, radeonsi</li>
+<li>GL_ANDROID_extension_pack_es31a on i965/gen9+</li>
+</ul>
+
+<h2>Bug fixes</h2>
+
+TBD.
+
+<h2>Changes</h2>
+
+TBD.
+
+</div>
+</body>
+</html>

commit a2ea653a498a55a37a7f139d486694969c6aecef
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Fri Sep 16 22:42:54 2016 +0200

    radeonsi: remove cb0_is_integer handling
    
    st/mesa does this for us.
    
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index e10d3fb..8fc5fcc 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -165,7 +165,6 @@ struct si_framebuffer {
 	struct pipe_framebuffer_state	state;
 	unsigned			nr_samples;
 	unsigned			log_samples;
-	unsigned			cb0_is_integer;
 	unsigned			compressed_cb_mask;
 	unsigned			spi_shader_col_format;
 	unsigned			spi_shader_col_format_alpha;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 732f9e9..97bd308 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1144,8 +1144,7 @@ static void si_emit_db_render_state(struct si_context *sctx, struct r600_atom *s
 		S_028010_DISABLE_SMEM_EXPCLEAR_OPTIMIZATION(sctx->db_stencil_disable_expclear) |
 		S_028010_DECOMPRESS_Z_ON_FLUSH(sctx->framebuffer.nr_samples >= 4));
 
-	db_shader_control = S_02880C_ALPHA_TO_MASK_DISABLE(sctx->framebuffer.cb0_is_integer) |
-		            sctx->ps_db_shader_control;
+	db_shader_control = sctx->ps_db_shader_control;
 
 	/* Bug workaround for smoothing (overrasterization) on SI. */
 	if (sctx->b.chip_class == SI && sctx->smoothing_enabled) {
@@ -2288,7 +2287,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 	struct pipe_constant_buffer constbuf = {0};
 	struct r600_surface *surf = NULL;
 	struct r600_texture *rtex;
-	bool old_cb0_is_integer = sctx->framebuffer.cb0_is_integer;
 	bool old_any_dst_linear = sctx->framebuffer.any_dst_linear;
 	unsigned old_nr_samples = sctx->framebuffer.nr_samples;
 	int i;
@@ -2333,13 +2331,8 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 	sctx->framebuffer.compressed_cb_mask = 0;
 	sctx->framebuffer.nr_samples = util_framebuffer_get_num_samples(state);
 	sctx->framebuffer.log_samples = util_logbase2(sctx->framebuffer.nr_samples);
-	sctx->framebuffer.cb0_is_integer = state->nr_cbufs && state->cbufs[0] &&
-				  util_format_is_pure_integer(state->cbufs[0]->format);
 	sctx->framebuffer.any_dst_linear = false;
 
-	if (sctx->framebuffer.cb0_is_integer != old_cb0_is_integer)
-		si_mark_atom_dirty(sctx, &sctx->db_render_state);
-
 	for (i = 0; i < state->nr_cbufs; i++) {
 		if (!state->cbufs[i])
 			continue;
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index d339b84..137a5d1 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -845,8 +845,7 @@ static void si_shader_init_pm4_state(struct si_screen *sscreen,
 static unsigned si_get_alpha_test_func(struct si_context *sctx)
 {
 	/* Alpha-test should be disabled if colorbuffer 0 is integer. */
-	if (sctx->queued.named.dsa &&
-	    !sctx->framebuffer.cb0_is_integer)
+	if (sctx->queued.named.dsa)
 		return sctx->queued.named.dsa->alpha_func;
 
 	return PIPE_FUNC_ALWAYS;
@@ -957,8 +956,7 @@ static inline void si_shader_selector_key(struct pipe_context *ctx,
 
 			if (sctx->queued.named.blend) {
 				key->ps.epilog.alpha_to_one = sctx->queued.named.blend->alpha_to_one &&
-							      rs->multisample_enable &&
-							      !sctx->framebuffer.cb0_is_integer;
+							      rs->multisample_enable;
 			}
 
 			key->ps.prolog.poly_stipple = rs->poly_stipple_enable && is_poly;

commit 54f8efeb022de8686db18c49daf14e6771f0fda1
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Fri Sep 16 22:39:15 2016 +0200

    st/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBs
    
    v2: rebased
    
    Reviewed-by: Brian Paul <brianp@vmware.com>

diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 76d6a644..b8d65bd 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -266,7 +266,8 @@ update_blend( struct st_context *st )
    blend->dither = ctx->Color.DitherFlag;
 
    if (ctx->Multisample.Enabled &&
-       ctx->DrawBuffer->Visual.sampleBuffers > 0) {
+       ctx->DrawBuffer->Visual.sampleBuffers > 0 &&
+       !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
       /* Unlike in gallium/d3d10 these operations are only performed
        * if both msaa is enabled and we have a multisample buffer.
        */
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 267b42c..7092c3f 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -149,7 +149,8 @@ update_depth_stencil_alpha(struct st_context *st)
       }
    }
 
-   if (ctx->Color.AlphaEnabled) {
+   if (ctx->Color.AlphaEnabled &&
+       !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
       dsa->alpha.enabled = 1;
       dsa->alpha.func = st_compare_func_to_pipe(ctx->Color.AlphaFunc);
       dsa->alpha.ref_value = ctx->Color.AlphaRefUnclamped;

commit c64da9d4997692bd25253dfc19e34d6fa335a58b
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Mon Oct 17 00:54:35 2016 +0200

    mesa: remove gl_shader_compiler_options::EmitNoNoise
    
    it's always true
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 83aaf9e..6c48823 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -260,7 +260,6 @@ i915CreateContext(int api,
    struct gl_shader_compiler_options *const fs_options =
       & ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
    fs_options->MaxIfDepth = 0;
-   fs_options->EmitNoNoise = true;
    fs_options->EmitNoPow = true;
    fs_options->EmitNoMainReturn = true;
    fs_options->EmitNoIndirectInput = true;
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c
index 86b1eaa..18145be 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.c
+++ b/src/mesa/drivers/dri/i965/brw_compiler.c
@@ -123,7 +123,6 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo)
       compiler->glsl_compiler_options[i].MaxIfDepth =
          devinfo->gen < 6 ? 16 : UINT_MAX;
 
-      compiler->glsl_compiler_options[i].EmitNoNoise = true;
       compiler->glsl_compiler_options[i].EmitNoMainReturn = true;
       compiler->glsl_compiler_options[i].EmitNoIndirectInput = true;
       compiler->glsl_compiler_options[i].EmitNoIndirectUniform = false;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ff20226..23a864b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2999,7 +2999,6 @@ struct gl_shader_compiler_options
    GLboolean EmitNoFunctions;
    GLboolean EmitNoCont;                  /**< Emit CONT opcode? */
    GLboolean EmitNoMainReturn;            /**< Emit CONT/RET opcodes? */
-   GLboolean EmitNoNoise;                 /**< Emit NOISE opcodes? */
    GLboolean EmitNoPow;                   /**< Emit POW opcodes? */
    GLboolean EmitNoSat;                   /**< Emit SAT opcodes? */
    GLboolean LowerCombinedClipCullDistance; /** Lower gl_ClipDistance and
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index debc18d..bd65df2 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2997,8 +2997,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
 
 	 progress = lower_if_to_cond_assign(ir, options->MaxIfDepth) || progress;
 
-	 if (options->EmitNoNoise)
-	    progress = lower_noise(ir) || progress;
+         progress = lower_noise(ir) || progress;
 
 	 /* If there are forms of indirect addressing that the driver
 	  * cannot handle, perform the lowering pass.
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 6ed00ab..12582c5 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -263,8 +263,6 @@ void st_init_limits(struct pipe_screen *screen,
          pc->MediumInt = pc->HighInt = pc->LowInt;
       }
 
-      options->EmitNoNoise = TRUE;
-
       /* TODO: make these more fine-grained if anyone needs it */
       options->MaxIfDepth =
          screen->get_shader_param(screen, sh,

commit 2897cb3dba9287011f9c43cd2f214100952370c0
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Mon Oct 17 00:47:49 2016 +0200

    glsl_to_tgsi: remove code for fixing up TGSI labels
    
    I don't know what this was supposed to do, but all TGSI labels were
    always 0.
    
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 748ce89..98ebe54 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5139,10 +5139,6 @@ glsl_to_tgsi_visitor::renumber_registers(void)
 }
 
 /* ------------------------- TGSI conversion stuff -------------------------- */
-struct label {
-   unsigned branch_target;
-   unsigned token;
-};
 
 /**
  * Intermediate state used during shader translation.
@@ -5176,25 +5172,7 @@ struct st_translate {
    const GLuint *inputMapping;
    const GLuint *outputMapping;
 
-   /* For every instruction that contains a label, keep
-    * details so that we can go back afterwards and emit the correct
-    * tgsi instruction number for each label.
-    */
-   struct label *labels;
-   unsigned labels_size;
-   unsigned labels_count;
-
-   /* Keep a record of the tgsi instruction number that each mesa
-    * instruction starts at, will be used to fix up labels after
-    * translation.
-    */
-   unsigned *insn;
-   unsigned insn_size;
-   unsigned insn_count;
-
    unsigned procType;  /**< PIPE_SHADER_VERTEX/FRAGMENT */
-
-   boolean error;
 };
 
 /** Map Mesa's SYSTEM_VALUE_x to TGSI_SEMANTIC_x */
@@ -5266,53 +5244,6 @@ _mesa_sysval_to_semantic(unsigned sysval)
    }
 }
 
-
-/**
- * Make note of a branch to a label in the TGSI code.
- * After we've emitted all instructions, we'll go over the list
- * of labels built here and patch the TGSI code with the actual
- * location of each label.
- */
-static unsigned *get_label(struct st_translate *t, unsigned branch_target)
-{
-   unsigned i;
-
-   if (t->labels_count + 1 >= t->labels_size) {
-      t->labels_size = 1 << (util_logbase2(t->labels_size) + 1);
-      t->labels = (struct label *)realloc(t->labels,
-                                          t->labels_size * sizeof(struct label));
-      if (t->labels == NULL) {
-         static unsigned dummy;
-         t->error = TRUE;
-         return &dummy;
-      }
-   }
-
-   i = t->labels_count++;
-   t->labels[i].branch_target = branch_target;
-   return &t->labels[i].token;
-}
-
-/**
- * Called prior to emitting the TGSI code for each instruction.
- * Allocate additional space for instructions if needed.
- * Update the insn[] array so the next glsl_to_tgsi_instruction points to
- * the next TGSI instruction.
- */
-static void set_insn_start(struct st_translate *t, unsigned start)
-{
-   if (t->insn_count + 1 >= t->insn_size) {
-      t->insn_size = 1 << (util_logbase2(t->insn_size) + 1);
-      t->insn = (unsigned *)realloc(t->insn, t->insn_size * sizeof(t->insn[0]));
-      if (t->insn == NULL) {
-         t->error = TRUE;
-         return;
-      }
-   }
-
-   t->insn[t->insn_count++] = start;
-}
-
 /**
  * Map a glsl_to_tgsi constant/immediate to a TGSI immediate.
  */
@@ -5613,10 +5544,7 @@ compile_tgsi_instruction(struct st_translate *t,
    case TGSI_OPCODE_IF:
    case TGSI_OPCODE_UIF:
       assert(num_dst == 0);
-      ureg_label_insn(ureg,
-                      inst->op,
-                      src, num_src,
-                      get_label(t, 0));
+      ureg_insn(ureg, inst->op, NULL, 0, src, num_src);
       return;
 
    case TGSI_OPCODE_TEX:
@@ -6343,17 +6271,8 @@ st_translate_program(
 
    /* Emit each instruction in turn:
     */
-   foreach_in_list(glsl_to_tgsi_instruction, inst, &program->instructions) {
-      set_insn_start(t, ureg_get_instruction_number(ureg));
+   foreach_in_list(glsl_to_tgsi_instruction, inst, &program->instructions)
       compile_tgsi_instruction(t, inst);
-   }
-
-   /* Fix up all emitted labels:
-    */
-   for (i = 0; i < t->labels_count; i++) {
-      ureg_fixup_label(ureg, t->labels[i].token,
-                       t->insn[t->labels[i].branch_target]);
-   }
 
    /* Set the next shader stage hint for VS and TES. */
    switch (procType) {
@@ -6395,17 +6314,10 @@ out:
    if (t) {
       free(t->arrays);
       free(t->temps);
-      free(t->insn);
-      free(t->labels);
       free(t->constants);
       t->num_constants = 0;
       free(t->immediates);
       t->num_immediates = 0;
-
-      if (t->error) {
-         debug_printf("%s: translate error flag set\n", __func__);
-      }
-
       FREE(t);
    }
 

commit ec35ff4e2b71867b0c60479bea8aacd8dfd66ae5
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Mon Oct 17 00:38:41 2016 +0200

    glsl_to_tgsi: remove subroutine support
    
    Never used. The GLSL compiler doesn't even look at EmitNoFunctions.
    
    v2: add back "return" support in "main"
    
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index b87a3db..6ed00ab 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -272,8 +272,7 @@ void st_init_limits(struct pipe_screen *screen,
       options->EmitNoLoops =
          !screen->get_shader_param(screen, sh,
                                    PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);
-      options->EmitNoFunctions =
-         !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES);
+      options->EmitNoFunctions = true;
       options->EmitNoMainReturn =
          !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES);
 
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 812a7a0..748ce89 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -291,7 +291,6 @@ public:
    unsigned dead_mask:4; /**< Used in dead code elimination */
    unsigned buffer_access:3; /**< buffer access type */
 
-   class function_entry *function; /* Set on TGSI_OPCODE_CAL or TGSI_OPCODE_BGNSUB */
    const struct tgsi_opcode_info *info;
 };
 
@@ -331,38 +330,6 @@ public:
    int type; /**< GL_DOUBLE, GL_FLOAT, GL_INT, GL_BOOL, or GL_UNSIGNED_INT */
 };
 
-class function_entry : public exec_node {
-public:
-   ir_function_signature *sig;
-
-   /**
-    * identifier of this function signature used by the program.
-    *
-    * At the point that TGSI instructions for function calls are
-    * generated, we don't know the address of the first instruction of
-    * the function body.  So we make the BranchTarget that is called a
-    * small integer and rewrite them during set_branchtargets().
-    */
-   int sig_id;
-
-   /**
-    * Pointer to first instruction of the function body.
-    *
-    * Set during function body emits after main() is processed.
-    */
-   glsl_to_tgsi_instruction *bgn_inst;
-
-   /**
-    * Index of the first instruction of the function body in actual TGSI.
-    *
-    * Set after conversion from glsl_to_tgsi_instruction to TGSI.
-    */
-   int inst;
-
-   /** Storage for the return value. */
-   st_src_reg return_reg;
-};
-
 static st_src_reg undef_src = st_src_reg(PROGRAM_UNDEFINED, 0, GLSL_TYPE_ERROR);
 static st_dst_reg undef_dst = st_dst_reg(PROGRAM_UNDEFINED, SWIZZLE_NOOP, GLSL_TYPE_ERROR);
 
@@ -411,8 +378,6 @@ public:
    glsl_to_tgsi_visitor();
    ~glsl_to_tgsi_visitor();
 
-   function_entry *current_function;
-
    struct gl_context *ctx;
    struct gl_program *prog;
    struct gl_shader_program *shader_program;
@@ -454,8 +419,6 @@ public:
    int add_constant(gl_register_file file, gl_constant_value values[8],
                     int size, int datatype, uint16_t *swizzle_out);
 
-   function_entry *get_function_signature(ir_function_signature *sig);
-
    st_src_reg get_temp(const glsl_type *type);
    void reladdr_to_temp(ir_instruction *ir, st_src_reg *reg, int *num_reladdr);
 
@@ -511,10 +474,6 @@ public:
    exec_list immediates;
    unsigned num_immediates;
 
-   /** List of function_entry */
-   exec_list function_signatures;
-   int next_signature_id;
-
    /** List of glsl_to_tgsi_instruction */
    exec_list instructions;
 
@@ -723,8 +682,6 @@ glsl_to_tgsi_visitor::emit_asm(ir_instruction *ir, unsigned op,
     */
    inst->tex_type = GLSL_TYPE_FLOAT;
 
-   inst->function = NULL;
-
    /* Update indirect addressing status used by TGSI */
    if (dst.reladdr || dst.reladdr2) {
       switch(dst.file) {
@@ -3219,42 +3176,6 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir)
                                      &this->result.swizzle);
 }
 
-function_entry *
-glsl_to_tgsi_visitor::get_function_signature(ir_function_signature *sig)
-{
-   foreach_in_list_use_after(function_entry, entry, &this->function_signatures) {
-      if (entry->sig == sig)
-         return entry;
-   }
-
-   entry = ralloc(mem_ctx, function_entry);
-   entry->sig = sig;
-   entry->sig_id = this->next_signature_id++;
-   entry->bgn_inst = NULL;
-
-   /* Allocate storage for all the parameters. */
-   foreach_in_list(ir_variable, param, &sig->parameters) {
-      variable_storage *storage;
-
-      storage = find_variable_storage(param);
-      assert(!storage);
-
-      st_src_reg src = get_temp(param->type);
-
-      storage = new(mem_ctx) variable_storage(param, src.file, src.index);
-      this->variables.push_tail(storage);
-   }
-
-   if (!sig->return_type->is_void()) {
-      entry->return_reg = get_temp(sig->return_type);
-   } else {
-      entry->return_reg = undef_src;
-   }
-
-   this->function_signatures.push_tail(entry);
-   return entry;
-}
-
 void
 glsl_to_tgsi_visitor::visit_atomic_counter_intrinsic(ir_call *ir)
 {
@@ -3765,16 +3686,10 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir)
 void
 glsl_to_tgsi_visitor::visit(ir_call *ir)
 {
-   glsl_to_tgsi_instruction *call_inst;
    ir_function_signature *sig = ir->callee;
-   function_entry *entry;
-   int i;
 
    /* Filter out intrinsics */
    switch (sig->intrinsic_id) {
-   case ir_intrinsic_invalid:
-      break;
-
    case ir_intrinsic_atomic_counter_read:
    case ir_intrinsic_atomic_counter_increment:
    case ir_intrinsic_atomic_counter_predecrement:
@@ -3839,6 +3754,7 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
       visit_image_intrinsic(ir);
       return;
 
+   case ir_intrinsic_invalid:
    case ir_intrinsic_generic_load:
    case ir_intrinsic_generic_store:
    case ir_intrinsic_generic_atomic_add:
@@ -3852,71 +3768,6 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
    case ir_intrinsic_shader_clock:
       unreachable("Invalid intrinsic");
    }
-
-   entry = get_function_signature(sig);
-   /* Process in parameters. */
-   foreach_two_lists(formal_node, &sig->parameters,
-                     actual_node, &ir->actual_parameters) {
-      ir_rvalue *param_rval = (ir_rvalue *) actual_node;
-      ir_variable *param = (ir_variable *) formal_node;
-
-      if (param->data.mode == ir_var_function_in ||
-          param->data.mode == ir_var_function_inout) {
-         variable_storage *storage = find_variable_storage(param);
-         assert(storage);
-
-         param_rval->accept(this);
-         st_src_reg r = this->result;
-
-         st_dst_reg l;
-         l.file = storage->file;
-         l.index = storage->index;
-         l.reladdr = NULL;
-         l.writemask = WRITEMASK_XYZW;
-
-         for (i = 0; i < type_size(param->type); i++) {
-            emit_asm(ir, TGSI_OPCODE_MOV, l, r);
-            l.index++;
-            r.index++;
-         }
-      }
-   }
-
-   /* Emit call instruction */
-   call_inst = emit_asm(ir, TGSI_OPCODE_CAL);
-   call_inst->function = entry;
-
-   /* Process out parameters. */
-   foreach_two_lists(formal_node, &sig->parameters,
-                     actual_node, &ir->actual_parameters) {
-      ir_rvalue *param_rval = (ir_rvalue *) actual_node;
-      ir_variable *param = (ir_variable *) formal_node;
-
-      if (param->data.mode == ir_var_function_out ||
-          param->data.mode == ir_var_function_inout) {
-         variable_storage *storage = find_variable_storage(param);
-         assert(storage);
-
-         st_src_reg r;
-         r.file = storage->file;
-         r.index = storage->index;
-         r.reladdr = NULL;
-         r.swizzle = SWIZZLE_NOOP;
-         r.negate = 0;
-
-         param_rval->accept(this);
-         st_dst_reg l = st_dst_reg(this->result);
-
-         for (i = 0; i < type_size(param->type); i++) {
-            emit_asm(ir, TGSI_OPCODE_MOV, l, r);
-            l.index++;
-            r.index++;
-         }
-      }
-   }
-
-   /* Process return value. */
-   this->result = entry->return_reg;
 }
 
 void
@@ -4358,23 +4209,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
 void
 glsl_to_tgsi_visitor::visit(ir_return *ir)
 {
-   if (ir->get_value()) {
-      st_dst_reg l;
-      int i;
-
-      assert(current_function);
-
-      ir->get_value()->accept(this);
-      st_src_reg r = this->result;
-
-      l = st_dst_reg(current_function->return_reg);
-
-      for (i = 0; i < type_size(current_function->sig->return_type); i++) {
-         emit_asm(ir, TGSI_OPCODE_MOV, l, r);
-         l.index++;
-         r.index++;
-      }
-   }
+   assert(!ir->get_value());
 
    emit_asm(ir, TGSI_OPCODE_RET);
 }
@@ -4468,9 +4303,7 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
    num_outputs = 0;
    num_input_arrays = 0;
    num_output_arrays = 0;
-   next_signature_id = 1;
    num_immediates = 0;
-   current_function = NULL;
    num_address_regs = 0;
    samplers_used = 0;
    buffers_used = 0;
@@ -4617,10 +4450,8 @@ glsl_to_tgsi_visitor::simplify_cmp(void)
       if (inst->dst[0].reladdr || inst->dst[0].reladdr2 ||
           inst->dst[1].reladdr || inst->dst[1].reladdr2 ||
           tgsi_get_opcode_info(inst->op)->is_branch ||
-          inst->op == TGSI_OPCODE_BGNSUB ||
           inst->op == TGSI_OPCODE_CONT ||
           inst->op == TGSI_OPCODE_END ||
-          inst->op == TGSI_OPCODE_ENDSUB ||
           inst->op == TGSI_OPCODE_RET) {
          break;
       }
@@ -5345,7 +5176,7 @@ struct st_translate {
    const GLuint *inputMapping;
    const GLuint *outputMapping;
 
-   /* For every instruction that contains a label (eg CALL), keep
+   /* For every instruction that contains a label, keep
     * details so that we can go back afterwards and emit the correct
     * tgsi instruction number for each label.
     */
@@ -5777,7 +5608,6 @@ compile_tgsi_instruction(struct st_translate *t,
 
    switch(inst->op) {
    case TGSI_OPCODE_BGNLOOP:
-   case TGSI_OPCODE_CAL:
    case TGSI_OPCODE_ELSE:
    case TGSI_OPCODE_ENDLOOP:
    case TGSI_OPCODE_IF:
@@ -5786,8 +5616,7 @@ compile_tgsi_instruction(struct st_translate *t,
       ureg_label_insn(ureg,
                       inst->op,
                       src, num_src,
-                      get_label(t,
-                                inst->op == TGSI_OPCODE_CAL ? inst->function->sig_id : 0));
+                      get_label(t, 0));
       return;
 
    case TGSI_OPCODE_TEX:


Reply to: