OSDN Git Service

android-x86/external-mesa.git
8 years agonv50/ir: avoid messing up arg1 of PFETCH
Ilia Mirkin [Sat, 23 May 2015 05:57:41 +0000 (01:57 -0400)]
nv50/ir: avoid messing up arg1 of PFETCH

There can be scenarios where the "indirect" arg of a PFETCH becomes
known, and so the code will attempt to propagate it. Use this
opportunity to just fold it into the first argument, and prevent the
load propagation pass from touching PFETCH further.

This fixes gs-input-array-vec4-index-rd.shader_test and
vs-output-array-vec4-index-wr-before-gs.shader_test on nvc0 at least.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fa7f9f123b70f313d3c073b52c9c16b4b8df28f8)

8 years agonvc0: a geometry shader can have up to 1024 vertices output
Ilia Mirkin [Sat, 23 May 2015 21:35:42 +0000 (17:35 -0400)]
nvc0: a geometry shader can have up to 1024 vertices output

The 1024 is already reported everywhere, not sure where this 0x1ff came
from.

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

8 years agoi965/fs: Fix implied_mrf_writes for scratch writes
Jason Ekstrand [Wed, 20 May 2015 00:35:29 +0000 (17:35 -0700)]
i965/fs: Fix implied_mrf_writes for scratch writes

We build the entire message in the generator so all the MRF writes are
implied.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 6ca67f62e885f0e42c0cef2db5c0ae837adfe646)

8 years agonvc0/ir: LOAD's can't be used for shader inputs
Ilia Mirkin [Fri, 22 May 2015 23:03:58 +0000 (19:03 -0400)]
nvc0/ir: LOAD's can't be used for shader inputs

We forgot to convert to VFETCH in case of indirect access. Fix that.

This avoids crashes on the new gs-input-array-vec4-index-rd and
vs-output-array-vec4-index-wr-before-gs but they still fail.

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

8 years agonv50/ir: guess that the constant offset is the starting slot of array
Ilia Mirkin [Fri, 22 May 2015 23:02:41 +0000 (19:02 -0400)]
nv50/ir: guess that the constant offset is the starting slot of array

When we get something like IN[ADDR[0].x+5], we will now guess that we
should look at IN[5] for the "base" information.

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

8 years agonvc0/ir: set ftz when sources are floats, not just destinations
Ilia Mirkin [Fri, 22 May 2015 20:40:08 +0000 (16:40 -0400)]
nvc0/ir: set ftz when sources are floats, not just destinations

In the case of a compare, the destination might be a predicate, but we
still want to flush denorms.

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

8 years agoget-pick-list.sh: Require explicit "10.5" for nominating stable patches
Emil Velikov [Wed, 3 Jun 2015 10:49:19 +0000 (11:49 +0100)]
get-pick-list.sh: Require explicit "10.5" for nominating stable patches

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

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agodocs: Add sha256sums for the 10.5.6 release
Emil Velikov [Sun, 24 May 2015 09:43:31 +0000 (10:43 +0100)]
docs: Add sha256sums for the 10.5.6 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoAdd release notes for the 10.5.6 release
Emil Velikov [Sat, 23 May 2015 08:02:41 +0000 (09:02 +0100)]
Add release notes for the 10.5.6 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoUpdate version to 10.5.6
Emil Velikov [Sat, 23 May 2015 07:58:02 +0000 (08:58 +0100)]
Update version to 10.5.6

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotargets/osmesa: drop the -module tag from LDFLAGS
Emil Velikov [Wed, 20 May 2015 20:51:52 +0000 (21:51 +0100)]
targets/osmesa: drop the -module tag from LDFLAGS

Gallium equivalent of commit 06ff751f97f(darwin: Fix install name of
libOSMesa)

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 36438f0db6c7c696df73ced12684f4df9d2b47e5)

8 years agodarwin: Fix install name of libOSMesa
Jeremy Huddleston Sequoia [Wed, 11 Feb 2015 10:32:33 +0000 (02:32 -0800)]
darwin: Fix install name of libOSMesa

Passing -module to glibtool causes the resulting library to be called
libSomething.so rather than libSomething.dylib on darwin.

Regardless if libOSMesa is a library or a module, it has been used as
the former for quite some time. Update the build to reflect that and
resolve the naming issue.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 06ff751f97fbeb62a23936cd8f9c54733920d082)

8 years agoswrast: Build fix for darwin
Jeremy Huddleston Sequoia [Fri, 2 Jan 2015 03:48:40 +0000 (19:48 -0800)]
swrast: Build fix for darwin

Fixes regression from commit 64b1dc44495890cbc2c7c5509cb830264020998c

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90147
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
CC: Emil Velikov <emil.l.velikov@gmail.com>
CC: jon.turney@dronecode.org.uk
CC: ionic@macports.org
(cherry picked from commit 5b2d3480f57168d50ad24cf0b8c9244414bd3701)
Nominated-by: Emil Velikov <emil.l.velikov@gmail.com>
Squashed with commit

swrast: Build fix for Solaris

Fixes regression from commit 5b2d3480f57168d50ad24cf0b8c9244414bd3701

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 31cd2d75dc3844e40143f649fe383de17c152a13)

8 years agoegl/main: fix EGL_KHR_get_all_proc_addresses
Emil Velikov [Mon, 11 May 2015 23:30:16 +0000 (00:30 +0100)]
egl/main: fix EGL_KHR_get_all_proc_addresses

The extension requires that the address of the core functions should be
available via eglGetProcAddress. Currently the list is guarded by
_EGL_GET_CORE_ADDRESSES, which was only set for the scons (windows)
build.

Unconditionally enable it for all the builds (automake, android and
haiku) considering that the extension is not platform specific and is
always enabled.

v2: Drop the _EGL_GET_CORE_ADDRESSES macro altogether.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 448e01b2918c76dfff8abfbd56a606fdff8c356c)

Conflicts:
src/egl/main/eglapi.c

8 years agofreedreno: fix bug in tile/slot calculation
Rob Clark [Wed, 13 May 2015 18:36:03 +0000 (14:36 -0400)]
freedreno: fix bug in tile/slot calculation

This was causing corruption with hw binning on a306.  Unlikely that it
is a306 specific, but rather the smaller gmem size resulted in different
tile configuration which was triggering the bug at certain resolutions.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Cc: "10.4" and "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4925c35660b777ae6b33a1f87a2f74f3436c7c41)

8 years agofreedreno: enable a306
Rob Clark [Tue, 12 May 2015 18:46:50 +0000 (14:46 -0400)]
freedreno: enable a306

Whitelist adreno 306 (as found in msm8916/apq8016).  Works pretty much
out of the box, although the smaller GMEM size requires more tiles to
fit 1920x1080, so bump up the max # of tiles as well.

Since it is just whitelist + trivial change, it makes sense to land on
all the active release branches.

Note that a305c ends up with gpu-id "306", hence a306 ends up with
gpu-id of "307".  Apparently that is what happens when you let the
marketing dept name things.

Cc: "10.4" and "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
(cherry picked from commit fcc7d6323bbea489219225f467d59192d538e95f)

8 years agomain: Complete error conditions for glInvalidate*Framebuffer.
Laura Ekstrand [Wed, 4 Feb 2015 22:21:17 +0000 (14:21 -0800)]
main: Complete error conditions for glInvalidate*Framebuffer.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b4368ac09db75cea412121ada6c12af1414feb50)

8 years agomain: Fix an error generated by FramebufferTexture
Laura Ekstrand [Mon, 20 Apr 2015 15:21:20 +0000 (17:21 +0200)]
main: Fix an error generated by FramebufferTexture

gl*FramebufferTexture should generate GL_INVALID_VALUE when the
texture doesn't exist.

[Fredrik: Split this change out from the next commit]

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 69bdc9dcb8e5d3648e8d96029d5988b8971de8dc)

8 years agomesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0
Fredrik Höglund [Sat, 9 May 2015 13:31:45 +0000 (15:31 +0200)]
mesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 8ba7ad8abc7d71131e17970203c991ccb1befbe6)

8 years agomain: Require that the texture exists in framebuffer_texture
Fredrik Höglund [Thu, 7 May 2015 18:28:23 +0000 (20:28 +0200)]
main: Require that the texture exists in framebuffer_texture

Generate GL_INVALID_OPERATION if the texture hasn't been created.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f9f5c822845698482d0d81eaa64bc13c2fd8852a)

8 years agoi965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().
Francisco Jerez [Sat, 31 Jan 2015 18:04:55 +0000 (20:04 +0200)]
i965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().

This problem can easily be reproduced with a number of
ARB_shader_image_load_store piglit tests, which use a buffer object as
PBO for a pixel transfer operation and later on bind the same buffer
to the pipeline as shader image -- The problem is not exclusive to
images though, and is likely to affect other kinds of buffer objects
that can be bound to the 3D pipeline, including vertex, index,
uniform, atomic counter buffers, etc.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit d247615e0d67a7c8eaeea3fece837229c8c9658c)

8 years agonvc0: switch mechanism for shader eviction to be a while loop
Ilia Mirkin [Sun, 10 May 2015 05:57:56 +0000 (01:57 -0400)]
nvc0: switch mechanism for shader eviction to be a while loop

This aligns it to work similarly to nv50. However there's no library
code there, so the whole thing can be freed. Here we end up with an
allocated node that's not attached to a specific program.

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

8 years agoradeonsi: add new bonaire pci id
Alex Deucher [Tue, 12 May 2015 17:13:05 +0000 (13:13 -0400)]
radeonsi: add new bonaire pci id

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

8 years agoclover: Implement locking of the wait_count, _chain and _status members of event.
Francisco Jerez [Sat, 9 May 2015 13:01:23 +0000 (16:01 +0300)]
clover: Implement locking of the wait_count, _chain and _status members of event.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a533d4edf1ea346dd9e343c71b2cd500fa550ef8)

8 years agoclover: Wrap event::_status in a method to prevent unlocked access.
Francisco Jerez [Sat, 9 May 2015 13:22:33 +0000 (16:22 +0300)]
clover: Wrap event::_status in a method to prevent unlocked access.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4022a468b2976c65e0d2afe9c9ac5804729e8641)

8 years agoclover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.
Francisco Jerez [Sat, 9 May 2015 11:47:38 +0000 (14:47 +0300)]
clover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.

Refactor ::trigger and ::abort to split out the operations that access
concurrently modified data members and require locking from the
recursive and possibly re-entrant part of these methods.  This will
avoid some deadlock situations when locking is implemented.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2232b929fd9ca6f00c8dab9dc45c386986be922d)

8 years agost/mesa: make sure to create a "clean" bool when doing i2b
Ilia Mirkin [Thu, 7 May 2015 03:29:33 +0000 (23:29 -0400)]
st/mesa: make sure to create a "clean" bool when doing i2b

i2b has to work for all integers, not just 1. INEG would not necessarily
result with all bits set, which is something that other operations can
rely on by e.g. using AND (or INEG for b2i).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 2b5355c8ab383d86bb6332dd29c417a6a1bc52bd)

8 years agoclover: Fix a bug with multi-threaded events v2
Tom Stellard [Thu, 26 Mar 2015 19:33:24 +0000 (19:33 +0000)]
clover: Fix a bug with multi-threaded events v2

It was possible for some events never to get triggered if one thread
was creating events and another threads was waiting for them.

This patch consolidates soft_event::wait() and hard_event::wait()
into event::wait() so that hard_event objects will now wait for
all their dependencies to be submitted before flushing the command
queue.

v2:
  - Rename variables
  - Use mutable varibales so we can keep event::wait() const
  - Open code signalled() call so mutex can be atted to signalled
    without deadlocking.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 9c4dc98b298c74015f2a7c21571bccf0a5b6cc98)

8 years agoclover: Add a mutex to guard queue::queued_events
Tom Stellard [Thu, 7 May 2015 13:57:14 +0000 (13:57 +0000)]
clover: Add a mutex to guard queue::queued_events

This fixes a potential crash where on a sequence like this:

Thread 0: Check if queue is not empty.
Thread 1: Remove item from queue, making it empty.
Thread 0: Do something assuming queue is not empty.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit f546902d9597429713c83e2caf6b69856bd7ba4d)

8 years agoglx/dri3: Add additional check for gpu offloading case
Axel Davy [Thu, 30 Apr 2015 22:20:34 +0000 (00:20 +0200)]
glx/dri3: Add additional check for gpu offloading case

Checks blitImage is implemented.
Initially having the __DRIimageExtension extension
at version 9 at least meant blitImage was supported.
However some implementation do advertise version >= 9
without implementing it.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
(cherry picked from commit c4ff6d00cd7dde4646ff96733f68d3ddbf540c2c)

8 years agoegl/wayland: properly destroy wayland objects
Axel Davy [Thu, 30 Apr 2015 22:03:32 +0000 (00:03 +0200)]
egl/wayland: properly destroy wayland objects

the wl_registry and the wl_queue allocated weren't destroyed.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
(cherry picked from commit 6aaf09b93b668a24b557e05195b9897e8cee8559)

8 years agomain: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDE
Marta Lofstedt [Thu, 7 May 2015 15:13:47 +0000 (17:13 +0200)]
main: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDE

The return type for GL_VERTEX_BINDING_STRIDE is missing,
this cause glGetIntegeri_v to fail.

Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4a8cd2799c2467b9916dd0ba672f05a394aa9b9f)

8 years agonv50/ir: only enable mul saturate on G200+
Ilia Mirkin [Sat, 9 May 2015 07:26:07 +0000 (03:26 -0400)]
nv50/ir: only enable mul saturate on G200+

Commit 44673512a84 enabled support for saturating fmul. However
experimentally this does not seem to work on the older chips. Restrict
the feature to G200 (NVA0) and later.

Reported-by: Pierre Moreau <pierre.morrow@free.fr>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90350
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit da136dc07ddb6147d181c96f475b94f6281efd73)

8 years agonvc0: reset the instanced elements state when doing blit using 3d engine
Ilia Mirkin [Sat, 9 May 2015 17:25:51 +0000 (13:25 -0400)]
nvc0: reset the instanced elements state when doing blit using 3d engine

Since we update num_vtxelts here, we could otherwise end up with stale
instancing information in the upper bits which wouldn't otherwise get
reset. (Also we run the risk of the previous draw having set the first
element as instanced.)

This appears as one of the causes for the test pointed out in fdo#90363
to fail on nvc0.

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

8 years agonvc0: keep track of PGRAPH state in nvc0_screen
Ilia Mirkin [Fri, 8 May 2015 04:26:24 +0000 (00:26 -0400)]
nvc0: keep track of PGRAPH state in nvc0_screen

See identical commit for nv50. Destroying the current context and then
creating a new one or switching to another existing context would cause
the "current" state to not be properly initialized, so we save it off in
the screen.

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

8 years agonv50: keep track of PGRAPH state in nv50_screen
Ilia Mirkin [Fri, 8 May 2015 04:15:22 +0000 (00:15 -0400)]
nv50: keep track of PGRAPH state in nv50_screen

Normally this is kept in nv50_context, and on switching the active
context, the state is copied from the previous context. However when the
last context is destroyed, this is lost, and a new context might later
be created. When the currently-active context is destroyed, save its
state in the screen, and restore it when setting the current context.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363
Reported-by: Matteo Bruni <matteo.mystral@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Matteo Bruni <matteo.mystral@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit f617029db3f8786d94c64f1a73c42b89b6d261fa)

8 years agonv50/ir: only propagate saturate up if some actual folding took place
Ilia Mirkin [Fri, 8 May 2015 22:54:08 +0000 (18:54 -0400)]
nv50/ir: only propagate saturate up if some actual folding took place

The former logic would copy the saturate up to any mul with an immediate
if there was a subsequent mul with a saturate. However we only want to
do that if we collapsed 2 muls by multiplying their immediates (or were
able to put the immediate in as a post-multiplier).

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

8 years agodraw: (trivial) fix out-of-bounds vector initialization
Roland Scheidegger [Wed, 6 May 2015 13:56:17 +0000 (15:56 +0200)]
draw: (trivial) fix out-of-bounds vector initialization

Was off-by-one. llvm says inserting an element with an index higher than the
number of elements yields undefined results. Previously such inserts were
ignored but as of llvm revision 235854 the vector gets replaced with undef,
causing failures.
This fixes piglit gl-3.2-layered-rendering-gl-layer, as mentioned in
https://llvm.org/bugs/show_bug.cgi?id=23424.

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

8 years agomesa: fix shininess check for ffvertex_prog v2
Tim Rowley [Mon, 4 May 2015 21:54:27 +0000 (16:54 -0500)]
mesa: fix shininess check for ffvertex_prog v2

Switch to using VERT_BIT_GENERIC macro, as varying_vp_inputs is a
bitmask.

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

8 years agodocs: Add sha256 sums for the 10.5.5 release
Emil Velikov [Mon, 11 May 2015 21:02:03 +0000 (22:02 +0100)]
docs: Add sha256 sums for the 10.5.5 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoAdd release notes for the 10.5.5 release
Emil Velikov [Mon, 11 May 2015 19:19:33 +0000 (20:19 +0100)]
Add release notes for the 10.5.5 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoUpdate version to 10.5.5
Emil Velikov [Mon, 11 May 2015 19:14:23 +0000 (20:14 +0100)]
Update version to 10.5.5

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoi965: Add XRGB8888 format to intel_screen_make_configs
Boyan Ding [Wed, 25 Mar 2015 11:36:54 +0000 (19:36 +0800)]
i965: Add XRGB8888 format to intel_screen_make_configs

Some application, such as drm backend of weston, uses XRGB8888 config as
default. i965 doesn't provide this format, but before commit 65c8965d,
the drm platform of EGL takes ARGB8888 as XRGB8888. Now that commit
65c8965d makes EGL recognize format correctly so weston won't start
because it can't find XRGB8888. Add XRGB8888 format to i965 just as
other drivers do.

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89689
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
(cherry picked from commit 28090b30dd6b5977de085f48c620574214b6b4ba)

8 years agonv50/ir: fix asFlow() const helper for OP_JOIN
Ilia Mirkin [Thu, 30 Apr 2015 03:33:27 +0000 (23:33 -0400)]
nv50/ir: fix asFlow() const helper for OP_JOIN

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

8 years agonvc0/ir: fix predicated PFETCH emission
Ilia Mirkin [Thu, 30 Apr 2015 03:05:44 +0000 (23:05 -0400)]
nvc0/ir: fix predicated PFETCH emission

src1 would contain the predicate, which would get emitted as a register
source by an undiscerning srcId helper. Work around this in the same way
as in emitTEX.

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

Squashed with commit

nvc0/ir: fix predicated PFETCH for real

Commit a9d08a250 accidentally didn't make use of the new src1 variable.
Use it.

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

8 years agogk110/ir: fix set with a register dest to not auto-set the abs flag
Ilia Mirkin [Wed, 29 Apr 2015 22:01:53 +0000 (18:01 -0400)]
gk110/ir: fix set with a register dest to not auto-set the abs flag

This was causing src0 to always have the absolute value flag set.

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

8 years agor300: do not link against libdrm_intel
Emil Velikov [Wed, 15 Apr 2015 13:44:02 +0000 (14:44 +0100)]
r300: do not link against libdrm_intel

Accidentally added since the introduction of the file.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit b124dc2b70a1ba546d1ce46578036d263a4287fe)

8 years agonvc0/ir: flush denorms to zero in non-compute shaders
Ilia Mirkin [Tue, 28 Apr 2015 07:30:08 +0000 (03:30 -0400)]
nvc0/ir: flush denorms to zero in non-compute shaders

This will set the FTZ flag (flush denorms to zero) on all opcodes that
can take it.

This resolves issues in Unigine Heaven 4.0 where there were solid-filled
boxes popping up.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89455
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 6fe0d4f0354418c6e68dd352996e9891ddd4dfd6)

8 years agoi965: Disallow linear blits that are not cacheline aligned.
Kenneth Graunke [Tue, 21 Apr 2015 19:32:38 +0000 (12:32 -0700)]
i965: Disallow linear blits that are not cacheline aligned.

The BLT engine on Gen8+ requires linear surfaces to be cacheline
aligned.  This restriction was added as part of converting the BLT to
use 48-bit addressing.

The main user, intel_emit_linear_blit, now handles this properly.
But we might also have linear miptrees; just refuse to blit those.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88521
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 5957da1edb9ad504d8af83878c10c3a24e41fc6c)

8 years agoi965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.
Kenneth Graunke [Wed, 15 Apr 2015 10:04:33 +0000 (03:04 -0700)]
i965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.

The BLT engine on Gen8+ requires linear surfaces to be cacheline
aligned.  This restriction was added as part of converting the BLT to
use 48-bit addressing.

intel_emit_linear_blit needs to handle blits that are not cacheline
aligned, as we use it for arbitrary glBufferSubData calls and subrange
mappings.

Since intel_emit_linear_blit uses 1 byte per pixel, we can use the src/dst
pixel X offset field to represent the unaligned portion, and subtract
that from the address so it's cacheline aligned.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88521
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8c17d53823c77ac1c56b0548e4e54f69a33285f1)

8 years agodraw: fix prim ids when there's no gs
Roland Scheidegger [Thu, 23 Apr 2015 16:13:32 +0000 (18:13 +0200)]
draw: fix prim ids when there's no gs

We were resetting the prim id count for each run of the prim assembler,
hence this only worked when the draw calls were very small (the exact limit
depending on the vertex size), since larger draw calls get split up.
So, do the same as we do already if there's a gs, reset it to zero explicitly
for every new instance (this possibly could use the same variable but that
isn't doable without some heavy refactoring and I'm not sure it makes sense).

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

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f2a7fd9943fcb7d3de3bc2b21907e0a157b88e96)

9 years agodocs: Add sha256 sums for the 10.5.4 release
Emil Velikov [Fri, 24 Apr 2015 21:51:25 +0000 (22:51 +0100)]
docs: Add sha256 sums for the 10.5.4 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoAdd release notes for the 10.5.4 release
Emil Velikov [Fri, 24 Apr 2015 21:27:09 +0000 (22:27 +0100)]
Add release notes for the 10.5.4 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoUpdate version to 10.5.4
Emil Velikov [Fri, 24 Apr 2015 21:22:47 +0000 (22:22 +0100)]
Update version to 10.5.4

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoglsl: rewrite glsl_type::record_key_hash() to avoid buffer overflow
Brian Paul [Thu, 16 Apr 2015 21:29:18 +0000 (15:29 -0600)]
glsl: rewrite glsl_type::record_key_hash() to avoid buffer overflow

This should be more efficient than the previous snprintf() solution.
But more importantly, it avoids a buffer overflow bug that could result
in crashes or unpredictable results when processing very large interface
blocks.

For the app in question, key->length = 103 for some interfaces.  The check
if size >= sizeof(hash_key) was insufficient to prevent overflows of the
hash_key[128] array because it didn't account for the terminating zero.
In this case, this caused the call to hash_table_string_hash() to return
different results for identical inputs, and then shader linking failed.

This new solution also takes all structure fields into account instead
of just the first 15 when sizeof(pointer)==8.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 31667e6237d30188d0b29e17f5b9892f10c0d83a)

9 years agoandroid: mesa: fix the path of the SSE4_1 optimisations
Emil Velikov [Sat, 28 Mar 2015 18:23:01 +0000 (18:23 +0000)]
android: mesa: fix the path of the SSE4_1 optimisations

Commit dd6f641303c(mesa: Build with subdir-objects.) removed the SRCDIR
variable, but forgot to update all references of it.

v2: Fix path - must be relative to LOCAL_PATH. (Chih-Wei)

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 669cfc267a1102ff903b3e562f9aa45a410e0312)

9 years agoandroid: add inital NIR build
Mauro Rossi [Fri, 27 Mar 2015 22:25:45 +0000 (22:25 +0000)]
android: add inital NIR build

Required by the i965 driver.

v2:
 - Split out the nir_builder_opcodes.h rules.
 - Do not unconditionally hide the python command - use $(hide)
 - Use LOCAL_EXPORT_C_INCLUDE_DIRS to manage includes for the generated
sources.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
[Emil Velikov: Split from a larger commit, v2]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 06619749a11651a50e353168c7c793082820585d)

9 years agoandroid: dri: link against libmesa_util
Emil Velikov [Fri, 27 Mar 2015 21:39:15 +0000 (21:39 +0000)]
android: dri: link against libmesa_util

The dri modules depend on symbols provided by it.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 618885f71fcacb3d68bf37fa23be36830d4178d2)

9 years agoandroid: add $(mesa_top)/src/mesa/main to the includes list
Emil Velikov [Sat, 28 Mar 2015 01:11:54 +0000 (01:11 +0000)]
android: add $(mesa_top)/src/mesa/main to the includes list

Required by the format_{un,}pack rework. Otherwise the build will fail
to locate the respective headers - format_{un,}pack.h

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 0afbd2df0485cd480979d9f4cdae00262d1a3c62)

9 years agoandroid: add HAVE__BUILTIN_* and HAVE_FUNC_ATTRIBUTE_* defines
Emil Velikov [Fri, 27 Mar 2015 20:10:35 +0000 (20:10 +0000)]
android: add HAVE__BUILTIN_* and HAVE_FUNC_ATTRIBUTE_* defines

All of those are available on gcc 4.5 and later with the current android
build using gcc 4.7.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 39a175e0c792f569dfe73de1b4d01b0caea43a01)

9 years agoandroid: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_H
Emil Velikov [Fri, 27 Mar 2015 18:57:46 +0000 (18:57 +0000)]
android: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_H

Otherwise we'll fail to find the drm.h header.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 8d90bfb724f89b04d703f869362cf2fc2a3d7567)

9 years agoandroid: egl: add libsync_cflags to the build
Emil Velikov [Fri, 27 Mar 2015 18:36:10 +0000 (18:36 +0000)]
android: egl: add libsync_cflags to the build

... via local_shared_libraries. Otherwise the sync/sync.h header won't
be found.

Note: 10.5 and earlier will need similar change in st/egl.

v2: Append the library to the local_shared_libraries list. (Chih-Wei)

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 2d06791f6f9e8ab37109be52e63d247bbbcb42d4)

9 years agoandroid: mesa: generate the format_{un,}pack.[ch] sources
Mauro Rossi [Fri, 27 Mar 2015 18:20:53 +0000 (18:20 +0000)]
android: mesa: generate the format_{un,}pack.[ch] sources

Missed out with commit e1fdcddafe9(mesa: Autogenerate format_unpack.c)

v2: Conditionaly print the python commands - s/@/$(hide) / (Chih-Wei)

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
[Emil Velikov: Split our from a larger commit.]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 5f7081eb90bc5a25f0740314fa22e04d189238ca)

9 years agoandroid: add $(mesa_top)/src include to the whole of mesa
Emil Velikov [Fri, 27 Mar 2015 16:13:50 +0000 (16:13 +0000)]
android: add $(mesa_top)/src include to the whole of mesa

Many parts of mesa already have the include with others depending on it
but it's missing. Add it once at the top makefile and be done with it.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
(cherry picked from commit 6fb801786604c270fae99c3d665dcebaa0bff3a6)

9 years agoandroid: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERS
Emil Velikov [Fri, 27 Mar 2015 11:40:42 +0000 (11:40 +0000)]
android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERS

... to manage the LIBDRM*_CFLAGS. The former is the recommended approach
by the Android build system developers while the latter has been
depreciated for quite some time.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 86919352e3da1c80409fdcb67c36f29a9687b7a9)

9 years agodrirc: Add "Second Life" quirk (allow_glsl_extension_directive_midshader).
Kenneth Graunke [Fri, 10 Apr 2015 17:24:33 +0000 (10:24 -0700)]
drirc: Add "Second Life" quirk (allow_glsl_extension_directive_midshader).

Appears to fix shader compilation.  Tested by starting the client,
dragging the "quality and speed" slider back and forth, and watching the
console output - instead of piles of "shader failed to compile", the CPU
seems to be busy compiling shaders.  I haven't actually tried to play.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69226
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71591
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 00bf7d2e9cd60dbd82d25b459c448e11c545a89a)

9 years agoglsl_to_tgsi: don't use a potentially-undefined immediate for ir_query_levels
Marek Olšák [Sat, 11 Apr 2015 12:55:26 +0000 (14:55 +0200)]
glsl_to_tgsi: don't use a potentially-undefined immediate for ir_query_levels

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

9 years agoglsl_to_tgsi: fix out-of-bounds constant access and crash for uniforms
Marek Olšák [Sat, 11 Apr 2015 11:49:38 +0000 (13:49 +0200)]
glsl_to_tgsi: fix out-of-bounds constant access and crash for uniforms

This fixes piglit shaders@glsl-fs-uniform-array-loop-unroll with immediate
shader compilation - it's a compiler test, so it has never been translated
to TGSI before.

Cc: 10.4 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 14c5bc3b9a6b03a8e42ef79da66d8b81b239cf96)

9 years agoi965: Rewrite ir_tex to ir_txl with lod 0 for vertex shaders
Kristian Høgsberg [Tue, 14 Apr 2015 15:02:18 +0000 (15:02 +0000)]
i965: Rewrite ir_tex to ir_txl with lod 0 for vertex shaders

The ir_tex opcode turns into a sample or sample_c message, which will try to
compute derivatives to determine the lod. This produces garbage for
non-fragment shaders where the sample coordinates don't correspond to
subspans.

We fix this by rewriting the opcode from ir_tex to ir_txl and setting the
lod to 0.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89457
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kristian Høgsberg <kristian.h.kristensen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 993a6288f72fa98932df7cdb6f64d9dd645e670d)

9 years agonir: Fix typo in "ushr by 0" algebraic replacement
Ian Romanick [Tue, 14 Apr 2015 15:40:22 +0000 (08:40 -0700)]
nir: Fix typo in "ushr by 0" algebraic replacement

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Cc: "10.5" <mesa-stable@lists.freedestkop.org>
(cherry picked from commit bc672e261c5f7ff56cd2b8f6b518ebfdc0163bb7)

9 years agoi965: Fix software primitive restart with indirect draws.
Kenneth Graunke [Sat, 11 Apr 2015 09:21:48 +0000 (02:21 -0700)]
i965: Fix software primitive restart with indirect draws.

new_prim was declared as a stack variable within a nested scope; we
tried to retain a pointer to that data beyond the scope, which is bogus.

GCC with -O1 eliminated most of the code that set new_prim's fields.

Move the declaration to fix the bug.

v2: Also fix new_ib (thanks to Matt Turner and Ben Widawsky).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81025
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 406df68736a213f17f21a38a7c2da4ea15acd053)

9 years agost/mesa: align cube map arrays layers
Dave Airlie [Wed, 8 Apr 2015 00:00:27 +0000 (10:00 +1000)]
st/mesa: align cube map arrays layers

We create textures internally for texsubimage, and we use
the values from sub image to create a new texture, however
we don't align these to valid sizes, and cube map arrays
must have an array size aligned to 6.

This fixes texsubimage cube_map_array on CAYMAN at least,
(it was causing  GPU hang and bad values), it probably
also fixes it on radeonsi and evergreen.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89957
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit cc5860e40787b3afe36856674f028e830685271b)

9 years agost/mesa: convert sub image for cube map arrays to 2d arrays for upload
Dave Airlie [Wed, 8 Apr 2015 00:59:20 +0000 (10:59 +1000)]
st/mesa: convert sub image for cube map arrays to 2d arrays for upload

Since we can subimage upload a number of cube map array layers,
that aren't a complete cube map array, we should specify things
as a 2D array and blit from that.

Suggested by Ilia Mirkin as an alternate fix for texsubimage
cube map array issues.

seems to work just as well.

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

9 years agoi965: Flush batchbuffer containing the query on glQueryCounter.
Mathias Froehlich [Sun, 12 Apr 2015 16:23:58 +0000 (18:23 +0200)]
i965: Flush batchbuffer containing the query on glQueryCounter.

This change fixes a regression with timer queries introduced with
commit 3eb6258. There the pending batchbuffer is flushed
only if glEndQuery is executed. This present change adds such
a flush to glQueryCounter which also schedules a value query
just like glEndQuery does. The patch fixes GPU timer queries
going mad from within osgviewer.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 1e1d5456ba3dff82301ad4bbdde2fb6e2f562fe3)

9 years agoradeonsi: remove unused si_dump_key()
Emil Velikov [Wed, 22 Apr 2015 15:10:47 +0000 (16:10 +0100)]
radeonsi: remove unused si_dump_key()

Accidentally added with commit 64d0f0e3b24(radeonsi: Cache
LLVMTargetMachineRef in context instead of in screen)

Reported-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agodocs: Add 256 sums for the 10.5.3 release
Emil Velikov [Sun, 12 Apr 2015 22:10:42 +0000 (23:10 +0100)]
docs: Add 256 sums for the 10.5.3 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoAdd release notes for the 10.5.3 release
Emil Velikov [Sun, 12 Apr 2015 21:29:06 +0000 (22:29 +0100)]
Add release notes for the 10.5.3 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoUpdate version to 10.5.3
Emil Velikov [Sun, 12 Apr 2015 21:21:07 +0000 (22:21 +0100)]
Update version to 10.5.3

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agodist: add the VG depedencies into the tarball
Emil Velikov [Wed, 8 Apr 2015 17:23:13 +0000 (18:23 +0100)]
dist: add the VG depedencies into the tarball

Otherwise the scons build will fail.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89905
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure.ac: error out if python/mako is not found when required
Emil Velikov [Mon, 23 Mar 2015 17:49:24 +0000 (17:49 +0000)]
configure.ac: error out if python/mako is not found when required

In case of using a distribution tarball (or a dirty git tree) one can
have the generated sources locally. Make configure.ac error out
otherwise, to alert that about the unmet requirement(s) of python/mako.

v2: Check only for a single file for each dependency.

Suggested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 4008975e6f4b2e15fceed4f07d8ec763dd0949d1)

9 years agoi965: Fix URB size for CHV
Ville Syrjälä [Mon, 19 Jan 2015 14:08:31 +0000 (16:08 +0200)]
i965: Fix URB size for CHV

Increase the device info .urb.size for CHV to match the default URB
size (192kB).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit 970dc2360372a7859691d690bd2f1976c3c97fb0)

9 years agonouveau: synchronize "scratch runout" destruction with the command stream
Marcin Ślusarz [Tue, 31 Mar 2015 20:04:31 +0000 (22:04 +0200)]
nouveau: synchronize "scratch runout" destruction with the command stream

When nvc0_push_vbo calls nouveau_scratch_done it does not mean
scratch buffers can be freed immediately. It means "when hardware
advances to this place in the command stream the scratch buffers
can be freed".

To fix it, just postpone scratch runout destruction after current
fence is signalled.

The bug existed for a very long time. Nobody noticed, because
"scratch runout" code path is rarely executed.

Fixes hang at the very beginning of first mission in "Serious Sam 3"
on nve7/gk107. It manifested as:

nouveau E[   PFIFO][0000:01:00.0] read fault at 0x000a9e0000 [PTE] from GR/GPC0/PE_2 on channel 0x007f853000 [Sam3[17056]]

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit f9e2295560f9b4869fa2a94933c1881ec7970af4)

9 years agonv50,nvc0: limit the y-tiling of 3d textures to the first level's tiling
Ilia Mirkin [Sun, 5 Apr 2015 21:40:44 +0000 (17:40 -0400)]
nv50,nvc0: limit the y-tiling of 3d textures to the first level's tiling

We limit y-tiling to 0x20 when depth is involved. However the function is
run for each miplevel, and the hardware expects miplevel 0 to have the
highest tiling settings. Perform the y-tiling limit on all levels of a
3d texture, not just the ones that have depth.

Fixes:
  texelFetch fs sampler3D 98x129x1-98x129x9

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Nick Tenney <nick.tenney@gmail.com> # GT216
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ae720c66cb91c2640dfd6707446899694a24ab5b)

9 years agoi965: Do not render primitives in non-zero streams then TF is disabled
Iago Toral Quiroga [Mon, 9 Mar 2015 14:17:03 +0000 (15:17 +0100)]
i965: Do not render primitives in non-zero streams then TF is disabled

Haswell hardware seems to ignore Render Stream Select bits from
3DSTATE_STREAMOUT packet when the SOL stage is disabled even if
the PRM says otherwise. Because of this, all primitives are sent
down the pipeline for rasterization, which is wrong. If SOL is
enabled, Render Stream Select is honored and primitives bound to
non-zero streams are discarded after stream output.

Since the only purpose of primives sent to non-zero streams is to
be recorded by transform feedback, we can simply discard all geometry
bound to non-zero streams then transform feedback is disabled
to prevent it from ever reaching the rasterization stage.

Notice that this patch introduces a small change in the behavior we
get when a geometry shader emits more vertices than the maximum declared:
before, a vertex that was emitted to a non-zero stream when TF was
disabled would still count for the purposes of checking that we don't
exceed the maximum number of output vertices declared by the shader. With
this change, these vertices are completely ignored and won't increase
the output vertex count, making more room for other (hopefully more
useful) vertices.

Fixes piglit test arb_gpu_shader5-emitstreamvertex_nodraw on Haswell
and Broadwell.

v2 (Ken): Drop is_haswell check in favor of doing this unconditionally.
Broadwell needs the workaround as well, and it doesn't hurt to do it in
general.  Also tweak comments - the Haswell PRM does actually mention
this ("Command Reference: Instructions" page 797).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83962
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 2042a2f961a07e04eaca0347e42859c249325531)

9 years agoi965: Add forgotten multi-stream code to Gen8 SOL state.
Kenneth Graunke [Fri, 27 Mar 2015 00:21:10 +0000 (17:21 -0700)]
i965: Add forgotten multi-stream code to Gen8 SOL state.

Fixes Piglit's arb_gpu_shader5-xfb-streams-without-invocations.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit f368d0fa1fe37a58780ee555d4a9ccf15474782b)

9 years agoi965: Fix instanced geometry shaders on Gen8+.
Kenneth Graunke [Sat, 4 Apr 2015 09:00:52 +0000 (02:00 -0700)]
i965: Fix instanced geometry shaders on Gen8+.

Jordan added this in commit 741782b5948bb3d01d699f062a37513c2e73b076 for
Gen7 platforms.  I missed this when adding the Broadwell code.

Fixes Piglit's spec/arb_gpu_shader5/invocation-id-{basic,in-separate-gs}
with MESA_EXTENSION_OVERRIDE=GL_ARB_gpu_shader5 set.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit f9e5dc0a85df8dbfb8213ff772dfeb218972db12)

9 years agonv50: allocate more offset space for occlusion queries
Ilia Mirkin [Sat, 4 Apr 2015 03:57:43 +0000 (23:57 -0400)]
nv50: allocate more offset space for occlusion queries

Commit 1a170980a09 started writing to q->data[4]/[5] but kept the
per-query space at 16, which meant that in some cases we would write
past the end of the buffer. Rotate by 32, like nvc0 does. This ensures
that we always have 32 bytes in front of us, and the data writes will go
within the allocated space.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89679
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Nick Tenney <nick.tenney@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ba353935a392d2a43422f1d258456336b40b60ea)

9 years agoxmlpool: don't forget to ship the MOS
Emil Velikov [Sun, 29 Mar 2015 12:46:31 +0000 (13:46 +0100)]
xmlpool: don't forget to ship the MOS

This will allow us to finally remove python from the build time
dependencies list. Considering that you're building from a release
tarball of course :-)

Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Reported-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit a665b9b3c89095923cf2251895afc69c9f79aafe)

9 years agoclover: Return CL_BUILD_ERROR for CL_PROGRAM_BUILD_STATUS when compilation fails v2
Tom Stellard [Tue, 24 Mar 2015 17:17:22 +0000 (17:17 +0000)]
clover: Return CL_BUILD_ERROR for CL_PROGRAM_BUILD_STATUS when compilation fails v2

v2:
  - Don't use _errs map

Cc: 10.5 10.4 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit fda7558057a301a5a0ee1cb4d68f09ea39b03bb3)

9 years agoradeonsi: Cache LLVMTargetMachineRef in context instead of in screen
Michel Dänzer [Thu, 26 Mar 2015 02:32:59 +0000 (11:32 +0900)]
radeonsi: Cache LLVMTargetMachineRef in context instead of in screen

Fixes a crash in genymotion with several threads compiling shaders
concurrently.

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

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
(cherry picked from commit d64adc3a79e419062432cfa8d1cbc437676a3fbd)

Conflicts:
src/gallium/drivers/radeonsi/si_shader.c

9 years agofreedreno/a3xx: point size should not be divided by 2
Ilia Mirkin [Tue, 17 Mar 2015 05:00:38 +0000 (01:00 -0400)]
freedreno/a3xx: point size should not be divided by 2

The division is probably a holdover from the days when the fixed point
inline functions generated by headergen were broken.

Also reduce the maximum point size to 4092 (vs 4096), which is what the
blob does.

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

9 years agofreedreno/a3xx: fix 3d texture layout
Ilia Mirkin [Sun, 15 Mar 2015 20:38:42 +0000 (16:38 -0400)]
freedreno/a3xx: fix 3d texture layout

The SZ2 field contains the layer size of a lower miplevel. It only
contains 4 bits, which limits the maximum layer size it can describe. In
situations where the next miplevel would be too big, the hardware
appears to keep minifying the size until it hits one of that size.
Unfortunately the hardware's ideas about sizes can differ from
freedreno's which can still lead to issues. Minimize those by stopping
to minify as soon as possible.

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

9 years agonv50/ir/gk110: fix offset flag position for TXD opcode
Ilia Mirkin [Fri, 27 Mar 2015 22:38:24 +0000 (18:38 -0400)]
nv50/ir/gk110: fix offset flag position for TXD opcode

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

9 years agonv50/ir: take postFactor into account when doing peephole optimizations
Ilia Mirkin [Wed, 25 Mar 2015 22:00:00 +0000 (18:00 -0400)]
nv50/ir: take postFactor into account when doing peephole optimizations

Multiply operations can have a post-factor on them, which other ops
don't support. Only perform the peephole optimizations when there is no
post-factor involved.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89758
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 49b86007aa2bb599ada6cdbed7ff56246917f12e)

9 years agost/mesa: update arrays when the current attrib has been updated
Ilia Mirkin [Thu, 26 Mar 2015 19:14:22 +0000 (15:14 -0400)]
st/mesa: update arrays when the current attrib has been updated

Fixes the recently-sent gl-2.0-vertex-const-attr piglit test. Makes sure
to revalidate arrays when only the current attribute has been updated
via glVertexAttrib*.

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

9 years agost_glsl_to_tgsi: only do mov copy propagation on temps (v2)
Dave Airlie [Wed, 25 Mar 2015 23:17:39 +0000 (09:17 +1000)]
st_glsl_to_tgsi: only do mov copy propagation on temps (v2)

Don't propagate ARRAYs

This should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=89759

v2: just specify arrays so we get input propagation
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 91e3533481d6921c4b46109742d6f67b7f897f86)

9 years agodocs: Add sha256 sums for the 10.5.2 release
Emil Velikov [Sat, 28 Mar 2015 18:50:31 +0000 (18:50 +0000)]
docs: Add sha256 sums for the 10.5.2 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoAdd release notes for the 10.5.2 release
Emil Velikov [Sat, 28 Mar 2015 18:42:51 +0000 (18:42 +0000)]
Add release notes for the 10.5.2 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoUpdate version to 10.5.2
Emil Velikov [Sat, 28 Mar 2015 18:36:03 +0000 (18:36 +0000)]
Update version to 10.5.2

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agocherry-ignore: add commit non applicable for 10.5
Emil Velikov [Sat, 28 Mar 2015 18:33:46 +0000 (18:33 +0000)]
cherry-ignore: add commit non applicable for 10.5

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>