OSDN Git Service

android-x86/external-mesa.git
8 years agonv50/ir: fix DCE to not generate 96-bit loads
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: fix DCE to not generate 96-bit loads

A situation where there's a 128-bit load where the last component gets
DCE'd causes a 96-bit load to be generated, which no GPU can actually
emit. Avoid generating such instructions by scaling back to 64-bit on
the first load when splitting.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 49692f86a1b77fac4634d2a3f0502ec7451c3435)

8 years agoradeonsi: fix Fiji for LLVM <= 3.7
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix Fiji for LLVM <= 3.7

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit dd27825c8cf0e7b55ebaa139e299f275943d22f6)

8 years agoi965: use _Shader to get fragment program when updating surface state
Tapani Pälli [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: use _Shader to get fragment program when updating surface state

Atomic counters and Images were using ctx::Shader that does not take in
to account program pipeline changes, ctx::_Shader must be used for SSO to
work. Commit c0347705 already changed ubo's to use this.

Fixes failures seen with following Piglit test:
arb_separate_shader_object-atomic-counter

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 231db5869c2c0f32608f39100bffff569da21bea)

8 years agonv50/ir: don't forget to mark flagsDef on cvt in txb lowering
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: don't forget to mark flagsDef on cvt in txb lowering

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 101e315cc167b0b00319aa70f64c49470e2525f8)

8 years agonv50/ir: fix instruction permutation logic
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: fix instruction permutation logic

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 06055121e6386bc74e4558a86ef690eae9556482)

8 years agonv50/ir: the mad source might not have a defining instruction
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: the mad source might not have a defining instruction

For example if it's $r63 (aka 0), there won't be a definition.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 11fcf46590129abfa2ca2117a320e8a8052761e4)

8 years agonv50/ir: deal with loops with no breaks
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: deal with loops with no breaks

For example if there are only returns, the break bb will not end up part
of the CFG. However there will have been a prebreak already emitted for
it, and when hitting the RET that comes after, we will try to insert the
current (i.e. break) BB into the graph even though it will be
unreachable. This makes the SSA code sad.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit adcc547bfbef362067bb3b4e3aee75b287bc6189)

8 years agonvc0/ir: fold postfactor into immediate
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nvc0/ir: fold postfactor into immediate

SM20-SM50 can't emit a post-factor in the presence of a long immediate.
Make sure to fold it in.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ff61ac48387d3f42ede50a572c11f404f4cd3abb)

8 years agor600: SMX returns CONTEXT_DONE early workaround
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600: SMX returns CONTEXT_DONE early workaround

streamout, gs rings bug on certain r600s, requires a wait idle
before each surface sync.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit af4013d26b3203a794ae34fe0c98139bc1058273)
[Emil Velikov: s/radeon_set_config_reg/r600_write_config_reg/g ]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600: do SQ flush ES ring rolling workaround
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600: do SQ flush ES ring rolling workaround

Need to insert a SQ_NON_EVENT when ever geometry
shaders are enabled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b63944e8b9177d231b3789bf84ea9e67b9629905)

8 years agoi965: Fix scalar vertex shader struct outputs.
Kenneth Graunke [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Fix scalar vertex shader struct outputs.

While we correctly set output[] for composite varyings, we set completely
bogus values for output_components[], making emit_urb_writes() output
zeros instead of the actual values.

Unfortunately, our simple approach goes out the window, and we need to
recurse into structs to get the proper value of vector_elements for each
field.

Together with the previous patch, this fixes rendering in an upcoming
game from Feral Interactive.

v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 3810c1561401aba336765d64d1a5a3e44eb58eb3)

8 years agoi965: Fix fragment shader struct inputs.
Kenneth Graunke [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Fix fragment shader struct inputs.

Apparently we have literally no support for FS varying struct inputs.
This is somewhat surprising, given that we've had tests for that very
feature that have been passing for a long time.

Normally, varying packing splits up structures for us, so we don't see
them in the backend.  However, with SSO, varying packing isn't around
to save us, and we get actual structs that we have to handle.

This patch changes fs_visitor::emit_general_interpolation() to work
recursively, properly handling nested structs/arrays/and so on.
(It's easier to read with diff -b, as indentation changes.)

When using the vec4 VS backend, this fixes rendering in an upcoming
game from Feral Interactive.  (The scalar VS backend requires additional
bug fixes in the next patch.)

v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 3e9003e9cf55265ab1fb6522dc5cbb2f455ea1f9)

8 years agoradeonsi: fix a hang due to uninitialized border color registers
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix a hang due to uninitialized border color registers

Just point the hw to valid memory.

This fixes hangs in piglit/depthstencil-render-miplevel tests.
What's even more bizzare is that the hanging tests report "skip".

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: fix occlusion queries on Fiji
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix occlusion queries on Fiji

Tested.

(cherry picked from commit bfc14796b077444011c81f544ceec5d8592c5c77)

8 years agoradeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values
Tom Stellard [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values

The compiler has more information and is able to optimize the bits
it sets in these registers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 89851a296536b89364fe6104d13330975788f960)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_compute.c

8 years agoradeonsi: Rename si_shader::ls_rsrc{1,2} to si_shader::rsrc{1,2}
Tom Stellard [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: Rename si_shader::ls_rsrc{1,2} to si_shader::rsrc{1,2}

In the future, these will be used by other shaders types.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 95e051091676584fd7bfba9d0316c3747bf17f35)
[Emil Velikov: squash trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_state_draw.c
src/gallium/drivers/radeonsi/si_state_shaders.c

8 years agofreedreno/a4xx: point regid to "red" even for alpha-only rb formats
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: point regid to "red" even for alpha-only rb formats

Looks like a4xx hw does this in a more standard way and we don't need to
hack around it like we do on a3xx. Fixes GL_ALPHA formats in
fbo-blending-formats, fbo-colormask-formats, and fbo-alphatest-formats.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit ff9450ecd1f7635f8917e3177f0ef18eb8f9f49b)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/freedreno/a4xx/fd4_program.c

8 years agofreedreno/a4xx: fix 5_5_5_1 texture sampler format
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: fix 5_5_5_1 texture sampler format

This fixes teximage-colors, fbo-generatemipmap-formats, and probably
others (in relation to the RGB5 formats, others still fail).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 769b3ab6c5111f50502f9df0e8930c8d13f475c7)

