7 years agoMESA WIP with LLVMPIPE SUPPORT replicant-4.2
Paul Kocialkowski [Sat, 16 Nov 2013 11:05:15 +0000 (12:05 +0100)]

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
7 years agodocs: Add md5sums for the 9.2.2 release
Carl Worth [Sat, 19 Oct 2013 00:13:06 +0000 (17:13 -0700)]
docs: Add md5sums for the 9.2.2 release

Which we could only do after creating the tar files, of course.

7 years agoAdd bin/test-driver to the list of files to be distributed.
Carl Worth [Fri, 18 Oct 2013 23:58:32 +0000 (16:58 -0700)]
Add bin/test-driver to the list of files to be distributed.

Without this, the build fails for me when trying to build from a generated tar
file after running just ./configure. (It's not clear to me why I didn't
encounter similar breakage with previous releases.)

7 years agodocs: Add release notes for 9.2.2 release
Carl Worth [Fri, 18 Oct 2013 23:41:15 +0000 (16:41 -0700)]
docs: Add release notes for 9.2.2 release

With the list of bugs fixed and a full list of changes.

7 years agoBump version to 9.2.2
Carl Worth [Fri, 18 Oct 2013 23:36:31 +0000 (16:36 -0700)]
Bump version to 9.2.2

In preparation for the 9.2.2 release, of course.

7 years agoRevert "glx: Generate fewer errors in MakeContextCurrent"
Carl Worth [Thu, 17 Oct 2013 18:30:26 +0000 (11:30 -0700)]
Revert "glx: Generate fewer errors in MakeContextCurrent"

This reverts commit fb3e55f898e047ed32008e8a579146090cc8f805.

This commit was identified as causing the piglit
glx-create-context-current-no-framebuffer test to crash, (where, previously,
it merely failed without crashing).

7 years agoradeonsi: Use 'SI' as the LLVM processor for CIK on LLVM <= 3.3
Tom Stellard [Thu, 3 Oct 2013 14:56:35 +0000 (07:56 -0700)]
radeonsi: Use 'SI' as the LLVM processor for CIK on LLVM <= 3.3

LLVM 3.3 does not know about CIK processors, and the codes paths for SI
and CIK are the same.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9da4021626dd48a1cc25054d1d4009e098f4d97b)

7 years agomesa: consolidate cube width=height error checking
Brian Paul [Mon, 14 Oct 2013 16:26:41 +0000 (10:26 -0600)]
mesa: consolidate cube width=height error checking

Instead of checking width==height in four places, just do it in
_mesa_legal_texture_dimensions() where we do the other width, height,
depth checks.  Similarly, move the check that cube map array depth is
a multiple of 6.

This change also fixes some missing cube dimension checks for the
glTexStorage[23]D() functions.

Remove width==height assertion in _mesa_get_tex_max_num_levels() since
that's called before the other size checks for glTexStorage.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit fa9c702164768f6ef05bdb02deff2f49a8d166de)

7 years agomesa: Add missing switch break in invalidate_framebuffer_storage()
Constantin Baranov [Sat, 12 Oct 2013 22:17:15 +0000 (01:17 +0300)]
mesa: Add missing switch break in invalidate_framebuffer_storage()

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70411
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 53904c64da308bc5b5fd98c105fb86ec38cc33a3)

7 years agoi965: Fix 3D texture layout by more literally copying from the spec.
Eric Anholt [Tue, 8 Oct 2013 07:19:23 +0000 (00:19 -0700)]
i965: Fix 3D texture layout by more literally copying from the spec.

Fixes 3 texelFetch tests in piglit all.tests on ivb, and cubemap npot on gm45.

v2: Don't forget the gen4 DL=6 cubemap behavior.

Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1)
(cherry picked from commit 8da15d75442c94adc1bc087fe164a1fa13c3c0f3)

7 years agomesa: Fix compiler warnings when ALIGN's alignment is "1 << value".
Eric Anholt [Tue, 8 Oct 2013 07:23:29 +0000 (00:23 -0700)]
mesa: Fix compiler warnings when ALIGN's alignment is "1 << value".

We hadn't run into order of operation warnings before, apparently, since
addition is so low on the order.

Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit bfe6e5dda5fcf65a3941ed4cca5eea755421979a)

7 years agoi965: Don't forget the cube map padding on gen5+.
Eric Anholt [Tue, 8 Oct 2013 07:20:04 +0000 (00:20 -0700)]
i965: Don't forget the cube map padding on gen5+.

We had a fixup for gen4's 3d-layout cubemaps (which, iirc, we'd
experimentally found to be necessary!), but while the spec still requires
it on gen5, we'd been missing it in the array-layout cubemaps.

Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 791550aa8e70dd5e0bdd5a996ef66b5964cf9095)

7 years agoglx: Generate fewer errors in MakeContextCurrent
Adam Jackson [Fri, 4 Oct 2013 13:25:51 +0000 (09:25 -0400)]
glx: Generate fewer errors in MakeContextCurrent

For a few reasons.

1: In the (current) common case, these conditionals are never true. All
we're doing by checking them is slowing down MakeCurrent.  The server
does these checks already anyway.

2: GLX >= 3.0 contexts may legally be made current without a bound

This does not fix piglit/glx-create-context-current-no-framebuffer, but
is a prerequisite for fixing it.

Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit e166a58c43e92f10f03b32747bff44708096f898)

7 years agoglsl: Fix usage of the wrong union member in program_resource_visitor::recursion.
Francisco Jerez [Sat, 21 Sep 2013 01:36:08 +0000 (18:36 -0700)]
glsl: Fix usage of the wrong union member in program_resource_visitor::recursion.

In the array-of-struct case, recursion() takes the row_major flag for
each iteration from 't->fields.structure[i]', but 't' is not a record
type.  Inherit the array declaration row_major flag instead.

This mistake was found by running piglit on valgrind.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69449
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit b3c04362b44a4eceb38c938ceb387a9c04d06973)

7 years agosvga: fix incorrect memcpy src in svga_buffer_upload_piecewise()
Brian Paul [Thu, 3 Oct 2013 17:51:14 +0000 (11:51 -0600)]
svga: fix incorrect memcpy src in svga_buffer_upload_piecewise()

