OSDN Git Service

android-x86/external-mesa.git
8 years agomesa: add GL_PROGRAM_PIPELINE support in KHR_debug calls
Ilia Mirkin [Thu, 18 Jun 2015 03:00:44 +0000 (23:00 -0400)]
mesa: add GL_PROGRAM_PIPELINE support in KHR_debug calls

This was apparently missed when ARB_sso support was added.
Add label support to pipeline objects just like all the other
debug-related objects.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 770f141866654dab969302f720228497f0fb35fd)

8 years agoglsl: add version checks to conditionals for builtin variable enablement
Ilia Mirkin [Wed, 17 Jun 2015 19:09:26 +0000 (15:09 -0400)]
glsl: add version checks to conditionals for builtin variable enablement

A number of builtin variables have checks based on the extension being
enabled, but were missing enablement via a higher GLSL version.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b6e238023c4f8af2328dc3bcab1d73a3e19f4fbb)

8 years agoi965: Export format comparison for blitting between miptrees
Chris Wilson [Fri, 5 Jun 2015 13:45:18 +0000 (14:45 +0100)]
i965: Export format comparison for blitting between miptrees

Since the introduction of

commit 536003c11e4cb1172c540932ce3cce06f03bf44e
Author: Boyan Ding <boyan.j.ding@gmail.com>
Date:   Wed Mar 25 19:36:54 2015 +0800

    i965: Add XRGB8888 format to intel_screen_make_configs

winsys buffers no longer have an alpha channel. This causes
_mesa_format_matches_format_and_type() to reject previously working BGRA
uploads from using the BLT fast path. Instead of using the generic
routine for matching formats exactly, export the slightly more relaxed
check from intel_miptree_blit() which importantly allows the blitter
routine to apply a small number of format conversions.

References: https://bugs.freedesktop.org/show_bug.cgi?id=90839
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Alexander Monakov <amonakov@gmail.com>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 922c0c9fd526ce19b87bc74a3159dec7705c1de1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/mesa/drivers/dri/i965/intel_pixel_draw.c

8 years agoi915: Blit RGBX<->RGBA drawpixels
Chris Wilson [Fri, 5 Jun 2015 13:33:36 +0000 (14:33 +0100)]
i915: Blit RGBX<->RGBA drawpixels

The blitter already has code to accommodate filling in the alpha channel
for BGRX destination formats, so expand this to also allow filling the
alpha channgel in RGBX formats.

More importantly for the next patch is moving the test into its own
function for the purpose of exporting the check to the callers.

v2: Fix alpha expansion as spotted by Alexander with the fix suggested by
Kenneth

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Alexander Monakov <amonakov@gmail.com>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c2d0606827412b710dcaed80268fc665de8c9c5d)

8 years agoi965: Fix HW blitter pitch limits
Chris Wilson [Fri, 5 Jun 2015 12:49:08 +0000 (13:49 +0100)]
i965: Fix HW blitter pitch limits

The BLT pitch is specified in bytes for linear surfaces and in dwords
for tiled surfaces. In both cases the programmable limit is 32,767, so
adjust the check to compensate for the effect of tiling.

v2: Tweak whitespace for functions (Kenneth)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8da79b8378ae87474d8c47ad955e4833edf98359)

8 years agodocs: Add sha256sums for the 10.5.8 release
Emil Velikov [Sat, 20 Jun 2015 15:37:16 +0000 (16:37 +0100)]
docs: Add sha256sums for the 10.5.8 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoAdd release notes for the 10.5.8 release
Emil Velikov [Sat, 20 Jun 2015 14:14:45 +0000 (15:14 +0100)]
Add release notes for the 10.5.8 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoUpdate version to 10.5.8
Emil Velikov [Sat, 20 Jun 2015 14:09:23 +0000 (15:09 +0100)]
Update version to 10.5.8

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoegl/x11: Set version of swrastLoader to 2
Boyan Ding [Tue, 16 Jun 2015 03:08:33 +0000 (11:08 +0800)]
egl/x11: Set version of swrastLoader to 2

which it actually implements instead of the newest version defined in
dri_interface.h

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 997fc807b2f71ef65b4601d6db33d0f912c18d3f)

8 years agonvc0/ir: can't have a join on a load with an indirect source
Ilia Mirkin [Thu, 18 Jun 2015 02:18:09 +0000 (22:18 -0400)]
nvc0/ir: can't have a join on a load with an indirect source