8 years agofreedreno/a4xx: support lod_bias
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: support lod_bias

The lower layers assume that we support this, and it's been core since
GL 1.4. This fixes a slew of piglit tests, especially around
tex-miplevel-selection.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 0a4462ad6ee921ed805ad51e330b819b95ee90d6)

8 years agodocs: add sha256 checksums for 11.0.7
Emil Velikov [Wed, 9 Dec 2015 16:09:37 +0000 (16:09 +0000)]
docs: add sha256 checksums for 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add release notes for 11.0.7
Emil Velikov [Wed, 9 Dec 2015 15:19:30 +0000 (15:19 +0000)]
docs: add release notes for 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoUpdate version to 11.0.7
Emil Velikov [Wed, 9 Dec 2015 15:13:37 +0000 (15:13 +0000)]
Update version to 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agomesa; add get-extra-pick-list.sh script into bin/
Emil Velikov [Wed, 2 Sep 2015 16:36:22 +0000 (17:36 +0100)]
mesa; add get-extra-pick-list.sh script into bin/

This is a very rudimentary script that checks if any of the applied
cherry-picks have been referenced (fixed?) by another patch. With the
latter either missing the stable tag or hasn't yet been picked.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonvc0/ir: start offset at texBindBase for txq, like regular texturing
Ilia Mirkin [Fri, 11 Sep 2015 03:58:17 +0000 (23:58 -0400)]
nvc0/ir: start offset at texBindBase for txq, like regular texturing

Curiously this has no actual effect. I think it's because the first 8
textures are bound in multiple slots for some reason. However seems
prudent to use these the same way as regular texturing, esp in the case
where there are more than 8 textures bound.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 5877a594d54fdd2b3aa329f4d35b3491a7ee8a33)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93110

8 years agoradeon/vce: disable Stoney VCE for 11.0
Leo Liu [Fri, 20 Nov 2015 17:07:52 +0000 (12:07 -0500)]
radeon/vce: disable Stoney VCE for 11.0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoxmlconfig: Add support for DragonFly
François Tigeot [Tue, 17 Nov 2015 17:54:01 +0000 (18:54 +0100)]
xmlconfig: Add support for DragonFly

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 8a94ba5e0cb738c6b1a817ea54afc5816d2bb596)

8 years agoegl/wayland: Ignore rects from SwapBuffersWithDamage
Daniel Stone [Sat, 7 Nov 2015 18:25:31 +0000 (18:25 +0000)]
egl/wayland: Ignore rects from SwapBuffersWithDamage

eglSwapBuffersWithDamage accepts damage-region rectangles to hint the
compositor that it only needs to redraw certain areas, which was passed
through the wl_surface_damage request, as designed.

Wayland also offers a buffer transformation interface, e.g. to allow
users to render pre-rotated buffers. Unfortunately, there is no way to
query buffer transforms, and the damage region was provided in surface,
rather than buffer, co-ordinate space.

Users could in theory account for this themselves, but EGL also requires
co-ordinates to be passed in GL/mathematical co-ordinate space, with an
inversion to Wayland's natural/scanout co-ordinate space, so
transformations other than a 180-degree rotation will fail as EGL
attempts to subtract the region from (its view of the) surface height.

Pending creation and acceptance of a wl_surface.buffer_damage request,
which will accept co-ordinates in buffer co-ordinate space, pessimise to
always sending full-surface damage.

bce64c6c provides the explanation for why we send maximum-range damage,
rather than the full size of the surface: in the presence of buffer
transformations, full-surface damage may not actually cover the entire
surface.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit d1314de293e9e4a63c35f094c3893aaaed8580b4)

8 years agoautomake: fix some occurrences of hardcoded -ldl and -lpthread
Jonathan Gray [Mon, 23 Nov 2015 03:22:24 +0000 (14:22 +1100)]
automake: fix some occurrences of hardcoded -ldl and -lpthread

Correct some occurrences of -ldl and -lpthread to use
$(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 99cd60083518ad4465e3e29996168e8fa8a89fbb)
[Emil Velikov: drop the unneeded i965 hunk]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600: workaround empty geom shader.
Dave Airlie [Tue, 24 Feb 2015 04:09:40 +0000 (14:09 +1000)]
r600: workaround empty geom shader.

We need to emit at least one cut/emit in every
geometry shader, the easiest workaround it to
stick a single CUT at the top of each geom shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 4f347225752b48f3dc5a59a6be71fe78616252a7)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/r600/r600_shader.c

8 years agor600: rv670 use at least 16es/gs threads
Dave Airlie [Tue, 24 Feb 2015 06:30:05 +0000 (16:30 +1000)]
r600: rv670 use at least 16es/gs threads

This is specified in the docs for rv670 to work properly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 04efcc6c7adfda75b425f443588f0faab453ba3a)

8 years agor600: geometry shader gsvs itemsize workaround
Dave Airlie [Wed, 18 Feb 2015 23:51:19 +0000 (23:51 +0000)]
r600: geometry shader gsvs itemsize workaround

On some chips the GSVS itemsize needs to be aligned to a cacheline size.

This only applies to some of the r600 family chips.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8168dfdd4e63457bd8a9ef04a5d49a1f2e202ab8)

8 years agogles2: Update gl2ext.h to revision: 32120
Marta Lofstedt [Fri, 27 Nov 2015 14:31:05 +0000 (15:31 +0100)]
gles2: Update gl2ext.h to revision: 32120

This is needed to be able to implement the accepted OES
extensions.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 1d5b88e33b07bc26d612720e6cb197a6917ba75f)

8 years agomesa: support GL_RED/GL_RG in ES2 contexts when driver support exists
Ilia Mirkin [Thu, 26 Nov 2015 15:32:57 +0000 (10:32 -0500)]
mesa: support GL_RED/GL_RG in ES2 contexts when driver support exists

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93126
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 0396eaaf80c5d7955d7926c4e448f006c7682d2e)