As we march over the source buffer we're uploading in pieces, we
need to memcpy from the current offset, not the start of the buffer.
Fixes graphical corruption when drawing very large vertex buffers.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matthew McClure <mcclurem@vmware.com>
(cherry picked from commit a50c5f8d24e860baa15dd75b44b9a20af60cebf8)

7 years agodocs: add missing <pre> tag
Brian Paul [Sat, 5 Oct 2013 20:18:48 +0000 (14:18 -0600)]
docs: add missing <pre> tag

7 years agodocs: Add md5sums for 9.2.1 release
Carl Worth [Sat, 5 Oct 2013 03:42:21 +0000 (20:42 -0700)]
docs: Add md5sums for 9.2.1 release

Which we could only do after creating the tar files, of course.

7 years agodocs: Add release notes for 9.2.1 release
Carl Worth [Sat, 5 Oct 2013 00:01:00 +0000 (17:01 -0700)]
docs: Add release notes for 9.2.1 release

With the list of bugs fixed and a full list of changes.

7 years agomesa: Bump version to 9.2.1
Carl Worth [Fri, 4 Oct 2013 22:25:44 +0000 (15:25 -0700)]
mesa: Bump version to 9.2.1

In preparation for the 9.2.1 release, of course.

7 years agomesa: Don't return any data for GL_SHADER_BINARY_FORMATS
Ian Romanick [Thu, 5 Sep 2013 19:47:13 +0000 (12:47 -0700)]
mesa: Don't return any data for GL_SHADER_BINARY_FORMATS

GL_SHADER_BINARY_FORMATS should not write any data to the application

Fixes piglit test 'arb_get_program_binary-overrun shader'.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 0667e2c969c0931a1feee530508f8441a11bda32)

7 years agowayland-egl.pc requires wayland-client.pc.
Torsten Duwe [Tue, 10 Sep 2013 21:36:48 +0000 (23:36 +0200)]
wayland-egl.pc requires wayland-client.pc.

Mesa provides the wayland-egl libs and the pkgconfig file, but the headers
originate from the wayland package. Ensure everything matches, by requiring
application builds to look at the wayland headers as well.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Johannes Obermayr <johannesobermayr@gmx.de>
(cherry picked from commit 3bc642cbf69b3ba71fc636d6120fc7ac0b83aecb)

Johannes Obermayr [Tue, 10 Sep 2013 21:36:47 +0000 (23:36 +0200)]

(cherry picked from commit 87ebbe1270e203259f6036edc1d846f77fdfa61b)

7 years agometa: Set correct viewport and projection in decompress_texture_image.
Kenneth Graunke [Thu, 22 Aug 2013 08:29:11 +0000 (01:29 -0700)]
meta: Set correct viewport and projection in decompress_texture_image.

_mesa_meta_begin() sets up an orthographic project and initializes the
viewport based on the current drawbuffer's width and height.  This is
likely the window size, since it occurs before the meta operation binds
any temporary buffers.

decompress_texture_image needs the viewport to be the size of the image
it's trying to draw.  Otherwise, it may only draw part of the image.

v2: Actually set the projection properly too.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68250
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Mak Nazecic-Andrlon <owlberteinstein@gmail.com>
(cherry picked from commit 62411681da4d1b7f9417f34dbf92a3e79e24dc09)

7 years agoi965: fix bogus swizzle in brw_cubemap_normalize
Chris Forbes [Mon, 30 Sep 2013 09:10:17 +0000 (22:10 +1300)]
i965: fix bogus swizzle in brw_cubemap_normalize

When used with a cube array in VS, failed assertion in ir_validate:

   Assignment count of LHS write mask channels enabled not
   matching RHS vector size (3 LHS, 4 RHS).

To fix this, swizzle the RHS correctly for the writemask.

This showed up in the ARB_texture_gather tests, which exercise cube
arrays in the VS.

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

7 years agomesa: check for bufSize > 0 in _mesa_GetSynciv()
Brian Paul [Sat, 14 Sep 2013 16:09:24 +0000 (10:09 -0600)]
mesa: check for bufSize > 0 in _mesa_GetSynciv()

The spec doesn't say GL_INVALID_VALUE should be raised for bufSize <= 0.
In any case, memcpy(len < 0) will lead to a crash, so don't allow it.

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 6659131be3bde0505a85e3a7d27382b273822bee)

7 years agoi965: Reenable glBitmap() after the sRGB winsys enabling.
Eric Anholt [Thu, 19 Sep 2013 15:45:07 +0000 (08:45 -0700)]
i965: Reenable glBitmap() after the sRGB winsys enabling.

The format of the window system framebuffer changed from ARGB8888 to
SARGB8, but we're still supposed to render to it the same as ARGB8888
unless the user flipped the GL_FRAMEBUFFER_SRGB switch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for stable branches.
(cherry picked from commit 48b9720272184d884b21524ae0b5318d42019793)

7 years agomesa: Remove all traces of GL_OES_matrix_get
Ian Romanick [Fri, 13 Sep 2013 16:31:00 +0000 (11:31 -0500)]
mesa: Remove all traces of GL_OES_matrix_get

I believe this extension was enabled by accident.  As far as I can tell,
there has never been any code in Mesa to actually support it.  Not only
that, this extension is only useful in the common-lite profile, and Mesa
does the common profile.

This "fixes" the piglit test oes_matrix_get-api.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 3e1fdf389918b3488f06116c1837594d469dbaa2)

7 years agoUse -Bsymbolic when linking libEGL.so
Carl Worth [Fri, 27 Sep 2013 21:01:48 +0000 (14:01 -0700)]
Use -Bsymbolic when linking libEGL.so

For some reason that I don't yet fully understand, Glaze does not work with
libEGL unless libEGL is linked with -Bsymbolic.[*]

Beyond that specific reason, all of the reasons for which libGL.so is linked
with -Bsymbolic, (see the commit history), should also apply here.

