profile/ivi/mesa.git
11 years agost/mesa: free TGSI tokens with ureg_free_tokens()
Brian Paul [Fri, 19 Oct 2012 21:34:55 +0000 (15:34 -0600)]
st/mesa: free TGSI tokens with ureg_free_tokens()

since they're allocated by ureg_get_tokens().

NOTE: This is a candidate for the 8.0 and 9.0 branches.

(cherry picked from commit 11070105f0b5ad20f12bb40a8dd0b357924bcfdd)

11 years agost/mesa: replace REALLOC() with realloc()
Brian Paul [Fri, 19 Oct 2012 20:51:20 +0000 (14:51 -0600)]
st/mesa: replace REALLOC() with realloc()

We should use the later since we're freeing the memory with free(),
not the gallium FREE() macro.

This fixes a mismatch when using the gallium debug memory functions.

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit bb93439873e0f270383d8a802eec79807d32c10a)

11 years agomesa: Don't flatten IF statements by default.
Kenneth Graunke [Thu, 20 Sep 2012 21:27:29 +0000 (14:27 -0700)]
mesa: Don't flatten IF statements by default.

MaxIfDepth of 0 means "flatten all the time", not "never flatten".
This is only desirable on hardware that can't support control flow;
software rasterization and most hardware drivers want this.

This alters behavior for swrast as well as i915.  Tested on i915.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 56705cd36bf48d5050ac9ec10d91fd097a577f42)

11 years agoradeonsi: add some new SI pci ids
Alex Deucher [Tue, 16 Oct 2012 17:11:38 +0000 (13:11 -0400)]
radeonsi: add some new SI pci ids

Note: this is a candidate for the stable branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ed8d87c6a641efe8667c0ba580260ffaff5ffc7e)

11 years agomesa: Fix a crash in update_texture_state() for external texture type
Abdiel Janulgue [Fri, 12 Oct 2012 08:51:03 +0000 (11:51 +0300)]
mesa: Fix a crash in update_texture_state() for external texture type

NOTE: This is a candidate for the stable branch.

Signed-off-by: Abdiel <abdiel.janulgue@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit bcb10ca17221833b2502970fb94ff52cf328ee30)

11 years agoutil: null-out the node's prev/next pointers in list_del()
Chris Fester [Thu, 11 Oct 2012 22:01:23 +0000 (16:01 -0600)]
util: null-out the node's prev/next pointers in list_del()

Note: This is a candidate for the 9.0 branch.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 3fffe8f7b77938fcbf449a7f9a2ae9614c8e2bd4)

11 years agoandroid: generate matching remap_helper to dispatch table
Tapani Pälli [Tue, 2 Oct 2012 11:50:31 +0000 (14:50 +0300)]
android: generate matching remap_helper to dispatch table

commit a010215463c63680c69e90202fe3fcd2e5b25fa6 removed ES2 specific dispatch
table and remap_helper, since now we are using dispatch.h which is generated
from gl_and_es_API.xml we need to generate a matching remap_helper using the
same xml.

Note: This is a candidate for the 9.0 branch.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 60565b564bc969ce47fb8417c79050c261e5aec9)

11 years agosvga: don't use uninitialized framebuffer state
Brian Paul [Thu, 11 Oct 2012 00:31:52 +0000 (18:31 -0600)]
svga: don't use uninitialized framebuffer state

Only the first 'nr_cbufs' color buffers in the pipe_framebuffer_state are
valid.  The rest of the color buffer pointers might be unitialized.
Fixes a regression in the piglit fbo-srgb-blit test since changes in the
gallium blitter code.

NOTE: This is a candidate for the 9.0 branch (just to be safe).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 60a9390978db0a3c9b0170c726ebe684baf75734)

11 years agoi965/vs: Implement register spilling.
Kenneth Graunke [Mon, 1 Oct 2012 22:28:56 +0000 (15:28 -0700)]
i965/vs: Implement register spilling.

To validate this code, I ran piglit -t vs quick.tests with the "go spill
everything" debugging code enabled.  There was only one regression:
glsl-vs-unroll-explosion simply ran out of registers.  This should be
fine in the real world, since no one actually spills every single
register.

NOTE: This is a candidate for the 9.0 branch. Even if it proves to have
bugs, it's likely better than simply failing to compile.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 9237f0ea8d176fb5dcd41868dcc723fe34f6b1f3)

11 years agoi965/vs: Fix unit mismatch in scratch base_offset parameter.
Kenneth Graunke [Mon, 1 Oct 2012 22:28:55 +0000 (15:28 -0700)]
i965/vs: Fix unit mismatch in scratch base_offset parameter.

move_grf_array_access_to_scratch() calculates scratch buffer offsets in
bytes.  However, emit_scratch_read/write() expects the base_offset
parameter to be measured in OWords.

As a result, a shader using a scratch read/write offset greater than
zero (in practice, a shader containing more than one variable in
scratch) would use too large an offset, frequently exceeding the
available scratch space.

This patch corrects the mismatch by removing spurious conversion from
OWords to bytes in move_grf_array_access_to_scratch().

This is based on a patch by Paul Berry.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 46e529672bb124b78eb454cbf55c72074ef6d35c)

11 years agonouveau: fix undefined behaviour when testing sample_count
Christoph Bumiller [Sat, 19 Jan 2013 19:53:22 +0000 (20:53 +0100)]
nouveau: fix undefined behaviour when testing sample_count

NOTE: This is a candidate for the 9.0 branch.

11 years agonv50/ir: wrap assertion using typeid in #ifndef NDEBUG
Christoph Bumiller [Mon, 7 Jan 2013 14:50:19 +0000 (15:50 +0100)]
nv50/ir: wrap assertion using typeid in #ifndef NDEBUG

Note: this is a candidate for the 9.0 stable branch.