8 years agotexgetimage: consolidate 1D array handling code.
Dave Airlie [Wed, 11 Nov 2015 02:33:38 +0000 (12:33 +1000)]
texgetimage: consolidate 1D array handling code.

This should fix the getteximage-depth test that currently asserts.

I was hitting problem with virgl as well in this area.

This moves the 1D array handling code to a single place.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 237bcdbab529237a120e225c63f567934a955523)

8 years agonv50/ir: fix (un)spilling of 3-wide results
Ilia Mirkin [Sat, 18 Apr 2015 19:00:45 +0000 (15:00 -0400)]
nv50/ir: fix (un)spilling of 3-wide results

There is no 96-bit load/store operations, so we have to split it up
into a 32-bit parts, with a split/merge around it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90348
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4deb118d06e96731f3481daa72c201d7258bfbbb)

8 years agonv50,nvc0: properly handle buffer storage invalidation on dsa buffer
Ilia Mirkin [Mon, 23 Nov 2015 02:08:16 +0000 (21:08 -0500)]
nv50,nvc0: properly handle buffer storage invalidation on dsa buffer

In case that the buffer has no bind at all, assume it can be a regular
buffer. This can happen on buffers created through the ARB_dsa
interfaces.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ad5f6b03e793b9390e3b9f3eca68bd43f9d809eb)

8 years agonouveau: use the buffer usage to determine placement when no binding
Ilia Mirkin [Mon, 23 Nov 2015 01:58:56 +0000 (20:58 -0500)]
nouveau: use the buffer usage to determine placement when no binding

With ARB_direct_state_access, buffers can be created without any binding
hints at all. We still need to allocate these buffers to VRAM or GART,
as we don't have logic down the line to place them into GPU-mappable
space. Ideally we'd be able to shift these things around based on usage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92438
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 079f713754a9e5d7802b655d54320bd37f24fbfa)

8 years agoglsl: Fix off-by-one error in array size check assertion
Ian Romanick [Wed, 18 Nov 2015 02:35:00 +0000 (18:35 -0800)]
glsl: Fix off-by-one error in array size check assertion

Apparently, this has been a bug since 2010 (c30f6e5d).

Also use ARRAY_SIZE instead of open coding it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 2f554761536bbfd0d8ec22e807c18bd6df0f22b8)

8 years agonir: fix typo in idiv lowering, causing large-udiv-udiv failures
Ilia Mirkin [Sun, 8 Nov 2015 18:43:07 +0000 (13:43 -0500)]
nir: fix typo in idiv lowering, causing large-udiv-udiv failures

In nv50, and in the python script that Rob circulated, we do:

   bld.mkCmp(OP_SET, CC_GE, TYPE_U32, (s = bld.getSSA()), TYPE_U32, m, b);

Do the same in the nir div lowering pass. This fixes the large-udiv-udiv
piglit tests on freedreno.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Clark <robclark@freedesktop.org>
(cherry picked from commit b40e144a665142957a7ae027238e61fd01a27ebc)

8 years agollvmpipe: disable VSX in ppc due to LLVM PPC bug
Oded Gabbay [Tue, 17 Nov 2015 14:16:46 +0000 (16:16 +0200)]
llvmpipe: disable VSX in ppc due to LLVM PPC bug

This patch disables the use of VSX instructions, as they cause some
piglit tests to fail

For more details, see: https://llvm.org/bugs/show_bug.cgi?id=25503#c7

With this patch, ppc64le reaches parity with x86-64 as far as piglit test
suite is concerned.

v2:
- Added check that we have at least LLVM 3.4
- Added the LLVM bug URL as a comment in the code

v3:

- Only disable VSX if Altivec is supported, because if Altivec support
is missing, then VSX support doesn't exist anyway.

- Change original patch description.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 4581f8428e0e1d2f6787d0765823c7883bd2cfcd)

8 years agonvc0/ir: actually emit AFETCH on kepler
Ilia Mirkin [Wed, 18 Nov 2015 19:23:35 +0000 (14:23 -0500)]
nvc0/ir: actually emit AFETCH on kepler

Looks like this was forgotten in the commit which added the AFETCH
logic.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8e68113c1a78c48f26e820f4beb2dda9e4b99f32)

8 years agometa/generate_mipmap: Don't leak the framebuffer object
Ian Romanick [Sat, 14 Nov 2015 00:09:37 +0000 (16:09 -0800)]
meta/generate_mipmap: Don't leak the framebuffer object

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 72e232374eda780a5dcd374b55d203d0e2a6d02b)

8 years agoget-pick-list.sh: Require explicit "11.0" for nominating stable patches
Emil Velikov [Thu, 3 Dec 2015 15:17:32 +0000 (15:17 +0000)]
get-pick-list.sh: Require explicit "11.0" for nominating stable patches

A nomination unadorned with a specific version is now interpreted as
being aimed at the 11,0 branch, which was recently opened.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agometa/TexSubImage: Don't pollute the buffer object namespace
Ian Romanick [Mon, 9 Nov 2015 21:11:02 +0000 (13:11 -0800)]
meta/TexSubImage: Don't pollute the buffer object namespace

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 58aa56d40bfc6ba54ad9172bf219d18eeb615a80)

8 years agometa: Don't pollute the buffer object namespace in _mesa_meta_DrawTex
Ian Romanick [Thu, 5 Nov 2015 22:44:26 +0000 (14:44 -0800)]
meta: Don't pollute the buffer object namespace in _mesa_meta_DrawTex

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 76cfe2bc4436186fd585be96c4f402c1b1c79bdf)

8 years agometa: Use internal functions for buffer object and VAO access in _mesa_meta_DrawTex
Ian Romanick [Thu, 5 Nov 2015 22:42:07 +0000 (14:42 -0800)]
meta: Use internal functions for buffer object and VAO access in _mesa_meta_DrawTex

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit a222d4cbc3de49857aebbdf727e53c273abcc6c1)

