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

mesa: Changes to 'upstream-experimental'



 VERSION                                                        |    2 
 docs/relnotes/11.2.0.html                                      |  214 +++++++++-
 src/egl/drivers/dri2/platform_android.c                        |    4 
 src/egl/main/eglapi.c                                          |    2 
 src/egl/main/eglconfig.c                                       |   12 
 src/egl/main/eglconfig.h                                       |    4 
 src/egl/main/egldisplay.h                                      |    2 
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp      |   12 
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp |   18 
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp  |   37 -
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp  |   35 -
 src/gallium/drivers/radeonsi/si_shader.c                       |    3 
 src/mesa/Android.libmesa_dricore.mk                            |    7 
 src/mesa/Android.libmesa_sse41.mk                              |   44 ++
 src/mesa/Android.libmesa_st_mesa.mk                            |    4 
 src/mesa/Android.mk                                            |    1 
 src/mesa/Makefile.sources                                      |    4 
 17 files changed, 310 insertions(+), 95 deletions(-)

New commits:
commit ff9ddb9eb1b3b25f40e71a95bb48421abfcb11d9
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Apr 4 11:39:34 2016 +0100

    docs: Update 11.2.0 release notes
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/docs/relnotes/11.2.0.html b/docs/relnotes/11.2.0.html
index baedb4c..f605389 100644
--- a/docs/relnotes/11.2.0.html
+++ b/docs/relnotes/11.2.0.html
@@ -14,7 +14,7 @@
 <iframe src="../contents.html"></iframe>
 <div class="content">
 
-<h1>Mesa 11.2.0 Release Notes / TBD</h1>
+<h1>Mesa 11.2.0 Release Notes / 4 April 2016</h1>
 
 <p>
 Mesa 11.2.0 is a new development release.
@@ -70,7 +70,217 @@ Note: some of the new features are only available with certain drivers.
 
 <h2>Bug fixes</h2>
 