11 years agonvc0: add missing call to map edge flag in push_vbo
Christoph Bumiller [Mon, 7 Jan 2013 19:18:06 +0000 (20:18 +0100)]
nvc0: add missing call to map edge flag in push_vbo

Note: this is a candidate for the 9.0 stable branch.

11 years agowayland: Don't cancel a roundtrip when any event is received
Jonas Ådahl [Tue, 25 Dec 2012 12:01:08 +0000 (13:01 +0100)]
wayland: Don't cancel a roundtrip when any event is received

Since wl_display_dispatch_queue() returns the number of processed events
or -1 on error, only cancel the roundtrip if an -1 is returned.

This also fixes a potential memory corruption bug happening when the
roundtrip does an early return and the callback later writes to the then
out of scope stack allocated `done' parameter.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agoegl/wayland: Dispatch the event queue before get_buffers
Ander Conselvan de Oliveira [Thu, 22 Nov 2012 13:34:49 +0000 (15:34 +0200)]
egl/wayland: Dispatch the event queue before get_buffers

When a client frame callback is executed and the client starts rendering
again, the egl event queue might not have been dispatched so that the
buffer release event for the previous frame hasn't been processed. In
that case a third buffer is allocated, even though it would be possible
to reuse the buffer that was just released.

The wl_display_dispatch_queue_pending() entry point is available from
wayland-client 1.0.2, so require that in configure.ac.  Also, just
let the pkg-config macro throw its own error, which will show what version
we were looking for and failed to find.

Note: This is a candidate for stable branches.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
11 years agoegl/wayland: Add invalidate back in eglSwapBuffers()
Kristian Høgsberg [Fri, 30 Nov 2012 18:29:17 +0000 (13:29 -0500)]
egl/wayland: Add invalidate back in eglSwapBuffers()

Commit ca3ed3e024864e91ca3cccc59fb96950e1d079b5 fixed the problem where
eglMakeCurrent would trigger a getbuffer callback that then breaks the
following wl_egl_window_resize() call.  However, we still need to
invalidate buffers in eglSwapBuffers, since in wayland we always swap
buffers, so the dri driver needs to come out and ask us for the next buffer
after each swapbuffer.

Note: this is a candidate for stable branches.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agoegl/wayland: Don't invalidate drawable on swap buffers
Ander Conselvan de Oliveira [Fri, 30 Nov 2012 15:41:02 +0000 (17:41 +0200)]
egl/wayland: Don't invalidate drawable on swap buffers

We used to invalidate the drawable after a call to eglSwapBuffers(),
so that a wl_egl_window_resize() would take effect for the next frame.
However, that leads to calling dri2_get_buffers() when eglMakeCurrent()
is called with the current context and surface, and a later call to
wl_egl_window_resize() would not take effect until the next buffer
swap.

Instead, add a callback from wl_egl_window_resize() back to the wayland
egl platform, and invalidate the drawable only when it is resized.

This solves a bug on wayland clients when going back to windowed mode
from fullscreen when clicking a pop up menu, where the window size
after this would be the fullscreen size.

Note: this is a candidate for stable branches.
CC: wayland-devel@lists.freedesktop.org
11 years agor600g: always use a tiled resource as the destination of MSAA resolve
Marek Olšák [Fri, 21 Dec 2012 19:34:52 +0000 (20:34 +0100)]
r600g: always use a tiled resource as the destination of MSAA resolve

i.e. we have to allocate a temporary tiled resource if dst isn't tiled.

This fixes hardlocks on r6xx-r7xx, though using a linear resource is forbidden
on later asics as well.

NOTE: This is a candidate for the stable branches.
(cherry picked from commit 9c6410e5c3ffc74564fae5afcc1b6982759cdd01)

Conflicts:
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_texture.c

11 years agor600g: try to fix streamout for the cases where BURST_COUNT > 0
Marek Olšák [Wed, 19 Dec 2012 15:59:45 +0000 (16:59 +0100)]
r600g: try to fix streamout for the cases where BURST_COUNT > 0

The burst was incorrectly used, because ELEM_SIZE was always 0.
I don't know if the burst works, because I don't know of any test
which uses it.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6a2ec765bd22ae5d94e5fdac8507c659175efa4e)

Conflicts:
src/gallium/drivers/r600/r600_shader.c

11 years agor300: Don't disable destination read if the src blend factor needs it
Stefan Dösinger [Fri, 7 Dec 2012 16:38:35 +0000 (17:38 +0100)]
r300: Don't disable destination read if the src blend factor needs it

The read can remain disabled if the src alpha factor needs it because
the result would still be zero.

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

NOTE: This is a candidate for stable release branches.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit ff5a9868c8d5041a3d944ce300c857934f4e8251)

11 years agomesa: fix BlitFramebuffer between linear and sRGB formats
Marek Olšák [Fri, 23 Nov 2012 02:02:44 +0000 (03:02 +0100)]
mesa: fix BlitFramebuffer between linear and sRGB formats

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 91ca053714957aca5205122e8478002c62cc4344)

11 years agor600g: fix lod bias/explicit lod with cube maps.
Dave Airlie [Tue, 6 Nov 2012 21:51:56 +0000 (07:51 +1000)]
r600g: fix lod bias/explicit lod with cube maps.

While developing cube map array support I found that we didn't
support this properly, also piglit didn't test for it at all.

I've submitted a test to piglit to check for this, and this
fixes explicit lod and lod bias with cube maps.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 037b4f80384c72c12e31192d1a30411d4660972d)

11 years agor600g: fix broken streamout if streamout_begin caused a context flush
Marek Olšák [Thu, 22 Nov 2012 23:38:44 +0000 (00:38 +0100)]
r600g: fix broken streamout if streamout_begin caused a context flush

This fixes graphics corruption in the case where the DISCARD_RANGE flag
is used to map a buffer.

NOTE: This is a candidate for the stable branches.
(cherry picked from commit cff4c948ed2708a6eb4b090ae87443a707cbd67f)

11 years agor600g: advertise 32 streamout vec4 outputs
Marek Olšák [Fri, 26 Oct 2012 16:41:49 +0000 (18:41 +0200)]
r600g: advertise 32 streamout vec4 outputs

to match the varying limit.
(cherry picked from commit b78b62497f1e5cc64eb924c64e4685fe5d814fd7)

11 years agor600g: fix streamout on RS780 and RS880
Marek Olšák [Mon, 24 Sep 2012 23:43:49 +0000 (01:43 +0200)]
r600g: fix streamout on RS780 and RS880

The latest kernel from git is required. Transform feedback (along with GL3.0)
is turned off on older kernels.
(cherry picked from commit d063c7b1421a6e8ad4e2efc1bf913920766cc5ee)

11 years agost/mesa: fix computation of last_level in GenerateMipmap
Marek Olšák [Sun, 11 Nov 2012 14:32:59 +0000 (15:32 +0100)]
st/mesa: fix computation of last_level in GenerateMipmap

Array textures were broken.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e7dde5c8fb8ae6964bd5972d5962c2a26fc6ee0f)

11 years agost/mesa: fix computation of last_level during texture creation
Marek Olšák [Sun, 11 Nov 2012 15:29:00 +0000 (16:29 +0100)]
st/mesa: fix computation of last_level during texture creation

Array textures were broken.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6dd839f23a8ee7b6853f7320a2715df44040b358)

11 years agost/mesa: fix guessing the base level size
Marek Olšák [Sun, 11 Nov 2012 15:08:56 +0000 (16:08 +0100)]
st/mesa: fix guessing the base level size

It was pretty broken with array textures, where the array size (height or
depth depending on the target) shouldn't be magnified.

The guessing also doesn't fail with 1D and cube textures.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit c06258dd0297e1fe7910f48a59aa0de79029ce39)

Conflicts:
src/mesa/state_tracker/st_cb_texture.c

11 years agomesa: fix error checking of TexStorage(levels) for array and rect textures
Marek Olšák [Sun, 11 Nov 2012 14:25:55 +0000 (15:25 +0100)]
mesa: fix error checking of TexStorage(levels) for array and rect textures

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 985f2aec4a2ca74f6612f34ce0887eafcc163e08)

Conflicts:
src/mesa/main/texstorage.c

11 years agomesa: add MaxNumLevels to gl_texture_image, remove MaxLog2
Marek Olšák [Sun, 11 Nov 2012 14:22:32 +0000 (15:22 +0100)]
mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2

MaxLog2 led to bugs, because it didn't work well with 1D and 3D textures.

NOTE: This is a candidate for the stable branches.

v2: correct the comment at MaxNumlevels

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8111342e814304730bed34446ea816cbc17a5775)

Conflicts:
src/mesa/main/teximage.h

11 years agovbo: fix glVertexAttribI* functions
Marek Olšák [Tue, 30 Oct 2012 13:44:22 +0000 (14:44 +0100)]
vbo: fix glVertexAttribI* functions

The functions were broken, because they converted ints to floats.
Now we can finally advertise OpenGL 3.0. ;)

In this commit, the vbo module also tracks the type for each attrib
in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT.

The little ugliness is the vertex attribs are declared as floats even though
there may be integer values. The code just copies integer values into them
without any conversion.

This implementation passes the glVertexAttribI piglit test which I am going
to commit in piglit soon. The test covers vertex arrays, immediate mode and
display lists.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
v2: cosmetic changes as suggested by Brian
(cherry picked from commit acf438f5375e2426386694e541b843dc6f8fd11a)

11 years agodraw: fix assertion failure in draw_emit_vertex_attr
Marek Olšák [Tue, 30 Oct 2012 00:07:17 +0000 (01:07 +0100)]
draw: fix assertion failure in draw_emit_vertex_attr

This is a regression since b3921e1f53833420e0a0fd581f7417.

The array stores VS outputs, not FS inputs.
Now llvmpipe can do 32 varyings too.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 183e122bdfe27f875c3c121964484dae9587c051)

11 years agomesa: bump MAX_VARYING to 32
Marek Olšák [Fri, 26 Oct 2012 15:37:07 +0000 (17:37 +0200)]
mesa: bump MAX_VARYING to 32

We're starting to get apps utilizing more than 16 varyings and
most current hardware supports 32 anyway.

Tested with r600g.
swrast, softpipe and llvmpipe still advertise 16 varyings.

This fixes a WebGL crash after launching this demo:
https://developer.mozilla.org/en-US/demos/detail/falling-cubes

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

NOTE: This is a candidate for the stable branches.

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

Conflicts:
src/mesa/main/context.c

11 years agor300g: fix texture border color for sRGB formats
Marek Olšák [Thu, 25 Oct 2012 23:03:53 +0000 (01:03 +0200)]
r300g: fix texture border color for sRGB formats

NOTE: This is a candidate for the stable branches.
(cherry picked from commit 8fb4b1dce156d02a0907925364d8945915c29bcf)

11 years agost/mesa: fix integer texture border color for some formats (v2)
Marek Olšák [Mon, 15 Oct 2012 01:55:23 +0000 (03:55 +0200)]
st/mesa: fix integer texture border color for some formats (v2)

And the clear color too, though that may be an issue only with GL_RGB if it's
actually RGBA in the driver.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
v2: The types of st_translate_color parameters were changed to gl_color_union
    and pipe_color_union as per Brian's comment.
(cherry picked from commit 2bbd307fa638f6d256d020ddf1cff5fc7f735fd2)

11 years ago[PATCH] makefiles: use configured name for -ldrm* where possible
Maarten Lankhorst [Fri, 16 Nov 2012 17:50:57 +0000 (18:50 +0100)]
[PATCH] makefiles: use configured name for -ldrm* where possible

For precise lts support I had to do some magic with the library names, which works fine
as long as the libraries from pkg-config are used.

The parts with src/gallium/targets/va-*/Makefile will not apply on the master branch,
but do apply to the 9.0 branch.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 4f0537e645f9c34e305f2808c70eafbbc1c7689c)

11 years agonv50/ir/tgsi: fix srcMask for TXP with SHADOW1D
Christoph Bumiller [Wed, 24 Oct 2012 18:33:02 +0000 (20:33 +0200)]
nv50/ir/tgsi: fix srcMask for TXP with SHADOW1D
(cherry picked from commit d310e29302fb409c0c23442c2b1d1a6c044dd6f0)

11 years agonv50: point vertex runout at a valid address
Ben Skeggs [Mon, 8 Oct 2012 00:25:39 +0000 (10:25 +1000)]
nv50: point vertex runout at a valid address

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from commit 63c3a799aecff5348ecec3c4c13355996e4bf820)

11 years agonvc0: point vertex runout at a valid address
Ben Skeggs [Mon, 8 Oct 2012 00:16:49 +0000 (10:16 +1000)]
nvc0: point vertex runout at a valid address

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from commit c47a01c29cf14d11731c88bc8ed10a3f575c5a12)

11 years agonvc0: fix missing permanent bo reference on poly cache
Ben Skeggs [Sun, 7 Oct 2012 23:13:46 +0000 (09:13 +1000)]
nvc0: fix missing permanent bo reference on poly cache

Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from commit d53bbabe6119a697bcf1a2e393d1c2283560bc01)

11 years agodocs: add news item for 9.0.1 release
Andreas Boll [Sat, 17 Nov 2012 07:50:00 +0000 (08:50 +0100)]
docs: add news item for 9.0.1 release

11 years agodocs: fix release date of 9.0.1
Andreas Boll [Sat, 17 Nov 2012 07:46:05 +0000 (08:46 +0100)]
docs: fix release date of 9.0.1

11 years agodocs: Add 9.0.1 release md5sums
Ian Romanick [Fri, 16 Nov 2012 22:26:20 +0000 (14:26 -0800)]
docs: Add 9.0.1 release md5sums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agodocs: Add 9.0.1 release notes upstream
Ian Romanick [Wed, 14 Nov 2012 18:46:47 +0000 (10:46 -0800)]
docs: Add 9.0.1 release notes

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agobuild: add missing files to tarballs target
Andreas Boll [Wed, 14 Nov 2012 20:43:31 +0000 (21:43 +0100)]
build: add missing files to tarballs target

fixes errors ./configure and make was complaining about

NOTE: This is a candidate for the 9.0 branch.

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

11 years agobuild: add missing Makefile.in files to tarballs target
Andreas Boll [Wed, 14 Nov 2012 20:39:15 +0000 (21:39 +0100)]
build: add missing Makefile.in files to tarballs target

fixes errors ./configure was complaining about

NOTE: This is a candidate for the 9.0 branch.

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

11 years agobuild: add config.sub and config.guess to tarballs target
Andreas Boll [Wed, 14 Nov 2012 20:34:44 +0000 (21:34 +0100)]
build: add config.sub and config.guess to tarballs target

fixes errors ./configure was complaining about

NOTE: This is a candidate for the 9.0 branch.

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

11 years agomesa: use .cherry-ignore in the get-pick-list.sh script
Andreas Boll [Mon, 22 Oct 2012 19:18:17 +0000 (21:18 +0200)]
mesa: use .cherry-ignore in the get-pick-list.sh script

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit ca8988673baa65107a1b8f6f59b671725d9e4814)

11 years agomesa: add initial .cherry-ignore file for the 9.0 branch
Andreas Boll [Fri, 9 Nov 2012 10:07:15 +0000 (11:07 +0100)]
mesa: add initial .cherry-ignore file for the 9.0 branch

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agowayland: Destroy frame callback when destroying surface
Jonas Ådahl [Sat, 27 Oct 2012 22:50:12 +0000 (00:50 +0200)]
wayland: Destroy frame callback when destroying surface

If a frame callback is not destroyed when destroying a surface, its
handler function will be invoked if the surface was destroyed after the
callback was requested but before it was invoked, causing a write on
free:ed memory.

This can happen if eglDestroySurface() is called shortly after
eglSwapBuffers().

Note: This is a candidate for stable branches.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
(cherry picked from commit a3b6b2d3055070da9bf7054fecfd0b171c398eb7)

11 years agoegl_dri2/x11: Fix eglPostSubBufferNV()
Fredrik Höglund [Tue, 6 Nov 2012 16:36:34 +0000 (17:36 +0100)]
egl_dri2/x11: Fix eglPostSubBufferNV()

This got broken in commit 0a523a8820e8a2549ac1c7887eb1892b228af44b.

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55856
(cherry picked from commit f42518962a08ce927e4ddd233d19d2661e135834)

11 years agomesa: Bump version to 9.0.1
Ian Romanick [Thu, 8 Nov 2012 18:47:44 +0000 (10:47 -0800)]
mesa: Bump version to 9.0.1

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agodocs: Add 9.0.1 release notes
Ian Romanick [Thu, 8 Nov 2012 18:44:49 +0000 (10:44 -0800)]
docs: Add 9.0.1 release notes

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoglsl: Allow ir_if in the linker's move_non_declarations function.
Kenneth Graunke [Wed, 24 Oct 2012 20:17:24 +0000 (13:17 -0700)]
glsl: Allow ir_if in the linker's move_non_declarations function.

Global initializers using the ?: operator with at least one non-constant
operand generate ir_if statements.  For example,

   float foo = some_boolean ? 0.0 : 1.0;

becomes:

   (declare (temporary) float conditional_tmp)
   (if (var_ref some_boolean)
       ((assign (x) (var_ref conditional_tmp) (constant float (0.0))))
       ((assign (x) (var_ref conditional_tmp) (constant float (1.0)))))

This pattern is necessary because the second or third arguments could be
function calls, which create statements (not expressions).

The linker moves these global initializers into the main() function.
However, it incorrectly had an assertion that global initializer
statements were only assignments, calls, or temporary variable
declarations.  As demonstrated above, they can be if statements too.

Other than the assertion, everything works fine.  So remove it.

Fixes new Piglit test condition-08.vert, as well as an upcoming
game that will be released on Steam.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit b45a68eebf3cf7227fc70082cb1e796041fc81ab)

12 years agoglx: Set sRGBCapable to a default value
Ian Romanick [Thu, 12 Jul 2012 20:56:32 +0000 (13:56 -0700)]
glx: Set sRGBCapable to a default value

Previously, if the server didn't send a GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
tag, it would still be set to GLX_DONT_CARE (which is -1).  Set it to
GL_FALSE instead.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Maciej Wieczorek <maciej.t.wieczorek@intel.com>
(cherry picked from commit 7b0f912e70d79bcb863ea38f7d3910ab2be0860e)

12 years agoralloc: Annotate printf functions with PRINTFLIKE(...)
Matt Turner [Tue, 23 Oct 2012 20:30:09 +0000 (13:30 -0700)]
ralloc: Annotate printf functions with PRINTFLIKE(...)

This is a squash of the following two commits:

    ralloc: Annotate printf functions with PRINTFLIKE(...)

    Catches problems such as (in the gles3 branch)

    glcpp-parse.y: In function '_glcpp_parser_handle_version_declaration':
    glcpp-parse.y:1990:39: warning: format '%lli' expects argument of type
     'long long int', but argument 4 has type 'int' [-Wformat]

    As a side-effect, remove ralloc.c's likely/unlikely macros and just use
    the ones from main/compiler.h.

    NOTE: This is a candidate for the release branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    (cherry picked from commit 41b14d125196e75cdd4599a4c1069b41e7000d48)

and

    src/glsl/tests/Makefile.am: Specify -I... in AM_CPPFLAGS

    When specifying per-target CFLAGS (e.g., ralloc_test_CFLAGS) AM_CFLAGS
    are not used. AM_CPPFLAGS should be used for includes anyway.

    Fixes a build problem since 41b14d125:

    CC       ralloc_test-ralloc.o
    In file included from ../../../src/glsl/ralloc.c:42:0:
    ../../../src/glsl/ralloc.h:57:27: fatal error: main/compiler.h: No such file or directory

Acked-by: Paul Berry <stereotype441@gmail.com>
    (cherry picked from commit 67f1e7bf5f5d1482cb8684dd5a405b7bab5b1f34)

12 years agobuild: Ship install-sh in the tarball
Matt Turner [Tue, 23 Oct 2012 17:57:15 +0000 (10:57 -0700)]
build: Ship install-sh in the tarball

Fixes the problem where configure from the tarball would report missing
files:

$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in bin

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit ec57fbbc72b552a4f894f32798a2ace16749f520)

12 years agoRe-add HAVE_PTHREADS preprocessor macro
Matt Turner [Thu, 11 Oct 2012 17:57:26 +0000 (10:57 -0700)]
Re-add HAVE_PTHREADS preprocessor macro

Broken in commit 814345f54b.

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit 9a51edfb5af72a7a480f408f02d8ecd98c576b7b)

12 years agoglx: Add GLXBadProfileARB to the error string list
Adam Jackson [Wed, 17 Oct 2012 18:34:53 +0000 (14:34 -0400)]
glx: Add GLXBadProfileARB to the error string list

Note: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit a30d14635d5d55ce0e022b0b66770da32155a3d7)

12 years agoglx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()
Owen W. Taylor [Wed, 17 Oct 2012 04:50:28 +0000 (00:50 -0400)]
glx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()

Due to a string mismatch, INTEL_swap_event wasn't listed among GLX
extensions for the connection, even when present on both client and
server. That is, glXQueryServerString and glXGetClientString reported the
extension, but glXQueryExtensionsString did not.

Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56057
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 1d0c6211212a2d486c8f7f64349fd9683061342e)

12 years agoegl: Return EGL_BAD_MATCH for invalid profile attributes
Matt Turner [Tue, 9 Oct 2012 00:01:34 +0000 (17:01 -0700)]
egl: Return EGL_BAD_MATCH for invalid profile attributes

Version 12 of the EGL_KHR_create_context spec changed this behavior.

NOTE: This is a candidate for the 9.0 branch
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 587d5db11d8047663201c5fb06a6b2feb5d55891)

12 years agowayland: Drop support for ill-defined, unused wl_egl_pixmap
Kristian Høgsberg [Tue, 16 Oct 2012 18:30:53 +0000 (14:30 -0400)]
wayland: Drop support for ill-defined, unused wl_egl_pixmap

It doesn't provide the cross-process buffer sharing that a window system
pixmap could otherwise support and we don't have anything left that uses
this type of surface.

12 years agowayland: Remove 0.85 compatibility #ifdefs
Kristian Høgsberg [Tue, 16 Oct 2012 18:04:02 +0000 (14:04 -0400)]
wayland: Remove 0.85 compatibility #ifdefs

12 years agoegl/wayland: Update to Wayland 0.99 API
Kristian Høgsberg [Thu, 11 Oct 2012 02:10:42 +0000 (22:10 -0400)]
egl/wayland: Update to Wayland 0.99 API

The 0.99.0 Wayland release changes the event API to provide a thread-safe
mechanism for receiving events specific to a subsystem (such as EGL) and
we need to use it in the EGL platform.

The Wayland protocol now also requires a commit request to make changes
take effect, issue that from eglSwapBuffers.

12 years agogbm: Use the kms dumb ioctls for cursor instead of libkms
Kristian Høgsberg [Sun, 21 Oct 2012 17:00:28 +0000 (13:00 -0400)]
gbm: Use the kms dumb ioctls for cursor instead of libkms

We need to create bos suitable for cursor usage that we can map and
write data into.  The kms dumb ioctls is all we need for this, so drop
the dependency on libkms.

12 years agogbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()
Kristian Høgsberg [Mon, 1 Oct 2012 15:19:10 +0000 (11:19 -0400)]
gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
12 years agoi965: Fix regression in depth texture rendering on pre-SNB
Ian Romanick [Fri, 19 Oct 2012 21:04:08 +0000 (14:04 -0700)]
i965: Fix regression in depth texture rendering on pre-SNB

This was introduced by commit 24db6d6 (cherry-picked from a683012).  The
original patch fixed potential GPU hangs on SNB, and it caused some
rendering regressions there.  The benefits outweigh the costs.

However, the work-around is not necessary for pre-SNB chipsets.
Applying the work-around there gives rendering regressions with no
benefit.  This patch disables the work-around on pre-SNB chipsets.

Without the original patch, the piglit test
depthstencil-render-miplevels would reliably hang an SNB GPU.  On ILK
this test would not hang, and it does not hang with this patch.

NOTE: This is a candidate for the 8.0 and 9.0 branches

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
12 years agost/mesa: Fix assertions for copying texture image to finalized miptree.
Michel Dänzer [Mon, 22 Oct 2012 17:20:56 +0000 (19:20 +0200)]
st/mesa: Fix assertions for copying texture image to finalized miptree.

The layer dimension of array textures is not subject to mipmap minification.
OTOH we were missing an assertion for the depth dimension.

Fixes assertion failures with piglit {f,v}s-textureSize-sampler1DArrayShadow.
For some reason, they only resulted in piglit 'warn' results for me, not
failures.

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

NOTE: This is a candidate for the stable branches.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
(cherry picked from commit eee1ff423c6a0c9c776b4e76b79bb5ed5480d83c)

12 years agomesa: add get-pick-list.sh script into bin/
Andreas Boll [Tue, 23 Oct 2012 17:32:33 +0000 (19:32 +0200)]
mesa: add get-pick-list.sh script into bin/

This is a squash of:

    mesa: add get-pick-list.sh script into bin/

    NOTE: This is a candidate for the stable branches.
    (cherry picked from commit 2d95db660e20787bcfe6af55569299515b434971)

This is the 2nd commit message:

    mesa: simplify get-pick-list.sh script

    and add a description for the script

    NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    (cherry picked from commit fa27a0db43ba7ef8fdad41b5ad2bd6b45ba34b90)

This is the 3rd commit message:

    mesa: optimize get-pick-list.sh script

    cuts down the while loop iterations from 4600 to 380 commits at the
    moment

    NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    (cherry picked from commit b2991526ed6faa713e3cf640fcdbbad68d991f3e)

This is the 4th commit message:

    mesa: grep for commits with cherry picked in commit message only once

    and save them temporary in already_picked

    NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    (cherry picked from commit 135ec3a1db0de50e2bb3c57d4bf76f87ac80320f)

This is the 5th commit message:

    mesa: fix indentation in get-pick-list.sh script

    NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    (cherry picked from commit 3e3ff4cd736ee881d37cfe4d40e540db503b41a5)

12 years agonouveau: use pre-calculated stride for resource_get_handle
Marcin Slusarz [Mon, 1 Oct 2012 23:52:23 +0000 (01:52 +0200)]
nouveau: use pre-calculated stride for resource_get_handle

Fixes FDO#55294.

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit 93eba269351c6e256db3a4cc7c7018f5a3fae5a1)

12 years agost/mesa: Fix source miptree level for copying data to finalized miptree.
Michel Dänzer [Fri, 19 Oct 2012 09:59:35 +0000 (11:59 +0200)]
st/mesa: Fix source miptree level for copying data to finalized miptree.

Fixes WebGL texture mips conformance test, no piglit regressions.

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

NOTE: This is a candidate for the stable branches.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
(cherry picked from commit c2e37b1d2e1b8014475c7d2698fba317c9082d70)

12 years agointel: Add missing #include <time.h>
Quentin Glidic [Tue, 9 Oct 2012 13:15:47 +0000 (15:15 +0200)]
intel: Add missing #include <time.h>

Commit 006c1a3c652803e2ff8d5f7ea55c9cb5d8353279 introduced a call to
clock_gettime, but failed to include <time.h>, breaking the build in
some cases.

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

12 years agoglget: fix make check for glGet GL_POLYGON_OFFSET_BIAS
Imre Deak [Wed, 10 Oct 2012 09:48:19 +0000 (12:48 +0300)]
glget: fix make check for glGet GL_POLYGON_OFFSET_BIAS

This got broken by:
22b7ddc7f glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension
section

Fix it by appending the _EXT suffix to the enum in the test too.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix parameter lookup for apps using multiple APIs
Imre Deak [Mon, 10 Sep 2012 05:45:56 +0000 (08:45 +0300)]
mesa: glGet: fix parameter lookup for apps using multiple APIs

The glGet hash was initialized only once for a single GL API, even if
the application later created a context for a different API. This
resulted in glGet failing for otherwise valid parameters in a context
if that parameter was invalid in another context created earlier.

Fix this by using a separate hash table for each API.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agoglapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section
Imre Deak [Mon, 10 Sep 2012 05:46:07 +0000 (08:46 +0300)]
glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section

This should be named GL_POLYGON_OFFSET_BIAS_EXT and listed under the
EXT_polygon_offset section. (Solution by Ian Romanick)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa/es: Define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT enum for all GLs
Tomeu Vizoso [Tue, 11 Sep 2012 09:14:26 +0000 (11:14 +0200)]
mesa/es: Define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT enum for all GLs

instead of just for GL and ES1.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix API check for EGL_image_external enums
Imre Deak [Mon, 10 Sep 2012 06:41:40 +0000 (09:41 +0300)]
mesa: glGet: fix API check for EGL_image_external enums

These enums are valid only in ES1 and ES2. So far they were marked valid
incorrectly, depending on the previous API mask in the enum list.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix indentation of print_table_stats
Imre Deak [Mon, 10 Sep 2012 06:41:39 +0000 (09:41 +0300)]
mesa: glGet: fix indentation of print_table_stats

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix indentation of find_value
Imre Deak [Mon, 10 Sep 2012 06:41:38 +0000 (09:41 +0300)]
mesa: glGet: fix indentation of find_value

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agomesa: glGet: fix indentation of _mesa_init_get_hash
Imre Deak [Mon, 10 Sep 2012 06:41:37 +0000 (09:41 +0300)]
mesa: glGet: fix indentation of _mesa_init_get_hash

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
12 years agodocs: add news item for 9.0 release
Andreas Boll [Tue, 9 Oct 2012 15:07:55 +0000 (17:07 +0200)]
docs: add news item for 9.0 release

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: fix error check for zero-sized compressed subtexture
Brian Paul [Fri, 5 Oct 2012 22:59:27 +0000 (16:59 -0600)]
mesa: fix error check for zero-sized compressed subtexture

For glCompressedTexSubImage, width or height = 0 is legal.
Fixes a failure in piglit's s3tc-errors test.

This is for the 9.0 and 8.0 branches.  Already fixed on master.

12 years agomesa: don't call TexImage driver hooks for zero-sized images
Brian Paul [Fri, 5 Oct 2012 22:47:40 +0000 (16:47 -0600)]
mesa: don't call TexImage driver hooks for zero-sized images

This simply avoids some failed assertions but there's no reason to
call the driver hooks for storing a tex image if its size is zero.

Note: This is a candidate for the stable branches.
(cherry picked from commit 91d84096497ff538f55591f7e6bb0b563726db8d)

12 years agodocs: Add 9.0 release md5sums
Ian Romanick [Mon, 8 Oct 2012 22:07:10 +0000 (15:07 -0700)]
docs: Add 9.0 release md5sums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Bump version number to 9.0 (final)
Ian Romanick [Mon, 8 Oct 2012 21:56:11 +0000 (14:56 -0700)]
mesa: Bump version number to 9.0 (final)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoconfigure.ac: Don't link gallium drivers with libdricore
Tom Stellard [Tue, 4 Sep 2012 13:37:02 +0000 (09:37 -0400)]
configure.ac: Don't link gallium drivers with libdricore

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

12 years ago_mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime
Anuj Phogat [Fri, 31 Aug 2012 20:51:39 +0000 (13:51 -0700)]
_mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

This is a squash for the following 7 commits.  The first introduces the
functionality, and the remaining six fix various bugs.

Patch 1:
    _mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

    glsl path of _mesa_meta_GenerateMipmap() function would require different fragment
    shaders depending on the texture target. This patch adds the code to generate
    appropriate fragment shader programs at run time.
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54296

    V2: Removed the code for integer textures as ARB is planning to
        disallow automatic mipmap generation for integer textures.
        Now using ralloc_asprintf in setup_glsl_generate_mipmap().

    NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
    (cherry picked from commit 299acac849eb8506de9760c94c6e8e8b1046d909)

Patch 2:
    _mesa_meta_GenerateMipmap: Generate separate shaders for glsl 120 / 130

    glsl version of _mesa_meta_GenerateMipmap() would require separate
    shaders for glsl 120 and 130.

    V2: Removed the code for integer textures as ARB is planning to
        disallow automatic mipmap generation for integer textures.

    NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
    (cherry picked from commit 15bf3103b48a5928321fe56fbb3ed28a0f314418)

Patch 3:
    meta: Add on demand compilation of per target shader programs

    A call to glGenerateMipmap() follows the generation of a relevant
    shader program in setup_glsl_generate_mipmap().

    To support all texture targets and to avoid compiling shaders
    everytime, per target shader programs are compiled on demand
    and saved for the next call.

    Fixes float-texture(mipmap.manual):
    See Comment 6: https://bugs.freedesktop.org/show_bug.cgi?id=54296

    NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
    (cherry picked from commit eb1d87fb945783448cc40ad43c9cd4d98002d424)

Patch 4:
    meta: make mem_ctx non-global.

    I can't see any external users, and this is a global symbol,

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 36639ec6e9a2758e344235fbdc1450719d8851e3)

Patch 5:
    meta: Remove unsafe global mem_ctx pointer

    NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
    (cherry picked from commit ab097dde0c958dd8b1c06a07ef8913512753760c)

Patch 6:
    meta: Rearrange shader creation in setup_glsl_generate_mipmap

    The diff looks weird, but this moves the code from the first 'if
    (ctx->Const.GLSLVersion < 130)' block down into the second block.  It
    also moves some variable decalarations closer to their use.

    NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
    (cherry picked from commit 3308c079bd00e9b9aa546f5214ce197a904d059b)

Patch 7:
    meta: Don't use GLSL 1.30 shader on OpenGL ES 2

    Fixes GLES2 CoverageGL conformance test.

    NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
    (cherry picked from commit 0242381f06edb09dcf0eaacd6d26ccd8584700cc)

12 years agor600g: fix possible issue with stencil mipmap rendering
Marek Olšák [Sat, 6 Oct 2012 03:23:47 +0000 (05:23 +0200)]
r600g: fix possible issue with stencil mipmap rendering

Somehow I only hit this issue with my latest libdrm changes.
This won't be needed with DB texturing.

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit 9dfca930d7fcfda6767d3be9b1690d010f08fea5)

12 years agomesa: remove bogus compressed texture size checks
Brian Paul [Tue, 2 Oct 2012 15:52:55 +0000 (09:52 -0600)]
mesa: remove bogus compressed texture size checks

A compressed texture image size doesn't have to be a multiple of the
compressed block size (only sub-images do).  Fixes issues when building
compressed mipmaps because we often wind up with non-block-size images
for the higher mipmap levels.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=55445

Note: This is a candidate for the stable branches.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Sven Arvidsson <sa@whiz.se>
(cherry picked from commit df4a88ac4398ec4c152eb57a7129c07bb623edd7)

12 years agointel/i965: Disable SampleAlphaToOne if dual source blending enabled
Anuj Phogat [Fri, 21 Sep 2012 22:16:38 +0000 (15:16 -0700)]
intel/i965: Disable SampleAlphaToOne if dual source blending enabled

From SandyBridge PRM, volume 2 Part 1, section 12.2.3, BLEND_STATE:
DWord 1, Bit 30 (AlphaToOne Enable):
"If Dual Source Blending is enabled, this bit must be disabled"

Note: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit ea0d08872724b5e31e9e32db2338e15fdfdcc4de)

12 years agomesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.
Kenneth Graunke [Tue, 2 Oct 2012 03:11:38 +0000 (20:11 -0700)]
mesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.

The idea here is to not flag _NEW_VARYING_VP_INPUTS when shaders (either
GLSL or ARB vp/fp) are in use.  If either TNL or TexEnv programs are
active, at least one stage is using fixed function.

On Pineview, fixes 20 Piglit, 60 oglconforms, and 7 ES 1.1 conformance
tests, as well as missing textures in Xonotic.  These were all
regressions since commit fb4a34e60eb4c1bdc7b0fdcd98d1bf3038c354e8.

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49127
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54807
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 7fa0f10cd85ccb5afbc3a961164011de70970ff3)

12 years agomesa: don't enable glVertexPointer() when using API_OPENGLES2.
Paul Berry [Wed, 3 Oct 2012 21:20:17 +0000 (14:20 -0700)]
mesa: don't enable glVertexPointer() when using API_OPENGLES2.

This function is only present in GLES1 and in the OpenGL compatibility
profile.

Fixes the following "make check" failure:

    [----------] 1 test from DispatchSanity_test
    [ RUN      ] DispatchSanity_test.GLES2
    Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
    compression/decompression unavailable
    dispatch_sanity.cpp:122: Failure
    Value of: table[i]
       Actual: 0x4de54e
    Expected: (_glapi_proc) _mesa_generic_nop
    Which is: 0x41af72
    i = 321
    [  FAILED  ] DispatchSanity_test.GLES2 (4 ms)
    [----------] 1 test from DispatchSanity_test (4 ms total)

NOTE: This is a candidate for stable release branches.

Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Tested-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 8f0b81bf7ddcdf5715a3e00af67395b91f27a243)

12 years agoSwapBuffersRegionNOK: invert rectangles on y axis
Robert Bragg [Tue, 18 Sep 2012 15:10:03 +0000 (16:10 +0100)]
SwapBuffersRegionNOK: invert rectangles on y axis

The EGL_NOK_swap_region2 spec states that the rectangles are specified
with a bottom-left origin within a surface coordinate space also with a
bottom left origin, so this patch ensures the rectangles are flipped
before passing them on to dri2_copy_region.

Fixes piglit's egl-nok-swap-region test.

Tested-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 0a523a8820e8a2549ac1c7887eb1892b228af44b)

12 years agobuild: Set PTHREAD_LIBS for pkgconfig files if empty
Matt Turner [Thu, 27 Sep 2012 22:49:52 +0000 (15:49 -0700)]
build: Set PTHREAD_LIBS for pkgconfig files if empty

(cherry picked from dd4fde8f674f5e3efa19e929f97de4ecfd82391b)

12 years agoradeon/llvm: Remove R600InstrInfo.td from TD_FILES
Tom Stellard [Thu, 6 Sep 2012 14:05:22 +0000 (14:05 +0000)]
radeon/llvm: Remove R600InstrInfo.td from TD_FILES

Fixes build bug introduced by
cebbdd4ac23725963207bf6f8fc7101150e6065f
(cherry picked from commit 2baaa5c7eb21517f0197bfd91154e9b4886fbb1b)

12 years agoradeon/llvm: Cleanup makefile
Tom Stellard [Wed, 29 Aug 2012 13:01:15 +0000 (13:01 +0000)]
radeon/llvm: Cleanup makefile

Hopefully, this will fix all the parallel make problems people have
been having.
(cherry picked from commit cebbdd4ac23725963207bf6f8fc7101150e6065f)

12 years agoi965: Use visibility cflags on the driver code.
Eric Anholt [Fri, 21 Sep 2012 08:10:54 +0000 (10:10 +0200)]
i965: Use visibility cflags on the driver code.
(cherry picked from commit 837f06b42fd46fdfdc0c85734dbad5497ea6d19f)

The only symbols that need to be public (those in intel_screen.c that the
loader looks for) are already marked public.  Saves 100k of compiled driver
size.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agobuild: Don't build libdricore if not building classic drivers
Matt Turner [Thu, 20 Sep 2012 22:08:02 +0000 (15:08 -0700)]
build: Don't build libdricore if not building classic drivers
(cherry picked from commit 523c01524638b3d1bb363f4c0a647b0777840b7a)

12 years agobuild: Add visibility CFLAGS to OSMesa
Matt Turner [Thu, 27 Sep 2012 22:35:15 +0000 (15:35 -0700)]
build: Add visibility CFLAGS to OSMesa
(cherry picked from commit 24ded898761757ec68e8f6dbe7de1f18c0be3f63)

12 years agobuild: Link OSMesa with glapi, libdl, libstdc++
Matt Turner [Thu, 27 Sep 2012 20:56:27 +0000 (13:56 -0700)]
build: Link OSMesa with glapi, libdl, libstdc++
(cherry picked from commit 1762ec28db4bfb85eeb6e61377839a3889f77216)

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=399813
          https://bugs.freedesktop.org/show_bug.cgi?id=53179