8 years agometa: Track VBO using gl_buffer_object instead of GL API object handle in _mesa_meta_...
Ian Romanick [Thu, 5 Nov 2015 22:31:23 +0000 (14:31 -0800)]
meta: Track VBO using gl_buffer_object instead of GL API object handle in _mesa_meta_DrawTex

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit b8a7369fb7e5773892d01fcb1140fe6569ee27eb)

8 years agometa: Partially convert _mesa_meta_DrawTex to DSA
Ian Romanick [Thu, 5 Nov 2015 22:16:31 +0000 (14:16 -0800)]
meta: Partially convert _mesa_meta_DrawTex to DSA

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit d5225ee5d92f00958c54b425fe829c811149e889)

8 years agometa: Don't pollute the buffer object namespace in _mesa_meta_setup_vertex_objects
Ian Romanick [Wed, 4 Nov 2015 01:41:16 +0000 (17:41 -0800)]
meta: Don't pollute the buffer object namespace in _mesa_meta_setup_vertex_objects

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 37d11b13ce1db2ad867ff5433cb31bcd1d93c7bf)

8 years agometa: Use internal functions for buffer object and VAO access
Ian Romanick [Wed, 4 Nov 2015 00:47:22 +0000 (16:47 -0800)]
meta: Use internal functions for buffer object and VAO access

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit b1b73a42c8f245d5bf6bbed04071b2c6519b2fb4)

8 years agometa: Use DSA functions for VBOs in _mesa_meta_setup_vertex_objects
Ian Romanick [Tue, 3 Nov 2015 23:55:14 +0000 (15:55 -0800)]
meta: Use DSA functions for VBOs in _mesa_meta_setup_vertex_objects

The fixed-function attribute paths don't get the DSA treatment because
there are no DSA entry-points for fixed-function attributes.  These
could have been added, but this is a temporary patch intended to make
later patches easier to review.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 52921f8e089abbc6871060fc50f90b62aaf1e11b)

8 years agometa: Track VBO using gl_buffer_object instead of GL API object handle
Ian Romanick [Tue, 3 Nov 2015 23:37:40 +0000 (15:37 -0800)]
meta: Track VBO using gl_buffer_object instead of GL API object handle

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 1035e00a815f0babddac0c6c43d01fd34f7e8a94)

8 years agometa: Don't leave the VBO bound after _mesa_meta_setup_vertex_objects
Ian Romanick [Tue, 3 Nov 2015 04:11:02 +0000 (20:11 -0800)]
meta: Don't leave the VBO bound after _mesa_meta_setup_vertex_objects

Meta currently does this, but future changes will make this impossible.
Explicitly do it as a step in the patch series now to catch any possible
kinks.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 3b5a7d450dea9bfadf1d72338f4418c87340805b)

8 years agoi965: Use _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objects
Ian Romanick [Tue, 3 Nov 2015 03:10:08 +0000 (19:10 -0800)]
i965: Use _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objects

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit ed0bd6573b6ce83471e73d009dbab5220f9e80c0)

8 years agometa: Use _mesa_NamedBufferData and _mesa_NamedBufferSubData for users of _mesa_meta_...
Ian Romanick [Tue, 3 Nov 2015 02:36:34 +0000 (18:36 -0800)]
meta: Use _mesa_NamedBufferData and _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objects

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 7f2f3000716d994d94c53f4a0c8a211fb00a46a4)

8 years agometa: Use DSA functions for PBO in create_texture_for_pbo
Ian Romanick [Tue, 3 Nov 2015 02:33:54 +0000 (18:33 -0800)]
meta: Use DSA functions for PBO in create_texture_for_pbo

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 89a61afdd7346d6e36caccc4d6f2a2607dc4a1f6)

8 years agoi965: Don't pollute the buffer object namespace in brw_meta_fast_clear
Ian Romanick [Tue, 3 Nov 2015 01:04:41 +0000 (17:04 -0800)]
i965: Don't pollute the buffer object namespace in brw_meta_fast_clear

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 4e6b9c11fc545cc570ea0042af93e61bfb525d34)

8 years agoi965: Use internal functions for buffer object access
Ian Romanick [Mon, 2 Nov 2015 22:49:03 +0000 (14:49 -0800)]
i965: Use internal functions for buffer object access

Instead of going through the GL API implementation functions, use the
lower-level functions.  This means that we have to keep track of a
pointer to the gl_buffer_object and the gl_vertex_array_object.

This has two advantages.  First, it avoids a bunch of CPU overhead in
looking up objects and validing API parameters.  Second, and much more
importantly, it will allow us to stop calling _mesa_GenBuffers /
_mesa_CreateBuffers and pollute the buffer namespace (next patch).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit e62799bd4e7b7525995e465a4bdcf6df0b0a69a0)

8 years agoi965: Use DSA functions for VBOs in brw_meta_fast_clear
Ian Romanick [Mon, 2 Nov 2015 22:31:56 +0000 (14:31 -0800)]
i965: Use DSA functions for VBOs in brw_meta_fast_clear

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 1c5423d3a074d50138e5ad7945024f9cf4d063ec)

8 years agoi965: Pass brw_context instead of gl_context to brw_draw_rectlist
Ian Romanick [Mon, 2 Nov 2015 20:41:28 +0000 (12:41 -0800)]
i965: Pass brw_context instead of gl_context to brw_draw_rectlist

Future patches will use the brw_context instead.  Keeping this
non-functional change separate should make the function changes easier
to review.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit dcadd855f14b0d3dcce04a16afdfed2d7159d4a8)

8 years agomesa: Refactor enable_vertex_array_attrib to make _mesa_enable_vertex_array_attrib
Ian Romanick [Wed, 4 Nov 2015 00:16:00 +0000 (16:16 -0800)]
mesa: Refactor enable_vertex_array_attrib to make _mesa_enable_vertex_array_attrib

Pulls the parts of enable_vertex_array_attrib that aren't just parameter
validation out into a function that can be called from other parts of
Mesa (e.g., meta).

_mesa_enable_vertex_array_attrib can also be used to enable
fixed-function arrays.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 4a644f1caadc6b3e26b5f0ac60ac855152e38e59)