[*] The specific behavior I am seeing is that when Glaze calls dlopen for
libEGL.so, ifunc resolvers within Glaze for EGL functions are called before
the dlopen returns. These resolvers cannot succeed, as they need the return
value from dlopen in order to find the functions to resolve to. I don't know
what's causing these resolvers to be called, but I have verified that linking
libEGL with -Bsymbolic causes this problematic behavior to stop.

CC: "9.1 and 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 9baf35de5cd4a0d832ee185afb709868fd55bc93)

7 years agocherry-ignore: Ignore a commit which appeared twice on master
Carl Worth [Tue, 1 Oct 2013 21:08:17 +0000 (14:08 -0700)]
cherry-ignore: Ignore a commit which appeared twice on master

In between the two appearances, it was reverted once.

Regardless, the two versions on master are the same, and we've already
cherry-picked one of them, so ignore the second.

7 years agor600g: fix texture buffer object cache flushing
Marek Olšák [Thu, 19 Sep 2013 13:07:41 +0000 (15:07 +0200)]
r600g: fix texture buffer object cache flushing

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f7d004b9ad0deec99d465600ed7df683146b6cd7)


7 years agor600g: fix constant buffer cache flushing
Marek Olšák [Wed, 18 Sep 2013 20:46:25 +0000 (22:46 +0200)]
r600g: fix constant buffer cache flushing

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6317a3fb31014d89edff2993f3cf403f651a07f6)


7 years agoi965: Fix cube array coordinate normalization
Chris Forbes [Sun, 15 Sep 2013 10:25:45 +0000 (22:25 +1200)]
i965: Fix cube array coordinate normalization

Hardware requires the magnitude of the largest component to not exceed
1; brw_cubemap_normalize ensures that this is the case.

Unfortunately, we would previously multiply the array index for cube
arrays by the normalization factor. The incorrect array index would then
cause the sampler to attempt to access either the wrong cube, or memory
outside the cube surface entirely, resulting in garbage rendering or in
the worst case, hangs.

Alter the normalization pass to only multiply the .xyz components.

Fixes broken rendering in the arb_texture_cube_map_array-cubemap piglit,
which was recently adjusted to provoke this behavior.

V2: Fix indent.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "9.2" mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit fe2528c0b69d5719b15d926ada9424cac7569b9c)

7 years agoi965/gen4: Fix fragment program rectangle texture shadow compares.
Eric Anholt [Wed, 18 Sep 2013 19:32:31 +0000 (12:32 -0700)]
i965/gen4: Fix fragment program rectangle texture shadow compares.

The rescale_texcoord(), if it does something, will return just the
GLSL-sized coordinate, leaving out the 3rd and 4th components where we
were storing our projected shadow compare and the texture projector.
Deref the shadow compare before using the shared rescale-the-coordinate
code to fix the problem.

Fixes piglit tex-shadow2drect.shader_test and txp-shadow2drect.shader_test

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69525
NOTE: This is a candidate for stable branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 938956ad52bc7659212b5877080967d4af0aad81)

7 years agomesa: Support GL_MAX_VERTEX_OUTPUT_COMPONENTS query with ES3
Ian Romanick [Mon, 9 Sep 2013 21:54:11 +0000 (16:54 -0500)]
mesa: Support GL_MAX_VERTEX_OUTPUT_COMPONENTS query with ES3

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d38765f3c8fbd473b949177cc9698b2cd459902c)

7 years agoi965: Fix brw_vs_prog_data_compare to actually check field members.
Kenneth Graunke [Tue, 17 Sep 2013 05:39:37 +0000 (22:39 -0700)]
i965: Fix brw_vs_prog_data_compare to actually check field members.

&a and &b are the address of the local stack variables, not the actual
structures.  Instead of comparing the fields of a and b, we compared
...some stack memory.

Caught by Valgrind on Piglit's glsl-lod-bias test (among many others).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68233
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4e4b0799165ae7b482da7d9af656ed8878500de1)

7 years agost/mesa: don't dereference stObj->pt if NULL
Dave Airlie [Tue, 10 Sep 2013 04:46:23 +0000 (14:46 +1000)]
st/mesa: don't dereference stObj->pt if NULL

It seems a user app can get us into this state, I trigger the fail
running fbo-maxsize inside virgl, it fails to create the backing
storage for the texture object, but then segfaults here when it
should fail the completeness test.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 2f508f244e8e4cb4bb2b9f813548fbf0c89b77c1)

7 years agoos: First check for __GLIBC__ and then for PIPE_OS_BSD
Andreas Boll [Wed, 11 Sep 2013 12:27:08 +0000 (14:27 +0200)]
os: First check for __GLIBC__ and then for PIPE_OS_BSD

Fixes FTBFS on kfreebsd-*

Debian GNU/kFreeBSD doesn't provide getprogname() since it uses stdlib.h
from glibc. Instead it provides program_invocation_short_name from glibc.

You can find the same order in src/mesa/drivers/dri/common/xmlconfig.c

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Tested-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 32637f56a5422b09ad945d21d8e60a8b990b0182)

7 years agoi965/vec4: Only zero out unused message components when there are any.
Kenneth Graunke [Mon, 9 Sep 2013 18:11:03 +0000 (11:11 -0700)]
i965/vec4: Only zero out unused message components when there are any.

Otherwise, coordinates with four components would result in a MOV
with a destination writemask that has no channels enabled:

mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q };

At best, this is stupid: we emit code that shouldn't do anything.
Worse, it apparently causes GPU hangs (observable with Chris's
textureGather test on CubeArrays.)

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

7 years agoglsl: propagate max_array_access through function calls
Dominik Behr [Wed, 4 Sep 2013 21:40:48 +0000 (14:40 -0700)]
glsl: propagate max_array_access through function calls

Fixes a bug where if an uniform array is passed to a function the accesses
to the array are not propagated so later all but the first vector of the
uniform array are removed in parcel_out_uniform_storage resulting in
broken shaders and out of bounds access to arrays in

Cc: mesa-stable@lists.freedesktop.org
Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dominik Behr <dbehr@chromium.org>
(cherry picked from commit 0f6fce15852d3d6fb5251e42394332a62788ef67)

7 years agonv30: fix inconsistent setting of push->user_priv
Ilia Mirkin [Wed, 4 Sep 2013 06:06:05 +0000 (02:06 -0400)]
nv30: fix inconsistent setting of push->user_priv

It's set to &nv30->bufctx everywhere else.

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

7 years agoglx: Initialize OpenGL version to 1.0
Rico Schüller [Sun, 1 Sep 2013 19:30:19 +0000 (21:30 +0200)]
glx: Initialize OpenGL version to 1.0

The old code in dri2_glx suffered from a typographical error that caused
the default version to be 2.1 instead of 1.2 (minimum required by the
Linux OpenGL ABI).  drisw_glx had a similar error resulting in a default
version of 0.1.

Some driver/card combinations (r200/RV280, i915/915G) don't support
OpenGL 2.1.  These create in some corner cases an indirect context
instead of a direct context when calling glXCreateContextAttribsARB().
This happens because of a bad default value.  To avoid this, just used
the default value specified by the GLX_ARB_create_context specification:

    "The default values for GLX_CONTEXT_MAJOR_VERSION_ARB and
    GLX_CONTEXT_MINOR_VERSION_ARB are 1 and 0 respectively. In this
    case, implementations will typically return the most recent version
    of OpenGL they support which is backwards compatible with OpenGL 1.0
    (e.g. 3.0, 3.1 + GL_ARB_compatibility, or 3.2 compatibility

Refactor all the default value setting to dri2_convert_glx_attribs, and
make sure the correct defaults are set in that one place.

Signed-off-by: Rico Schüller <kgbricola@web.de>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla http://bugs.winehq.org/show_bug.cgi?id=34238
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 8b302e1635534bfc6ed3ad671f2428470b3a765d)

7 years agoglsl: Reallow precision qualifiers on structure members
Ian Romanick [Fri, 30 Aug 2013 21:04:18 +0000 (14:04 -0700)]
glsl: Reallow precision qualifiers on structure members

Changes to the grammar for GL_ARB_shading_language_420pack (commit
6eec502) moved precision qualifiers out of the type_specifier production
chain.  This caused declarations such as:

    struct S {
        lowp float f;

to generate parse errors.  Section 4.1.8 (Structures) of both the GLSL
ES 1.00 spec and GLSL 1.30 specs says:

        "Member declarators may contain precision qualifiers, but may not
        contain any other qualifiers."

So, it sure seems like we shouldn't generate a parse error. :)

Instead of type_specifier, use fully_specified_type in struct members.
However, fully_specified_type allows a lot of other qualifiers that are
not allowed on structure members, so expeclitly disallow them.

Note, this makes struct_declaration look an awful lot like
member_declaration (used for interface blocks).  We may want to
(somehow) unify these rules to reduce code duplication at some point.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68753
Reported-by: Aras Pranckevicius <aras@unity3d.com>
Cc: Aras Pranckevicius <aras@unity3d.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 87252bf97b62bd536632978b9d53e4025b7db77d)

7 years agonvc0: restore viewport after blit
Maarten Lankhorst [Mon, 2 Sep 2013 15:08:48 +0000 (17:08 +0200)]
nvc0: restore viewport after blit

Based on calim's original fix in the nine branch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: "9.2 and 9.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ad4dc7723199b3052231f5b4aed1bd1ba1505025)

7 years agonvc0: delete compute object on screen destruction
Christoph Bumiller [Sun, 12 May 2013 14:42:45 +0000 (16:42 +0200)]
nvc0: delete compute object on screen destruction

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7fe159ba7442b4558d4d06ad8c236ae565f5e5d8)

7 years agonvc0: fix blitctx memory leak
Joakim Sindholt [Sun, 12 May 2013 14:17:00 +0000 (16:17 +0200)]
nvc0: fix blitctx memory leak

Cc: "9.2 and 9.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2a7762bdb62faa1d54c445fcec7733cf6f690ac5)

7 years agonvc0/ir: add f32 long immediate cannot saturate
Christoph Bumiller [Sun, 30 Jun 2013 13:23:15 +0000 (15:23 +0200)]
nvc0/ir: add f32 long immediate cannot saturate

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 53992060564bd66f167342e0864cee9406147b04)

7 years agonvc0/ir: fix use after free in texture barrier insertion pass
Tiziano Bacocco [Tue, 30 Jul 2013 20:04:49 +0000 (22:04 +0200)]
nvc0/ir: fix use after free in texture barrier insertion pass

Fixes crash with Amnesia: The Dark Descent.

Cc: "9.2 and 9.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7086636358b611a2bb124253e1fe870107e1cecb)

7 years agonouveau: initialise the nouveau_transfer maps
Emil Velikov [Fri, 9 Aug 2013 18:51:02 +0000 (19:51 +0100)]
nouveau: initialise the nouveau_transfer maps

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

7 years agoi965/fs: Gen4: Zero out extra coordinates when using shadow compare
Chris Forbes [Tue, 27 Aug 2013 07:35:49 +0000 (19:35 +1200)]
i965/fs: Gen4: Zero out extra coordinates when using shadow compare

Fixes broken rendering if these MRFs contained anything other than zero.

NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit f35dea05b1329b9303a11fb803897fb189ff99b4)

7 years agost/dri: do not create a new context for msaa copy
Maarten Lankhorst [Mon, 9 Sep 2013 11:02:08 +0000 (13:02 +0200)]
st/dri: do not create a new context for msaa copy

Commit b77316ad7594f
    st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers

introduced creating a pipe_context for every call to validate, which is not required
because the callers have a context anyway.

Only exception is egl_g3d_create_pbuffer_from_client_buffer, can someone test if it
still works with NULL passed as context for validate? From examining the code I
believe it does, but I didn't thoroughly test it.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit b217d48364f368f541e53006af5dd56f664be24d)

7 years agoradeon/winsys: pad IBs to a multiple of 8 DWs
Alex Deucher [Fri, 6 Sep 2013 20:43:34 +0000 (16:43 -0400)]
radeon/winsys: pad IBs to a multiple of 8 DWs

