OSDN Git Service

android-x86/external-mesa.git
8 years agoi965: use EmitNoIndirectSampler for gen < 7
Tapani Pälli [Wed, 24 Jun 2015 10:22:43 +0000 (13:22 +0300)]
i965: use EmitNoIndirectSampler for gen < 7

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 8852e26e93af1fc4b72bf9d57e847f53e1a1371b)
[Emil Velikov: move the hunk to brw_initialize_context_constants()]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_shader.cpp

8 years agomesa/st: use EmitNoIndirectSampler if !ARB_gpu_shader5
Tapani Pälli [Mon, 29 Jun 2015 06:48:52 +0000 (09:48 +0300)]
mesa/st: use EmitNoIndirectSampler if !ARB_gpu_shader5

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f17c8c287f3581fccb52714fbd4b2ea09a58e3d3)

8 years agoi915: use EmitNoIndirectSampler
Tapani Pälli [Mon, 29 Jun 2015 06:53:45 +0000 (09:53 +0300)]
i915: use EmitNoIndirectSampler

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2dc2b12ed15abb84c7e2b3c2726dcc1b735abcda)

8 years agomesa/glsl: new compiler option EmitNoIndirectSampler
Tapani Pälli [Tue, 9 Jun 2015 10:33:39 +0000 (13:33 +0300)]
mesa/glsl: new compiler option EmitNoIndirectSampler

Patch provides new compiler option for backend to force unroll loops
that have non-constant expression indexing on sampler arrays.

This makes sure that we can never end up with a shader that uses loop
induction variable as sampler array index but does not unroll because
of having too much instructions. This would not work without dynamic
indexing support.

v2: change option name as EmitNoIndirectSampler

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e4512e1581cf90f56d13cfa6a809832ef3517283)

8 years agoglsl: Allow dynamic sampler array indexing with GLSL ES < 3.00
Tapani Pälli [Tue, 9 Jun 2015 10:28:44 +0000 (13:28 +0300)]
glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00

Dynamic indexing of sampler arrays is prohibited by GLSL ES 3.00.
Earlier versions allow 'constant-index-expression' indexing, where
index can contain a loop induction variable.

Patch allows dynamic indexing for sampler arrays when GLSL ES < 3.00.
This change makes 'sampler-array-index.frag' parser test in Piglit
pass + fishgl.com works when running Chrome on OpenGL ES 2.0 backend

v2: small change and some more commit message (Tapani)
v3: refactor checks to make it more readable (Ian Romanick)
v4: change warning comment in GLSL ES case (Curro)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84225
(cherry picked from commit edb8383c98ee23385731d0fc23a6b6673528a8ec)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/glsl/ast_array_index.cpp

8 years agonv50/ir: fix emission of address reg in 3rd source
Ilia Mirkin [Tue, 30 Jun 2015 06:46:26 +0000 (02:46 -0400)]
nv50/ir: fix emission of address reg in 3rd source

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

8 years agonouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.
Mario Kleiner [Fri, 5 Jun 2015 13:36:52 +0000 (15:36 +0200)]
nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.

The dup'ed fd owned by the nouveau_screen for a device node
must also be used as key for the winsys hash table, instead
of using the original fd passed in for a screen, to make
multi-x-screen ZaphodHeads configurations work on nouveau.

The original fd's lifetime differs from that of the nouveau_screen stored
in the hash. The hash key is the fd, and in order to compare hash entries
we fstat them, so the fd must be around for as long as the screen is.

This is an extension of the fix in commit a59f2bb1 (nouveau: dup fd
before passing it to device).

Cc: "10.3 10.4 10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit a98600b0ebdfc8481c168aae6c5670071e22fc29)

8 years agonv50/ir: propagate modifier to right arg when const-folding mad
Ilia Mirkin [Fri, 26 Jun 2015 19:01:22 +0000 (15:01 -0400)]
nv50/ir: propagate modifier to right arg when const-folding mad

An immediate has to be the second arg of an ADD operation. However we
were mistakenly propagating the modifier of the non-folded value to the
folded immediate argument.

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

8 years agowinsys/radeon: Unmap GPU VM address range when destroying BO
Michel Dänzer [Thu, 21 May 2015 01:49:05 +0000 (10:49 +0900)]
winsys/radeon: Unmap GPU VM address range when destroying BO

But only when doing so is safe according to the
RADEON_INFO_VA_UNMAP_WORKING kernel query.

This avoids kernel GPU VM address range conflicts when the BO has other
references than the GEM handle being closed, e.g. when the BO is shared.

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

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit 7796e8889a9a2cc1b454dc32d8da3d756404339a)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c

8 years agoegl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals
Boyan Ding [Sat, 13 Jun 2015 07:33:20 +0000 (15:33 +0800)]
egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals

The call to dri2_x11_add_configs_for_visuals (previously
dri2_add_configs_for_visuals) was moved downwards in commit f8c5b8a1,
but appeared again in its original position after its rename in
d019cd81. Remove it.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
(cherry picked from commit 3fa9bb81ec8b21f472de32e08d0caf917239da08)

8 years agonv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data
Ilia Mirkin [Sun, 21 Jun 2015 23:03:35 +0000 (19:03 -0400)]
nv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data

Without first running the bo through pushbuf_refn, the nouveau drm
library will have uninitialized structures regarding this bo, and will
insert incorrect data.

This fixes supertuxkart 0.9 crash on start (where it ends up doing a lot
of indirect draws).

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

8 years agonvc0: always put all tfb bufs into bufctx
Ilia Mirkin [Sun, 21 Jun 2015 19:00:16 +0000 (15:00 -0400)]
nvc0: always put all tfb bufs into bufctx

Since we clear the TFB bufctx binding point above, we need to put all of
the active tfb's back in, even if they haven't changed since last time.
Otherwise the tfb may get moved into sysmem and the underlying mapping
will generate write errors.

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

8 years agoglsl: binding point is a texture unit, which is a combined space
Ilia Mirkin [Tue, 23 Jun 2015 04:16:59 +0000 (00:16 -0400)]
glsl: binding point is a texture unit, which is a combined space

This fixes compilation failures in Dota 2 Reborn where a texture unit
binding point was used that was numerically higher than the max
per stage.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fccf012adc0d3aad877de095244324aa1d2d046a)

8 years agogbm: do not (over)link against libglapi.so
Emil Velikov [Fri, 19 Jun 2015 18:22:38 +0000 (19:22 +0100)]
gbm: do not (over)link against libglapi.so

The whole of GBM does not rely on even a single symbol from the GL
dispatch library, unsuprisingly. The only need for it comes from the
unresolved symbols in the DRI modules, which are now correctly handled
with Frank's commit.

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

8 years agogbm: dlopen libglapi so gbm_create_device works
Frank Henigman [Thu, 6 Nov 2014 21:29:26 +0000 (16:29 -0500)]
gbm: dlopen libglapi so gbm_create_device works

Dri driver libs are not linked to pull in libglapi so gbm_create_device()
fails when it tries to dlopen them (unless the application is linked
with something that does pull in libglapi, like libGL).
Until dri drivers can be fixed properly, dlopen libglapi before trying
to dlopen them.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Frank Henigman <fjhenigman@google.com>
[Emil Velikov: Drop misleading bugzilla link, mention that libname differs]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 828f13330c9384f2b55c8b0f962d93a74ecd0601)

8 years agoconfigure: error out when building libEGL without shared-glapi
Emil Velikov [Fri, 19 Jun 2015 16:46:41 +0000 (17:46 +0100)]
configure: error out when building libEGL without shared-glapi

The latter is a hard requirement and without it we'll error out later
on in the build.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 994be5143a097ae2cf504ba344362edfee388ac3)

8 years agoconfigure: error out when building backend-less libEGL
Emil Velikov [Fri, 19 Jun 2015 16:44:02 +0000 (17:44 +0100)]
configure: error out when building backend-less libEGL

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit ddc886b5bfe5976fa2e5f49eeefa918736f1aa97)

8 years agoconfigure: warn about shared_glapi & xlib-glx only when both are set
Emil Velikov [Fri, 19 Jun 2015 16:19:46 +0000 (17:19 +0100)]
configure: warn about shared_glapi & xlib-glx only when both are set

Printing out the message when shared_glapi is disabled only leads to
confusion.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 6d744aaf4e427b6b0b3d8d35d756592a50abbb97)

8 years agoi965/gen9: Implement Push Constant Buffer workaround
Ben Widawsky [Thu, 4 Jun 2015 04:35:51 +0000 (21:35 -0700)]
i965/gen9: Implement Push Constant Buffer workaround

This implements a workaround (exact excerpt as a comment in the code). The docs
specify [clearly, after you struggle for a while] that the offset isn't relative
to state base. This actually makes sense. This fixes hangs on SKL.

Buffer #0 is meant to be used for normal uniforms.
Buffer #1 is typically used for gather constants when using RS.
Buffer #1-#3 could be used to push a bunch of UBO data which would just be
  somewhere in memory, and not relative to the dynamic state.

NOTE: I've moved away from the ternary operator for the new gen9 conditions.
Admittedly it's probably not great to do this, but I really want to fix this all
up in the subsequent patch and doing it here makes that diff a lot nicer. I want
to split out the gen8/9 code to make the function a bit more readable, but to
keep this easily cherry-pickable I am doing this fix first. If we decide not to
merge the cleanup patch then I can revisit this.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Valtteri Rantala <Valtteri.rantala@intel.com>
(cherry picked from commit 90754d2df05eafe1a3ee3cd9bb1611a19099fc49)

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)