8 years agomesa: Refactor update_array_format to make _mesa_update_array_format_public
Ian Romanick [Wed, 4 Nov 2015 00:09:22 +0000 (16:09 -0800)]
mesa: Refactor update_array_format to make _mesa_update_array_format_public

Pulls the parts of update_array_format that aren't just parameter
validation out into a function that can be called from other parts of
Mesa (e.g., meta).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit a336fcd36a4743c1ea6f8549cb31b48277359717)

8 years agomesa: Make bind_vertex_buffer avilable outside varray.c
Ian Romanick [Mon, 2 Nov 2015 20:40:32 +0000 (12:40 -0800)]
mesa: Make bind_vertex_buffer avilable outside varray.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 8fae494df2813bfa38f1aabd6c9b3c1ba3a5e4ef)

8 years agometa: Compute correct buffer size with SkipRows/SkipPixels
Chris Wilson [Tue, 1 Sep 2015 08:31:15 +0000 (09:31 +0100)]
meta: Compute correct buffer size with SkipRows/SkipPixels

If the user is specifying a subregion of a buffer using SKIP_ROWS and
SKIP_PIXELS, we must compute the buffer size carefully as the end of the
last row may be much shorter than stride*image_height*depth. The current
code tries to memcpy from beyond the end of the user data, for example
causing:

==28136== Invalid read of size 8
==28136==    at 0x4C2D94E: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915)
==28136==    by 0xB4ADFE3: brw_bo_write (brw_batch.c:1856)
==28136==    by 0xB5B3531: brw_buffer_data (intel_buffer_objects.c:208)
==28136==    by 0xB0F6275: _mesa_buffer_data (bufferobj.c:1600)
==28136==    by 0xB0F6346: _mesa_BufferData (bufferobj.c:1631)
==28136==    by 0xB37A1EE: create_texture_for_pbo (meta_tex_subimage.c:103)
==28136==    by 0xB37A467: _mesa_meta_pbo_TexSubImage (meta_tex_subimage.c:176)
==28136==    by 0xB5C8D61: intelTexSubImage (intel_tex_subimage.c:195)
==28136==    by 0xB254AB4: _mesa_texture_sub_image (teximage.c:3654)
==28136==    by 0xB254C9F: texsubimage (teximage.c:3712)
==28136==    by 0xB2550E9: _mesa_TexSubImage2D (teximage.c:3853)
==28136==    by 0x401CA0: UploadTexSubImage2D (teximage.c:171)
==28136==  Address 0xd8bfbe0 is 0 bytes after a block of size 1,024 alloc'd
==28136==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==28136==    by 0x402014: PerfDraw (teximage.c:270)
==28136==    by 0x402648: Draw (glmain.c:182)
==28136==    by 0x8385E63: ??? (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x83896C8: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x838641C: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x8386C1C: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x4019C1: main (glmain.c:262)
==28136==
==28136== Invalid read of size 8
==28136==    at 0x4C2D940: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915)
==28136==    by 0xB4ADFE3: brw_bo_write (brw_batch.c:1856)
==28136==    by 0xB5B3531: brw_buffer_data (intel_buffer_objects.c:208)
==28136==    by 0xB0F6275: _mesa_buffer_data (bufferobj.c:1600)
==28136==    by 0xB0F6346: _mesa_BufferData (bufferobj.c:1631)
==28136==    by 0xB37A1EE: create_texture_for_pbo (meta_tex_subimage.c:103)
==28136==    by 0xB37A467: _mesa_meta_pbo_TexSubImage (meta_tex_subimage.c:176)
==28136==    by 0xB5C8D61: intelTexSubImage (intel_tex_subimage.c:195)
==28136==    by 0xB254AB4: _mesa_texture_sub_image (teximage.c:3654)
==28136==    by 0xB254C9F: texsubimage (teximage.c:3712)
==28136==    by 0xB2550E9: _mesa_TexSubImage2D (teximage.c:3853)
==28136==    by 0x401CA0: UploadTexSubImage2D (teximage.c:171)
==28136==  Address 0xd8bfbe8 is 8 bytes after a block of size 1,024 alloc'd
==28136==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==28136==    by 0x402014: PerfDraw (teximage.c:270)
==28136==    by 0x402648: Draw (glmain.c:182)
==28136==    by 0x8385E63: ??? (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x83896C8: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x838641C: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x8386C1C: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0)
==28136==    by 0x4019C1: main (glmain.c:262)
==28136==

Fixes regression from commit 7f396189f073d626c5f7a2c232dac92b65f5a23f
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Mon Jan 5 18:17:04 2015 -0800

    meta: Add a BlitFramebuffers-based implementation of TexSubImage

v2: However, the teximage we create does need to be width x full_height x 1

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: Neil Roberts <neil@linux.intel.com>
Reviewed-by Neil Roberts <neil@linux.intel.com>

(cherry picked from commit f30cf3258e495a583e011e07d5b4a19031c5518f)

8 years agodocs: add sha256 checksums for 11.0.6
Emil Velikov [Sat, 21 Nov 2015 12:40:06 +0000 (12:40 +0000)]
docs: add sha256 checksums for 11.0.6

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add release notes for 11.0.6
Emil Velikov [Sat, 21 Nov 2015 11:38:20 +0000 (11:38 +0000)]
docs: add release notes for 11.0.6

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoUpdate version to 11.0.6
Emil Velikov [Sat, 21 Nov 2015 11:29:18 +0000 (11:29 +0000)]
Update version to 11.0.6

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: use static llvm for make distcheck
Emil Velikov [Fri, 20 Nov 2015 15:15:18 +0000 (15:15 +0000)]
automake: use static llvm for make distcheck

With llvm 3.7 semi-dropping the autoconf build, we rely on their cmake
build. With the latter of which annoyingly using another (busted?)
SONAME.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit c45b4257c26b93043508e55c6a1aeb3a8b14eee9)

8 years agollvmpipe: use simple coeffs calc for 128bit vectors
Oded Gabbay [Tue, 3 Nov 2015 08:36:01 +0000 (10:36 +0200)]
llvmpipe: use simple coeffs calc for 128bit vectors