This aligns the gfx, compute, and dma IBs to 8 DW boundries.
This aligns the the IB to the fetch size of the CP for optimal
performance. Additionally, r6xx hardware requires at least 4
DW alignment to avoid a hw bug.  This also aligns the DMA
IBs to 8 DW which is required for the DMA engine.  This
alignment is already handled in the gallium driver, but that
patch can be removed now that it's done in the winsys.

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

7 years agonv30: find first unused texcoord rather than bailing if first is used
Ilia Mirkin [Sun, 1 Sep 2013 16:38:52 +0000 (12:38 -0400)]
nv30: find first unused texcoord rather than bailing if first is used

This fixes shaders produced by supertuxkart.

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

7 years agomesa: Note that 89a665e should not be picked
Ian Romanick [Wed, 11 Sep 2013 20:58:14 +0000 (15:58 -0500)]
mesa: Note that 89a665e should not be picked

See also:


Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agoi965/fs: Detect GRF sources in split_virtual_grfs send-from-GRF code.
Kenneth Graunke [Wed, 28 Aug 2013 18:22:01 +0000 (11:22 -0700)]
i965/fs: Detect GRF sources in split_virtual_grfs send-from-GRF code.

It is incorrect to assume that src[0] of a SEND-from-GRF opcode is the
GRF.  For example, FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD uses src[1] for
the GRF.

To be safe, loop over all the source registers and mark any GRFs.  We
probably won't ever have more than one, but it's simpler to just check
all three rather than attempting to bail early.

Not observed to fix anything yet, but likely to.  Parallels the bug fix
in the previous commit, which actually does fix known failures.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit a35b32025011eeac01f2e5a476dbf3ac132a61b3)

7 years agoi965/vs: Detect GRF sources in split_virtual_grfs send-from-GRF code.
Kenneth Graunke [Wed, 28 Aug 2013 18:16:27 +0000 (11:16 -0700)]
i965/vs: Detect GRF sources in split_virtual_grfs send-from-GRF code.

It is incorrect to assume that src[0] of a SEND-from-GRF opcode is the GRF.
VS_OPCODE_PULL_CONSTANT_LOAD_GEN7 uses an IMM as src[0], and stores the
GRF as src[1].

To be safe, loop over all the source registers and mark any GRFs.  We
probably won't ever have more than one, but it's simpler to just check
all three rather than attempting to bail early.

Fixes assertion failures in Unigine Sanctuary since we started making
register allocation rely on split_virtual_grfs working.  (The register
classes were actually sufficient, we were just interpreting an IMM as
a virtual GRF number.)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68637
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4e3d1712a223f9f0b4ff4a34b9b5447a92877347)

7 years agomesa: Don't choose S3TC for generic compression if we can't compress.
Eric Anholt [Thu, 29 Aug 2013 15:09:05 +0000 (08:09 -0700)]
mesa: Don't choose S3TC for generic compression if we can't compress.

If the app is asking us to do GL_COMPRESSED_RGBA, then the app obviously
doesn't have pre-compressed data to hand us.  So don't choose a storage
format that we won't actually be able to compress and store.

Fixes black screen in warzone2100 when libtxc_dxtn is not present.  Also
66 piglit tests.

NOTE: This is a candidate for the 9.2 branch.
Reported-by: Paul Wise <pabs@debian.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit bdf3f50e9a85e4c063b46ceaf23bceb07b06b82e)

7 years agomesa: Rip out more extension checking from texformat.c.
Eric Anholt [Thu, 29 Aug 2013 15:07:09 +0000 (08:07 -0700)]
mesa: Rip out more extension checking from texformat.c.

You should only be flagging the formats as supported if you support them

NOTE: This is a candidate for the 9.2 branch. (required for next commit)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit b188467fdf71d8f4c5fab4aafae1253f64d9aab4)

7 years agoglsl: Allow precision qualifiers for sampler types
Anuj Phogat [Tue, 27 Aug 2013 01:21:03 +0000 (18:21 -0700)]
glsl: Allow precision qualifiers for sampler types

GLSL 1.30 doesn't allow precision qualifiers on sampler types,
but in GLSL ES, sampler types are also allowed. This seems like
an oversight (since the intention of including these in GLSL 1.30
is to allow compatibility with ES shaders).

Currently, Mesa allows "default" precision qualifiers to be set for
sampler types in GLSL (commit d5948f2). This patch makes it follow
GLSL ES rules and also allow declaring sampler variables with a
precision qualifier in GLSL 1.30 (and later). e.g.
uniform lowp sampler2D sampler;

This fixes a shader compilation error in Khronos OpenGL conformance
test "depth_texture_mipmap".

V2: Update comments.
Signed-off-by: Ian Romanick <idr@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@lists.freedesktop.org>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9c0b7be964f0cbb707ed11c2526a30eda5254d2e)

7 years agoi965: Initialize inout_offset parameter to brw_search_cache().
Paul Berry [Wed, 24 Jul 2013 16:24:51 +0000 (09:24 -0700)]
i965: Initialize inout_offset parameter to brw_search_cache().

Two callers of brw_search_cache() weren't initializing that function's
inout_offset parameter: brw_blorp_const_color_params::get_wm_prog()
and brw_blorp_const_color_params::get_wm_prog().

That's a benign problem, since the only effect of not initializing
inout_offset prior to calling brw_search_cache() is that the bit
corresponding to cache_id in brw->state.dirty.cache may not be set
reliably.  This is ok, since the cache_id's used by
brw_blorp_const_color_params::get_wm_prog() and
brw_blorp_blit_params::get_wm_prog() (BRW_BLORP_CONST_COLOR_PROG and
BRW_BLORP_BLIT_PROG, respectively) correspond to dirty bits that are
not used.

However, failing to initialize this parameter causes valgrind to
complain.  So let's go ahead and fix it to reduce valgrind noise.

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

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit b8f13fbb856534cbc1345325b74ec47711493dd6)

7 years agoAdd .cherry-ignore file
Ian Romanick [Wed, 28 Aug 2013 18:37:08 +0000 (11:37 -0700)]
Add .cherry-ignore file

Somebody forgot -x with git-cherry-pick...

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agodocs: minor fixes for 9.2 release notes
Brian Paul [Wed, 28 Aug 2013 00:57:35 +0000 (18:57 -0600)]
docs: minor fixes for 9.2 release notes

Fix incorrect </li> tag, fix language.

7 years agodocs: Add 9.2 release md5sums
Ian Romanick [Tue, 27 Aug 2013 23:33:48 +0000 (16:33 -0700)]
docs: Add 9.2 release md5sums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agomesa: Bump version to 9.2 (final)
Ian Romanick [Tue, 27 Aug 2013 22:48:55 +0000 (15:48 -0700)]
mesa: Bump version to 9.2 (final)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agodocs: Update release notes for 9.2
Ian Romanick [Tue, 27 Aug 2013 22:47:48 +0000 (15:47 -0700)]
docs: Update release notes for 9.2

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agoglsl: Disallow uniform block layout qualifiers on non-uniform block vars.
Matt Turner [Mon, 26 Aug 2013 21:14:03 +0000 (14:14 -0700)]
glsl: Disallow uniform block layout qualifiers on non-uniform block vars.

Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68460
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agoFixed and/or order mistake, resulting in compiling llvmpipe without llvm installed
Kristian Lehmann [Mon, 26 Aug 2013 19:19:50 +0000 (21:19 +0200)]
Fixed and/or order mistake, resulting in compiling llvmpipe without llvm installed

Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68544
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit cec7b5c5bc300d4a415939bc6a913d441c687e47)

7 years agoclover: Don't use PIPE_TRANSFER_UNSYNCHRONIZED for blocking copies
Tom Stellard [Tue, 27 Aug 2013 00:52:47 +0000 (17:52 -0700)]
clover: Don't use PIPE_TRANSFER_UNSYNCHRONIZED for blocking copies

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

7 years agoradeonsi: Also set the depth component mask bit for stencil-only exports
Michel Dänzer [Fri, 23 Aug 2013 12:55:45 +0000 (14:55 +0200)]
radeonsi: Also set the depth component mask bit for stencil-only exports

The stencil values come out wrong without this for some reason.

50 more little piglits.

Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 46fd81e586f0c1a76ab66b9a7558783c481f111e)

7 years agomesa: Set query->EverBound in glQueryCounter().
Kenneth Graunke [Fri, 23 Aug 2013 17:35:34 +0000 (10:35 -0700)]
mesa: Set query->EverBound in glQueryCounter().

glIsQuery is supposed to return false for names returned by glGenQueries
until their first use.  BeginQuery is a use, but QueryCounter is also a

From the ARB_timer_query spec:
"A timer query object is created with the command

      void QueryCounter(uint id, enum target);

 [...] If <id> is an unused query object name, the
 name is marked as used [...]"

Fixes Piglit's spec/ARB_timer_query/query-lifetime.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 7950315583244f03a58ac00d7b0516860475914c)

7 years agonv30: add forgotten PIPE_CAP_CUBE_MAP_ARRAY cap to list
Ilia Mirkin [Mon, 19 Aug 2013 10:49:45 +0000 (06:49 -0400)]
nv30: add forgotten PIPE_CAP_CUBE_MAP_ARRAY cap to list

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

7 years agogallium/osmesa: Link, not copy, the shared library to the LIB_DIR.
Jon Severinsson [Fri, 23 Aug 2013 09:19:01 +0000 (11:19 +0200)]
gallium/osmesa: Link, not copy, the shared library to the LIB_DIR.

Just like all other mesa libraries...

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit b47bde00790c4d4cef107c8cd33ed17a08415caf)

7 years agogallium/osmesa: Always link with the c++ linker.
Jon Severinsson [Fri, 23 Aug 2013 09:19:00 +0000 (11:19 +0200)]
gallium/osmesa: Always link with the c++ linker.

Just like all other gallium targets...

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit aeb9c9e4b01af8a70432a961931abde5adf06c42)

7 years agogallium/osmesa: Make and install an osmesa.pc.
Jon Severinsson [Fri, 23 Aug 2013 09:18:59 +0000 (11:18 +0200)]
gallium/osmesa: Make and install an osmesa.pc.

As of "2f142d59 build: Add --enable-gallium-osmesa flag." the pkgconfig
file from classic osmesa is no longer installed when building gallium
osmesa, so copy it to gallium osmesa and install the copy instead.

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit c8111904304a878a3d5831b453255f04e1ddcf56)

7 years agomesa: Fix assertion error with glDebugMessageControl
Timothy Arceri [Wed, 21 Aug 2013 06:18:00 +0000 (00:18 -0600)]
mesa: Fix assertion error with glDebugMessageControl

enums were being converted twice resulting in incorrect values.
The extra conversion has been removed and the redundant assert is
removed also.

Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit f0072e3c6b0bd46d8ebf7ac0a2cf1bf63dc370e8)

7 years agomesa: Specify a better GL_MAX_SERVER_WAIT_TIMEOUT limit.
Kenneth Graunke [Wed, 7 Aug 2013 19:56:37 +0000 (12:56 -0700)]
mesa: Specify a better GL_MAX_SERVER_WAIT_TIMEOUT limit.

The previous value of (GLuint64) ~0 has some problems:

GL_MAX_SERVER_WAIT_TIMEOUT is supposed to be a GLuint64 value, but has
to be queried via GetInteger64v(), which returns a GLint64.  This means
that some applications are likely to treat it as a signed integer, where
~0 means -1.  Negative values are nonsensical and problematic.

When interpreted correctly, ~0 translates to about 0.58 million years,
which seems rather excessive.

This patch changes it to 0x1fff7fffffff, which is about 1.11 years.
This is still plenty long, and is the same as both an int64 and uint64.
Applications that accidentally store it in a 32-bit int/unsigned also
get a non-negative value, which is again the same as both int and
unsigned.  This value was suggested by Ian Romanick.

v2: Add the ULL prefix on the constant (suggested by Ian).

Fixes Piglit's spec/!OpenGL 3.2/get-integer-64v.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit a27180d0d8666c75befe5c5b26e6d7122b41588b)

7 years agomesa: Bump version to 9.2-rc2
Ian Romanick [Thu, 22 Aug 2013 22:21:55 +0000 (15:21 -0700)]
mesa: Bump version to 9.2-rc2

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agoglsl: Give a warning, not an error, for UBO qualifiers on non-matrices.
Ian Romanick [Thu, 15 Aug 2013 18:24:11 +0000 (11:24 -0700)]
glsl: Give a warning, not an error, for UBO qualifiers on non-matrices.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59648
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit dded321f92e4727584a98b71d7aaa15d4f01fb24)

7 years agoglsl: Remove ubo_qualifiers_allowed variable.
Matt Turner [Thu, 15 Aug 2013 18:14:00 +0000 (11:14 -0700)]
glsl: Remove ubo_qualifiers_allowed variable.

No longer used.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 921ef55a72dd07a6db0f170767d4a278c46d9ae6)

7 years agoglsl: Drop duplicate error messages.
Matt Turner [Thu, 15 Aug 2013 17:46:46 +0000 (10:46 -0700)]
glsl: Drop duplicate error messages.

This same message is printed in the validate_matrix_layout_for_type

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 77373e020ecc1b156802a583745dc6ce16e91c9e)

7 years agoglsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed.
Matt Turner [Thu, 15 Aug 2013 18:05:57 +0000 (11:05 -0700)]
glsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed.

The variable means that UBO qualifiers are allowed in a particular
context (e.g., not allowed in a struct field declaration), rather than a
particular set of UBO qualifiers are valid.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 1a45db97058d63b742993d0fcf0e5df44e2aa1c6)

7 years agoi965: Fix misapplication of gles3 srgb workaround
Chad Versace [Wed, 21 Aug 2013 00:36:24 +0000 (17:36 -0700)]
i965: Fix misapplication of gles3 srgb workaround

Fixes inconsistent failure of gles2conform/GL2Tests/glUniform/glUniform.test
under gnome-shell. What follows is a description of the bug and its fix.

When intel_update_renderbuffers() allocates a miptree for a winsys
renderbuffer, it propagates the renderbuffer's format to become also the
miptree's format.

If the winsys color buffer format is SARGB, then, in the first call to
eglMakeCurrent, intel_gles3_srgb_workaround() changes the renderbuffer's
format to ARGB. That is, it changes the format from sRGB to non-sRGB.
However, it changes the renderbuffer's format *after*
intel_update_renderbuffers() has allocated the renderbuffer's miptree.
Therefore, when eglMakeCurrent returns, the miptree format (SARGB)
differs from the renderbuffer format (ARGB).

If the X server reallocates the color buffer,
intel_update_renderbuffers() will create a new miptree for the
renderbuffer. The new miptree's format (ARGB) will differ from old
miptree's format (SARGB). This mismatch between old and new miptrees
causes bugs.

Fix the bug by moving intel_gles3_srgb_workaround() to occur *before*

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67934
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit ce8639a766d0c36e676eea6f55135d9dccf1cb90)

7 years agoradeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputs
Michel Dänzer [Wed, 21 Aug 2013 16:00:35 +0000 (18:00 +0200)]
radeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputs

They are defined as constant 0.0/0.0/1.0.

Three more little piglits.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 237cb074cb0efa50633f35e737122471957747b2)

7 years agobuild: Add --enable-gallium-osmesa flag.
Matt Turner [Tue, 20 Aug 2013 21:16:17 +0000 (14:16 -0700)]
build: Add --enable-gallium-osmesa flag.

The Gallium implementation is apparently not ready for regular
consumption, so as much as I hate adding more build-time options, here's

Acked-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 2f142d596f6d950499d5e25d26e011a675c9670c)

7 years agoi965: Don't copy propagate bitcasts with source modifiers.
Matt Turner [Thu, 8 Aug 2013 23:41:48 +0000 (16:41 -0700)]
i965: Don't copy propagate bitcasts with source modifiers.

Previously, copy propagation would cause bitcast_f2u(abs(float)) to
be performed in a single step, but the application of source modifiers
(abs, neg) happens after type conversion, leading to incorrect results.

That is, for bitcast_f2u(abs(float)) we would in fact generate code to
do abs(bitcast_f2u(float)).

For example, whereas bitcast_f2u(abs(float)) might result in a register
argument such as

v2: Set interfered = true and break in register_coalesce instead of
    returning false.

Reviewed-by: Paul Berry <stereoytpe441@gmail.com>
(cherry picked from commit 9c48ae751ab28f35eb878551d24c071be0ce11b0)

7 years agoi965: Emit MOVs for neg/abs.
Matt Turner [Thu, 8 Aug 2013 20:50:01 +0000 (13:50 -0700)]
i965: Emit MOVs for neg/abs.

Necessary to avoid combining a bitcast and a modifier into a single
operation. Otherwise if safe, the MOV should be removed by
copy-propagation or register coalescing.

With this and the next patch, there are only four changes in shader-db:
all a single extra instruction. The code does something like
   mov a.w, -b.x
and copy propagation doesn't work because it only handles no-op
swizzles. Seems acceptable, given the known limitation of our copy

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereoytpe441@gmail.com>
(cherry picked from commit 0ae9ca12a887a5aca47edc2a6a99eac4235bf4b0)

7 years agoosmesa: Symlink shared library to LIB_DIR
Armin K [Wed, 21 Aug 2013 14:44:00 +0000 (08:44 -0600)]
osmesa: Symlink shared library to LIB_DIR

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

7 years agoglapi/gen: build temporary files in the build directory
Maarten Lankhorst [Wed, 21 Aug 2013 16:34:59 +0000 (18:34 +0200)]
glapi/gen: build temporary files in the build directory

Writing to the source directory can cause multiple parallel builds
from the same source to fail. Create the temporary files in the
build directory.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 10aa3677cc032df9cc1509c4e45f553be378a7f9)

7 years agomesa: Never advertise _S3TC compressed formats
Ian Romanick [Mon, 19 Aug 2013 21:27:31 +0000 (14:27 -0700)]
mesa: Never advertise _S3TC compressed formats

The NVIDIA driver doesn't expose them, and piglit's
arb_texture_compression-invalid-formats expects them to not be there.

This, with the previous commit, fixes piglit

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f53b634807140268b40b063a2a966ad2701df7be)

7 years agomesa: Only advertise GL_ETC1_RGB8_OES in ES contexts
Ian Romanick [Mon, 19 Aug 2013 20:16:54 +0000 (13:16 -0700)]
mesa: Only advertise GL_ETC1_RGB8_OES in ES contexts

There is no extension for this format in desktop GL, so an application
can't give the format back to glCompressedTexImage2D.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 40550c8cedbcca508fb05baa7b7d480e6a60c51f)

7 years agoglsl: Track existence of default float precision in GLSL ES fragment shaders
Ian Romanick [Fri, 9 Aug 2013 22:17:18 +0000 (15:17 -0700)]
glsl: Track existence of default float precision in GLSL ES fragment shaders

This is required by the spec, and it's a bit tricky because the default
precision is scoped.  As a result, I'm slightly abusing the symbol

Fixes piglit no-default-float-precision.frag tests and the piglit
default-precision-nested-scope-0[1234].frag tests that are currently on
the piglit mailing list for review.

On IRC I got confirmation from cwabbot that ARM (Mali T6xx and T400)
enforces this requirement and from kusma that NVIDIA (Tegra2) enforces
this requirement.  We should be safe from regressing shipping

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit cabd45773b58d6aa48202da1cdd8cf1a6b856c53)

7 years agoglsl: Merge precision qualifiers too
Ian Romanick [Fri, 9 Aug 2013 23:01:04 +0000 (16:01 -0700)]
glsl: Merge precision qualifiers too

We never noticed this before because we previously didn't enfoce GLSL ES
fragement shader requirements that precision be defined.  There may also
have been some interaction here with the addition of
GL_ARB_shading_language_420pack, but it doesn't appear to me that it
added any new bugs (just perhaps uncovered some old ones).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 73e2d69792fba229e52ea47165592d086e650c45)

7 years agoglsl: Pass type to is_valid_default_precision_type instead of name
Ian Romanick [Fri, 9 Aug 2013 22:15:45 +0000 (15:15 -0700)]
glsl: Pass type to is_valid_default_precision_type instead of name

This is used by the next patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b15b62c54c0e3c10aaf8573a62acfcdc93979b0d)

7 years agobuild: fix out-of-tree builds in gallium/auxiliary
Ross Burton [Tue, 6 Aug 2013 18:09:39 +0000 (19:09 +0100)]
build: fix out-of-tree builds in gallium/auxiliary

The rules were writing files to e.g. util/u_indices_gen.py, but in an
out-of-tree build this directory doesn't exist in the build directory.  So,
create the directories just in case.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 76feef0823df75a36f264f48ec843dd863fd5b89)

7 years agoradeonsi: Always pre-load separate VGPRs for centroid vs. center interpolation
Michel Dänzer [Mon, 19 Aug 2013 13:45:32 +0000 (15:45 +0200)]
radeonsi: Always pre-load separate VGPRs for centroid vs. center interpolation

The LLVM R600 backend currently always uses separate VGPRs for these.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68162
(Centroid interpolation is identical to center interpolation without
multisampling, so the shader hardware was only pre-loading one set of
interpolation coefficients, and the pixel shader code was using
uninitialized values as the centroid interpolation coefficients)

Cc: mesa-stable@lists.freedesktop.org
Tested-by: Laurent Carlier <lordheavym@gmail.com>
(cherry picked from commit be301f707e8c6ba3bb0574e64a0a4f1653af8fb7)

7 years agogallium/osmesa: add same checks to OSMesaMakeCurrent as the other osmesa
Maarten Lankhorst [Tue, 20 Aug 2013 10:35:28 +0000 (12:35 +0200)]
gallium/osmesa: add same checks to OSMesaMakeCurrent as the other osmesa

Fixes a opengl crash in wine.

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
(cherry picked from commit 86751cbddfa762a6dbd01fd07102ba91bb90b8e5)

7 years agogallium/osmesa: link against static libglapi library too to get the gl exports
Maarten Lankhorst [Tue, 20 Aug 2013 08:44:53 +0000 (10:44 +0200)]
gallium/osmesa: link against static libglapi library too to get the gl exports

This should fix missing symbols in a osmesa built against shared glapi
osmesa build. All opengl exports were missing that are defined in the
static glapi, so link against both to fix this.

I could swear I've done this before, maybe there was a glitch in the matrix.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47824
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
(cherry picked from commit 603160d4c0ff3b5ec594aed4ee7f8e161626946d)

7 years agodocs: Add md5sums to 9.1.5 release notes
Andreas Boll [Fri, 2 Aug 2013 07:58:34 +0000 (09:58 +0200)]
docs: Add md5sums to 9.1.5 release notes
(cherry picked from commit 38903db4398e2b3a6f8ddd09d82974a2d843f1a7)

7 years agodocs: Fix a typo in the 9.1.6 release notes
Andreas Boll [Fri, 2 Aug 2013 07:42:03 +0000 (09:42 +0200)]
docs: Fix a typo in the 9.1.6 release notes
(cherry picked from commit 7eaaf6243406d5cca7e0713b693b4e0026c20819)

7 years agodocs: Add md5sums to 9.1.6 release notes
Carl Worth [Thu, 1 Aug 2013 22:45:04 +0000 (15:45 -0700)]
docs: Add md5sums to 9.1.6 release notes
(cherry picked from commit 7f2f63409a6c030130aab71b9a7528ea4e5252b1)

7 years agodocs: Import 9.1.6 release notes, add news item.
Carl Worth [Thu, 1 Aug 2013 22:12:25 +0000 (15:12 -0700)]
docs: Import 9.1.6 release notes, add news item.
(cherry picked from commit 964b89e42a7d66202f38f39ceccd1776b72f52fd)