Commit Graph

89777 Commits

Author SHA1 Message Date
Kenneth Graunke 4dc785728a i965: Drop duplicate #defines now that we've bumped libdrm requirements.
We've updated our libdrm requirement, and it will already provide these.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-06 12:38:15 -08:00
Samuel Pitoiset 4317cd96d3 getteximage: fix _mesa_GetTextureSubImage()
Oops.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100088
Fixes: 5ae54c0cf7 ("getteximage: avoid to lookup textures with id 0")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-06 21:36:56 +01:00
Grazvydas Ignotas ff494fe999 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>
2017-03-06 11:28:48 -08:00
Grazvydas Ignotas b384c23b9e i965: don't require 64bit cmpxchg
There are still some distributions trying to support unfortunate people
with old or exotic CPUs that don't have 64bit atomic operations. The
only thing preventing compile of the Intel driver for them seems to be
initialization of a debug variable.

v2: use call_once() instead of unsafe code, as suggested by Matt Turner

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93089
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
2017-03-06 11:07:20 -08:00
Alex Smith 290d7e892d 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>
2017-03-06 19:46:14 +01:00
Samuel Pitoiset 052c81faa1 mesa/main: remove useless check in _mesa_IsSampler()
_mesa_lookup_samplerobj() returns NULL if sampler is 0.

v2: use _mesa_lookup...(...) != NULL

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-06 18:01:38 +01:00
Samuel Pitoiset 5ae54c0cf7 getteximage: avoid to lookup textures with id 0
This fixes the following assertion when the key is 0.