Triggers an INVALID_OPCODE warning on GK208. Seems rare enough to not
warrant verification on other chips. Fixes the new piglits:

  ubo_array_indexing/fs-nonuniform-control-flow.shader_test
  ubo_array_indexing/vs-nonuniform-control-flow.shader_test

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

8 years agonv50,nvc0: clamp uniform size to 64k
Ilia Mirkin [Mon, 15 Jun 2015 19:48:58 +0000 (15:48 -0400)]
nv50,nvc0: clamp uniform size to 64k

The state tracker will pass through requests from buggy applications
which will have the buffer size larger than the max allowed (64k). Clamp
the size to 64k so that we don't get errors when uploading the constbuf
data.

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

8 years agonvc0/ir: fix collection of first uses for texture barrier insertion
Ilia Mirkin [Fri, 12 Jun 2015 14:09:05 +0000 (16:09 +0200)]
nvc0/ir: fix collection of first uses for texture barrier insertion

One of the places we have to insert texbars is in situations where the
result of the tex gets overwritten by a different instruction (e.g. in a
conditional statement). However in some situations it can actually
appear as though the original tex itself is an overwriting instruction.
This can naturally never really happen, so just ignore the tex
instruction when it comes up.

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

8 years agomesa: build xmlconfig to a separate static library
Erik Faye-Lund [Wed, 10 Jun 2015 22:35:04 +0000 (23:35 +0100)]
mesa: build xmlconfig to a separate static library

As we use the file from both the dri modules and loader, we end up with
multiple definition of the symbols provided in our gallium dri  modules.
Additionally we compile the file twice.

Resolve both issues, effectively enabling the build on toolchains which
don't support -Wl,--allow-multiple-definition.

v2: [Emil Velikov]
 - Fix the Scons/Android build.
 - Resolve libgbm build issues (bring back the missing -lm)

Cc: Julien Isorce <j.isorce@samsung.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90310
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90905
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 634f2002563b4fca68490c0a39518ea838f28fb1)

8 years agoi965/fs: Don't let the EOT send message interfere with the MRF hack
Jason Ekstrand [Sat, 6 Jun 2015 19:15:30 +0000 (12:15 -0700)]
i965/fs: Don't let the EOT send message interfere with the MRF hack

Previously, we just put the message for the EOT send as high in the file as
it would go.  This is because the register pre-filling hardware will stop
all over the early registers in the file in preparation for the next thread
while you're still sending the last message.  However, if something happens
to spill, then the MRF hack interferes with the EOT send message and, if
things aren't scheduled nicely, will stomp on it.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90520
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 86e5afbfee5492235cab1a7be4ea49ac02be1644)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp

8 years agodraw: (trivial) fix NULL pointer dereference
Roland Scheidegger [Thu, 4 Jun 2015 12:35:59 +0000 (14:35 +0200)]
draw: (trivial) fix NULL pointer dereference

This probably got broken when the samplers were converted to be indexed
by shader type.
Seen when looking at bug 89819 though I'm not sure if that really was what
the bug was about...

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

8 years agoi965: Disable compaction for EOT send messages
Ben Widawsky [Mon, 8 Jun 2015 18:18:35 +0000 (11:18 -0700)]
i965: Disable compaction for EOT send messages

AFAICT, there is no real way to make sure a send message with EOT is properly
ignored from compact, nor can I see a way to actually encode EOT while
compacting. Before the single send optimization we'd always bail because we hit
the is_immediate && !is_compactable_immediate case. However, with single send,
is_immediate is not true, and so we end up trying to compact the un-compactible.

Without this, any compacting single send instruction will hang because the EOT
isn't there. I am not sure how I didn't hit this when I originally enabled the
optimization.  I didn't check if some surrounding code changed.

I know Neil and Matt were both looking into this. I did a quick search and
didn't see any patches out there to handle this. Please ignore if this has
already been sent by someone. (Direct me to it and I will review it).

Reported-by: Neil Roberts <neil@linux.intel.com>
Reported-by: Mark Janes <mark.a.janes@intel.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit b307921c3ff3b36607752f881a180272366a79cf)

8 years agoi965: Don't compact instructions with unmapped bits.
Francisco Jerez [Mon, 8 Jun 2015 18:18:34 +0000 (11:18 -0700)]
i965: Don't compact instructions with unmapped bits.

Some instruction bits don't have a mapping defined to any compacted
instruction field.  If they're ever set and we end up compacting the
instruction they will be forced to zero.  Avoid using compaction in such
cases.

v2: Align multiple lines of an expression to the same column.  Change
    conditional compaction of 3-source instructions to an
    assertion. (Matt)
v3: The 3-source instruction bit 105 is part of SourceIndex on CHV.
    Add assertion that reserved bit 7 is not set. (Matt)
    Document overlap with UIP and 64-bit immediate fields.
v4: Make some more unmapped bit checks assertions. (Matt)

Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 35a77a148f8b7ef03fe3b31d63719e0bfdf4b783)

8 years agoegl: fix setting context flags
Marek Olšák [Mon, 11 May 2015 22:44:20 +0000 (00:44 +0200)]
egl: fix setting context flags

Cc: 10.6 10.5 10.4 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
(cherry picked from commit f9f894447e4e7442d5dfa489bb43f2823e2fc71d)

8 years agodocs: Add sha256sums for the 10.5.7 release
Emil Velikov [Sun, 7 Jun 2015 10:45:25 +0000 (11:45 +0100)]
docs: Add sha256sums for the 10.5.7 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoAdd release notes for the 10.5.7 release
Emil Velikov [Sun, 7 Jun 2015 10:13:19 +0000 (11:13 +0100)]
Add release notes for the 10.5.7 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoUpdate version to 10.5.7
Emil Velikov [Sun, 7 Jun 2015 10:11:38 +0000 (11:11 +0100)]
Update version to 10.5.7

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonv30: avoid doing extra work on clear and hitting unexpected states
Ilia Mirkin [Thu, 5 Mar 2015 17:10:15 +0000 (12:10 -0500)]
nv30: avoid doing extra work on clear and hitting unexpected states

Clearing can happen at a time when various state objects are incoherent
and not ready for a draw. Some of the validation functions don't handle
this well, so only flush the framebuffer state. This has the advantage
of also not doing extra work.

This works around some crashes that can happen when clearing.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
(cherry picked from commit aba3392541f38f82e3ebde251fdcca78e90adbf3)

8 years agost/dri: fix postprocessing crash when there's no depth buffer
Marek Olšák [Tue, 26 May 2015 17:32:36 +0000 (19:32 +0200)]
st/dri: fix postprocessing crash when there's no depth buffer

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

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

8 years agoi965: Emit 3DSTATE_MULTISAMPLE before WM_HZ_OP (gen8+)
Ben Widawsky [Thu, 21 May 2015 02:20:14 +0000 (19:20 -0700)]
i965: Emit 3DSTATE_MULTISAMPLE before WM_HZ_OP (gen8+)

Starting with GEN8, there is documentation that the multisample state command
must be emitted before the 3DSTATE_WM_HZ_OP command any time the multisample
count changes. The 3DSTATE_WM_HZ_OP packet gets emitted as a result of a
intel_hix_exec(), which is called upon a fast clear and/or a resolve. This can
happen before the state atoms are checked, and so the multisample state must be
put directly in the function.

v1:
- In v0, I was always emitting the command, but Ken came up with the condition to
determine whether or not the sample count actually changed.
- Ken's recommendation was to set brw->num_multisamples after emitting
3DSTATE_MULTISAMPLE. This doesn't work. I put my best guess as to why in the XXX
(it was causing 7 regressions on BDW).

v2:
Flag NEW_MULTISAMPLE state. As Ken found, in state upload we check for the
multisample change to determine whether or not to emit certain packets. Since
the hiz code doesn't actually care about the number of multisamples, set the
flag and let the later code take care of it.

Jenkins results:
http://otc-mesa-ci.jf.intel.com/view/dev/job/bwidawsk/136/

Fixes around 200 piglit tests on SKL. I'm somewhat surprised that it seems to
have no impact on BDW as the restriction is needed there as well.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Neil Roberts <neil@linux.intel.com> (v0)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2)
(cherry picked from commit e2d84d99f5a66738e8f584bdfea66182f36fe46c)

8 years agocherry-ignore: add clover build fix not applicable for 10.5
Emil Velikov [Wed, 3 Jun 2015 11:03:35 +0000 (12:03 +0100)]
cherry-ignore: add clover build fix not applicable for 10.5

The 10.5 codebase uses a compat/wrapper implementation for the string
class. As such it already explicitly includes the string header.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonv30: falling back to draw path for edgeflag does no good
Ilia Mirkin [Mon, 25 May 2015 21:46:45 +0000 (17:46 -0400)]
nv30: falling back to draw path for edgeflag does no good

The problem is that the EDGEFLAG has to be toggled at vertex submission
time. This can be done from either the draw or the regular paths. Avoid
falling back to draw just because there's an edgeflag.

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

8 years agonv30/draw: switch varying hookup logic to know about texcoords
Ilia Mirkin [Sun, 24 May 2015 02:11:38 +0000 (22:11 -0400)]
nv30/draw: switch varying hookup logic to know about texcoords

Commit 8acaf862dfe switched things over to use TEXCOORD instead of
GENERIC, but did not update the nv30 swtnl draw paths. This teaches the
draw logic about TEXCOORD.

Among other things, this fixes a crash in demos/arbocclude when using
swtnl. Curiously enough, the point-sprite piglit works without this.

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

8 years agonv30/draw: allocate vertex buffers in gart
Ilia Mirkin [Tue, 26 May 2015 01:14:13 +0000 (21:14 -0400)]
nv30/draw: allocate vertex buffers in gart

These are only used once per draw, so it makes sense to keep them in
GART. Also take this opportunity to modernize the buffer mapping API
usage.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit c3d36a2e1a87a4aded662db7a5d320ee7ac3a8b5)

8 years agonv30/draw: only use the DMA1 object (GART) if the bo is not in VRAM
Ilia Mirkin [Tue, 26 May 2015 01:12:46 +0000 (21:12 -0400)]
nv30/draw: only use the DMA1 object (GART) if the bo is not in VRAM

Instead of always having it in the data, let the bo placement decide it.
This fixes glxgears with swtnl forced on.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fdad7dfbdae07b9273fc8f57e63258dbe542c9b5)

8 years agonv30/draw: fix indexed draws with swtnl path and a resource index buffer
Ilia Mirkin [Tue, 26 May 2015 00:15:09 +0000 (20:15 -0400)]
nv30/draw: fix indexed draws with swtnl path and a resource index buffer

The map = assignment was missing.

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

8 years agoglsl: avoid leaking linked gl_shader when there's a late linker error
Ilia Mirkin [Sun, 17 May 2015 21:56:44 +0000 (17:56 -0400)]
glsl: avoid leaking linked gl_shader when there's a late linker error

This makes piglit mixing-clip-distance-and-clip-vertex-disallowed have 0
definitely lost blocks with valgrind. (Same non-0 number of possibly
lost blocks though.)

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 5646f0f18a620292524eebcd77353ff3d3687eb2)

8 years agost/mesa: don't leak glsl_to_tgsi object on link failure
Ilia Mirkin [Sun, 17 May 2015 21:32:24 +0000 (17:32 -0400)]
st/mesa: don't leak glsl_to_tgsi object on link failure

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

8 years agonv30/draw: draw expects constbuf size in bytes, not vec4 units
Ilia Mirkin [Mon, 25 May 2015 18:06:01 +0000 (14:06 -0400)]
nv30/draw: draw expects constbuf size in bytes, not vec4 units

This fixes glxgears with NV30_SWTNL=1 forced on. Probably fixes a bunch
of other situations where we fall back to the swtnl path.

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

8 years agonv30/draw: avoid leaving stale pointers in draw state
Ilia Mirkin [Sun, 24 May 2015 15:56:21 +0000 (11:56 -0400)]
nv30/draw: avoid leaving stale pointers in draw state

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

8 years agonv30: fix clip plane uploads and enable changes
Ilia Mirkin [Sun, 24 May 2015 00:58:53 +0000 (20:58 -0400)]
nv30: fix clip plane uploads and enable changes

nv30_validate_clip depends on the rasterizer state. Also we should
upload all the new clip planes on change since next time the plane data
won't have changed, but the enables might.

This fixes fixed-clip-enables and vs-clip-vertex-enables shader tests.

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 7518fc3c66e9b5703b987bccca7970a344deadfa)

8 years agonv30: avoid leaking render state and draw shaders
Ilia Mirkin [Sun, 24 May 2015 06:23:16 +0000 (02:23 -0400)]
nv30: avoid leaking render state and draw shaders

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

8 years agonv30: don't leak fragprog consts
Ilia Mirkin [Sun, 24 May 2015 05:31:11 +0000 (01:31 -0400)]
nv30: don't leak fragprog consts

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

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>
9 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>
9 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>
9 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>
9 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)

9 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)

9 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)

9 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

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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>
9 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>
9 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>
9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)