-TBD.
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27512";>Bug 27512</a> - Illegal instruction _mesa_x86_64_transform_points4_general</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75165";>Bug 75165</a> - compute.c:464:49: error: function definition is not allowed here</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79783";>Bug 79783</a> - Distorted output in obs-studio where other vendors &quot;work&quot;</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89330";>Bug 89330</a> - piglit glsl-1.50 invariant-qualifier-in-out-block-01 regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89969";>Bug 89969</a> - nouveau: add support for chunk decoding in order to support vaapi (st/va)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90348";>Bug 90348</a> - Spilling failure of b96 merged value</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91526";>Bug 91526</a> - World of Warcraft (on Wine) has UI corruption with nouveau</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91596";>Bug 91596</a> - EGL_KHR_gl_colorspace (v2) causes problem with Android-x86 GUI</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91806";>Bug 91806</a> - configure does not test whether assembler supports sse4.1</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91927";>Bug 91927</a> - [SKL] [regression] piglit compressed textures tests fail  with kernel upgrade</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92193";>Bug 92193</a> - [SKL] ES2-CTS.gtf.GL2ExtensionTests.compressed_astc_texture.compressed_astc_texture fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92229";>Bug 92229</a> - [APITRACE] SOMA have serious graphical errors</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92233";>Bug 92233</a> - Unigine Heaven 4.0 silhuette run</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92363";>Bug 92363</a> - [BSW/BDW] ogles1conform Gets test fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92438";>Bug 92438</a> - Segfault in pushbuf_kref when running the android emulator (qemu) on nv50</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92589";>Bug 92589</a> - [BDW BSW SKL CTS] ES31-CTS.texture_gather.* GPU_HANG</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92595";>Bug 92595</a> - [HSW,BDW,SKL][GLES 3.1 CTS] Big difference in the results for the ES31-CTS.shader_bitfield_operation.* tests</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92609";>Bug 92609</a> - [BDW, BSW] piglit sampling-2d-array-as-2d-layer fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92687";>Bug 92687</a> - Add support for ARB_internalformat_query2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92706";>Bug 92706</a> - glBlitFramebuffer refuses to blit RGBA to RGB with MSAA</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92709";>Bug 92709</a> - &quot;LLVM triggered Diagnostic Handler: unsupported call to function ldexpf in main&quot; when starting race in stuntrally</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92743";>Bug 92743</a> - Centroid shouldn't have to match between the FS and the VS</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92759";>Bug 92759</a> - [Regression, bisected] Visuals without alpha bits are not sRGB-capable</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92849";>Bug 92849</a> - [IVB HSW BDW] piglit image load/store load-from-cleared-image.shader_test fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92909";>Bug 92909</a> - Offset/alignment issue with layout std140 and vec3</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93004";>Bug 93004</a> - Guild Wars 2 crash on nouveau DX11 cards</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93048";>Bug 93048</a> - [CTS regression] mesa af2723 breaks GL Conformance for debug extension</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93063";>Bug 93063</a> - drm_helper.h:227:1: error: static declaration of ‘pipe_virgl_create_screen’ follows non-static declaration</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93091";>Bug 93091</a> - [opencl] segfault when running any opencl programs (like clinfo)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93092";>Bug 93092</a> - lp_test_format regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93126";>Bug 93126</a> - wrongly claim supporting GL_EXT_texture_rg</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93180";>Bug 93180</a> - [regression] arb_separate_shader_objects.active sampler conflict fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93189";>Bug 93189</a> - &quot;./util/u_inlines.h&quot;, line 83: operands have incompatible types: void &quot;:&quot; int</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93215";>Bug 93215</a> - [Regression bisected] Ogles1conform Automatic mipmap generation test is fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93235";>Bug 93235</a> - [regression] dispatch sanity broken by GetPointerv</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93257";>Bug 93257</a> - [SKL, bisected] ASTC dEQP tests segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93264";>Bug 93264</a> - Tonga VM Faults since llvm ScheduleDAGInstrs: Rework schedule graph builder.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93266";>Bug 93266</a> - gl_arb_shading_language_420pack does not allow binding of image variables</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93300";>Bug 93300</a> - Two Worlds 2 renders water incorrectly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93312";>Bug 93312</a> - [SKL][GLES 3.1 CTS] ES31-CTS.layout_binding* GPU_HANG</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93320";>Bug 93320</a> - [HSW,BDW,SKL][GLES 3.1 CTS] ES31-CTS.vertex_attrib_binding.advanced-bindingUpdate fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93322";>Bug 93322</a> - [HSW,BDW,SKL][GLES 3.1 CTS] ES31-CTS.compute_shader.resource-ubo fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93323";>Bug 93323</a> - [HSW,BDW,SKL][GLES 3.1 CTS]ES31-CTS.shader_image_load_store.basic-allTargets-store-fs fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93325";>Bug 93325</a> - [HSW,BDW,SKL]ES31-CTS.explicit_uniform_location.uniform-loc-* 2 tests fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93339";>Bug 93339</a> - glLinkProgram() should fail when a varying is never written to in a previous stage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93348";>Bug 93348</a> - [HSW,BDW,SKL][GLES 3.1 CTS] ES31-CTS.compute_shader.* segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93358";>Bug 93358</a> - [HSW] Unreal Elemental demo - assertion error in copy_image_with_blitter</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93387";>Bug 93387</a> - inverse() shouldn’t be exposed in GLSL 1.20 and 1.30</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93388";>Bug 93388</a> - [i965, regression, bisection] MESA_FORMAT_B8G8R8X8_SRGB changes break kwin</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93407";>Bug 93407</a> - [SKL][GLES 3.1 CTS]ES31-CTS.compute_shader.resources-texture fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93410";>Bug 93410</a> - [BDW,SKL][GLES 3.1 CTS]ES31-CTS.shader_image_load_store.negative-linkErrors fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93418";>Bug 93418</a> - Geometry Shaders output wrong vertices on Sandy Bridge</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93426";>Bug 93426</a> - [SKL,BDW,BSW,BXT] CTS regression: es2-cts.gtf.gl2fixedtests.buffer_objects.buffer_object,s</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93524";>Bug 93524</a> - Clover doesn't build</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93526";>Bug 93526</a> - GfxBench 4 tessellation demos misrender</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93532";>Bug 93532</a> - [HSW,BDW,SKL][GLES 3.1 CTS] ES31-CTS.compute_shader.*. Regression, bisected.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93540";>Bug 93540</a> - [BISECTED, HSW] Rendering issue in Heaven (and other benchmarks)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93560";>Bug 93560</a> - opt_combine_constants failing fabsf(reg-&gt;f) == table.imm[i].val assertion</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93599";>Bug 93599</a> - Strange green flashes with &quot;Metro: Last Light Redux&quot; + &quot;Metro 2033 Redux&quot; with Intel Mesa driver</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93648";>Bug 93648</a> - Random lines being rendered when playing Dolphin (geometry shaders related, w/ apitrace)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93650";>Bug 93650</a> - GL_ARB_separate_shader_objects is buggy (PCSX2)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93667";>Bug 93667</a> - Crash in eglCreateImageKHR with huge texture size</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93696";>Bug 93696</a> - [HSW,BDW;SKL][GLES 3.1 CTS]ES31-CTS.explicit_uniform_location.uniform-loc-mix-with-implicit-max-* fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93700";>Bug 93700</a> - [SKL, regression] deqp-gles2.functional.texture.completeness</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93717";>Bug 93717</a> - Meta mipmap generation can corrupt texture state</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93722";>Bug 93722</a> - Segfault when compiling shader with a subroutine that takes a parameter</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93725";>Bug 93725</a> - [HSW, regression, bisected] ES31-CTS.texture_gather.*depth*</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93731";>Bug 93731</a> - glUniformSubroutinesuiv segfaults when subroutine uniform is bound to a specific location</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93761";>Bug 93761</a> - A conditional discard in a fragment shader causes no depth writing at all</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93790";>Bug 93790</a> - [HSW] Use after free with compute programs</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93792";>Bug 93792</a> - [HSW] intel_mipmap_tree.c:1325: intel_miptree_copy_slice: Assertion `src_mt-&gt;format == dst_mt-&gt;format</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93813";>Bug 93813</a> - Incorrect viewport range when GL_CLIP_ORIGIN is GL_UPPER_LEFT</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93840";>Bug 93840</a> - [i965] Alien: Isolation fails with GL_ARB_compute_shader enabled</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93862";>Bug 93862</a> - [Bisected] &quot;drm/amdgpu: fix amdgpu_bo_pin_restricted VRAM placing v2&quot; is bad</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93878";>Bug 93878</a> - [llvmpipe][softpipe] piglit arb_gpu_shader_fp64-double-gettransformfeedbackvarying regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93957";>Bug 93957</a> - [HSW] Mishandling of sample count when using an attachment-less framebuffer (assertion error)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93961";>Bug 93961</a> - virgl build failure after 2016-02-01 changes - no previous prototype for 'virgl_drm_winsys_create'</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93962";>Bug 93962</a> - [HSW, regression, bisected, CTS] ES2-CTS.gtf.GL2FixedTests.scissor.scissor - segfault/asserts</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93989";>Bug 93989</a> - build: flex-2.5.39 seems to be failing for glsl_lexer.ll</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94016";>Bug 94016</a> - make check MesaExtensionsTest.AlphabeticallySorted regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94019";>Bug 94019</a> - [bisected] 3D acceleration broken with gallium/radeon: just get num_tile_pipes from the winsys</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94050";>Bug 94050</a> - test_vec4_register_coalesce regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94073";>Bug 94073</a> - Miscompilation of abs_vec3_vert_xvary_ref.vert in WebGL conformance</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94081";>Bug 94081</a> - [HSW] compute shader shared var + atomic op = fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94088";>Bug 94088</a> - [llvmpipe] SIGFPE pthread_barrier_destroy.c:40</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94091";>Bug 94091</a> - Tonga unreal elemental segfault since radeonsi: put image, fmask, and sampler descriptors into one array</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94100";>Bug 94100</a> - [HSW] compute indirect dispatch with 0 work groups causes gpu hang</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94134";>Bug 94134</a> - [regression] piglit.spec.arb_texture_view.sampling-2d-array-as-2d-layer assertion</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94139";>Bug 94139</a> - [regression, HSW, IVB] piglit.spec.arb_compute_shader.minmax</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94150";>Bug 94150</a> - UE4 Suntemple rendering errors</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94186";>Bug 94186</a> - Crash when launching glxinfo and World of Warcraft with RV790</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94188";>Bug 94188</a> - define (or undef) defined behaves stupidly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94193";>Bug 94193</a> - [llvmpipe] Line antialiasing looks different when GL_LINE_STIPPLE is enabled with pattern 0xffff</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94199";>Bug 94199</a> - Shader abort/crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94253";>Bug 94253</a> - [llvmpipe] piglit gl-1.0-swapbuffers-behavior regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94254";>Bug 94254</a> - [llvmpipe] [softpipe] piglit read-front regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94257";>Bug 94257</a> - [softpipe] piglit glx-copy-sub-buffer regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94274";>Bug 94274</a> - [swrast] piglit arb_occlusion_query2-render regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94284";>Bug 94284</a> - [radeonsi] outlast segfault on start</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94388";>Bug 94388</a> - r600_blit.c:281: r600_decompress_depth_textures: Assertion `tex-&gt;is_depth &amp;&amp; !tex-&gt;is_flushing_texture' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94412";>Bug 94412</a> - Trine 3 misrender</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94481";>Bug 94481</a> - softpipe - access violation in img_filter_2d_nearest</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94524";>Bug 94524</a> - Wrong gl_TessLevelOuter interpretation for isolines</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94595";>Bug 94595</a> - [Mesa AMD&amp;swrast] Texture views attached as framebuffers return their viewed tecture's color encoding and render incorrectly</li>
+
+</ul>
 
 <h2>Changes</h2>
 

commit afe302be5f57917f8fbda665672d68d48b2d44d6
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Apr 4 11:26:58 2016 +0100

    Update version to 11.2.0(final)
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/VERSION b/VERSION
index 0cdc786..b85c6c7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-11.2.0-rc4
+11.2.0

commit a948723233e7b44f1403a08a3651ea6759fc6c2a
Author: Mauro Rossi <issor.oruam@gmail.com>
Date:   Sun Feb 21 20:57:47 2016 +0100

    radeonsi: use util_strchrnul() to fix android build error
    
    Android Bionic does not support strchrnul() string function,
    gallium auxiliary util/u_string.h provides util_strchrnul()
    
    This change avoids the following building error:
    
    external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error:
    undefined reference to 'strchrnul'
    collect2: error: ld returned 1 exit status
    
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit e09d04cd56eaca4db027c7faa3f92f4fb18b6751)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 57458ae..4230720 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -39,6 +39,7 @@
 #include "radeon/radeon_llvm_emit.h"
 #include "util/u_memory.h"
 #include "util/u_pstipple.h"
+#include "util/u_string.h"
 #include "tgsi/tgsi_parse.h"
 #include "tgsi/tgsi_util.h"
 #include "tgsi/tgsi_dump.h"
@@ -4426,7 +4427,7 @@ static void si_shader_dump_disassembly(const struct radeon_shader_binary *binary
 
 			line = binary->disasm_string;
 			while (*line) {
-				p = strchrnul(line, '\n');
+				p = util_strchrnul(line, '\n');
 				count = p - line;
 
 				if (count) {

commit 4feb83ed5edbe33b611346460fad63f80adb35d9
Author: Rob Herring <robh@kernel.org>
Date:   Tue Feb 2 14:23:11 2016 -0600

    egl: android: enable EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID
    
    Set EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID config
    attributes to true for Android. These are required in Marshmallow.
    
    The implementation of EGL_RECORDABLE_ANDROID support has 2 options in
    the definition of the extension. Android implements the 2nd option
    which is the encoder must support RGB input. The requested input format
    is RGB888, so setting the attribute on all the native Android visual
    formats should be sufficient.
    
    Similarly, setting EGL_FRAMEBUFFER_TARGET_ANDROID for all configs with
    a EGL_NATIVE_VISUAL_ID should be sufficient. Most likely, the HWC should
    support the same set of formats the underlying DRM driver supports.
    
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 952720ccee0b4e97729e1972cf22b463641f1569)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 7d54665..41840aa 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -537,6 +537,8 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
    EGLint config_attrs[] = {
      EGL_NATIVE_VISUAL_ID,   0,
      EGL_NATIVE_VISUAL_TYPE, 0,
+     EGL_FRAMEBUFFER_TARGET_ANDROID, EGL_TRUE,
+     EGL_RECORDABLE_ANDROID, EGL_TRUE,
      EGL_NONE
    };
    int count, i, j;
@@ -714,7 +716,9 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
       goto cleanup_screen;
    }
 
+   dpy->Extensions.ANDROID_framebuffer_target = EGL_TRUE;
    dpy->Extensions.ANDROID_image_native_buffer = EGL_TRUE;
+   dpy->Extensions.ANDROID_recordable = EGL_TRUE;
    dpy->Extensions.KHR_image_base = EGL_TRUE;
 
    /* Fill vtbl last to prevent accidentally calling virtual function during

commit 3d262f0d4329d63af3e63a09f46a3a7f0f38e1d3
Author: Rob Herring <robh@kernel.org>
Date:   Tue Feb 2 14:23:08 2016 -0600

    egl: Add EGL_RECORDABLE_ANDROID attribute
    
    This is used by Android to select an eglconfig compatible with screen
    recording.
    
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    [Emil Velikov: add the _eglIsConfigAttribValid check]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    
    (cherry picked from commit e21e81aa1885287e438970429d44abb8b3dabb96)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 4318e57..4dee9cf 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -383,6 +383,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
    /* Please keep these sorted alphabetically. */
    _EGL_CHECK_EXTENSION(ANDROID_framebuffer_target);
    _EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
+   _EGL_CHECK_EXTENSION(ANDROID_recordable);
 
    _EGL_CHECK_EXTENSION(CHROMIUM_sync_control);
 
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 7d2791c..435d924 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -249,6 +249,9 @@ static const struct {
    { EGL_FRAMEBUFFER_TARGET_ANDROID, ATTRIB_TYPE_BOOLEAN,
                                     ATTRIB_CRITERION_EXACT,
                                     EGL_DONT_CARE },
+   { EGL_RECORDABLE_ANDROID,        ATTRIB_TYPE_BOOLEAN,
+                                    ATTRIB_CRITERION_EXACT,
+                                    EGL_DONT_CARE },
 };
 
 
@@ -493,6 +496,8 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
       return conf->Display->Extensions.NOK_texture_from_pixmap;
    case EGL_FRAMEBUFFER_TARGET_ANDROID:
       return conf->Display->Extensions.ANDROID_framebuffer_target;
+   case EGL_RECORDABLE_ANDROID:
+      return conf->Display->Extensions.ANDROID_recordable;
    default:
       break;
    }
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index 7bdb090..22da697 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -87,6 +87,7 @@ struct _egl_config
    /* extensions */
    EGLint YInvertedNOK;
    EGLint FramebufferTargetAndroid;
+   EGLint RecordableAndroid;
 };
 
 
@@ -135,6 +136,7 @@ _eglOffsetOfConfig(EGLint attr)
    /* extensions */
    ATTRIB_MAP(EGL_Y_INVERTED_NOK,            YInvertedNOK);
    ATTRIB_MAP(EGL_FRAMEBUFFER_TARGET_ANDROID, FramebufferTargetAndroid);
+   ATTRIB_MAP(EGL_RECORDABLE_ANDROID,        RecordableAndroid);
 #undef ATTRIB_MAP
    default:
       return -1;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index e156c79..008c467 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -92,6 +92,7 @@ struct _egl_extensions
    /* Please keep these sorted alphabetically. */
    EGLBoolean ANDROID_framebuffer_target;
    EGLBoolean ANDROID_image_native_buffer;
+   EGLBoolean ANDROID_recordable;
 
    EGLBoolean CHROMIUM_sync_control;
 

commit 9f86c735bb82e1c7060967b3e0e0a49971a88f28
Author: Rob Herring <robh@kernel.org>
Date:   Tue Feb 2 14:23:07 2016 -0600

    egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attribute
    
    This is used by Android to select an eglconfig compatible with HWComposer.
    
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    [Emil Velikov: add the _eglIsConfigAttribValid check]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    
    (cherry picked from commit 8975527f58afd4af77966c6e46b485fc04008779)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 32f6823..4318e57 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -381,6 +381,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
    char *exts = dpy->ExtensionsString;
 
    /* Please keep these sorted alphabetically. */
+   _EGL_CHECK_EXTENSION(ANDROID_framebuffer_target);
    _EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
 
    _EGL_CHECK_EXTENSION(CHROMIUM_sync_control);
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index d79c0e1..7d2791c 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -245,7 +245,10 @@ static const struct {
    /* extensions */
    { EGL_Y_INVERTED_NOK,            ATTRIB_TYPE_BOOLEAN,
                                     ATTRIB_CRITERION_EXACT,
-                                    EGL_DONT_CARE }
+                                    EGL_DONT_CARE },
+   { EGL_FRAMEBUFFER_TARGET_ANDROID, ATTRIB_TYPE_BOOLEAN,
+                                    ATTRIB_CRITERION_EXACT,
+                                    EGL_DONT_CARE },
 };
 
 
@@ -488,6 +491,8 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
    switch (attr) {
    case EGL_Y_INVERTED_NOK:
       return conf->Display->Extensions.NOK_texture_from_pixmap;
+   case EGL_FRAMEBUFFER_TARGET_ANDROID:
+      return conf->Display->Extensions.ANDROID_framebuffer_target;
    default:
       break;
    }
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index 84cb227..7bdb090 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -86,6 +86,7 @@ struct _egl_config
 
    /* extensions */
    EGLint YInvertedNOK;
+   EGLint FramebufferTargetAndroid;
 };
 
 
@@ -133,6 +134,7 @@ _eglOffsetOfConfig(EGLint attr)
    ATTRIB_MAP(EGL_CONFORMANT,                Conformant);
    /* extensions */
    ATTRIB_MAP(EGL_Y_INVERTED_NOK,            YInvertedNOK);
+   ATTRIB_MAP(EGL_FRAMEBUFFER_TARGET_ANDROID, FramebufferTargetAndroid);
 #undef ATTRIB_MAP
    default:
       return -1;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 6c64980..e156c79 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -90,6 +90,7 @@ struct _egl_resource
 struct _egl_extensions
 {
    /* Please keep these sorted alphabetically. */
+   EGLBoolean ANDROID_framebuffer_target;
    EGLBoolean ANDROID_image_native_buffer;
 
    EGLBoolean CHROMIUM_sync_control;

commit eee00e2c0571d4455374735d6f739fbaa66bf2b2
Author: Rob Herring <robh@kernel.org>
Date:   Tue Feb 2 14:45:07 2016 -0600

    Android: fix x86 gallium builds
    
    Builds with gallium enabled fail on x86 with linker error:
    
    external/mesa3d/src/mesa/vbo/vbo_exec_array.c:127: error: undefined reference to '_mesa_uint_array_min_max'
    
    The problem is sse_minmax.c is not included in the libmesa_st_mesa
    library. Since the SSE4.1 files are needed for both libmesa_st_mesa
    and libmesa_dricore, move SSE4.1 files into a separate static library
    that can be used by both.
    
    Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 2d9e0f24e1a13648a9bceb03dbfb438e03c81fd7)

diff --git a/src/mesa/Android.libmesa_dricore.mk b/src/mesa/Android.libmesa_dricore.mk
index a3e6c6d..d7647a7 100644
--- a/src/mesa/Android.libmesa_dricore.mk
+++ b/src/mesa/Android.libmesa_dricore.mk
@@ -48,9 +48,8 @@ endif # x86
 endif # MESA_ENABLE_ASM
 
 ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
-LOCAL_SRC_FILES += \
-	main/streaming-load-memcpy.c \
-	main/sse_minmax.c
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+	libmesa_sse41
 LOCAL_CFLAGS := \
 	-msse4.1 \
        -DUSE_SSE41
@@ -63,7 +62,7 @@ LOCAL_C_INCLUDES := \
 	$(MESA_TOP)/src/gallium/include \
 	$(MESA_TOP)/src/gallium/auxiliary
 
-LOCAL_WHOLE_STATIC_LIBRARIES := \
+LOCAL_WHOLE_STATIC_LIBRARIES += \
 	libmesa_program
 
 include $(LOCAL_PATH)/Android.gen.mk
diff --git a/src/mesa/Android.libmesa_sse41.mk b/src/mesa/Android.libmesa_sse41.mk
new file mode 100644
index 0000000..8562da6
--- /dev/null
+++ b/src/mesa/Android.libmesa_sse41.mk
@@ -0,0 +1,44 @@
+# Copyright 2012 Intel Corporation
+# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
+# Copyright (C) 2010-2011 LunarG Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(LOCAL_PATH)/Makefile.sources
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_sse41
+
+LOCAL_SRC_FILES += \
+	$(X86_SSE41_FILES)
+
+LOCAL_C_INCLUDES := \
+	$(MESA_TOP)/src/mapi \
+	$(MESA_TOP)/src/gallium/include \
+	$(MESA_TOP)/src/gallium/auxiliary
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+endif
diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/Android.libmesa_st_mesa.mk
index 9fd9460..bbd3956 100644
--- a/src/mesa/Android.libmesa_st_mesa.mk
+++ b/src/mesa/Android.libmesa_st_mesa.mk
@@ -47,6 +47,8 @@ endif # x86
 endif # MESA_ENABLE_ASM
 
 ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+	libmesa_sse41
 LOCAL_CFLAGS := \
        -DUSE_SSE41
 endif
@@ -58,7 +60,7 @@ LOCAL_C_INCLUDES := \
 	$(MESA_TOP)/src/gallium/auxiliary \
 	$(MESA_TOP)/src/gallium/include
 
-LOCAL_WHOLE_STATIC_LIBRARIES := \
+LOCAL_WHOLE_STATIC_LIBRARIES += \
 	libmesa_program
 
 include $(LOCAL_PATH)/Android.gen.mk
diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk
index 20f7819..9a1aef8 100644
--- a/src/mesa/Android.mk
+++ b/src/mesa/Android.mk
@@ -24,5 +24,6 @@ include $(LOCAL_PATH)/Android.mesa_gen_matypes.mk
 include $(LOCAL_PATH)/Android.libmesa_glsl_utils.mk
 include $(LOCAL_PATH)/Android.libmesa_dricore.mk
 include $(LOCAL_PATH)/Android.libmesa_st_mesa.mk
+include $(LOCAL_PATH)/Android.libmesa_sse41.mk
 
 include $(LOCAL_PATH)/program/Android.mk
diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
index a6c12c6..48647ad 100644
--- a/src/mesa/Makefile.sources
+++ b/src/mesa/Makefile.sources
@@ -586,6 +586,10 @@ X86_64_FILES =		\
 	x86-64/x86-64.h	\
 	x86-64/xform4.S
 
+X86_SSE41_FILES = \
+	main/streaming-load-memcpy.c \
+	main/sse_minmax.c
+
 SPARC_FILES =			\
 	sparc/sparc.h		\
 	sparc/sparc_clip.S	\

commit e8b521f8241b18c684b2955b75242e9d6db252a6
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Sat Apr 2 17:46:58 2016 -0400

    nv50/ir: we can't load local memory directly into an output
    
    This fixes piglit tests like
    
    tests/spec/glsl-1.10/execution/variable-indexing/vs-output-array-float-index-wr.shader_test
    
    and related ones.
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 3610b1466d573983d80e3019e8e01ebb97d67d9c)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index f56528b..d672b7a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -372,7 +372,8 @@ NV50LegalizeSSA::propagateWriteToOutput(Instruction *st)
       return;
 
    for (int s = 0; di->srcExists(s); ++s)
-      if (di->src(s).getFile() == FILE_IMMEDIATE)
+      if (di->src(s).getFile() == FILE_IMMEDIATE ||
+          di->src(s).getFile() == FILE_MEMORY_LOCAL)
          return;
 
    if (prog->getType() == Program::TYPE_GEOMETRY) {

commit 2c7214bc03b0a0b5ac4256d871dce5527b069726
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon Apr 4 12:24:02 2016 +0100

    Revert "nv50/ir: normalize cube coordinates after derivatives have been computed"
    
    This reverts commit 6eeb284e4f74a2fe5ae6cba90f97f219935e24df.
    
    Requested by Ilia over at mesa-stable
    https://lists.freedesktop.org/archives/mesa-stable/2016-April/003939.html

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 539ad02..d06e9ef 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1989,6 +1989,7 @@ Converter::loadProjTexCoords(Value *dst[4], Value *src[4], unsigned int mask)
 void
 Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy)
 {
+   Value *val;
    Value *arg[4], *src[8];
    Value *lod = NULL, *shd = NULL;
    unsigned int s, c, d;
@@ -2031,6 +2032,17 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy)
          shd = src[n - 1];
    }
 
+   if (tgt.isCube()) {
+      for (c = 0; c < 3; ++c)
+         src[c] = mkOp1v(OP_ABS, TYPE_F32, getSSA(), arg[c]);
+      val = getScratch();
+      mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
+      mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
+      mkOp1(OP_RCP, TYPE_F32, val, val);
+      for (c = 0; c < 3; ++c)
+         src[c] = mkOp2v(OP_MUL, TYPE_F32, getSSA(), arg[c], val);
+   }
+
    for (c = 0, d = 0; c < 4; ++c) {
       if (dst[c]) {
          texi->setDef(d++, dst[c]);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp
index a5deaef..0b90378 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp
@@ -67,7 +67,6 @@ GM107LoweringPass::handleManualTXD(TexInstruction *i)
    tmp = bld.getScratch();
 
    for (l = 0; l < 4; ++l) {
-      Value *src[3], *val;
       // mov coordinates from lane l to all lanes
       bld.mkOp(OP_QUADON, TYPE_NONE, NULL);
       for (c = 0; c < dim; ++c) {
@@ -93,25 +92,10 @@ GM107LoweringPass::handleManualTXD(TexInstruction *i)
          add->lanes = 1; /* abused for .ndv */
       }
 
-      // normalize cube coordinates if necessary
-      if (i->tex.target.isCube()) {
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp1v(OP_ABS, TYPE_F32, bld.getSSA(), crd[c]);
-         val = bld.getScratch();
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
-         bld.mkOp1(OP_RCP, TYPE_F32, val, val);
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp2v(OP_MUL, TYPE_F32, bld.getSSA(), crd[c], val);
-      } else {
-         for (c = 0; c < dim; ++c)
-            src[c] = crd[c];
-      }
-
       // texture
       bld.insert(tex = cloneForward(func, i));
       for (c = 0; c < dim; ++c)
-         tex->setSrc(c + array, src[c]);
+         tex->setSrc(c + array, crd[c]);
       bld.mkOp(OP_QUADPOP, TYPE_NONE, NULL);
 
       // save results
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index b7270df..f56528b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -724,23 +724,6 @@ NV50LoweringPreSSA::handleTEX(TexInstruction *i)
    const int dref = arg;
    const int lod = i->tex.target.isShadow() ? (arg + 1) : arg;
 
-   /* Only normalize in the non-explicit derivatives case.
-    */
-   if (i->tex.target.isCube() && i->op != OP_TXD) {
-      Value *src[3], *val;
-      int c;
-      for (c = 0; c < 3; ++c)
-         src[c] = bld.mkOp1v(OP_ABS, TYPE_F32, bld.getSSA(), i->getSrc(c));
-      val = bld.getScratch();
-      bld.mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
-      bld.mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
-      bld.mkOp1(OP_RCP, TYPE_F32, val, val);
-      for (c = 0; c < 3; ++c) {
-         i->setSrc(c, bld.mkOp2v(OP_MUL, TYPE_F32, bld.getSSA(),
-                                 i->getSrc(c), val));
-      }
-   }
-
    // handle MS, which means looking up the MS params for this texture, and
    // adjusting the input coordinates to point at the right sample.
    if (i->tex.target.isMS()) {
@@ -958,7 +941,6 @@ NV50LoweringPreSSA::handleTXD(TexInstruction *i)
 
    bld.mkOp(OP_QUADON, TYPE_NONE, NULL);
    for (l = 0; l < 4; ++l) {
-      Value *src[3], *val;
       // mov coordinates from lane l to all lanes
       for (c = 0; c < dim; ++c)
          bld.mkQuadop(0x00, crd[c], l, i->getSrc(c), zero);
@@ -968,24 +950,10 @@ NV50LoweringPreSSA::handleTXD(TexInstruction *i)
       // add dPdy from lane l to lanes dy
       for (c = 0; c < dim; ++c)
          bld.mkQuadop(qOps[l][1], crd[c], l, i->dPdy[c].get(), crd[c]);
-      // normalize cube coordinates if necessary
-      if (i->tex.target.isCube()) {
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp1v(OP_ABS, TYPE_F32, bld.getSSA(), crd[c]);
-         val = bld.getScratch();
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
-         bld.mkOp1(OP_RCP, TYPE_F32, val, val);
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp2v(OP_MUL, TYPE_F32, bld.getSSA(), crd[c], val);
-      } else {
-         for (c = 0; c < dim; ++c)
-            src[c] = crd[c];
-      }
       // texture
       bld.insert(tex = cloneForward(func, i));
       for (c = 0; c < dim; ++c)
-         tex->setSrc(c, src[c]);
+         tex->setSrc(c, crd[c]);
       // save results
       for (c = 0; i->defExists(c); ++c) {
          Instruction *mov;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index 50454cb..8da599e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -615,24 +615,6 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
    const int lyr = arg - (i->tex.target.isMS() ? 2 : 1);
    const int chipset = prog->getTarget()->getChipset();
 
-   /* Only normalize in the non-explicit derivatives case. For explicit
-    * derivatives, this is handled in handleManualTXD.
-    */
-   if (i->tex.target.isCube() && i->dPdx[0].get() == NULL) {
-      Value *src[3], *val;
-      int c;
-      for (c = 0; c < 3; ++c)
-         src[c] = bld.mkOp1v(OP_ABS, TYPE_F32, bld.getSSA(), i->getSrc(c));
-      val = bld.getScratch();
-      bld.mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
-      bld.mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
-      bld.mkOp1(OP_RCP, TYPE_F32, val, val);
-      for (c = 0; c < 3; ++c) {
-         i->setSrc(c, bld.mkOp2v(OP_MUL, TYPE_F32, bld.getSSA(),
-                                 i->getSrc(c), val));
-      }
-   }
-
    // Arguments to the TEX instruction are a little insane. Even though the
    // encoding is identical between SM20 and SM30, the arguments mean
    // different things between Fermi and Kepler+. A lot of arguments are
@@ -893,7 +875,6 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
 
    bld.mkOp(OP_QUADON, TYPE_NONE, NULL);
    for (l = 0; l < 4; ++l) {
-      Value *src[3], *val;
       // mov coordinates from lane l to all lanes
       for (c = 0; c < dim; ++c)
          bld.mkQuadop(0x00, crd[c], l, i->getSrc(c + array), zero);
@@ -903,24 +884,10 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
       // add dPdy from lane l to lanes dy
       for (c = 0; c < dim; ++c)
          bld.mkQuadop(qOps[l][1], crd[c], l, i->dPdy[c].get(), crd[c]);
-      // normalize cube coordinates
-      if (i->tex.target.isCube()) {
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp1v(OP_ABS, TYPE_F32, bld.getSSA(), crd[c]);
-         val = bld.getScratch();
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[0], src[1]);
-         bld.mkOp2(OP_MAX, TYPE_F32, val, src[2], val);
-         bld.mkOp1(OP_RCP, TYPE_F32, val, val);
-         for (c = 0; c < 3; ++c)
-            src[c] = bld.mkOp2v(OP_MUL, TYPE_F32, bld.getSSA(), crd[c], val);
-      } else {
-         for (c = 0; c < dim; ++c)
-            src[c] = crd[c];
-      }
       // texture
       bld.insert(tex = cloneForward(func, i));
       for (c = 0; c < dim; ++c)
-         tex->setSrc(c + array, src[c]);
+         tex->setSrc(c + array, crd[c]);
       // save results
       for (c = 0; i->defExists(c); ++c) {
          Instruction *mov;


Reply to: