OSDN Git Service

android-x86/external-mesa.git
7 years agocherry-ignore: corrected typo in the Flush after unmap in gbm/dri fix
Andres Gomez [Thu, 30 Mar 2017 20:45:49 +0000 (23:45 +0300)]
cherry-ignore: corrected typo in the Flush after unmap in gbm/dri fix

The regression was for i915, not i965.

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agocherry-ignore: add the Flush after unmap in gbm/dri fix
Andres Gomez [Thu, 30 Mar 2017 13:48:24 +0000 (16:48 +0300)]
cherry-ignore: add the Flush after unmap in gbm/dri fix

The commit caused a regression in i965 (and possibly others) since it
didn't implement v4 of DRI2's flush extension.

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agocherry-ignore: add the Invalidate L2 for TRANSFER_WRITE barriers fix
Andres Gomez [Tue, 28 Mar 2017 22:24:24 +0000 (01:24 +0300)]
cherry-ignore: add the Invalidate L2 for TRANSFER_WRITE barriers fix

Addressed an earlier commit [0567ab0407e] which did not land in
branch. This will be backported with a stable specific patch.

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agoc11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.
Jose Fonseca [Tue, 28 Mar 2017 10:25:04 +0000 (11:25 +0100)]
c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.

MSVC has been including a xtime definition in thr/xtimec.h ever since
MSVC 2013 (which is the minimum we require for building Mesa), and
including it prevents duplicate definitions when it gets included by
LLVM.

In fact, it looks that MSVC has been including a partial C11 threads
implementation too for some time, which we should consider migrating to
once we eliminate the use of _MTX_INITIALIZER_NP in our tree.

Thanks to the anonymous helper from
https://bugs.freedesktop.org/show_bug.cgi?id=100201#c4 for spotting
this.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100201
CC: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ecfafdcbf51d8919e219539b57ffbd9cd3f8557a)

7 years agoanv: Flush caches prior to PIPELINE_SELECT on all gens
Jason Ekstrand [Wed, 15 Mar 2017 18:58:52 +0000 (11:58 -0700)]
anv: Flush caches prior to PIPELINE_SELECT on all gens

The programming note that says we need to do this still exists in the
SkyLake PRM and, from looking at the bspec, seems like it may apply to
all hardware generations SNB+.  Unfortunately, this isn't particularly
clear cut since there is also language in the bspec that says you can
skip the flushing and stall to get better throughput.  Experimentation
with the "Car Chase" benchmark in GL seems to indicate that some form of
flushing is still needed.  This commit makes us do the full set of
flushes regardless of hardware generation.  We can always reduce the
flushing later.

Reported-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6baae9625d26d282a72481598f9431fcad3211f6)

7 years agoanv/cmd_buffer: Fix bad indentation
Jason Ekstrand [Wed, 15 Mar 2017 18:58:51 +0000 (11:58 -0700)]
anv/cmd_buffer: Fix bad indentation

A bunch of code was indented in such a way that it looked like it went
with the if statement above but it definitely didn't.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 0fe3dcce4c3e8b86a60beefe4c5adc760f2d59f8)

7 years agoanv/cmd_buffer: Apply flush operations prior to executing secondaries
Jason Ekstrand [Fri, 24 Mar 2017 23:30:24 +0000 (16:30 -0700)]
anv/cmd_buffer: Apply flush operations prior to executing secondaries

This fixes rendering issues in the Vulkan port of skia on some hardware.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 01a65dc43be3a4bf6b8a901586f7222218f4b6b3)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/intel/vulkan/genX_cmd_buffer.c

7 years agoanv/blorp: Use anv_get_layerCount everywhere
Jason Ekstrand [Fri, 24 Mar 2017 23:20:35 +0000 (16:20 -0700)]
anv/blorp: Use anv_get_layerCount everywhere

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9319ef96fd5c2489754eae1b058e4087d7259341)

7 years agoanv: Make anv_get_layerCount a macro
Jason Ekstrand [Fri, 24 Mar 2017 23:20:18 +0000 (16:20 -0700)]
anv: Make anv_get_layerCount a macro

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1b8fa8dd794c22aba43b16470e75ecaebf902b11)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/intel/vulkan/anv_private.h

7 years agomesa: update lower_jumps tests after bug fix
Timothy Arceri [Wed, 29 Mar 2017 09:30:19 +0000 (20:30 +1100)]
mesa: update lower_jumps tests after bug fix

This change updates the tests to reflect the IR after
the following bug fix.

Fixes: c1096b7f1d49 ("glsl: fix lower jumps for returns when loop is
                      inside an if")

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Bugzilla: https://bugs.freedesktop.org/100441
(cherry picked from commit e44cba540ee7a07bba643bab4b9e519e90244bd1)

7 years agotests/cache_test: allow crossing mount points
Juan A. Suarez Romero [Tue, 28 Mar 2017 16:00:39 +0000 (18:00 +0200)]
tests/cache_test: allow crossing mount points

When using an overlayfs system (like a Docker container), rmrf_local()
fails because part of the files to be removed are in different mount
points (layouts). And thus cache-test fails.

Letting crossing mount points is not a big problem, specially because
this is just for a test, not to be used in real code.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit caa616ccc4384ea1479865e12b56cf816561a827)

7 years agoglsl: on UBO/SSBOs link error reset the number of active blocks to 0
Andres Gomez [Wed, 22 Feb 2017 15:03:22 +0000 (17:03 +0200)]
glsl: on UBO/SSBOs link error reset the number of active blocks to 0

While it's legal to have an active blocks count > 0 on link failure.
Unless we actually assign memory for the blocks array we can end up
segfaulting in calls such as glUniformBlockBinding().

To avoid having to NULL check these api calls we simply reset the
block count to 0 if the array was not created.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Cc: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit bf15b2b515d5f37fc67fea77dea9d2fbc1dc8bf1)

7 years agoanv/query: Fix the location of timestamp availability
Jason Ekstrand [Wed, 15 Mar 2017 00:52:12 +0000 (17:52 -0700)]
anv/query: Fix the location of timestamp availability

Reviewed-By: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.0 13.0" <mesa-dev@lists.freedesktop.org>
(cherry picked from commit 4bbb4b95b8ba02693f5e6990b983ebb66dc6241a)
[Andres Gomez: use genX_cmd_buffer.c instead of genX_query.c]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/intel/vulkan/genX_query.c

7 years agoradv: flush DB cache before and after HTILE decompress.
Bas Nieuwenhuizen [Mon, 27 Mar 2017 23:48:15 +0000 (01:48 +0200)]
radv: flush DB cache before and after HTILE decompress.

It reads @ writes the DB cache, and we haven't flushed dst caches yet,
so DB cache may be stale. Also the user might be shader read (and probably is),
so also flush after.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
CC: <mesa-stable@lists.freedesktop.org>
Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver")
(cherry picked from commit a8c51b1cd9168b621e27cf5308d0dd8fc08f8a4a)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/amd/vulkan/radv_cmd_buffer.c

7 years agoglsl: fix lower jumps for returns when loop is inside an if
Timothy Arceri [Sun, 26 Mar 2017 12:34:13 +0000 (23:34 +1100)]
glsl: fix lower jumps for returns when loop is inside an if

Previously we would just escape the loop and move everything
following the loop inside the if to the else branch of a new if
with a return flag conditional. However everything outside the
if the loop was nested in would still get executed.

Adding a new return to the then branch of the new if fixes this
and we just let a follow pass clean it up if needed.

Fixes:
tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop.shader_test
tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop2.shader_test

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit c1096b7f1d49f33c85b1042f82ccb063f63e7c20)

7 years agoi965/fs: Don't emit SEL instructions for type-converting MOVs.
Matt Turner [Thu, 23 Mar 2017 19:12:18 +0000 (12:12 -0700)]
i965/fs: Don't emit SEL instructions for type-converting MOVs.

SEL can only convert between a few integer types, which we basically
never do.

Fixes fs/vs-double-uniform-array-direct-indirect-non-uniform-control-flow
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 7dccd38b400d3a65da20ddefe282a7bb0b7ccb58)

7 years agoanv/blorp: Fix a crash in CmdClearColorImage
Xu Randy [Mon, 20 Mar 2017 07:31:35 +0000 (15:31 +0800)]
anv/blorp: Fix a crash in CmdClearColorImage

We should use anv_get_layerCount() to access layerCount of VkImageSub-
resourceRange in anv_CmdClearColorImage and anv_CmdClearDepthStencil-
Image, which handles the VK_REMAINING_ARRAY_LAYERS (~0) case.

Test: Sample multithreadcmdbuf from LunarG can run without crash

Signed-off-by: Xu Randy <randy.xu@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 004468de14170dc7a22322301829ad4f59188ee5)

7 years agost/nine: Use atomics for available_texture_mem
Axel Davy [Wed, 15 Mar 2017 21:53:36 +0000 (22:53 +0100)]
st/nine: Use atomics for available_texture_mem

Resource dtor can be executed in the worker thread.
Use atomic to avoid threading safety issues.

CC: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Tested-by: James Harvey <lothmordor@gmail.com>
(cherry picked from commit bdf035ea6f784b90a6cbfd4ce16f3188ab15b2d3)

7 years agost/nine: Resolve deadlock in surface/volume dtors when using csmt
Axel Davy [Wed, 15 Mar 2017 21:45:03 +0000 (22:45 +0100)]
st/nine: Resolve deadlock in surface/volume dtors when using csmt

Surfaces and Volumes can be freed in the worker thread.

Without this patch, pending_uploads_counter could be non-zero
in the Surfaces or Volumes dtor, leading to deadlock.
Instead decrease properly the counter before releasing the
item.

Also avoid another potential deadlock if the item is not
properly unlocked: Do not call UnlockRect which will cause deadlock,
but free directly using the deadlock safe
nine_context_get_pipe_multithread.

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

CC: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Tested-by: James Harvey <lothmordor@gmail.com>
(cherry picked from commit bd85bb51c717a1858157c73adcb689e3986b2134)

7 years agofreedreno: fix memory leak
Rob Clark [Fri, 24 Mar 2017 21:03:05 +0000 (17:03 -0400)]
freedreno: fix memory leak

Otherwise blitter would still hold a ref to, for example, sampler-
views.

To reproduce:

   glmark2 -b desktop:duration=2 --run-forever

Fixes: a8e6734 ("freedreno: support for using generic clear path")
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
(cherry picked from commit c03f6f12bbe6fb491c9362b3fd5d39b9f4fd05fd)

7 years agoclover: use pipe_resource references
Jan Vesely [Thu, 2 Mar 2017 00:45:03 +0000 (19:45 -0500)]
clover: use pipe_resource references

v2: buffers are created with one reference.
v3: add pipe_resource reference to mapping object
v4: rename to pres and drop inline initializers

CC: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 14b543bdc94df06897f98057c40df84b16f2e944)

7 years agoradeonsi: don't hang on shader compile failure
Marek Olšák [Thu, 23 Mar 2017 23:17:23 +0000 (00:17 +0100)]
radeonsi: don't hang on shader compile failure

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit 518d8341627ac80f8757fd09cc3cd5c2884f58e0)

7 years agoswr: [rasterizer jitter] fix llvm >= 5.0 build break
Tim Rowley [Tue, 21 Mar 2017 16:42:31 +0000 (11:42 -0500)]
swr: [rasterizer jitter] fix llvm >= 5.0 build break

Function::getArgumentList() doesn't exist anymore, switch to using
arg_begin() (existed back to at least llvm-3.6.0).

Reviewed-by: Vedran Miletić <vedran@miletic.net>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 08f864abd9e241c7db9c99212a66cdad69bdd4d8)

7 years agoanv/image: Return early when unbinding an image
Jason Ekstrand [Wed, 22 Mar 2017 00:16:46 +0000 (17:16 -0700)]
anv/image: Return early when unbinding an image

Found by inspection.

Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit c942faf8f37d14e7934a21c15ad2438dde2d501e)

7 years agomesa/main: fix MultiDrawElements[BaseVertex] validation of primcount
Nicolai Hähnle [Wed, 22 Feb 2017 13:00:29 +0000 (14:00 +0100)]
mesa/main: fix MultiDrawElements[BaseVertex] validation of primcount

primcount must be a GLsizei as in the signature for MultiDrawElements
or bad things can happen.

Furthermore, an error should be flagged when primcount is negative.

Curiously, this code used to work somewhat correctly even when primcount
was negative, because the loop that checks count[i] would iterate out of
bounds and almost certainly hit a negative value at some point.

Found by an ASAN error in
GL45-CTS.gtf32.GL3Tests.draw_elements_base_vertex.draw_elements_base_vertex_primcount

Note that the OpenGL spec seems to have s/primcount/drawcount/ at some
point, and the code still reflects the old language.

v2: provide the correct spec quotes (pointed out by Ian)

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit c11dcfb5e9b051b9036949b3e40a9dc15138bd97)

7 years agoi965: Fall back to GL 4.2/4.3 on Haswell if the kernel isn't new enough.
Kenneth Graunke [Thu, 2 Mar 2017 19:33:37 +0000 (11:33 -0800)]
i965: Fall back to GL 4.2/4.3 on Haswell if the kernel isn't new enough.

In commit d2590eb65ff28a9cbd592353d15d7e6cbd2c6fc6 I enabled GL 4.5
on Haswell...but failed to check if we could do indirect compute
shader dispatch...and query buffer objects.

Indirect compute shader dispatch requires command parser version 5
(kernel commit 7b9748cb513a6bef4af87b79f0da3ff7e8b56cd8, which is in
Linux v4.4).  On earlier kernels we would have disabled
ARB_compute_shader, which is a mandatory part of OpenGL 4.3+.

Query buffer objects currently require MI_MATH and MI_LOAD_REGISTER_REG,
which mean command parser version 7 (Linux v4.8).  On earlier kernels
we would have disabled ARB_query_buffer_object, which is a mandatory
part of OpenGL 4.4+.

The new version support looks like:

- Kernel 4.1 and older => OpenGL 3.3
- Kernel 4.2-4.3       => OpenGL 4.2
- Kernel 4.4-4.7       => OpenGL 4.3
- Kernel 4.8+          => OpenGL 4.5

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit 9b324e4dca4754801e5db59aba0ab559f2cf35ea)

7 years agointel: Correct the BDW surface state size
Nanley Chery [Tue, 7 Mar 2017 19:17:05 +0000 (11:17 -0800)]
intel: Correct the BDW surface state size

The PRMs state that this packet is 16 DWORDS long. Ensure that the last
three DWORDS are zeroed as required by the hardware when allocating a
null surface state.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 7c50f9903f58ef04ff393505a383d06f499f1fdc)

7 years agoanv/genX: Solve the vkCreateGraphicsPipelines crash
Xu,Randy [Sat, 18 Mar 2017 11:20:17 +0000 (19:20 +0800)]
anv/genX: Solve the vkCreateGraphicsPipelines crash

The crash is due to NULL pColorBlendState, which is legal if the
pipeline has rasterization disabled or if the subpass of the render pass
the pipeline is created against does not use any color attachments.

Test: Sample subpasses from LunarG can run without crash

Signed-off-by: Xu,Randy <randy.xu@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 57595cb0739d50a3fbd0841d7475bd775f3e24f3)

7 years agoradv: fix primitive reset index emission
Dave Airlie [Sun, 19 Mar 2017 04:17:14 +0000 (14:17 +1000)]
radv: fix primitive reset index emission

This was meant to be checking the index type to get the correct
index not the last emitted one. This fixes:
dEQP-VK.pipeline.input_assembly.primitive_restart.index_type_uint32.triangle_strip_with_adjacency

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit d06e168b878be45029bf66c2ac627d16144a7823)

7 years agost/mesa: set result writemask based on ir type
Ilia Mirkin [Sat, 4 Mar 2017 18:52:48 +0000 (13:52 -0500)]
st/mesa: set result writemask based on ir type

This prevents textureQueryLevels, which maps as LODQ, from ending up
with a xyzw writemask, which is illegal.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit dab88e9af7a35ebcdd0fc87df97f4b13e908552a)

7 years agonvc0/ir: treat FMA like MAD for operand propagation
Karol Herbst [Sun, 19 Mar 2017 00:08:56 +0000 (01:08 +0100)]
nvc0/ir: treat FMA like MAD for operand propagation

Helps mainly Feral-ported games, due to their use of fma()

shader-db changes:
total instructions in shared programs : 3901147 -> 3842505 (-1.50%)
total gprs used in shared programs    : 471258 -> 467359 (-0.83%)
total local used in shared programs   : 27405 -> 27361 (-0.16%)
total bytes used in shared programs   : 35749888 -> 35214176 (-1.50%)

                local        gpr       inst      bytes
    helped          17        1829        4091        4091
      hurt           4          44           3           3

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 09f16de7e624938d46a63b8285fc5b21050962e9)

7 years agoradeonsi: add new polaris12 pci id
Alex Deucher [Fri, 17 Mar 2017 15:13:09 +0000 (11:13 -0400)]
radeonsi: add new polaris12 pci id

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

7 years agoanv/GetQueryPoolResults: Actually implement the spec
Jason Ekstrand [Wed, 15 Mar 2017 03:48:47 +0000 (20:48 -0700)]
anv/GetQueryPoolResults: Actually implement the spec

The Vulkan spec is fairly clear about when we should and should not
write query pool results.  We're also supposed to return VK_NOT_READY if
VK_QUERY_RESULT_PARTIAL_BIT is not set and we come across any queries
which are not yet finished.  This fixes rendering corruptions on The
Talos Principle where geometry flickers in and out due to bogus query
results being returned by the driver.  These issues are most noticable
on Sky Lake GT4 2hen running on "ultra" settings.

Reviewed-By: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100182
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 08df015b9de8ccb16ce6db93890910f8a02be4c6)
[Andres Gomez: use anv_query.c instead of genX_query.c]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/intel/vulkan/genX_query.c

7 years agoanv/query: Invalidate the correct range
Jason Ekstrand [Wed, 15 Mar 2017 01:02:41 +0000 (18:02 -0700)]
anv/query: Invalidate the correct range

Reviewed-By: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 81840130c0f147ed6ae4c26872c2f04a2167bc54)
[Andres Gomez: use anv_query.c instead of genX_query.c]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/intel/vulkan/genX_query.c

7 years agoi965/gen8+: Do full stall when switching pipeline
Topi Pohjolainen [Wed, 15 Mar 2017 19:31:07 +0000 (21:31 +0200)]
i965/gen8+: Do full stall when switching pipeline

just as earlier gens do.

CC: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96743
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
(cherry picked from commit bd25d9670b466043cdb5d9668f82accbd587c889)

7 years agodocs: add sha256 checksums for 17.0.2
Emil Velikov [Mon, 20 Mar 2017 14:17:20 +0000 (14:17 +0000)]
docs: add sha256 checksums for 17.0.2

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: add release notes for 17.0.2
Emil Velikov [Mon, 20 Mar 2017 14:07:38 +0000 (14:07 +0000)]
docs: add release notes for 17.0.2

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoUpdate version to 17.0.2
Emil Velikov [Mon, 20 Mar 2017 14:02:15 +0000 (14:02 +0000)]
Update version to 17.0.2

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoRevert "radv: Emit cache flushes before CP DMA."
Bas Nieuwenhuizen [Wed, 15 Mar 2017 17:49:29 +0000 (18:49 +0100)]
Revert "radv: Emit cache flushes before CP DMA."

This reverts commit cce43f6d8c40222099badaf52344d6a0eed993f3.

Redundant, as the flush already happens at si_cp_dma_prepare.

Acked-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit ad4dee521d7968a88393dc3685e7c593d27efba5)

7 years agoradv/ac: Fix shared memory offset calculation
Alex Smith [Thu, 16 Mar 2017 16:40:07 +0000 (16:40 +0000)]
radv/ac: Fix shared memory offset calculation

The index passed to get_shared_memory_ptr is an attribute slot index,
i.e. the index of a vec4 within LDS. Therefore this must be scaled by
sizeof(vec4) to give the LDS byte offset.

Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ce4058dafd2dd283addaa99e8d5b51e53f634f9b)

7 years agoradv: Fix using more than 4 bound descriptor sets
James Legg [Thu, 16 Mar 2017 17:48:13 +0000 (17:48 +0000)]
radv: Fix using more than 4 bound descriptor sets

Avoid a buffer overflow in ac_nir_to_llvm.c's create_function when
using more than 4 descriptor sets. radv claims support for 8.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit e88cac1df03d01a9e8a1de1a4a2ee888149e727a)

7 years agoradeonsi: disable sinking common instructions down to the end block
Samuel Pitoiset [Tue, 14 Mar 2017 23:59:13 +0000 (00:59 +0100)]
radeonsi: disable sinking common instructions down to the end block

Initially this was a workaround for a bug introduced in LLVM 4.0
in the SimplifyCFG pass that caused image instrinsics to disappear
(because they were badly sunk). Finally, this is a win because it
decreases SGPR spilling and increases the number of waves a bit.

Although, shader-db results are good I think we might want to
remove it in the future once the issue is fixed. For now, enable
it for LLVM >= 4.0.

This also fixes a rendering issue with the speedometer in Dirt Rally.

More information can be found here https://reviews.llvm.org/D26348.

Thanks to Dave Airlie for the patch.

v2: - add a FIXME comment
    - use if (HAVE_LLVM >= 0x0400) instead

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99484
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97988
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 7751ed39e40e08e5aa0633d018c9f25ad17f9bb0)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

7 years agoradv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer
Alex Smith [Tue, 14 Mar 2017 15:26:32 +0000 (15:26 +0000)]
radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer

Need to flush before updating the buffer to ensure that the copy is
ordered after previous accesses (assuming the app has performed the
appropriate barriers).

This fixes potential issues due to draws prior to an update reading
the new buffer content, despite having the necessary barriers between
them.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e0cc32b85bd8cf5c2202037838a208983e2d793a)

7 years agoradv: Emit cache flushes before CP DMA.
Bas Nieuwenhuizen [Tue, 14 Mar 2017 20:46:54 +0000 (21:46 +0100)]
radv: Emit cache flushes before CP DMA.

The flushes could be due to TRANSFER barriers.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit cce43f6d8c40222099badaf52344d6a0eed993f3)

7 years agonir/intrinsics: Make load_barycentric_input take a 2-component coor
Jason Ekstrand [Fri, 3 Mar 2017 01:39:11 +0000 (17:39 -0800)]
nir/intrinsics: Make load_barycentric_input take a 2-component coor

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 60d1aac28a1f44ac166e72262e378e063155d6fd)

7 years agoanv/blorp: Only set a clear color for resolves if fast-cleared
Jason Ekstrand [Fri, 3 Mar 2017 07:03:03 +0000 (23:03 -0800)]
anv/blorp: Only set a clear color for resolves if fast-cleared

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 678fd00f2f5b213d0317ba51a8163c4c5bd1f3dc)

7 years agoanv/blorp: Turn off AUX after doing a CCS_D resolve
Jason Ekstrand [Fri, 10 Mar 2017 00:37:23 +0000 (16:37 -0800)]
anv/blorp: Turn off AUX after doing a CCS_D resolve

For render passes with multiple subpasses on gen7, we only fast-clear at
the top but an input attachment use can cause us to do a resolve in the
middle of the render pass.  Once we've done so, we are no longer have a
fast-cleared surface so we can just set aux_usage to NONE.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 273b720310863c2084c55f1371b2d27c2d96dbda)

7 years agoclover: Work around build failure with AltiVec.
Matt Turner [Thu, 2 Mar 2017 04:43:21 +0000 (04:43 +0000)]
clover: Work around build failure with AltiVec.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504
Acked-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 7d1195c1e4d071fe796bf5f210c468ea1cc86225)

7 years agonvc0: increase alignment to 256 for texture buffers on fermi
Ilia Mirkin [Wed, 1 Mar 2017 16:09:30 +0000 (11:09 -0500)]
nvc0: increase alignment to 256 for texture buffers on fermi

When binding as textures, the alignment can be 16. However when binding
as an image, the address has to be aligned to 256. (Also when binding as
an RT, but that can't happen with GL or current gallium APIs.)

Reported-by: Roy Spliet <nouveau@spliet.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 32dd8d59b6d1b6828e16e854d589d0f04536da14)

7 years agoglapi: fix typo in count_scale
Gregory Hainaut [Mon, 6 Mar 2017 04:25:32 +0000 (15:25 +1100)]
glapi: fix typo in count_scale

 2*4=8

Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 2ab5eccf5de4a68d0d8d2668f6c5244cc6a41846)

7 years agovulkan/wsi: Improve the DRI3 error message
Jacob Lifshay [Wed, 1 Mar 2017 04:30:57 +0000 (20:30 -0800)]
vulkan/wsi: Improve the DRI3 error message

This commit improves the message by telling them that they could probably
enable DRI3.  More importantly, it includes a little heuristic to check
to see if we're running on AMD or NVIDIA's proprietary X11 drivers and,
if we are, doesn't emit the warning.  This way, users with both a discrete
card and Intel graphics don't get the warning when they're just running
on the discrete card.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99715
Co-authored-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Rene Lindsay <rjklindsay@hotmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Cc: "17.0" <mesa-dev@lists.freedesktop.org>
(cherry picked from commit 3d8feb38e8fdbc05b591164cb934b48a495adfbc)

7 years agoanv: Properly handle destroying NULL devices and instances
Jason Ekstrand [Wed, 1 Mar 2017 16:39:49 +0000 (08:39 -0800)]
anv: Properly handle destroying NULL devices and instances

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.0 13.0" <mesa-dev@lists.freedesktop.org>
(cherry picked from commit e3d33a23e6cbe2b73b412a56bb4fc4aa6852d081)

7 years agoanv/image: Remove extra dependency on HiZ-specific variable
Nanley Chery [Wed, 22 Feb 2017 02:17:59 +0000 (18:17 -0800)]
anv/image: Remove extra dependency on HiZ-specific variable

surf_usage is only useful to image views that may use HiZ buffers.
Storage image views don't use HiZ buffers.

v2: Update commit message and add an assertion.

Fixes: 055ff2ec521 ("anv: Replace anv_image_has_hiz() with ISL_AUX_USAGE_HIZ")
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 258af3a856328934d30b7cdf626d5fdba76852f2)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/vulkan/anv_image.c

7 years agoradv: setup llvm target data layout
Dave Airlie [Mon, 13 Mar 2017 20:50:59 +0000 (06:50 +1000)]
radv: setup llvm target data layout

Ported from radeonsi, pointed out by Tom.

"This prevents LLVM from using sext instructions for local memory
offsets and allows the backend to fold immediate offsets into the
instruction. This also prevents some incorrect code generation for
ptrtoint and inttoptr instructions."

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tom Stellard <tstellar@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b8ee70384adc3286d18febba7a92047118cc0f0f)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/amd/common/ac_nir_to_llvm.c

7 years agoradeonsi: mark all bound shader buffer ranges as initialized
Marek Olšák [Mon, 6 Mar 2017 00:47:52 +0000 (01:47 +0100)]
radeonsi: mark all bound shader buffer ranges as initialized

This should prevent cases when a buffer was incorrectly mapped without
synchronization just because this wasn't done.

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 71a2e4e9452a6890197f8b629b2d8359bdd58913)

7 years agoanv: Stall before fast-clear operations
Jason Ekstrand [Sat, 11 Mar 2017 07:00:49 +0000 (23:00 -0800)]
anv: Stall before fast-clear operations

During initial CCS bring-up, I discovered that you have to do a full CS
stall prior to doing a CCS resolve as well as afterwards.  It appears
that the same is needed for fast-clears as well.  This fixes rendering
corruptions on The Talos Principle on Sky Lake GT4.  The issue hasn't
been demonstrated on any other hardware however, given that this appears
to be a "too many things in the pipe" problem, having it be easier to
reproduce on a system with more EUs makes sense.  The issues with
resolves is demonstrable on a GT3 or GT2 so this is probably also a
problem on all GTs.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6b644e571e2344691e4d58ff0bba3ddc059c1a5d)

7 years agoanv: Accurately advertise dynamic descriptor limits
Jason Ekstrand [Sat, 4 Mar 2017 18:52:43 +0000 (10:52 -0800)]
anv: Accurately advertise dynamic descriptor limits

The number of dynamic descriptors is limited by both the number of
descriptors and the total number of dynamic things.  Because there isn't
a single "maximum dynamic things" limit, we need to divide by two so
that they can create the maximum of both UBOs and SSBOs.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5e44ef4a76d9a3681fb6be605319250d4ab800ee)

7 years agoi965: move brw_define.h ifndef guard to the top
Emil Velikov [Thu, 9 Mar 2017 00:38:21 +0000 (00:38 +0000)]
i965: move brw_define.h ifndef guard to the top

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 077078ce77e8653725def01ed291eb486989a9ad)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_defines.h

7 years agoradv: disable mip point pre clamping.
Dave Airlie [Tue, 7 Mar 2017 05:08:42 +0000 (05:08 +0000)]
radv: disable mip point pre clamping.

No idea what this does, but disabling it fixes a bunch
of failing CTS tests in the lod area, so let's go with that.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit d81bd2f75462646d3803d683a28f6682a2ce3078)

7 years agoradv/ac: fix multiple descriptor sets with dynamic buffers
Fredrik Höglund [Tue, 7 Mar 2017 00:53:22 +0000 (01:53 +0100)]
radv/ac: fix multiple descriptor sets with dynamic buffers

The dynamic_offset_offset in the descriptor set binding layout is
relative to the dynamic_offset_start for the set in the pipeline
layout.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 162beb2abbe6b81d81863b3ac88ec8effcbf7c9d)

7 years agoradv: fix the dynamic buffer index in vkCmdBindDescriptorSets
Fredrik Höglund [Tue, 7 Mar 2017 00:53:20 +0000 (01:53 +0100)]
radv: fix the dynamic buffer index in vkCmdBindDescriptorSets

This fixes the wrong dynamic buffer descriptors being updated when
firstSet > 0.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 0941d1a574f46c558b0037be81d9a57004f4290b)

7 years agoradv: Disable HTILE for textures with multiple layers/levels.
Bas Nieuwenhuizen [Mon, 6 Mar 2017 22:23:57 +0000 (23:23 +0100)]
radv: Disable HTILE for textures with multiple layers/levels.

It has issues and the fix I'm working on is too complicated for stable,
so disable for now.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
CC: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 0ab2dd361fd80c3840b1547cb7e05b4361eaf928)

7 years agoradv: Emit pending flushes before executing a secondary command buffer
Alex Smith [Mon, 6 Mar 2017 14:54:28 +0000 (14:54 +0000)]
radv: Emit pending flushes before executing a secondary command buffer

If we have any pending flushes on the primary command buffer, these
must be performed before executing the secondary buffer.

This fixes potential corruption when the contents of a subpass which
clears any of its render targets are given in a secondary buffer: the
flushes after a fast clear would not have been performed until the
vkCmdEndRenderPass call.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 290d7e892dfa6d04767142f4f6d7ec689933a105)

7 years agoradv: drop Z24 support.
Dave Airlie [Sun, 5 Mar 2017 23:26:16 +0000 (23:26 +0000)]
radv: drop Z24 support.

This isn't exposed in -pro, the hw docs say it is deprecated,
so let's not bother with it.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit cc59e24a6bc9bf8b51a22785beb07089770bec8d)

7 years agonvc0: take extra pushbuf space into account for pushbuf_space calls
Ilia Mirkin [Fri, 3 Mar 2017 01:18:24 +0000 (20:18 -0500)]
nvc0: take extra pushbuf space into account for pushbuf_space calls

See detailed explanation of why this is needed in commit eb60a89bc3a.
This spot was missed/overlooked. Basically as a result of the fact
that BEGIN_* ends up calling PUSH_SPACE, which in turn adds an extra 8
to the requested amount, we have to be mindful of that when doing bare
nouveau_pushbuf_space calls.

Reportedly this fixes some crashes when replaying a hitman trace taken
on radeonsi.

Fixes: eb60a89bc3a ("nouveau: take extra push space into account for pushbuf_space calls")
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reported-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 8e6d67685e10b001e07f92a7a6aaff4fe987b6f2)

7 years agoanv/pass: Avoid accessing attachment array out of bounds
Nanley Chery [Mon, 27 Feb 2017 18:23:33 +0000 (10:23 -0800)]
anv/pass: Avoid accessing attachment array out of bounds

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 178f9e5f29f3fe83eb5af99a69d7c583c30d21d1)

7 years agoralloc: Make sure ralloc() allocations match malloc()'s alignment.
Jonas Pfeil [Wed, 1 Mar 2017 17:11:10 +0000 (18:11 +0100)]
ralloc: Make sure ralloc() allocations match malloc()'s alignment.

The header of ralloc needs to be aligned, because the compiler assumes
that malloc returns will be aligned to 8/16 bytes depending on the
platform, leading to degraded performance or alignment faults with ralloc.

Fixes SIGBUS on Raspberry Pi at high optimization levels.

This patch is not perfect for MSVC, as maybe in the future the alignment
for the most demanding data type might change to more than 8.

v2: Commit message reword/typo fix, and add a bigger explanation in the
    code (by anholt)

Signed-off-by: Jonas Pfeil <pfeiljonas@gmx.de>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit cd2b55e536dc806f9358f71db438dd9c246cdb14)

Squashed with

ralloc: don't leave out the alignment factor

Experimentation shows that without alignment factor gcc and clang choose
a factor of 16 even on IA-32, which doesn't match what malloc() uses (8).
The problem is it makes gcc assume the pointer is 16 byte aligned, so
with -O3 it starts using aligned SSE instructions that later fault,
so always specify a suitable alignment factor.

Cc: Jonas Pfeil <pfeiljonas@gmx.de>
Fixes: cd2b55e5 "ralloc: Make sure ralloc() allocations match malloc()'s alignment."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100049
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Tested by: Mike Lothian <mike@fireburn.co.uk>
Tested by: Jonas Pfeil <pfeiljonas@gmx.de>

(cherry picked from commit ff494fe999510ea40e3ed5827e7818550b6de126)

7 years agomesa: Avoid read of uninitialized variable
Robert Foss [Thu, 2 Mar 2017 00:14:39 +0000 (19:14 -0500)]
mesa: Avoid read of uninitialized variable

The is_color_attachement variable is later read when handling two
separate error cases, where only one of the cases results in the
variable being initialized.

This can be avoided by giving the variable a safe default value.

Coverity-Id: 1398631
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 88becf73022d780cfd0d7dbc5bb3911f8b0d2b11)

7 years agoegl: Ensure ResetNotificationStrategy matches for shared contexts.
Kenneth Graunke [Wed, 1 Mar 2017 01:20:52 +0000 (17:20 -0800)]
egl: Ensure ResetNotificationStrategy matches for shared contexts.

Fixes:
dEQP-EGL.functional.robustness.negative_context.invalid_robust_shared_context_creation

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4061bbccf2ad81612afbf8c3ded58c3b7146c5b2)

7 years agost/mesa: inform the driver of framebuffer changes before compute dispatches
Nicolai Hähnle [Wed, 22 Feb 2017 18:59:06 +0000 (19:59 +0100)]
st/mesa: inform the driver of framebuffer changes before compute dispatches

Even though compute shaders cannot access the framebuffer, there is a
synchronization issue when a compute dispatch accesses a texture that
was previously bound and drawn to as a framebuffer.

Section 9.3 (Feedback Loops Between Textures and the Framebuffer) of
the OpenGL 4.5 spec rather implicitly clarifies that undefined behavior
results if the texture is still attached to the currently bound
framebuffer. However, the feedback loop is broken when the application
changes the framebuffer binding before a compute dispatch, and the
state tracker needs to let the driver known about this.

Fixes GL45-CTS.compute_shader.pipeline-post-fs on SI family Radeons.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 40c77bbf83a369f21c5a95f14417348aae2dbe42)

7 years agost/glsl_to_tgsi: avoid iterating past the head of the instruction list
Nicolai Hähnle [Wed, 22 Feb 2017 19:04:39 +0000 (20:04 +0100)]
st/glsl_to_tgsi: avoid iterating past the head of the instruction list

exec_node::get_prev() does not guard against going past the beginning
of the list, so we need to add explicit checks here.

Found by ASAN in piglit arb_shader_storage_buffer_object-rendering.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 911391bd70fe30ad970c5e56632b2d7ccc29d955)

7 years agoi965/fs: emit MOV_INDIRECT with the source with the right register type
Samuel Iglesias Gonsálvez [Mon, 13 Feb 2017 11:09:53 +0000 (12:09 +0100)]
i965/fs: emit MOV_INDIRECT with the source with the right register type

This was hiding bugs as it retyped the source to destination's type.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 0dddad5b1bb3b05190074a71d274c04c0b5ea700)

7 years agoi965/fs: fix source type when emitting MOV_INDIRECT to read ICP handles
Samuel Iglesias Gonsálvez [Thu, 16 Feb 2017 09:47:01 +0000 (10:47 +0100)]
i965/fs: fix source type when emitting MOV_INDIRECT to read ICP handles

When generating the MOV INDIRECT instruction, the source type is ignored
and it is set to destination's type. However, this is going to change in a
later patch, so we need to explicitly set the proper source type.

brw_vec8_grf() creates an float type's fs_reg by default, when the
ICP handle is actually unsigned. This patch fixes these cases before
applying the aforementioned patch.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit d8122128bc6bd291ff0abcb7f2e52d9cdc631527)

7 years agoi965/fs: fix indirect load DF uniforms on BSW/BXT
Samuel Iglesias Gonsálvez [Mon, 13 Feb 2017 12:24:18 +0000 (13:24 +0100)]
i965/fs: fix indirect load DF uniforms on BSW/BXT

The lowered BSW/BXT indirect move instructions had incorrect
source types, which luckily wasn't causing incorrect assembly to be
generated due to the bug fixed in the next patch, but would have
confused the remaining back-end IR infrastructure due to the mismatch
between the IR source types and the emitted machine code.

v2:
- Improve commit log (Curro)
- Fix read_size (Curro)
- Fix DF uniform array detection in assign_constant_locations() when
  it is acceded with 32-bit MOV_INDIRECTs in BSW/BXT.

v3:
- Move changes in assign_constant_locations() to other patch.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 56266df7ed9dbdf63acfd58944442893b4cd0c0b)

7 years agoi965/fs: detect different bit size accesses to uniforms to push them in proper locations
Samuel Iglesias Gonsálvez [Mon, 20 Feb 2017 10:03:46 +0000 (11:03 +0100)]
i965/fs: detect different bit size accesses to uniforms to push them in proper locations

Previously, if we had accesses with different sizes to the same uniform, we might not
push it aligned with the bigger one. This is a problem in BSW/BXT when we access
an array of DF uniform with both direct and indirect addressing because for the latter
we use 32-bit MOV INDIRECT instructions. However this problem can happen with other
generations and bitsizes.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit a497ab6838ae5a9898abfed82f7bc8295b490911)

7 years agoi965/fs: mark last DF uniform array element as 64 bit live one
Samuel Iglesias Gonsálvez [Tue, 21 Feb 2017 07:27:30 +0000 (08:27 +0100)]
i965/fs: mark last DF uniform array element as 64 bit live one

This bug can make that we don't detect the end of a contiguous area
correctly and push larger areas than the real ones.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 7427425247d80c9f59a3c3ad2dfeeb2429de6f67)

7 years agost/mesa: set blend state for PBO readbacks
Marek Olšák [Wed, 22 Feb 2017 20:39:55 +0000 (21:39 +0100)]
st/mesa: set blend state for PBO readbacks

v2: restore the state

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit cc2f92b09f8ab0470106185585fdc1282da523e6)

7 years agost/mesa: reset sample_mask, min_sample, and render_condition for PBO ops
Marek Olšák [Wed, 22 Feb 2017 23:30:49 +0000 (00:30 +0100)]
st/mesa: reset sample_mask, min_sample, and render_condition for PBO ops

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit a40b76143d8b929412bed6fbed04810902844c40)

7 years agoanv/blorp/clear_subpass: Only set surface clear color for fast clears
Jason Ekstrand [Wed, 22 Feb 2017 02:28:38 +0000 (18:28 -0800)]
anv/blorp/clear_subpass: Only set surface clear color for fast clears

Not all clear colors are valid.  In particular, on Broadwell and
earlier, only 0/1 colors are allowed in surface state.  No CTS tests are
affected outright by this because, apparently, the CTS coverage for
different clear colors is pretty terrible.  However, when multisample
compression is enabled, we do hit it with CTS tests and this commit
prevents regressions when enabling MCS on Broadwell and earlier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 42b10b175d5e8dfb9c4c46edbc306e7fac6bd3ec)

7 years agocherry-ignore: add the swizzle blorp_clear fix
Emil Velikov [Wed, 15 Mar 2017 18:53:24 +0000 (18:53 +0000)]
cherry-ignore: add the swizzle blorp_clear fix

Addressed an earlier commit [ccdd5b3738e] which did not land in
branch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: add sha256 checksums for 17.0.1
Emil Velikov [Sat, 4 Mar 2017 15:53:51 +0000 (15:53 +0000)]
docs: add sha256 checksums for 17.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: add release notes for 17.0.1
Emil Velikov [Sat, 4 Mar 2017 15:44:59 +0000 (15:44 +0000)]
docs: add release notes for 17.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoUpdate version to 17.0.1
Emil Velikov [Sat, 4 Mar 2017 15:32:34 +0000 (15:32 +0000)]
Update version to 17.0.1

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl/wayland: Don't use DRM format codes for SHM
Daniel Stone [Mon, 13 Feb 2017 14:06:10 +0000 (14:06 +0000)]
egl/wayland: Don't use DRM format codes for SHM

The wl_drm interface (akin to X11's DRI2) uses the standard set of DRM
FourCC format codes. wl_shm copies this, except for ARGB8888/XRGB8888,
which use their own definitions.

Make sure we only use wl_shm format codes when we're working with
wl_shm. Otherwise, using swrast with 32bpp formats would fail with an
error.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Daniel Stone <daniels@collabora.com> (v1)
Fixes: cb5e799448 ("egl/wayland: unify dri2_wl_create_surface implementations")

v2: [Emil Velikov: move to dri2_wl_create_window_surface]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com> (IRC)
(cherry picked from commit a1727aa75ed252cd19c296ccf83cb595be971744)

7 years agoconfigure.ac: Drop LLVM compiler flags more radically
Michel Dänzer [Thu, 9 Feb 2017 04:00:03 +0000 (13:00 +0900)]
configure.ac: Drop LLVM compiler flags more radically

Drop all -m*, -W*, -O*, -g* and -f* flags, with the exception of
-fno-rtti, which must be used if it's part of the llvm-config --cxxflags
output. We don't want LLVM to dictate the flags we use, and it can even
cause build failures, e.g. if LLVM and Mesa are built with different
compilers.

While we're at it, eat any whitespace preceding dropped flags as well.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 0f53404565b9ef9da9d7022b5732463acd496742)
Nominated-by: Marek Olšák <marek.olsak@amd.com>
Bugzilla: https://bugs.freedesktop.org/100028

7 years agogallium/u_queue: set num_threads correctly if not all threads start
Grazvydas Ignotas [Sun, 26 Feb 2017 00:44:07 +0000 (02:44 +0200)]
gallium/u_queue: set num_threads correctly if not all threads start

If i-th thread could not be created it means we have i threads,
not i+1, because we start from 0.

Fixes: 404d0d5 "gallium/u_queue: add an option to have multiple worker threads"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 7f268cf12b39d1de8ff38cf5beea50298cf841c2)

7 years agogallium/u_queue: fix a crash with atexit handlers
Grazvydas Ignotas [Sun, 26 Feb 2017 00:44:06 +0000 (02:44 +0200)]
gallium/u_queue: fix a crash with atexit handlers

Commit 4aea8fe ("gallium/u_queue: fix random crashes when the app calls
exit()") added a atexit handler which calls
util_queue_killall_and_wait() for each queue to stop the threads.
However the app is also free to use atexit handlers to clean up things,
leading to util_queue_destroy() call which will also call
util_queue_killall_and_wait() for the same queue again, causing threads
being joined twice, and that is undefined. This happens with libglut,
for example. A simple fix is to just set num_threads to 0 as there are
no more valid threads after util_queue_killall_and_wait() returns.

Fixes: 4aea8fe "gallium/u_queue: fix random crashes when the app calls exit()"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 993612193575f5f218af52c4ed7525e15083548e)

7 years agoradv: fix txs for sampler buffers
Dave Airlie [Tue, 28 Feb 2017 06:26:55 +0000 (16:26 +1000)]
radv: fix txs for sampler buffers