There are currently two methods in llvmpipe code to calculate coeffs to
be used as inputs for the fragment shader. The two methods use slightly
different ways to do the floating point calculations and thus produce
slightly different results.

The decision which method to use is determined by the size of the vector
that is used by the platform.

For vectors with size of more than 128bit, a single-step method is used,
in which coeffs_init_simple() + attribs_update_simple() are called.

For vectors with size of 128bit or less, a two-step method is used, in
which coeffs_init() + attribs_update() are called.

This causes some piglit tests (clip-distance-bulk-copy,
interface-vs-unnamed-to-fs-unnamed) to fail when using platforms with
128bit vectors (such as ppc64le or x86-64 without AVX).

This patch makes platforms with 128bit vectors use the single-step
method (aka "simple" method) instead of the two-step method.
This would make the resulting coeffs identical between more platforms,
make sure the piglit tests passes, and make debugging and maintainability
a bit easier as the generated LLVM IR will be the same for more platforms.

The performance impact is negligible for x86-64 without AVX, and
basically non-existent for ppc64le, as it can be seen from the following
benchmarking results:

- glxspheres, on ppc64le:

   - original code:  4.892745317 frames/sec 5.460303857 Mpixels/sec
   - with the patch: 4.932083873 frames/sec 5.504205571 Mpixels/sec
   - Additional 0.8% performance boost

- glxspheres, on x86-64 without AVX:

   - original code:  20.16418809 frames/sec 22.50323395 Mpixels/sec
   - with the patch: 20.31328989 frames/sec 22.66963152 Mpixels/sec
   - Additional 0.74% performance boost

- glmark2, on ppc64le:

  - original code:  score of 58
  - with my change: score of 57

- glmark2, on x86-64 without AVX:

  - original code:  score of 175
  - with the patch: score of 167
  - Impact of of -4.5% on performance

- OpenArena, on ppc64le:

  - original code:  3398 frames 1719.0 seconds 2.0 fps
                    255.0/505.9/2773.0/0.0 ms

  - with the patch: 3398 frames 1690.4 seconds 2.0 fps
                    241.0/497.5/2563.0/0.2 ms

  - 29 seconds faster with the patch, which is about 2%

- OpenArena, on x86-64 without AVX:

  - original code:  3398 frames 239.6 seconds 14.2 fps
                    38.0/70.5/719.0/14.6 ms

  - with the patch: 3398 frames 244.4 seconds 13.9 fps
                    38.0/71.9/697.0/14.3 ms

  - 0.3 fps slower with the patch (about 2%)

Additional details can be found at:
http://lists.freedesktop.org/archives/mesa-dev/2015-October/098635.html

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 39b4dfe6ab1003863778a25c091c080e098833ec)

8 years agovc4: Add support for nir_op_uge, using the carry bit on QPU_A_SUB.
Eric Anholt [Tue, 10 Nov 2015 23:37:47 +0000 (15:37 -0800)]
vc4: Add support for nir_op_uge, using the carry bit on QPU_A_SUB.

It looks like nir_lower_idiv is going to use it soon, so add support.
With Ilia's change, this fixes one case in fs-op-div-large-uint-uint (with
GL 3.0 forced on).

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a4bf28178f064082d3b818d2cd48abf9075cc459)
[Emil Velikov: Resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/gallium/drivers/vc4/vc4_qpu_emit.c

8 years agor200: fix bgrx8/xrgb8 blits
Roland Scheidegger [Tue, 17 Nov 2015 00:04:05 +0000 (01:04 +0100)]
r200: fix bgrx8/xrgb8 blits

Since 779cabfc7d022de8b7b9bc7fdac0caffa8646c51 the same txformat table entries
are used for "normal" texturing as well as for blits. However, I forgot to put
in an entry for the bgrx8 (le) and xrgb8 (be) formats - the normal texturing
path can't hit them because the radeon tex format chooser will never chose
them, but we get that format from the dri buffers (at least I assume we got
it from there).
This is untested but essentially addressing the same bug as for radeon.
(I don't think that the second entry per le/be table is actually necessary,
but shouldn't hurt...)

Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a2611ffe4b5f1852c59301f086b988233a1c62f3)

8 years agoradeon: fix bgrx8/xrgb8 blits
Roland Scheidegger [Thu, 12 Nov 2015 18:33:14 +0000 (19:33 +0100)]
radeon: fix bgrx8/xrgb8 blits

Since d21320f6258b2e1780a15c1ca718963d8a15ca18 the same txformat table entries
are used for "normal" texturing as well as for blits. However, I forgot to put
in an entry for the bgrx8 (le) and xrgb8 (be) formats - the normal texturing
path can't hit them because the radeon tex format chooser will never chose
them, but we get that format from the dri buffers (at least I assume we got
it from there). This caused lots of piglit regressions (and probably lots of
trouble outside piglit too).
This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=92900.

Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 983614dbede7b94cba1bad9f3e8627fc5e14bb91)

8 years agometa/generate_mipmap: Only modify the draw framebuffer binding in fallback_required
Ian Romanick [Fri, 13 Nov 2015 19:58:41 +0000 (11:58 -0800)]
meta/generate_mipmap: Only modify the draw framebuffer binding in fallback_required

Previously GL_FRAMEBUFFER was used.  However, if GL_EXT_framebuffer_blit
is supported (note: it is supported by every Mesa driver), this is
*sometimes* an alias for GL_DRAW_FRAMEBUFFER (getters) and *sometimes*
an alias for *both* GL_DRAW_FRAMEBUFFER and GL_READ_FRAMEBUFFER
(setters).  As a result, the code saved one binding but modified both.
If the bindings were different, the GL_READ_FRAMEBUFFER would be
incorrect on exit.

Fixes the piglit fbo-generatemipmap-versus-READ_FRAMEBUFFER test.

Ideally this function would use DSA functions and not modify the binding
at all.  However, that would be a much more intrusive change because
_mesa_meta_bind_fbo_image would also need to be modified.
_mesa_meta_bind_fbo_image has a lot of callers.  Much of this code is
about to get a major rework due to bug #92363, so I don't think it
matters too much.  In fact, I discovered this bug while working on the
other bug.  Le bon temps!

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit c40a88b6c5a698e5297957e28cccf2ce23820caa)