main/hash.c:181: _mesa_HashLookup_unlocked: Assertion `key' failed.

Fixes: 633c959fae ("getteximage: Return correct error value when texure object is not found")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-06 18:01:38 +01:00
Marek Olšák 5ac6ab701f docs/relnotes/17.1.0: document the new LLVM requirement 2017-03-06 17:35:36 +01:00
Marek Olšák c416d8a3bc gallium/radeon: don't monitor SDMA busyness on EG/Cayman/SI
It's always busy.

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

Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 14:13:04 +01:00
Marek Olšák 7e1faa79d3 radeonsi: drop support for LLVM 3.6 & 3.7
They are too old.

Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 14:13:04 +01:00
Marek Olšák d5d74fe2b5 radeonsi: set the convergent attribute where needed
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 14:13:04 +01:00
Marek Olšák ef883fc554 gallivm,ac: add LP_FUNC_ATTR_CONVERGENT
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 14:13:04 +01:00
Marek Olšák 9b08f044be radeonsi: fix LLVM 3.9 - don't use non-matching attributes on declarations
Call site attributes are used since LLVM 4.0.

This also reverts commit b19caecbd6
"radeon/ac: fix intrinsic version check", because this is the correct fix.

Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 14:13:04 +01:00
Mark Thompson 6398a09213 st/omx: Set end-of-frame flag on bitstream output buffers
Since all output buffers are whole frames, this should always be set.

Technically, setting this flag is is optional (see OpenMAX IL section
3.1.2.7.1), but some clients assume that it will be used and
therefore buffer indefinitely thinking that all output buffers are
fragments of the first frame when it is not set.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-03-06 14:05:43 +01:00
Mark Thompson 6d95358aac st/omx: Fix port format enumeration
From OpenMAX IL section 4.3.5:
"The value of nIndex is the range 0 to N-1, where N is the number of
formats supported by the port.  There is no need for the port to
report N, as the caller can determine N by enumerating all the
formats supported by the port.  Each port shall support at least one
format.  If there are no more formats, OMX_GetParameter returns
OMX_ErrorNoMore (i.e., nIndex is supplied where the value is N or
greater)."

Only one format is supported, so N = 1 and OMX_ErrorNoMore should be
returned if nIndex >= 1.  The previous code here would return the
same format for all values of nIndex, resulting in an infinite loop
when a client attempts to enumerate all formats.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-03-06 14:05:17 +01:00
Mark Thompson 0798fddb50 st/va: Fix forward/backward referencing for deinterlacing
The VAAPI documentation is not very clear here, but the intent
appears to be that a forward reference is forward from a frame in the
past, not forward to a frame in the future (that is, forward as in
forward prediction, not as in a forward reference in source code).
This interpretation is derived from other implementations, in
particular the i965 driver and the gstreamer client.

In order to match those other implementations, this patch swaps the
meaning of forward and backward references as they currently appear
for motion-adaptive deinterlacing.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-03-06 14:05:05 +01:00
Mark Thompson c93a157078 st/va: Support fractional framerate in misc parameter
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Acked-by: Christian König <christian.koenig@amd.com>
2017-03-06 14:04:59 +01:00
Andy Furniss 012b6d3fe7 st/va encode handle ntsc framerate rate control
Tested with ffmpeg and gst-vaapi. Without this bits per
frame is set way too low for fractional framerates.

v2: Mark Thompson: simplify calculation.
    Use float.

Signed-off-by: Andy Furniss <adf.lists@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-03-06 14:04:24 +01:00
Bas Nieuwenhuizen f3dc318464 radv: Use the new L2 writeback flag.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 09:16:05 +01:00
Bas Nieuwenhuizen 66e12d4073 radv: Add L2 writeback.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 09:15:51 +01:00
Timothy Arceri 6b657cecd5 util/disk_cache: fix make check
Fixes make check after 11f0efec2e which caused disk cache
to create an additional directory.
2017-03-06 16:39:55 +11:00
Dave Airlie 2e73ccb485 radv/ac: use bitfield extract new intrinsics.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-03-06 15:27:33 +10:00
Dave Airlie 9c7309b09b radv/ac: move to new kill build.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-03-06 15:27:33 +10:00
Dave Airlie a2652719f3 radv/ac: move to using new export intrinsics.
This uses the new code in build to do exports.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-03-06 15:27:33 +10:00
Dave Airlie 2830ece0fc radv/ac: switch to new intrinsics for pkrtz and clamp.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-03-06 15:27:32 +10:00
Dave Airlie cc59e24a6b 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>
2017-03-05 23:32:36 +00:00
Grazvydas Ignotas 6aaadd8728 radv: use VK_NULL_HANDLE for handles
Avoids warnings on 32bit.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-03-06 00:10:42 +01:00
Grazvydas Ignotas a5446e3187 radv: check for upload alloc failure
Mainly to avoid gcc's complains about uninitialized ptr and offset use
later in that code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-03-06 00:10:42 +01:00
Grazvydas Ignotas 666fe622e1 radv: don't use uninitialized value on failure
Mainly to avoid a warning.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-03-06 00:10:42 +01:00
Grazvydas Ignotas 5458b02305 radv: avoid casting warnings on 32bit
Use the same helpers as for other handle<->pointer conversions.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-03-06 00:10:42 +01:00
Bas Nieuwenhuizen fb7e4e16e7 radv/amdgpu: Add some debug flags.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 00:10:23 +01:00
Bas Nieuwenhuizen 682248db45 radv: Cache command buffers in command pool.
So that we don't keep allocating BOs for the IBs and upload buffers.

We run some risk of memory increase with e.g. a bimodal size
distribution of command buffers, but I haven't noticed a significant
increase with dota2 and talos.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-06 00:07:51 +01:00
Timothy Arceri e3a01a5d1b Revert "glsl: Switch to disable-by-default for the GLSL shader cache"
This reverts commit 0f60c6616e.

Piglit and all games tested so far seem to be working without
issue. This change will allow wide user testing and we can decided
before the next release if we need to turn it off again.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-06 09:38:07 +11:00
Timothy Arceri ee8d2e2804 docs: update envvars.html to reflect having a cache per arch 2017-03-06 09:33:20 +11:00
Timothy Arceri 11f0efec2e util/disk_cache: support caches for multiple architectures
Previously we were deleting the entire cache if a user switched
between 32 and 64 bit applications.

V2: make the check more generic, it should now work with any
platform we are likely to support.

V3: Use suggestion from Emil to make even more generic/fix issue
with __ILP32__ not being declared on gcc for regular 32-bit builds.

Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-03-06 09:27:01 +11:00
Grazvydas Ignotas 175d4aa8f5 util/disk_cache: mark read-only arguments const
No functional changes.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-03-06 09:23:17 +11:00
Dave Airlie b19caecbd6 radeon/ac: fix intrinsic version check
Reported-by: 375gnu@gmail.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100068

Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-03-06 06:05:58 +10:00
Bas Nieuwenhuizen a247215469 radv: Merge fast clear flushes.
Don't flush multiple times if we clear multiple attachments. Also allows
doing the depth clear in parallel with the fast color clears.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-03-05 20:40:31 +01:00
Tim Rowley a01a104216 relnotes: [swr] note addition of gs, increased llvm requirement
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-03-05 07:33:49 -06:00
Tim Rowley bb8a4242ff docs: update features.txt for swr geometry shaders
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-03-05 07:33:49 -06:00
Tim Rowley c307092557 swr: [rasterizer core] fix primID provoking vertex for GS
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-03-05 07:33:49 -06:00
Tim Rowley f1d7284117 swr: implement geometry shaders
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-03-05 07:33:49 -06:00
Tim Rowley 08a82363ba configure.ac: increase required swr llvm to 3.9.0
GS implementation uses the masked.{gather,store} intrinsics,
introduced in llvm-3.9.0.  swr llvm version requirement in
automake and scons now match (scons already needed >= 3.9).

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-03-05 07:33:49 -06:00
Kenneth Graunke 6f71d9adc1 i965: Clamp texture buffer size to GL_MAX_TEXTURE_BUFFER_SIZE.
The OpenGL 4.5 specification's description of TexBuffer says:

"The number of texels in the texture image is then clamped to an
 implementation-dependent limit, the value of MAX_TEXTURE_BUFFER_SIZE."

We set GL_MAX_TEXTURE_BUFFER_SIZE to 2^27.  For buffers with a byte
element size, this is the maximum possible size we can encode in
SURFACE_STATE.  If you bind a buffer object larger than this as a
texture buffer object, we'll exceed that limit and hit an isl assert:

   assert(num_elements <= (1ull << 27));

To fix this, clamp the size in bytes to MaxTextureSize / texel_size.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2017-03-04 22:46:50 -08:00
Emil Velikov eaf4a106bd automake: move wayland-drm prior to Vulkan
Earlier commit was picked from a larger series, but did not consider
that it removed the vulkan <> wayland-drm interdependency.

Rather than reverting everything, temporarily move wayland-drm further
up to resolve the issue. Since it [wayland-drm] does not have any
in-mesa dependencies that's perfectly safe.

Cc: Vedran Miletić <vedran@miletic.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100060
Fixes: e135ce6f08 ("vulkan: Build common Vulkan code earlier")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Javier Jardón <jjardon@gnome.org>
2017-03-04 23:44:14 +00:00
Mauro Rossi 6facb0c08f android: fix libz dynamic library dependencies
Fixes a series of libz related building errors:

target SharedLib: gallium_dri_32
(out/target/prod...SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so)
external/elfutils/libelf/elf_compress.c:117: error: undefined reference to 'deflateInit_'
...
external/elfutils/libelf/elf_compress.c:244: error: undefined reference to 'inflateEnd'
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)

Fixes: 85a9b1b "util/disk_cache: compress individual cache entries"
2017-03-04 21:47:26 +00:00
Timothy Arceri 28fd6556c3 svga: pass NULL to ureg_get_tokens()
The number of tokens in never used and the pointer is NULL checked
so just pass NULL.

Reviewed-by: Brian Paul <brianp@vmware.com>
2017-03-05 08:15:51 +11:00
Ilia Mirkin 8e6d67685e nvc0: take extra pushbuf space into account for pushbuf_space calls
See detailed explanation of why this is needed in commit eb60a89bc3.
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: eb60a89bc3 ("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>
2017-03-04 17:48:27 +01:00
Ilia Mirkin 32dd8d59b6 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>
2017-03-04 17:48:27 +01:00
Tapani Pälli 66b62be4bb android: fix outdir for gen_enum_to_str files
when files are being generated the value of $intermediates var content can be
completely random, this makes sure that outdir is the wanted one.

Fixes: 3f2cb699 ("android: vulkan: add support for libmesa_vulkan_util")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-04 16:38:33 +00:00