I messed this up when I wrote it, this fixes:
dEQP-VK.memory.pipeline_barrier.*uniform_texel_buffer.*

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e66be3d3bb40160c7b7d57c596e4a25da168f1e6)

7 years agoamd/common: fix ASICREV_IS_POLARIS11_M for Polaris12
Marek Olšák [Tue, 28 Feb 2017 19:06:48 +0000 (20:06 +0100)]
amd/common: fix ASICREV_IS_POLARIS11_M for Polaris12

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8c838730d070cbf4da035593b374e3c5566cf944)

7 years agoegl/dri3: implement query surface hook
Brendan King [Fri, 17 Feb 2017 15:12:21 +0000 (15:12 +0000)]
egl/dri3: implement query surface hook

This is a DRI3 version of a change made for DRI2
(4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"),
that fixed failures in dEQP-EGL.functional.resize.surface_size.grow
and dEQP-EGL.functional.resize.surface_size.shrink.

Cc: Tapani Pälli <tapani.palli@intel.com>
Cc: Mark Janes <mark.a.janes@intel.com>
Cc: Chad Versace <chadversary@chromium.org>
Signed-off-by: Brendan King <Brendan.King@imgtec.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 884f65e1856733697a894c86f94803343cfa9a21)

7 years agoradv: fix depth format in blit2d.
Dave Airlie [Mon, 27 Feb 2017 06:59:06 +0000 (16:59 +1000)]
radv: fix depth format in blit2d.

For blitting we need to use the depth or stencil format, never
the combined.

This fixes:
dEQP-VK.texture.shadow.2d.nearest.less_or_equal_d32_sfloat_s8_uint
and a few others.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 800b82ea1315d68fccd8b1f218d614d26e7b6478)

7 years agoradv: Use correct size for availability flag.
Bas Nieuwenhuizen [Sun, 26 Feb 2017 21:36:10 +0000 (22:36 +0100)]
radv: Use correct size for availability flag.

Per spec, VK_QUERY_RESULT_64_BIT specifies the integer size and the
availability flag is an integer. We apparently handled this correctly
already for the copy to buffer case.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 43d833ae97daa73a2422b5696b587a7b46750e07)

7 years agoradv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.
Bas Nieuwenhuizen [Sun, 26 Feb 2017 21:26:30 +0000 (22:26 +0100)]
radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.

PKT3_OCCLUSION_QUERY hangs when used in a nested IB. This only
calls it when in a primary command buffer and we change
GetQueryPoolResults to not need it. CmdCopyQueryPoolResults
still needs it so we break that behavior for secondary command buffers.
However, that would hang already and using an unitialized value is
better than a hang.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 8ea34a98c06af4e3ce00ea665ee07480bcbd199f)

7 years agoradv: Reset emitted compute pipeline when calling secondary cmd buffer.
Bas Nieuwenhuizen [Sun, 26 Feb 2017 19:01:26 +0000 (20:01 +0100)]
radv: Reset emitted compute pipeline when calling secondary cmd buffer.

Otherwise if the new compute pipeline is the same as the last used
pipeline before the call, we don't emit it again.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit bb878db7eb94e48476a920d66174a45da2585e19)

7 years agoradeonsi: fix broken tessellation on Carrizo and Stoney
Marek Olšák [Wed, 22 Feb 2017 18:56:26 +0000 (19:56 +0100)]
radeonsi: fix broken tessellation on Carrizo and Stoney

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

Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 35915af6c9ab4bdc0f1f8584ca346602405bd7e4)

7 years agoconfigure.ac: check require_basic_egl only if egl enabled
Leo Liu [Thu, 23 Feb 2017 18:37:58 +0000 (13:37 -0500)]
configure.ac: check require_basic_egl only if egl enabled

Otherwise the configuration fails when building independant libs
like vdpau, vaapi or omx

Fixes: 1ac40173c2a ("configure.ac: simplify EGL requirements for
drivers dependent on EGL")

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5398d006de3d2bd668e3fc4b80a3de0c101a3e43)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
configure.ac

7 years agor300g: only allow byteswapped formats on big endian
Grazvydas Ignotas [Fri, 10 Feb 2017 23:01:40 +0000 (01:01 +0200)]
r300g: only allow byteswapped formats on big endian

They cause regressions on little endian.

Fixes: 172bfdaa9e ("r300g: add support for PIPE_FORMAT_x8R8G8B8_*")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98869
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 66d1cb587ac7b24fb04f26d30e686c3991fc8885)

7 years agoandroid: glsl: build shader cache sources
Mauro Rossi [Sat, 18 Feb 2017 21:23:18 +0000 (22:23 +0100)]
android: glsl: build shader cache sources

Fixes the following building errors:

external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference
 to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)'
external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference
 to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)'
clang++: error: linker command failed with exit code 1
...
external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference
 to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)'
external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference
 to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

Fixes: 9f8dc3bf03e ("utils: build sha1/disk cache only with
Android/Autoconf")
Acked-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 9e3d66c1e58f14d9c5e8df2a5ba7fdcf04b3258e)

7 years agoandroid: radeonsi: fix sid_table.h generated header include path
Mauro Rossi [Wed, 8 Feb 2017 07:14:05 +0000 (08:14 +0100)]
android: radeonsi: fix sid_table.h generated header include path

generated-sources-dir-for macro replaces intermediates-dir-for
and LOCAL_MODULE_CLASS is defined as required by new macro,
in order to avoid the following building error:

external/mesa/src/gallium/drivers/radeonsi/si_debug.c:29:10: fatal error: 'sid_tables.h' file not found
         ^
1 error generated.

Fixes: 730574c58e8 ("android: ac/debug: move sid_tables.h generation and
IB decode to amd/common")
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 933988901ab14b3c950272b60a56cb48265076b0)

7 years agoandroid: fix droid_create_image_from_prime_fd_yuv for YV12
Tapani Pälli [Thu, 2 Feb 2017 12:05:46 +0000 (14:05 +0200)]
android: fix droid_create_image_from_prime_fd_yuv for YV12

Earlier changes introduced is_ycrcb flag which checks the component
order of u and v components. Condition for setting the flag was
incorrect, with ycrcb we are supposed to have cr before cb.

This patch (together with a fix in our gralloc) fixes corrupted
rendering from 'test-opengl-gl2_yuvtex' native test and corrupted
gallery thumbnail in application switcher on Android-IA.

Fixes: 51727b1cf57e8c4630767eb9ead207b102ffa489
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 0a2dcd3a8ac4bf18cd6ec2f778c9ef859ef90a51)