OSDN Git Service
Chih-Wei Huang [Thu, 20 Apr 2017 07:53:26 +0000 (15:53 +0800)]
Merge remote-tracking branch 'mesa/17.0' into marshmallow-x86
Chih-Wei Huang [Thu, 20 Apr 2017 07:52:49 +0000 (15:52 +0800)]
Revert "android: change some PIPE to SVGA3D format mappings"
Seems we don't need this now.
This reverts commit
ec8dd7fc8139eb385aa7a13afd292f014aeb45ed.
Emil Velikov [Mon, 17 Apr 2017 13:42:37 +0000 (14:42 +0100)]
docs: add sha256 checksums for 17.0.4
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Mon, 17 Apr 2017 13:38:04 +0000 (14:38 +0100)]
docs: add release notes for 17.0.4
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Mon, 17 Apr 2017 13:33:57 +0000 (14:33 +0100)]
Update version to 17.0.4
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Fabio Estevam [Sat, 4 Mar 2017 22:07:27 +0000 (19:07 -0300)]
loader: Move non-error message to debug level
Currently when running mesa on imx6 the following loader warnings
are seen:
MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
Using display 0x1920948 with EGL version 1.4
As this is not an error message, change it to debug level in
order to have a cleaner log output.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
78c57726335fe22cb4579bcf562d2394adc234b5)
Nominated-by: Rob Clark <robdclark@gmail.com> (IRC)
Alex Smith [Thu, 30 Mar 2017 19:03:58 +0000 (21:03 +0200)]
radv: Invalidate L2 for TRANSFER_WRITE barriers
CP DMA and PKT3_WRITE_DATA (in CmdUpdateBuffer) don't (currently) write
through L2. Therefore, to make these writes visible to later accesses
we must invalidate L2 rather than just writing it back, to avoid the
possibility that stale data is read through L2.
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
[Bas: patch is a backport for 17.0 of the cherry-pick below]
(cherry picked from commit
bc5d587a80b64fb3e0a5ea8067e6317fbca2bbc5)
Julien Isorce [Wed, 15 Mar 2017 17:40:25 +0000 (17:40 +0000)]
radeon_drm_bo: explicitly check return value of drmCommandWriteRead
CID
1313492
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit
521860b2a92bab6394546e6af8709c07e2292033)
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
Julien Isorce [Mon, 27 Feb 2017 13:42:17 +0000 (13:42 +0000)]
radeon: initialize hole variable before calling container_of
Like in a few other places in that radeon_drm_bo.c file.
CID 715739.
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit
ce27b27c38acd5a92cf45e7ddc2434f2c04191ee)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99515
Nominated-by: Mauro Rossi <issor.oruam@gmail.com>
Julien Isorce [Fri, 10 Mar 2017 17:20:56 +0000 (17:20 +0000)]
winsys/radeon: check null return from radeon_cs_create_fence in cs_flush
Follow-up of patch:
"radeon_cs_create_fence: check null return from radeon_winsys_bo_create"
radeon_drm_cs_flush
radeon_cs_create_fence
radeon_winsys_bo_create
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit
d08c0930af8aaef5bdf80df618bb906e0b349830)
[Emil Velikov: resolve trivial conflicts]
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/winsys/radeon/drm/radeon_drm_cs.c
Julien Isorce [Fri, 10 Mar 2017 17:16:05 +0000 (17:16 +0000)]
winsys/radeon: check null in radeon_cs_create_fence
Fixes the following segmentation fault:
radeon_drm_cs_add_buffer (bo=0x0) at radeon_drm_cs.c
-> if (!bo->handle)
(gdb) bt
0 radeon_drm_cs_add_buffer (bo=0x0) at radeon_drm_cs.c
1 0x00007fffe73575de in radeon_cs_create_fence radeon_drm_cs.c
2 0x00007fffe7358c48 in radeon_drm_cs_flush radeon_drm_cs.c
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit
d09edb01468ca385b6a8ffe29ac434dc42a78d07)
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Wed, 12 Apr 2017 11:05:25 +0000 (12:05 +0100)]
Revert "freedreno: fix memory leak"
This reverts commit
c57a03585052e3bd7d61d1307cae9a922e663c20.
As requested by Rob Clark
"This seems to be causing a performance regression (reported by
Nicolas).. and the leak it fixes is quite hypothetical. (Ie. hit by
apps that destroy/create context many times.)
On master, I think this can be solved by switching on 'reorder' by
default but that is probably too much of a behaviour change for
stable."
Jerome Duval [Wed, 22 Feb 2017 16:02:51 +0000 (16:02 +0000)]
haiku/winsys: fix dt prototype args
Add the missing front_private, introduced with earlier commit.
(cherry picked from commit
62e27170a7f7a90091b4121002b7ce209ac7ccb0)
Fixes:
2b676570960 ("gallium/swrast: fix front buffer blitting. (v2)")
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: add commit message, fixes tag]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Jerome Duval [Wed, 22 Feb 2017 16:01:24 +0000 (16:01 +0000)]
haiku: build fixes around debug defines
Move the os/os_misc.h include further up, since it's the one that
implicitly provides the PIPE_OS_HAIKU define.
(cherry picked from commit
40b0c8666c337fd0fdff42ce70703cd300abcf0c)
Fixes:
373f118c6c7 ("gallium: do not wrap header inclusion in")
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: add commit message, fixes tag]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Kenneth Graunke [Tue, 11 Apr 2017 15:33:20 +0000 (08:33 -0700)]
i965: Set kernel features before computing max GL version.
We check these bitfields when computing the Haswell max GL version.
We need to set them ahead of time, or they won't exist, and all our
checks will fail. That sets the max core profile GL version to 4.2.
This introduces the bizarre situation where asking for a GL context
with version 4.3+ fails, but asking for a GL core profile context
with version <= 4.2 actually promotes you a 4.5 context.
GLX_MESA_query_renderer also reported the bogus 4.2 value.
Now it shows 4.5.
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reported-and-tested-by: Rafael Ristovski <rafael.ristovski@gmail.com>
(cherry picked from commit
02ccd8f52cffcc25e5fefdd0f900cf04230395f4)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/intel_screen.c
Kenneth Graunke [Fri, 3 Mar 2017 02:27:32 +0000 (18:27 -0800)]
i965: Skip register write detection when possible.
Detecting register write support by trial and error introduces a
stall at screen creation time, which it would be nice to avoid.
Certain command parser versions guarantee this will work (see the
giant comment in intelInitScreen2 below, or a few commits ago):
- Ivybridge: version >= 1 (kernel v3.16)
- Baytrail: version >= 2 (kernel v3.19)
- Haswell: version >= 7 (kernel v4.8)
For simplicity, we don't bother with version 1 in this patch.
This assumes that the user hasn't disabled aliasing PPGTT via a kernel
command line parameter. Don't do that - you're only breaking things.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit
5e29af5f772c1e1b02a4cc46d2f7d3b5d2151ad8)
Kenneth Graunke [Fri, 3 Mar 2017 02:21:31 +0000 (18:21 -0800)]
i965: Set screen->cmd_parser_version to 0 if we can't write registers.
If we can't write registers, then the effective command parser version
is 0 - it may exist, but it's not usefully enabling anything.
See kernel commit
1ca3712ca3429a617ed6c5f87718e4f6fe4ae0c6 (in v4.8)
where the kernel starts doing this for us. This makes us do more or
less the same thing on older kernels.
This should preserve a bit of sanity by allowing us to perform a
screen->cmd_parser_version > N check to determine that we really can
use the features promised by command parser version N.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit
31693a13f8fbc52d4f19f1e8800a4edabeecbe19)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/intel_screen.c
Kenneth Graunke [Fri, 3 Mar 2017 02:12:28 +0000 (18:12 -0800)]
i965: Document the sad story of the kernel command parser.
This should help us figure out the complexities of which kernel
versions we need to get various features on various platforms.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit
4a2ad6b145b4dd0d19a8e5e0ee6bed09e08ce0eb)
Ilia Mirkin [Sat, 8 Apr 2017 22:31:35 +0000 (18:31 -0400)]
nouveau: when mapping a persistent buffer, synchronize on former xfers
If the buffer is being used, we should wait for those uses to be
complete before returning the map.
Fixes: GL45-CTS.direct_state_access.buffers_functional
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit
d9cc58d6ec56e676b1285508a4118a83f5325833)
Ilia Mirkin [Sat, 8 Apr 2017 18:56:16 +0000 (14:56 -0400)]
nvc0: increase texture buffer object alignment to 256 for pre-GM107
We currently don't pass the low byte of the address via the surface
info, so in order to work with images, these have to implicitly be
aligned to 256. The proprietary driver also doesn't go out of its way to
provide lower alignment.
Fixes GL45-CTS.texture_buffer.texture_buffer_texture_buffer_range
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
8036809799c453b02f4c8fedbb5faaeb19af90c2)
Ilia Mirkin [Sat, 8 Apr 2017 03:23:25 +0000 (23:23 -0400)]
nvc0/ir: fix overwriting of offset register with interpolateAtOffset
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit
57a744025a2f705d29f60b0eac6e50f8a1ea6203)
Ilia Mirkin [Sat, 8 Apr 2017 00:17:47 +0000 (20:17 -0400)]
nvc0/ir: fix LSB/BFE/BFI implementations
Overwriting the src register is a very bad idea - it logically maps onto
the TGSI registers, and so is effectively overwriting the source values.
Reported-by: Boyan Ding <boyan.j.ding@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit
60f5766db48fe81f55f4b7be47c2be27bdbe2c10)
Jason Ekstrand [Wed, 5 Apr 2017 20:41:56 +0000 (13:41 -0700)]
i965/blorp: Bump the batch space estimate
Commit
f938354362655a378d474c5f79c52cea9852ab91 recently increased the
alignment on vertex buffer data from 32 to 64. This caused us to
consume a bit more batch than we were before and we now go over the
estimate by a small amount on certain blits on gen8+. This commit bumps
then gen8 batch estimate by a bit to compensate. Haswell and older
still seems to be well within the limit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100582
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
c9c39812b91c8104bc0bea16053312547846249c)
Alex Deucher [Wed, 5 Apr 2017 13:40:53 +0000 (09:40 -0400)]
radeonsi: add new polaris10 pci id
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
d921af62f5761b331039eee1497861b5826ecf82)
Jason Ekstrand [Fri, 31 Mar 2017 22:23:35 +0000 (15:23 -0700)]
i965/blorp: Align vertex buffers to 64B
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
f938354362655a378d474c5f79c52cea9852ab91)
[Emil Velikov: brw_state_batch has different signature]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/genX_blorp_exec.c
Jason Ekstrand [Fri, 31 Mar 2017 22:21:04 +0000 (15:21 -0700)]
anv/blorp: Align vertex buffers to 64B
This fixes issues seen when adding support for full 48-bit addresses.
The 48-bit addresses themselves have nothing to do with it other than
that it caused the kernel to place buffers slightly differently so they
interacted differently with the caches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
5d1ba2cb04f58b0c887304f0b8adda0b5623a710)
Jason Ekstrand [Mon, 3 Apr 2017 19:25:15 +0000 (12:25 -0700)]
anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex
When the shader does not set one of these values, they are supposed to
get a default value of 0. We have hardware bits in 3DSTATE_CLIP for
this but haven't been setting them. This fixes the intermittent failure
of dEQP-VK.geometry.layered.3d.render_to_default_layer.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
c6f69eea6ac549fc2ffa46944de4dd82c9b53329)
Jason Ekstrand [Wed, 29 Mar 2017 22:16:15 +0000 (15:16 -0700)]
i965/fs: Always provide a default LOD of 0 for TXS and TXL
We already provide a default LOD for textureQueryLevels and texture() on
non-fragment stages. However, there are more cases where one is needed
such as textureSize(gsampler2DMS*) in SPIR-V. Instead of trying to list
out all of the cases one at a time, just provide the default for all TXS
and TXL operations. This fixes a shader validation error in the new
Sascha deferredmultisampling demo which uses textureSize(gsampler2DMS).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100391
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
3503b2714b98684a2ceba5f4fd9a5bfbfbcaad38)
Marek Olšák [Thu, 23 Mar 2017 23:55:55 +0000 (00:55 +0100)]
targets: export radeon winsys_create functions to silence LLVM warning
It silences the following radeonsi LLVM warning due to a previous
commit adding an LLVM workaround:
"mesa: for the -simplifycfg-sink-common option: may only occur zero or one
times!"
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by; Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
18b12bf53351e1a902dc1f2e527a94ec8d8f3eff)
Michal Srb [Tue, 28 Mar 2017 20:39:28 +0000 (23:39 +0300)]
st: Add cubeMapFace parameter to st_finalize_texture.
st_finalize_texture always accesses image at face 0, but it may not be
set if we are working with cubemap that had other face set.
This fixes crash in piglit
same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit
52f9ccefcb75a9d42307890d7714b1cd92e864cb)
Thomas Hellstrom [Tue, 28 Mar 2017 19:32:22 +0000 (21:32 +0200)]
gbm/dri: Flush after unmap
Drivers may queue dma operations on the context at unmap time so we need
to flush to make sure the data gets to the bo. Ideally the application
would take care of this, but since there appears to be no exported gbm
flush functionality we need to explicitly flush at unmap time.
This fixes a problem where kmscube on vmwgfx in rgba textured mode would
render using an uninitialized texture rather than the intended
rgba pattern.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
ba8df2286a50117011925e915cd832b4a79f126e)
Squashed with commit
gbm/dri: Check dri extension version before flush after unmap
The commit mentioned below required the __DRI2FlushExtension to have
version 4 or above, for GBM functionality. That broke GBM with some
classic dri drivers. Relax that requirement so that we only flush
after unmap if we have version 4 or above. Drivers that require the flush
for correct functionality should implement the desired version.
Fixes:
ba8df228 ("gbm/dri: Flush after unmap")
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit
18e2aa063ca8e2aeb22a72253891e6f8f5d0d96b)
Craig Stout [Wed, 29 Mar 2017 19:14:30 +0000 (12:14 -0700)]
anv/cmd_buffer: fix host memory leak
push_constants must be free'd.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100452
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
1da7a11de8113932871487efaeb2674a3d1c644a)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/vulkan/anv_cmd_buffer.c
Emil Velikov [Wed, 12 Apr 2017 09:30:37 +0000 (10:30 +0100)]
Revert "cherry-ignore: add the Flush after unmap in gbm/dri fix"
This reverts commit
3a84f6fd4330a00a8d89c24d569dbb450832602d.
The fix in question has been properly addressed and does not cause
regressions.
Chih-Wei Huang [Thu, 23 Mar 2017 03:55:39 +0000 (11:55 +0800)]
egl/android: avoid using global variable
This is a cleanup of the software renderer patches.
Use dri2_dpy->gralloc instead of a global variable gr_module.
Avoid calling hw_get_module multiple times and remove some
duplicate code.
Chih-Wei Huang [Wed, 22 Mar 2017 17:25:27 +0000 (01:25 +0800)]
egl/android: simplify swrastPutImage
Just call swrastPutImage2 with stride = 0.
Chih-Wei Huang [Wed, 22 Mar 2017 17:13:23 +0000 (01:13 +0800)]
egl/android: fix pbuffer handling
If the type is not EGL_WINDOW_BIT, swrastUpdateBuffer just ignore it
and return normally. However, dri2_surf->buffer could be null that
results in some apps crashing.
Check dri2_surf->buffer on return to avoid the error.
WuZhen [Sat, 31 Dec 2016 10:34:34 +0000 (18:34 +0800)]
android: egl: add support for software rasterizer
This commit enables software rendering on android with llvmpipe.
The system boots fine and Antutu 3D benchmark passes.
This commit incorporates some further work done by
Paulo Sergio Travaglia <pstglia@gmail.com> and
Mauro Rossi <issor.oruam@gmail.com>.
WuZhen [Sat, 31 Dec 2016 09:57:11 +0000 (17:57 +0800)]
android: support creating texture from gralloc buffer
WuZhen [Sat, 31 Dec 2016 09:16:55 +0000 (17:16 +0800)]
drisw: support fence externsion and image extension
Adds a new type of winsys handle type that allows passing
a pointer sized handle to winsys.
WuZhen [Sat, 31 Dec 2016 08:19:06 +0000 (16:19 +0800)]
android: add Android.mk for llvmpipe
This commit enables llvmpipe when using swrast on android.
WuZhen [Wed, 24 Feb 2016 13:36:10 +0000 (21:36 +0800)]
android: enable x86 asm and sse4 for x86 and x86_64
Support multilib compilation use runtime feature selection.
NO_REF_TASK
Tested: local run
Change-Id: Iee7961effdecde09cfbdaf09455bfb0912699ae3
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Chih-Wei Huang [Tue, 22 Nov 2016 05:08:30 +0000 (13:08 +0800)]
android: re-generate git_sha1.h if HEAD updated
The git HEAD may not be updated if we are on a named branch.
Check if HEAD is updated from git logs.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Andres Gomez [Sat, 1 Apr 2017 15:47:00 +0000 (18:47 +0300)]
docs: add sha256 checksums for 17.0.3
Signed-off-by: Andres Gomez <agomez@igalia.com>
Andres Gomez [Sat, 1 Apr 2017 14:29:34 +0000 (17:29 +0300)]
docs: add release notes for 17.0.3
Signed-off-by: Andres Gomez <agomez@igalia.com>
Andres Gomez [Sat, 1 Apr 2017 12:12:39 +0000 (15:12 +0300)]
Update version to 17.0.3
Signed-off-by: Andres Gomez <agomez@igalia.com>
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>
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>
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>
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)
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)
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)
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
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)
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
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)
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)
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)
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
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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
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)
Mauro Rossi [Sat, 4 Mar 2017 14:36:55 +0000 (15:36 +0100)]
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)
Mauro Rossi [Tue, 1 Nov 2016 13:22:54 +0000 (14:22 +0100)]
HACK: i915: enable image external sampling
This hack is the alternative way of enabling GL_OES_EGL_image_external
as opposed to defining mesa environment variable in init.rc
As a reference this hack works on i915 also because of commit
"android: a workaround for GL_INVALID_OPERATION (0x502) error"
which allows for external image being mapped despited not being dma-buf
Mauro Rossi [Tue, 1 Nov 2016 00:03:52 +0000 (01:03 +0100)]
i915: add mock implementation of GL_OES_EGL_image_external (v2)
This is similar to commit
7420c9dab4aaf87e6b840410226c296c4668a48f
but for the i915 driver, as neeeded in android-x86.
In version v2, as per i965 implementation,
the extension GL_OES_EGL_image_external is not enabled by default.
The by-the-book way to enable the extension is mesa environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external" to be set in init.rc
Mauro Rossi [Fri, 15 Jan 2016 21:14:01 +0000 (22:14 +0100)]
android: always define __STDC_CONSTANT_MACROS
Android porting of commit
647d8e95d17b32100995d806b9b2a26a35541042
"configure.ac: always define __STDC_CONSTANT_MACROS"
Mauro Rossi [Wed, 4 Jan 2017 19:26:39 +0000 (20:26 +0100)]
android: drop static linking of R600 LLVM libraries
Inspired by Chih-Wei Huang and Zhen Wu similar patches
Linking against llvm with both static and shared may be avoided,
provided that libLLVM shared library for device supports
whole static R600/AMDGPU libraries, necessary for radeonsi/amdgpu.
Complementary changes, limited to android external/llvm project
are necessary to correclty build libLLVM
Tested with marshmallow-x86 and nougat-x86 builds
Mauro Rossi [Mon, 2 Jan 2017 13:42:25 +0000 (14:42 +0100)]
android: mesa/st: fix libcxx/stlport dependency (v2)
Fixes the following building error with both libcxx and stlport:
target C++: libmesa_st_mesa <= external/mesa/src/mesa/state_tracker/st_glsl_to_nir.cpp
external/mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:58:21: fatal error: algorithm: No such file or directory
compilation terminated.
build/core/binary.mk:432: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_tgsi.o' failed
make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_tgsi.o] Error 1
make: *** Waiting for unfinished jobs....
(v1) was inspired by st/mesa part in Zhen Wu
c278beb "android: fix building on lollipop"
(v2) Mauro: use 'LOCAL_C_INCLUDES += external/libcxx/include' and add stlport dependency for kitkat-x86
Zhen: define LOCAL_CXX_STL := libc++
Ilia Mirkin [Wed, 22 Jun 2016 02:59:50 +0000 (22:59 -0400)]
nv30 locking fixes
Ilia Mirkin [Tue, 7 Jun 2016 00:30:48 +0000 (20:30 -0400)]
nouveau: more locking - make sure that fence work is always done with
the push mutex acquired
Ilia Mirkin [Sat, 4 Jun 2016 23:26:26 +0000 (19:26 -0400)]
WIP nouveau: add locking
Chih-Wei Huang [Sat, 28 May 2016 04:04:54 +0000 (12:04 +0800)]
virgl: fix null pointer exceptions
Chih-Wei Huang [Fri, 18 Mar 2016 09:29:13 +0000 (17:29 +0800)]
android: change some PIPE to SVGA3D format mappings
This is a try-and-error patch which fixes the Android-x86 black screen
issue of VMware on Linux host. Tested OK on VMware Workstation 12 Player.
But the red and blue colors are exchanged.
Note it doesn't affect VMware on Windows host.
Chih-Wei Huang [Tue, 16 Feb 2016 21:05:51 +0000 (05:05 +0800)]
android: clean gallium_dri_intermediates
Since BOARD_GPU_DRIVERS is updated, clean up gallium_dri to ensure
it is rebuilt correctly.
Mauro Rossi [Mon, 2 Jan 2017 12:03:18 +0000 (13:03 +0100)]
android: re-generate git_sha1.h if git HEAD updated (v2)
Generated header git_sha1.h has to depend on the git HEAD
otherwise it will never be updated.
v2: use absolute path for --git-dir option, in order to support cases
when Android.gen.mk is invoked by other makefiles
Rob Herring [Wed, 10 Feb 2016 18:09:14 +0000 (12:09 -0600)]
Android: enable texture-float
This is required by freedreno at least for GLES3 support.
See docs/patents.txt for information about turning this on for s/w
renderers.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Mon, 25 Jan 2016 17:54:01 +0000 (11:54 -0600)]
egl/android: fix missing gralloc_drm_get_gem_handle dependency
gralloc_drm_get_gem_handle has been removed from AOSP drm_gralloc.
Remove the dependency on it and just access the struct
gralloc_drm_handle_t directly. Maybe there's a better way than accessing
the gralloc private data.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Fri, 8 Jan 2016 15:25:37 +0000 (09:25 -0600)]
HACK: glsl: disable error on non-constant array indexing
DRM HWC has a shader program that hits this error. Work-around it by
ignoring the error.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Wed, 10 Feb 2016 22:56:56 +0000 (16:56 -0600)]
gallium: introduce load_pipe_screen()
Introduce load_pipe_screen() public entry point for other code which
dlopen()'s gralloc_dri.so for purposes of loading a pipe_screen. This way
drm_gralloc can avoid static linking of each gallium winsys and driver,
and avoid duplicated logic to figure out which pipe driver to load.
This is based on Rob Clark's work. I moved it into pipe_loader which seems
to be a better spot.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Thu, 17 Dec 2015 14:18:33 +0000 (08:18 -0600)]
Android: Export gallium_dri include files
This doesn't work yet because the exported include files can't be picked
up by the android build system unless the library has a 'lib' prefix.
Signed-off-by: Rob Herring <robh@kernel.org>
Mauro Rossi [Sat, 22 Aug 2015 09:07:34 +0000 (11:07 +0200)]
android: build with c++11 on android lollipop
lollipop-x86 needs -std=c++11 (build with libcxx),
while kitkat-x86 cannot use -std=c++11
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Chih-Wei Huang [Fri, 23 Jan 2015 19:53:48 +0000 (03:53 +0800)]
android: a workaround for GL_INVALID_OPERATION (0x502) error
Inspired by the nice work of Paulo Sergio (pstglia):
"Bypass a check for external target enabled only for images
created with EGL_EXT_image_dma_buf_import - this makes
Android graphical components receive a GL_INVALID_OPERATION (0x502)."