8 years agoradeonsi: enable optimal raster config setting for fiji (v2)
Alex Deucher [Fri, 13 Nov 2015 18:00:30 +0000 (13:00 -0500)]
radeonsi: enable optimal raster config setting for fiji (v2)

Requires proper kernel tiling configuration so check the tiling
config registers.

v2: send the right version of the patch

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 00f554abba8c0f3b65af94365c15109c3b858486)

8 years agonouveau: don't expose HEVC decoding support
Ilia Mirkin [Sat, 14 Nov 2015 15:28:55 +0000 (10:28 -0500)]
nouveau: don't expose HEVC decoding support

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit f94e1d97381ec787c2abbbcd5265252596217e33)

8 years agoglsl: Allow implicit int -> uint conversions for the % operator.
Kenneth Graunke [Thu, 12 Nov 2015 21:02:05 +0000 (13:02 -0800)]
glsl: Allow implicit int -> uint conversions for the % operator.

GLSL 4.00 and GL_ARB_gpu_shader5 introduced a new int -> uint implicit
conversion rule and updated the rules for modulus to use them.  (In
earlier languages, none of the implicit conversion rules did anything
relevant, so there was no point in applying them.)

This allows expressions such as:

   int foo;
   uint bar;
   uint mod = foo % bar;

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 511de1a80cedc0add386dad79cce56dd68d2f611)

8 years agometa/generate_mipmap: Don't leak the sampler object
Ian Romanick [Tue, 10 Nov 2015 20:36:58 +0000 (12:36 -0800)]
meta/generate_mipmap: Don't leak the sampler object

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 758f12fd98dea9a9682becf2d496bd38ef3959e5)

8 years agoradeonsi: initialize SX_PS_DOWNCONVERT to 0 on Stoney
Marek Olšák [Thu, 5 Nov 2015 22:56:38 +0000 (23:56 +0100)]
radeonsi: initialize SX_PS_DOWNCONVERT to 0 on Stoney

otherwise the SX or CB blocks can go bananas

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 40912dd91e96376517fb41bb4dc228b45fd1a01c)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_state.c

8 years agonir/vars_to_ssa: Rework copy set handling in lower_copies_to_load_store
Jason Ekstrand [Fri, 13 Nov 2015 02:10:22 +0000 (18:10 -0800)]
nir/vars_to_ssa: Rework copy set handling in lower_copies_to_load_store

Previously, we walked through a given deref_node's copies and, after
lowering the copy away, removed it from both the source and destination
copy sets.  This commit changes this to only remove it from the other
node's copy set (not the one we're lowering).  At the end of the loop, we
just throw away the copy set for the node we're lowering since that node no
longer has any copies.  This has two advantages:

 1) It's more efficient because we're doing potentially half as many set
    search operations.

 2) It now properly handles copies from a node to itself.  Perviously, it
    would delete the copy from the set when processing the destinatioon and
    then assert-fail when we couldn't find it for the source.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92588
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
(cherry picked from commit 226ba889a0f820b9f4b1132e379620d2688c96e7)

8 years agoi965/skl/gt4: Fix URB programming restriction.
Ben Widawsky [Sat, 7 Nov 2015 02:12:27 +0000 (18:12 -0800)]
i965/skl/gt4: Fix URB programming restriction.

The comment in the code details the restriction. Thanks to Ken for having a very
helpful conversation with me, and spotting the blurb in the link I sent him :P.

There are still stability problems for me on GT4, but this definitely helps with
some of the failures.

v2: Comment fixes

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 55314c5be4cbf933ab7fbd20f6aa49207e04c946)

8 years agor600: initialised PGM_RESOURCES_2 for ES/GS
Dave Airlie [Wed, 11 Nov 2015 22:34:18 +0000 (08:34 +1000)]
r600: initialised PGM_RESOURCES_2 for ES/GS

This fixes the corruption on rendering that we are seeing in
certain geometry shaders.

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=91780
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested / Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.6" "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit df8af7d75155845d12d5a14a3a5ca644f07cb3b1)

8 years agomesa/copyimage: allow width/height to not be multiples of block
Ilia Mirkin [Sun, 8 Nov 2015 09:46:38 +0000 (04:46 -0500)]
mesa/copyimage: allow width/height to not be multiples of block

For compressed textures, the image size is not necessarily a multiple of
the block size (e.g. the last mip levels). Section 18.3.2 (Copying
Between Images) of the OpenGL 4.5 Core Profile spec says:

    An INVALID_VALUE error is generated if the dimensions of either
    subregion exceeds the boundaries of the corresponding image
    object, or if the image format is compressed and the dimensions of
    the subregion fail to meet the alignment constraints of the
    format.

and Section 8.7 (Compressed Texture Images) says:

    An INVALID_OPERATION error is generated if any of the following
    conditions occurs:

      * width is not a multiple of four, and width + xoffset is not
        equal to the value of TEXTURE_WIDTH.
      * height is not a multiple of four, and height + yoffset is not
        equal to the value of TEXTURE_HEIGHT.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92860
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 912babba7bf1abd3caa49f6372d581ae1afe7e84)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/main/copyimage.c

8 years agovc4: Return NULL when we can't make our shadow for a sampler view.
Eric Anholt [Mon, 9 Nov 2015 16:56:01 +0000 (08:56 -0800)]
vc4: Return NULL when we can't make our shadow for a sampler view.

I'm not sure what the caller does is appropriate (just have a NULL sampler
at this slot), but it fixes the immediate crash.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5980389bbf98b8186ba6a06392d92b82fa9efad3)

8 years agovc4: Return GL_OUT_OF_MEMORY when buffer allocation fails.
Eric Anholt [Fri, 6 Nov 2015 19:07:25 +0000 (11:07 -0800)]
vc4: Return GL_OUT_OF_MEMORY when buffer allocation fails.

I was afraid our callers weren't prepared for this, but it looks like
at least for resource creation, mesa/st throws an error appropriately.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit eb8fb0064dbde7a363c2f99466a51b346b09a029)

8 years agowinsys/radeon: Use CPU page size instead of hardcoding 4096 bytes v3
Michel Dänzer [Thu, 21 Aug 2014 09:30:44 +0000 (18:30 +0900)]
winsys/radeon: Use CPU page size instead of hardcoding 4096 bytes v3

Fixes GPUVM conflicts with non-4K page size.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92738

v2: Replace sanitization of VM base address alignment with comment why
    that's not necessary.
v3: Use unsigned instead of long as the type for the size_align member.
    (Marek)

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 24abbaff9ad177624c2b4906c7d94f5d91ac3cc0)

8 years agoradeon/uvd: fix VC-1 simple/main profile decode v2
Boyuan Zhang [Wed, 23 Sep 2015 08:11:08 +0000 (10:11 +0200)]
radeon/uvd: fix VC-1 simple/main profile decode v2

We just needed to set the extra width/height fields to get this working.

v2 (chk): rebased, CC stable added, commit message added, fixed coding style

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6bad554d98004e6c8ab46e8cbe73f3b3024e55c5)

8 years agost/vaapi: fix vaapi VC-1 simple/main corruption v2
Boyuan Zhang [Wed, 23 Sep 2015 08:11:07 +0000 (10:11 +0200)]
st/vaapi: fix vaapi VC-1 simple/main corruption v2

Apply the start code fix only to advanced profile.

v2 (chk): add commit message

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ed55def44febbe1662ddcc0c33a23308899ce488)

8 years agocherry-ignore: add the swrast front buffer support
Emil Velikov [Wed, 18 Nov 2015 18:43:23 +0000 (18:43 +0000)]
cherry-ignore: add the swrast front buffer support

Although a sort of a bugfix, it causes many piglit regressions and even
lockup with llvmpipe.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add sha256 checksums for 11.0.5
Emil Velikov [Wed, 11 Nov 2015 11:10:30 +0000 (11:10 +0000)]
docs: add sha256 checksums for 11.0.5

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add release notes for 11.0.5
Emil Velikov [Wed, 11 Nov 2015 10:05:57 +0000 (10:05 +0000)]
docs: add release notes for 11.0.5

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoUpdate version to 11.0.5
Emil Velikov [Wed, 11 Nov 2015 09:56:00 +0000 (09:56 +0000)]
Update version to 11.0.5

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoradeonsi: add register definitions for Stoney
Marek Olšák [Tue, 3 Nov 2015 11:20:18 +0000 (12:20 +0100)]
radeonsi: add register definitions for Stoney

There are a few non-stoney changes too.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d57ede92b7832f01df2aa5755c8c34b4de4866d4)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
8 years agoRevert "mesa/glformats: Undo code changes from _mesa_base_tex_format() move"
Emil Velikov [Tue, 10 Nov 2015 20:17:41 +0000 (20:17 +0000)]
Revert "mesa/glformats: Undo code changes from _mesa_base_tex_format() move"

This reverts commit 2294f6f3112f34c4685586f95cd567ce130ee1ab.

It introduces a regression in the following test
   piglit.spec.oes_compressed_paletted_texture.basic api

In general this commit is needed to prevent regressions in
GL_KHR_texture_compression_astc_ldr, which... isn't in 11.0

Reported-by: Mark Janes <mark.a.janes@intel.com>
8 years agost/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer
Julien Isorce [Fri, 30 Oct 2015 11:42:51 +0000 (11:42 +0000)]
st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit 5e763aaa21654d0591b7da14c573fc03d4a60205)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
8 years agost/va: do not destroy old buffer when new one failed
Julien Isorce [Fri, 30 Oct 2015 11:42:45 +0000 (11:42 +0000)]
st/va: do not destroy old buffer when new one failed

If formats are not the same vlVaPutImage re-creates the video
buffer with the right format. But if the creation of this new
video buffer fails then the surface looses its current buffer.
Let's just destroy the previous buffer on success.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit d42029d2d9bc6b65ccf847dc9ba2e70b496d0299)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
8 years agonvc0: fix crash when nv50_miptree_from_handle fails
Julien Isorce [Tue, 20 Oct 2015 16:34:23 +0000 (17:34 +0100)]
nvc0: fix crash when nv50_miptree_from_handle fails

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 3bbb8715acd1cb85ea7aa7763c06cd12347a1a9a)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
8 years agost/va: pass picture desc to begin and decode
Julien Isorce [Fri, 23 Oct 2015 12:25:47 +0000 (13:25 +0100)]
st/va: pass picture desc to begin and decode

At least vl_mpeg12_decoder uses the picture
desc in begin_frame and decode_bitstream.

https://bugs.freedesktop.org/show_bug.cgi?id=92634

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit a61be1a79897931e3efb5b9119c48e1fb1257db4)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
8 years agonouveau: relax fence emit space assert
Ilia Mirkin [Thu, 5 Nov 2015 03:42:41 +0000 (22:42 -0500)]
nouveau: relax fence emit space assert

We also have the "reserved for kick" space available. Some of my earlier
changes can probably be removed, but this is a quick fix for some of the
rarer fallout.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit bb73fc4cb82c1abdf47aa373c78c2a85fe29b3ec)

8 years agovc4: When the create ioctl fails, free our cache and try again.
Eric Anholt [Wed, 4 Nov 2015 21:27:16 +0000 (13:27 -0800)]
vc4: When the create ioctl fails, free our cache and try again.

This greatly increases the pressure you can put on the driver before
create fails.  Ultimately we need to let the kernel take control of
our cached BOs and just take them from us (and other clients)
directly, but this is a very easy patch for the moment.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6d3a24bce80a32063aedfe568efd5532aea4c875)

8 years agonir: Properly invalidate metadata in nir_opt_remove_phis().
Kenneth Graunke [Tue, 3 Nov 2015 05:43:40 +0000 (21:43 -0800)]
nir: Properly invalidate metadata in nir_opt_remove_phis().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 59bbe2681b73c3795b7298e2486d5fde7c464ed5)